dcsimg
Notepad woth Java compiler
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ketan_Mehta
Posted On:   Monday, July 16, 2001 02:13 AM

I made notepad in Java & added one button, clicking on which, it compiles java file (without using console). I used sun.tools.javac.Main.main(String[]) to compile .java file . It compiles Java file, but i want output error message occures during compilation to be appear in bottom of Notepad.. how to make it done? Also how can i Run .class file within Notepad using anothet button(without going to console)? I extracted tools.jar file to get sun.tools.javac.Main.class, to handle the above task & copied sun.tools.javac.Main.Class to same directory of Notepad.Class. Now if i want to run Notepad at another machine, where tools.jar file is not extracted, will my notepad wo   More>>


I made notepad in Java & added one button, clicking on which, it compiles java file (without using console).
I used sun.tools.javac.Main.main(String[]) to compile .java file .


It compiles Java file, but i want output error message occures during compilation to be appear in bottom of Notepad.. how to make it done?


Also how can i Run .class file within Notepad using anothet button(without going to console)?


I extracted tools.jar file to get sun.tools.javac.Main.class, to handle the above task & copied sun.tools.javac.Main.Class to same directory of Notepad.Class. Now if i want to run Notepad at another machine, where tools.jar file is not extracted, will my notepad work to compile file at that machine??

   <<Less

Re: Notepad woth Java compiler

Posted By:   Mika_Vehkala  
Posted On:   Wednesday, July 18, 2001 04:07 AM

Hmm I think you could read (or redirect) System.err and/or System.out to detect what compiler "says".

What comes to class running execute javaw the it does not execute console window.
Another solution is to use load class with class.byName (or something likethat) method and execute main method from it.

About | Sitemap | Contact