日期:2014-05-20  浏览次数:20864 次

怎样在linux下编写JAVA?
初接触linux编程,不太懂如何在linux下配置JDK的环境变量?在终端要用什么命令编译JAVA?请前辈们给指点下啊!谢谢!!!

------解决方案--------------------
1, $cd ~
2, $cat > > .bash_profile
3, > export PATH=$PATH:/usr/bin (obviously, this is unnecessary for most linux platform)
> Ctrl+D
4, reconnect to the system if you perform the third step,
5, create a .java file with vi or something, saying it is Test.java
6, $javac Test.java (this would create java executable Test.class)
7, $java Test (here we go)

(currently, i do not have any chinese input method installed
so, excuse my inputting english)