0
votes

I tried to debug a simple java program in Eclipse and I got this error:

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) ERROR: transport error 202: connect failed: Connection timed out ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]

and I tried following setting vm in eclipse.ini file but it didn't work

Here is my eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm C:\Program Files\Java\jre1.8.0_45\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
1
What's your eclipse.ini file look like?Nathan Tuggy
Please edit your question with that information so it's readable.Nathan Tuggy
@durron597: I usually do too. And then when I forget... bam.Nathan Tuggy

1 Answers

0
votes

You have to put the -vm at the beginning of the eclipse.ini file, and it has to be on two separate lines. I don't think it matters, but on my machine it uses forward slashes even though it's Windows. Change it to this:

-vm
C:/Program Files/Java/jre1.8.0_45/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m

Also, please verify that it actually is in that location on your computer and not somewhere else.