Results 1 to 16 of 16
  1. #1
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Smile Why 64 bit JRE ?

    Hi.. I have 64 bit Win2K3 OS. I have installed 32 bit JRE on it. It works fine. Then why did SUN provided 64 bit JRE if 32 bit JRE works fine with 64 bit OS.
    Thanks

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Hi..
    Please clearify. I found there speed related issues with 32 and 64 bit JRE. Cant I stay with 32 bit JRE. What are the benifits of 64 bit JRE over 32 bit JRE.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    First think about 32 bit and 64 bit. All those things comes to the picture because of the CPU performance developing time to time in the world. Simply says about the bit rate, or the data transfer rate.

    If the bit rate is high, it outline that your application also speed up. Depend on the system you have to use the correct way.

    Hope it is helpful.

    Eranga.

  5. #5
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Thanks Eranga

    Yes, it helps. Things are more clear now.
    If I make a executable jar file using 32 bit jre then it does not work with 64 bit JRE. I am able to run the jar file from command prompt, but it does not execute with double click. Why so? What I need to to do to make my jar file executable on both JRE.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by aparna View Post
    I am able to run the jar file from command prompt, but it does not execute with double click. Why so?

    It should work, if it is work fine from the command prompt should work on fine. Better to check the properties on it, check which application have selected as open with application.

    And try to make a shortcut and set there command line parameters.


    Quote Originally Posted by aparna View Post
    What I need to to do to make my jar file executable on both JRE.
    I have to check this, but I hope if you work on 64bit it should work on 32bit as well without any issue.

  7. #7
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Thanks for reply
    I checked the properties, it shows my jar file type "Executable jar file" on 32 bit OS. But if I copy the same jar file on 64 bit OS it shows file type "JAR file". But if I run the file on 32 bit JRE with double click it akways works. But it never works with 64 bit JRE. I have created short cut for it. But nothing works. Can you please try the same senario. I guess there may be something which I am missing or it may be known issue which faced by everyone.
    Thanks.

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Ok, I'll try to do it as much as possible.

    By the way, I'm not just saying to create a shortcut and click it. Set the command line arguments there and try to execute.

    Eranga.

  9. #9
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Thanks Eranga
    But I dont need to send any parameter in my main class, then there is no need of doing it.
    I tried what you said, but it does not work.
    When I click the jar file, it asks for "Select a program to open this file". When I set it to "java.exe", it flashes a command prompt for some seconds, which says "main class not found".

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Command line arguments are "java -jar [your_jar_file]". In a shortcut you can set those values in Start in entry. May be I explain it to you in wrong way, sorry about that. That's the command you use to execute the jar file on command prompt, right?

    Are you use Netbeans for your coding?

    Eranga.
    Last edited by Eranga; 03-24-2008 at 10:00 AM. Reason: Adding more...

  11. #11
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    yes Eranga.. I can set the parameter from command line. But how can I do it for shortcut. And why I need to do it. I think we are going out of track. Clicking on icon, cant even find the main class then how can passing of parameter will help.
    I don't use NetBeans. Code is only in core java. I have jdk 1.4 and Jdk 1.5.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    No I think I'm in the correct way. Let me explain more.

    To run a jar file on the command prompt, you use the following command, on the jar file included folder.

    java -jar your_jar_file_name

    Is it right?

    So then make a shortcut to that jar file. Assume that you have created a shortcut on the desktop. Right click on it and go to properties. You can find a text box called Target. On that add the above same command, click Ok to save and exit. Then double-click the shortcut. What is happened.

    I'm not talking about passing parameters to your main class. Got it?

    That is the way to execute the Jar file in double-click. You said that failed do it. That mean your jar target application not Java(TM) Platform SE binary or any other related Java executable application.

    I think now you clear it.

    One question, before mentioned about anything on your IDE. Even you run the jar file on the command prompt, is it prompt that "Main class not found"?

    At the same time, if you use Netbeans I suppose that you take the jar file from dist folder of your project?

    Eranga.

  13. #13
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Thanks a lot Eranga ... It works. I have used "javaw -jar" instead of "java -jar". Because java -jar also opens an another command prompt window along with application.
    But why 64 bit JRE is not able to recognize the file while it works fine with 32 bit JRE. I dont want to give these all instructions to user to start an application with double click. Will this problem can be solve if I compile it using any specific JDK version?

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by aparna View Post
    Thanks a lot Eranga ... It works. I have used "javaw -jar" instead of "java -jar". Because java -jar also opens an another command prompt window along with application.

    Yes it is, displaying a command prompt to the user is not a good idea at all. You have use the right command to avoid it.


    Quote Originally Posted by aparna View Post
    But why 64 bit JRE is not able to recognize the file while it works fine with 32 bit JRE. I dont want to give these all instructions to user to start an application with double click. Will this problem can be solve if I compile it using any specific JDK version?
    I don't know there is such a JDK version to do it. Didi you check on Suns' official website. In such a situation I work on two applications for 32 and 64 separately. Refer the link below.

    Java SE 6 Supported System Configurations


    Hope it's help to you.

  15. #15
    aparna is offline Member
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0

    Default

    Hi Eranga.. I checked the given link. but it does not contain any information related to jdk for 64 bit. I have searched on sun's site but did not find anything useful. What changes you make for 32 bit application and 64 bit application. Can you check that as I described is a known problem or I am doing something wrong.

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Posting Permissions

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