服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

配置开发环境(jdk1.5+tomcat5.5.4+eclipse3.1)时碰到的3个问


  我在配置开发环境(jdk1.5+tomcat5.5.4+eclipse3.1)时碰到的3个问

1、问题:用打开带java小程序的页面,在java小程序的地方显示一灰色区块,
当鼠标移动到该区块时,状态栏提示:
load:class xxxxx not found

解答:参考http://www.cryer.co.uk/brian/java/help_classnotfound.htm

2、问题:在eclipse中执行,报could not find the main class.program will exit.
console窗口:
java.lang.exceptionininitializererror
caused by: org.apache.commons.logging.logconfigurationexception: org.apache.commons.logging.logconfigurationexception: java.lang.nullpointerexception (caused by java.lang.nullpointerexception) (caused by org.apache.commons.logging.logconfigurationexception: java.lang.nullpointerexception (caused by java.lang.nullpointerexception))
at org.apache.commons.logging.impl.logfactoryimpl.newinstance(logfactoryimpl.java:543)
at org.apache.commons.logging.impl.logfactoryimpl.getinstance(logfactoryimpl.java:235)
at org.apache.commons.logging.impl.logfactoryimpl.getinstance(logfactoryimpl.java:209)
at org.apache.commons.logging.logfactory.getlog(logfactory.java:351)
at org.apache.catalina.startup.bootstrap.<clinit>(bootstrap.java:53)
caused by: org.apache.commons.logging.logconfigurationexception: java.lang.nullpointerexception (caused by java.lang.nullpointerexception)
at org.apache.commons.logging.impl.logfactoryimpl.getlogconstructor(logfactoryimpl.java:397)
at org.apache.commons.logging.impl.logfactoryimpl.newinstance(logfactoryimpl.java:529)
... 4 more
caused by: java.lang.nullpointerexception
at org.apache.commons.logging.impl.logfactoryimpl.getlogconstructor(logfactoryimpl.java:374)
... 5 more
exception in thread "main"

解答:
possible solution:
i edited the file "tomcat50x.server" under
c:/eclipse/plugins/com.objectlearn.jdt.j2ee_3.0.1/servers
and changed
-djava.endorsed.dirs="${serverrootdirectory}/bin;${serverrootdirectory}/common/endorsed"
to
-djava.endorsed.dirs="${serverrootdirectory}/common/endorsed"
in the following ´tags´:
<startvmparameters>-djava_home="${jrepath}" -dcatalina.base="${serverrootdirectory}" -dcatalina.home="${serverrootdirectory}" -djava.io.tmpdir="${serverrootdirectory}/temp" -djava.endorsed.dirs="${serverrootdirectory}/bin;${serverrootdirectory}/common/endorsed"</startvmparameters>
and
<stopvmparameters>-djava_home="${jrepath}" -dcatalina.base="${serverrootdirectory}" -dcatalina.home="${serverrootdirectory}" -djava.io.tmpdir="${serverrootdirectory}/temp" -djava.endorsed.dirs="${serverrootdirectory}/bin;${serverrootdirectory}/common/endorsed"</stopvmparameters>
this matches the value used in my catalina.bat file when lauched from the command prompt.

3、问题:修改.java ,重新编译生成.class后,ie刷新,但applet的内容还是旧的。

解答:刷新时按住ctrl键试试。

扫描关注微信公众号