Hello!
I use J2ME Wirless Toolkit and I would like to be able to compile and run apps that uses the m3g-pakage.
I have downloaded the zipfile (classes.zip) that contains the class files but I do not know where to put it in the J2ME Wirless Toolkit folder structre. I have tried to put it under bin, lib and wtklib. But nothing helps.
I have also tried to create a jar file from the zip file like unzip it and jar it with jar.exe and put it in the same folders.
The compile/build errors:
Project "cubes" loaded
Project settings saved
Building "cubes"
C:\WTK22\apps\cubes\src\cubes\CubeGame.java:26: package javax.microedition.m3g does not exist
import javax.microedition.m3g.*;
^
1 error
com.sun.kvem.ktools.ExecutionException
Build failed
So I think you agree with me when I say that my J2ME Wirless Toolkit does not find the classes that I have downloaded from:
http://www.forum.nokia.com/main/1,,1...00.html#jsr184
Best regards
Fredrik
The code so for:
package cubes;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.CommandListener;
import java.lang.IllegalArgumentException;
import java.io.IOException;
import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import javax.microedition.lcdui.Image;
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.m3g.*;
public class CubeGame extends MIDlet implements CommandListener
{
public void startApp()
{
Display display = Display.getDisplay(this);
Form mainForm = new Form("CubeGame");
mainForm.append("CubeGame!");
Command exitCommand = new Command("Exit", Command.EXIT, 0);
mainForm.addCommand(exitCommand);
mainForm.setCommandListener(this);
display.setCurrent(mainForm);
}
public void pauseApp ()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command c, Displayable s)
{
if (c.getCommandType() == Command.EXIT)
{
notifyDestroyed();
}
}
}

Reply With Quote

