Error: Unable to access jarfile forge-1.8-XYZ-universal.jar

Hello Sponge Community! Just joined. :slight_smile:

So I have Sponge “Vanilla” and I’m on Mac OSX. I downloaded Sponge and went along with the directions up until the point where I launch the launch.command file (double-clicking on it).

When Terminal boots up and launches, it errors out and reports the following:

Last login: Wed Feb 8 22:55:35 on ttys001
marc2s-power-mac-g5:~ marcadrian$ /Users/marcadrian/Library/Application\ Support/minecraft/Sponge/launch.command ; exit;
Error: Unable to access jarfile forge-1.8-XYZ-universal.jar
logout
Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.

[Process completed]

I’m assuming it’s looking for a .jar file named forge-1.8-XYZ-universal.jar in the mod folder or elsewhere? I ask because the documentation tells me to write the following in the launch file:

#!/bin/bash
cd "$(dirname “$0”)"
java -Xms1G -Xmx2G -jar forge-1.8-XYZ-universal.jar

Not certain what to do at this point. The documentation doesn’t say anything about this error. Could someone please help?

Thank you,
Marc

#!/bin/bash
cd "$(dirname "$0")"
java -Xms1G -Xmx2G -jar <NameOfYourSpongeVinilla>.jar

Your launch.command is set to launch a Forge jar file as the server, you want to change it to the name of your SpongeVinilla jar file.

Alternatively you can rename the jar file to server and use java -Xms1G -Xmx2G -jar server.jar in your launch.command.

2 Likes

@Gamecube762

Your advice worked perfectly. Thank you. I went into the launch.command file and changed the reference to spongevanilla.jar.

I saved and relaunched the launch file. The server then ran perfectly from there. Not certain why the documentation wanted me to type in that other particular .jar name, but I’m glad the problem is resolved.

To the Powers That Be: I’d suggest the documentation be updated to correct that oversight. It’s a bit confusing.

Anyway, thank you very much for your help, @Gamecube762!

Glad that it is working.

The documentations does contain a note about this above the scripts:

The following examples are generic. For a Forge server using Sponge (coremod), change forge-1.8-XYZ-universal.jar to whatever your Forge version in the server directory is named. To launch a SpongeVanilla server, change forge-1.8-XYZ-universal.jar to the name of the SpongeVanilla.jar file.

2 Likes

Yup. I see that now. I just didn’t understand what that paragraph was trying to say, exactly. All I knew was that I was told to copy particular lines of code and put them into the launcher. Since “spongevanilla.jar” was already included in the install, why not just write it out as:

#!/bin/bash
> cd “$(dirname “$0”)”
> java -Xms1G -Xmx2G -jar spongevanilla.jar

I’m thinking that might save the forum from idiots like myself coming here and asking dumb questions. :smile:

What is nice about the forums, once one person’s question gets answered, it will help the next person with the same question.

So don’t be afraid to ask!

The correct answer to this is because most people aren’t launching the SpongeVanilla server, they’re launching the Forge server, so explicitly telling you to run the SpongeVanilla jar would be incorrect.

This forum is so very helpful. Light years better than the Bukkit forums! Thanks guys.

I guess what caught me was that I clicked on the Sponge Vanilla instructions specifically and thought that it would be providing code specifically for that version, so I took the code literally. Minor nit, but I’m thinking that documentation examples should be specific to the area you’ve expressed specific interest in, whether it’s Vanilla, Forge, etc.

Lol if you think Bukkit’s toxic, spend a day on Spigot.

The assumption here is that you already know what a jar file is, what it does, and its relationship to the java -jar command, since you’re technologically savvy enough already to be running a server in the first place. Thus, the only clarification that they feel is necessary is that you run the Forge server instead of the SpongeForge jar; the vanilla server is assumed to be obvious.

Lol if you think Bukkit’s toxic, spend a day on Spigot.

I’ll pass, lol!

The assumption here is that you already know what a jar file is, what it does, and its relationship to the java -jar command, since you’re technologically savvy enough already to be running a server in the first place.

Oh. Well, I’d say the best documentation doesn’t make assumptions. It should remember that there are a lot of transitional types just learning about this stuff, and what’s obvious to programmers and savvy gamers may not be obvious to the rest of us. I’m fairly new to messing with Java. Trust me, I need all the help I can get! :wink:

Good documentation also tries to avoid repetition, which is why we don’t have completely isolated sections about SpongeForge and SpongeVanilla. There are only minor differences between the launch scripts for SF and SV (i.e. only the file name), and if you don’t add any forge mods, then they are pretty much interchangeable. We do expect people to at least be familiar with running a vanilla MC server, and to take care reading the instructions we provide. If we make no assumptions, we’ll end up having to include Java tutorials.

If we make no assumptions, we’ll end up having to include Java tutorials.

I’m thinking there are a few rational stopping points along the way before becoming that absolute.

1 Like

Yeah, but at least the knowledge of what a jar file is and recognizing its use in a command is the operating assumption here. If nothing else, XYZ should be pretty universally recognized as ‘this is a variable put the real number here’.

Yeah, but at least the knowledge of what a jar file is and recognizing its use in a command is the operating assumption here.

I hear you, but why assume that? Seriously. Some people trying to get this stuff working are clueless about .jar files and what you assume they should know about them. Some are parents trying to figure something out for their kids. Some are kids themselves. Some were just plain old oblivious, like myself. Granted, I’m learning more now, but we all have to start somewhere.

If nothing else, XYZ should be pretty universally recognized as ‘this is a variable put the real number here’.

You can insist on a “should be,” but not everyone is going to follow your script. I certainly didn’t, lol.

Well, as @Gamecube762 said, the docs do actually say exactly what to do.

4 Likes

@pie_flavor

So when I think about what confused me, I think it’s the fact that in clicking here:

I was assuming (wrongly) that the code I’d be copying would be specific to the Vanilla server out of the box. I didn’t realize that the instructions would lead me to a general reference page. I think this could have been avoided if the page I was copying code from was specific to the Vanilla install and referencing the default .jar file in its directory.

And while the paragraph quoted is perfectly sensible, it won’t always necessarily click to a newcomer, for it doesn’t explain the general function and location of the operating .jar file, or that you can rename it. I didn’t even know what file was being referred to originally (it turned out it was the .jar file sitting in the root directory of the server called “spongevanilla.jar.”

Looking back, yup, the forge-1.8-XYZ-universal.jar in the code is now obvious as a dummy name, and the location of the operating .jar file is now apparent. But it wasn’t at the time. A “name-of-your-file.jar” file name in the code would have stood out more, I think.

Ok, I’ll shut up about this now. :slight_smile:

1 Like