IntelliJ IDEA 12.0 JVM Startup Error - java

I just upgraded to IntelliJ IDEA 12.0 and get an error immediately upon attempting to launch:
The JVM could not be started. The maximum heap size (-Xmx) might be too large or
an antivirus or firewall tool could block the execution.
I checked my idea.exe.vmoptions file and the maximum heap size is only 640m (I have 8 GB physical memory and am not running any other applications).
idea.exe.vmoptions
-Xms128m
-Xmx640m
-XX:MaxPermSize=640m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
I still have IntelliJ IDEA 11.4 on my machine and I am able to run that (using the same values for max heapsize in idea.exe.vmoptions). Since IntelliJ IDEA 11.4 runs, I don't believe it is an antivirus or firewall issue. I have also checked those settings as well.
Anyone run across this or have any idea (no pun intended)?

Please see this answer for the problem background and the solution.
Your questions seems to be the exact duplicate of:
How to increase intellij 32bit xmx more than 1GB?

Assuming you are on windows I am curious why you are running the 32bit version of intellij when you have a 64bit machine?
I was having the same error and found that there was two things going on. The first was that the link I had in the taskbar was pointing to the idea.exe instead of the idea64.exe, which meant I was only launching the 32bit version of intelliJ.
Second there is another file for vm options for the 64bit. idea64.exe.vmoptions
After switching to the 64bit exe and making sure the vm options I wanted were correct in the vmoptions file I did not have any further issues.
On another interesting note I found that on 32bit machines when the 32bit version of intelliJ was set to have 1gb of memory for -Xmx and I had chrome open I would get the error. If I closed chrome I would no longer get the error. I think this had something to do with the jvm verifying that the required amount of memory was available before launching.

Try to configure your idea to the default values
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
VM options are loaded from the IDE_HOME\bin\[bits][.exe].vmoptions file.
More info: https://intellij-support.jetbrains.com/entries/23393413-The-JVM-could-not-be-started-The-main-method-may-have-thrown-an-exception

I found that switching from a 32-bit version to a 64-bit version caused the issue, as my windows shortcuts still pointed to the old idea.exe and not the correct idea64.exe.

Related

How to get Java to give Alloy more memory

I am using alloy4.2, and I am not able to tell it to use more memory.
I am not a Java expert and I suspect the problem is in how I'm configuring Java.
I am using OpenJDK Runtime Environment 1.8.0_131.
I have also tried 1.8.0_151.
My VM is running in Ubuntu x64.
Under the Alloy Options tab, Maximum Memory To Use is always stuck at the default of 768M.
I am using a VM that has 16G of memory available.
I have tried setting the Java stack parameters
-Xms1g and -Xmx8g
at the command line when I invoke Java, and also using the "export _JAVA_OPTS" to no avail.
Java says it is "picking up" the Xms and Xmx values and when I run
Java -XshowSettings:vm it shows that I have a max heap size of approx. 7.9G.
But Alloy doesn't let me increase the memory beyond the tiny minimum size of 768M. Any idea what I am doing wrong?
The numbers are hardcoded in Alloy although 4.2 should have 4Gb included? (There are a number of variants of 4.2 out there I think.)
We're working on creating a 5.0.0 version at the moment but that is not really publishable yet. You can download a snapshot JAR from:
https://oss.sonatype.org/content/repositories/snapshots/org/alloytools/org.alloytools.alloy.dist/5.0.0-SNAPSHOT/

Unable to uninstall jruby (windows): jvm could not start

I've got this version on jruby in Windows 10:
jruby 1.7.13 (1.9.3p392) 2014-06-24 43f133c on Java HotSpot(TM) Client VM 1.7.0_80-b15 [Windows 8-x86]
and when I try to uninstall it from Control Panel I keep on getting the error:
The JVM could not be started. The maximum heap size (-Xmx) might be too large or an antivirus or firewall tool could block the execution.
Any idea what I could try to delete this installation? I tried reinstalling the .exe file, to see if it had an option to remove/repair, but nothing, it just reinstalled it and I still have the problem.
check your environment variables ... you might have JRUBY_OPTS or JAVA_OPTS set.
unset those or adjust the -Xmx setting accordingly.
No commands seem to work for me, at the end I had to do it through a specific software design for this kind of issues: http://www.perfectuninstaller.com/

Started seeing object heap exceptions Java 6

I've started seeing the following error using 32-bit (and 64 for that matter) Java 6 (on Windows 8 x64. This wasn't an issue until some Windows updates were installed.....) to call ant scripts
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Anyone ever seen it before? I've done some digging around SO and other places and haven't come across anything that's solved this issue for
Edit 8/24
So far, here are the following things I have attempted to fix the issue, none of which have worked:
Setting _JAVA_OPTIONS in system environment variables, up to 3gb for the maximum heap size
Setting JVM_OPTS in cmd before invoking ant, again max heap size up to 3gb
Passing in -Xms and -Xmx arguments when making the actual java call, like so %JAVA_HOME%\bin\java -Xms512m -Xmx2048m org.apache.tools.ant.Main
Setting the ANT_OPTS variable before calling ant
Uninstalling Windows updates going back before these issues.
Does anyone have a solution that differs from the following? As the other attempts have not been working..
When you run on 32-bit windows (or in the 32-bit windows emulator) you have only about 1.2 GB - 1.5 GB of virtual memory available. This size depends on what else you might have running in that space as it doesn't always isolate programs from each other in terms of memory space (i.e. the memory space is limit and shared)
So after updating windows, it could have installed a new program which is run before Java, or updated an existing which is using more memory.
The simplest solution is to use a 64-bit JVM which doesn't have this problem. Or you have to reduce the maximum heap size.

IntelliJ IDEA 13.1 - how to prevent low memory problems on a 32-bit OS (Win 7) with 3GB RAM

I have some memory issues while using the IntelliJ IDEA 13.1 (currently 13.1.6), due to insufficient amount of RAM. I work on a quite big project and often run some maven builds as well as a web application in debug mode. I've got a 32-bit OS (Windows 7), 3 GB RAM and an SSD. I use the JDK 7.
The Maven builds which are run inside of IntelliJ IDEA fail often due to insufficient memory and I have to resume them from the point of failure.
An alert "Your computer is low on memory" is shown by the Windows system often when I perform the Maven builds or try to start the web application using IntelliJ IDEA.
I use the following settings in the configuration file "idea.exe.vmoptions" (located in the same directory as the "idea.exe" file):
-server
-Xms128m
-Xmx700m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
The MAVEN_OPTS environment variable is set to the following value:
-Xmx1024m -Dfile.encoding=UTF8
I already disabled unused plugins and found out that it's useful to restart the IDEA after memory-consuming operations, like e.g. after a Maven build. I also found out that closing as much other applications as possible helps a bit, but not always.
However, all aforementioned tricks didn't eliminate the problems.
What are your recommendations, apart from extending the RAM or changing to a 64-bit OS?
Do you know some better settings for the "idea.exe.vmoptions" file?

Problems setting Tomcat Java Heap Size to 8GB on Windows 7 (64 bit)?

I need larger Java Heap Size atleast 8GB minimum for my search application. I am working on Windows 7 (64 bit). I am not able to allocate more than 1500MB using CATALINA_OPTS environment variable. When I try allocating more the Tomcat crashes and is not able to start. I donwloaded 64 bit Java Run Time now and also subsequently 64 bit Apache Tomcat. Even now its not permitting me to start with more Heap Size. It (Tomcat 64 bit) crashes again. Any help would be appreciated.
I solved the problem. Actually I was trying to start Tomcat (startup.bat) in command prompt in Windows. It was crashing. Still dont know the reason for this (maybe related to starting 64 bit Tomcat on Dos/ When I start tomcat as a service using service.bat install it works perfectly fine.
From: Increasing the JVM maximum heap size for memory intensive applications
Try to specify -d64 on your CATALINA_OPTS.
Edit: Seems that option only has an effect on Solaris. Nevermind.
let the environment variables JAVA_HOME and PATH refer to your 64-Bit JVM. You can check it on command-line by executing java -version and %JAVA_HOME%\bin\java.exe -version (on Windows).

Categories

Resources