Use J2ME APIs in J2SE, or vice versa?

Is it possible to use J2SE APIs in a J2ME MIDlet, or vice versa? Or workarounds?
The reason why I am even doing this is that I have a study project to make work a communication gateway between 2 systems. And 1 of them provides APIs in J2SE and 1 in J2ME.
I tried serveral ways.
1. In a J2ME MIDP 1.0 MIDlet, when calling the APIs provided in J2SE, I get :
ALERT : Bad method signature
2. In a J2ME MIDP 2.0 MIDlet, when calling the APIs provided in J2SE, I get :
a. Before obfuscating:
java.lang.NoclassDefFoundError:java/net/UnknownHostException:Cannot create class in system package
at Canvas.<init>(+18)
at MIDlet.startApp(+15)
b. After obfuscating:
Error verifying method MIDlet startApp()V
Method...
3. In a J2SE program, when calling J2ME APIs like
javax.microedition.io.Connector.open(url);
I get the
java.lang.UnsatisfiedLinkError
(see below for more details)
Any help would be appreciated...
Wen
3. Details of java.lang.UnsatisfiedLinkError
Exception in thread "main"
java.lang.UnsatisfiedLinkError: getProperty0
at
com.sun.midp.Configuration.getProperty0(Native
Method)
at
com.sun.midp.Configuration.getProperty(C:/tmp_java/build_WTK/j2me_mid
p/src/share/classes/com/sun/midp/Configuration.java:34)
at
com.sun.midp.io.InternalConnector.<clinit>(C:/tmp_java/build_WTK/j2me
_wtk/midp/src/lime/classes/com/sun/midp/io/InternalConnector.java:91)
at
javax.microedition.io.Connector.open(C:/tmp_java/build_WTK/j2me_midp/
src/share/classes/javax/microedition/io/Connector.java:158)
at
javax.microedition.io.Connector.open(C:/tmp_java/build_WTK/j2me_midp/
src/share/classes/javax/microedition/io/Connector.java:138)
at
javax.microedition.io.Connector.open(C:/tmp_java/build_WTK/j2me_midp/
src/share/classes/javax/microedition/io/Connector.java:120)
at
terraplay.networking.SendReceiveHTTPDefault.openUrl(SendReceiveHTTPDe
fault.java:40)
at
terraplay.networking.AsyncCommunicationHandler.setup(AsyncCommunicati
onHandler.java:44)
at Tgateway12.main(Tgateway12.java:45)

"J2ME" is strictly speaking not defining any API. It is divided in configurations and profiles like CLDC and MIDP and so called "optional packages" like the WebService-API. All of those might have some classes in common with J2SE but definitely not all. So there might be some overlapping but it's not necessary and I wouldn't know of any configuration or profile being a true subset of j2me. CLDC / MIDP for example define a package javax.microedition that is not part of J2SE

