Sunday, September 16
Today, I am determined to study Linux + Java. On the one hand, it is the needs of the SE course, and on the other hand, it is the future needs.
To run a Java program, you must first configure the Java Runtime Environment JRE, then install the JDK necessary for compiling the Java program, and finally install the IDE.
1. Install JRE:
Open terminal Input
Sudo apt-Get install sun-java6-jre
The installation is a system prompt:
The following software packages cannot pass Verification
Sun-java6-jre
Are these software packages installed without verification? [Y/n] y
Use Java-version to view the JRE version:
Java version "1.6.0 _ 03"
Java (TM) se Runtime Environment (build 1.6.0 _ 03-b05)
Java hotspot (TM) Client VM (build 1.6.0 _ 03-b05, mixed mode, sharing)
This indicates that jre1.6 has been installed successfully.
Ii. Install JDK:
$ Sudo apt-Get install sun-java6-jdk
Environment variables are configured after installation.
Sudo gedit/etc/environment
Add the following two lines:
Classpath =.:/usr/lib/JVM/Java-6-sun/lib
Java_home =/usr/lib/JVM/Java-6-sun
$ Sudo gedit/etc/JVM
Convert
/Usr/lib/JVM/Java-6-sun
Enter this line at the top of the configuration block.
Iii. Install netbeans
$ Sudo apt-Get install netbeans5.5 netbeans5.5-platform-ZH
Just think that netbeans is more comfortable to use, eclipse can also
Finally, install the browser's Java Plugin
Sudo apt-Get install sun-java6-plugin