Topic: 帮忙看看错在哪 |
Print this page |
1.帮忙看看错在哪 | Copy to clipboard |
Posted by: lymhappy123 Posted on: 2008-11-19 20:39 源程序代码如下:,文件路径是F:\java1
运行后错误如下图 环境变量设置如下: classpath是 .;C:\jdk1.6.0_03\jre\lib\rt.jar; Path是 C:\jdk1.6.0_03\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem 未命名.gif (240.05k) |
2.Re:帮忙看看错在哪 [Re: lymhappy123] | Copy to clipboard |
Posted by: micsolaris Posted on: 2008-11-20 00:50 我这边测试过了没问题,但是 日 = String.valueOf(calendar.ger(Calendar.DAY_OF_MONTH)), 这里的get错了。 还有就是你用的jdk是1.6吧。那么path里应该是C:\Program Files\Java\jdk1.6.0\bin C:\jdk1.6.0_03\bin;里应该没有javac。建议重新设置了path后,重新编译后测试下。还有就是别用中文命名变量啦。 |
3.Re:帮忙看看错在哪 [Re: lymhappy123] | Copy to clipboard |
Posted by: lymhappy123 Posted on: 2008-11-20 13:22 先谢谢你了 ,不过 我把path设成C:\Program Files\Java\jdk1.6.0\bin 以后就'javac不是内部或者外部命令',也不是可运行的程序或批处理文件。 我看了一下,我的C:\jdk1.6.0_03\bin;里javac.exe··· |
4.Re:帮忙看看错在哪 [Re: lymhappy123] | Copy to clipboard |
Posted by: micsolaris Posted on: 2008-11-20 13:49 'javac不是内部或者外部命令'是因为你的JDK的路径根本不是C:\Program Files\Java\jdk1.6.0,如果默认的是C:\Program Files\Java\jdk1.6.0\bin 。但是如果自己当时选择了的话那应该是%JAVA_HOME%\bin |
5.Re:帮忙看看错在哪 [Re: lymhappy123] | Copy to clipboard |
Posted by: JiafanZhou Posted on: 2008-11-22 01:05 micsolaris wrote: Generally speaking, JDK could be installed anywhere. Hence it makes sense to set up the system environment JAVA_HOME. However, it is not the problem that caused your program to fail. You can do the following: - check your directory F:\java1, make sure that there are no existing classes or other unrelated java file. - recompile the code using another JDK. - using some IDE like eclipse for trouble shooting. Jiafan |
6.Re:帮忙看看错在哪 [Re: lymhappy123] | Copy to clipboard |
Posted by: lymhappy123 Posted on: 2008-11-23 12:54 谢谢 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |