Results 1 to 13 of 13
  1. #1
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default new jre6 conflicts with old jre (1.2.2)

    hi All,

    i have a java program that uses Jre6 (for the Swing based GUI) but also
    jre1.2.2 (that Visibroker 45 needs to make CORBA API call). if i install jre 1.2.2 and then jdk6 (includs jre6) all is ok. but if after all is installed, i re-install jre 1.2.2 the GUI program will not start when i click on the jar file. i have a simple workaround to the problem (i just run: 'javaw -jar <jar file name>' and make sure in Path env variable the bin directory of jre6 is the first in the list or run:
    '<full path of javaw.exe in jre6 bin dir> -jar <jar file name>') and these options work great, but still it's very annoying i can't just click on jar file after i re-installed jre 1.2.2. it's more annoying since this program is used by a lot of people and it takes me long time to explain to them how to use the workaround/s in case of conflict (which there are sometimes).
    i've tried to change the default javaw.exe file/process that files of .jar extension are started with and nothing worked. it's got to be some jre conflict but i don't know what and how to fix it.

    Tanx,
    Amit.
    Last edited by codeshark; 12-06-2009 at 01:21 AM.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Check your file associations. There is one, and one only file association for jar files, and that, seemingly, is pointed at the last installed version.

  3. #3
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    hi,

    tanx, but it's not so simple. the file association is ok (still points to jre6) and even when i try to change it it's not working.

    Amit.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    After installing 1.2.2 what does "java -version" give you?
    I'd expect it would point to the 1.2 runtime, which would be the cause of your problem.

    ETA: Are you sure you actually need the 1.2 runtime to work? What does it complain about if 1.2 isn't there?

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Search the registry for anything and everything that has to do with Java. All I can say. Or, as an easier fix, reinstall 1.6 again. But, once again, it has to do with the system path and file associations, most likely.

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    And read this site (mainly the large yellow box near the end). It applies to more than just the plugin. Java Control Panel Although not truely to the "normal" runtime, but hey, I don't know what you are really doing, or how the system handles it, so it may help.
    Last edited by masijade; 12-07-2009 at 10:45 AM.

  7. #7
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    hi,

    Tanx all.
    Tolls. yes indeed: 'java -version' outputs this before and
    even after re-installing jdk6:
    java version "1.2.2"
    Classic VM (build JDK-1.2.2_011, native threads, symcjit)
    i'm not using 1.2.2 jar directly in my GUI application. the GUI application calls
    an Exe that uses Visibroker 45 process that needs java 1.2.2 installed on the client computer.


    masijade. Tanx. i'll read the 'Java Control Panel' page later more carefully. it might help. reinstalling 1.6 again didn't help.

    Amit.

  8. #8
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by codeshark View Post
    Tolls. yes indeed: 'java -version' outputs this before and
    even after re-installing jdk6:
    java version "1.2.2"
    Classic VM (build JDK-1.2.2_011, native threads, symcjit)
    Then update your system's path.

    To check that (assuming your on windows) open a cmd window and type "set PATH" and see what is included there.

  9. #9
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    hi,

    ok as i wrote in the original post i've tried adding jdk6 bin dir to start of Path env variable and it doesn't solve the problem when i click directly on the jar file ,
    but it does allow me to run the jar file fine when i use:
    'javaw -jar <jar file name>'. i just now understand that 'java -version' goes to the path env variable. sorry for the confusion.
    i'll try reading 'Java Control Panel' page later. maybe this will help.

    Amit.

  10. #10
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by codeshark View Post
    hi,

    ok as i wrote in the original post i've tried adding jdk6 bin dir to start of Path env variable and it doesn't solve the problem when i click directly on the jar file ,
    Not when done from the command window, if that's the way you're trying it.
    Try in the system settings!

  11. #11
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Default

    hi,

    of course i'm updating the PATH system environment variable permanently by going to system properties --> advanced --> environment variables.
    even doing re-start to computer later.

    Amit.

  12. #12
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Not that we could determine that, since you only brought it up in connection with your "work-around" of running through the command line, so we could only assume that you were setting the path there, too. So, search the registry, as already suggested.

    P.S. By "reinstalling" 1.6, did you uninstall, then reinstall 1.6? If not, try it that way.

  13. #13
    codeshark is offline Member
    Join Date
    Dec 2009
    Posts
    6
    Rep Power
    0

    Smile

    hi,

    good news. problem solved :)
    the problem was as masijade mentioned with the .jar file association,
    but it's not so simple. yes .jar files were set to be opened with jre 1.2.2 but it seems that even when i right click on jar file and choose to always open jar files with jre6 still this doesn't change the application to use to perform the 'open' action from jre 1.2.2 to jre6 so when clicking on .jar files it still tried to open them with jre 1.2.2. i tried to change the application to use to perform the 'open' action to be jre6 in the File Types tab but couldn't (got error saying: 'specified program couldn't be found' although the path was ok).
    what i did is to change this program for open action in the registry in this key to be jre6: [HKEY_CLASSES_ROOT\jarfile\shell\open\command]
    and then when i clicked on .jar files jre6 was used and my application was started fine. so the solution is to update the registry for the open action.
    BTW this problem occurs on XP and Win7 but on Win7 U don't even have File Types tab so changing the registry is the only solution in Win7 anyways.
    since the fix is in the registry i can send to people that use my program a .reg file to fix this problem (if and when it occurs) or override the registry key with jre6 when people install my program (and all it's required programs)
    using the windows installer i've created (the override will be just after all required programs were installed).

    Tanx All,
    Amit.

Similar Threads

  1. Replies: 3
    Last Post: 08-25-2009, 05:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •