File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes How to debug a jar that runs called by a shell (.sh) opened by SSH? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to debug a jar that runs called by a shell (.sh) opened by SSH?" Watch "How to debug a jar that runs called by a shell (.sh) opened by SSH?" New topic
Author

How to debug a jar that runs called by a shell (.sh) opened by SSH?

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 689
Hi,

My application is packet in a jar (with a main method) that runs called by a shell file (.sh). I access the server folder through SSH.

I'd like to know if there's a way to debug my application in Eclipse.

I put the following options in the sh file
-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

Also changed Eclipse, creating Remote Java Application entrance in Debug Configurations but it didn't work... does anyone know what to do?


SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

You have to tell the JVM remote debugger what machine the JVM being debugged is on. Looks like you didn't do that.

You may also need a hole punched in the remote machine's firewall(s) in order to access that port. Or an ssh tunnel if that's not possible (and it probably shouldn't be, for security reasons!).


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to debug a jar that runs called by a shell (.sh) opened by SSH?
 
Similar Threads
Ant and SSH
classpath
Method succeeds when running from Eclipse, fails when run from Jar file
JAVA API ( JPS ) For Printing out in JAVA
how to clear applet screen