facebook

Debug jar from Windows-launched Java App

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #620286 Reply

    jim furlong
    Participant

    I would like to debug a jar that runs in a Java application, but the application itself is launched by a Windows executable. I suspect the VM arguments are “hidden” behind the EXE and the faster route to debugging is to start the EXE from MyEclipse (or ME CI) rather than guess the main class and its arguments. My problem is I see no way to start the EXE from the Create, Manage and Run Configuration dialog. Is this task possible?

    #620294 Reply

    Brian Fernandes
    Moderator

    Jim,

    With the Java tooling, no – there isn’t a way to launch an EXE, and beyond that, for a Java debugging connection to be set up.

    1) Finding the main class would probably be simpler – if it really is an app that’s launched via a main, and the launching exe isn’t doing something different. To find main, you could unzip the JAR(s) if not too many and examine MANIFEST.MF files, looking for the Main-Class property. Alternatively, you could add all the JARs to the build path of a dummy Java project, and then choose Debug As > Java Application – the dialog that pops up will list all the main classes it finds on the project’s classpath.

    2) Remote debugging is another option, but that would require you to change the arguments passed to the Java application to have it wait / listen for a debug connection. You can then start it with the EXE and “attach” to it from MyEclipse. I only mention this as an option if you can think of some way to modify the arguments.

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Debug jar from Windows-launched Java App

You must be logged in to post in the forum log in