2.1 Installing the Java Development Toolbox 1.Java terminology
- Jdk-java development Kit software used by programmers writing Java programs
- Jre-java runtime environment software used by users running Java programs
- Update-The update is called when some minor version changes have been made to address some of the urgent issues.
- JDK (contains compiler) > JRE > JVM
- Java Se-java Standard Edition, Java Platform for desktop or simple server applications
- Java Ee-java Enterprise Edition, Java Platform for negative and complex server applications
2. Installing the JDK
- In Windows, it is strongly not recommended to install the JDK in a directory path to spaces, such as program Files
2. Set the execution path (path)
- The so-called execution path refers to the directory list where the operating system searches the local executable file.
- Unix (Linux) Setup method: Add at the end of the ~/.BASHRC or ~/.bash_profile file: Export path=jdk/bin: $Path
- Under Windows, log on as an administrator, right-click Computer Properties, advanced system settings, environment variables, system variable-->path variable, set Jdk\bin to the front of the variable, and isolate it with a semicolon and subsequent variable values
- In the shell, use the command javac-version to verify that the JDK is installed successfully
3. Installation library source files (src.zip) and documentation (JDK-VERSION-APIDOCS.ZIP)
1) Install the JDK and set the execution path 2) Open the Shell window 3) Enter the JDK directory (CD c:\jdk1.7.0) 4) Create a subdirectory src mkdir src CD SRC 5) performs the decompression command: Jar XVF. \src.zip
1) Install the JDK and set the execution path 2) Download the document ZIP file http://www.oracle.com/technetwork/java/javase/downloads and place it in the JDK Directory 3) Open the Shell window Port 4) into the JDK directory 5) Perform the decompression command JAR-XVF jdk-version-apidocs.zip 4.jdk Directory Description 2.2 Select the development environment
2.3 Using command-line tools
1) The JAVAC program is a Java compiler, he compiles the file Welcome.java to Welcome.class 2) temporarily cancels the command of the CLASSPATH environment variable under Windows command: Set CLASSPATH = Linux under command: Export classpath=
Sent to JVM,JVM to execute the bytecode that the compiler placed in the class file.
2.4 Working with the integrated development environment 2.5 running a graphical application 2.6 creating and running applets
- Applet-java ability to run applets in a browser
Javac Welcomeapplet.java//Compiling applet code appletviewer welcomeapplet.html//applet Viewer
2nd Chapter Java Programming Environment