Skip to content

Latest commit

 

History

History
43 lines (20 loc) · 2.6 KB

File metadata and controls

43 lines (20 loc) · 2.6 KB

Getting Started With Java:

Installing Java:

  • In order to even be able to mod Minecraft Java Edition, I needed to install Java on my computer.

  • There are many ways to do this, with many different versions of Java.


  • I followed this guide by McJty, who does a great service with Minecraft modding tutorials.

  • I clicked on download Java 17 MSI, as Java 17 is used for the newest builds of Minecraft, such as 1.20.1. Next, I went to VSCode (my preferred IDE), and installed the recommended Java development extention pack. Since I will be working with Gradle to actually run Minecraft when I playtest mods, I need VSCode to be able to communicate with it.

  • Secondly, I also downloaded Gradle for forge (linked on the homepage for McJty's tutorial), ensuring to select the zip folder instead of the executable because I needed only to copy a select few files necesary to run Gradle and copy them into my project's directory.


  • Normally, this is where the installation journey ends for most people. I was not like most people.

  • My VSCode did not recognize that I had Java installed (evident due to the big fat error saying command "javac" not found).

  • So I did some research into this issue for VSCode on Windows and managed to fix it after some key discoveries:


  • One: Do not install any Java extensions until after you've installed the language. VSCode automatically searches for your JDK path.

    If you do not have it installed, there won't be anything for it to use. To fix this, you can try re-installing your extensions.

  • Two: If you still have issues, you can go to your environment settings and change your path for JDK. VSCode doesn't like it when you include the bin directory in your path.

    So, go one level up, save your changes, and when VSCode goes to look for Java on your computer, it will be findable.

  • Three: VSCode may need a higher version of Java (21+ to be specific) in order to communicate with Gradle, meaning that you may need two different versions of Java. Java 17 for your environment, but Java 21+ for VSCode's workspace JSON settings.

I had to make a repo to document and save my work in the innevitable circumstance that I accidentally blew everything up, or in the less likely event a file got corrupted. I decided to make one whole repo for my minecraft mods, with resource and mod packs in seperate subdirectories, since knowing my level of CS expertise, they would all be extremeley lightweight.