2

I can't seem to be able to debug a JNLP application with Eclipse. The problem I'm getting is very similar to that described in this SO question, i.e., javaws appears to be starting the VM twice. The first time it starts fine with the remote debugging options and provided I use the suspend=y option I can even attach the Eclipse debugger to the VM, but as soon as it attaches the VM dies and javaws starts it again without the debugging options.

Here's how I'm launching the app:

javaws -J-Xdebug -J-Xnoagent -J-Djava.compiler=NONE -J-Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=y http://myserver/launch.jnlp 

Since I have suspend=y, whilst it's waiting for a debugger to attach I can use ps -ef | grep java to see the java process with all the correct options running. Indeed, I can connect the Eclipse debugger to it, but as soon as I do that the process terminates and javaws starts a new java process. If I subsequently do another ps I can see a new (different PID) java process now without the debugging options. Attempting to connect to this process from Eclipse just gives "connection refused".

I'm using Java 6 on Mac OS X Lion 10.7.3 if that makes any difference.

The author of the SO question I mentioned above says he solved the problem apparently by accident so the cause of the problem is not apparent (or I'm too stupid to get it).

Any ideas?

Community
  • 1
  • 1
mluisbrown
  • 14,448
  • 7
  • 58
  • 86

1 Answers1

1

Check if you have more then Java 7 update 67. If you do I know that oracle has open bug for this. some how from update 67 and above there is problem with this. I had the same problem. I roll back to Java 7 update 60 and now its working fine. I suggesting to remove all Java installation and then install

Moshe Tsabari
  • 362
  • 3
  • 17