how to run kvm application

a sample, the code is following:

import javax.microedition.lcdui.*;

import javax.microedition.midlet.*;

public class ListDemo extends MIDlet {

private Display display;

private intmode = List.IMPLICIT;

private Command exitCommand = new Command( "Exit",

Command.SCREEN, 2 );

private Command selectCommand = new Command( "Select",

Command.OK, 1 );

private Command nextCommand = new Command( "Next",

Command.SCREEN, 2 );

public ListDemo(){

}

protected void destroyApp( boolean unconditional )

throws MIDletStateChangeException {

exitMIDlet();

}

protected void pauseApp(){

}

protected void startApp() throws

MIDletStateChangeException {

if( display == null ){ // first time called...

initMIDlet();

}

}

private void initMIDlet(){

display = Display.getDisplay( this );

display.setCurrent( new SampleList( mode ) );

}

public void exitMIDlet(){

notifyDestroyed();

}

public static final String[] items = {

"First", "Second", "Third", "Fourth"

};

class SampleList extends List implements

CommandListener {

private int mode;

SampleList( int mode ){

super( "", mode, items, null );

addCommand( exitCommand );

addCommand( selectCommand );

addCommand( nextCommand );

setCommandListener( this );

switch( mode ){

case IMPLICIT:

setTitle( "Implicit" );

break;

case EXCLUSIVE:

setTitle( "Exclusive" );

break;

case MULTIPLE:

setTitle( "Multiple" );

break;

}

this.mode = mode;

}

public void commandAction( Command c,

Displayable d ){

if( c == exitCommand ){

exitMIDlet();

} else if( c == selectCommand ){

showSelection( false );

} else if( c == SELECT_COMMAND ){

showSelection( true );

} else if( c == nextCommand ){

if( mode == List.IMPLICIT ){

mode = List.EXCLUSIVE;

} else if( mode == List.EXCLUSIVE ){

mode = List.MULTIPLE;

} else {

mode = List.IMPLICIT;

}

display.setCurrent( new SampleList(

mode ) );

}

}

private void showSelection( boolean implicit ){

Alert alert = new Alert(

implicit ? "Implicit Selection"

: "Explicit Selection" );

StringBuffer buf = new StringBuffer();

if( mode == MULTIPLE ){

boolean[] selected = new boolean[ size() ];

getSelectedFlags( selected );

for( int i = 0; i < selected.length; ++i ){

if( selected ){

if( buf.length() == 0 ){

buf.append(

"You selected: " );

} else {

buf.append( ", " );

}

buf.append( getString( i ) );

}

}

if( buf.length() == 0 ){

buf.append( "No items are

selected." );

}

} else {

buf.append( "You selected " );

buf.append( getString(

getSelectedIndex() ) );

}

alert.setString( buf.toString() );

alert.setTimeout( Alert.FOREVER );

display.setCurrent( alert,

display.getCurrent() );

}

}

}

I use the following commands on win32 platform:

1. java ListDemo.java

2. preverify -classpath . ListDemo

3. kvm -classpath . ListDemo

the running results:

ALERT: Unable to load class ListDemo$SampleList

Why? Who can give me a sample run kvm.exe

[3514 byte] By [davidjoin] at [2007-9-26 2:37:27]
# 1
append to the preverify.exe: . preverify -classpath . ListDemo;ListDemo$SampleListgreetingsfr
frSFR at 2007-6-29 10:06:47 > top of Java-index,Java Mobility Forums,Java ME Technologies...