Please Help, Need Help With Java. Jar Files Not Opening

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
ChrisJNorris
Level 1
Level 1
Posts: 44
Joined: Tue Jun 17, 2014 11:46 am

Please Help, Need Help With Java. Jar Files Not Opening

Post by ChrisJNorris » Sat Jan 06, 2018 2:53 am

Hello everyone, Happy New Year!

I need help with Java. Jar files not opening. I put in the input that is in the pin post and that didn't work

I just installed Linux Mint Cinnamon 18.2

Also since Linux Mint Cinnamon 18.3 is out, I'm going to downloaded that next week

richlion2
Level 2
Level 2
Posts: 68
Joined: Mon Sep 05, 2016 9:00 am

Re: Please Help, Need Help With Java. Jar Files Not Opening

Post by richlion2 » Sat Jan 06, 2018 4:24 am

I know this may not help a lot, I had the same problem with 18.2 fresh install. My java application I use didn't work, went to a lot of trouble trying to install it correctly, googled a lot with a lot of pointless solutions not working. I ended up installing 18.1 (the ISO may still be around to download) and going through the whole upgrade process to 18.2 and 18.3. It seems what was not working in 18.2 is still causing problems.

Richard

lmuserx4849
Level 5
Level 5
Posts: 798
Joined: Wed Dec 17, 2014 2:55 am

Re: Please Help, Need Help With Java. Jar Files Not Opening

Post by lmuserx4849 » Sat Jan 06, 2018 4:29 am

ChrisJNorris wrote:...
I need help with Java. Jar files not opening. I put in the input that is in the pin post and that didn't work
Not quite sure what you are asking (pin post??), but if the question is how do you run a jar file...

Using a console command line, type: java -jar /PATH/FILE.jar

If you downloaded the jar file to /$HOME/myfile.jar, execute it by typing: java -jar /$HOME/myfile.jar

$HOME is your home directory. To see it type: echo $HOME. To get back to your home directory type: cd ~ or cd $HOME. If you lost the file on your hard drive, type: find $HOME -iname "*PATTERN*", where PATTERN is some portion of the file name.

I believe you can right click the file, in the File Manager, and select Open With -> Java, too.

If you get an error, tell us what the error is.

ChrisJNorris
Level 1
Level 1
Posts: 44
Joined: Tue Jun 17, 2014 11:46 am

Re: Please Help, Need Help With Java. Jar Files Not Opening

Post by ChrisJNorris » Sat Jan 06, 2018 5:08 am

lmuserx4849 wrote:
ChrisJNorris wrote:...
I need help with Java. Jar files not opening. I put in the input that is in the pin post and that didn't work
Not quite sure what you are asking (pin post??), but if the question is how do you run a jar file...

Using a console command line, type: java -jar /PATH/FILE.jar

If you downloaded the jar file to /$HOME/myfile.jar, execute it by typing: java -jar /$HOME/myfile.jar

$HOME is your home directory. To see it type: echo $HOME. To get back to your home directory type: cd ~ or cd $HOME. If you lost the file on your hard drive, type: find $HOME -iname "*PATTERN*", where PATTERN is some portion of the file name.

I believe you can right click the file, in the File Manager, and select Open With -> Java, too.

If you get an error, tell us what the error is.
In the pin post of the Software & Applications is what I'm trying to say, in the Java topic at the top of this section of the forum

' How to fix Java .jar files not opening with OpenJDK '
Solution ­for Cinnamon / Nemo file manager
Right-click a Java .jar file in your file manager and from the context menu select "Open With Other Application". In the input box at the bottom of the "Open With" dialog enter this command:
/usr/bin/java -jar
Click on the button "Set as default" and then on the button "OK" to close the dialog. Problem solved. When you now double-click Java .jar files in your file manager they will run as expected.
I enter the command as it states and it didn't work at. It work previously in Linux Mint Cinnamon 18.1 but it's not working for 18.2

lmuserx4849
Level 5
Level 5
Posts: 798
Joined: Wed Dec 17, 2014 2:55 am

Re: Please Help, Need Help With Java. Jar Files Not Opening

Post by lmuserx4849 » Sat Jan 06, 2018 5:25 am

ChrisJNorris wrote:
In the pin post of the Software & Applications is what I'm trying to say, in the Java topic at the top of this section of the forum

' How to fix Java .jar files not opening with OpenJDK '
Solution ­for Cinnamon / Nemo file manager
Right-click a Java .jar file in your file manager and from the context menu select "Open With Other Application". In the input box at the bottom of the "Open With" dialog enter this command:
/usr/bin/java -jar
Click on the button "Set as default" and then on the button "OK" to close the dialog. Problem solved. When you now double-click Java .jar files in your file manager they will run as expected.
I enter the command as it states and it didn't work at. It work previously in Linux Mint Cinnamon 18.1 but it's not working for 18.2
Ahhhh, the forum. Got it. :-)

If you type java -version on the command line, what does it say?

If the response is something like no command, then java isn't installed. Install java first.

But if the response is "java version ....", continue.

So you open Nemo, right-click the jar file and select "open with other application".

At this point don't type. Use the browser button located at the end of the text box. Browse to /usr/bin/ (click Other Locations -> Computer) and select java. Now go ahead and mark "Set as default".

I see Nemo shows a red crossed-out circle or a black checkmark at the end of the text box. Which do you see? I'm assuming "didn't work at all" means you got a red crossed-out circle?

Post Reply

Return to “Software & Applications”