Results 1 to 4 of 4
  1. #1
    BigEZ18045 is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Windows 7 Java Problem

    This is a bit of a weird problem with windows 7/Java

    I am running 64bit windows 7 home premium, and have jre6 and jdk 1.6.0_20 installed on my computer and i've come to realize that if i'm running java .jar files from the command line, the 64bit version of java is invoked, but if i just double click the jar file, then 32bit java is invoked.

    im not sure if this is the correct place for this question, but like i said its a weird problem.


    does anyone have a clue why this happens?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    There's a 64bit JRE download. (eg here). Make sure you have that one installed.

  3. #3
    BigEZ18045 is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default

    I do have the correct jre installed, so here are more specifics:

    I've created an installer for a java desktop application that is an executable jar, it is essentially a wrapper for the application and the JRE, when the installer is clicked the JRE is loaded via command prompt and therefore the 64bit version of java is loaded and the application does not load properly. Now if i just double click the jar file that is my application the 32bit java jre is loaded and all is well. I would like to know why this difference occurs and if there is anyway to change it

  4. #4
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default

    windows comes with java 32bit installed into

    C:/Program Files(x86)/Java

    when you install it yourself, you can choose to install the 64bit version of Java to
    C:/Program Files/Java

    but you need to update the ClassPath Paths because you have 2 instances of the Java Runtime Environment

    ----
    To edit this, click START > Right-Click My Computer > Click Properties
    Under the "Advanced" tab you should see "Environment Variables..." at the bottom. Click it.

    In Environment Variables, look at the list, select CLASSPATH from the list and click "Edit...".
    DO NOT remove any windows system paths from the list as this will screw up your windows OS.
    Just look for any instance of JAVA and change any instace of Program Files(x86)/Java to the folder where you installed the 64bit version.
    Last edited by ozzyman; 03-13-2011 at 03:04 PM.

Similar Threads

  1. Windows java vs Windows AIX
    By sysp in forum New To Java
    Replies: 0
    Last Post: 01-26-2011, 05:32 AM
  2. ODBC driver problem windows 7
    By dewitrydan in forum New To Java
    Replies: 0
    Last Post: 11-07-2010, 11:01 AM
  3. Time Zone Problem on Windows
    By yzaltz in forum New To Java
    Replies: 4
    Last Post: 09-29-2010, 01:38 PM
  4. Problem in knowing the status of windows
    By sushil in forum Advanced Java
    Replies: 1
    Last Post: 10-05-2009, 09:35 PM
  5. Problem in knowing the status of windows
    By sushil in forum AWT / Swing
    Replies: 1
    Last Post: 10-04-2009, 01:48 AM

Tags for this Thread

Posting Permissions

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