External Jar file error


Last Updated:

  1. dcreedon

    dcreedon New Member This Topic's Starter

    Joined:
    Apr 2, 2010
    Messages:
    2
    Likes Received:
    0
    Hi,
    I have included an external jar file in eclipse as a user library. Everything compiles and deploys correctly to my android emulator.

    When it comes to calling the activity that uses the external jar classes it craps out. I set a breakpoint at the offending area and it is reporting that it cannot find the class that I was trying to use.

    The jar file is from Barbecue project

    Stack extract:

    ClassNotFoundException.<init>(String, Throwable) line: 59
    VMClassLoader.loadClass(String, boolean) line: not available [native method]
    BootClassLoader.findClass(String) line: 1057
    BootClassLoader.loadClass(String, boolean) line: 1124
    PathClassLoader(ClassLoader).loadClass(String, boolean) line: 567
    PathClassLoader(ClassLoader).loadClass(String) line: 532
    LoyaltyCard.outputtingBarcodeAsPNG() line: 32 :mad:
    LoyaltyCard.onCreate(Bundle) line: 21


    Please Help

    Damian
     

    Advertisement
  2. markb

    markb Well-Known Member

    Joined:
    Sep 14, 2009
    Messages:
    148
    Likes Received:
    26
    Hi Damian,

    Don't forget that Android Java isn't standard Java. It uses its own JVM.
    Android will only recognise classes that were compiled with the Android java compiler, so standard java .class files that make up the external jar file won't work.

    If you have the source, and recompile using the Android SDK then you might have more luck.

    Mark
     

Share This Page

Loading...