chapter on a mac

30 views
Skip to first unread message

cwoz...@gmail.com

unread,
Nov 5, 2014, 12:27:18 AM11/5/14
to sams-teach-yourself-minecraf...@googlegroups.com
I am having a hard time getting through chapter one on my mac.
I launched the JDK by clicking the .dmg file.
I clicked the .pkg file and launched the installer.
I ran eclipse.
setting up forge is where I seem to run into trouble.  I downloaded the 1.7.10 (src), but I am not sure it is the correct one for a mac. It had a gradlew unix executable file that ran and downloaded something, but then the .bat file won't run (it is a plain text file) and when I try to run terminal it won't run either of the commands (like ./.gradlew setupdecompworkspace).  I'm lost....

Jimmy Koene

unread,
Nov 6, 2014, 5:08:02 AM11/6/14
to sams-teach-yourself-minecraf...@googlegroups.com
Personally, I don't have a Mac so I'm not really sure what could be wrong on your computer. However, try running "javac -version" in your command prompt. If that puts out a version number like 1.7, Java is installed properly. If it's 1.8, download and install Java 1.7 instead. If it says something like unknown command you haven't installed the JDK properly for whatever reason.
If it isn't Java, join #minecraftforge on IRC. There are people there who should be able to help you install it on Mac. The start of Chapter 24 covers how to get into the channel.

- Jimmy

cwoz...@gmail.com

unread,
Nov 6, 2014, 11:11:28 PM11/6/14
to sams-teach-yourself-minecraf...@googlegroups.com
Thank you for the help.  We do have 1.7 downloaded and installed (your check resulted in javac 1.7.0_71).  We will try the #minecraftforge...thanks again

MN

unread,
Nov 10, 2014, 12:15:45 PM11/10/14
to sams-teach-yourself-minecraf...@googlegroups.com
cwoz,

I am also running on a Mac. I discovered that you have to use the full path name for gradlew.
    Example: User/name/folder/forge/gradlew setupDecompWorkspace

I've been able to move on to chapter 2 and run the example code. However, when I look at the Eclipse project folder, I seem to be missing a number of items. I'm not sure why, or how to fix that. I can't get the code from chapter 3 to work - it might be for that reason.

Please let me know if this works for you.

MN

Jimmy Koene

unread,
Nov 10, 2014, 12:28:30 PM11/10/14
to sams-teach-yourself-minecraf...@googlegroups.com
Hey,

Thanks for helping where I unfortunately can't.

What do you mean by "missing a number of items"? What are you missing?

Thanks,
Jimmy Koene

MN

unread,
Nov 14, 2014, 11:37:08 AM11/14/14
to sams-teach-yourself-minecraf...@googlegroups.com
Jimmy,

No problem. I'm still pretty new at this. I'm happy to share as I'm working through this, although that means that my first response may not be the best or most thorough one. 

For example, now that I've got a bit more time into this, I see that cwoz and I both had the same misunderstanding. We both interpreted the book (p.17) to say that we should type:
./.gradlew setupDecompWorkspace
I see now that the second period was the end of a sentence (oops!), and we were supposed to type:
./gradlew setupDecompWorkspace
Although it certainly does work to use the full path name, it also (usually) works to use "./". 

I did run into an out of memory problem on one of my Macs, and had to adjust the heap space. To do this I edited the gradlew.bat file, and changed the line that says:
%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS%... (etc.)    
to read:
%JAVA_EXE%" -Xmx512m %DEFAULT_JVM_OPTS% %JAVA_OPTS%... (etc.) 
   
Another tidbit: I ran "./gradlew" before running "./gradlew setupDecompWorkspace". I haven't tested whether it works without running "./gradlew" first...

Regarding the missing items: It turns out that they are misplaced rather than missing. On page 28 the book shows a picture from the Eclipse window. There are a number of files shown directly underneath "JRE System Library" which didn't show up there on my Mac. In my eclipse window there is a folder named "Referenced Libraries" directly underneath "JRE System Library". It turns out that the files are all in there. I'm not sure why this is true (maybe the Forge version?), but it all does seem to work. (I have now moved well past chapter 3.)

BTW, thank you for creating this book. It is full of valuable information. :)

MN

Jimmy Koene

unread,
Nov 16, 2014, 5:30:00 AM11/16/14
to sams-teach-yourself-minecraf...@googlegroups.com
Hi MN,

Thanks for clearing up why you got confused. I'll clear it up for future users.

Messing around with the heap space is indeed a good idea in this case. The exact location of some files and folders may be different in many cases and for many reasons. It could be your version of forge, eclipse or maybe even Mac. As long as it works it should be fine though.

Thanks,
Jimmy

Edward Spiegel

unread,
Jul 3, 2019, 9:13:07 PM7/3/19
to Sams Teach Yourself Minecraft Mod Development in 24 Hours
Hi,

I am getting an error when I run gradlew setupDecompWorkspace. gradlew runs but returns this error:

Task 'setupDecompWorkspace' not found in root project 'edwardspiegel'.

I can't tell if this is related where eclipse and forge are installed. The book's setup instructions aren't quite right (or are incomplete) on the Mac. So, maybe I put things in the wrong place. I have tried a number of locations but get the same error.

gradlew is running as I can run with the stacktrace and debug flags but the information is not helping me.

Perhaps these messages from the debug log will mean something to someone:

[INFO] [org.gradle.configuration.project.BuildScriptProcessor] Evaluating root project 'edwardspiegel' using empty build file.

[ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.

[ERROR] [org.gradle.BuildExceptionReporter] Task 'setupDecompWorkspace' not found in root project 'edwardspiegel'.


Thanks

Edward Spiegel

unread,
Jul 3, 2019, 11:43:17 PM7/3/19
to Sams Teach Yourself Minecraft Mod Development in 24 Hours
I finally figured out the solution to the setupDecompWorkspace errors I was getting.

In the shell, you need to cd to the directory that the gradlew command is in.

For example, if gradlew is in a folder that is at: /Users/myusername/forge

you need to do something like this in the Terminal (shell)

/Users/myusername/forge
then 
run gradlew setupDecompWorkspace
Reply all
Reply to author
Forward
0 new messages