Installation environment:
Ubuntu 13.10 32bit
Installation preparation:
Jdk-7u17-linux-i586.tar.gz ()
Installation steps:
After the file is downloaded, place it in ~ Folder
Open Terminal
Mkdir Development
Tar-zxvf jdk-7u17-linux-i586.tar.gz-C Development
Sudo MV development/usr/local
Cd ~
Vim development. Sh
Enter the followingCodeAnd save:
Export java_home =/usr/local/development/jdk1.7.0 _ 17
Export jre_home = $ java_home/JRE
Export classpath =.: $ java_home/lib: $ jre_home/lib: $ classpath
Export Path = $ java_home/bin: $ jre_home/bin: $ path
Sudo MV development. sh/etc/profile. d
Restart the computer
Verify whether the installation is successful:
Open Terminal
Javac
The following code indicates that the installation is successful:
Usage: javac <Options> <source files>. Possible options include:-g to generate all debugging information-G: none to generate no debugging information-G: {lines, vars, source} only generate some debugging information.-nowarn does not generate any warning.-verbose outputs the message about the operation being executed by the compiler.-deprecation outputs the source location of an outdated API.-classpath <path> specify user-class file search and comment Processing Program Location-CP <path> specifies the location of the user class file and comment Handler-sourcepath <path> specifies the location of the Input Source file-bootclasspath <path> overwrites the location of the boot class file -extdirs <directory> overwrite the location of the installed extension-endorseddirs <directory> overwrite the location of the standard path of the signature-Proc: {none, only} controls whether to perform annotation processing and/or compilation. -Processor <class1> [, <class2>, <class3>...] name of the annotation handler to run; attackers can bypass the default search process-processorpath <path> to specify the location of the comment Handler-D <directory> to specify the location of the generated class file-S <directory> to specify the source file to be placed location-implicit: {none, class} specifies whether to generate class files for implicit reference files-encoding <encoding> specifies the character encoding used by the source file-source <release version> provides source compatibility with the specified release version-target <release version> Generate a class file of a specific VM version-version Version Information-help outputs the abstract of the standard option-a keyword [= value] to the option passed to the annotation Handler-x outputs the non-standard option feed-j <mark> directly pass <mark> to runtime system-When werror is warned, terminate compilation @ <File Name> read from file option and file name