search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Home Backend Development Java JAVA Tutorial Manual Java development environment configuration

Java development environment configuration

Collection 231
Read 65522
update time 2016-09-11

In this chapter we will introduce how to build a Java development environment.


Window system installation java

Download JDK

First we need to download the java development tool kit JDK, download address: http://www.oracle.com/ technetwork/java/javase/downloads/, click the following download button:

java-download.jpg

In the download page, you need to choose to accept the license and select the corresponding version according to your system, this article Take the Window 64-bit system as an example:

java-download-1.jpg

##After downloading, install the JDK according to the prompts. When installing the JDK, the JRE will also be installed. Just install it together.

Install JDK. During the installation process, you can customize the installation directory and other information. For example, we choose the installation directory as

C:\Program Files (x86)\Java\jdk1.8.0_91.

Configure environment variables

1. After the installation is complete, right-click "My Computer", click "Properties", and select "Advanced System Settings";

win-java1.png

2. Select the "Advanced" tab and click "Environment Variables";

java-win2.png

Then the screen as shown below will appear:

java-win3.pngSet 3 properties in "System Variables", JAVA_HOME, PATH, CLASSPATH (case does not matter). If it already exists, click "Edit", if it does not exist, click "New".

The variable setting parameters are as follows:

  • Variable name:

    JAVA_HOME

  • Variable value:

    C:\Program Files (x86)\Java\jdk1.8.0_91 // Configure according to your actual path

    ##Variable name:
  • CLASSPATH

  • Variable value:
  • .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

    / /Remember there is a "." in front

    Variable name:
  • Path

  • Variable value :
  • %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

  • JAVA_HOME Settings

java-win4.png

PATH Settings

java-win6.png

java-win7.png

CLASSPATH Settings

java-win8.png

This is for Java Environment configuration. After the configuration is completed, you can start Eclipse to write code, and it will automatically complete the configuration of the java environment.

Note: If you use JDK version 1.5 or above, you can compile and run Java programs normally without setting the CLASSPATH environment variable.

Test whether the JDK is installed successfully

1. "Start"->"Run", type "cmd";

2. Type the command: java -version, java, javac Several commands, the following information appears, indicating that the environment variable configuration is successful;

java-win9.png


##Linux, UNIX, Solaris, FreeBSD environment variable settings

The environment variable PATH should be set to point to the location where the Java binaries are installed. If you have trouble setting up, please refer to the shell documentation.

For example, assuming you are using bash as your shell, you can add the following to the end of your .bashrc file: export PATH=/path/to/java:$PATH


popularJAVADevelopmentTools

As the saying goes, if you want to do your job well, you must first sharpen your tools. We also need good development tools in the process of developing the Java language. There are many IDEs on the market. This article is for everyone. The following java development tools are recommended:

  • Eclipse (recommended):Another free and open source java IDE, download address: http://www.eclipse .org/

    Select

    Eclipse IDE for Java Developers:
    5A92DEAE-EFB9-493D-AC4D-808E529B533C.jpg

  • ##Notepad++ :

    Notepad++ is a free code editor under the Microsoft Windows environment. Download address: http://notepad-plus-plus.org/

  • Netbeans:

    Open source free java IDE, download address: http://www.netbeans.org/

Use Eclipse to run the first Java program

The video demonstration is as follows:

HelloWorld.java file code:

public class HelloWorld {
    public static void main(String []args) {
       System.out.println("Hello World");
    }
}

Hot AI Tools
Undress AI Tool
Undress AI Tool

Undress images for free

AI Clothes Remover
AI Clothes Remover

Online AI tool for removing clothes from photos.

Undresser.AI Undress
Undresser.AI Undress

AI-powered app for creating realistic nude photos

ArtGPT
ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT
Stock Market GPT

AI powered investment research for smarter decisions

Popular tool
Notepad++7.3.1
Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version
SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1
Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6
Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version
SublimeText3 Mac version

God-level code editing software (SublimeText3)