Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Ketan Dave   on Mar 15 In Java Category.

  
Question Answered By: Isaac Williams   on Mar 15

I faced the same problem months ago, but i lost the code! But i
can say, yes you got it: you must save the program the user have
entered in the textarea to a file .java with the right name (the class
you are defining: look! it's java  so file name must match the class
name. Case sensitive, uh ? ) Then you must lunch the javac.exe
application as you were in a dos console. You can use Process class
maybe. Get the output to check if compilation process did right. And
when you must execute  just launch as before the process java.exe with
the name of the file mentioned above (without .class extension, for
sure!). That's all. Problems may rise with the classpath. I think that
if you search on the net you can find the docs/tutorials i found times
ago.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Execute from text area? Or get search suggestion and latest updates.


Tagged: