I'm new to JAVA programming and especially Eclipse. I have a small program that runs fine, if I run it outside of Eclipse. However, when I run it from within Eclipse, I get this error:
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.ncr.teradata.jdbc_4.Driver.<clinit>(Unknown Source)
at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(Unknown Source)
at com.ncr.teradata.TeraDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at MyFirstApp.main(MyFirstApp.java:44)
Exception in thread "main"
The code for line 44 is:
con = DriverManager.getConnection(url_type4, username, passwd);
If I go to a command prompt, I can run the program fine, it just won't run from within Eclipse. I even used the same javaw.exe it is showing in the title bar of the console window after it terminates, just to make sure the code is working.
Any ideas what I might need to change to get it to run properly?
Thanks!
Doug
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.ncr.teradata.jdbc_4.Driver.<clinit>(Unknown Source)
at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(Unknown Source)
at com.ncr.teradata.TeraDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at MyFirstApp.main(MyFirstApp.java:44)
Exception in thread "main"
The code for line 44 is:
con = DriverManager.getConnection(url_type4, username, passwd);
If I go to a command prompt, I can run the program fine, it just won't run from within Eclipse. I even used the same javaw.exe it is showing in the title bar of the console window after it terminates, just to make sure the code is working.
Any ideas what I might need to change to get it to run properly?
Thanks!
Doug