Hey all. I've been trying to get my Unity project set up for testing on a Blackberry device. After following the instructions in this guide: http://docs.unity3d.com/Manual/bb10-setup.html I end up with the following error when trying to register with RIM: Info: CSK file created. Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen at net.rim.device.codesigning.keytool.KeyTool.a(Unknown Source) at net.rim.device.codesigning.keytool.KeyTool.if(Unknown Source) at net.rim.device.codesigning.keytool.KeyTool.a(Unknown Source) at net.rim.device.codesigning.keytool.KeyTool.main(Unknown Source) at net.rim.device.codesigning.barsigner.BarSigner.try(Unknown Source) at net.rim.device.codesigning.barsigner.BarSigner.a(Unknown Source) at net.rim.device.codesigning.barsigner.BarSigner.main(Unknown Source) Caused by: java.lang.ClassNotFoundException: sun.security.x509.CertAndKeyGen at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more UnityEditor.HostView:OnGUI() I'm running Unity 4.5.1 and I have had this error occur with both JRE 1.8 and JRE 1.6. I'm using a Macintosh with Mavericks. The CSJ file paths and pin are correct so I'm not sure what's going on here. Any suggestions?
http://forum.unity3d.com/threads/rim-signing-w-unity-4-3-4f1-pro-broken.242754/ 1.6 should have worked I think if this thread is to be believed.
I've tried running this on my Windows 8.1 machine as well, which definitely has JDK 1.6 installed and I'm still getting the same problem. Only now instead of a class not found error, it's a method not found error for CertAndKeyGen.getSelfCerticate. Edit: After trying a bunch of other Java downloads I got it to work with Java 6 Update 45 and it has to be the 32-bit version. It would be really nice if this could get updated to work with a version of Java that isn't over half a decade old though.
It's interesting that you were getting the class or method not found errors. We do currently require a 32bit version of java to be installed but I've put checks into Unity to ensure that this is the case. Is it possible that you had a 32bit version of 1.8 or 1.7 installed and when you were bouncing between java versions it was picking up the same 32bit version?
Yeah, it seems like that's what was going on for the class not found error. The very first Java 6 release (1.6.0.0) had the missing method errors.
I'm getting same error, this workaround is not correct way, Unity should support latest version of Java and have this fixed. Plus Windows and Java is so much easier, try Mac
I have this same error when trying to create a dev certificate. Can I ask how you eliminated newer versions of java from being used? Did you have to uninstall them? Edit your environment vars? Thanks,
Hey there. Could you tell me what version of Unity you are using as well as the version of java that you have installed?
same error on 4.6.6 p2 mac - solution? browsed the unity doc, nothing indicates what else to install.
If you are on Windows, you don't have to uninstall anything, change the path of the Java SDK on your environment variables to the specific version Thickney mentioned. After building the certificate, you can restore the path to whatever other version you were using before.