当前位置: 技术问答>java相关
linux下怎么编译java源程序?
来源: 互联网 发布时间:2014-12-22
本文导语: 我建立了一个jdk目录,解压缩了jdk1.2.2 from linux。怎么调试自己写的java源程序?XXX | 设置环境变量 JAVA_HOME=/xx/xx/jdk1.2.2/ export JAVA_HOME PATH=$PATH:/xx/xx/jdk1.2.2/bin/ export PATH 然后就可以使用 javac ...
我建立了一个jdk目录,解压缩了jdk1.2.2 from linux。怎么调试自己写的java源程序?XXX
|
设置环境变量
JAVA_HOME=/xx/xx/jdk1.2.2/
export JAVA_HOME
PATH=$PATH:/xx/xx/jdk1.2.2/bin/
export PATH
然后就可以使用
javac xxxx.java
java xxxx.class
JAVA_HOME=/xx/xx/jdk1.2.2/
export JAVA_HOME
PATH=$PATH:/xx/xx/jdk1.2.2/bin/
export PATH
然后就可以使用
javac xxxx.java
java xxxx.class
|
You must extract the jdk to one folder,like /usr/local/jdk
vi your /etc/profile
add these lines:
export JAVA_HOME=/usr/local/jdk
export CLASSPATH=$CLASSPATH:/home/java
export PATH=$JAVA_HOME/bin:$PATH
login again.
you can try java -version to test it.
vi your /etc/profile
add these lines:
export JAVA_HOME=/usr/local/jdk
export CLASSPATH=$CLASSPATH:/home/java
export PATH=$JAVA_HOME/bin:$PATH
login again.
you can try java -version to test it.
|
jdk bin下的javac和java啊
|
"jdb"java的调试程序.具体用法得找手册.
我也正在学习java
我也正在学习java