Eclipse: Unrecognized option: -g

4.2k Views Asked by At

I am trying to start an application in Eclipse with the JVM Option "-g", so that I would be able to view all thread info while debugging using the JDI.

However, on start, Eclipse is giving the following:

Unrecognized option: -g:
Could not create the Java virtual machine.

The full list of my JVM Options:

-g -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000

Other Info: I am using mac.

I would very much appreciate assistance to solve this problem, so that I could debug without getting the AbsentInformationException in JDI.

Thank you,

Dean

1

There are 1 best solutions below

1
On BEST ANSWER

You have to compile with the -g option.

For Eclipse configuration, see here: Where do you configure Eclipse Java compiler (javac) flags?