Configuring JDK / Java
1 environment variable
PATH ---- External Command Search Path;
ClassPath ---- Class Resource Location Search Path;
1.1 Setting method 1
"Start" -> "Settings" -> "Control Panel" -> System -> "Advanced" -> Environment Variables "->" New ", join two in the pop-up dialog box New environment variable:
Variable name variable value path.; C: /jdk1.3/bin classpath.; C: /jdk1.3/lib/tools.jar; c: /jdk1.3/lib/dt.jar
Note: Size of words (path, classpath, etc.) cannot be wrong, the same. The "c: /jdk1.3" is the actual installation path of JDK; the PATH environment variable is generally existing, so it is only necessary to edit this variable, and it is attached to the original variable value. The front (prevents the impact of other JREs, such as JRE in Oracle).
1.2 Setting method 2
Write the following batch.
echo off
Rem Set JDK Running Environment
SET PATH = D: / java / jdk / bin;% PATH%
Set classpath = .; d: /j2sdk/lib/tools.jar; d: /apache/tomcat5/common/lib/servet-api.jar;
Note: The file named above is jdk.bat, and stored in the appropriate directory, each time switching to the DOS prompt state, perform this batch, set the environment variable. The D: / Java / JDK is the actual installation path of JDK.
2 Modify the registry (JDK1.3 Chinese issue):
Setting method: "Start" -> "Run" -> Enter "regedit" and then Enter -> "HKEY_LOCAL_MACHINE" -> "Software" -> "JavaSoft" -> "Java Operation Environment", single The mouse is right-click "Rename" as "Java Runtime Environment"
3 Start the command line function:
3.1 Method 1
"Start" -> "Run" -> Enter "CMD" and then enter!
3.2 Method 2
"Start" -> "Program" -> "Attachment" -> Command Line Tips;
3.3 Method 3
Change the last step of method 2 to: Use a mouse left mouse button (do not release the left button) and drag it to the desktop or a few small icons in the upper left corner of the desktop, loosen left mouse button.
Note: If you set the environment variable with the setting method 2, don't forget to perform the above method 1 or method 2 or method 3, execute JDK.bat.
4 About command line compilation and running function:
In command line mode, the corresponding executable (Javax.exe, Java.exe et al) can be located in the location declared in the environment variable Path, but run the other type files you want to use .java, .class file The path must be indicated under the current path or in prior to the file name.
For example: When HelloWorld.java file is saved in the path: C: When the disk's EX subdirectory is used, it can be compiled with the following command:
C: / EX / JAVAC HelloWorld.java (recommended usa) or
C: / javac ex / helloWorld.java or
D: / javac c: /ex/helloworld.java
Running is similar to compilation, but the file name is not suffix, such as: C: / EX / JAVA HelloWorld5 Display File Extension
Setting: "My Computer" or "Explorer" window -> "Tool" -> Folder Item -> "View" -> Extension "Hide known file type" project Placed in an unselected state;
6 text editor
Notepade, UltraEdit, Kawa;