Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: How to find if JVM is 32 or 64 bit from Java program

  1. #1
    Banned
    Join Date
    Jun 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to find if JVM is 32 or 64 bit from Java program

    hi every one can any one let me know how to find if JVM is 32 or 64 bit from Java program..thanks in advance


  2. #2
    Moderators
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    7,448
    My Mood
    Mellow
    Thanks
    288
    Thanked 899 Times in 879 Posts

    Default Re: How to find if JVM is 32 or 64 bit from Java program

    What did you find when you Googled, 'jvm 32 or 64 bit'?

  3. #3
    Banned
    Join Date
    Jul 2014
    Location
    United States
    Posts
    4
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: How to find if JVM is 32 or 64 bit from Java program

    By using System.getProperty() method, you can find JVM size from java program. Although the size of JVM hardly matters because we know that java is platform independent i.e write once and run everywhere but in some situation it is required to know the size of JVM like if you are using native library. Example of how to get size of JVM.
    System.out.println(System.getProperty("os.arch"));
    System.out.println(System.getProperty("sun.arch.da ta.model"));



    Regards
    Last edited by copeg; July 2nd, 2014 at 08:43 AM. Reason: Removed promotional info

Similar Threads

  1. Getting a 64 bit jvm to work
    By Midwinter in forum Java Theory & Questions
    Replies: 5
    Last Post: June 20th, 2014, 03:48 AM
  2. JVM launched from C++ program : problem with GUI calls
    By Brice in forum Java Native Interface
    Replies: 4
    Last Post: April 8th, 2014, 04:23 PM
  3. Java Program - Not able to connect to 32 bit ODBC
    By Beginner-Java in forum What's Wrong With My Code?
    Replies: 0
    Last Post: June 29th, 2013, 01:14 PM
  4. Determining JVM bit version (32bit or 64bit) at runtime
    By ananth in forum Java Native Interface
    Replies: 1
    Last Post: April 29th, 2012, 11:28 AM
  5. could not open `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg
    By miaaa00 in forum Java Theory & Questions
    Replies: 1
    Last Post: March 29th, 2011, 12:45 AM

Tags for this Thread