java
Download the target JDK installer from Oracle From April 19, 2019, I needed something like an account to download. It's annoying, once you've created a profile, you have to wait for 18 months to delete your personal information without touching it, or you have to request deletion from the inquiry form yourself, which is annoying.
Specify environment variables after installation I have to tell you that this kind of (program related) is installed on the system of the PC, do it (then is this really an installation?)
Edit from "Edit system environment variables" in the search. (Control Panel-> System-> Advanced system settings)
System environment variables Variable name JAVA_HOME Value C: \ ~~ \ Java \ jdk1.8.0_261
To the value of the variable name "Path" %JAVA_HOME%\bin Add
For the time being, this is a classic Hello_World You should be able to do it, with notepad or something
Hallo_World.java
public class Hallo_World{
public static void main(String[] args){
System.out.println("Hello World");
}
}
Save, On the command prompt
D:\download\University\java>javac Hallo_World.java
D:\download\University\java>java Hallo_World
Hello World
D:\download\University\java>
Now you can use Java.
Because it is troublesome to specify the jar file at compile time and execution time If you set CLASSPATH, you don't have to write it one by one. It seems that this can be a user environment variable. (Well, I'm the only one who uses this computer, so it doesn't matter)
User environment variables
Variable name | → | CLASSPATH |
---|---|---|
Variable value | → | .;C:\OpenCV\opencv\build\java\opencv-440.jar |
When setting for the first time, don't forget the variable value ".;" I don't know if it is necessary in an integrated development environment, just when executing it from the command line.
Recommended Posts