Ubuntu: Some jar files count as .zip?


I have a server for Minecraft and i just recently updated to java 8 update 73, iIfollowed some tutorials to get it installed, I also use the command to set it as default... but only the jar files on the desktop can be run using java/java8 if it was in a file when I use the set default thing it doesn't allow me to use that jar file, same goes for jar files I download please help. I am using Peppermint 5.


I will suggest install Oracle Java 8 following this

sudo add-apt-repository ppa:webupd8team/java  sudo apt-get update  sudo apt-get install oracle-java8-installer  

Verify whether java is installed or not?

java -version  

You should see something like this

root@ashu-700-430qe:/opt# java -version  java version "1.8.0_72"  Java(TM) SE Runtime Environment (build 1.8.0_72-b15)  Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)  

To setup the environment variable accordingly

sudo apt-get install oracle-java8-set-default  

In case it is not set,

sudo vi /etc/environment  JAVA_HOME='path of java before bin directory'  export JAVA_HOME  sudo source /etc/environment  

Once that is done your should be doing something like this

java -jar <name of the JAR file>   

to execute it

Note : By default Ubuntu comes with openJDK so you already have java installed.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »