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

解决方案 »

  1.   

    建议在Windows下编,编完后传到Linux下~~~~~~~
      

  2.   

    嗯,同意楼上的,。
    在Windows上写吧,要不在Linux上搞个Eclipse。
      

  3.   

    Linux下如果要配置JDK的环境变量方法简单,只是具体方法不同,楼主首先对Linux了解吗?
      

  4.   

    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)
      

  5.   

    export PATH=<java install dir>/bin:$PATH
    export CLASSPATH=.:<java install dir>/jre/lib/rt.jar:$CLASSPATH