Results 1 to 5 of 5
I have a script that invokes a java application. when i issue a "ps", i see the command name to be "java" for the process i started.
How do i ...
- 04-22-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
assign a name to a process
I have a script that invokes a java application. when i issue a "ps", i see the command name to be "java" for the process i started.
How do i assign a user defined process name?
- 04-22-2008 #2
What kind of script is it and could you post the line where you start the process?
- 04-22-2008 #3
This is correct. The reason for this is that Java executables are not fully compiled: when you execute a Java application, you are actually executing the Java JIT compiler, which compiles the executable and runs it.
However, if you run a command like "java SomeProgram", the ps output should be "java SomeProgram". Therefore, you can use something like "pgrep -f SomeProgram" to determine the PID, and kill it that way.
Does that help?DISTRO=Arch
Registered Linux User #388732
- 04-23-2008 #4Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
It is a simple java program that is invoked by the shell script. i would like to know if i can assign a process name to the script that i invoke.
- 04-23-2008 #5Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
Thank you. Yes, i know that we can use the pgrep. but, i would like to know if i can assign a user defined process name to the script that i invoke.


Reply With Quote