Creating a Java Keystore for Oracle Mobile Suite
By Jeff Davies-Oracle on Feb 17, 2014
I've recently joined the Mobile Suite team and its a propitious time to do so. Not only are we releasing a new product, Oracle Mobile Suite, but with the imminent release of Oracle Service Bus 12c (which uses JDeveloper as its IDE) I have had to learn much more about working with JDev after many years of working with the Eclipse IDE.
One of the things I recently learned is that Mobile Suite wants to see a specific type of Java keystore when deploying app onto Android devices. Specifically, I was analyzing the sample HR application and when I tried to deploy it, it gave me an error saying that my java keystore was not configured properly.
After a little time figuring out the trouble, I came up with a Windows batch file script that would create the keystore for me automatically. Now you don't often need to create a keystore automatically, but as a developer at Oracle working on different projects, I do have to create different keystore on a very infrequent basis, so I always forget the details of how to do it. By creating a script to do it, I can see a working example and then twek it to meet my needs on the next project.
Here is the script I am using to create a keystore specifically for the Oracle Mobile Suite:
D:\Oracle\MobileSuite_188.8.131.52.0\jdk160_24\bin\keytool -genkey -v -keystore c:\Users\jedavies\mobileSuite.keystore -storepass welcome1 -alias demo -dname "CN=Oracle, OU=Development, O=Oracle, L=Redwood Shores, S=CA, C=US" -keypass welcome1 -keyalg RSA -keysize 2048 -validity 10000
What makes this specific to Oracle Mobile Suite? Well OMS requires that the key be defined using a 2048bit RSA key. The text in the bold red font is the text that you will likely need to customize if you want to use the same script. That's all there is to it!