• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java ME Application for Older Phones  RSS feed

 
Zack Valentine
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thank you
 
Tim Moores
Saloon Keeper
Posts: 3967
94
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A problem may be that JME 8 is a very different beast from JME 3 (which is what those earlier phones support). JME 8 is geared towards embedded devices, not phones, so I'm not sure if a JME 8 SDK can be used to create applications for JME 3 phones. You may want to try with the JME 3 SDK that's available at http://www.oracle.com/technetwork/java/embedded/javame/javame-sdk/downloads/javamesdkdownloads-2166598.html
 
Zack Valentine
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:A problem may be that JME 8 is a very different beast from JME 3 (which is what those earlier phones support). JME 8 is geared towards embedded devices, not phones, so I'm not sure if a JME 8 SDK can be used to create applications for JME 3 phones. You may want to try with the JME 3 SDK that's available at http://www.oracle.com/technetwork/java/embedded/javame/javame-sdk/downloads/javamesdkdownloads-2166598.html


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.
 
Tim Moores
Saloon Keeper
Posts: 3967
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!