Setting up Java environment will help in smooth functioning and save valuable time. Set the PATH environment variable if you want to be able to conveniently run the executables (javac.exe, java.exe, javadoc.exe, and so on) from any directory without having to type the full path of the command.
• It is useful to set the environment PATH variable permanently. To make a permanent change to the PATH variable, use the System icon in the Control Panel. Procedure for setting up the environment variable varies depending on the version of Windows:
• The following is an example of a PATH environment variable:
C:Javajdk1.8.0in; C:WindowsSystem32;C:Windows; C:WindowsSystem32Wbem
To set the Java environment path permanently, set the path in your startup file.
For C shell (csh), edit the startup file (~/.cshrc):
set path=(/usr/local/jdk1.7.0/bin )
For bash, edit the startup file (~/.bashrc):
PATH=/usr/local/jdk1.7.0/bin:
export PATH
For ksh, the startup file is named by the environment variable, ENV. To set the path:
PATH=/usr/local/jdk1.7.0/bin:
export PATH
For sh, edit the profile file (~/.profile):
PATH=/usr/local/jdk1.7.0/bin:
export PATHÂ
Then load the startup file and verify that the path is set by repeating the java command:
For C shell (csh):
% source ~/.cshrc
% java -version
For ksh, bash, or sh:):
% . /.profile
% java -version
© 2024 Easy To Learning. All Rights Reserved | Design by Easy To Learning