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 6 of 6

Thread: Getting a 64 bit jvm to work

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting a 64 bit jvm to work

    Hi

    First of all, I'm very very new to java and have never had occasion to wonder about it until it began to interfere with the successful running of a program. And so thank you to whoever can provide me with any insight.

    The problem is as follows: I've been running java script using git bash and at one point it tells me that I need to increase heap size because apparently it takes more than 1gb to run. However although I manually increase it via control panel>programs>java nothing changes. I've been told that I need to ' figure out how to use 64bit java (and a VM that supports 64bit) in order to increase the maximum memory allocation (heap size) to something north of 2g.'

    My laptop has 8GB worth of RAM (Windows 7)so it shouldn't technically have problems running anything above 1G. But there is apparently a 1GB wall

    But increasing the heap size to above 2G results in an error stating that VM doesn't initialize within git bash, I thought that my java is 32 bit so I downloaded a 64 bit java. Now I have no idea how and if it is even possible to allocate a program to run under 64 bit java and if I should delete the other java version.

    I really apologize if this sounds confusing but I've tried to explain the problem to the best of my ability

    Thanks


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Getting a 64 bit jvm to work

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    The problem is as follows: I've been running [strike]java script[/strike] Java using git bash and at one point it tells me that I need to increase heap size because apparently it takes more than 1gb to run.
    This and the advice you were given are suspect. However, if you decide to pursue a solution, then Google something like "increase java heap space." I found this result that might be helpful, but I don't use Windows so can't be sure.

  3. #3
    Junior Member
    Join Date
    Jun 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Getting a 64 bit jvm to work

    Quote Originally Posted by GregBrannon View Post
    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.


    This and the advice you were given are suspect. However, if you decide to pursue a solution, then Google something like "increase java heap space." I found this result that might be helpful, but I don't use Windows so can't be sure.
    I've given it a try but it doesn't seem to have worked. I do wonder if it's the git bash program itself that is the problem. Thank you for the suggestion though, definitely learnt something new there.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Getting a 64 bit jvm to work

    it doesn't seem to have worked
    Post error messages. Since you're running in a command window (I think), you should be able to highlight the error, select Edit/Copy, and then paste what you've copied into a post.

    I'm not 100% sure what you mean by 'git bash,' especially in a Windows environment, but there may be Windows users that can help if you're a bit more specific about the tools you're using.

  5. #5
    Junior Member
    Join Date
    Jun 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Getting a 64 bit jvm to work

    Quote Originally Posted by GregBrannon View Post
    Post error messages. Since you're running in a command window (I think), you should be able to highlight the error, select Edit/Copy, and then paste what you've copied into a post.

    I'm not 100% sure what you mean by 'git bash,' especially in a Windows environment, but there may be Windows users that can help if you're a bit more specific about the tools you're using.
    Git bash basically provides a bash emulation to run git from a command line. As for git, I'm not completely sure, since I just run the bash emulator.

    From what I could figure out, it runs on 32-bit java when I checked java version so there was always a limit to it's heap size. I just decided to use windows command instead which uses 64 bit and it worked.

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Getting a 64 bit jvm to work

    There are other bash emulators for Windows you may want to try. Some aren't particular about the environment or architecture. Google 'windows bash'.

    Glad you got it working, though I'm still skeptical about the significance of 32-bit -vs- 64-bit to your problem. I suspect git bash was the problem by itself, though I'm not sure how as I've never used it and likely never will.

Similar Threads

  1. JVM failed to initialize
    By Aceix in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 30th, 2014, 12:10 PM
  2. No JRE or JDK in JVM
    By Jobrien15 in forum Computer Support
    Replies: 7
    Last Post: October 1st, 2013, 07:40 PM
  3. 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
  4. how to install the JVM?
    By warnexus in forum Java IDEs
    Replies: 3
    Last Post: September 1st, 2011, 10:33 AM
  5. JVM Generations
    By Hema26 in forum Java Theory & Questions
    Replies: 1
    Last Post: June 17th, 2010, 08:41 AM