hi there ,
in course of writing a program i needed to input "java source code"
and compile it
in program itself and pipe the compiled "class file" to other tool
called "javap".
so, anybody out there tell me how to invoke "javac & javap " from
source itself
ameyas7 - 26 Aug 2007 07:01 GMT
> hi there ,
> in course of writing a program i needed to input "java source code"
[quoted text clipped - 3 lines]
> so, anybody out there tell me how to invoke "javac & javap " from
> source itself
check out exec method of java.lang.Runtime class.
regards
amey
ameyas7 - 26 Aug 2007 07:02 GMT
> hi there ,
> in course of writing a program i needed to input "java source code"
[quoted text clipped - 3 lines]
> so, anybody out there tell me how to invoke "javac & javap " from
> source itself
oh i forgot to mention @ pipes.
u may need to have a look at Process class as well.
Andrew Thompson - 26 Aug 2007 07:09 GMT
>...i needed to input "java source code"
>and compile it
...
<http://mindprod.com/jgloss/javacmain.html>
<http://www.google.com/search?q=jsr+199>
...
> so, anybody out there tell me how to invoke "javac & javap " from
>source itself
Is that a question? If so, it pays to add a question mark (?).
Another thing that encourages people to read messages,
by making it easier for them to do that, is to use the Shift
Key once at the start of each sentence.

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Roedy Green - 26 Aug 2007 10:49 GMT
>hi there ,
> in course of writing a program i needed to input "java source code"
[quoted text clipped - 3 lines]
> so, anybody out there tell me how to invoke "javac & javap " from
>source itself
see http://mindprod.com/jgloss/onthefly.html for javac
http://mindprod.com/jgloss/exec.html for javap

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Lew - 26 Aug 2007 14:17 GMT
>> hi there ,
>> in course of writing a program i needed to input "java source code"
[quoted text clipped - 6 lines]
> see http://mindprod.com/jgloss/onthefly.html for javac
> http://mindprod.com/jgloss/exec.html for javap
The Java Compiler API:
<http://jcp.org/en/jsr/detail?id=199>
<http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html>
<http://java.sun.com/javase/6/docs/api/javax/tools/JavaCompiler.html>

Signature
Lew