Nicht installieren. Ungültige Datei. J2ME -Anwendung

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Nicht installieren. Ungültige Datei. J2ME -Anwendung

by Anonymous » 25 Aug 2025, 14:41

Ich habe eine J2Me Midlet -Anwendung gestellt. Ich habe den Code geschrieben, ihn an Java 1.2 -Bytecode zusammengestellt, ihn vorhergesagt und dann in das Glas gepackt. Aber als ich es an mein Nokia N72 schickte, heißt es: kann nicht installiert werden. Ungültige Datei.
Ich habe versucht, JAR -Archiv mit ZIP zu machen, aber es hat wieder nicht funktioniert.
Dies sind meine Manifest- und JAD -Datei, aber ich denke, sie haben keine Probleme.

Code: Select all

MIDlet-1: Hello!, icon.png, Hello
MIDlet-Jar-Size: 1932
MIDlet-Jar-URL: Hello.jar
MIDlet-Name: Hello!
MIDlet-Vendor: Mehrzad
MIDlet-Version: 1.1
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0`
Manifest.mf

Code: Select all

Manifest-Version: 1.0
MIDlet-1: Hello!, icon.png, Hello
MIDlet-vendor: Mehrzad
MicroEdition-Configuration: CLDC-1.1
MIDlet-name: Hello!
MIDlet-version: 1.1
Created-By: 1.8.0_381 (Oracle Corporation)
Nokia-MIDlet-Category: Application
MicroEdition-Profile: MIDP-2.0`
< /code>
Dies ist mein Code (hello.java): < /p>
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class Hello extends MIDlet {
private Form form;
private Display display;

public Hello() {
form = new Form("Hello, World!");
form.append("Powered by JavaME");
}

public void startApp() {
display = Display.getDisplay(this);
display.setCurrent(form);
}

public void pauseApp() { }

public void destroyApp(boolean uncoditional) { }
}
< /code>
Ich habe diese Befehle für kompiliert, prävrifizieren und jar machen: < /p>
javac -source 1.2 -target 1.2 -classpath /path/to/midpapi20.jar Hello.java

preverify1.1 -classpath /path/to/midpapi20.jar:/path/to/rt.jar Hello -d output

mv icon.png output

cd output

jar -cvf Hello.jar Hello.class icon.png

jar -ufm Hello.jar MANIFEST.MF

Top