站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题我在配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问

我在配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问

摘要: 我在配置开发环境(JDK1.5+Tomcat5.5.4+Eclipse3.1)时碰到的3个问
<table width="100%" height="92%" border="0" cellpadding="6" cellspacing="0"> <tr> <td height="623" align="left" valign="top" class="content"> 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.(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:eclipsepluginscom.objectlearn.jdt.j2ee_3.0.1servers
and changed
-Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"
to
-Djava.endorsed.dirs="${serverRootDirectory}/common/endorsed"
in the following ´tags´:
-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"
and
-DJAVA_HOME="${jrePath}" -Dcatalina.base="${serverRootDirectory}" -Dcatalina.home="${serverRootDirectory}" -Djava.io.tmpdir="${serverRootDirectory}/temp" -Djava.endorsed.dirs="${serverRootDirectory}/bin;${serverRootDirectory}/common/endorsed"
This matches the value used in my catalina.bat file when lauched from the command prompt.

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

解答:刷新时按住CTRL键试试。
  </td> </tr> </table></td> </tr> </table>
↑返回目录
前一篇: J2ME程序开发环境配置的一个简单例子
后一篇: 配置JSP交互网站的步骤