Exception in thread “main” java.lang.NoClassDefFoundError: HelloWorld/java
Caused by: java.lang.ClassNotFoundException: HelloWorld.java
at java.net.URLClassLoader$1.run(URLClassLoader.java:220)
at java.net.URLClassLoader$1.run(URLClassLoader.java:209)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:208)
at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:270)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:338)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again
Using CATALINA_BASE: /usr/java/tomcat
Using CATALINA_HOME: /usr/java/tomcat
Using CATALINA_TMPDIR: /usr/java/tomcat/temp
Using JAVA_HOME: /usr/java/jdk1.7.0
5、浏览器中输入:http://localhost:8080 将出现tomcat欢迎页面 ^_^
6、管理tomcat:
[root@localhost tomcat]# vi conf/tomcat-users.xml
在<tomcat-users>和</tomcat-users>之间加入:
<user username=”admin” password=”admin” roles=”admin,manager”/>