In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge about how to install JavaSE Jdk. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
1. Commonly used dos commands
Dir lists all the file names under the current directory
Cd path switches the path, which can be relative to the path or absolute
Relative path, only relative to the files in the current directory
Absolute path, which is the path address starting from the drive letter
Note: if you switch to the absolute path, and the absolute path is not under the drive letter of the current file, you need to switch to another disk manually. For example, if you change from a directory under disk C to a directory on disk D, you need to change the drive letter manually. As for whether to switch the absolute path first and then the drive letter, or switch the drive letter first, there is no limit in switching the absolute path, and all can take effect.
Cd.. Return to the previous directory
Cd\ returns the root directory under the current directory
Drive letter name: you can switch the drive letter directly
Cls screen cleaning
Tab auto-completion command, please note that under window10, you need to go to CompletionChar in HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Command Processor\ CompletionChar under the registry, change the value to 9, and select decimal to take effect.
Find used commands up and down the direction, valid in the current window
Exit exits the console (cmd)
II. Key versions of jdk
Jdk1.2, this is a revolutionary version, specifically divides the java direction into J2SE J2EE J2ME J2EE is mainly the basic syntax, J2EE is the enterprise version of Java, mainly WEB direction, and J2EE is the handheld development version of Java, which has been eliminated.
This version of jdk5 jumps directly from jdk1.4 to jdk5, so after jdk1.5.0, it is called jdk5 6 7 8 and so on.
New feature: automatic unpacking Foreach (enhanced for loop) static import variable parameter Var Args enumeration output generic ProcessBuilder introspective thread concurrency library (JUC) monitoring and management of virtual machine metadata
This version of jdk7 is the mainstream version in the current market.
New feature: switch can use string generic instantiation types to automatically infer custom auto-close classes to enhance support for Java collections (Collections) numbers can be underlined to support binary text in try catch exception capture, a catch can write multiple exception classes separated by "|"
This version of jdk8 is the mainstream version on the market.
New feature Lambda expression: allows function as a parameter of a method reference to method default method New tool Stream API Date Time API Optional class (can resolve null pointer exception) Nashorn, JavaScript engine
III. Installation of jdk
1. First go to the official website to download the version of jdk you need according to your system and requirements. Let's take jdk1.8.0 as an example.
two。 The installation steps are as follows:
Click next first.
Click change again (it is not recommended to install on disk C, it may not run because of permissions), and the change address can be your custom address.
The jre installation window pops up again, and it is recommended that you install to the parent directory of the address you just defined, which is at the same level as the jdk installation directory.
Installation completed
Configure environment variables (windows10 environment)
In the windows environment, find the right mouse button click property of this computer
Find advanced system settings, find environment variables
To find the system variable, add a Home_Java variable with the value of jdk's installation path (that is, the first address you just installed)
Find the Path variable, double-click it, and add a new address,% Java_Home%\ bin.
When you are finished, click OK
Window+R calls up the running window, enter cmd, pop up a black window, enter Java-vsersion, if prompted for the version number, it runs successfully, if the prompt is not an internal or external command, nor is it a runnable program or batch file, please check the environment variables.
4. How to print the first hello world
Environment: windows10
1. Check whether your computer has a file suffix, such as the new text .txt. Txt is the suffix. If you don't click on the one above, check the file extension.
two。 Download a coding notepad, you can use Notepad++, please set the encoding format to ASNI code
3. To start coding, please save the file format as xx.java.
/ / Public class name (the class name needs to be the same as the file name And each first letter of the word of the class name needs to be capitalized) public class HelloWorld005 {/ / the beginning of the class body / / each pair of {} requires tab indentation / / the public static main method without return value type (method name main) ()-> the parameter passed in by the method public static void main (String [] args) {/ / the start / / system of the method body The output of the printed ()-> printed content "" double quotation marks The output remains intact. If you need to output numbers, you can print System.out.println directly ("hello world005 output numbers!"). } / / end of method body} / / end of class body
4. Open the command line and navigate to the address where you just wrote the file (source code).
5. Enter the command javac xx.java, and a xx.class file is generated in the current directory.
6. Enter the command java xx to execute the command.
These are all the contents of the article "how to install JavaSE Jdk". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.