Java Basics Quiz

Source: Internet
Author: User

Why can 1,java run across platforms? Please outline the principle.

Since the code compiled by the Java program is not code that can be run directly by the hardware system, it is an "intermediate code"-bytecode. A different Java Virtual machine (JVM) is then installed on different hardware platforms, which are then "translated" by the JVM into code that the corresponding hardware platform can execute. So for Java programmers, there is no need to consider what the hardware platform is. So Java can be cross-platform.




If you are porting to UNIX with Windows, simply translate the Java file into a class file that is the UNIX JVM creates Macintosh and then run it with the JVM.

2, try installing and configuring the JDK, and give the steps to install and configure the JDK.
1. Open My Computer--Properties--advanced--environment variables

2. New system Variable Java_home

Variable name: java_home
Variable value: The directory of the JDK, such as D:/java

3. Select the environment variable named "Path" in "System variables"
Double-click the variable to add the absolute path of the bin directory in the JDK installation path to the value of the path variable, separating it with the semicolon of the half-width and the existing path.

Variable name: Path
Added variable value:%java_home%\bin;%java_home%\jre\bin;



3. What is the role of the environment variable path and java_home when configuring the JDK?


This is the Java environment configuration, the configuration is completed directly after the eclipse, it will automatically complete the configuration of the Java environment

Java Basics Quiz

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.