aspose file tools*
The moose likes Other Open Source Projects and the fly likes Online Java Compiler Gadget/Widget for my website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Online Java Compiler Gadget/Widget for my website" Watch "Online Java Compiler Gadget/Widget for my website" New topic
Author

Online Java Compiler Gadget/Widget for my website

Madangopal Venkatesan
Greenhorn

Joined: Jun 19, 2011
Posts: 16
Hi,


I need to add an "Online Java Compiler" feature to my website. Are there any widgets/gadgets available to add on my site to enable this feature?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I doubt it, since that's a really specialized feature. You'll most likely need to create your own.
Madangopal Venkatesan
Greenhorn

Joined: Jun 19, 2011
Posts: 16
How do I go about it? I have no clue where to start! I'm building this site using Google Sites. So, even if I did write a gadget/widget, I would have to write it the Google way to embed on my site.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Isn't Google Sites just hosting of static content with no active server-side components? That's what you'd need here - something like servlets or PHP.
Madangopal Venkatesan
Greenhorn

Joined: Jun 19, 2011
Posts: 16
It's only static content. But I can add google widgets which enable dynamic nature! I've integrated Docs on my site. News can be integrated and lots of other stuff. Most of them read from Feeds. For this feature requirement I have, I have no clue what I need to do!

Correct me if I'm wrong - Here, I might have to have a text area and a "Submit Code" button. On submitting, I need to invoke a servlet/php and parse the contents and execute it. I will then have to dump the results as a stream. Is this the approach?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
That's the basic approach, but the difficulty is in the "invoke a servlet/php" - which is something I don't think is possible using Google Sites; it would somehow have to invoke your stuff that's running elsewhere. But I'm no Google Sites expert, so take that with a grain of salt.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

You can invoke a Java compiler from within Java.

http://docs.oracle.com/javase/6/docs/api/javax/tools/package-summary.html

WP
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

William P O'Sullivan wrote:You can invoke a Java compiler from within Java.

Online?


luck, db
There are no new questions, but there may be new answers.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

@Daryl

If he has a compliant servlet engine, I don't see why not.

simply upload the file, convert to a String (as in the Oracle) example, invoke the compiler, and run it.

Now. I have no idea, how input and output would be handled, and I have not done this.

Just saying, with a smart architecture it should in theory be possible.

WP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Online Java Compiler Gadget/Widget for my website