1. About the configuration of Java environment variables
Installing the JDK, such as the directory in C:\\Java
In order to facilitate the development of java programs, you need to configure the environment. Variable, right click on My Computer -> Properties -> Advanced -> Environment Variables -> User Variables Click [New (N)] to add the following environment variables
(assuming your JDK installation The path is C:\\Java\\jdk1.6.0_30)
JAVA_HOME C:\\Java\\jdk1.6.0_30
PATH C:\\Java\\jdk1.6.0_30\\bin
CLASSPATH .;%JAVA_HOME%\\lib\\dt.jar;%JAVA_HOME%\\lib\\tools.jar; (Note that the preceding dot and semicolon must not be lost, there is also the middle, the back of the semicolon should not be lost ))
Description: CLASSPATH can add some third-party jar files, which is convenient for manually compiling and running programs.
After you have created each one, you can test it.
Description: If the computer just uses the above variables, it is recommended to set it as a user variable.
A simple test program can be written by means of Notepad and other tools, saved in d:\\, the code is as follows:
?public class Test { public static void main(String[] args) { System.out.println("Hello java!"); } }
Description: When saving, pay attention to the same file name and class name and file suffix name (.java)< Br>
Run cmd, enter the DOS interface, run java -version, if the above environment is configured correctly, the current JDK version information should be displayed. (You can run this command in any directory)
Run javac d:\\Test.java, and press Enter to compile the generated file Test.class in the same directory,
Run d: Enter D disk root directory,
Run java Text, enter the output Hello java!
Excerpt from ymmt
2. Environment variable definition
Environment variable is An object with a specific name that contains information that will be used by one or more applications. For example, path, when the system is required to run a program without telling the full path of the program, the system should look for the program in addition to the path specified in the path. Users can run processes better by setting environment variables.
3. View, modify
First of all, it is clear that all changes to environment variables in the cmd command line are only valid for the current window. , not a permanent modification. This means that when this cmd command line window is closed, it will no longer work. There are two ways to permanently modify environment variables: one is to modify the registry directly, and the other is to set the system environment variable through My Computer -> Properties -> Advanced.
Display, set, or delete the cmd.exe environment variable.
SET [variable=[string]]
variable Specifies the name of the environment variable. String Specifies a series of strings to assign to variables.
To display the current environment variable, type SET without parameters.
1. View all available environment variables: enter set to view.
2, view an environment variable: enter “set variable name & rdquo; can, for example, want to view the value of the path variable, that is, enter set path
4 .Windows and linux difference
First, view the names and values of all environment variables: Linux: exportWindows: set two, check the value of the environment variable according to the name: Linux: echo $ environment variable name such as: echo $ORACLE_HOMEWindows Bottom: set environment variable name
Objective: In the Windows environment, use the netstat command to check whether a port numbe
How can I solve the problem that QQ mailbox cant receive email? I believe that many users have encou
Recently, many netizens reflected deep perfect GHOST XP SP3 pure standard version V2011.05, the hard
Author: Mayon on the current situation of view, Windows XP system is still on Win7 and Win
How to avoid the situation of pirated Microsoft system black screen
Specific ways to keep your computer running at low energy
How to install and set up SVN server on windows
How to restore the u disk capacity?
YunOS5.0 updated what Alibaba Cloud os December 10 release live broadcast
Troubleshoot the "Disk Boot Failure" when booting up.
Two computer maintenance corners that are easily overlooked
Want to know the IP address? Two ways to help you quickly
Teach you how to detect ARP virus in your computer
Computer disk partitioning needs to pay attention to the problem
How does Win10 merge disk partitions? Win10 system computer hard disk partition merge method
Win8 version of Skype v2.5 download: import contacts contact
What is the situation, my brothers, now only PE can enter.
Optimized XP system for playing games
Win8 will no longer support DVD playback with a focus on network media
How to use the SkyDrive network disk in Win8.1?
Win10 comes with DX12? Win10 comes with Directx version?
Win8 popularity is not as fast as "failure" Vista