FAQ  •  Register  •  Login

Class dump

<<

Tex-Twil

Posts: 30

Joined: Mon May 02, 2011 12:54 pm

Post Thu Jan 05, 2012 1:10 pm

Class dump

Hi,
so this is my 1st try to modify some il2 classes but I even can't get the java classes dumped.

I did the following:

-downloaded the il-2_sturmovik_class_dumper
-renamed il2fb.exe to classdumper.exe
-run the il-2_sturmovik_class_dumper.exe
- created a "files" folder in the root of the il2 installation
- run classdumper.exe

The game starts but I see no classes in the files folder. Do I need the russian il2fb.exe ? If yes, where am I supposed to get it ?

cheers,
Tex
<<

Deutschmark

User avatar

Site Administrator

Posts: 6355

Joined: Sat Jul 12, 2008 4:15 pm

Location: Germany

Post Thu Jan 05, 2012 1:13 pm

Re: Class dump

Right here same place you got the class dumpper 5th one down from the top;
viewforum.php?f=31

Deutschmark
<<

Tex-Twil

Posts: 30

Joined: Mon May 02, 2011 12:54 pm

Post Thu Jan 05, 2012 1:19 pm

Re: Class dump

Deutschmark wrote:Right here same place you got the class dumpper 5th one down from the top;
viewforum.php?f=31

Deutschmark


ah, I haven't seen that :)

Nevertheless, when I do what I said before with the russian il2fb.exe, I get an error message when launching the classdumper.exe:

The program can't start because IL2FB.EXE is missing fro your computer.


EDIT: I used the classdumper.exe from this thread and it worked. I used the classresolver.jar to extract the compiled .class files.

Now what are the steps if I want to modify a class ? Do I have to decompile it, modify it and then recompile it again ? Using jad for example ?

I tried using the JavaBite but it's very difficult to modify any code with it.

EDIT: I think I got it now. I can decompile only the class I want to modify. The rest of the classes can be added in the classpath when compiling again my modified class.
<<

Tex-Twil

Posts: 30

Joined: Mon May 02, 2011 12:54 pm

Post Thu Jan 05, 2012 4:33 pm

Re: Class dump

Hmm so I modified the class I wanted, rehased the class files using

  Code:
java -jar classhasher.jar .


but when I copy the classfiles to the MOD folder it does not work at all. Basically I'm trying to extend the DeviceLink plugin.

The original mod works fine, when I put my modified class it does not. Are there any special requirements for the compiled class files ? Do I have to compile them to a specific Java version ?

thanks
<<

Beowolff

User avatar

FM Moderator

Posts: 234

Joined: Wed Dec 26, 2007 11:49 pm

Location: Tennessee, USA

Post Thu Jan 05, 2012 4:39 pm

Re: Class dump

java 1.3 sdk is what works with IL2. far as i know, NO other sdk version will work, or at least work properly.

also of course, any compiled classfiles have to be 're-hashed' back into a format that IL2 can read. you can't just drop the java file itself back into the game and have it read it.

all of that information and more is available at IL2 Free Modding.

good luck on your project.

S!

Beo
<<

Tex-Twil

Posts: 30

Joined: Mon May 02, 2011 12:54 pm

Post Thu Jan 05, 2012 4:49 pm

Re: Class dump

Tex-Twil wrote: Are there any special requirements for the compiled class files ? Do I have to compile them to a specific Java version ?

thanks


That was probably the reason. I compile the classes now with compatibility to Java 1.3 and it works :) I have my modified DeviceLink.
<<

Beowolff

User avatar

FM Moderator

Posts: 234

Joined: Wed Dec 26, 2007 11:49 pm

Location: Tennessee, USA

Post Thu Jan 05, 2012 7:37 pm

Re: Class dump

good job! :D

Return to MOD Creation Tutorials and Assistance

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.