|
Replies:
35
-
Last Post:
Mar 19, 2009 2:11 AM
by: Shai Almog
|
|
|
|
|
|
|
LWUIT for BlackBerry
Posted:
Sep 2, 2008 1:31 AM
|
|
|
Hi everyone, I like LWUIT very much because it's very cool for J2ME. I tried my LWUIT Demo on Netbean6.1 successfully.However, I run my LWUIT Demo on Simulator of JDE4.5 of BlackBerry unsuccessfully. I deleted M3G helper classes and the 3D Transition classes .I built my project successfully but run unsuccessfully.It show "JVM Error 104 uncaught Exception" .Please help me.Who can give me a simple successful example LWUIT for blackberry.
my email: playerthong@yahoo.com
Message was edited by: playerthong
Message was edited by: playerthong
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 2, 2008 6:31 AM
in response to: playerthong
|
|
|
|
|
Did you also get rid of the SVGImage class? You also need to remove the MediaComponent class
On Tue, Sep 2, 2008 at 4:31 AM, <lwuit-users@mobileandembedded.org> wrote:
> Hi everyone, I like LWUIT very much because it's very cool for J2ME. I > tried LWUITDemo on Netbean6.1 successfully.However, I run LWUITDemo on > Simulator of JDE4.5 of BlackBerry unsuccessfully. I deleted M3G helper > classes and the 3D Transition classes .I built my project successfully but > run unsuccessfully.It show "JVM Error 104 uncaught Exception" .Please help > me.Who can give me a simple successful example LWUIT for blackberry > [Message sent by forum member 'playerthong' (playerthong)] > > http://forums.java.net/jive/thread.jspa?messageID=296632 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > >
-- http://www.spectrumdt.com http://codepimps.org [att1.html]
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 2, 2008 7:14 PM
in response to: playerthong
|
|
|
Hi..
I'm using netbeans 6.1 and Blackberry 8310 and 8110.,in simulator and real device LWUIT works perfectly.,i'm remove all m3g class and transition 3d., Really.,LWUIT works perfectly... Oya.,but in blackberry under blackberry bold they doesn't support SVG class., You also have to remove SVG class in your jar LWUIT .
Thanks..
Asri
Message was edited by: achie3xis
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 2, 2008 8:21 PM
in response to: achie3xis
|
|
|
Hi achie3xis ,Patrick Julien I removed M3G.class,M3G$Callback.class,Transition3D.class,MediaComponent.class.I used "LWUIT_EA" so there is not SVG class.
This is my code:
import com.sun.lwuit.Display; import com.sun.lwuit.Form; import javax.microedition.midlet.*;
/** * @author nmthong */ public class Hello extends MIDlet { public void startApp() { Display.init(this); Form f=new Form("Yeah"); f.show(); }
public void pauseApp() { }
public void destroyApp(boolean unconditional) { } }
I built it successful in JDE4.5 BlackBerry but when I run it in debug mode I received information from debug:
Starting Hello Module 'Hello' has verification errors.Error starting Hello: Module 'Hello' has verification errors.
Hi ,achie3xis ,Could you send your LWUIT library to me by yahoo mail (playerthong@yahoo.com) and your yahoo nick ? Help me ?Who can give me step by step ?
Thanks very much
Message was edited by: playerthong
Message was edited by: playerthong
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 2, 2008 10:00 PM
in response to: playerthong
|
|
|
Hello,,
Ok,,I already send my library lwuit to your email., Are u familiar with netbeans??if u familiar add LWUIT library in Library manager netbeans.,and in your project in "Resources" add that library., Oya and my level obfuscating level is 0!! Before i already try obfuscatong level 0,8,9 and all works!!! I have try your code.,and your code works in my blackberry simulator..
Regards,
Asri
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 30, 2008 2:37 PM
in response to: achie3xis
|
|
|
achie3xis Please send the code from the library LWUIT prepared for Blackberry. I have the same problem.
Thank you very much
Rodolfo Burlando rbmsystems@gmail.com
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 18, 2008 10:18 AM
in response to: achie3xis
|
|
|
Hi achie3xis ,
I have the same problem.
Could you send the code from the library LWUIT prepared for Blackberry?
my e-mail: ar.brandao@gmail.com
Best Regards
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 29, 2008 2:39 AM
in response to: playerthong
|
|
|
Hi, i dont speak english but i try. you can give me step by step ? I have a LWUIT without m3g but i can't star a aplication. I have an error: java.lang.ClassCastException. or SecurityException
import javax.microedition.midlet.MIDletStateChangeException; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.container.MainScreen;
import com.sun.lwuit.Display; import com.sun.lwuit.Form; import com.sun.lwuit.events.ActionEvent; import com.sun.lwuit.events.ActionListener;
public class HelloApp extends UiApplication { public static void main(String argv[]) { System.out.println("main"); HelloApp app = new HelloApp(); app.enterEventDispatcher(); }
public HelloApp() { pushScreen(new HelloLWUITMidlet());
} }
class HelloLWUITMidlet extends MainScreen implements ActionListener {
public HelloLWUITMidlet() {
Display.init(this); Form f = new com.sun.lwuit.Form("Hello, LWUIT!"); f.show(); }
public void pauseApp() { }
public void destroyApp(boolean unconditional) { }
public void actionPerformed(ActionEvent ae) { // notifyDestroyed(); }
protected void startApp() throws MIDletStateChangeException { } }
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Sep 29, 2008 4:45 AM
in response to: juanurielme
|
|
|
|
|
LWUIT expects a MIDP MIDlet not the RIM API.
> Hi, i dont speak english but i try. you can give me step by > step ? I have a LWUIT without m3g but i can't star a aplication. > I have an error: java.lang.ClassCastException. or SecurityException > > import javax.microedition.midlet.MIDletStateChangeException; > import net.rim.device.api.ui.UiApplication; > import net.rim.device.api.ui.container.MainScreen; > > import com.sun.lwuit.Display; > import com.sun.lwuit.Form; > import com.sun.lwuit.events.ActionEvent; > import com.sun.lwuit.events.ActionListener; > > public class HelloApp extends UiApplication { > public static void main(String argv[]) { > System.out.println("main"); > HelloApp app = new HelloApp(); > app.enterEventDispatcher(); > } > > public HelloApp() { > > pushScreen(new HelloLWUITMidlet()); > > } > } > > class HelloLWUITMidlet extends MainScreen implements ActionListener { > > public HelloLWUITMidlet() { > > Display.init(this); > Form f = new com.sun.lwuit.Form("Hello, LWUIT!"); > f.show(); > > } > > public void pauseApp() { > } > > public void destroyApp(boolean unconditional) { > } > > public void actionPerformed(ActionEvent ae) { > // notifyDestroyed(); > } > > protected void startApp() throws MIDletStateChangeException { > > } > } > [Message sent by forum member 'juanurielme' (juanurielme)] > > http://forums.java.net/jive/thread.jspa?messageID=302300 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 14, 2008 12:17 AM
in response to: Shai Almog
|
|
|
so how to make our project that use lwuit to run in blackberry..?? anyone has successfully to run lwuit project in blackberry (BB)....????
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 14, 2008 10:39 AM
in response to: sawal_xp
|
|
|
Yes i have done.
This are my steps:
1. Download https://lwuit.dev.java.net/files/documents/8797/107402/LWUIT_20080814.zip 2. Extract LWUITDemo from LWUIT_20080814.zip to NetBeansProjects 3. Open LWUITDemo\dist\lib\LWUIT.jar with winrar en delete the files com\sun\lwuit\animations\Transition3D.class, M3G$Callback.class, M3G.class and SVGImage.class 4. Configure netbeans for use blackberry emulator http://www.netbeans.org/kb/55/blackberry.html 5. Open LWUITDemo project in netbeans, right clic the project enter properties, change the emulator to blackberry, edit build.xml and run
Message was edited by: daniel_asv
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 14, 2008 8:58 PM
in response to: daniel_asv
|
|
|
i had try with that step, but with configure show in step 4 from netbeans, i didn't get the *.COD file...
how to get it...? and, in another thread Shai said that LWUIT is need MIDP not RIM..
daniel_asv, did you edit your main classMIDLET to be extend to net.rim.device.api.ui.UiApplication..?
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 15, 2008 8:58 AM
in response to: sawal_xp
|
|
|
I get the *.cod with the build.xml
In the build.xml i add before </project> the xml from the page
I don´t extend UiApplication
Message was edited by: daniel_asv
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 16, 2008 5:42 PM
in response to: daniel_asv
|
|
|
hai daniel_asv .. can you publish in this thread your build.xm file...?:) i had edit and doing step like you, but when i build in netbeans, i didn't get the .cod file...
please help me..
daniel_asv, the .cod that you get from compile in netbeans, have you try to run it to emulator or the device, and what the result, is it successful..? if it successful i really need your help..:)
thx...:D
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 19, 2008 2:09 AM
in response to: daniel_asv
|
|
|
hi daniel_asv, thx for your link to download.:) i had try compile your project with netbeans, but i don't get the .COD file.. you said that you had to try in running it with the emulator or device, how to run the project in the blackberry device with only a JAR file or JAD file...?
if the LWUITdemo project you give the link, we can get the COD file, how to make it work..?
please help me...:) thx...:)
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 19, 2008 10:36 AM
in response to: sawal_xp
|
|
|
You need to configure your netbeans like in this page http://www.netbeans.org/kb/55/blackberry.html for use the blackberry emulator
Then search the cod file in the simulator dir
Use
bin/javaloader -usb load Demo.cod
to run in the device
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Nov 19, 2008 1:11 PM
in response to: daniel_asv
|
|
|
Hi achie3xis ,
I have the same problem.
Could you send the code from the library LWUIT prepared for Blackberry?
my e-mail: ar.brandao@gmail.com
Best Regards
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Mar 12, 2009 12:40 AM
in response to: daniel_asv
|
|
|
Hi Shawal
i have implemented the steps which you have given here but i cant able to create the new project after configuring the simulator, its just shows disabled finish button and it get stuck up the Netbeans application i cant able to continue my work there?
can you get me the right solution for implementing this Blackberry application in Netbeans along with Lwuit
with Regards P>Sivasankar
|
|
|
|
|
|
|
|
three font sizes
Posted:
Mar 12, 2009 2:12 AM
in response to: siva80sankar
|
|
|
|
|
Hi,
Is it just me or are other people not satisfied with just three system font sizes?
david
[att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 12, 2009 6:03 AM
in response to: browneye man
|
|
|
|
|
There are at least two of us . I personally find that on most systems the small font is not small enough .
-Maxim
On Thu, Mar 12, 2009 at 12:12 PM, browneye man <oneguitar2002@yahoo.com>wrote:
> Hi, > > Is it just me or are other people not satisfied with just three system font > sizes? > > david > > > [att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 12, 2009 6:45 AM
in response to: Maxim Vladimirsky
|
|
|
|
|
Hi, System fonts are taken from MIDP and unfortunately there are no more then 3 sizes in MIDP, and the size itself is not something we can control. Use bitmaps if the system fonts does not satisfy your needs.
Regards, Chen
Maxim Vladimirsky wrote: > There are at least two of us . I personally find that on most > systems the small font is not small enough . > > -Maxim > > On Thu, Mar 12, 2009 at 12:12 PM, browneye man > <oneguitar2002@yahoo.com <mailto:oneguitar2002@yahoo.com>> wrote: > > Hi, > > Is it just me or are other people not satisfied with just three > system font sizes? > > david > > > [att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 12, 2009 12:07 PM
in response to: Chen Fishbein
|
|
|
|
|
Yeah, I know that. And my comment is by no means a complain about LWUIT. This is just a way to ease my frustration with MIDP by shearing it with the community 
-Maxim
On Thu, Mar 12, 2009 at 4:45 PM, Chen Fishbein <Chen.Fishbein@sun.com>wrote:
> Hi, > System fonts are taken from MIDP and unfortunately there are no more then 3 > sizes in MIDP, and the size itself is not something we can control. > Use bitmaps if the system fonts does not satisfy your needs. > > Regards, > Chen > > > Maxim Vladimirsky wrote: > > There are at least two of us . I personally find that on most systems > the small font is not small enough . > > -Maxim > > On Thu, Mar 12, 2009 at 12:12 PM, browneye man <oneguitar2002@yahoo.com>wrote: > >> Hi, >> >> Is it just me or are other people not satisfied with just three system >> font sizes? >> >> david >> >> >> > [att1.html]
|
|
|
|
|
|
|
|
RE: three font sizes
Posted:
Mar 12, 2009 1:00 PM
in response to: Chen Fishbein
|
|
|
|
|
Hi Maxim, My humble advice regarding fonts: I also thought that bitmap fonts are the solution, however I had to realize that performance was really suffering on a lot of places that was too much to bear for the user. Typical places where you realize this are list scrollings e.g. on menu items. Also if you are tight with memory you have to take into consideration the additional amount of memory the bitmap fonts consume. To be flexible what i did is to have centrally define my fonts so that i can switch to bitmap / sytsem just by using a flag and do not have to replace those references all across the code base. Besides I also considered a hyprid approach. And another thing: underline is not supported yet for bitmap fonts, you have to draw the line yourself... Rgds Ben
-----Original Message----- From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM] Sent: Donnerstag, 12. März 2009 14:45 To: users@lwuit.dev.java.net Subject: Re: three font sizes
Hi, System fonts are taken from MIDP and unfortunately there are no more then 3 sizes in MIDP, and the size itself is not something we can control. Use bitmaps if the system fonts does not satisfy your needs.
Regards, Chen
Maxim Vladimirsky wrote:
There are at least two of us . I personally find that on most systems the small font is not small enough .
-Maxim
On Thu, Mar 12, 2009 at 12:12 PM, browneye man <oneguitar2002@yahoo.com> wrote:
Hi, Is it just me or are other people not satisfied with just three system font sizes? david
[att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 14, 2009 8:32 AM
in response to: saturon
|
|
|
|
|
Thank you for a comprehensive answer, Ben. Hybrid approach is probably the way to go for me.
-Maxim.
On Thu, Mar 12, 2009 at 11:00 PM, saturon <netbeans@vtxfree.ch> wrote:
> Hi Maxim, > > My humble advice regarding fonts: > I also thought that bitmap fonts are the solution, however I had to realize > that performance was really suffering on a lot of places that was too much > to bear for the user. Typical places where you realize this are list > scrollings e.g. on menu items. > Also if you are tight with memory you have to take into consideration the > additional amount of memory the bitmap fonts consume. > > To be flexible what i did is to have centrally define my fonts so that i > can switch to bitmap / sytsem just by using a flag and do not have to > replace those references all across the code base. Besides I also > considered a hyprid approach. And another thing: underline is not supported > yet for bitmap fonts, you have to draw the line yourself... > > Rgds Ben > > > -----Original Message----- > *From:* Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM] > *Sent:* Donnerstag, 12. März 2009 14:45 > *To:* users@lwuit.dev.java.net > *Subject:* Re: three font sizes > > Hi, > System fonts are taken from MIDP and unfortunately there are no more then 3 > sizes in MIDP, and the size itself is not something we can control. > Use bitmaps if the system fonts does not satisfy your needs. > > Regards, > Chen > > Maxim Vladimirsky wrote: > > There are at least two of us . I personally find that on most systems > the small font is not small enough . > > -Maxim > > On Thu, Mar 12, 2009 at 12:12 PM, browneye man <oneguitar2002@yahoo.com>wrote: > >> Hi, >> >> Is it just me or are other people not satisfied with just three system >> font sizes? >> >> david >> >> >> > [att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 18, 2009 1:11 AM
in response to: browneye man
|
|
|
|
|
I've noticed that on my Nokia S60 phone, there are other applications that can control the font size at a much finer scale. I'm guessing that it is the Java VM that is putting the limit on font control. Can anyone comment on that?
My application is a Chinese ebook reader. There are 2500 frequently used Chinese characters in the language. Because of the complexity of Chinese Characters, a font size that is too small is not readable. So if you imagine 2500 medium sized bitmapped Chinese Characters included with my jar, it takes too much space and too long to load.
My problem with system fonts is that every system has a different font size and different font face. This makes my application look and feel different on each device.   But for now, I guess i'll have to live with it, because it is really unpractical to inlude a bitmap font with my application.
Thanks for all your advice.
david
   Thank you for a comprehensive answer, Ben. Hybrid approach is probably the way to go for me.
-Maxim.
On Thu, Mar 12, 2009 at 11:00 PM, saturon <netbeans@vtxfree.ch> wrote:
> Hi Maxim, > > My humble advice regarding fonts: > I also thought that bitmap fonts are the solution, however I had to realize > that performance was really suffering on a lot of places that was too much > to bear for the user. Typical places where you realize this are list > scrollings e.g. on menu items. > Also if you are tight with memory you have to take into consideration the > additional amount of memory the bitmap fonts consume. > > To be flexible what i did is to have centrally define my fonts so that i > can switch to bitmap / sytsem just by using a flag and do not have to > replace those references all across the code base. Besides I also > considered a hyprid approach. And another thing: underline is not supported > yet for bitmap fonts, you have to draw the line yourself... > > Rgds Ben > > > -----Original Message----- > *From:* Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM] > *Sent:* Donnerstag, 12. März 2009 14:45 > *To:* users@lwuit.dev.java.net > *Subject:* Re: three font sizes > > Hi, > System fonts are taken from MIDP and unfortunately there are no more then 3 > sizes in MIDP, and the size itself is not something we can control. > Use bitmaps if the system fonts does not satisfy your needs. > > Regards, > Chen > > Maxim Vladimirsky wrote: > > There are at least two of us . I personally find that on most systems > the small font is not small enough . > > -Maxim > > On Thu, Mar 12, 2009 at 12:12 PM, browneye man <oneguitar2002@yahoo.com>wrote: > >> Hi, >> >> Is it just me or are other people not satisfied with just three system >> font sizes? >> >> david >> >> >> >
[att1.html]
|
|
|
|
|
|
|
|
Re: three font sizes
Posted:
Mar 19, 2009 2:11 AM
in response to: browneye man
|
|
|
|
|
This is an inherent problem of bitmap fonts. You can get the font size using font getHeight() so that shouldn't be the actual problem however the real problem is far worse: Hi DPI. Devices have ridiculously high DPI making a 13 pixel font look tiny on one device and decent on another... The solution we try to offer in some cases is configurability of the default font via system settings, this is pretty easy to do globally in LWUIT by changing the theme Hashtable programmatically when setting the theme. E.g. theme.put("font", myFont);
> I've noticed that on my Nokia S60 phone, there are other applications > that can control the font size at a much finer scale. I'm guessing > that it is the Java VM that is putting the limit on font control. > Can anyone comment on that? > > My application is a Chinese ebook reader. There are 2500 frequently > used Chinese characters in the language. Because of the complexity > of Chinese Characters, a font size that is too small is not readable. > So if you imagine 2500 medium sized bitmapped Chinese Characters > included with my jar, it takes too much space and too long to load. > > > My problem with system fonts > is that every system has a different > font size and different font face. This makes my application look > and feel different on each device. But for now, I guess i'll have > to live with it, because it is really unpractical to inlude a bitmap > font with my application. > > Thanks for all your advice. > > david > > > > > > > > Thank you for a comprehensive answer, Ben. Hybrid approach is > probably the > way to go for me. > > -Maxim. > > On Thu, Mar 12, 2009 at 11:00 PM, saturon <netbeans@vtxfree.ch> wrote: > > > Hi Maxim, > > > > My humble advice regarding fonts: > > I also thought that bitmap fonts are the solution, however I had > to realize > > that performance was really suffering on a lot of places that was > too much > > to bear for the user. Typical places where you realize this are list > > scrollings e.g. on menu items. > > Also if you are tight with memory you have to take into > consideration the > > additional amount of memory the bitmap fonts consume. > > > > To be flexible what i did is to have centrally define my fonts so > that i > > can switch to bitmap / sytsem just by using a flag and do not > have to > > replace those references all across the code base. Besides I also > > considered a hyprid approach. And another thing: underline is not > supported > > yet for bitmap fonts, you have to draw the line yourself... > > > > Rgds Ben > > > > > > -----Original Message----- > > *From:* Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM] > > *Sent:* Donnerstag, 12. März 2009 14:45 > > *To:* users@lwuit.dev.java.net > > *Subject:* Re: three font sizes > > > > Hi, > > System fonts are taken from MIDP and unfortunately there are no > more then 3 > > sizes in MIDP, and the size itself is not something we can control. > > Use bitmaps if the system fonts does not satisfy your needs. > > > > Regards, > > Chen > > > > Maxim Vladimirsky wrote: > > > > There are at least two of us . I personally find that on most > systems > > the small font is not small enough . > > > > -Maxim > > > > On Thu, Mar 12, 2009 at 12:12 PM, browneye man > <oneguitar2002@yahoo.com>wrote: > > > >> Hi, > >> > >> Is it just me or are other people not satisfied with just three > system > >> font sizes? > >> > >> david > >> > >> > >> > > > > >
Shai Almog http://lwuit.blogspot.com/ https://lwuit.dev.java.net/faq.html
[att1.html]
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Jan 29, 2009 7:17 AM
in response to: sawal_xp
|
|
|
Hi,
i did LWUT on BlackBerry. Look those ant script parts - hope this helps.
<target name="compile"> <mkdir dir="${build}/classes"/> <echo message="exec_javac"/> <exec dir="${basedir}/${src}" executable="javac"> <arg line=" -g" /> <arg line=" -verbose" /> <arg line=" -deprecation" /> <arg line=" -extdirs ."/> <arg line=" -source 1.3" /> <arg line=" -target 1.1" /> <arg line=" -sourcepath .;${ui.src}" /> <arg line=" -bootclasspath ${bootclasspath}" /> <arg line=" -d ${basedir}/${build}/classes"/> <arg line=" ${myMIDlet}.java"/> </exec> </target>
After that use proguard
<target name="proguard"> <mkdir dir="${build}/proguard"/> <exec dir="${basedir}/${build}" executable="java"> <arg line=" -jar"/> <arg line=" ${task.dir}/proguard/4.2/proguard.jar" /> <arg line=" -libraryjars ${bootclasspath}" /> <arg line=" -injars ./classes"/> <arg line=" -outjar ./proguard/${file.name}.jar"/> <arg line=" -keep 'public class ${myMIDlet}'"/> <arg line=" -dontusemixedcaseclassnames" /> <arg line=" -dontobfuscate" /> <arg line=" -microedition" /> <arg line=" -verbose" /> </exec> <mkdir dir="${build}/proguard/extract"/> <exec dir="${basedir}/${build}/proguard/extract" executable="jar"> <arg line=" -xf"/> <arg line=" ../${file.name}.jar" /> </exec> </target>
Now put the manifest into it and repack to jar
<target name="build"> <mkdir dir="${build}/bin" /> <mkdir dir="${build}/META-INF"/> <manifest file="${build}/META-INF/MANIFEST.MF"> <attribute name="Manifest-Version" value="1.0"/> <attribute name="MIDlet-Name" value="${program.name}"/> <attribute name="MicroEdition-Configuration" value="${midlet.cldc.version}"/> <attribute name="MicroEdition-Profile" value="${midlet.midpapi.version}"/> <attribute name="MIDlet-Vendor" value="what ever"/> <attribute name="MIDlet-1" value="${program.name},gaia_ico.png,${package.name}.${midlet.name}"/> <attribute name="MIDlet-Version" value="${midlet.version}"/> </manifest> <jar basedir="${build}/proguard/extract" jarfile="${build}/bin/${file.name}.jar" manifest="${build}/META-INF/MANIFEST.MF"> <exclude name="**/.svn"/> <fileset dir="${basedir}/${res}"> <include name="**/**"/> </fileset> </jar> </target>
After that you have to throw this into the rapc compiler
<target name="get_final_cod"> <mkdir dir="${basedir}/${build}/bin/bb" /> <exec dir="${basedir}/${build}/bin/bb" executable="java"> <arg line="-jar ${bb.rapc.jar}" /> <!--arg line="-import=${bb.api} -codename=${program.name}_final -midlet '../${program.name}.jar' '${ui.api}'" /--> <arg line="-import=${bb.api} -codename=${file.name} -midlet '../${file.name}.jar'" /> </exec> </target>
<target name="run" depends="init,compile,proguard,build,get_final_cod"/>
So this could give you some support i think.
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Jan 29, 2009 7:20 AM
in response to: cknappe
|
|
|
Add to last post:
use BlackBerry api in bootclasspath
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Jan 29, 2009 4:09 AM
in response to: Shai Almog
|
|
|
Hi friends, I am also facing the same problem with LWUIT & Blackberry. I have already developed some demo applications for our clients,but today when I go to run it in Blackberry Simulator, i was getting error after installing successfully.first time i become frustrated while resolving the error "verification error 2953 at offset 1e3e" but after searching the error in google i got some references & try to resolve again with all the process was detailed like, deleting Transition3D.class, M3G$Callback.class, M3G.class and SVGImage.class also with deleting MediaComponent.class from the .jar file; making .cod file ; without making .cod file,making project with that .jar file into the Blackberry JDE but all goes in vain. will anybody please help me by providing some code or modified LWUIT.jar file & step wise process which will sufficient to run LWUIT apps on Blackberry.
my mail Id is: susantasweng@gmail.com
Thanx a lot.
|
|
|
|
|
|
|
|
Re: Easiest solution to run LWUIT Apps into BlackBerry
Posted:
Feb 4, 2009 6:44 AM
in response to: Shai Almog
|
|
|
Hi, Shai Almog,
After trying a lot I got a easiest solution and the process is:
Very simple solution to run LWUIT application into Blackberry successfully without Any Error:
The process(I suppose you're on a NetBeans IDE...?): 1) Before using the LWUIT.jar file into your application you have to pre verify that. The command to run is: D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin>preverify -classpath "D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" "D:\NBProjects\LWUITDemo\dist\lib\LWUIT.jar"
2) Then you will get the following errors: i) Error preverifying class com.sun.lwuit.SVGImage VERIFIER ERROR com/sun/lwuit/SVGImage.drawImage(Lcom/sun/lwuit/Graphics;II)V : Cannot find class javax/microedition/m2g/ScalableImage You have to delete that SVGImage.class file from LWUIT.jar because JDE failed to verify it for the above errors.
ii) Then again run that command & you again will get errors: Error preverifying class com.sun.lwuit.animations.Transition3D VERIFIER ERROR com/sun/lwuit/animations/Transition3D.initTransition()V: Cannot find class javax/microedition/m3g/Node And you have to also delete Transition3D.class, M3G.class & M3G$Callback.class files from LWUIT.jar because JDE failed to verify them also. iii) Then again run that command and it will able verify successfully without any message. When pre verifying, all pre verified classes are saved in a subdirectory "output" by default into the JDE “bin� directory.
3) Now take that pre verified LWUIT.jar file and make your application. And after completing your prject with your .jad & .jar file make the .cod file with the following command: D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin>rapc import="D:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename="C:\Documents and Settings\Susanta\Desktop\COD\COD\LWUITApps" -midlet " D:\NBProjects\LWUITApps\dist\LWUITApps.jad" " D:\NBProjects\LWUITApps\dist\LWUITApps.jar" (Where “import� path is the net_rim_api.jar path, �codename� path is the path where you want to make the cod file with name then .jad file path & .jar file path) And you will get the .cod file in the codename path & test it.
# And running LWUITDemo application downloaded from LWUIT website,we need to made a simple change: Resources res2 = Resources.open("/myTheme1.res");
Replace the above statement by the following two
InputStream stream1 = getClass().getResourceAsStream("/resources.res"); Resources res2 = Resources.open(stream1);
Because of some folder structure problem it can not open directly.
Thanks, Susanta
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Jan 8, 2009 5:41 AM
in response to: playerthong
|
|
|
Hi ,
i need LWUIT made for Blackberry. please help me..
My Email id ; manojp_1988@yahoo.co.in,manojp1988@gmail.com.
Thank You..
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Jan 29, 2009 10:21 PM
in response to: manojp_1988
|
|
|
Hi...
read i said before.and u can use LWUIT in blackberry..Ok,i will send u my LWUIT jar to u'r mail..
Regards,
Asri Dwitiya
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Feb 3, 2009 7:57 AM
in response to: achie3xis
|
|
|
Hi ! Asri, Can you send me a copy of BlackBerry version of LWUIT lib?
Thanks, -jdk
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Feb 3, 2009 9:35 PM
in response to: sojourner_jdk
|
|
|
> Hi ! Asri, > Can you send me a copy of BlackBerry version of > LWUIT lib? > > Thanks, > -jdk
Follow my step in netbeans 6.5..
1.copy the newest LWUIT library 2.clean and build with "Off obfuscation level" 3.after that.,add that LWUIT jar to your app 4.clean and build u'r app with "High obfuscation level" 5 and run u'r app
that's really work 4 me.,if after follow my step u found verification error.,i'll send my lwuit jar to u'r mail..thanks
regards,
Asri Dwitiya
|
|
|
|
|
|
|
|
Re: LWUIT for BlackBerry
Posted:
Mar 12, 2009 3:09 AM
in response to: playerthong
|
|
|
can u guide me how to use lwuit for blackberry in netbeans i cant able to work in net beans
with regards sivasankar
|
|
|
|
|