how to read manifest.mf in an j2me application - java-me

I'm developing a j2me application using Netbeans IDE and LWUIT library. I need to read some attributes of MANIFEST.MF that are included in jar file.
What all I found in net, either have conflict with j2me or are not working with Netbeans.
How to read these attributes at run time?

Use Display.getInstance().getProperty() to extract custom values from the jad.

Related

javax.microedition.lcdui does not exist

I am trying to learn j2me so I try a simple j2me app at netbeans but code can not find javax.microedition.lcdui package.I have install Java 1.8 with J2ME
The project at netbeans has cldc 1.8 and MEEP 8.
The code can find javax.microedition.midlet, lcdui does not exist anymore?
i had this problem too. The reason is because java me sdk uses micro edition and embedded profile(meep) and the lcdui class is a part of midp. Any app created on an meep profile using lcdui class is denied by the compiler. The possible solution is downloading the wtk. It includes the midp profile and lcdui class

Generating netbeans project with Lwuit

I am trying to generate a netbeans project with Lwuit editor. But gets this error message that some library are missing and that WTK 2.5.2 CLDCC Cannot be found. any idea on how to fix this
http://www.oracle.com/technetwork/java/javame/javamobile/download/lwuit/index.html
Is the location of the library that you must download.
Additionally you may need the wireless toolkit though I am not sure why.
http://www.oracle.com/technetwork/java/download-135801.html
If you are writing for mobile devices I strongly recommend that you check out Codename One which is the open source product developed by the original designers at Sun of lwuit. http://www.codenameone.com/

How to make a executable file of JavaFX 2.0 project?

I want to make a executable file of my project which I made in JavaFX 2.0. Can anyone help me with this?
The JavaFX team implemented support for this in the tools bundled with the JavaFX 2.2 SDK (included in Java7 from update 6). The JavaFX packaging toolset for packaging executables is documented in self-contained application section of the JavaFX deployment guide.
See RT-19446 "Add ability to co-bundle Java + JavaFX + App into a single native executable" for more information (anybody can sign up to view the jira).
3rd party tools such as the JavaFX maven plugin or the JavaFX gradle plugin, streamline integration of building native JavaFX executables using common build systems.
The JavaFX packaging tools can also be used to natively package any Java application, not just JavaFX applications. For example, a Swing application, as demonstrated by this shell script for packaging a Swing application using JavaFX on OS X.
If you want to do the packaging for the 2.0 or 2.1 versions of JavaFX (not JavaFX 2.2+), then you should review Packaging JavaFX Applications as Native Installers.
Javafx 2+ can now easily be packaged as a native exe (with an added payload, which the current JRE), the up to date (as in the end of 2012) article is here: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm
Out of curiosity I created an executable on Windows (copy-pasting the netbeans build code into netbeans' build.xml) from the canvas and the hello world examples: the app is around 20k, the executable/launcher is around 80k and the added runtime is 138mb.
By the way if you have an older netbeans install (installed with a pre 1.7jdk) you may have to update it or edit its netbeans.conf fixing the "netbeans_jdkhome" path, otherwise the bundled executable's packaging may fail.
There are several tools to generate a customized exe launcher for your Java application.
I have good experience with Winrun4J: http://winrun4j.sourceforge.net/
but you will always need an installed Java/JavaFX Runtime even if you have an .exe that contains all your code.

JBlend with LWUIT

I have made some applications on J2ME using LWUIT, CLDC 1.1, MIDP 2.0 and they are working great on Nokia handsets.
But when I tried to install these applications on Huawei G7206 (JBlend) some of the applications gives error (NOT SUPPORTED) and some crashes without displaying anything.
I have tested an application without LWUIT and it worked.
My question is,
what is the issue?
Either JBlend does not support LWUIT? or I have to downgrade my applications (I mean to remove some features)?
Does anyone know the limitations to work with JBlend?
Have you tested your applications on other devices?
Confirm that your jad doesn't include any other hidden requirements, jblend generally works with LWUIT but some VM's don't handle the full LWUIT properly and require an obfuscated application or similar hacks.
Whenever we use LWUIT in application the size of the application increase because of the jar file which we add in it. By obfuscation we can reduce the size of .jar file. And can become able to run in device.
Please try of obfuscate the application. You might get the solution of your problem

Is this possible to use LWUIT in sun java wireless toolkit 2.5.2 midp2.0?

please let me know whether it is possible or not? if yes give me the procedure to setup and run the application.
You can easily use LWUIT with java wireless toolkit. You can use LWUIT 1.4 jar file. If you want to latest source code, checkout here... Use netbeans, build the LWUIT project and get latest LWUIT jar file. Netbeans already having sun java wireless toolkit 2.5.2. In eclipse you need to add the plugin for this. and use the LWUIT jar file for your application.
LWUIT is a framework.That builds upon j2me.Better u refer the oracle site for further information.

Resources