Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jay Carr
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic