Results 1 to 20 of 24
Thread: Online Java compiler
- 05-05-2008, 11:50 PM #1
Member
- Join Date
- May 2008
- Posts
- 4
- Rep Power
- 0
Online Java compiler
i have a class project:
to create an online java compiler/runner where users can write, compile and execute code...
to start, i think i have to put the compiler on the server, with the jdk of course... but i have doubts as for the interface of the application or the website... and its functionality... what if a user is implementing GUIs... how to manage the output then...
Please, anyone who's interested in giving me tips about this project or any ideas is more than welcome!!
Regards!
- 05-06-2008, 01:28 AM #2
you could just have the user send their files to a server then send back the compiled classes. Then just have the user run the compiled classes.
My IP address is 127.0.0.1
- 05-09-2008, 12:12 PM #3
Member
- Join Date
- May 2008
- Posts
- 4
- Rep Power
- 0
I wanted it to be interactive... so the users write their code... check it for mistakes... then compile it and run it!!!
It's like a complete JAVA IDE but online!!!!
So????
- 05-09-2008, 02:08 PM #4
I don't think that is possible unless you send back a jar file then have the users run it. If you want an IDE you would have to come up with a way to read the text and check for mistakes and everything else that goes into making an IDE. This is a lot more complicated than you think. Eclipse was a multi-million dollar project worked on by a team of computer scientist. Just keep that in mind.
My IP address is 127.0.0.1
- 05-09-2008, 02:24 PM #5
you are trying to create online Eclipse :eek:
i am the future
- 05-10-2008, 10:57 AM #6
Member
- Join Date
- May 2008
- Posts
- 4
- Rep Power
- 0
Ok guys... thx :P
I'll do my best!!
- 05-11-2008, 02:15 AM #7
Just a suggestion:
The Java compiler has a public API. It is also integrated with the Java Scripting Engine API. You can read here: Little Tutorials about it. Maybe somehow scripting the compiler can help you achieve the things you want, at least a start. If you want to learn more about scripting a Java application you can read my latest tutorial at: Script Thy Java App | Little Tutorials
In running this kind of application online you have to consider the security implications.
Good luckDaniel @ [www.littletutorials.com]
Language is froth on the surface of thought
- 05-16-2008, 12:12 PM #8
Member
- Join Date
- May 2008
- Posts
- 4
- Rep Power
- 0
Yeah ... that was one of my main concerns.... runnable code online :S:S
but i'll have to try it... hehe
thx anyway... i'll be checking ur tutorials now :P
- 12-26-2008, 10:08 AM #9
Member
- Join Date
- Dec 2008
- Posts
- 2
- Rep Power
- 0
How is the progress of the project?
- 10-06-2009, 04:46 PM #10
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
I'm a final year btech student.I'm planning to do this as my final year project.So, can u help me by telling me the basic idea..and the method for implementing such a compiler?
- 10-06-2009, 04:56 PM #11
- 07-27-2010, 02:09 PM #12
Member
- Join Date
- Jul 2010
- Posts
- 1
- Rep Power
- 0
I,m final year studend BE (IT) I choose online compiler as my project.please can u teel me how online java compilers works at server side ,when any users wants to compile their programs ..ur help give the idea about it & this will help me to making class diag,activity diag. thanks
- 07-27-2010, 02:13 PM #13
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
Hey, i had done this as my project. The idea was to save the code and to compile it using the system calls.
- 07-27-2010, 02:30 PM #14
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
- 07-27-2010, 02:44 PM #15
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
we did only for c, c++. but i think it will work for java too. In a Linux server, we can compile the code using the calls like
$command=$path_compiler.' -c "'.$compile_file.'" -o "'.$compile_file.'.o" 2>> "'.$result_file.'"';
system($command, $retval);
This is the thing we used. system calls within php.
- 07-27-2010, 02:58 PM #16
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
Ah, yes, you're simply invoking the compiler from a shell/command line interpreter but that doesn't solve the 'remote compilation' task stated in this thread. b.t.w. the API for the javac compiler is public so there's no need to have a shell running in between your application and the compiler.
kind regards,
Jos
- 01-22-2011, 05:42 AM #17
Member
- Join Date
- Jan 2011
- Posts
- 1
- Rep Power
- 0
There is a good online java compiler and runner here. You can also run threads and see the results immediately. http://www.browxy.com
- 01-22-2011, 06:11 AM #18
Well, doesn't seem that difficult. You're not actually required to convert the java into bytecode yourself right? You can use the official javac?
Groovy on Grails is the way to go. Its a complete MVC web app system that allows the execution of actual java code. You can make calls to a server side instance of javac and provide links to download the compiled binaries, or execute the binary and return the results of the output to the user via formatted GSP (groovy server pages). Bonus, you stay 100% in the JVM. Jetty is a great lightweight application server for Grails apps too. Good luck!
- 01-22-2011, 08:12 AM #19
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
I wonder how those online compilers work: suppose I have a class A that depends on a class B that depends on a class C. I compile them all (upload the stuff and compile it). Later I change one thing to class A. I think I have to upload the sources for class B and C again if I want to (re)compile the code for class A. I don't think that online compiler keeps a repository of compiled code for me; nah ...
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 01-23-2011, 12:30 AM #20
Similar Threads
-
How to make online jsp forms from Microsoft word forms in java
By jiten.mistry in forum Advanced JavaReplies: 2Last Post: 04-28-2008, 10:56 AM -
Java experts needed- 30 minute online Java projects
By michelle in forum Jobs OfferedReplies: 0Last Post: 03-05-2008, 11:47 PM -
Refer a good Java compiler
By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:31 AM -
The best compiler for java
By baltimore in forum New To JavaReplies: 2Last Post: 08-06-2007, 05:10 PM


1Likes
LinkBack URL
About LinkBacks


Bookmarks