Skip to content

This is a tool to help reverse-engineering Java code. It's meant to help with reversing the source code from the game Project Zomboid.

License

Notifications You must be signed in to change notification settings

quarantin/beautiful-java

Repository files navigation

BeautifulJava

BeautifulJava is a tool meant to help with reversing the source code from the game Project Zomboid.

Once setup properly, BeautifulJava will do the following for you:

  • Grab the Java class files from Project Zomboid folder
  • Decompile them using the Java decompiler from IntelliJ
  • Rename missing symbols (such as var1, var2, var3, etc), based on their type.

Prerequisites

Zomboid

Obviously you need Project Zomboid installed:

https://projectzomboid.com/

To configure BeautifulJava, you'll have to find the path to Zomboid install folder. Open Steam, go to your Library section, right-click the game Project Zomboid, select Properties..., choose LOCAL FILES, then click the Browse... button. Open the properties of any file available in the window that just opened and copy its location.

This is the path you'll have to set for ZOMBOID when configuring BeautifulJava.

IntelliJ

You also have to install IntelliJ Community Edition. BeautifulJava is using IntelliJ for disassembling and formatting the code. It can be downloaded from here:

https://www.jetbrains.com/idea/download/

Remember the location where you install IntelliJ. This is the path you'll have to set for INTELLIJ when configuring BeautifulJava.

Prerequisites for Linux

  • Install Git:

      sudo apt install git
    

Prerequisites for Mac OSX

Prerequisites for Windows

Installing BeautifulJava

Once you've got Zomboid, IntelliJ, and the prerequisites for your operating system installed, you can proceed to installing BeautifulJava.

Start a Bash interpreter (or Git Bash). If you want to checkout the code using git, run the following commands:

cd "${HOME}"
git clone https://github.com/quarantin/beautiful-java

If you prefer you can download BeautifulJava as a Zip archive:

cd "${HOME}"
wget https://github.com/quarantin/beautiful-java/releases/download/0.0.1/BeautifulJava.zip
unzip BeautifulJava.zip

Configuring BeautifulJava

Type the following commands:

cd "${HOME}/beautiful-java"
cp resources/config.txt.example config.txt

Edit the file config.txt according to your setup. You have to identify the section for your operating system, and remove the ';' character in front of the lines starting with INTELLIJ and ZOMBOID. Replace the paths with the values from previous steps. When done, just save the file and quit the editor.

Configuration for Linux

vim config.txt

Configuration for Mac OSX

open -a TextEdit config.txt

Configuration for Windows

start notepad++ config.txt

Using BeautifulJava

To run BeautifulJava, type the following commands and wait for the script to finish. It should take at minimum a few minutes:

cd "${HOME}/beautiful-java/"
./BeautifulJava

Once the script has finished running, the Java source files should be available in this folder:

${HOME}/beautiful-java/pz/

or if you decompiled the server part of Zomboid:

${HOME}/beautiful-java/pzserver/

Updating BeautifulJava

If you installed BeautifulJava using git, you can update the code as follow:

cd "${HOME}/beautiful-java/"
./bin/update

Otherwise you can uninstall BeautifulJava and start over the install process.

Uninstalling BeautifulJava

To uninstall BeautifulJava, simply delete beautiful-java folder:

cd "${HOME}"
rm -rf beautiful-java

Bugs

Please report bugs here.

About

This is a tool to help reverse-engineering Java code. It's meant to help with reversing the source code from the game Project Zomboid.

Resources

License

Stars

Watchers

Forks

Packages

No packages published