[ask]Error Java WTK

Tempat nongkrong. Diskusi bebas di luar topik.
User avatar
SinauUbuntu
Posts: 168
Joined: 03 Mar 2011, 11:20
Location: surabaya,indonesia

[ask]Error Java WTK

Postby SinauUbuntu » 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
Posts: 281
Joined: 06 Jun 2011, 00:57
Location: Jakarta
Contact:

Re: Error Java WTK

Postby dhiemaz_mitnick » 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
Posts: 168
Joined: 03 Mar 2011, 11:20
Location: surabaya,indonesia

Re: Error Java WTK

Postby SinauUbuntu » 21 Jul 2011, 20:06

jadi yang dibenerin apanya?
masih belum paham...

*mohon maklum :)
User avatar
dhiemaz_mitnick
Posts: 281
Joined: 06 Jun 2011, 00:57
Location: Jakarta
Contact:

Re: Error Java WTK

Postby dhiemaz_mitnick » 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
Posts: 281
Joined: 06 Jun 2011, 00:57
Location: Jakarta
Contact:

Re: Error Java WTK

Postby dhiemaz_mitnick » 21 Jul 2011, 21:30

coba masukan jar / library ini "javax.microedition.midlet.*;" kedalam project lo..
User avatar
SinauUbuntu
Posts: 168
Joined: 03 Mar 2011, 11:20
Location: surabaya,indonesia

Re: Error Java WTK

Postby SinauUbuntu » 22 Jul 2011, 18:41

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

Return to “Pembicaraan Bebas”

Who is online

Users browsing this forum: Google [Bot], MichxealSnuby and 7 guests