Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Eclipse Foundation » Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine."(Eclipse Helios Immediate Error when Debugging: Error: Could not create the Java Virtual Machine.")
Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine." [message #1851858] Wed, 20 April 2022 12:04 Go to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
I really need help with this as I cannot find a solution anywhere, having searched the internet and forums for a few weeks now!

I have a project in Eclipse Helios (Eclipse for RCP and RAP Developers Version Helios Service Release 2 Build id: 20110218-0911 running on Windows XP) which has been working fine, I can debug and run without any problems etc.

I have set up a new Windows 10 machine and I have exact same software versions and paths to the local drive for my project. As far as I can see, everything is identical.

However, when I use the Debug on the Windows 10 machine, I get the following error:

"Error: Could not create the Java Virtual Machine."
"Error: A fatal exception has occurred. Program will exit."

followed by:

'Launching ***.product' has encountered a problems.
Cannot connect to VM

(screenshots attached)

I have come across posts which suggest modifying the eclipse.ini file but they are all for solving the issue with Eclipse not launching rather than when Eclipse is working fine but the Debug has the issue.

I'm thinking that this is due to a setting within the Eclipse Platform or within Java settings? I'm running out of ideas!

Any help or suggestions with this would be very much appreciated.
  • Attachment: Error 1.png
    (Size: 5.99KB, Downloaded 70 times)
  • Attachment: Error 2.png
    (Size: 6.62KB, Downloaded 71 times)
  • Attachment: Eclipse.png
    (Size: 28.09KB, Downloaded 72 times)
  • Attachment: Java.png
    (Size: 6.42KB, Downloaded 70 times)
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.&quo [message #1851876 is a reply to message #1851858] Wed, 20 April 2022 17:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33148
Registered: July 2009
Senior Member
Have you tried installing something that isn't more ~12 years old?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851878 is a reply to message #1851876] Wed, 20 April 2022 18:35 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
LOL! Yes I have tried a few times in the past and learnt that there are too many problems when I compile the code! So I decided to go with the old saying "if it works, why fix it" and stuck with software versions which still works and does the job!

[Updated on: Wed, 20 April 2022 20:37]

Report message to a moderator

Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851879 is a reply to message #1851876] Wed, 20 April 2022 20:04 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
Attached is a screenshot of the detailed error messages:

Cannot connect to VM

com.sun.jdi.connect.TransportTimeoutException
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:97)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107)
at java.lang.Thread.run(Unknown Source)

Cannot connect to VM

java.net.SocketException: socket closed
at java.net.TwoStacksPlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107)
at java.lang.Thread.run(Unknown Source)

[Updated on: Wed, 20 April 2022 20:21]

Report message to a moderator

Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851888 is a reply to message #1851879] Thu, 21 April 2022 07:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33148
Registered: July 2009
Senior Member
So given this seems to be a Java problem launching the debugger, the question is how is your JRE configured in Window -> Preferences -> Java -> Installed JREs. Does this refer to the right JRE?

When you launch anything, the Debug view in the Debug perspective will show information about the launched thing. I think even if it fails to launch, you will be able to look at the properties (from the context menu on the objects in the view), and see what command line was invoked to launch the process. Such details should help you figure out what is different between the one that works and the one that fails.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851901 is a reply to message #1851888] Thu, 21 April 2022 11:43 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
Unfortunately the Debug Perspective does not reveal much for the Windows 10 instance that fails! Please see attached screenshots for the Debug Perspective and Error Log for this.

Also attached is the Installed JREs.

[Updated on: Thu, 21 April 2022 15:00]

Report message to a moderator

Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851915 is a reply to message #1851901] Thu, 21 April 2022 15:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33148
Registered: July 2009
Senior Member
In your 2nd picture, bring up the context menu and look at the Properties... of the <terminated...> node the tree. That's what's failing to launch Java. This jre7 thing looks odd to me. I'd expect you to have a JDK installed. I'd install a proper JDK like JDK 8 from here and make sure that's the one that's specified in the Java/JRE preferences.

https://adoptium.net/temurin/releases/


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851918 is a reply to message #1851915] Thu, 21 April 2022 16:25 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
Installed JDK 8 and now I can't launch Eclipse. See attached screenshots!
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851920 is a reply to message #1851915] Thu, 21 April 2022 16:33 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
Modified my eclipse.ini file to point to JRE 1.8

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.rcp.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-- launcher.appendVmargs
-vm
C:\Java\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m

and now I get this error when launching Eclipse. See attached.

[Updated on: Thu, 21 April 2022 16:35]

Report message to a moderator

Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851921 is a reply to message #1851915] Thu, 21 April 2022 16:50 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
And here's the Debug Properties whilst I was running with JRE 7. See attached. (project name and paths replaced with ****)
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851922 is a reply to message #1851915] Thu, 21 April 2022 17:43 Go to previous messageGo to next message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
Reverted back to JRE 7 and got Eclipse working again. I'm now suspecting that this is a memory related issue, as sometimes, even on my XP which normally has no problems, I get the VM error and it gets resolved with a restart of Windows! But it's frustrating that it won't even work just the once on my Windows 10 machine, even after several restarts, and I have no way of finding a solution for this, especially if it is memory related!
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851927 is a reply to message #1851922] Thu, 21 April 2022 18:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33148
Registered: July 2009
Senior Member
You'll need to consult Google. I've given you all the hints that I can. I would not personally try to get a 12 year old version of Eclipse with an end-of-life version of Java running on a modern Windows 10 machine. Don't go there. It doesn't work so why try to fix it?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Helios Error when Debugging: "Error: Could not create the Java Virtual Machine.& [message #1851928 is a reply to message #1851927] Thu, 21 April 2022 18:42 Go to previous message
Medi Degani is currently offline Medi DeganiFriend
Messages: 9
Registered: April 2022
Junior Member
I guess I just need to stick to my good old XP then! Thanks for all your suggestions but I'm not one for Upgrades! Even when I buy a brand new computer, I always switch off the Automatic Update and remove the actual Update Service from the Services. This is why my XP is still working and is still as fast as the first day I bought it! In my experience, every time I updated windows or any other software, everything starts to go wrong and there's no way of tracing what caused it! Even reverting back Upgrades, there's no guarantee to solve the new issues which could have been avoided! If it works, there's no need for upgrades, as you will be going down the road of the Unknown!
Previous Topic:Time to move into a new forum "infrastructure"
Next Topic:Can I publish my workspace settings online?
Goto Forum:
  


Current Time: Mon May 20 19:57:20 GMT 2024

Powered by FUDForum. Page generated in 0.03225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top