Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

build issue while using ant

 
Ponnusamy Gov
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic