One of java/jsp Learning series _php Tutorials

Source: Internet
Author: User
First, preface

The JDK (Java development Kit) is the foundation of all Java applications, and it can be said that all Java applications are built on this. It is a set of APIs, or it can be said to be some Java Class. The latest version, which is now officially released, is JDK1.3. Considering I'm not familiar with Linux, and most of it is under the MS System, so here I'm using Win2000.

Second, download, install

Download address for Java official site: java.sun.com, the country is also everywhere.

Windows, run the. exe file directly, install to a directory, I use F:JDK13 as an example here.

Third, the configuration

Select My Computer on the desktop (right-click)

Senior

Environment variables

In the system variables---> New

Enter in the variable name: CLASSPATH, enter the value of the variable:

F:jdk13libdt.jar; F:jdk13libtools. JAR; F:jdk13bin; then determine;

OK, the environment variable will be valid after you restart the computer after the configuration is finished.

Iv. Testing

(1) Write a simple Java program with a text editor:

public class HelloWorld {

public static void Main (String args[]) {

System.out.println (' Hello world! ');

}

}

This example is known as "Hello World", and its function is to display "Hello World".

Note: The file name must be "Helloworld.java" and case sensitive. A careful friend will notice the same name as the public class.

(2) Compile: Execute at DOS command prompt: (note case)

Javac Helloworld.java

If normal, the Helloworld.class file is generated.

(3) Run: Execute at DOS command prompt: (note case)

Java HelloWorld

Here is a Java beginner is likely to encounter problems (not afraid of jokes, I also) is input:

Java Helloworld.class

After the. class, be sure to note that the following error will occur:

Exception in thread ' main ' Java.lang.noclassdeffounderror:helloworld/class

(I guess, is not the Java translation ".") "/", or other reasons that I do not know)

Well, running Java HelloWorld should show the great "Hello world".

In this step, you have successfully configured the JDK, you can start a long and painful (for like me, not before the Java friends, can use "pain" to describe, do not understand the concept, unfamiliar Java API ..., but, do not worry, I will be with you slowly to get started, slowly improve ... ...) Java process. (Source: viphot.com)

http://www.bkjia.com/PHPjc/313870.html www.bkjia.com true http://www.bkjia.com/PHPjc/313870.html techarticle First, the preface JDK (Java Development Kit) is the basis of all Java applications, it can be said that all Java applications are built on this. It is a set of APIs, it can be said that some ...

  • 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.