Windows7 .jar file association broken with Nokia OVI

I’m a (proud?) owner of a Nokia phone and for SMS and Phonebook management I’ve installed the Nokia OVI software. It’s seems to be more flexible than it’s predecessor for sms handling, music and photo synchronization and so on..

but? But it broke my .jar file type association which wouldn’t run anymore with Java, but will be opened by Nokia OVI itself. The only issue posted on Nokia OVI forum didn’t get any reply since October 2009 (see this forum post about JAR issue).

The standard Windows7 file type association won’t work: it doesn’t allow you to set a parameter for the associated program. Even the “assoc” and “ftype” program calls helped.

The solution? Get rid completely of the .jar file association from the Windows registry, and re-associate it! Here are the full steps:

Removing .jar form windows7 registry

Reading a SevenForum post with an howto for Default File Type Associations – Restore for Windows7 I manage to get a registry script to clear the .jar filetype. Copy and paste this snippet into a new text file, and rename it to “somename.reg”, and run it:

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.jar]
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.jar]
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar]

Re-Associate the .jar extension to Java

Then, from another website (from a Computing.net post) I found how to fix and restore the old .jar association, from the command line run:

  • assoc .jar=JARFile
  • ftype JARFile="C:\Program Files\Java\jre6\bin\javaw.exe" -jar "%1"

If you don’t want to manually write the code and follow all the steps described above, download and extract the attached archive and run the .BAT one (with Administrative rights)!

That’s all folks! :)

Nokia-ovi-jar-fix.zip
Title: Nokia-ovi-jar-fix.zip (0 click)
Caption: Nokia OVI JAR extension fix (v.2)
Filename: Nokia-ovi-jar-fix.zip
Size: 754 B

Share/Bookmark

33 thoughts on “Windows7 .jar file association broken with Nokia OVI

  1. Thanks for the help, problem solved :)
    For those running 64 bit, dont forget to change the command in the re-association part to
    ftype JARFile=”C:\Program Files (x86)\Java\jre6\bin\javaw.exe” -jar “%1″

  2. nokia adds its extension as .JAR on my x64 win7, and the regedit is case sensitive.
    so the reg file should read:

    Windows Registry Editor Version 5.00
    [-HKEY_CLASSES_ROOT\.jar]
    [-HKEY_CLASSES_ROOT\SystemFileAssociations\.jar]
    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar]
    [-HKEY_CLASSES_ROOT\.JAR]
    [-HKEY_CLASSES_ROOT\SystemFileAssociations\.JAR]
    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.JAR]

  3. and as for the bat file, it could check if it is x64, too :)

    assoc .jar=JARFile

    If “%ProgramFiles(x86)%” == “” (
    ftype JARFile=”C:\Program Files\Java\jre6\bin\javaw.exe” -jar “%1″
    ) ELSE (
    ftype JARFile=”C:\Program Files (x86)\Java\jre6\bin\javaw.exe” -jar “%1″
    )

    pause

  4. Many thanks! The batch file worked for me (W7 32bit).

    Users who have a different version of Java will need to check the path to javaw.exe and change ‘\jre6\’.

    Alan (UK)

  5. worked perfectly.
    Many thanks to author.
    those who r using earlier version of java don’t forget to change the path in the last step (ftype JARFile)
    for editing you can simply open with notepad

  6. I have the Ovi suite installed and was trying to install the HP Touchpad WebOS Quick Install for homebrewing and get past the first step of running the WebOSQuickInstall-4.3.1.jar file.

    You batch files worked in seconds and got my Win 7 64 bit to proper open the jar file and install WebOS Quick Install.

    Thank you! Thank you! Thank you!

  7. Hi there,

    I have the same problem with Ovi suite over writing my .jar file association.

    I ran the above attached batch file but no joy… I don’t have any experience changing registry files, can anybody help…?

    Many thanks

    Chris

  8. With your smool batch file I’ve solved my problem!!! Now I can launch this java applications that would’nt start (Mixshare Rapid Evolution 3). Thank you so much.

  9. you are the best :D … i was about to make something like that myself, but that was awesome :)
    really works!

  10. Thank you guy. You also helped me here in Brazil. I was looking for this solution aroud here but I did’nt find. I coul’d not translate everything, but enough to understand. Thank you very much!

  11. Thanks. Batch resolved problem (Caused by Nokia PC Suite which hijacked .jar-extension and ProjectX stopped working) in Windows XP.

    Nokia Ovi/PC Suite also “steals” codecs, in my case avc main and high profile videos stopped showing in KMPlayer and Subtitle Workshop, only baseline profile avc videos continued to work after installing Nokia PC Suite. I had to disable “emuzed” codecs to solve that problem. When installing nokia it did not ask if it should hijack everything on my PC or not. What a piece of…!

  12. Thank you for you post!

    If you set in your PATH variable, path to bin directory of JRE, you can set path in ftype without full path, like:

    ftype JARFile=”javaw.exe” -jar “%1″

    For example, this trick useful when you need to change jre version between 6 and 7. You change only PATH variable, and jar association auto-changing for correct JRE path.

  13. jarfile=”C:\Program Files (x86)\Java\jre6\bin\javaw.exe” -jar “%1″ %*

    note the %* at the end.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting this form, you accept the Mollom privacy policy.