This shows you the differences between two versions of the page.
tutorials:ct1:development:bulid_a_java_development_environment_for_cubietruck [2013/10/26 11:53] parker created |
tutorials:ct1:development:bulid_a_java_development_environment_for_cubietruck [2013/12/23 14:50] (current) |
||
---|---|---|---|
Line 20: | Line 20: | ||
Or we can use the shell command directly. | Or we can use the shell command directly. | ||
- | + | <code bash> | |
- | $wget http://www.java.net/download/jdk8/archive/b112/binaries/jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz | + | $wget http://www.java.net/download/jdk8/archive/b112/binaries/jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz |
+ | </code> | ||
We have to be patient for a while. | We have to be patient for a while. | ||
Line 28: | Line 28: | ||
After you download the file, extract it into any directory. | After you download the file, extract it into any directory. | ||
- | + | <code bash> | |
- | $mkdir /parker | + | $mkdir /parker |
- | $tar zxvf jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz /parker | + | $tar zxvf jdk-8-ea-b112-linux-arm-vfp-hflt-16_oct_2013.tar.gz -C /parker |
- | + | </code> | |
Enter the bin direcory and test the command. | Enter the bin direcory and test the command. | ||
- | + | <code bash> | |
- | $cd /parker/jdk1.8.0/bin | + | $cd /parker/jdk1.8.0/bin |
- | $./java | + | $./java |
- | | + | </code> |
The jdk works very well when you see the results like this. | The jdk works very well when you see the results like this. | ||
| | ||
Line 55: | Line 55: | ||
Here I set the /etc/profile. | Here I set the /etc/profile. | ||
Open the /etc/profile file and add the variable at last part. | Open the /etc/profile file and add the variable at last part. | ||
- | + | <code bash> | |
- | $vi /etc/profile | + | $vi /etc/profile |
- | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin" | + | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin" |
- | export CLASSPATH=.:$JA VA_HOME/lib:$JAVA_HOME/jre/lib | + | export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib |
- | export JAVA_HOME=/parker/jdk.1.8.0(Set your own path) | + | export JAVA_HOME=/parker/jdk.1.8.0 //(Set your own path) |
- | | + | </code> |
{{:jdk4.png?|ct-cubieboard}} | {{:jdk4.png?|ct-cubieboard}} | ||
| | ||
Then save the file and bring into force it. | Then save the file and bring into force it. | ||
- | :wq | + | <code bash> |
- | $source /etc/profile | + | :wq |
- | | + | $source /etc/profile |
+ | </code> | ||
{{:jdk5.png?|ct-cubieboard}} | {{:jdk5.png?|ct-cubieboard}} | ||
+ | |||
===== Use SDK ===== | ===== Use SDK ===== | ||
+ | When we have wrote a java file,we can use javac to Compile it. | ||
+ | |||
+ | And then use java to run it. | ||
+ | |||
+ | Here,I run the tetris for test. | ||
+ | {{:qwer.png?|ct-cubieboard}} | ||