Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
java version "1.8.0_281"


Java(TM) SE Runtime Environment (build 1.8.0_281-b09)


Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)


(my name)@(my name)-MacBook-Air ~ % java -jar/Users/(my name)/Desktop/MinecraftServer/server.jar


Unrecognized option: -jar/Users/(my name)/Desktop/MinecraftServer/server.jar


Error: Could not create the Java Virtual Machine.


Error: A fatal exception has occurred. Program will exit.

I was trying to create a Minecraft server and when I went to open the .jar it wouldn't open. I would get the animation of the coffee mug icon doing the thing as it gets opened but no window shows up. my Java is up to date I believe.
 
[21:10:32] [main/ERROR]: Failed to load properties from file: server.properties


[21:10:32] [main/WARN]: Failed to load eula.txt


[21:10:32] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.


(my name)@(my name)-MacBook-Air ~ %
it worked, but this came up. what now?
 
You need a space there, mate. After -jar
[21:10:32] [main/ERROR]: Failed to load properties from file: server.properties


[21:10:32] [main/WARN]: Failed to load eula.txt


[21:10:32] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.


(my name)@(my name)-MacBook-Air ~ %
I can't access Eula.txt because it is in the .jar, and I can't open the .jar which is the problem.
 
In my experience JARs work best when launched from the directory in which they are located.
Thus, you may need to cd into the directory first and then launch the JAR file from therein.
 
[21:10:32] [main/ERROR]: Failed to load properties from file: server.properties


[21:10:32] [main/WARN]: Failed to load eula.txt


[21:10:32] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.


(my name)@(my name)-MacBook-Air ~ %
I can't access Eula.txt because it is in the .jar, and I can't open the .jar which is the problem.

Jars are kinda just zip files. Try renaming it .zip instead of .jar; That way you should be able to read the text files for instructions. When done, return it to a .jar.

In my experience JARs work best when launched from the directory in which they are located.
Thus, you may need to cd into the directory first and then launch the JAR file from therein.
Correct; Unless configured otherwise, the Java command will use the CWD as the relative path for all paths referenced, including from within a jar. - Though most people who package jars will configure them to use paths from the jar itself rather than CWD; Worth a shot if there are path errors though
 
Jars are kinda just zip files. Try renaming it .zip instead of .jar; That way you should be able to read the text files for instructions. When done, return it to a .jar.


Correct; Unless configured otherwise, the Java command will use the CWD as the relative path for all paths referenced, including from within a jar. - Though most people who package jars will configure them to use paths from the jar itself rather than CWD; Worth a shot if there are path errors though
when I renamed it .zip it opened into Archive Utility it made a folder called "Server" and a million jar files were in it.
 
In my experience JARs work best when launched from the directory in which they are located.
Thus, you may need to cd into the directory first and then launch the JAR file from therein.
How to you do that? sorry my experience with Mac's or
In my experience JARs work best when launched from the directory in which they are located.
Thus, you may need to cd into the directory first and then launch the JAR file from therein.
how do you do that? my experience with Mac's or much relating to things like this is limited to installing mods, shaders, etc. and this kind of thing never happened.
 
How to you do that? sorry my experience with Mac's or

how do you do that? my experience with Mac's or much relating to things like this is limited to installing mods, shaders, etc. and this kind of thing never happened.

