09-20-2012 04:50 AM - edited 09-21-2012 02:00 AM
Hii
I've created a simple application that displays an advertisement. I used this article. I followed all steps but I get NoClassDefFound error on the BlackBerry 9900 simulator.i've downloaded the jar files from this url
For this I have used preverify.exe to check jar file to be compatible with net_rim_api.jar:
on my CMD:
preverify -classpath "D:\Eclipse\plugins\net.rim.ejde.componentpack7.1.
i am getting like this,what should i do?
Error preverifying class net.rimlib.blackberry.api.advertising.app.a
java/lang/NoClassDefFoundError: java/lang/Thread
Here my Code:
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rimlib.blackberry.api.advertising.app.Banner;
public class AdDemo extends UiApplication{
public static void main(String[] args)
{
AdDemo theApp = new AdDemo();
theApp.enterEventDispatcher();
}
public AdDemo()
{
pushScreen(new AdDemoScreen());
}
}
class AdDemoScreen extends MainScreen{
public AdDemoScreen()
{
Banner bannerAd = new Banner(16741, null);
bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
add(bannerAd);
}
}
How can I overcome this issue?
Thank you..
09-21-2012 03:15 AM
Hello,
Please find attachement.I hope this code usefull to you.
Thanks.
--------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
09-21-2012 03:21 AM
can you able to execute this app from your side?
09-21-2012 05:38 PM
You do not need to preverify the jar. All you need to do is include the jar in your build path and make sure you export the jar. Here are the instructions you need:
09-24-2012 04:40 AM
Hi Peter
i have followed the steps given in the documentation clearly,but still i am facing NoclassDeffound Error...what can i do?
09-24-2012 05:17 AM
What class is having the error? In other words, what class is not found?
Did you Export the jar? In other words did you tick the check box on the Order & Export tab of the Build Path?
09-24-2012 05:37 AM - edited 09-24-2012 05:38 AM
it is not showing any particulatr class name,when i execute the app,on the screen i am getting noclassdeffound error,i export the jar and i checked it correctly
09-24-2012 06:33 AM
When you debug this do you not see a class name?
Whereabouts in your code is this problem occurring. We need to confirm that it is the add code that is causing the problem.
Do you see this problem on the SImualtor?
09-24-2012 06:42 AM
ya,i have used try catch blocks like this to catch an exception ,but i am not able to print the statement
class AdDemoScreen extends MainScreen{
try{
public AdDemoScreen()
{
Banner bannerAd = new Banner(16741, null);
bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
add(bannerAd);
}
catch(Exception e){
S.o.p("Error"+e.getMessage());
}
}
can you execute this demo app from your side and let me know are you facing the issue or not?