Development environment
1. Using Java development, first of all to complete the installation of the Java Runtime Environment, the JVM is one of the biggest advantages of Java, is that it implements the Java once compiled multiple runs, about the JVM after further elaboration. Install the configuration JDK to complete the environment deployment prior to Java development.
JDK installation configuration under Windows Needless to say, here I will focus on the JDK installation under Linux.
JDK Download:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
JDK Installation:
wget--no-cookie--header "cookie:s_cc=true; Oraclelicense=accept-securebackup-cookie; s_nr=1407131063040; gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk8-downloads-2133151.html; s_sq=%5b%5bb%5d%5d "http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-i586.rpm
Tar package:
Decompression: tar-zxvf/software/jdk-7u55-linux-x64.tar.gz
Configuration:
# Vi/etc/profile
Export Java_home=/usr/java/default
Export java_bin= $JAVA _home/bin
Export path= $PATH: $JAVA _home/bin
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
Configuration effective: Source/etc/profile
2. Start the first Java program
To re-learn the full set of Java, I'll start by creating the first. java file.
Create a. java file--helloworld.java, create a Java class, note: The class name here needs to match the. java file name.
Compile the. java file, Javac Helloworld.java generate the. class file, the. class file that we compiled can be a byte-code file that can be recognized by the computer.
Run the. class file, Java Helloworld.class, and run the results.
3.java Basic Syntax
The first letter of the class name should be capitalized, if the class name contains several words, the first letter of each word should be capitalized
The first letter of the method name should be lowercase, and if there are several words in the method name, each word should be capitalized in the first word except the first word.
The source file name must remain the same as the class name, and the file name should be consistent with the class name when you save it. and case sensitive.
Go back to Java---Step 1