Java's three technology platforms: Javase, Java EE, javameJdk:java Development Kit, the core of the entire Java, including Java compilers, running tools, etc.Jre:java Runtime enviroment, Java operating environmentpath: Where to store Java's compilation and run toolsclasspath: Used to save the. class file path allowed by the Java Virtual machine, and also to enable the VM to find the required class fileWrite a One.java fileUsejavac command to compile: Javac One.java//generates One.class fileUsejava command to run: Java oneSome subdirectories of the JDKBin (binary): Storage of some executable program/application (. exe) DB: Small database include: Because the JDK is implemented using c,c++, some header files need to be introduced at startup. : Java Program Runtime Environment Lib (library): Java class library/library file, archive package file used by development tools
operating mode:1: Integrated software(Android Studio because it has a JDK, JRE, so write directly with this, run) Open Android Studio, open an existing projectFile--->new----> New Module--->java librayThe underlined part, change as you want.Library Name: Libclass Name: MyClassThe first line should be commented out! (I don't know the reason). However, the Java code is not commented out when it is written, the runtime will comment, because it will be a little different. Once you've written your code, you're ready to run.regenerate into a Java fileFile----> New---->java Class
Without a step-by-step full diagram, many operations are the same.
2: CommandRun-cmd-switch to the path where the target file is located-compile-runjavac command to compile: Javac Helloworld.java//generates One.class fileUsejava command to run: Java HelloWorld //This time only requires the class name to (at compile time, it can be any. java file, but, at run time, the Java command must be followed by a. class file that contains the main function. ) Beginner Java Soon, if there are errors please also point out, grateful.
Running Java programs