简体   繁体   中英

Where to find 'javax.lang' and 'javax.annotation' in ubuntu

I'm working on a java project which depends on both 'javax.lang' and 'javax.annotation'. I have jre/jdk installed, a lot of other javax.* on the classpath, and I develop in Java everyday. However, these two packages remain not found.

Thank you

Both exist in the main jar file, located at /usr/lib/jvm/java-6-sun/jre/lib/rt.jar .

make sure that you have your JAVA_HOME system property points to the right library, should be /usr/lib/jvm/java-6-sun.

The is is relevant if you use openjdk as well (the directory name may change)

javax.lang and javax.annotation appear to be available since version Java 6. They're not present in Java 5 or earlier versions. You ought to be using a Java 6 JDK for the purpose of development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM