It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
My .jar files won't open on double click. I've tried everything I can find online and so far nothing works.

Here's where I'm at,
I'm on Windows 7 64 Bit and have (or seem to have) both a 64 bit and 32 bit JDK and JRE. I can run them from the command line, no problem at all, but whatever program I try to associate them with (any of the various javaw.exe versions, or any other .exe in the java folders) nothing happens.
Furthermore, when I go to Control Panel and Default Programs .jar isn't even on the list...
I've had a look through the Registry at everything suggested and nothing seems out of place.
I've tried all the solutions listed and [url=http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7/17142065#17142065]here and used jarfix and still nothing.

Any ideas?
This question / problem has been solved by ZFRimage
avatar
adaliabooks: My .jar files won't open on double click. I've tried everything I can find online and so far nothing works.

Here's where I'm at,
I'm on Windows 7 64 Bit and have (or seem to have) both a 64 bit and 32 bit JDK and JRE. I can run them from the command line, no problem at all, but whatever program I try to associate them with (any of the various javaw.exe versions, or any other .exe in the java folders) nothing happens.
Furthermore, when I go to Control Panel and Default Programs .jar isn't even on the list...
I've had a look through the Registry at everything suggested and nothing seems out of place.
I've tried all the solutions listed and [url=http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7/17142065#17142065]here and used jarfix and still nothing.

Any ideas?
Hey adalia,
You try to unscrew the jars clockwise or anti-clockwise?:-)
avatar
gunsynd: Hey adalia,
You try to unscrew the jars clockwise or anti-clockwise?:-)
Both, it just doesn't work ;P
avatar
gunsynd: Hey adalia,
You try to unscrew the jars clockwise or anti-clockwise?:-)
avatar
adaliabooks: Both, it just doesn't work ;P
Sorry mate,but I couldn't resist:-)
avatar
adaliabooks: Both, it just doesn't work ;P
avatar
gunsynd: Sorry mate,but I couldn't resist:-)
It's no problem :)
Hmmm jar files are technically zip files, but i noticed when i tried to re-compact zip files they have differences in the header making them have errors in the CRC checks.

Try renaming the jar to zip, then extract, then rebuild it using official tools, perhaps the jar file(s) will work then...

edit: alternatively if it's just they aren't starting, you could try opening them and assign them the javaw program to run with...
Post edited July 25, 2015 by rtcvb32
What does this application do exactly?
avatar
rtcvb32: Hmmm jar files are technically zip files, but i noticed when i tried to re-compact zip files they have differences in the header making them have errors in the CRC checks.

Try renaming the jar to zip, then extract, then rebuild it using official tools, perhaps the jar file(s) will work then...

edit: alternatively if it's just they aren't starting, you could try opening them and assign them the javaw program to run with...
The problem is not with the files, it's with Windows associating them with Java to open on double click.
The jar is definitely fine because it works as it should when run from command line, but just doing open with and choosing javaw does nothing, not even an error window...
It seems to be quite a common issue, but nothing I've tried has fixed it yet...

Thanks for the suggestions though :)
avatar
elendiel7: What does this application do exactly?
Well specifically the one I'm trying to open is the installer for lib-gdx (a game development library), but none of my jar files work any more. They certainly used to work at some point in the past, and I think they stopped working when I updated Java at some point...
Post edited July 25, 2015 by adaliabooks
avatar
adaliabooks: The problem is not with the files, it's with Windows associating them with Java to open on double click.
The jar is definitely fine because it works as it should when run from command line, but just doing open with and choosing javaw does nothing, not even an error window...
It seems to be quite a common issue, but nothing I've tried has fixed it yet...
Hmmm... It's possible to have more than one version of the Java environment installed, as for why it's not working i'm not sure...

I thought afterwards perhaps something's stuck with the association and was going to refer you to the properties to change it that way, but i really don't know, i barley use jar files so i wouldn't have searched for answers.
Attachments:
avatar
rtcvb32: Hmmm... It's possible to have more than one version of the Java environment installed, as for why it's not working i'm not sure...

I thought afterwards perhaps something's stuck with the association and was going to refer you to the properties to change it that way, but i really don't know, i barley use jar files so i wouldn't have searched for answers.
Yeah, I barely use them either, until I need to run one and then I remember they don't work properly any more and I spend ages trying to fix it. Having tried and failed a number of times I thought I might as well seek help this time.

