Scott Kellicker

Greenhorn
+ Follow
since Apr 03, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Scott Kellicker

Sabyasachi,

I had a similar experience. getSystemJavaCompiler() returned null. I fixed this by running using the JDK instead of JRE. This link proved useful: https://openjdk.dev.java.net/compiler/guide/compilerAPI.html

ScottK


Originally posted by Palash Sahu:
Hi,

I am using jdk6 compiler api.Do I need to set tools.jar at the classpath.
Actually when I don't have tools.jar at classpath, I am getting NullPointerException at the bottom line..
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
StandardJavaFileManager sjfm = compiler.getStandardFileManager(diagnostics, null, null);

Any help will be highly appreciated.

Regards,
Sabyasachi

16 years ago