Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding a jar to project

 
Al Finlay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I'm hoping someone can tell me where I've gone wrong. I've been following the instructions for Marko Gargenta's Yamba project. I thought everything was going ok but when I ran the project logcat showed this error ...

11-27 05:23:10.569: E/AndroidRuntime(487): FATAL EXCEPTION: main
11-27 05:23:10.569: E/AndroidRuntime(487): java.lang.NoClassDefFoundError: winterwell.jtwitter.Twitter

The Twitter .class file is located in a Jar file.
The instructions stated - put the Jar file in the root of your project and then from Eclipse select the Project's Properties, Java Build Path, Libraries, Add Jars, and browse to the Jar.

I must've missed something simple, can anyone help?
Thanks in advance.



<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="lib" path="jtwitter-yamba.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>



 
Al Finlay
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typical! I think I've just found the answer.

http://vnsoftwareconsulting.blogspot.ie/2012/06/how-to-fix-run-time-error-could-not.html

Sometimes it really helps just typing out the question
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!