Amrmsmb
Amrmsmb

Reputation: 1

jar file causes NoClassDefFoundError

I created a java project in eclipse and then i generated a runnable jar out of it. the java project has a class named DrivingModule. the jar file was imported in to an android project. but the problem is, when i run the android project the app crash as long as i use the class DrivingModule and i receive the following error

*06-01 11:38:10.481: E/AndroidRuntime(16751):   Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available*

and if i commented out the class DrivingModule, the App works normall. i referred to some questions but mainely they were explaining how to generate the jar and how to build the path, but i could not find any post about how to solve the error i am receiving.

why that class causes the App to crash and throw such error?

update

after refering to the answer of Bhaumik Thakkar the App did nt work until I checked the box of the added jar as shown in the image below

enter image description here

Upvotes: 0

Views: 74

Answers (1)

Bhaumik Thakkar
Bhaumik Thakkar

Reputation: 580

Put your jars in your -> jdk -> lib -> ext and then try again..

Upvotes: 1

Related Questions