• Thursday, September 4, 2014

    1. Install and Setup Java Environment on Windows, Linux

    Basic step for installing and setting up environment.

    1. Download Latest Version of Java From Here: JAvA WEBSITE.
    2. Install the Java.
    3. Setting up Environment Variables:

      For Windows XP
      • Right Click on My Computer and then select properties.
      • Click on Environment Variable under the tab "Advance".
      • Now modify the path variable.
        Example: If it contains any value leave it and at very last add the following:
        ;C:\Program Files\Java\JDK\
        where after ";" is JDK Path where you install Java.

    4. For Windows 7 or Windows 8
      • Right Click on My Computer and then select properties.
      • Select Advanced System Setting under the Advanced Tab.
      • Follow the same thing as described for XP.

      For Linux, Unix or FreeBSD
      • Run your bash or shell program.
      • Write: export PATH=/path/to/java:$PATH
    5. Almost Done.
    6. For writing java program you can use Notepad or Notepad++.
    7. Write your first java program in any text editor and save it with anyname with suffix(extension) ".java"
    8. Open command prompt(in Windows) or shell/bash(in Linux).
    9. Move to your file location by using cd.
      Example: If you save your file in C:\test\myfile.java then you write cd c:\test
    10. Write javac YourFileName.java
    11. If there is no syntax error in your java program then its returns nothing.
    12. Write java YourClassName

    Syed Masoom Rizvi

    Author & Editor

    Hi, This is Syed Masoom Rizvi, who is continue exploring the world of programming ,programming and programming... :)


    Post a Comment