• Post Reply Bookmark Topic Watch Topic
  • New Topic

Find out what Java Program is running in Unix  RSS feed

 
Chit Ming Chong
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to find out what Java program is running in Unix?

I was handed a project that manage a folder of emails (text files redirected using Procmail). It will then send auto-response to the sender and create a HelpDesk request record to insert into the ARS(Remedy) system. Btw, Does anyone know a better solution?

There are too many version of the program (different copy of .class files) in the home directory and I have no idea which one is actually running.
 
Tim Holloway
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not easy. A straight "ps" command may not show the entire command line - in fact in Solaris I can pretty well guarantee it. There are some tricks to get around that, but it's not pretty.
 
Joe Ess
Bartender
Posts: 9443
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had good luck with (the 'w' is for "wide", the more 'w's, the longer the command line display):
ps -axwww | grep java


The options on ps vary. On Solaris, I have to use /usr/ucb/ps to get those options to work.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!