Announcement Announcement Module
Collapse
No announcement yet.
Could not create the Java virtual machine Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Could not create the Java virtual machine

    I have been using the STS for over a year now, and updated to the 2.3.1 release version back in July 2010.

    Today I went to open my STS and I get a message dialogue stating that the Java virtual machine cannot be created, and then nothing else happens.

    I have the JDK 1.6 : java version "1.6.0_12" installed an I went through a reinstall from the STS installer, pointing it to this JDK. Alas to no avail, I still get this message when I try to launch the STS.

    My JAVA_HOME does point to the install directory of my JDK 1.6.

    Interestingly enough when I start Eclipse Ganymede it starts just fine.

    I don't believe this is really a problem with the STS, but is somehow linked to the JAVA environment. Has anyone else experienced this issue, and if so, how did they overcome it?

    Jawfish147

  • #2
    Hi,

    could you please post the contents of your STS.ini file here? That might give us an indication on what is wrong?

    Christian

    Comment


    • #3
      Sure, here are the contents of the STS.ini file:

      -vm
      C:\javaenv\jdk1.6.0_12\bin\javaw.exe
      -startup
      plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v2009071 5.jar
      --launcher.library
      plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.2 00.v20090519
      -product
      com.springsource.sts.ide
      --launcher.XXMaxPermSize
      256M
      -vmargs
      -Dosgi.requiredJavaVersion=1.5
      -Xms40m
      -Xmx768m
      -XX:MaxPermSize=256m

      Also here is my Java Environment information:
      Z:\>java -version
      java version "1.6.0_12"
      Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
      Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

      Z:\>echo %JAVA_HOME%
      C:\javaenv\jdk1.6.0_12

      Jawfish

      Comment


      • #4
        I am curious if STS is passing an invalid argument. I notice that when I do this from the command line I get the same behavior:

        Z:\>java -version
        java version "1.6.0_12"
        Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
        Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

        Z:\>java -ver
        Unrecognized option: -ver
        Could not create the Java virtual machine.

        Or perhaps it doesn't run under JDK 1.6?

        I have been using STS just fine for over a year, and suddenly this is what I get when I try to open it.

        We do use SMS here at the office, so while I am not aware of any system changes to my machine, they may have pushed out an SMS package that is now in conflict.

        Comment


        • #5
          Had a similar problem - updated my Eclipse J2EE Helios following the instructions.

          When I fired up my eclipse today, it would not start stating "Could not create the virtual machine". Funny thing is yesterday it worked.

          I'm on a Win 7 machine btw. What could be a factor was I download the exe installer for STS prior to this - installed, then I realized that it's a eclipse variant, which was not what I wanted, so I left it sitting in the folder.

          Lost 3 hrs of working time trying to fix this, had to revert to using a coworkers eclipse install..

          Comment


          • #6
            Jawfish147,

            could you please update your JDK to see if that fixes the issue. I will try to fined the same JDK that you installed to see if I can reproduce this issue.

            Christian

            Comment


            • #7
              Yes, this happens with me too using the Snow Leopard JDK.

              Sometimes I need to reboot, others I just try a few more times and STS 2.5.0 opens.

              There is nothing exotic in my sts.ini...just increased RAM.

              Comment


              • #8
                Could Not Create Java Virtual Machine - Error Code 1

                Hi to All,

                I'm started to learn Groovy/Grails and yesterday night I installed the STS IDE to give it a try due to an email I receive from Spring promoting its new 2.5.1 version and its great Groovy/Grails support. I'm been using Netbeans since I begin this learning path a few days ago and I was eager to check on the Spring Tool Suite to see how much better integrated it is.

                I have:
                Windows 7 Professional (64 bits), but running JRE and JDK in 32 bits to simplify things. I have read the installation instructions pdf and check that I could use the: springsource-tool-suite-2.5.1.RELEASE-e3.6.1-win32-installer.exe installation with this configuration.
                After installation went OK I try to open STS and receive the same type of error, a window giving me a message that it "could not create a Java Virtual Machine" and another one explaining the parameters passed.
                -------------------------------------------------------------------------------------
                My env variables seems to be OK, I even use shortnames on it:
                JAVA_HOME=C:\PROGRA~2\Java\jdk1.6.0_22
                Path=C:\Java\groovy-1.7.5\bin;C:\PROGRA~2\Java\jdk1.6.0_22\bin;C:\Windows\sy
                stem32;C:\Windows;C:\Windows\System32\Wbem;C:\Wind ows\System32\WindowsPowerShell\v1.0

                I installed the STS on another directory from "Program Files" (which recommended the Installation Instruction)

                STS Directory:
                c:\Java\springsource\sts-2.5.1.RELEASE

                Java version:
                c:\Java>java -version
                java version "1.6.0_22"
                Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
                Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

                c:\Java>

                -------------------------------------------------------------------------------------

                I been reading in the forums and I see a lot of people asking for solutions due to this error happens to many persons like me, but none seems to receive an answer.

                I still eager to check STS, but I'm worried if I could get even more problems with this IDE . Hope someone could help me out to resolve this issue.

                Best regards to all,
                Last edited by nelcab; Nov 19th, 2010, 06:40 AM. Reason: Just forgot to add the STS.INI file.

                Comment


                • #9
                  Hi to all,

                  I'm new in Srping and I had the same issue.
                  I installed Spring in my laptop with W7 and no problem, but I tried to insstall it in otrhe computer with Microsoft Windows Server 2003 R2 and a had the same error :S

                  I cheked the STS.ini file and everyting seems right.

                  Could the problem be that I need at least W XP?

                  Regards
                  ALara

                  Comment


                  • #10
                    Hey!

                    Do you have the correct JDK installed and running that matches the STS version that you installed? (I mean 32bit vs. 64bit)? Sometimes this causes confusion.

                    Another step to analyze this in more detail would be to check whether a standard Eclipse distribution works on your machine without trouble. Can you check that as well?

                    Thanks,
                    Martin

                    Comment


                    • #11
                      Originally posted by nelcab View Post
                      Hi to All,

                      I'm started to learn Groovy/Grails and yesterday night I installed the STS IDE to give it a try due to an email I receive from Spring promoting its new 2.5.1 version and its great Groovy/Grails support. I'm been using Netbeans since I begin this learning path a few days ago and I was eager to check on the Spring Tool Suite to see how much better integrated it is.

                      I have:
                      Windows 7 Professional (64 bits), but running JRE and JDK in 32 bits to simplify things. I have read the installation instructions pdf and check that I could use the: springsource-tool-suite-2.5.1.RELEASE-e3.6.1-win32-installer.exe installation with this configuration.
                      After installation went OK I try to open STS and receive the same type of error, a window giving me a message that it "could not create a Java Virtual Machine" and another one explaining the parameters passed.
                      -------------------------------------------------------------------------------------
                      My env variables seems to be OK, I even use shortnames on it:
                      JAVA_HOME=C:\PROGRA~2\Java\jdk1.6.0_22
                      Path=C:\Java\groovy-1.7.5\bin;C:\PROGRA~2\Java\jdk1.6.0_22\bin;C:\Windows\sy
                      stem32;C:\Windows;C:\Windows\System32\Wbem;C:\Wind ows\System32\WindowsPowerShell\v1.0

                      I installed the STS on another directory from "Program Files" (which recommended the Installation Instruction)

                      STS Directory:
                      c:\Java\springsource\sts-2.5.1.RELEASE

                      Java version:
                      c:\Java>java -version
                      java version "1.6.0_22"
                      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
                      Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

                      c:\Java>

                      -------------------------------------------------------------------------------------

                      I been reading in the forums and I see a lot of people asking for solutions due to this error happens to many persons like me, but none seems to receive an answer.

                      I still eager to check STS, but I'm worried if I could get even more problems with this IDE . Hope someone could help me out to resolve this issue.

                      Best regards to all,
                      This looks good in general, I think. Can you share the screenshot of the error message somewhere else in order to not get it downscaled? It is a bit unreadable...

                      Another possible issue could be the memory configuration. Sometimes the OS doesn't allow the JVM to allocate the configured amount of heap. Can you try to reduce the memory setting (in the sts.ini file, the 768m value of -Xmx maybe down to 512m or 368m)?

                      HTH,
                      Martin

                      Comment

                      Working...
                      X