Results 1 to 14 of 14
Thread: Midlet migration to JavaSe
- 05-15-2010, 09:19 AM #1
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
Midlet migration to JavaSe
Hello,
How to convert a midlet available microedition/UDPDatagramConnection for applet module? I get error that package does not exist, For example:
import javax.swing.JApplet;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
import net.*;
public class InviteMIDlet extends JApplet {
private Display display;
public Form form;
private TextField To;
private Command sendCmd;
private Command exitCmd;
private Command hangupCmd;
private UDPDatagramConnection rtpCon = null;
....
}
- 05-15-2010, 06:12 PM #2
When getting errors, please post the full text of the error.I get error that package does not exist
You don't say what package is missing.
- 05-16-2010, 05:02 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If a package is dose not means that you've not added relevant additional packages into your classpath, did you?
Best way to find a solution for your question is, as Norm says, post your complete error message to the forum. It's helpful to others who are looking into your question.
- 05-17-2010, 11:48 AM #4
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
Please check the screen shot, it works in my Midlet project, But i am trying to move same concept to J2SE (applet based).
screen: http://i.imgur.com/PuqMn.png
1. J2SE have microedition?
2. UDPDatagramConnection in J2SE is different?
Thank you
- 05-17-2010, 12:17 PM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Did you added that package into your classpath?
- 05-17-2010, 02:35 PM #6
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
@Eranga,
screen shot: http://i.imgur.com/IJhok.png
Mannually i didnt add anything, Which libraries i should add?
- 05-17-2010, 02:48 PM #7
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
@Eanga, others:
1. Which package i should add for my classpth?
2. I compile, this are the error: Bash | init: deps-clean: Updating p - Anonymous - TBvGthkY - Pastebin.com
- 05-17-2010, 03:01 PM #8
Do you have a jar file with the above package in it?package javax.microedition.media does not exist
- 05-17-2010, 03:24 PM #9
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
Screen shot: http://i.imgur.com/jqUUG.png
1. Midlet working project i compiled and made a siptest.jar file in my path /home/sun/Download/siptest.jar
2. J2SE > same code > properties > libraries added as siptest.jar
Still i have same.
- 05-17-2010, 05:27 PM #10
I'm not sure what your response said.
Do you have a jar file with the the javax.microedition.media classes in it? I imagine that you would have to download it from the SUN site.
What is in the siptest.jar file?
- 05-17-2010, 05:59 PM #11
Member
- Join Date
- May 2010
- Posts
- 6
- Rep Power
- 0
@Norm, @Eranga, others: I am translating following terms, i think i am getting fail because system is different:
J2ME: does support
===========
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.Form;
import javax.microedition.media.*;
import javax.microedition.media.Manager;
import javax.microedition.media.control.*;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
J2SE:
=====
dont support them, none of those??????? How can i translate them, j2ME to >> j2SE!!!!!, I need atleast those alternatives.
1. Network
- socket = (UDPDatagramConnection) Connector.open("datagram://:" + localPort);
- Datagram send = socket.newDatagram(result, result.length, destAddr);
- Datagram receive = socket.newDatagram(socket.getMaximumLength());
2. Audio capture
- RecordControl rc;
- p = Manager.createPlayer("capture://audio");
3. Audio player
- pnew = Manager.createPlayer(recordedInputStream, "audio/X-wav");
- public class AudioPlayer extends Thread implements PlayerListener {
- Player pnew = null;
- 05-17-2010, 06:33 PM #12
Here's all I can think of:
To recode the program to use J2Se vs the ME
remove all the import javax.microedition.... statements,
compile the program, get the list of errors and then go into the J2SE API doc and find if there is a class that could work and add an import statement for the package it's in.
No idea if the classes are compatible or if they'll need lots of recoding.
Good luck.
- 05-19-2010, 03:53 AM #13
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 05-19-2010, 03:55 AM #14
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Apache / Tomcat and a separate JavaSE program
By lambi in forum NetworkingReplies: 6Last Post: 03-30-2010, 09:00 AM -
Database JPA,JTA,Validator,etc. on JavaSE
By jicxicmic in forum New To JavaReplies: 0Last Post: 08-31-2009, 03:49 PM -
WAS migration from 5.1 to 6.0
By sneha1234 in forum Other IDEsReplies: 0Last Post: 02-21-2009, 06:56 AM -
Using USB in JavaSE
By hobbyist in forum New To JavaReplies: 0Last Post: 01-26-2008, 12:31 PM -
IE7 Migration
By Aneesha in forum Advanced JavaReplies: 1Last Post: 12-04-2007, 03:58 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks