Setting Up Your Workspace (JDK, Eclipse, Forge)

With the new Gradle integrated Forge source, comes a new way to setting up your workspace. In this tutorial I will be explaining how you can set up the Eclipse workspace and necessary dependencies to be able to start modding.

This tutorial will be for the advanced version, which means you can make lots of different mods in one Eclipse workspace. Seems good? Let’s start.

First of all, you need to get JDK, Java Development Kit. You might be saying “Hey EMX, I already have Java, that’s what I use to play Minecraft!” Well, JDK and JRE are different. JDK is Java too, but added with stuff to help you develop your Java apps. To get Java Development Kit, you can go here. Download the corresponding version to your computer, and then install it.

After installing that, you need to set your environment variables. To do this, go to Control Panel -> System and Security -> System, and on the sidebar select Advanced system settings. It will open a new window. Click on Environment Variables, and on the System variables box, i.e. the bottom one, add two new variables:

  • PATH :: C:\Program Files\Java\jdkx.x.x_xx\bin
  • JAVA_HOME :: C:\Progra~1\Java\jdkx.x.x_xx

CaptureCapture

If you already have your PATH variable, and it is not empty, you can add a semicolon (;), and then the new value.

All done? Great. Now, you can download Eclipse. Eclipse is an IDE, which stands for Integrated Development Environment, which will aid in coding your mod. You can download Eclipse here. Eclipse is released as a package, not an installer, so just extract it to a new folder, and you’re done. You should be left with an “eclipse” folder inside your root modding folder.

Okay, now you need to download Forge itself. Download Forge SRC version (or MDK for newer versions) right here. You always want to get the latest version for modding. Extract this archive to a new folder in the modding folder you created earlier. For clarity I will be naming mine “forge” for this tutorial, so now inside your modding folder, you have two folders, eclipse and forge.

Inside the forge folder, hold shift and right click on the background, and select “Open command window here”. A command prompt will appear, enter the following:

gradlew.bat setupDecompWorkspace eclipse

This is a fairly long process, you’ll want to wait for a few minutes until the command terminates and “BUILD SUCCESSFUL” is shown in the command window.

When done, you can go out of your forge folder into your modding folder, and make a new folder called “workspace”. This will be the folder where you store your mod code.

Okay, from here onwards, we will work in Eclipse IDE, so open that. You will be prompted for the workspace directory, so browse for the “workspace” folder we created before. Eclipse will open, you can close the welcome screen. Click on File -> Import, and select “Existing projects into workspace”. In the “Select root directory” input, browse for the “forge” folder. Enter that, and in “projects” you should see a new project. Select that, and click finish.

Congratulations! You have the dirty work done, and now you can finally start forge modding!

For clarification purposes, I will give you my file system tree:

Forge Modding (main modding folder)
│───eclipse (downloaded from Eclipse site)
│   ├───eclipse.exe
│   └───Other eclipse files
├───forge (contains downloaded forge data)
│   ├───gradlew.bat
│   └───Other forge files
└───workspace (your eclipse workspace)

