wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes build issue while using ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "build issue while using ant" Watch "build issue while using ant" New topic
Author

build issue while using ant

Ponnusamy Gov
Greenhorn

Joined: Feb 01, 2011
Posts: 17
I am using ant build version 1.9.3 and compiling the java files. One of my java file is having import statement sun.reflect.misc.MethodUtil. During build I am getting exception "package sun.reflect.misc does not exist", but I am having rt.jar in the JDK lib where JAVA_HOME is referred. Please help to resolve this. Thanks is advance

Pons.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
That file is not normally included in the compile classpath. Note its name "rt = runtime". You need to include it especially.

Even better would be not to rely on it at all, of course - the usual warnings about code in proprietary JVM packages apply.


Ping & DNS - my free Android networking tools app
Ponnusamy Gov
Greenhorn

Joined: Feb 01, 2011
Posts: 17
I have solved this issue by adding attribute bootclasspathref in javac by giving the path of rt.jar. But I am not sure whether this is permanent solution or temperary. Anyway thanks!!!
 
wood burning stoves
 
subject: build issue while using ant