eclipse: how to debug a Java program as a .jar file?
Posted
by Jason S
on Stack Overflow
See other posts from Stack Overflow
or by Jason S
Published on 2009-11-13T22:19:35Z
Indexed on
2010/05/28
12:22 UTC
Read the original article
Hit count: 289
I use ant
for creating .jar files in Eclipse. Works great.
I have a .jar file I am working on that expects the code to be in a .jar file (it looks for .properties files in the same directory as the .jar file) -- the standard Eclipse "Run" and "Debug" menus execute the main()
method of a specified Java class... but they do it from the directory containing the compiled class files, not a jar file. Is there a way to change this behavior so Eclipse runs code from the appropriate .jar file instead?
(My workaround right now is to run the .jar file externally, with it suspended waiting for a debugger, per Dave Ray's answer to one of my other questions.)
© Stack Overflow or respective owner