I am creating an application in Eclipse to translate text from english to french using googleAPI. I am passing the url in this format
url=\"https://www.googleapis.com/lang
The problem is that the emulator is missing the root certificate used for the site (but your phone isn't).
What you need to do is to import the correct certificate into the keystore for the emulator.
Find out which root certificate that was used for the site. You can do this by browsing to the address using e.g. Firefox and viewing the certificate information (click the blue name to the left in the location bar, More Information..., View Certificate, Details). In this case it was Equifax Secure CA.
Save the certificate to a file. In Firefox you can do this by clicking the top certificate and then the Export... button. The certificate is now stored in a format that is readable by the keystore for Java SE but not ME.
Import the key into a temporary Java SE keystore using the following command:
keytool -import -alias [any name] -file [path to certificate file]
A new keystore will (by default) be created in your home directory (which would be C:\Users\[username]\.keystore on Windows 7)
keytool is located in the bin directory of your JRE installation.
Import the certificate from the Java SE keystore into the ME keystore using:
mekeytool -import -MEkeystore C:\Users\[username]/javame-sdk/3.0/work/[id of emulator profile]/appdb/_main.ks -alias [same alias as before]
You can find the id of the emulator profile by running the emulator and checking the id in the title-bar
keytoolme is located in the bin directory of your Jave ME SDK installation
This is usually the easiest way to get it working. An alternative is to get the certificate from the system-wide keystore with root certificates and thereby skipping step 2 and 3.
First find the alias of the certificate you want to import:
keytool -list -v -keystore "C:\Program Files (x86)\Java\jre6\lib\security\cacerts"
or
keytool -list -keystore "C:\Program Files (x86)\Java\jre6\lib\security\cacerts"
In this case it is equifaxsecureca.
Then import it:
mekeytool -import -MEkeystore C:\Users\[username]/javame-sdk/3.0/work/[id]/appdb/_main.ks -alias equifaxsecureca -keystore "C:\Program Files (x86)\Java\jre6\lib\security\cacerts"
In Windows 7 you need to run this from a shell with administrator privileges.
A Certificate Manager is provided by the J2ME Wireless Toolkit to help you maintain the certificates in the Default Emulator’s keystore (J2ME keystore).
Importing From the J2SE Keystore
To import a certificate from a J2SE Keystore using the Certificate Manager:
The certificate is appended to the list of certificates in the J2ME Keystore. You can select the certificate to view its key information in the J2ME Key Details pane.