www.webdeveloper.com
Results 1 to 4 of 4

Thread: need some help in JAVA programming

  1. #1
    Join Date
    Oct 2004
    Posts
    3

    Question need some help in JAVA programming

    good day...

    i am in need of advice and help regarding the java compiler and
    interpreter.

    i am currently working on a project (a simple tutoring system in
    java). i wanted to know and/or learn a way on how to include the java
    compiler and interpreter within the program i am developing right now.
    for example i have two buttons, one that compiles and one that runs a
    pre-defined program.

    is there any code, way(s) or method(s) that makes this possible?

    thanks in advance...


    -kit

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    you can use Runtime class for such tasks(I am sure,though did not run a java command using this)

    Runtime process = Runtime.getRunTime().exec("javac className.java >ouput.log");

    something along those lines, I did not text the code.It should run the javac command(to compile the code) and then it should put the out put in the output.log file.Which you can read by File object etc..etc..
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  3. #3
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    You might want to check out the source of Robocode, which does something similar to what you're wanting to do.

  4. #4
    Join Date
    Oct 2004
    Posts
    3

    Thanks for those who replied

    your help is much appreciated....thanks again...ill try to work on that solution...

    and for those who will read my posted message,if you have some solutions or advices in mind that could be able to help me,i would gladly appreciate it..thanks again and good day.

    - kit

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles