• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compiler class  RSS feed

 
Rick Charles
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me the use of Compiler class with a example

Thanks in advance

Rick
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That class is used by the JVM (it compiles bytecode to native code if a JIT is present), so there is no example one could give for client code that uses it.

If you are trying to compile Java source code at runtime, your code could use the classes that make up the javac compiler. That approach is described here.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or stick your neck out and use Java 6 (pre-release) which has a new javax.tools package which includes compiling.
 
Rick Charles
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guyz!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!