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.
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
[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?
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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.
 

mj_

macrumors 68000
May 18, 2017
1,618
1,281
Austin, TX
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.
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
[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
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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.
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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.
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
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
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
"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
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
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
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
"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"?
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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.
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
(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.
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
@-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
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
@-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
 

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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?
 

casperes1996

macrumors 604
Jan 26, 2014
7,593
5,764
Horsens, Denmark
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

savgesnake32

macrumors newbie
Original poster
Feb 12, 2021
15
1
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.