Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Member
Posts: 1
Registered: ‎10-27-2010
My Device: Not Specified
Accepted Solution

Blackberry-packager CLI issues "Exception in thread main"...

Hey guys, I was having trouble building from FB4, so I figured I would test out the CLI to get running. Unfortunately I've run into some problems. I'm running a MacBookPro, os x 10.5.8.


I did a software update, thinking i needed to update Java, and installed the latest version from Apple's 'Software Update'. I ran java -version, here's what I got:



Java version "1.5.0_26"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_26-b03-376-9M3263)
Java HotSpot(TM) Client VM (build 1.5.0_26-156, mixed mode, sharing)


When running 'blackberry-airpackager' from terminal I'm getting the following error




Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)


Any help would be greatly appreciated! Thanks.


Posts: 35
Registered: ‎10-25-2010
My Device: Not Specified

Re: Blackberry-packager CLI issues "Exception in thread main"...

You need to run Java 1.6. Some classes in the SDK require 1.6 JVM.


Posts: 12
Registered: ‎11-04-2010
My Device: Storm 9500
My Carrier: Vodaphone

Re: Blackberry-packager CLI issues "Exception in thread main"...

I've got the same issue on MacBook Pro 2,1 running Leopard 1.5.8 update 8


BB SDK in Flash Builder works fine with fresh install of 10.5.8 u8 but will not debug actionscript project.


Change the java version to 1.6 with Flash Builder still open and I can debug my project, but when Flash Builder is restarted Eclipse fails to open:


JVM terminated.

Exit code=-1


Surely I can't be expected to keep switch Java runtimes to open my developer environment then have to switch to compile? There must be something I've missed but I've re-installed everything including Flash Builder twice now with the same issue.

BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Blackberry-packager CLI issues "Exception in thread main"...

Flash Builder is probably requires 32 bit mode and your default java is 64 bit? You can modify startup of FlashBuilder to pass -d32 flag to java (-vmargs -d32) or whatever mac java supports