Home arrow static arrow Java Programming [Archive] - Invoking J2SE library in J2ME environment.
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Invoking J2SE library in J2ME environment.
2 Duke Stars available
This topic has 4 replies on 1 page.

Posts:536
Registered: 6/29/03
Invoking J2SE library in J2ME environment.  
Aug 7, 2004 10:19 PM



 
Hello, everyone:

I have tried to invoke some J2SE libraries in J2ME environment which are not parts of J2ME library in Java specification. For example, I add some GUI related libraries (for example, AWT), some math related libraries and some cipher related libraries to CLASSPATH of my J2ME environment, which are said for J2SE only in Java specification. To my surprise, most of them can work.

Before this experiment, I believe J2ME environment can only use J2ME libraries. But now I wonder whether J2SE libraries can be used in J2ME environment. Since I really need some functions of J2SE which J2ME does not supply. It will take me much of time to implement them by myself on J2ME environment if they can not be borrowed from J2SE.

- Are the binary codes of "class" file the same in J2SE and J2ME environment?

- Are there any potencial problems when using J2SE libraries in J2ME environment?

Thanks in advance,
George

 

Posts:18,384
Registered: 21.03.00
Re: Invoking J2SE library in J2ME environment.  
Aug 8, 2004 2:19 AM (reply 1 of 4)



 
Hi,

The classes you added will not be available in a mobilephone. And the AWT classes would not display anything that looked right. The match classes wouldn't work either, since floating points aren't available in J2ME.
So basically. You can add new classes to the classpath, but they must adhere to the J2ME specification.

/Kaj
 

Posts:536
Registered: 6/29/03
Re: Invoking J2SE library in J2ME environment.  
Aug 8, 2004 5:17 AM (reply 2 of 4)



 
Thanks, kajbj, I have added some classes which are not parts of jclFoundation and I have verified that they can work. Not as you mentioned they can not do anything. Maybe jclFoundation is another case. Can you help?

Best regards,
George

 

Posts:18,384
Registered: 21.03.00
Re: Invoking J2SE library in J2ME environment.  
Aug 8, 2004 6:31 AM (reply 3 of 4)



 
Hi,

Actually what I said is true for MIDP, but maybe you aren't writing an application for a mobile phone?
I have never used jclFoundation. You might be able to find more information herer:
http://forums.java.sun.com/wireless/

/Kaj
 

Posts:536
Registered: 6/29/03
Re: Invoking J2SE library in J2ME environment.  
Aug 8, 2004 6:18 PM (reply 4 of 4)



 
Thanks, kajbj, you are right. I am not writing application for MIDP but for jclFoundation. I will go to the forum you introduced to me and continue my question.

And anyone else, who has any ideas about this topic, please help me.

George

 
This topic has 4 replies on 1 page.