Sign in to follow this  
Weitnum

Compiled code? Locked server files?

Recommended Posts

Hi I'm relatively new to modding in java but I've programmed in other languages. The weird thing about the server.jar is I am seeing lots of "Compiled code" in all of the class files which I cannot edit.


 


This is kind of frustrating knowing what I want to do but being unable to do it.


 


Could someone tell me how to unlock/decompile the code? Is there source code out there that I've missed?


 


Maybe I'm using the wrong tool for the job? (Netbeans 8.1)


 


Thanks


Edited by Weitnum

Share this post


Link to post
Share on other sites

Google java compiler plenty of addon for IDE's and standalone


Share this post


Link to post
Share on other sites

I figured the first comment would be google. I've spent the last hour searching for a solution. I was under the impression that netbeans is a java compiler. 


Edited by Weitnum

Share this post


Link to post
Share on other sites

http://www.javadecompilers.com/

 

lets you choose your decompiler, people say cfr and procyon work the best.

Procyon works the best imo.

 

Edit:

 

NVM CFR works better, less errors, still alot thought.

 

Edit Edit:

 

CFR had more errors, i have suddenly turned this into a experiment.

 

EDIT EDIT EDIT: I guess theres going to be alot of these edits.

 

So after eclipse fixed some of the errors, the errors are now about the same, and im pretty sure its because i dont have the LWJGL libraries, but i dont know what version to get.

Edited by Dskaggsgv
  • Like 1

Share this post


Link to post
Share on other sites

Get the version that's in the wurm folder and attach it as referenced libraries, worked for me.


Share this post


Link to post
Share on other sites

So you got decompiled source without errors?


and it work after recompilation?


Share this post


Link to post
Share on other sites

Its next to impossible to decompile the source without errors, thats why we have a modding community, they all will fix the source after so long and the mods will run without errors for a long amount of time.


Share this post


Link to post
Share on other sites

But you got full source that can be recompiled and work without errors?


Maybe github with source for community fixing ?


Edited by masaykh

Share this post


Link to post
Share on other sites

Currently, modders are only fixing and compiling specific classes, not the entire source.  I agree that it would be ideal for a complete source repository with all decompile errors fixed.  It's still early though.  :)

Share this post


Link to post
Share on other sites

i`m only learning Java so my skill is maybe to low for source fixing but i want and will participate in this proccess .


Edited by masaykh

Share this post


Link to post
Share on other sites

you need to include the server.jar and the common.jar in your build path for your workspace (sorry I use eclipse so some of my terms are going to be eclipse based)


 


Once you do that, if using procyon most errors will be gone, occasionally you will need to include some of the library resources to get rid of errors, if you want you could just go ahead and include them all. You do not need to add them to the compile, you just need them there so that you do not get errors.


 


I recommend Luyten, it is a windows GUI version of Procyon, has worked very well for me, for decompiling. Use that to get the actual source code to create your java.


 


For just reading files to find out what you want this is very slow however, look in the eclipse marketplace for JAD, this opens them extremely fast so you can find what you need, DO NOT use it to code however, it is ONLY good for reading.


Share this post


Link to post
Share on other sites

i read on stackoverflow that best decompiler is a integrated in Intelli, But you tell that better is procyon?


and i tried and get good result from CFR (that even can decompile java 8 lambdas)


Share this post


Link to post
Share on other sites

With Stack Overflow it's very important to state exactly what you are trying to do as the situation is complex enough for the answer to be "it depends". IntelliJ has a good decompiler if you want to look through libraries to track down bugs, but regenerating the source code of an arbitrary game is different. I've tried Procyon and it works well enough on this game to get modding, certainly better than the IntelliJ default plugin. There are a few things you need to fix, but they aren't that difficult. 

Edited by Moppy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this