Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rogerio Kioshi
Ranch Hand
Posts: 690
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Tim Holloway
Saloon Keeper
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic