![]() |
![]() ![]() |
![]() |
![]() |
![]() |
After installation of the application server, one of the first steps is to configure your environment to include the application server's bin/ directory. This section addresses how to add the following directory to your PATH environment variable:
This is the only environment setting needed to run the asadmin command, the application server's administrative command line utility, and to access the asant utility to work with the sample applications. If you are using the application server installation that was installed as part of a Solaris[tm] 9 installation, then you must include the directory /usr/appserver/bin in your PATH in order to access the asant utility. Additionally, if your PATH does not include /usr/sbin, inclusion of /usr/appserver/bin in your PATH ensures that you have access to the asadmin command line interface.
If you are familiar with the process of setting environment variables, do so now in your own environment. After setting your PATH variable, ensure that the asadmin command can be found and then proceed to the next task, Starting and Stopping the Application Server. Otherwise, select one of the following sets of instructions depending on your platform:
Setting the PATH Environment Variable on UNIX Platforms On UNIX systems, it is recommended that you add the application server's bin/ directory to your login profile such that it is automatically added to your environment's PATH setting during login. Once you have set the PATH environment and refreshed your environment, execute the command asadmin at the command prompt. You should observe the following result:
Enter exit to exit the asadmin command. Leave the terminal window open for the next section. If the command is not found, double check your PATH setting, refresh your environment settings and execute asadmin again.
Proceed to Starting and Stopping the Application Server. Setting the PATH Environment Variable on Windows On Windows, it is recommended that you modify the system PATH environment variable via the Windows control panel. 1. From the desktop, access Start->Settings->Control Panel 2. In the Control Panel, double click on the System object. 3. Once in the System object, click on the Advanced tab. Now click on Environment Variables... 4. The Environment Variables dialog lists the environment variables that apply to your current user account as well as to the system as a whole. In this exercise, you will modify the PATH environment variable for your current user account. 5. Either select the existing PATH entry and click on Edit... or click on New... to create a new PATH environment variable. 6. Add the value of the <install_dir>/bin; to the front of the PATH value. For example, add c:\Sun\AppServer7\bin; to the front of the variable value. Click OK to close the Edit User Variable dialog window. 7. The PATH variable should reflect the directory path that you just entered. Click on OK to apply the changes and to close the Environment Variables Window. Click OK to close the System Properties window. 8. Check your work by starting a command window and determining if the application server commands are available from the command line. 8a. From the Windows desktop, access Start->Run... 8b. Enter the command name cmd in the Open: text entry field and either press the Enter key or click OK. 8c. When the command window appears, enter the following command at the prompt: asadmin After execution of the asadmin command, you should see the following result:
If you see this result, then you have verified that the application server command line utilities are accessible via your path setting.
Enter exit to exit the asadmin command. Leave the command window open and proceed to the next section, Starting and Stopping the Application Server. Troubleshooting Environment Settings If the asadmin command is not recognized, then go back into the Control Panel and double check your PATH setting and try to execute asadmin again. Once you have fixed the PATH setting, ensure that you start a new command window to test execution of the asadmin command. Only a new command window will pick up the environment variable change. You will encounter the following message when your PATH variable is not set correctly:
Proceed to Starting and Stopping the Application Server.
|
|||||||||||||