Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jar file won't run on double click

Tags:

java

javaw

I know you may blame me for this being a dupe - but frankly, I do not know what to do next. I spent hours online trying to find my solution, and have found nothing. Zilch. Zero.

Anyway, this is my problem: when I double click my runnable jar file, it shows a hourglass cursor for a second and then it disapears, leaving me with nothing. I have re installed my JDK and JRE 2 times, and nothing happens. Here is my manifest file:

Manifest-Version: 1.0
Class-Path: .
Main-Class: gedr.proj.Paint.Frame

I have tried to run my application via the command line, but am baffled by how to do it.

Tell me if you need any more information, or tell me what to do. Thanks in advance

EDIT: If I try 'java -jar PaintV2.jar' in cmd, it returns

Error: Unable to access jarfile PaintV2.jar

when I run 'ftype | find "jarfile"' it returns

jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
like image 624
gedr Avatar asked Jan 31 '14 22:01

gedr


People also ask

How do I run a .JAR file by double click?

Normally after installing Java, there will be an association between . jar and the javaw.exe. This enables the executable jar to be opened on double click. You can check the association by going to Control Panel -> Programs -> Default Programs -> Associate a file type or protocol with a program.

Why can't I run .JAR files?

If you do not have Java installed, and the PATH variable is not set correctly, attempts to run a JAR file on Windows or Ubuntu will result in a 'Java not recognized' error. To run a JAR file, you must install the Java JDK or JRE on your computer.


1 Answers

Navigate to your file in cmd, and then type

java -jar jarfile.jar

If you can could you upload the file please?

like image 65
Roberto Anić Banić Avatar answered Oct 22 '22 12:10

Roberto Anić Banić