NoClassDefFoundError while running from jar?

Your Main-Class attribute looks a little suspect--is com.hamza.driver. Ui a class or a package?

1 believe this is the error, too – Daniel Oct 29 '10 at 15:19.

Have you specified the new jar in your classpath (java -cp . ;new. Jar MainClass.

Class)?

There is a chance, that the NoClassDefFoundError (I really hate this error - always drives me crazy...) isn't thrown because it doesn't find the class it tells you (-> your class) but because java can't find one of the classes that are used to instantiate that class. I had this problem once, when a class imported another class from a different jar (in my case: an OSGi bundle) which hadn't been properly exported. Although this was a OSGi specific problem - You may have the same problems in your environment.

Maybe your application depends on some classes that are present in your actual OS-X environment but not in the actual Window environment. I'm not looking at third-party libraries but at the Java implementations itself. Good luck!

Edit There are two more quite similar question on SO, unfortunately with no accepted solution, but maybe one of the hints over there can help in your case: stackoverflow.com/questions/1074955/nocl... stackoverflow.com/questions/959980/nocla... Edit 2 Here's a similiar problem that has an accepted answer. Hope this one helps: http://stackoverflow.com/questions/250166/noclassdeffounderror-while-trying-to-run-my-jar-with-java-exe-jar-whats-wrong.

But if that's the case, it shouldn't work when I unzip it. But it works. – Hamza Yerlikaya Sep 14 '09 at 7:54 Ah - OK, didn't read carefully enough.

– Andreas_D Sep 14 '09 at 8:16.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions