The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » LWUIT

Thread: Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is answered. Helpful answers available: 1. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Jul 10, 2009 1:27 PM by: ethoel
ethoel

Posts: 3
Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project
Posted: Jun 26, 2009 1:27 AM
 
  Click to reply to this thread Reply

Hi,

I'm new to Java ME and have just recently downloaded Eclipse 3.5 with MTJ 1.0 and Java ME SDK 3. When I try to create a simple Hello World program in Eclipse using LWUIT for one of Sun's emulators, I get this error:

Preverification errors: Error preverifying class com.sun.lwuit.Component

I've added LWUIT.jar as an external archive and checked it in Order and Export tab. I get this error even before I write any code.

Creating the same project using Sun's Java_ME_Platform_SDK_3.0.exe app works no problem. What am I doing wrong? Any help is appreciated.

Thanks,

ETH

thisisnotme

Posts: 43
Re: Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project
Posted: Jun 26, 2009 8:54 AM   in response to: ethoel
 
  Click to reply to this thread Reply

Have you set the project's property "Java Compiler->JDK Compliance" to 1.4?

ethoel

Posts: 3
Re: Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project
Posted: Jun 29, 2009 12:32 AM   in response to: thisisnotme
 
  Click to reply to this thread Reply

It was set to 1.3. I tried changing it 1.4 but the problem persists.

Thanks,

ETH

thisisnotme

Posts: 43
Re: Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project
Posted: Jun 29, 2009 12:48 PM   in response to: ethoel
Helpful
  Click to reply to this thread Reply

I tried this using the Sun SDK 3.0 in Eclipse Ganymede and MTJ, and also get lots of problems on the default MSA phone 1. But using Sun's SDK as a stand alone builder, no problems.

Unless someone else has a better solution, all I can say is either use Netbeans with the mobility pack, or use the WTK 2.5.2, or sony ericson's sdk or Nokia's, they all work fine with LWUIT and Eclipse.

ethoel

Posts: 3
Re: Trouble adding LWUIT.jar to Eclipse MTJ MIDlet Project
Posted: Jul 10, 2009 1:27 PM   in response to: thisisnotme
 
  Click to reply to this thread Reply

Thanks, I've gone with NetBeans.

ETH




 XML java.net RSS