tags:

views:

220

answers:

5

Hi,

I'm a java noob. Wanted to know if all J2SE classes are available in J2ME. If not why is it so?

Thanks

+7  A: 

No, only a subset is available, see http://java.sun.com/javame/technology/index.jsp for an introduction.

Jerome
+3  A: 

No, J2ME is a significantly restricted subset of J2SE. J2SE is an enormous standard library, and most of the devices J2ME is intended to run on don't have the resources to support all that overhead.

Take a look at the javadocs for CLDC 1.1, the main, universally supported API accessible to J2ME.

JohnE
Actually, here's an even better reference that includes MIDP, the UI system provided with most J2ME environments: http://java.sun.com/javame/reference/apis/jsr118/index.html
JohnE
+2  A: 

No they are not. The reason for this is the standard library is quite large, making it difficult to use on embedded devices with small amounts of memory and slower processors.

See this page for more info about whats included and whats not.

Jared Russell
+4  A: 

It's worth noting that where J2ME versions of J2SE classes are apparently available, they often have a reduced API. So you can't always assume that code using 'available' classes will port straight over.

If memory serves, there are one or two methods with differening names too. Memory doesn't serve well enough right now to recall a specific example.

martin clayton
A: 

Can i import/add some packages fron the JavaSE to the ME??????

dusko
BalusC