Java Programming Setup
Java Programming Setup
- Download the appropriate JDK installer for your Windows version (e.g.,
Windows x64 installer).
- Choose the default installation path or specify a custom one. Note down the
installation path for later use.
- Variable value: Enter the path to your JDK installation directory (e.g.,
`C:\Program Files\Java\jdk-17`).
4. Update PATH Environment Variable:
- In the "System variables" section, find the `Path` variable and click "Edit".
;%JAVA_HOME%\bin
- Both commands should display the version of Java installed (e.g., Java 17).
Installing Eclipse IDE
- Choose "Download Packages" and select "Eclipse IDE for Java Developers".
- Select "Eclipse IDE for Java Developers" and choose a suitable installation
directory.
3. Launch Eclipse:
- After installation, navigate to the Eclipse installation directory and find the
executable (e.g., `eclipse.exe`).
4. Configure Eclipse:
- Select "Standard VM", click "Next", and then browse to the JDK installation
directory (`C:\Program Files\Java\jdk-11`).
- Click "Finish" and ensure the added JDK is checked as the default.
- You should see the new Java project in the Package Explorer on the left.
- Enter a class name (e.g., `HelloWorld`) and check "public static void
main(String[] args)".
- Write a simple Java program (e.g., print "Hello, World!") inside the `main`
method.
- Right-click on the Java file -> `Run As` -> `Java Application`.
- Verify that the program runs and outputs correctly in the Console view.
This completes the installation and setup of Oracle JDK, environment variables,
and Eclipse IDE on Windows. You should now be ready to develop Java
applications using Eclipse IDE.