hi i'm lsvife

I am beginner in java programming.
I created a project that will able to send orders via bluetooth using mobile phone for a fast food chain.
I want to add food item by updating the jar file on your mobile phone.
how to do it without using any IDE or WTK???
thanks in advance!!

Dani AI

Generated

wanted a way to push a revised JAR to a phone without using an IDE. replied earlier; below are practical, verifiable routes that actually work in the field depending on what you need to change.

If the menu is stored as a resource (text, JSON, XML, properties) inside the JAR you can replace just that file and repackage the JAR — no Java compiler or toolkit needed. Typical steps:

# inspect JAR contents
jar tf myapp.jar

# extract, edit the data file, rebuild
unzip myapp.jar -d tmp
# edit tmp/path/to/menu.txt
jar cf myapp.jar -C tmp .

If you install via a JAD/OTA, update the MIDlet-Jar-Size entry in the JAD to match the new JAR byte size (use stat -c%s myapp.jar on Linux, or check file properties on Windows). If you push the JAR directly (Bluetooth OBEX or copy to memory card) many phones accept the JAR alone and the JAD is not required.

If the change touches Java classes (menu hard-coded), a rebuild + the Java ME preverification step is required before the phone will accept the suite. That step needs the Java ME toolchain (SDK/WTK or equivalent command-line tools), and if the app uses Bluetooth (JSR‑82) you will likely need to sign the JAR again for full permissions.

Troubleshooting notes: uninstall the old MIDlet before installing a modified JAR if the device refuses updates; ensure MIDlet-Jar-Size and MIDlet-Jar-URL (for OTA) match; re-sign if the original was signed; check available phone memory. For a long-term solution, design the app to fetch menu data from a server so updates do not require repackaging.

Reference: jar tool usage documentation is useful when repackaging (see the JDK jar tool docs).

Recommended Answers

All 2 Replies

You cannot, because you need WTK compiler

Thanks..

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.