Hi Albert, It's not possible to access the command line compiler from a Java App Engine app. It may be possible to use internal reflection functionality to compile the code, but you'd need to ask someone with more expertise in Java - asking this in the google-appengine-java group will probably get you more useful responses.
If the code doesn't have to be in Java, you might want to consider Javascript - there are several embeddable Javascript interpreters for Java, including Rhino, and they would make the application you describe quite straightfoward to write. -Nick Johnson On Fri, Jul 24, 2009 at 3:41 PM, Albert Attard <albertatt...@gmail.com>wrote: > > Hi everyone: > > Background about the problem: > I'm a Java lecturer and would like to create an automated question web > application similar to an extended version of multiple choice answers > by which the students can practice coding. > > Multiple choice questions are very popular in web exams as these are > fully automated. You do the test and the system corrects it for you > and gives you the results there and then. I would like to go one step > further and have the student to supply a code fragment or even a class > (es) and have the system automatically correcting it in a similar > fashion to the multiple choice questions. > > Example (in a nutshell): > The student is asked to write a method: that given an array of int and > two indices of type int (between 0 and the size of the array - 1), > this method will swap the elements at the given indices. The student > will write the method in the text area and submit it. Then the system > will include this method into a class, compile it and by using > reflection execute it with an array of values to ensure that it is > working as expected. During this process the system will be awarding > the student marks and will display the final result together with > comments as required. > > Google Appengine > I have a prototype and it works great on Tomcat. Yes I know that it is > subject to Java code injection but that's not an issue at this stage. > This issue can be fixed at a later stage. Unfortunately I cannot > implement it on the Google Appengine as most of the required > functionality, such as writing to a file, is disabled. > > Is there a way (or a procedure) of implementing such a system on the > Google Appengine? This application will be a free education tool for > everyone who would like to use it. > > Thanks in advance, > Albert Attard > > > > -- Nick Johnson, Developer Programs Engineer, App Engine --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---