[ask]Error Java WTK

Tempat nongkrong. Diskusi bebas di luar topik.
Post Reply
User avatar
SinauUbuntu

[ask]Error Java WTK

Post 21 Jul 2011, 18:55

Lagi iseng2 nyoba j2me developing.
Tapi dimana2 kalo coba2 pasti ada salahnya...

Code:
// Sample adapted from http://developers.sun.com/mobility/midp ... /wtoolkit/
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class HelloWorld
extends MIDlet
implements CommandListener
{
private Form mMainForm;
public HelloWorld()
{
mMainForm = new Form("HelloWorld");
mMainForm.append(new StringItem(null, "Hello, World!"));
mMainForm.addCommand(new Command("Exit", Command.EXIT, 0));
mMainForm.setCommandListener(this);
}
public void startApp()
{ Display.getDisplay(this).setCurrent(mMainForm); }
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void commandAction(Command c, Displayable s)
{ notifyDestroyed(); }
}
Error:
Unable to create MIDlet HelloWorld
java.lang.ClassNotFoundException: HelloWorld
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Selector.run(+22)
kenapa ya???
dicari di google adanya penjelasan WTK di "wedous"...
Last edited by SinauUbuntu on 27 Feb 2016, 18:18, edited 1 time in total.
Reason: nambahi judul


User avatar
dhiemaz_mitnick
Contact:

Post 21 Jul 2011, 19:17

ClassDefNotfoundException itu error umum yang dikarenakan class atau library yang diperluin ga lo includekan didalam paket jar nya..


User avatar
SinauUbuntu

Post 21 Jul 2011, 20:06

jadi yang dibenerin apanya?
masih belum paham...

*mohon maklum :)


User avatar
dhiemaz_mitnick
Contact:

Post 21 Jul 2011, 21:29

Lo bikinnya ini pake Eclipse atau pake netbeans..? kalo pake eclipse, lo copy semua jar yang berkaitan dengan code yang lo gunakan kedalam projectnya lo ini.


User avatar
dhiemaz_mitnick
Contact:

Post 21 Jul 2011, 21:30

coba masukan jar / library ini "javax.microedition.midlet.*;" kedalam project lo..


User avatar
SinauUbuntu

Post 22 Jul 2011, 18:41

saya pake' Java Wireless toolkit for CLDC...
sudah "import javax.microedition.midlet.*;"


Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests