installation, configuration, and operation of the Java runtime environment

Source: Internet
Author: User

(i) Download and installation of the SDK

1. Download SDK

In order to build an SDK-based Java Runtime Environment, you need to download Sun's free SDK package first. The SDK contains a complete set of development tools, including the Java compiler, Applet Viewer, and Java interpreter that are most useful for programming.

2. Installing the SDK

Run the download "J2sdk-1_6_x_-windows-i586.exe" package, you can install the SDK, during the installation process can set the installation path and select components, the default component selection is all installed.

3. Main folders and files in the SDK

After the installation is successful, the Bin folder contains executables such as the compiler (Javac.exe), Interpreter (Javac.exe), Applet Viewer (Appletviewer.exe), and so on, in the installation directory

(ii) Setting environment variables

The tools in the SDK are command-line tools that need to be run from the command line, which is the MS-DOS prompt. Many people may not get used to it, but this is a deliberate strategy by sun to devote more effort to the Java language itself rather than to the development tools.

In order to use the SDK correctly and conveniently, you can manually configure some Windows environment variables. The following is an example of Windows XP to illustrate the configuration.

1. Setting environment variables

¨ Right-click on the desktop "My Computer" icon and select the "Properties" menu, the System Properties Settings screen will appear:

¨ Click the Environment Variables button in the Advanced tab. The Environment variables setting interface appears

¨ in System variables, set 3 properties, Java_home,path,classpath (both sizes are available). Click "Edit" if it is already present and click "New" if it does not exist.

¨java_home indicates the JDK installation path, which is D:\ jdk1.4 the path selected at the time of installation, including folders such as LIB,BIN,JRE (this variable is best set, since running Tomcat,eclipse in the future depends on this variable).

¨ Select Path in the System variables box, and then click the Edit button, in the Edit System Variable dialog box that appears, set to:%java_home%\bin; %java_home%\jre\bin:

¨ Sets the environment variable "classpath" in the same way, with a value of.; %java_home%\lib\dt.jar; %java_home%\lib\tools.jar. (“.” Represents the current path)

After the ¨ setup is complete, click "Start" → "All Programs" → "Accessories" → "command Prompt" to open the DOS window, enter "Java" or "Javac" at the command prompt, after carriage return, if the usage parameter prompt information appears, install the correct

installation, configuration, and operation of the Java runtime environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.