Reputation: 11269
I've setup Java 7 at /usr/bin/java
in ubuntu 12.04 to replace the default which is Java 6.
I have done the same for /usr/bin/javaws
.
Do I also need to do this for /usr/bin/javac
in order to be fully consistent? For some reason /usr/bin/javac
does not exist by default. Running javac -verion
only produces a suggestion that I use apt-get
to install it but hesitate to jump to the conclusion that it is not installed. Of course if I use javac
I would want to be consistent and have version 7, but I'm not sure if I use javac
.
I create .jar
files using Eclipse and I'm not sure what goes on inside Eclipse.
Upvotes: 0
Views: 367
Reputation: 4289
You installed the Java Runtime Environment (JRE). It doesn't contain the Java compiler (javac). The compiler is only part of a Java Development Kit (JDK) installation.
Eclipse comes with its own JDK and/or a private JRE. While using Eclipse for Java Developers, you can choose the JDK you want to use to compiler your projects. So, you don't need to update Eclipse's JRE either.
Upvotes: 0
Reputation: 370102
Eclipse uses its own Java compiler - it does not use javac. So if your package manager tells you that you don't have javac installed, you probably don't - Eclipse wouldn't care whether you have javac installed or not. It will also be unaffected by which version of javac you have installed because, as I said, it doesn't use it.
Upvotes: 1