my dog learned polymorphism*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant build not seeing com.sun.tools from JDK 1.7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant build not seeing com.sun.tools from JDK 1.7" Watch "Ant build not seeing com.sun.tools from JDK 1.7" New topic
Author

Ant build not seeing com.sun.tools from JDK 1.7

Jay Carr
Greenhorn

Joined: Apr 01, 2013
Posts: 2
I should start by quickly saying I'm not entirely sure this is an Ant question instead of an Eclipse question, please bear with me.

I have a project I'm working on with RapidMiner (an open source BI program, see here). I've been trying to build an extension for it using an Ant build file (build_extension.xml), but every time I run it I get the following error:



I did some research and found out that these .jars aren't contained in the JRE, but are part of the JDK. So, in Eclipse, I created an environment that includes all of the .jars from the JDK. After doing so I tested that it was visible by going into Eclipse and using the auto-complete feature,. which worked as expected. So I assume (and just assume) that Eclipse is seeing those extra .jars just fine. I also went into the "Run as Ant build..." build dialogue in Eclipse and made sure it was using that exact same version of the library (with the .jars) and ran it again. Yet I get the same error.

Am I approaching this the wrong way? How do I get javac, in Ant, to see those .jars?
Jay Carr
Greenhorn

Joined: Apr 01, 2013
Posts: 2
The answered ended up being that I had to make a new Enviroment wide JRE that was pointed at the JDK root directory. Then when I ran the Ant build I would point at that JRE and the whole thing would compile correctly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant build not seeing com.sun.tools from JDK 1.7
 
Similar Threads
Cant compile the struts application withEclispse 3.4
[java] Java Result: 1 error
Compiling
Not able to compile java files with Ant
errors generated when running Ant build file in Eclipse