One, the installation of the Java environment on Linux
wget HTTP://10.100.51.30:8080/SOFTWARE/JDK-7U71-LINUX-X64.RPMRPM-IVH jdk-7u71-linux-x64.rpm
Try java-v after installation.
If you have a version number that prints out the JDK, the installation succeeds
two installation of Maven on Linux
Ac= 'ls/opt/maven|WC-l 'if[[$AC-eq0]]; ThenCD/optwget-Q http://10.100.51.30:8080/software/apache-maven-3.3.3-bin.tar.gz tar-xf apache-maven-3.3.3-bin.tar.gz rm-rf maven MV A pache-maven-3.3.3 maven Rm-f apache-maven-3.3.3-bin.tar.gzAC=`grep/opt/maven/bin/etc/profile|WC-L 'EchoAc=$ACif[[$AC-eq0]]; Then EchoExport Maven_home=/opt/maven>>/etc/profileEchoExport path=\ $PATH:/opt/maven/bin>>/etc/profilefiSource/etc/ Profilefi
After installation, try Mvn-v if the print is unsuccessful. Try to close this connection, re-open a connection mvn-v, no, cd/opt, see if there is a maven directory.
Compilation of three simple Java projects on Linux
Upload the written *.java file to Linux. Use the SFTP tool, put *.java-"upload file, put-r com-" upload directory.
Then go to the Java file directory,
Compile command Javac Test.java
Execute the named Java test
The results are output to the screen or to the file directory.
Four Java projects that rely on other jar packages are compiled and executed
If the project is a MAVEN project. You can compile execution on Linux based on Maven. The pom.xml in Maven writes about the jar packages that the project relies on.
It will automatically download the required jar package to start compiling.
Under the Pom.xml directory
Maven compile to compile
Maven Test for execution
Linux compilation executes Java engineering