aspose 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 15629
    
  15

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
Method succeeds when running from Eclipse, fails when run from Jar file
Ant and SSH
JAVA API ( JPS ) For Printing out in JAVA
classpath
how to clear applet screen