PDA

View Full Version : UnJar > Change Content > Jar ?!



anemo
22-08-2003, 12:41 PM
Hi!

I'm trying to translate the language in a game. Therefore i extracted the .jar, made the changes to the proper files and then I tried to compress it to a .jar again using WinJar + Jar32. I manage to make a new .jar but it's a bit smaller and doesn't work...

How is this done properly? :confused:

bugger
22-08-2003, 01:30 PM
did u also make adjustments to the jad file?? well.. i was thinking of doing of changing the pics on some xxx games myself.. but haven't got around to doing it.. probably on the same principle u are using.. so tell me how things work out

anemo
22-08-2003, 02:08 PM
It seems like WinJar doesn't produce a vaild .jar to use in the Nokia. Or maybe there is something I have to change in the settings to make it work. Very strange...

pookiege
22-08-2003, 02:21 PM
Hi guys,
first of all : a jar file is a zip file, so you just have to compress your folder with winzip and rename the file to get a jar.

According to my experience, if you just want to change a graphic, it's very easy. But if you want to modify the program itself, it's quite hard. Of course you won't have source files in the jar, so you have to decompile the class file. Unfortunately, it seems that some games have problems when decompiled. For example, I can't recompile SpaceTaxiPinball, and I had a lot of problems with SuperMario.
But if you manage to compile your modified code, before zipping everything you should go through preverify.exe which is included in the Nokia J2ME SDK, with the emulator.

When your project is verified, zip it, rename the .zip in .jar, change the size in the .jad and everything should work.

By the way, here is SuperMario *without* activation !

anemo
22-08-2003, 05:35 PM
Pookiege:

So the .jar is actually a .zip!??! Very strange... :)

I downloaded the JME SDK but I can't find where to get a personal serial. I downloaded software from Nokia Forum before and got the serial by mail. Maybe I'm blind but I can't find it...

When I tried to zip the modified jar-archive the first time it got to big (65kb) for my 6610 (64kb limit) but then I choosed the 'maximum (slowest)' compression and the file was 63,5kb.

There is a Preverify-program included in the 7210 MIDP SDK. Is it the same as the one in the JME SDK? How is it used?

anemo
22-08-2003, 06:21 PM
I managed to repack a .jar and it worked! :D
There was a small error in the game iTanx which made it unable to run:

java/lang/ClassNotFound
Exception
png

The problem was in the jar-archives META-INF/manifest-file:

MIDlet-1: iTanx, /i,png, GMIDlet

"i,png!?" I corrected it to .."i.png".. and zipped the files and renamed it to .jar. Now it worked!! :D

But I can't "translate" the language changing in the files using notepad. Then I get: java/lang/NullPointerException

Guess I have to use the JME SDK to change stuff like that?!

XMeTaL
22-08-2003, 07:53 PM
I too tried something similar with the same results.Let us know how you get on.

bugger
22-08-2003, 09:53 PM
ok... my programming skills aren't that great... actually non-existant!! anyway... would it be possible to fudge webviewer 3 so there is no 10 day limit on the trial version??