INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the : /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/libġ0:14:00 AM init INFO: Command line argument: -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-7.0.82/tempġ0:13:59 AM .AprLifecycleListener lifecycleEvent INFO: Command line argument: =/opt/tomcat/apache-tomcat-7.0.82 INFO: Command line argument: -Dcatalina.base=/opt/tomcat/apache-tomcat-7.0.82 INFO: Command line argument: =/opt/tomcat/apache-tomcat-7.0.82/endorsed INFO: CATALINA_HOME: /opt/tomcat/apache-tomcat-7.0.82 This is caused mainly due to syntax errors by the programmer. INFO: CATALINA_BASE: /opt/tomcat/apache-tomcat-7.0.82 It is caused when a program is executed in the terminal, and the main class is not found or cannot be loaded. INFO: Server version: Apache Tomcat/7.0.82 Using CLASSPATH: /opt/tomcat/apache-tomcat-7.0.82/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-7.0.82/bin/tomcat-juli.jarġ0:13:59 AM .VersionLoggerListener log Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-7.0.82/temp Using CATALINA_HOME: /opt/tomcat/apache-tomcat-7.0.82 Using CATALINA_BASE: /opt/tomcat/apache-tomcat-7.0.82 Output of catalina.out tomcat]$ cat /var/log/tomcat/catalina.out Server B - Doesn't (Even though indicates "started") Using CATALINA_BASE: /opt/tomcat/current Using CLASSPATH: /opt/tomcat/current/bin/bootstrap.jar:/opt/tomcat/current/bin/tomcat-juli.jar Using CATALINA_TMPDIR: /opt/tomcat/current/temp Error: Could not find or load main class Click to expand. 2 tc55 said: My linux is 64-bit Kubuntu 15.04. Make sure your CLASSPATH Environment variable is correctly set or your JDK home is added properly in classpath. Server A - Works Using CATALINA_BASE: /opt/tomcat/current Error: Could not find or load main class . If you are running a Java based application from Eclipse or Intellij and you are getting the Error:Could not find or load main class. The server was installed using downloadeded binaries, custom init script, etc using an Ansible script that worked on 3 servers in total (all same OS, Java) thus far. As a result, you must first confirm that the. If you correctly stated the class name but still received the same error, the Java command likely could not locate the supplied class name at the location. However, one server doesn't want to start. The Java Virtual Machine searches the classpath for user-defined classes, packages, and resources in Java programs. I tried setting Main-Class to Timer.
In my case, I have these two servers configured identically (AFAIK). And now it is having the problem of not being able to find the main class that is in the manifest again. Most hits on google seem to indicate a specific class at the end of the log entry. Notice, no specific class specified at the end of the log entry. When I attempt to startup Tomcat (7.0.82) on RHEL6/Java7, the logs will display this: