怎样调用自己编写的java类?
比如我自己的jdk安装在C:\jdk1.3下,而我编写的java类在D:\corejava\下面! 问题点数:30、回复次数:4Top
1 楼Jacky1206(胖胖,其实我不胖)回复于 2001-11-15 15:32:05 得分 10
把你写的类用包装好,然后设置classpath,在你写的程序开始import你要用的那个类,java编译器会找到的,谢谢。Top
2 楼minij2ee2000(minij2ee)回复于 2001-11-15 15:40:30 得分 10
java -classpath d:\corejava YourClass
欢迎光临Java,J2EE论坛( http://letsjava.yeah.net )。
http://www.minij2ee.com/
Top
3 楼anray(K歌之王)回复于 2001-11-15 15:53:54 得分 10
At first, confirm your jdk setting is allright.
If your OS is Win, add line "SET PATH=d:\corejava\;%PATH%" in the bottom of file "autoexec.bat"; and then reboot you machine to guarantee that you can run it normally in your every Dos window.
if your OS is Linux, add line "EXPORT CLASSPATH=$CLASSPATH:YOUR DIRECTORY" in the bottom of file "profile" in directory "/etc/"
Good luck!Top
4 楼hailong326(望尘莫及)回复于 2001-11-15 16:33:57 得分 0
guanzhu
Top




