Java works fine on Windows but BlueJ IDE Java doesn't work

I have the latest version of Java installed, and it works great in Eclipse and with other programs.

A Duke University online course wants me to download and run their taste for BlueJ for Windows. I installed it, but it cannot start. It says:

Failed to create Java Virtual Machine

After making sure that the _Java_Options environment variable sets a sufficient heap, I examined the BlueJ program folder. I see that in bin it has its own javaw.exe. When I try to run this, I get the same error.

How can i fix this?

I'm on 64 bit Windows 10.

This IDE claims to have its own JDK and is ready to run out of the box:

Window

On Windows, BlueJ ships with the Java Development Kit, the JDK, so only one download is required.

Download the Duke/Coursera specific version (choose Save instead of Run)
Double-click the downloaded install file and follow the wizard to install it in your preferred location
By default, the installer will place a shortcut to BlueJ on your desktop

Update:

Finally, I made sense to try running .exe from the command line and transfer the results to a text file:

C:\Program Files (x86)\BlueJ>BlueJ.exe > tmp.txt

Text file content:

Error initializing VM. Failed to reserve enough space for the heap of objects 2097152KB

So, it seems that there is not enough memory, but this is strange, because I immediately checked the Resource Monitor, and my memory usage is only 2.7 GB out of 16 GB.

To make it weirder, I just resized the heap size _JAVA_OPTIONSby 1 GB and repeated the same command. The result was the same error message ... it is still trying to allocate 2 GB, although I reduced the heap to 1 GB ...

I also installed

SET JAVA_OPTS = "- Xms256m -Xmx512m"

.

+4
3

- .

, - , - _JAVA_OPTIONS < > , , BlueJ 32 - Java, 64- :

SET _JAVA_OPTIONS = "- Xms256m"

, JAVA_OPTS .

, , , , .

+1

Try reinstalling BlueJ. This time, change the installation directory from (C: \ Program Files (x86)) to (C: \ Program Files). It should work.

0
source

Source: https://habr.com/ru/post/1651780/


All Articles