hi , guys
i am created one application using jsp and java but i dont know how to make jar, and what configuration nedded in manifest file
i want to play that application in my mobile which is supportion java application

Dani AI

Generated

The original post mixes two different server- and device-side technologies. JSP runs on a web server (it cannot be packaged into a phone JAR), so the practical choices are: keep JSP on a server and deliver pages to capable phone browsers, or build a client-side Java ME MIDlet that runs on the phone and uses HTTP to talk to the JSP backend. This is the distinction pointed out; NetBeans (or Java ME SDK/WTK) will automate packaging for MIDlets as others here noted.

A minimal MIDlet manifest looks like this:

MIDlet-Name: MyApp
MIDlet-Version: 1.0.0
MIDlet-Vendor: ExampleCorp
MIDlet-1: MyApp, /icon.png, com.example.MyMIDlet
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1

The attributes MIDlet-Name, MIDlet-Version, and MIDlet-Vendor are mandatory (and must also appear in the JAD); MIDlet-<n>, MicroEdition-Profile and MicroEdition-Configuration must appear in either the manifest or the descriptor. See the MIDP packaging/manifest rules for exact requirements. (docs.oracle.com)
MIDP manifest and attributes

A concise manual workflow (useful when automating builds or not using an IDE): compile against the CLDC/MIDP APIs, run the preverifier, create the JAR with the manifest, produce a .jad that contains MIDlet-Jar-URL and the exact MIDlet-Jar-Size, then sign the JAR if access to protected APIs is needed. Example CLI lines:

javac -bootclasspath path\lib\cldcapi10.jar;path\lib\midpapi20.jar -d tmpclasses src\*.java
preverify -classpath path\lib\cldcapi10.jar;path\lib\midpapi20.jar -d classes tmpclasses
jar cvfm MyApp.jar MANIFEST.MF -C classes .

Preverification is required for CLDC/MIDP class files; packaging and exact JAD fields are enforced by installers, so IDEs usually save time by doing these steps automatically. (oracle.com)
MIDP packaging guide

Troubleshooting pointers (common pitfalls): an install error like “Error verifying the class …” means the preverify step was missed; mismatched MIDlet-Name/Version/Vendor between JAR and JAD will prevent installation; MIDlet-Jar-Size in the JAD must be the exact byte count of the JAR. As suggested, IDE “Deploy” actions do these steps for typical projects; use the CLI only when a custom build process is needed. (oracle.com)

Recommended Answers

All 13 Replies

Well I will ignore your note on "creating application using jsp" and will continue with rest
If you wish to work with JSP on mobile phone you will not create JAR but use limited browser capability of your phone(as long it is not PDA or some other advance device with full internet browser capabilities) and host your pages on some java hosting server
Or you will use any IDE that has JME plugin (also known as J2ME previously) or download WTK 2.5.2 (is last if I'm correct) and create full GUI, IDE or WTK will automatically create JAR and JAD files for you

Well I will ignore your note on "creating application using jsp" and will continue with rest
If you wish to work with JSP on mobile phone you will not create JAR but use limited browser capability of your phone(as long it is not PDA or some other advance device with full internet browser capabilities) and host your pages on some java hosting server
Or you will use any IDE that has JME plugin (also known as J2ME previously) or download WTK 2.5.2 (is last if I'm correct) and create full GUI, IDE or WTK will automatically create JAR and JAD files for you

Thanks

Hello,
I am beginner in java programming.
I should do one difficult assignment .I confused and I do not knew what to do . can you help me.
with best regards,

Sure, from now on attend the lectures, listen to your prof carefully and do some practice. For now, start with a for dummies type book to figure out what to do. Once you figure out, start coding, and if you have trouble, look into the books, do some research. If you can't find the solution anywhere in the world, then create a new topic. Some one will like to help you. Good luck! :)
P.S: Plz, don't steal any topic.

hi duke
Try Head First Java
It is good book for beginner as well as intermediate

SO you can just use java, then convert to jar? Thats simple! I wanted to make a jar file that tells me when my azures files are done VIA Bluetooth.

hi friends. I am hansal.
I want to create a .jar application for java based mobile. can any one help me out with this...

hi friends. I am hansal.
I want to create a .jar application for java based mobile. can any one help me out with this...

Any IDE with general WTK will do it for you automatically.
So what you using?

i want to create small java applications for nokia java enabled phones ... how i can do it?........ plz help me..... i know java but ..... about mobile nup.

from which book should i study to make a jar file or to be mobile applications..plz help me out..i m a beginner..plz

from which book should i study to make a jar file or to be mobile applications..plz help me out..i m a beginner..plz

JAR and JAD files are produced by IDE (if you correctly added WTK) and available after successful compile. As in regards what to read you should look on top of this forum where there is a thread labeled Starting mobile development [SDK / tutorials / resources / faq]

OK, Here so many are confused to make/create Jar File. Actually, We(Developers) are not creating Jar/Jad file, they are created after Compling(As Peter_Budo said) and if you want to create it, then (This process for NetBeans) Select Project Name in PROJECTS tab and select DEPLOY. The JAR and JAD file you 'll get in Project_Home_Directory/dist Folder. Just transfer these files and install it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.