Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Crunchy Dragon

Unable to Access Jarfile Error

4 minutes ago, kelvinhall05 said:

Try doing the same command but instead of server.jar put C:\Users\Crunchy/ Dragon\Desktop\server.jar or wherever it is

Found a fix. This one was strange, so I'm documenting it here in case some poor soul searching the internet comes across this thread.

 

This problem was fixed by going into the server.jar properties:

image.png.ca4456587a08a8ad7d6016476c7bb288.png

 

The problem was that Windows blocked it, preventing cmd from reading it. All you'd have to do is check the "Unblock" box and give it the "Read-only" attribute. This should let the following command properly execute the server.jar:

java -Xms1G -Xmx3G -jar server.jar

Note: your memory allocation may vary from mine.

 

Shout out to @colonel_mortis for offering your aid as Master Coding Guru.

Recommended Posts

Posted · Original PosterOP

Trying to give my Minecraft server a bit more RAM, but I can't make it work. Attempting to follow this guide:

https://www.minecraftforum.net/forums/support/server-support-and/2457262-tutorial-allocating-more-ram-to-minecraft-servers


I'm not getting any activity from running the .bat file, though. A command prompt window pops up for half a second and then closes. I'd guess it's throwing the same error that CMD does if I try to run the server using the "java -jar" command, which is "unable to access jarfile".

 

I made sure I'm in the right directory before trying "java -jar" and I triple checked that the filenames match, no dice.

EDIT: I also tried running CMD as an administrator, same result.

 

Anyone able to help out?
Thanks in advance.

Link to post
Share on other sites

Not sure if it's similar on Windows but on Linux you have to go to:

 

Minecraft launcher > your desired MC version > edit > link the file location of the .jar file


If it's a *server*, shouldn't there be a config file somewhere? There is on Linux...rather, a start.sh file that acts as a basic config file.


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, kelvinhall05 said:

Not sure if it's similar on Windows but on Linux you have to go to:

 

Minecraft launcher > your desired MC version > edit > link the file location of the .jar file


If it's a *server*, shouldn't there be a config file somewhere? There is on Linux...rather, a start.sh file that acts as a basic config file.

There's server.properties, but that won't let me change the allocated RAM.

 

I can launch the server just fine from running my server.jar, but that sticks me with the RAM capped at 1024MB.

Screenshot of the server folder:

Spoiler

image.png.1e7dc27833152ff03e113d69b4f731f6.png

server.jar launches the server.

server.properties(located directly under server.jar) lets me change a few assorted server features.

start.bat is the file I created from following the guide linked in my OP.

 

start.bat is supposed to run the following command:

java -xms3G -xmx3G -jar server.jar

If I change directories in CMD and try to run that exact same command, I get "Unable to access jarfile".

Link to post
Share on other sites
5 minutes ago, Crunchy Dragon said:

There's server.properties, but that won't let me change the allocated RAM.

 

I can launch the server just fine from running my server.jar, but that sticks me with the RAM capped at 1024MB.

Screenshot of the server folder:

  Reveal hidden contents

image.png.1e7dc27833152ff03e113d69b4f731f6.png

server.jar launches the server.

server.properties(located directly under server.jar) lets me change a few assorted server features.

start.bat is the file I created from following the guide linked in my OP.

 

start.bat is supposed to run the following command:


java -xms3G -xmx3G -jar server.jar

If I change directories in CMD and try to run that exact same command, I get "Unable to access jarfile".

Can you edit the start.bat file?


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
Just now, kelvinhall05 said:

Can you edit the start.bat file?

I can, yes.

Link to post
Share on other sites
1 minute ago, Crunchy Dragon said:

I can, yes.

I would assume that there's something similar in it to the bat file you made.

 

 

Anyway, set -xmx to however much RAM you'd like it to use (max amount).


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
Just now, kelvinhall05 said:

I would assume that there's something similar in it to the bat file you made.

 

 

Anyway, set -xmx to however much RAM you'd like it to use (max amount).

I have done that, I'm not getting anything if I run the file though.

Link to post
Share on other sites
2 minutes ago, Crunchy Dragon said:

I have done that, I'm not getting anything if I run the file though.

Again, not very familiar with Windows, but what happens if you open the run box (win + r) and type in the file location?

 

 

EDIT: I'm thinking this because to start the server on Linux you just run the start.sh file.


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
Just now, kelvinhall05 said:

Again, not very familiar with Windows, but what happens if you open the run box (win + r) and type in the file location?

 

 

EDIT: I'm thinking this because to start the server on Linux you just run the start.sh file.

Windows will either say it can't find the directory, or if I type in the full directory up to the start.bat, it'll behave the same way as if I ran start.bat directly.

 

Apparently Win+R doesn't work very nicely just for exploring files.

Link to post
Share on other sites
1 minute ago, Crunchy Dragon said:

Windows will either say it can't find the directory, or if I type in the full directory up to the start.bat, it'll behave the same way as if I ran start.bat directly.

 

Apparently Win+R doesn't work very nicely just for exploring files.

How would you normally start the server?


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
Just now, kelvinhall05 said:

How would you normally start the server?

Run server.jar.

 

EDIT: I have to screw around with java arguments and commands because that's the only way Mojang has available to allocate more RAM to a server, can't do it from server.properties unfortunately.

Link to post
Share on other sites
Just now, Crunchy Dragon said:

Run server.jar.

 

EDIT: I have to screw around with java arguments and commands because that's the only way Mojang has available to allocate more RAM to a server, can't do it from server.properties unfortunately.

