voila oi odhgies gia na ftiakseis 1 arheio me polla jar!!!
Jar files usually contains an only midlet, defined in the file META-INF/MANIFEST.MF inside the jar file this way:
MIDlet-1: MotoGP 2, /MotoGP2/gfx/icon.png, MotoGP2.MotoGP2
where "MotoGP 2" defines the midlet name, "/MotoGP2/gfx/icon.png" defines the icon, and "MotoGP2.MotoGP2" the main class of the jar file.
MIDlet-1 defines the number of order of the midlet in respect to the others in the jar file, so MIDlet-1 will be the first midlet, MIDlet-2 the second, etc.
The max number of midlets per jar in the vxxx is 3.
Let's suppose that we have 3 car games, carlos sainz, collin mcrae and outroad, and we want to have the 3 midlets in 1 with the name "car games".
- Create a new folder called "car games"
- Inside that folder, create a new folder called "sainz", other called "mcrae", other called "outroad", and other called "3in1"
- Extract the contents of each jar file in its respective folder.
- Copy everything from the sainz folder, but the META-INF folder, on the 3in1 folder.
- The same with mcrae and outroad folder
When copying outroad's content, you will get a "icons\ folder already exists...", simply copy the contents of the outroad\icons folder in the 3in1\icons folder.
- now move one of the META-INF folders from any game to the 3in1 folder, for example carlos sainz's META-INF folder.
- Edit the file 3in1\META-INF\MANIFEST.MF, with notepad for example, you will see this:
Manifest-Version: 1.0
MIDlet-Name: Carlos Sainz Rally
MIDlet-1: Carlos_Sainz, /icons/WRC_icon.png, Zigurat.Car2003.MainClass
MIDlet-Version: 1.0.0
MIDlet-Vendor: Gaelcomobile
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
If you create the .jar file at this point, you will have a .jar file containing the 3 games, but you will only be able to execute carlos sainz, because its the one which is defined in the manifest file.
- Now you have to add the other 2 midlets to the manifest file, edit mcrae\META-INF\MANIFEST.MF, copy the line that defines the midlet:
MIDlet-1: colin mcrae rally 4, /icon.png, Main
and add it to the manifest file at 3in1\META-INF, which will look like this
Manifest-Version: 1.0
MIDlet-Name: Carlos Sainz Rally
MIDlet-1: Carlos_Sainz, /icons/WRC_icon.png, Zigurat.Car2003.MainClass
MIDlet-1: colin mcrae rally 4, /icon.png, Main
MIDlet-Version: 1.0.0
MIDlet-Vendor: Gaelcomobile
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
- And do the same with outroad, edit outroad\META-INF\MANIFEST.MF, copy the midlet's line, and add it to the manifest file at 3in1\META-INF
Manifest-Version: 1.0
MIDlet-Name: Carlos Sainz Rally
MIDlet-1: Carlos_Sainz, /icons/WRC_icon.png, Zigurat.Car2003.MainClass
MIDlet-1: colin mcrae rally 4, /icon.png, Main
MIDlet-1: OutRoad, /icons/icon.png, OutRoad.MainPRG
MIDlet-Version: 1.0.0
MIDlet-Vendor: Gaelcomobile
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
- And now just modify the final MANIFEST.MF, the one at 3in1\META-INF, set the midlet's order as you like, and the suite name. It should looks like this:
Manifest-Version: 1.0
MIDlet-Name: Car games
MIDlet-1: Carlos_Sainz, /icons/WRC_icon.png, Zigurat.Car2003.MainClass
MIDlet-2: colin mcrae rally 4, /icon.png, Main
MIDlet-3: OutRoad, /icons/icon.png, OutRoad.MainPRG
MIDlet-Version: 1.0.0
MIDlet-Vendor: Gaelcomobile
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
- Last, create the jar file, here goes the classic way:
· open an msdos window
· change the directory to "car games" wherever you created it.
· move the META-INF folder from the "car games\3in1\" folder, to "car games\"
· and create the jar file this way:
C:\car games\> jar cvfm cargames.jar META-INF\MANIFEST.MF -C 3in1 . <------ the dot is also part of the command
· and upload cargames.jar to the phone, and test that all works correctly.
LIMITATIONS:
· the vxxx only supports 3 midlets per jar.
· If two of the games have a .class file with the same name, this won't work.