"cd" is short for Change Directory. It's a common Unix command. You just go
cd [directory you're changing into]
So in your case
/Users/(my name)/Desktop/MinecraftServer

Obviously fill in the name
 
"cd" is short for Change Directory. It's a common Unix command. You just go
cd [directory you're changing into]
So in your case
/Users/(my name)/Desktop/MinecraftServer

Obviously fill in the name
but it already says that. it looks like I just need to agree to the Eula, which I assume means changing the false to true.
and also I can't edit things above it after I drag the .jar into the terminal
 
but it already says that. it looks like I just need to agree to the Eula, which I assume means changing the false to true.
and also I can't edit things above it after I drag the .jar into the terminal

Based on what you've written above, no, it doesn't already say that. It says ~; Which means your home directory
What you may be confusing it with, is the input you give to the java command itself which is separate from what we're talking about here. The directory your Terminal shell is in vs. the directory java should load the jar from
 
"cd" is short for Change Directory. It's a common Unix command. You just go
cd [directory you're changing into]
So in your case
/Users/(my name)/Desktop/MinecraftServer

Obviously fill in the name
ok so
Based on what you've written above, no, it doesn't already say that. It says ~; Which means your home directory
What you may be confusing it with, is the input you give to the java command itself which is separate from what we're talking about here. The directory your Terminal shell is in vs. the directory java should load the jar from
so I should change the "~ ;" into a "vs"?
 
I can't edit the ~ ;. I can't delete it after highlighting, or anything. please simplify.
(name)@(name)-MacBook-Air ~ % java -jar /Users/(name)/Desktop/MinecraftServer/server.jar


[21:50:17] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.


(name)@(name)-MacBook-Air ~ %

I'm going to try what you just said. this is what it looks like right now.
 
(name)@(name)-MacBook-Air ~ % java -jar /Users/(name)/Desktop/MinecraftServer/server.jar


[21:50:17] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.


(name)@(name)-MacBook-Air ~ %

I'm going to try what you just said. this is what it looks like right now.
@-MacBook-Air ~ % /Users/(name)/Desktop/MinecraftServer


zsh: permission denied: /Users/(name)/Desktop/MinecraftServer


@-MacBook-Air ~ % java -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Unrecognized option: -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Error: Could not create the Java Virtual Machine.


Error: A fatal exception has occurred. Program will exit.


@-MacBook-Air ~ %
I added the /Users/(name)/Desktop/MinecraftServer and then did the rest. this is what showed up.
 
@-MacBook-Air ~ % /Users/(name)/Desktop/MinecraftServer


zsh: permission denied: /Users/(name)/Desktop/MinecraftServer


@-MacBook-Air ~ % java -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Unrecognized option: -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Error: Could not create the Java Virtual Machine.


Error: A fatal exception has occurred. Program will exit.


@-MacBook-Air ~ %
I added the /Users/(name)/Desktop/MinecraftServer and then did the rest. this is what showed up.
I do realize I missed the space. ill try again
 
@-MacBook-Air ~ % /Users/(name)/Desktop/MinecraftServer


zsh: permission denied: /Users/(name)/Desktop/MinecraftServer


@-MacBook-Air ~ % java -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Unrecognized option: -jar/Users/(name)/Desktop/MinecraftServer/server.jar


Error: Could not create the Java Virtual Machine.


Error: A fatal exception has occurred. Program will exit.


@-MacBook-Air ~ %
I added the /Users/(name)/Desktop/MinecraftServer and then did the rest. this is what showed up.

You're still not quite following the instructions :)

I said to run the cd command with the path as the argument; I.e.
cd /Users/(name)/Desktop/MinecraftServer

and then the java command; Again, remember space after -jar
 
You're still not quite following the instructions :)

I said to run the cd command with the path as the argument; I.e.
cd /Users/(name)/Desktop/MinecraftServer

and then the java command; Again, remember space after -jar
ohhh, so I need to add the "cd "(with the space) before the rest?
 
IT WORKED!!!!!!!! EVERYHTING IS THERE!

thank you sooooooo much. props to you for knowing all this crap <3

To be quite honest I didn't really actually follow along with what we were trying to make work, but I am happy it worked it, hehe :p

If you ever want I'll teach you the idea behind how all this Terminal kung-foo works, but until then enjoy your Minecrafting stuff :)
 
  • Like
Reactions: Quackers
To be quite honest I didn't really actually follow along with what we were trying to make work, but I am happy it worked it, hehe :p

If you ever want I'll teach you the idea behind how all this Terminal kung-foo works, but until then enjoy your Minecrafting stuff :)
I would LOVE to, but I'm afraid school is keeping me very busy. if you offer your email we can stay connected for when I have time to learn!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.