Search code examples
javaeclipsedebuggingosgiequinox

Debug a compiled Java Equinox program


Is there a way to debug a Java application that is started via Eclipse Equinox? Something similar to the ".net reflector" does with C #. We have this big program that was developed years ago by an internal team and we have to understand how it works so that we can reacreate it in another language. The problem is that we haven't got any sorce code file (everything was lost).

Right now the directory of the application contains: - Dir "configuration" - Dir "integration" - Dir "plugins" - Dir "tools" - Dir "workspace" - starter.exe (with eclipse logo as icon) - starter.ini - startup.jar

I really hope that there is a way to retrive how the app worked.

Thanks :)


Solution

  • Looks like i managed to resolve my problem. Here what i did:

    • Downloaded Eclipse Mars (4.5.2)
    • In Eclipse, i've selected "Help" -> "Install new software" and added the repository site "mchr3k - http://mchr3k-eclipse.appspot.com/".
    • From here i've downloaded the "Java decompiler Eclipse Plug-in"
    • Created a new temporary java project and added all the .jar i wanted to debug to the build path of the project.
    • Added this line in the "launcher.ini" contained in the directory of the application i wanted to debug: "-Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8888,server=y,suspend=n"
    • Started a "Remote debug" from Eclipse

    By doing this i can attach the eclipse debugger to my application and use the decompild source code.