About this Article
The Java Development Kit (JDK) is an implementation of either one of the Java SE, Java EE or Java ME platforms released by Oracle Corporation in the form of a binary product aimed at Java developers on Solaris, Linux, Mac OS X or Windows. Since the introduction of the Java platform, it has been by far the most widely used Software Development Kit (SDK). On 17 November 2006, Sun announced that it would be released under the GNU General Public License (GPL), thus making it free software. This happened in large part on 8 May 2007, when Sun contributed the source code to the OpenJDK。
Oracle Corporation has released the jdk8 which is well compatible with arm Linux. And we can download the package from here https://jdk8.java.net/download.html
Or we can use the shell command directly.
$wget http://www.java.net/download/jdk8/archive/b112/binaries/jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz
We have to be patient for a while.
After you download the file, extract it into any directory.
$mkdir /parker $tar zxvf jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz -C /parker
Enter the bin direcory and test the command.
$cd /parker/jdk1.8.0/bin $./java
The jdk works very well when you see the results like this.
If we want the java command can work in anywhere.
We can set the environment variables in three file.
(1)/etc/environment: The first file that the operating system uses at login time is the /etc/environment file.It set all system environment. (2)/etc/profile: The second file that the operating system uses at login time is the /etc/profile file.It set all user environment. (3)~/.bashrc: It apply to the current user.
Here I set the /etc/profile. Open the /etc/profile file and add the variable at last part.
$vi /etc/profile PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin" export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib export JAVA_HOME=/parker/jdk.1.8.0 //(Set your own path)
Then save the file and bring into force it.
:wq $source /etc/profile
When we have wrote a java file,we can use javac to Compile it.
And then use java to run it.