glassfishenvironment-variablesubuntu-9.04

Manual Installation of Glassfish on Ubuntu


I just installed Glassfish on my Ubuntu server (No GUI) using THIS tutorial. Everything went well. But now when I'm trying to play with ASADMIN tool it's telling me this:

The program 'asadmin' is currently not installed. You can install it by typing: apt-get install glassfishv2 -bash: asadmin: command not found

So, in order to run asadmin tool always need to type:

/opt/glassfish/bin/asadmin start-domain domain1

or go to that folder and run it from there.

So, the question is, what file do i need to edit in order to set this path in to the environment.


Solution

  • You can add the following to your ~/.bashrc file to add all the binaries in /opt/glassfish/bin to your $PATH

    export PATH=$PATH:/opt/glassfish/bin
    

    ~ expands to /home/your-user - just to be clear.