Javame sdk 8.3 doesn't work on Netbeans - java-me

I've faced a problem with configuring Netbeans 8.1 to develop javame application with Javame SDK 8.3. When a javame project is created, Platform property remains grayed, compilation produced the message:
Platform home (platform.home property) is not set. Platform home (platform.home property) is not set. Value of this property should be <space> emulator home directory location.
When I try to fix project property on the platform tab, I see that:
No CLDC platform available
An old Javame SDK 3.4 works.
Any ideas could be helpful.

The confusion comes from the fact that JavaME is so much more than just MIDP/CLDC. It is used for so many other things, like e.g. Blu-ray players and other embedded devices.
MIDP and CLDC are merely JSR API's - which for some reason has been excluded from the SDK 8.x versions. This is why it can't find a CLDC platform, unless you install SDK 3.4
No other way around it than to use SDK 3.4
MIDP2.0 = JSR118
CLDC1.1 = JSR139
No where to be found in the list of SDK 8.x supported APIs: http://docs.oracle.com/javame/8.3/javame-apis.htm

Related

Where did lcdui go, in JME SDK 3.0+?

I want to write a tiny "hello world" J2ME MIDlet. In a sample like this one, classes in javax.microedition.lcdui.* are used for display output. When I try to compile it in Eclipse, I get the error,
The import javax.microedition.lcdui cannot be resolved
I've installed JME SDK 3.4, and I'm able to run MIDlets that don't import javax.microedition.lcdui.*. I read somewhere that lcdui can be obtained from the wireless toolkit; and Oracle says that the wireless toolkit has been integrated into JME SDK as of 3.0+.
So why can't Eclipse find it?
OK, I think I know the answer now.
I got back to the JME SDK 3.4 documentation page on Using Sample projects, and created and ran an instance of UIDemo. It uses lcdui classes, but it runs flawlessly - no errors about inability to resolve javax.microedition.lcdui.*.
The difference appears to be that the working sample uses different libraries than the one I tried at first. The first one uses org.elipse.mtj.JavaMEContainer/Oracle Java(TM) Platform Micro Edition SDK 3.4/IMPNGDevice1,
while the one that works uses org.elipse.mtj.JavaMEContainer/Oracle Java(TM) Platform Micro Edition SDK 3.4/JavaMEPhone1. They contain different sets of jars, e.g. the working one contains midp_2.1.jar, while the earlier one has impng_1.0.jar.
A follow-up question might be, why doesn't IMP-NG have lcdui in it? Well, those who pay attention to what they're doing will have read that
This JSR [for IMP-NG] will define a J2ME profile targeting embedded networked devices that wish to support a Java runtime environment similar to the Mobile Information Device Profile (MIDP) version 2.0, but that do not provide the graphical display capabilities required by MIDP 2.0.
The Information Module Profile - Next Generation (IMP-NG) will be a strict subset of MIDP 2.0, where at least the APIs relating to GUI functionality (the LCDUI) are removed. Functionality not already present in MIDP 2.0 is not anticipated or desired. "
The next question might be, why did I end up selecting IMP-NG when I was going through the tutorial... when I really do want a MIDlet that does something graphically? But I'm not sure I care, now that it's working.
The new me sdk 8.2, as I understood after browsing all class and in packages, does not provides any class to develop user interface. not like sdk 3.4, that have many graphical components.

Mobile application not working properly

I did a mobile application on java using Netbeans IDE.
It's working fine when I run in my system.
Problem is when I try to install it in my mobile its getting error like application error.
Can anyone help me find what went wrong?
I am using Sony mobile and in that it's getting "Application Error" nothing more then that, and even I try to install in another mobiles also it's getting like "error". I can't find what type of error it is.
You have to first check that APIs which you used in your application is supported in your phone or not. If APIs are not supported by your phone then it give error at installation time. And yes also check that your phone supported MIDP and CLDC version.
Ok it is very silly problem. When you create Java ME Application with Netbeans, by default it uses MIDP 2.1 Version. and I am sure your device supports MIDP 2.0 ( happened with me few times ). Just change your MIDP Version from 2.1 to 2.0 in NetBeans and then create .Jar file and try again, it will surely work.

Monotouch 5.0 and iOS 4.3 compatibility

I have got an application developed with Monotouch 4.0.7. This app is running on iPads with iOS 4.3.
Now, I want to migrate to the latest Monotouch version is 5.0. Will I be able to deploy my app on iPads with iOS 4.3? Or Monotouch 5.0 only for iOS 5.0?
Yes, it is possible to develop for iOS 4.3 (or even earlier iOS versions) with MonoTouch 5.0.
To set the minimum iOS version your app needs, go to the project's options, and in the iPhone Application page set Deployment Target to the minimum version.
Have in mind that MonoTouch will not tell you if you use iOS 5.0 API in your app. You can add iOS 5.0 features to your app, but you must not try to use those features on a lower version (here you can see how to accomplish this).
You can upgrade to Monotouch 5.x without any problems. In Monodevelop, change your SDK to 5.x
Just make sure your deployment target remains 4.3, if you still want to target that platform.
You will have to pay attention to not calling any methods that don't exist in 4.3.
If you want to have different/extended behavior on iOS 5 devices, you can check the OS version and use a different code branch.
Another small thing to be prepared for: iOS5 behaves differently in some situations. For instance if you are having hierarchical UIViewControllers, iOS5 will automatically call all UI events like ViewWillAppear(), even if you don't use the new UIViewControllery hierachy API.
What I want to say: test your app thoroughly on both iOS versions.

XCode 4 - Base SDK == Latest iOS (iOS 4.3)

To continue in my post-XCode 4 upgrade confusion, i came across this....
My Build Settings has Base SDK as iOS 4.3.
Now back in XCode 3.x days I remember 2 things:
The Base SDK was always set to iOS 4.0.
The target device was set to iphone 3.0 (to ensure greatest iphone audience).
What consequence is there for this Base SDK?
I mean, if SDK 4.0 provides support for features that only iOS4/iPhone4) provides, then why are these two separate build settings?
You can choose iOS 4.0 as your base SDK, but as long as you do not use APi's that are 4.0 and up your code should run on 3.x unless you used apis that were only in 3.2 and so on =)
Always a good thing to check the availability of methods when you look in the class reference.
I recommend using 4.x stuff.. because the people that use 3.0 are not worth supporting ( Only the really old devices are still running that, iPhone 1 -- most users have upgraded by now to an iPhone 3Gs or 4 ), the features you get in 4.x, including GCD are awesome.

Java ME SDK emulator options

For one of the older versions of Java ME SDK emulators I found this tutorial http://java.sun.com/products/sjwtoolkit/wtk2.5.2/docs/UserGuide-html/projects.html
I am looking for similar options for the version 3.0, but the device manager won't open or show me any option windows.
Can anyone tell me where I can find the options to set the Emulator speeds etc.
thanks
~ Kyle
I can find those settings using Netbeans 6.8. AFAIK the Java ME SDK is just a "reduced" version of Netbeans with some graphic midlet editor. I would use just Netbeans.

Resources