midlet在执行时遇到的问题。

log8341 2004-07-03 10:27:45
我的jar包里有好几个midlet,通过模拟器选择一个执行。可是无论选那个,程序总是执行第一个midlet,请问这是为什么?我的清单如下:Manifest-Version: 1.0
Manifest-Version: 1.0
MIDlet-4: test4, , test.test4
MIDlet-Name: My MIDlet Suite
MIDlet-8: test8, , test.test8
MIDlet-1: test1, , test.test1
MIDlet-7: test7, , test.test7
MIDlet-2: test2, , test.test2
MicroEdition-Configuration: CLDC-1.0
MIDlet-6: test6, , test.test6
MIDlet-3: test3, , test.test3
MIDlet-Vendor: My Vendor
MIDlet-5: test5, , test.test5
MIDlet-9: test9, , test.test9
MIDlet-Version: 1.0
MicroEdition-Profile: MIDP-1.0


真机,模拟器都不行 ,请问专家这是怎么回事?
...全文
158 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
mingjava 2004-07-14
  • 打赏
  • 举报
回复
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/*
* Created on 2004-7-14
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/

/**
* @author E2412C
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class MIDlet1 extends MIDlet
{

private Display display;

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException
{
// TODO Auto-generated method stub
display = Display.getDisplay(this);
display.setCurrent(new Form("1"));
}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp()
{
// TODO Auto-generated method stub

}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
// TODO Auto-generated method stub

}

}
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/*
* Created on 2004-7-14
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/

/**
* @author E2412C
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class MIDlet2 extends MIDlet
{

private Display display;

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException
{
// TODO Auto-generated method stub
display = Display.getDisplay(this);
display.setCurrent(new Form("2"));
}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp()
{
// TODO Auto-generated method stub

}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
// TODO Auto-generated method stub

}

}
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/*
* Created on 2004-7-14
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/

/**
* @author E2412C
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class MIDlet3 extends MIDlet
{

private Display display;

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException
{
// TODO Auto-generated method stub
display = Display.getDisplay(this);
display.setCurrent(new Form("3"));
}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp()
{
// TODO Auto-generated method stub

}

/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
// TODO Auto-generated method stub

}

}
MIDlet-3: MIDlet3,,MIDlet3
MIDlet-Jar-Size: 2172
MIDlet-2: MIDlet1,,MIDlet1
MIDlet-1: MIDlet2,,MIDlet2
MIDlet-Jar-URL: MIDlets.jar
MicroEdition-Configuration: CLDC-1.0
MIDlet-Version: 1.0.0
MIDlet-Name: MIDlets
MIDlet-Vendor: Midlet Suite Vendor
MicroEdition-Profile: MIDP-1.0
mingjava 2004-07-14
  • 打赏
  • 举报
回复
Manifest-Version: 1.0
MIDlet-4: test4, , test.test4
MIDlet-Name: My MIDlet Suite
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 这个名字指定为你的jar包的名字,例如MIDlets.jar MIDlet-Name:MIDlets


MIDlet-8: test8, , test.test8
MIDlet-1: test1, , test.test1
MIDlet-7: test7, , test.test7
MIDlet-2: test2, , test.test2
MicroEdition-Configuration: CLDC-1.0
MIDlet-6: test6, , test.test6
MIDlet-3: test3, , test.test3
MIDlet-Vendor: My Vendor
MIDlet-5: test5, , test.test5
MIDlet-9: test9, , test.test9
MIDlet-Version: 1.0
MicroEdition-Profile: MIDP-1.0
m16jerry 2004-07-14
  • 打赏
  • 举报
回复
那位仁兄可以给我java(jaxb.jar)文件,拜托各位那位仁兄可以给我java(jaxb.jar)文件,拜托各位
mingjava 2004-07-14
  • 打赏
  • 举报
回复
我用的wtk2。1自己带的模拟器
log8341 2004-07-14
  • 打赏
  • 举报
回复
你用的什么模拟器啊?我用的是西门子m55,mc60也不行。
mingjava 2004-07-14
  • 打赏
  • 举报
回复
不会的 我下面给你贴的代码是我在eclipse下运行通过后给你贴出来的。
log8341 2004-07-14
  • 打赏
  • 举报
回复
mingjava
我改了名字也不行啊!
yg1982 2004-07-13
  • 打赏
  • 举报
回复
可惜我现在无法帮你调试看看,不然你可以发给我帮你解决。
网络咖啡 2004-07-13
  • 打赏
  • 举报
回复
不清楚,mark
log8341 2004-07-13
  • 打赏
  • 举报
回复
什么意思啊?
sunny110 2004-07-12
  • 打赏
  • 举报
回复
mark
log8341 2004-07-08
  • 打赏
  • 举报
回复
ding
log8341 2004-07-07
  • 打赏
  • 举报
回复
ding
log8341 2004-07-06
  • 打赏
  • 举报
回复
凤林火山look:
Manifest-Version: 1.0
MIDlet-4: rec4, , rec.rec4
MIDlet-Name: My MIDlet Suite
MIDlet-8: rec8, , rec.rec8
MIDlet-1: rec1, , rec.rec1
MIDlet-7: rec7, , rec.rec7
MIDlet-2: rec2, , rec.rec2
MicroEdition-Configuration: CLDC-1.0
MIDlet-6: rec6, , rec.rec6
MIDlet-3: rec3, , rec.rec3
MIDlet-Vendor: My Vendor
MIDlet-5: rec5, , rec.rec5
MIDlet-9: rec9, , rec.rec9
MIDlet-Version: 1.0
MicroEdition-Profile: MIDP-1.0
log8341 2004-07-05
  • 打赏
  • 举报
回复
大家帮帮忙,难道没有人知道?
coolfire19811103 2004-07-05
  • 打赏
  • 举报
回复
一般来说 是没有问题的

是不是 都放在 test包下面

然后 别的 midlet没有 被 test包 包含呢?

能不能把你的 jad 和 jar里面的maniffst 让我看看
log8341 2004-07-05
  • 打赏
  • 举报
回复
但是在6688模拟器可以,而m55真机或模拟器都不行
ecaol 2004-07-05
  • 打赏
  • 举报
回复
UP
roseguns 2004-07-05
  • 打赏
  • 举报
回复
应用程序只有一个入口呀,你做了好几个midlet,但只有一个是主程序。如果你要想运行哪个就运行哪个的话,你就干脆做成分离的多个midlet不就行了?

13,100

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