×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    2

    How to use m3g-package with J2ME Wireless Toolkit

    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();
    }
    }
    }

  2. #2
    Registered User
    Join Date
    Feb 2005
    Posts
    2

    I solved it

    Hello!

    I solved it, i never needed to download anything, everything is included in J2ME WTK.

    I just needed to changed the project settings so it used Mobile 3D support.
    Easy as that!

    /Fredrik

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    2

    Re: How to use m3g-package with J2ME Wireless Toolkit

    hi,

    i'm also trying to use this package.
    how do i include it in the project ?
    is it possible to downlad the package (as a jar or zip file) from some website ?

    any suggestions/comments are most welcome

    regards..brijesh

  4. #4
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: How to use m3g-package with J2ME Wireless Toolkit

    hi brijesh,
    what's the problem?
    Sun WTK from 2.2 through 2.3 to 2.5 Beta contains JSR184 api,
    http://java.sun.com/products/sjwtool...nload-2_2.html
    your sources won't actually compile if linked api is not present,

    regards,
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×