I need help...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sukatoa
    Contributor
    • Nov 2007
    • 539

    #1

    I need help...

    Im planning to continue my simple editor...

    Like context, that can compile and run edited java codes from shortcut keys...

    I like to put a button, that when i press it, it automatically compiles and receive a stacktrace if it has an error... or run the class if no error...

    Thus anyone knows here how to implement it?
    What classes should i use?!!
    Am i expecting it more complex?!!

    Thanks experts....
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by sukatoa
    Im planning to continue my simple editor...

    Like context, that can compile and run edited java codes from shortcut keys...

    I like to put a button, that when i press it, it automatically compiles and receive a stacktrace if it has an error... or run the class if no error...

    Thus anyone knows here how to implement it?
    What classes should i use?!!
    Am i expecting it more complex?!!

    Thanks experts....
    Invoking the Java compiler from within a Java application is not an easy thing to do. If you have to ask how to do it, it may be too hard for you. Anyway, take a look at package javax.tools, for example, read the initial comments in the API for JavaCompiler:

    JavaCompiler

    Comment

    Working...