This can't be the problem. When I copy the code into a new EclipseME project, 
it runs just fine (Run As -> Java Application). Add a println in main; it 
prints something. This is of course not exactly J2ME.

What happens if you create a J2ME package and then run the midlet using a J2ME 
configuration? For me, it just starts the emulator with a Midlet that does 
nothing.

I think maybe the devices are not properly configured.

Maybe the project is not a J2ME project? J2ME -> Convert to J2ME Midlet Suite

Using a JDK instead of JRE as suggested by Ashish might help, too.

Did you perhaps install the JRE after the WTK? This can lead to unexpected 
problems, which are solved when the WTK is reinstalled.

Heiko

-------- Original-Nachricht --------
> Datum: Fri, 01 Feb 2008 12:09:54 +0100
> Von: Markus Sinner <[EMAIL PROTECTED]>
> An: eclipseme-users@lists.sourceforge.net
> Betreff: Re: [Eclipseme-users] Problem running ElipseME 1.7.7

> Maybe you should read tutorials? Surely this is NOT a common problem,
> but wrong implementation of Midlets.
> 
> Midlets do NOT run by getting called a main-Method - who generated such
> a Template? Its completely different from "normal"
> High-Level-Java-Programming, so forget about what you learned :-)
> 
> Midlets have a so called "lifecycle". startApp() is called each time the
> midlet is braught into foreground, ans pauseApp() is called if the
> platform sends it into the background (some devices can do this, like
> Symbian onces).
> 
> A good tutorial can be found here:
> http://today.java.net/pub/a/today/2005/02/09/j2me1.html
> 
> Greetings,
> Markus
> 
> Martin Milan schrieb:
> > Hi there - VB.Net / C# coder with a sense of adventure here...
> > 
> > I've read a few books on Java, and decided to give it a whirl - having
> > used Eclipse 3.3 to knock together a quick "Hello World" app with Swing,
> > I've decided to try and create a small application for mobile phones.
> > EclipseME looks like just the sort of think I'm after then, no?
> > 
> > So, I've got Eclipse Version: 3.3.1.1 <http://3.3.1.1> Build id:
> > M20071023-1652 installed to d:\eclipse\eclipse.
> > I've got the Sun jre1.6.0_03, hidden away in c:\program files...
> > I've got the Sun Wireless Toolkit 2.5.2 installed at c:\WTK2.5.2.
> > EclipseME 1.7.7 running as a plugin on Eclipse...
> > 
> > I've "written" the following as a first midlet...
> > 
> > import javax.microedition.midlet.MIDlet;
> > import javax.microedition.midlet.MIDletStateChangeException;
> > 
> > 
> > public class CMainForm extends MIDlet {
> > 
> >     protected void destroyApp(boolean arg0) throws
> > MIDletStateChangeException {
> > 
> >     }
> > 
> >     protected void pauseApp() {
> >         // TODO Auto-generated method stub
> > 
> >     }
> > 
> >     protected void startApp() throws MIDletStateChangeException {
> >         // TODO Auto-generated method stub
> > 
> >     }
> > 
> >     /**
> >      * @param args
> >      */
> >     public static void main(String[] args) {
> >         // TODO Auto-generated method stub
> > 
> >     }
> > 
> > }
> > 
> > 
> > In other words - just the stubs... When I try and debug this in eclipse,
> > I'm getting a UnsatisfiedLinkError. Here's the stack trace:
> > 
> > Exception in thread "main" java.lang.UnsatisfiedLinkError:
> >
> com.sun.midp.main.Configuration.getProperty0(Ljava/lang/String;)Ljava/lang/String;
> >     at com.sun.midp.main.Configuration.getProperty0(Native Method)
> >     at
> com.sun.midp.main.Configuration.getProperty(Configuration.java:32)
> >     at com.sun.midp.lcdui.Resource.<clinit>(Resource.java:30)
> >     at com.sun.midp.main.Main.initSystemLabels(Main.java:686)
> >     at com.sun.midp.main.Main.main(Main.java:103)
> > ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code
> > = -2
> > JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): 
> > [../../../src/share/back/util.c:820]
> > 
> > I've tried looking on Google, and it seems this is a common problem, and
> > one that ought to be obvious for people who know what they are doing
> > with Eclipse. Any cnance of a hint for us beginners?
> > 
> > Cheers,
> > 
> > Martin
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Eclipseme-users mailing list
> > Eclipseme-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/eclipseme-users
> 
> -- 
> 
> *********************************
> [EMAIL PROTECTED]
> http://www.psitronic.de
> 
> psitronic IT-Solutions
> Markus Sinner
> W-Rathenau-Str. 14 - 68642 Bürstadt
> Tel.: (+49)6206 / 963513
> Fax:  (+49)6206 / 963514
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Eclipseme-users mailing list
> Eclipseme-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipseme-users

-- 
----
I condem'n the abuse of apostrophe's.


Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Eclipseme-users mailing list
Eclipseme-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/eclipseme-users

Reply via email to