Page 176 - PowerPoint Presentation
P. 176

CAVITE STATE UNIVERSITY
                               T3 CAMPUS
                               Department of Information Technology          COSC 65 – Programming Languages

                   Java  supports  dynamic  compilation  and  automatic  memory  management  (Garbage
               Collection).

               Download and Install Java JDK
                   -   Go to google then search for Java SE JDK
                   -   Click the Java Platform (JDK) 8u60
                   -   Click the License Agreement button
                   -   Then look for the compatible Kit to your Operating System.
               (ex: Windows x64, download the jdk-8u60-windows-x64.exe)
                   -   After downloading it, double click the downloaded file, click Yes button, then leave
                       everything as default, click Next then wait for it to finished.

               To check if it is already installed,
                   -   Open command prompt then type “javac”
                   -   If it showed that “javac is not recognized as an internal or external command……..”
                   -   You have to set the path of java.

               How to set PATH in Java?
                   The path is required to be set for using tools such as javac, java, etc.
               If you are saving the Java source file inside the JDK/bin directory, the path is not required to
               be set because all the tools will be available in the current directory.
               However, if you have your Java file outside the JDK/bin folder, it is necessary to set the path
               of JDK.

               There are two ways to set the path in Java.
                       -   Temporary
                       -   Permanent

                   1.  How to set the Temporary Path of JDK in Windows
               To set the temporary path of JDK, you need to follow the following steps
                       -   Open command prompt
                       -   Copy the Path of JDK/bin directory
                       -   Write in command prompt: set path=copied_path

               For Example:          set path = C:\Program Files\Java\jdk1.8.7_00\bin

                   2.  How to set Permanent Path of JDK in Windows 7
               For setting the permanent path of JDK, you need to follow these steps:
                       -   Go to MyComputer properties
                       -   Click on Advanced system settings
                       -   Click on Environment Variables
                       -   On the system variables, look for the path
                       -   Click edit, don’t delete the existing path on the path value
                       -   Browse the location of the (C:\Program Files\Java\jdk1.8.7_00\bin) then copy it.
                       -   Go back to the Edit System Variable
                       -   Insert a semicolon (;) at the end of the existing path on Variable value,
                       -   Then paste the copied path in the variable values
                       -   Click OK
                       -   Then add a CLASSPATH variable if you don’t have.
                       -   Click New button, named it ‘CLASSPATH’
                       -   On the Variable value, paste again the copied path (C:\Program
                          Files\Java\jdk1.8.7_00\bin)
                       -   Add a semicolon at the end. (C:\Program Files\Java\jdk1.8.7_00\bin;)
                       -   Then go to the JRE bin folder
                       -   Copy the path


                                                                                                 Page | 35
   171   172   173   174   175   176   177   178   179   180   181