• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 701
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic