STS Unable to create java virtual machine - eclipse

In my STS installation, I tried to upgrade Xmx1024 to Xmx4096. My computer computer has 8GB installed memory. But it keeps giving me an error message - "could not create java virtual machine" and exits with code 1. What could possibly be the problem and what should I do to fix it?

That's it: you're running a 32 bit JVM. I think you can't have more than 3GiB (or maybe 2GiB, I read by there) in a 32 bit JVM.
Can you try running a 64 bit JVM?
As they say in this article, you seem to be missing the unit.
Don't you want to write Xmx4096m?

Related

Eclipse always exit when used in a virtual machine

I use ubuntu16.04 in VMware for learning Hadoop. The eclipse is Eclipse IDE for Java Developers at 2020.03 for linux_64.
And when use eclipse to write some java code, the IDE usually exits by itself without any error. And the eclipse is too slow when I use it. I guess that whether the memory is not enough for using IDE. But I found the memory is free when I check it. I allocated 2G of memory for ubuntu16.04.
And I search for this problem on web. I found many people believe the problem is eclipse caused. So they come up with a way to edit eclipse.ini.
-Dorg.eclipse.swt.browser.DefaultType=mozilla
Add this command to the last line of eclipse.ini.
Unfortunately, it doesn't work. So Do u know why? Should I allocate more memory for VMware?

TomCat-unable to create Java Virtual Machine error

After I recently tried to install TomCat and use it in Eclipse, I was not able to run the server as it prompts an error that says "Could not create Java Virtual Machine".
After reading other's solutions I tried adding a _JAVA_OPTIONS in system variable but it didn't work either.
What is the solution to this problem?

Start WinDbg right after program crashes

If you look at this Youtube video, you can see that WinDbg is automatically executed when the process dies.
I've followed the tutorial and tried to do the same on my system. I first ran windbg -I, and then changed the HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\Auto registry key to 0. Is there any other step that I'm missing?
Running the 64-bit version of WinDbg with -I command line option creates both 64 bit and 32 bit AeDebug entries. This can easily be proven with Process Monitor:
The 32-bit version of WinDbg creates 32 bit entries only. So, if you ran the 32 bit version, 64 bit programs are not handled. That's what I expect has happened. Another option would be that you ran it without administrative privileges and didn't read the failure message carefully.
In case you want both 32-bit and 64-bit crashes to be handled by WinDbg, run WinDbg -I for both versions. You'll find that WinDbg is smart enough to handle any order:
WinDbg32 will overwrite an existing entry created by WinDbg64 before
WinDbg64 will not overwrite an existing entry created by WinDbg32 before
Although WinDbg64 can debug 32 bit applications, it cannot load 32 bit extension DLLs, therefore you typically want both debuggers registered, not only the 64 bit version.

Eclipse Juno- Suddenly “cannot run program 'make' : unknow reason”

I'm using Eclipse JUNO for developing C applications. It runs on Ubuntu 12.04 inside a 3-CPU, 1GiB RAM virtual machine.
Everything works perfectly, but sometimes, I cannot build my application any more and the following error occurs:"cannot run program make; unknown reason".
Any idea on how to fix this?
Apparently this error is due to low memory conditions. It mostly occurs after searching in files within Eclipse (a search that returns a large result set). If the error occurs again:
Re-start Eclipse and try again
If it does not fix the problem, you need to completely reboot the OS

Java compile on Ubuntu with openjdk, then run on windows with sun java gives error

I have been developing a Java program in Netbeans/Ubuntu 12.04 using OpenJdk. I have got this program to run successfully using the .jar in Linux, but when I copy the .jar to my Windows 7 virtual machine I get the following error;
"Could not find the main class: testprogram.Main. Program will exit."
Also this program uses no external libraries.
How did you start your program? Did you use java -jar yourjarfile.jar?
Maybe your Manifest file does not defined applycation entry point. You can study this topic here.
My fix to this problem was to use JDK 6 as opposed to JDK 7, still unsure as to why this error was produced, but this change has fixed the problem.