1

I am trying to include a local jar file in my "Java" gradle project. I have added jar files in my "main/resource" folder of project. and in build.gradle added following lines :-

compile files('./src/main/resources/abc.jar')

It is not showing me any error at compile time. But when i run my project it is showing me following error:-

"Caused by: java.lang.NoClassDefFoundError: javax/json/Json"

Prashant Bhagat
  • 83
  • 1
  • 1
  • 5

1 Answers1

0

you need to add its dependency in gradle file.

compile fileTree(dir: 'libs', include: ['*.jar'])

Sharon
  • 93
  • 1
  • 13