I usually use eclipse , but I said "lets do some fantasy" to myself and things happened. I tried to use terminal command javac
at first. I got
The program 'javac' can be found in the following packages:
* default-jdk
* ecj
* gcj-5-jdk
* openjdk-8-jdk-headless
* gcj-4.8-jdk
* gcj-4.9-jdk
* openjdk-9-jdk-headless
Try: sudo apt install (selected package)
I already installed jre8 and jdk8 manually from oracle's website (standard edition) and I'm making programs with eclipse already. Then I typed java -version
and the answer was
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
which is not what i installed manually. Then I used locate -br ^javac$
and got two locations (not a surprise). So:
- I can use
javac
only with the path to where I installed jdk manually, but I wanna use commands without path, just directly . Is that possible (if yes then how ? - It seems like I have two java versions. Does that cause any problem? If it does, tell me how to fix please (I prefer eliminating openjdk9)