windows linux jdk安装配置方法
程序员文章站
2022-06-13 19:07:08
windows 下个jdk包,安装, java_home=c:\java path=c:\java\bin classpath=.;%java_home%\lib\dt.j...
windows
下个jdk包,安装,
java_home=c:\java
path=c:\java\bin
classpath=.;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
linux
wget 192.168.1.101/jdk-6u11-linux-i586.bin
mv jdk-6u11-linux-i586.bin /usr/local/src/
cd /usr/local/src/
./jdk-6u11-linux-i586.bin
mkdir ../java
mv jdk1.6.0_11/* ../java/
vim /home/myz/.bashrc
export java_home=/usr/local/java
export path=$java_home/bin:$path
export classpath=.:$java_home/lib/dt.jar:$java_home/lib/tools.jar
test
// helloworld.java
import java.util.*;
public class helloworld{
public static void main(string[] args){
system.out.println("hello world");
system.out.println(new date());
}
}
javac helloworld.java
java helloworld
下个jdk包,安装,
java_home=c:\java
path=c:\java\bin
classpath=.;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
linux
wget 192.168.1.101/jdk-6u11-linux-i586.bin
mv jdk-6u11-linux-i586.bin /usr/local/src/
cd /usr/local/src/
./jdk-6u11-linux-i586.bin
mkdir ../java
mv jdk1.6.0_11/* ../java/
vim /home/myz/.bashrc
export java_home=/usr/local/java
export path=$java_home/bin:$path
export classpath=.:$java_home/lib/dt.jar:$java_home/lib/tools.jar
test
// helloworld.java
import java.util.*;
public class helloworld{
public static void main(string[] args){
system.out.println("hello world");
system.out.println(new date());
}
}
javac helloworld.java
java helloworld
上一篇: windows2003 apache配置虚拟主机和绑定域名服务
下一篇: 使用svn进行版本控制