Last week I installed Oracle Java 8 with the following commands:
sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
Everything seemed to be fine (I continued using my system as normal, can't say exactly what I did over the week). Now, when I execute
java -version I get
java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
However, now when I execute
javac -version I get
/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar: invalid LOC header (bad signature) Exception in thread "main" java.lang.NoClassDefFoundError: javax/annotation/processing/ProcessingEnvironment at com.sun.tools.javac.Main.compile(Main.java:54) at com.sun.tools.javac.Main.main(Main.java:42) Caused by: java.lang.ClassNotFoundException: javax.annotation.processing.ProcessingEnvironment at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more
I guess there is some issue with
rt.jar? What is the best way to proceed here? Should I try uninstalling/reinstalling Java 8? If so, what's the easiest way to do that? Or is there some Java component I'm missing? I want to develop Java programs in Eclipse, and it was my understanding that
oracle-java8-installer would give me everything I need.
Can someone tell me what is included in "Oracle Java 8"? I know there are lots of Java things I could install, e.g. the JDK, JVM... what are each of these things used for, and am I getting all of the when I install Java 8?