56 thoughts on “Setting Up Your Workspace (JDK, Eclipse, Forge)

  1. Jessica December 10, 2015 / 12:55 AM

    Eclipse tells me it cannot find JDK even though I followed everything exactly.
    JDK is in the java folder and eclipse/forge are in my modding folder. Variables are set correctly but still not working. Any help?

    Like

    • Emx2000 January 10, 2016 / 5:38 PM

      Can you tell me the path you entered for JDK?

      Like

  2. joshua January 12, 2016 / 4:11 PM

    um I’m stuck on the command window part it says that it failed to notify the build listener i don’t know what that is or how to fix it.

    Like

    • Emx2000 January 12, 2016 / 7:13 PM

      Where did you place your forge zip? You don’t want to extract forge zip into places like Program Files, cause then gradle won’t have access for read/write there. Try it on the desktop.

      Like

  3. xHarlock January 21, 2016 / 4:18 AM

    ../progra~1/… i dont have that folder

    Like

    • Emx2000 January 21, 2016 / 4:54 PM

      it’s alternative of program files

      Like

  4. Chris January 29, 2016 / 10:47 AM

    I had to run the command prompt as administrator by going to start then run or Windows Key + R and typing cmd and pressing shift then Enter.. it will ask you to give admin right, say yes.. and then type CD C:\Where every your forge path is

    then execute the command.

    Like

    • Emx2000 February 3, 2016 / 4:22 PM

      Did you download the correct forge src? (or mdk now)

      Like

      • Will March 19, 2016 / 1:50 AM

        If it’s the MDK version it would help if you updated that in the guide. Had to come down here to figure out what you’re talking about since the Forge site no longer has any mention of an SRC version.

        Like

      • Emx2000 March 20, 2016 / 10:46 AM

        Of course 🙂

        Like

    • Emx2000 February 3, 2016 / 4:21 PM

      Do you not have gradlew.bat in the downloaded forge folder? Are you downloading the correct thing?

      Like

  5. Douglas February 4, 2016 / 6:32 AM

    when I held shift and right clicked then clicked the open command window here, I typed what you typed and it said that gradlew wasn’t a command. Also do you haft to delete all of the words behind it. Please help

    Like

      • Douglas February 5, 2016 / 4:50 AM

        Didn’t work I just read above comment and I don’t have that in the file either I don’t have anything in that folder

        Like

      • Emx2000 February 6, 2016 / 3:39 PM

        You don’t have anything in your folder? You should have forge and all its contents in it.

        Like

      • Douglas February 8, 2016 / 12:10 AM

        When I go to the mod folder then the forge folder there’s nothing in it should I redownload it because I couldn’t get the add fly page to load. ps I’m using the 1.7.10 version

        Like

      • Emx2000 February 9, 2016 / 9:22 AM

        You should put forge’s files in the forge folder. Make sure you download forge’s MDK/SRC kit.

        Like

  6. RamenRider February 8, 2016 / 1:39 AM

    When you explain, “You should be left with an “eclipse” folder inside your root modding folder.” – where is this root modding folder and when was it created in this tutorial sequence? Is this not the very first of all the tutorials?

    Like

    • Emx2000 February 9, 2016 / 9:21 AM

      Your root modding folder is the folder that’ll contain everything. forge, eclipse, everything related to this tutorial and/or minecraft modding

      Like

  7. Douglas February 10, 2016 / 9:02 PM

    The shift right click doesn’t work now.

    Like

  8. Douglas February 11, 2016 / 8:07 AM

    I got it to work but now it says please set JAVA_HOME variable in your environment to match the location of your java installation. I did the same thing you did and tried where the java folder was located and still didn’t work.

    Like

  9. legofan February 14, 2016 / 2:07 AM

    Hi, I got up to it almost saying Build Successful, but instead it said build failed!
    plz help

    Like

    • Emx2000 February 14, 2016 / 10:00 AM

      Show me what happened, the text in the console.

      Like

      • legofan February 14, 2016 / 6:12 PM

        All of it or just the end bit

        Like

      • Emx2000 February 14, 2016 / 9:01 PM

        the end is enough most likely

        Like

      • legofan February 14, 2016 / 6:27 PM

        \Desktop\Modding Workspace\Forge>gradlew.bat setupDecompWorkspace eclipse
        This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
        #################################################
        ForgeGradle 2.1-SNAPSHOT-75bb646
        https://github.com/MinecraftForge/ForgeGradle
        #################################################
        Powered by MCP unknown
        http://modcoderpack.com
        by: Searge, ProfMobius, Fesh0r,
        R4wk, ZeuX, IngisKahn, bspkrs
        #################################################
        :deobfCompileDummyTask
        :deobfProvidedDummyTask
        :getVersionJson
        :extractUserdev
        :extractDependencyATs SKIPPED
        :extractMcpData SKIPPED
        :extractMcpMappings SKIPPED
        :genSrgs SKIPPED
        :downloadClient SKIPPED
        :downloadServer SKIPPED
        :splitServerJar SKIPPED
        :mergeJars SKIPPED
        :deobfMcSRG SKIPPED
        :decompileMc FAILED

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ‘:decompileMc’.
        > GC overhead limit exceeded

        * Try:
        Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

        BUILD FAILED

        Total time: 10 mins 48.623 secs

        C:\Users\Levi\Desktop\Modding Workspace\Forge>
        C:\Users\Levi\Desktop\Modding Workspace\Forge>
        C:\Users\Levi\Desktop\Modding Workspace\Forge>
        C:\Users\Levi\Desktop\Modding Workspace\Forge>
        C:\Users\Levi\Desktop\Modding Workspace\Forge>
        C:\Users\Levi\Desktop\Modding Workspace\Forge>

        Like

      • Emx2000 February 14, 2016 / 9:02 PM

        make sure you have java 64 bit installed.

        Like

      • legofan February 21, 2016 / 1:40 AM

        couldn’t do it later but I don’t know where to download Java 64 bit

        Like

      • Emx2000 February 26, 2016 / 5:10 AM

        Thanks! Will update asap when i get the time. Also, when posting a comment ill need to approve it first, so you’ll not see it the first time. This will happen only once and never again 🙂

        Like

  10. NonexistentUsername February 15, 2016 / 5:28 AM

    I’m having the same issue as Legofan and cannot pass about 44%

    Like

      • NonexistentUsername February 15, 2016 / 5:51 AM

        I closed it before and restarted it and now it’s stuck at > Building 44% > :decompileMc

        Like

      • Emx2000 February 15, 2016 / 6:06 AM

        are you sure it’s stuck? it can really just take a long time

        Like

      • NonexistentUsername February 15, 2016 / 6:19 AM

        \Desktop\Modding Workspace\Forge>gradlew.bat setupDecompWorkspace eclipse
        This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
        #################################################
        ForgeGradle 2.1-SNAPSHOT-75bb646
        https://github.com/MinecraftForge/ForgeGradle
        #################################################
        Powered by MCP unknown
        http://modcoderpack.com
        by: Searge, ProfMobius, Fesh0r,
        R4wk, ZeuX, IngisKahn, bspkrs
        #################################################
        :deobfCompileDummyTask
        :deobfProvidedDummyTask
        :getVersionJson
        :extractUserdev UP-TO-DATE
        :extractDependencyATs SKIPPED
        :extractMcpData SKIPPED
        :extractMcpMappings SKIPPED
        :genSrgs SKIPPED
        :downloadClient SKIPPED
        :downloadServer SKIPPED
        :splitServerJar SKIPPED
        :mergeJars SKIPPED
        :deobfMcSRG SKIPPED
        :decompileMc FAILED

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ‘:decompileMc’.
        > GC overhead limit exceeded

        * Try:
        Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

        BUILD FAILED

        Total time: 5 mins 6.554 secs

        Like

      • Emx2000 February 15, 2016 / 6:31 AM

        use java 64 bit

        Like

      • NonexistentUsername February 15, 2016 / 6:34 AM

        I’m pretty sure I am.

        Like

      • Emx2000 February 15, 2016 / 6:36 AM

        look up your error “gc overhead limit”

        Like

      • NonexistentUsername February 15, 2016 / 6:56 AM

        Do you have any sort of way I could message you without having to comment here?

        Like

      • Emx2000 February 15, 2016 / 4:37 PM

        PM on reddit, mcforums, or curseforge. Reddit username is emmanuelyohanes, mcforums/curseforge username is the same as this one.

        Like

    • CoolLord22 February 25, 2016 / 9:39 AM

      Same issue here as well.

      Like

  11. NonexistentUsername February 15, 2016 / 6:07 AM

    I mean it’s been at 44% for the past 30 minutes almost

    Like

  12. Douglas February 15, 2016 / 11:48 PM

    I got it to work but now it says please set JAVA_HOME variable in your environment to match the location of your java installation. I did the same thing you did and tried where the java folder was located and still didn’t work.

    Liked by 1 person

    • zazuba3 February 16, 2016 / 8:58 AM

      I’m having the same issue.

      Like

  13. Huntercatt February 20, 2016 / 1:31 AM

    I’m having the same problem that Legofan and the other guy are having. I do have Java 64 bit installed.

    C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>gradlew.bat setupDecompWorkspace eclipse
    This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
    #################################################
    ForgeGradle 2.1-SNAPSHOT-75bb646
    https://github.com/MinecraftForge/ForgeGradle
    #################################################
    Powered by MCP unknown
    http://modcoderpack.com
    by: Searge, ProfMobius, Fesh0r,
    R4wk, ZeuX, IngisKahn, bspkrs
    #################################################
    :deobfCompileDummyTask
    :deobfProvidedDummyTask
    :getVersionJson
    :extractUserdev UP-TO-DATE
    :extractDependencyATs SKIPPED
    :extractMcpData SKIPPED
    :extractMcpMappings SKIPPED
    :genSrgs SKIPPED
    :downloadClient SKIPPED
    :downloadServer SKIPPED
    :splitServerJar SKIPPED
    :mergeJars SKIPPED
    :deobfMcSRG SKIPPED
    :decompileMc FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ‘:decompileMc’.
    > GC overhead limit exceeded

    * Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

    BUILD FAILED

    Total time: 1 mins 57.855 secs

    C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>

    C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>

    Like

    • Emx2000 February 20, 2016 / 1:36 AM

      can i see the build.gradle?

      Like

      • Huntercatt February 20, 2016 / 5:25 AM

        Could you e-mail or Skype me so we can figure this out? My e-mail is rockyspone@rocketmail.com and my Skype is huntercat2013

        Like

      • Emx2000 February 20, 2016 / 12:04 PM

        I’m currently figuring this out on my own with someone else with the problem. If I found a fix, I’ll add it to the tutorial.

        Like

    • Huntercatt February 20, 2016 / 11:25 PM

      Alright

      Like

  14. Douglas February 20, 2016 / 4:23 AM

    are you sure all this is necessary my friend did this with windows 7 and none of this was necessary.

    Like

  15. Douglas February 20, 2016 / 5:25 AM

    it wont let me because it keeps asking me to move it to the java installation folder and I’ve moved it to all the java things that I can find and it still wont work

    Like

  16. Douglas February 21, 2016 / 11:30 AM

    C:\Users\cruel\AppData\Roaming\.minecraft\mods\forge-1.7.10-10.13.4.1558-1.7.10-src>gradlew.bat setupDecompWorkspace eclipse

    ERROR: JAVA_HOME is set to an invalid directory: C:\Users\cruel\AppData\Roaming\java

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    C:\Users\cruel\AppData\Roaming\.minecraft\mods\forge-1.7.10-10.13.4.1558-1.7.10-src>

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s