This discussion is archived
1 Reply Latest reply: Aug 27, 2010 3:13 PM by jschellSomeoneStoleMyAlias RSS

remote compilation of java on server of source code submitted

843810 Newbie
Currently Being Moderated
java source files are written and submitted on my webpage.
i want to compile these source files and execute them. the output or the compilation errors must be returned to the webpage again.
how to acheive this remote compilation and execution.
my site has thousands of users.so it must be less server intensive.
  • 1. Re: remote compilation of java on server of source code submitted
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    koolk1990 wrote:
    how to acheive this remote compilation and execution.
    Your server does one of the following
    1. Use Runtime.exec/Process to run javac.
    2. Use the programmatic interface.

    [http://download-llnw.oracle.com/javase/6/docs/technotes/tools/windows/javac.html#proginterface]
    my site has thousands of users.so it must be less server intensive.
    Which doesn't mean much unless you have thousands of users hitting a compile button repeatedly on large source files.

    But if you have an actual problem then there a many solutions. Some possibilities.
    1. Queue requests and fail newest if queue is 'full' (bigger than 'X').
    2. Queue requests via peristent storage and provide the user with a unique tracking id. The user then checks later to see the results using the tracking id to find those.