Can you post the contents of the start.bat file

 

 

EDIT: Also of the server.jar file


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, kelvinhall05 said:

Can you post the contents of the start.bat file

java -xms3G -xmx3G -jar server.jar

 

Link to post
Share on other sites
Just now, Crunchy Dragon said:

java -xms3G -xmx3G -jar server.jar

 

Alright. And it still doesn't allocate more RAM? Have you confirmed this somehow?

 

Also, not sure if you saw my edit, but if you can see what's in server.jar could you post that as well?


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites

I'm not a programmer nor do I run an MC server but IIRC it starts like this:

 

start.bat runs server.jar with the allocated amount of RAM, then server.jar loads all your other stuff (mods, plugins, server resourcepacks, etc).


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
4 minutes ago, kelvinhall05 said:

Alright. And it still doesn't allocate more RAM? Have you confirmed this somehow?

 

Also, not sure if you saw my edit, but if you can see what's in server.jar could you post that as well?

server.jar opens the GUI version of the Minecraft server, letting me view online players, console, and memory usage.

 

I could check and see if it actually allocates more RAM. The guide said it was supposed to launch the server with the allocated memory, hence the java arguments in the command.

EDIT: not actually sure how to tell if it's allocated more RAM or not, the GUI is not very intuitive.

Link to post
Share on other sites
2 minutes ago, Crunchy Dragon said:

server.jar opens the GUI version of the Minecraft server, letting me view online players, console, and memory usage.

 

I could check and see if it actually allocates more RAM. The guide said it was supposed to launch the server with the allocated memory, hence the java arguments in the command.

Well yeah make sure it can use up to 3GB of RAM.

I guess you can think of your start.bat not starting a server but almost like starting a VM. If it says 3GB is allocated, 3GB should be allocated unless some funky overriding is going on somewhere.


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, kelvinhall05 said:

Well yeah make sure it can use up to 3GB of RAM.

I guess you can think of your start.bat not starting a server but almost like starting a VM. If it says 3GB is allocated, 3GB should be allocated unless some funky overriding is going on somewhere.

It's sitting at 320MB usage, 35% free at the moment.

 

If my math is right, 35% of 3072 is around 1000, not 300.

Link to post
Share on other sites
5 minutes ago, Crunchy Dragon said:

It's sitting at 320MB usage, 35% free at the moment.

 

If my math is right, 35% of 3072 is around 1000, not 300.

Not sure if this will make a difference but change 3GB to 3072MB and have the minimum RAM amount (-Xms) set to like 1024MB.

 

 

Also not sure how much of a difference it makes but the RAM flags are supposed to be capitalized (-Xms and -Xmx).


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites

I would also try to, from command line, CD into your server folder and run what's in the start.bat server manually, so

java -Xms1024MB -Xmx3072MB -jar server.jar

 


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, kelvinhall05 said:

I would also try to, from command line, CD into your server folder and run what's in the start.bat server manually, so


java -Xms1024MB -Xmx3072MB -jar server.jar

 

Unable to access jarfile "server.jar".

Link to post
Share on other sites
7 minutes ago, Crunchy Dragon said:

Unable to access jarfile "server.jar".

Are you in your server folder when running the file? If you are, try putting the exact file location (with folders/subfolders) before server.jar.


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, kelvinhall05 said:

Are you in your server folder when running the file? If you are, try putting the exact file location (with folders/subfolders) before server.jar.

Yes, I changed directories into my server folder.

 

Ninja edit:

image.png.79f5a9f64a4ea0e62fa0fd62b6f0231b.png

Link to post
Share on other sites
19 minutes ago, Crunchy Dragon said:

Yes, I changed directories into my server folder.

 

Ninja edit:

image.png.79f5a9f64a4ea0e62fa0fd62b6f0231b.png

Try doing the same command but instead of server.jar put C:\Users\Crunchy/ Dragon\Desktop\server.jar or wherever it is


Quote me to see my reply!

SPECS:

CPU: Xeon X5650 OC'd to 4.4GHz @ 1.36V (courtesy of @XR6) Motherboard: Asus Sabertooth X58 RAM: 4x4GB G.Skill DDR3 1866MHz GPU: Asus RX 570 Strix Storage: WD Blue 1TB and a 128GB Kingston UV400 PSU: EVGA 600B Case: Fractal Design Define C Monitor: Dell G2410T and two Dell P2210 on a Steelcase Eyesite triple monitor stand Mouse: Logitech G403 Prodigy Wireless Keyboard: Dell AT101 GYUM97SK with white Alps and Lite-on SK-2002 keycaps Mousepad: Steelseries QcK Headset:  Sennheiser HD598SE

 

I like old-ass keyboards, Volvos, Thinkpads, and fountain pens.

 

Link to post
Share on other sites
Posted · Original PosterOP · Best Answer
4 minutes ago, kelvinhall05 said:

Try doing the same command but instead of server.jar put C:\Users\Crunchy/ Dragon\Desktop\server.jar or wherever it is

Found a fix. This one was strange, so I'm documenting it here in case some poor soul searching the internet comes across this thread.

 

This problem was fixed by going into the server.jar properties:

image.png.ca4456587a08a8ad7d6016476c7bb288.png

 

The problem was that Windows blocked it, preventing cmd from reading it. All you'd have to do is check the "Unblock" box and give it the "Read-only" attribute. This should let the following command properly execute the server.jar:

java -Xms1G -Xmx3G -jar server.jar

Note: your memory allocation may vary from mine.

 

Shout out to @colonel_mortis for offering your aid as Master Coding Guru.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×