I do think the problem is the various different Java versions I have installed, but I'm not really sure which I need (and any time I update or change my Java installs something always ends up breaking so I'm reluctant to just uninstall all but one of them...)

Edit: I've tried changing it through open with, through properties, through control panel and through cmd... still nothing. :(
Post edited July 25, 2015 by adaliabooks
avatar
adaliabooks: Well specifically the one I'm trying to open is the installer for lib-gdx (a game development library), but none of my jar files work any more. They certainly used to work at some point in the past, and I think they stopped working when I updated Java at some point...
Well usually the easiest solution to problems like that is to uninstall each of the jdk/jre's that you have installed, maybe run a register cleaner and reinstall again. I have come across a similar issue with java before, and this usually works fine for me.

However my suggestion has already been suggested in the first link you provided, so It probably won't be of much use.
avatar
elendiel7: Well usually the easiest solution to problems like that is to uninstall each of the jdk/jre's that you have installed, maybe run a register cleaner and reinstall again. I have come across a similar issue with java before, and this usually works fine for me.

However my suggestion has already been suggested in the first link you provided, so It probably won't be of much use.
My other problem is I have taken numerous attempts to fix this and can't quite remember what I have and haven't tried. I may just have to strip Java out completely and reinstall everything, but I really would rather not if I can get away with it (not least because I do think I've tried it and it didn't help). Is there a Register cleaner you'd suggest to try?
avatar
adaliabooks: Furthermore, when I go to Control Panel and Default Programs .jar isn't even on the list...
I've had a look through the Registry at everything suggested
Where exactly did you look in the registry?
This should be in 2 places: HKEY_CLASSES_ROOT and HKEY_LOCAL_MACHINE\SOFTWARE\Classes. And each should have 2 entries, one for extension and one for the default action.

Attached are entries that should be in your registry. However I hope you don't just add any registry entries someone posts on the internet, so BEFORE YOU ADD THEM MAKE SURE YOU EDIT THE FILE TO SEE EXACTLY WHAT IS BEING ADDED.

Attachment is a zip file which contains 4 registry entries, but the forums only allows images, so I had to change it. (Normally when I attach non-image attachments I mention what to do with them in order to open them, but honestly if you don't know that already, you really shouldn't be messing about with registries ;)).

EDIT: And oh, of course make sure that the path to javaw is same on your machine, in case you changed it or are using a different version.
Attachments:
jar.jpg (2 Kb)
Post edited July 25, 2015 by ZFR
avatar
ZFR: Where exactly did you look in the registry?
This should be in 2 places: HKEY_CLASSES_ROOT and HKEY_LOCAL_MACHINE\SOFTWARE\Classes. And each should have 2 entries, one for extension and one for the default action.

Attached are entries that should be in your registry. However I hope you don't just add any registry entries someone posts on the internet, so BEFORE YOU ADD THEM MAKE SURE YOU EDIT THE FILE TO SEE EXACTLY WHAT IS BEING ADDED.

Attachment is a zip file which contains 4 registry entries, but the forums only allows images, so I had to change it. (Normally when I attach non-image attachments I mention what to do with them in order to open them, but honestly if you don't know that already, you really shouldn't be messing about with registries ;)).

EDIT: And oh, of course make sure that the path to javaw is same on your machine, in case you changed it or are using a different version.
A number of different places, I've looked at the Java entries for both the 64bit and 32bit under LocalMachine, and the FileExt stuff (here: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar) and everything looks as it's supposed to (well, according to various things I've read on the internet)

I generally don't use reg files and just edit it by hand, but I appreciate the warning :)

So, the first one worked, the other three just give an error: Cannot import, error accessing the registry.
Any ideas? :S

EDit: Oh, and thanks for the help :)
Post edited July 25, 2015 by adaliabooks
avatar
ZFR: Attachment is a zip file which contains 4 registry entries, but the forums only allows images
Just experimented since i recall this working before. You can append a zip or 7zip archive to an image (jpg or png) and it will work. Of course the 7zip menu option may not show it, renaming it will work if 7zip identifies it (windows of course won't like it, so 7z archive is best :P)
Attachments: