Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I can't get dynamic compiler from javax.tools.ToolProvider  RSS feed

 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I get null with statment javax.tools.ToolProvider.getSystemJavaCompiler();
Why it returns null?

How can i get the instance of dynamic compiler?

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a compiler present? Only JDKs would have one, not JREs.
 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have jdk1.6.0_25 and my OS is Windows vista.

But I don't know why it returns null.


thanks.
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that the compiler is only available if you run the java.exe inside your JDK's bin folder.
 
lakshmana dhanimireddi
Greenhorn
Posts: 18
Java Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know whether I'm running java by java.exe or another way.


What can I do to invoke the java compiler dynamically?



Thanks,
Lakshmana
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!