Similar Messages

  • I am interested on buying the Photoshop and Lightroom package (9.99 per month) My question is If I download it on my PC can I also use it on my iMac or vice versa?

    I am interested on buying the Photoshop and Lightroom package (9.99 per month) My question is If I download it on my PC can I also use it on my iMac or vice versa?

    If you want to have the photos stored on an external HD, you probably should move them there in your operating system before you import into Lightroom.
    But, if you don't yet own an external HD, you can import from the internal hard drive and later move the photos to wherever you want them to be, as long as you do it properly.

  • Can I Use MainStage Effects in Logic (and vice-versa)?

    New to Logic.
    MainStage is amazing but it's only good if I can use the sounds I've recorded with in Logic and re-produce them live, and then vice-versa. So is there a way to:
    1. Export (or use effects directly) from Logic and use in MainStage
    2. Export (or use effects directly) from MainStage and use in Logic
    3. Are my sounds saved in a folder that I can navigate to from within either application?
    I've looked as much as I can in the reference manuals but can't believe the two software programs cannot be integrated without having to set up MainStage on one computer to play live and then record on a second computer. So obviously that said, is there a way to attack this on one laptop/quad for home recording?
    Cheers!

    Anyone?
    I see no point finding brilliant sounds in MainStage and then having to try to emulate them all in Logic (or vice versa). So can either be integrated with one another?
    Thanks

  • How to send picture message using J2ME sms APIs?

    Hi,
    I experiment with SMS APIs, i successfully send simple text message. now i want to send picture message, how to send picture message using J2ME APIs.
    please guide me.
    guna.

    I experienced in coding sending and receiving sms in J2ME. Besides, I also esperienced in coding reading a binary file in a applicaition jar. But I never done these both together. Hence Im not sure it works or not. Below is the example to open and read a binary file:
    InputStream oInputStream = getClass().getResourceAsStream( "/picture.png" );
    if(oInputStream == null) {
    //File does not exist;
    throw new Exception("File not found");
    //Read the binary file and copy it to a byte array
    byte[] abyPicture = new byte[oInputStream.available()];
    oInputStream.read(abyPicture );

  • My nephew and I use the same iTunes account and when I add an app it is loaded on to his iPhone and vice versa... How do I make that stop?

    My nephew and I use the same iTunes account and when I add an app it is loaded on to his iPhone and vice versa... How do I make that stop? I have already unchecked the "Auto Update Apps" button. It happens with all purchases in the app store and on iTunes. HELP!

    I also think separate accounts is the way to go....if he is over 13yrs also remember if you do make an account for him and use your bank card all purchases will be charged to your card.

  • My wife and I got Iphone 4S same day 2 years ago. I used the same Apple ID for both. We do not use iCloud, but today after I updated my phone to IOS7 I keep getting her texts on my phone ans vice versa.

    My wife and I got Iphone 4S same day 2 years ago. I used the same Apple ID for both. We do not use iCloud, but today after I updated my phone to IOS7 I keep getting her texts on my phone ans vice versa. I turned off imessage in message settings. Seems to have stopped now? Never did this before IOS7. Will I have more troubble when her phone updates to IOS7? Is icloud going to be forced on me then?

    This is being caused by using the same Apple ID for iMessage on both phones.  To separate your messages, go to Settings>Messages>Send & Receive and do one of the following:
    Either uncheck the email address shown under "You can be reached by iMessage at" on both phones; or
    If you want to continue to receive iMessages at this email address, on one of the two phones, tap the Apple ID at the top, sign out, then sign back in using a different Apple ID.

  • My new iphone 5 email is synched with my home office computer Outlook email using a POP account, but deleting an email on my computer does not delete it on my phone and vice versa.  Is there any way to get a true synch?.

    My new iPhone 5 email is synched with my home office computer Outlook email using a POP account, but deleting an email on my computer does not delete the email on my phone and vice versa.  Is there any way to get a true synch?.

    POP does not support synchronization between the server and clients. You will need to use IMAP or Exchange Active Sync if your email provider supports it.

  • Data transfer between SAP & Java and Vice versa using IDOC Process

    Dear Experts,
            We are working on one of the good requirement related to data transfer between SAP and Java software. Client requirement is, they want to transfer the data in both the ways (from SAP --> Java and Vice versa also).
    In detail is, after sales order creation using one custom program loading plan details will be calculated. Once loading dates are confirmed then, user will release the sales document to transfer the data from SAP to Java using "Outbound IDOC processing". Similarly in that JAVA software some shipment details will be performed, once completed from JAVA software again details needs to be pumped back to SAP as "Inbound IDOC Processing".
    For this fields are already identified from external software SAP and we are looking for the same to perform the steps in SAP.
    At this stage, I need your expert opinion  / feedback how to go  about at this stage.
    Meaning,  
                     1. What are the customizing steps needs to be done in SAP..?
                     2. How to trigger the :Outbound IDOC process" once the documents are "Released" from custom transaction
                     3. How to create the link between SAP and JAVA to transfer the data between these 2 software
                     4. How to trigger the "Inbound IDOC Process" from JAVA software to SAP and how to store the data in SAP
    Experts, please give your feedback in terms of reply or by sending the step by step process to fulfill this client requirement.
    Thanks for your cooperation.
    Regards,
    Ramesh

    Maybe too many open questions in the same document.
    Maybe you should repost a more specific question in a technical forum.
    This looks like a small project where you already know what you want, maybe you should contract a technical specialist so he proceeds to the implementation!

  • SyncML for the J2ME using Funambol API

    Hi All,
    I have a problem in SyncML using Funambol API for J2ME. I am sending and getting the contacts from the server but I cannot update them.
    Suppose I have a First Name field Abc and update it as Xyz it would not change on my server (I am using Funambol Sync Server) rather its create a new entry on the server.
    Some one know how to fix this problem. I am thanking you in advance.

    Please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.

  • I have 2 macbooks using airport.  I can send emails from 1 mac to the other but not vice versa.  Any ideas why?

    When we set up the airport we used to be able to send emails from my macbook to my husband's macbook and vice versa but can't now.  We have different email addresses and it was convenient to be able to forward emails etc. Can anyone tell me if it is the airport or the way we have our macs set up.  Thank you.

    I really don't think it's the router. Most likely, it will have to do with the email client that you are using on each of your Macs. Unless you are running an eMail server on your local network, both of your eMail clients are using mail servers on the Internet.
    If you are both using OS X Mail, you may want to post in that forum area as well to see if the Mail experts over there can help.

  • My iPhone4 and laptop have stopped communicating/syncing in terms of emails. IE: If I delete an email on my phone, it used to automatically delete on my computer, and vice versa. Now, nothing. Help?

    My iPhone4 and laptop have stopped communicating/syncing in terms of emails. IE: If I delete an email on my phone, it used to automatically delete on my computer, and vice versa. Now, nothing. Help?

    I have a .mac account and a gmail account and have not moved to iCloud.

  • Display color profile bug when using the fast account switch from a guest account to an admin account (and vice versa)

    Hey,
    I'm sometimes using a guest account on my MBP (unibody late 2008 2,4 GHz Core2Duo, 4GB DDR3 running OSX 10.9.4 on an OCZ 128GB SSD) for a more distraction-free working space and I noticed right away a disturbing bug:
    Using the fast account switch (upper right hand corner of the screen) in Mavericks from an admin account to log into a guest account (or vice versa) produces, after the fancy rotating cube animation, some strange distortion of the desktop background happens (lasting approx. 2 sec.). After that the color profile of the display is changed into an usable but ugly one, which is disturbing while working with pictures. When checking the color profile in the pref pane, the standard "display" profile is said to be active (it's the one I use) but still the colors aren't the same. Selecting another profile and re-selcting the desired one doesn't fix the problem. Switching back to the other account with the fast switching leaves the colors altered. Logging out and deleting the guest account seems to the problem for the remaining admin account. Rebooting  and logging in to either of the accounts (admin or guest) from the standard account selecting page at booting shows the normal color profile.
    Is it a general bug or is their anything a can do to prevent this problem (other than never using the fast switching)?
    Thanks for your advice.
    Mael

    I cannot agree more with your comments! What a way to frustrate your customers!
    I have been having an issue with iCloud on Mac where it kept asking me for my password and sometimes would, sometimes would not continue to access my iCloud mail. Today it just refused to connect to iCloud mail.
    I looked in the Mail, Contacts and Calendars in my MacBook Pro settings and discovered that 2 iCloud accounts were present. One with my original Apple ID (a gmail address) and a second with my new iCloud email ( an @me.com address). Having deleted the second account, using the new @me.com address everything is working fine.
    So from my viewpoint when I moved over to iCloud I was asked to sign in with my Apple ID (the gmail address) then to create an @me.com address. However, as far as I can see all sign ins to the new @me.com account on Macbook, iPhone and iPad need to be done through the old Apple ID (the gmail address). Is that confusing and just plain crazy???
    Further, after creating the new @me.com address I soon found out that this is apparently now forever bound to my old Apple ID and cannot be changed. I mean why can't I delete the iCloud account and start anew with a different @me.com address??? Also, as everybody using iCloud must create an @me.com address why on earth can I not get rid of my old gmail address and have my entire Apple ID accessed through the new @me.com address? Creating a whole new Apple ID will not solve this as we are unable to transfer purchases between accounts.
    Apple products are great IMHO, but they do seem to not think things through in a very big way sometimes......

  • Can I use my AT&T iphone sim in a O2 iphone or vice versa?

    As the headline says can i use a AT&T iphone sim in an O2 iphone, and also vice versa. I travel extensivley between the UK and america and really only want to use one phone. Can any one help? No turbo sim or yellow snow suggestions please! Thanks
    mark

    No, US phones are locked to AT&T while UK phones are locked to O2.

  • Why we need to use the RMI if you have JSPs? or vice versa

    Hi friends,
    Can anyone please explain me whats the difference between RMI and JSP?
    All I know is how to code and implement them both but can't figure out which one has more advantage than the other.
    Actually this was the Interview question asked to me once,
    The question was "Why we need to use the RMI if you have JSPs? or vice versa"
    Please let me know if you have any answers for this.
    Thank you.

    harsh884 wrote:
    Well I may not have very deep knowledge about them both but from the little bit of coding practice and implementation I know that too, that they are different technology and the implementation is also different. But didnt know what to answer for this question to interviewer.My answer would have been along the lines of using the right tool for the requirements. Use RMI when you want to work with remote objects "directly", but don't want to hassle with handling all the networking manually or restrict yourself to the HTTP protocol and an inappropriate use of the view layer in model 2 applications.
    Thanks anyways for the reply.You're welcome. How did the rest of the interview go?
    ~

  • Connecting J2ME serversocket with J2SE socketconnection

    ***********connecting J2ME serversocket with J2SE socketconnection *****************
    I am currently working on J2ME . Here I have a situation that I need to contact the push registry's socket connection of a midlet from the web server . I apparently wrote a J2SE client socket program to connect the midlet's socket inorder to fire the push registry. But I got a connection failure exception.
    I want to know whether i could connect J2ME serversocket with J2SE client socket . The J2SE client socket application is residing at the webserver.If yes, how?
    if any extra information needed regarding this , contact me at [email protected]
    regards
    amar

    Yes, we have already done that...using J2ME socket demo server and J2SE as the client. We have also tested it in vice-versa with J2ME socket demo as the client and J2SE as the server and they both worked pretty well. Note : both J2ME 2.0 and 2.1 also J2SE 1.4.2_04. We used the KToolBar and the SUN ONE Studio ME as our IDEs
    You can contact me at : [email protected]

Maybe you are looking for

  • Logical Key for Degenerate Dimension

    Hi Gurus, Need some help on the degenerate dimensions in the BMM layer. I have one fact table with dimension attributes and I would like to move the attributes into separate logical table and treat it as dimension. Now my newly created dimension has

  • 5.1 audio not working

    Hey guys any help would REALLY be appreciated, I'm a bit of a newbie so carefull steps would great. I've been struggling for a while now with this: CPU=AMD Athlon 64 processor 3500+ RAM=1.00 GB Motherboard=MSI NVIDIA nForce 4 SLI k8n Diamond VGA=GEFO

  • Getting error in BPEL Console

    I am getting following error on checking the flow of a running/completed BPEL process in BPEL Console Error: Internal Bug (#188) Element has no child: creation-date I am running SOA Suite 10.1.3.3 on Microsoft Vista. I already resolved a number of is

  • Purchasing display from HP/Dell/other

    I have been trying to research before purchasing two new widescreen displays for my MacPro. I believe that the apple displays have too many issues with them and are too expensive. I'd like to purchase something more affordable, but which will work we

  • RRS Feed as a SQL Report in  HTMLDB?

    Hi I'd like to generate RSS file as a standard SQL Report in HTMLDB (i.e. no public access to db procedures needed as in AskTom RSS example mentioned in this forum). I've created: - Page template with "<?xml version="1.0" encoding="UTF-8"?> <rss vers