Madhusudan
Madhusudan

Reputation: 4815

Unable to run executable jar file using double click

I was having jdk_1.6 in my machine and I removed it and installed jdk_1.7. So after installing jdk_1.7 I am not able to run my jar file with double click. I could run the same file using command prompt.

After installing jdk_1.7 I run the program from eclipse using java 7 and I exported jar using the same.

I am using following command for running jar:

>>java -jar csv_generator_1.jar 

And this works fine and jar get executed.

But when I right click and open with javaw.exe in jad/bin folder or jdk/jre/bin/ folder it's not working.

I found same question here link1 and link2, but I am not understating what to do.

Can someone help me to resolve this?

Upvotes: 1

Views: 2132

Answers (2)

Genhis
Genhis

Reputation: 1524

If you install JDK, you may think it contains JRE but it's private. At least that was stated during installation process. Therefore, you had to install Public JRE.

JDK installer provides an option to do so but if you didn't check it, you might experience the problem you described.

JDK installation process

Upvotes: 0

Jussi Roos
Jussi Roos

Reputation: 46

Go there and download newest verson of java RE and install it and it should work. But if it does not work you should get some kind of error message and try to google it. It is possible that your java(s) are broken.

Upvotes: 1

Related Questions