File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 18
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: 42929
    
  68
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.
Ponnusamy Gov
Greenhorn

Joined: Feb 01, 2011
Posts: 18
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!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: build issue while using ant