0

I have a Java application that must be launched from a shell script. This application uses a jar library that I want to modify and debug from eclipse. I have tried it and I failed.

What I have tried

I have compile my library to generate the jar. In the folder where the application looks for the mentioned jar, I have renamed the original one and created a symbolik link to mine.

Then, from eclipse, I have done the following:

  • Right click on my jar's project > debug as > debug configurations.
  • Select Remote java Application and Connection Type = Standard (Socket listen)

At this point, I can see a label at the bottom right telling: "Waiting to vm to connect".

Next I have gone to the application's main folder and executed the launcher script.

I am sure that the application is using the modified library because I have added a System.out.printlin("...") and I can see it in the console. Despite of this, the debug mode is not activated in eclipse, and the application is not paused.

Note: I have compiled the proyect with make.

Dan
  • 2,452
  • 20
  • 45

1 Answers1

0

For remote debugging, the JVM that is being used to run the application must be configured to run in debug mode. So you'll need to include those options in the script that's launching your application.

Having said that, what is so special about the shell script that it can't be converted into a run configuration to launch directly from Eclipse?

Community
  • 1
  • 1
E-Riz
  • 31,431
  • 9
  • 97
  • 134
  • So what I need is to modify the script's java call to include debug flags, ok. Answering your question: It is a long script that performs some operations and give the application some inputs, that in several cases are files that are searched with relative paths. – Dan Sep 01 '16 at 18:57