Results 1 to 5 of 5
Thread: ClassNotfoundException
- 10-17-2011, 10:24 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 3
- Rep Power
- 0
ClassNotfoundException
I'm a novice at programming and Java. So i really need the ABC of java! I've got jdk1.6.0_21 on my system and i use windows 7 OS. Trouble is i can't run any of the java programs that i write. I am able to compile but not run them. The programs are free of errors. All i get during runtime is a ClassNotFoundException. Would be glad if someone helps me with this! Thanks!
- 10-17-2011, 11:49 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
Re: ClassNotfoundException
Show us the very first line of your source code; I bet your class is stored in a package while you don't know how packages are handled by the JVM.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-17-2011, 07:42 PM #3
Member
- Join Date
- Oct 2011
- Posts
- 3
- Rep Power
- 0
Re: ClassNotfoundException
Jos, Its a simple hello world program! Just seven lines! :( Do you think I should set my path variables?
- 10-17-2011, 07:45 PM #4
Member
- Join Date
- Oct 2011
- Posts
- 3
- Rep Power
- 0
Re: ClassNotfoundException
This is what I get everytime I try to run a program on the console.
D:\Program Files (x86)\Java\jdk1.6.0_21\bin>java ex
Exception in thread "main" java.lang.NoClassDefFoundError: ex
Caused by: java.lang.ClassNotFoundException: ex
at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
Could not find the main class: ex. Program will exit.
- 10-17-2011, 08:12 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
Re: ClassNotfoundException
When people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
ClassNotFoundException...
By providence in forum JDBCReplies: 2Last Post: 02-02-2011, 06:45 PM -
ClassnotFoundException
By balaji shan in forum Java ServletReplies: 8Last Post: 01-19-2011, 03:47 PM -
ClassNotFoundException
By meprasobh in forum New To JavaReplies: 2Last Post: 10-17-2010, 03:32 PM -
classNotFoundException
By jyothi.priyanka in forum NetBeansReplies: 5Last Post: 08-24-2010, 10:13 AM -
ClassNotFoundException
By oontvoo in forum Java AppletsReplies: 7Last Post: 05-13-2010, 11:09 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks