Ernie Mcracken wrote:Are you sure $BASHPID is really what you want, this gives your the process ID of the current shell. Maybe you want $UID the current user id?
Also $BASHPID is just a system variable so you can't "execute" it just get its value
Henry Wong wrote:
I don't see the value of this code... you are starting a new shell (bash), so you can ask the shell, what is its PID? What does that serve? The shell will terminate upon completion, so the PID is now for a terminated application. What can you do with the PID?
Henry
James Sabre wrote:
Erik Deveza wrote: I have read that Ubuntu can only execute jnlp using jre 1.5,
Could you indicate where you read that because my experience indicates that it is wrong! I use OpenJDK 1.6 with WebStart on Ubuntu 10.10 without any problems.
Tim Sparg wrote:edit sorry just re-read that, you're looking for the session ID not userID
Rob Spoor wrote:JNI is another option, but it's more complex since you will also need to figure out which native calls to use.
Ernest Friedman-Hill wrote:
Welcome to JavaRanch!
Ernest Friedman-Hill wrote:
As far as APIs -- using Runtime.exec() to run the "query session" command is about it.