Due I tried to test a java program on linux, which was compiled and created with only Java 8. I tried to upgrade the debian OS to java 8 from java 7. The jar-file won't run with Java7, but runs on windows with java 8 updated.
It seems there are different methods to do it and somehow it's advised to uninstall the old java. uninstall But I couldn't at all.
As on the linux repository(also adding a new) I couldn't find java 8, I tried to follow some examples java-install , it seems that only extract the tar should work. Then I tried to follow this thread multiple java environment on linux. Using another folder, which I extracted the tar in, instead of /usr/lib/jvm .
I used some commands and using java -version shows me the right version. But I tried to run a jar-file and it throws an exception and error.
No protocol specified Exception in thread "main" java.awt.AWTError: Can't connect to X11 window >server using ':0' as the value of the DISPLAY variable.
ln -s /usr/java/jdk1.8.0_121/bin/java /usr/bin/java
Maybe I miss something, some commands or folder ?