I wanted to write an application for an older, non smartphone, device. I've done a little work with it with flash as it runs SWF files but it's rather restricted and so I wanted to use Java ME instead. I've installed a couple of .jar games from the Internet and they all work fine so they definitely work on the phone but I'm having trouble writing my own.
I installed Netbeans, JDK 8u144, Java ME SDK 8.3 and the Sun Java Wireless Toolkit 2.5.2. The project always complained when trying to import "MIDP" which it seems is what we use for the UI instead of JavaFX or Swing. I found it where Wireless Toolkit was installed and added to the class path. This allows me to build the jar file but it does not install resulting in a vague "Operation Failed" error when trying to install it on the phone. There's no log files anywhere so It's a bit difficult knowing what went wrong?
What do I need to get setup for writing applications for such a device? Here's a sample application I tried which installs and works fine on the device.
Yes that's made it work. I've been using the Sun Java Wireless Toolkit to build jar's and test them on the device. I've ran into a problem with GETing an API request over HTTPS. All restful API's usually require HTTPS, like the one I want to use, but every time I use try open a HTTPConnection to it I've got either a "Certification Verification Exception" or lately "IO Exception 8000001b". I have tested an API that did serve over HTTP and also tried to get regular websites over HTTP and that works fine. But HTTPS doesn't work at all.
I do have the Opera Mini browser installed on the device and out of curiosity I tried visiting some of those API's over HTTPS and it does work, downloading the response to a file. Well Opera Mini is another MIDP J2ME application. So how come it can do it but the code below doesn't?
Here's my code with a non working HTTPS link.
posted 1 year ago
JME 3 is an old platform, maybe it only supports the obsolete SSLv3 and TLS1 HTTPS protocols? Those have been turned off due to security reasons for many sites. The Opera browser might come with its own HTTPS stack that supports newer TLS versions. But that's just a guess.