I'm looking to run a Java program (compiled class > .jar file) as my Unix shell. Basically, I don't want sh or bash to be involved, as then users could shell out/suspend out of my Java program and access the unix shell.
Is this possible?
Do I need to use jail/chroot?
Is it as simple as editing /etc/shells and putting the java -jar ... command in there?
Alternatively, if I must use sh/bash, can I auto-exit the shell when my java/vm expires or is unloaded (so nobody can escape the Java app into the bash/sh shell itself)?