Jump to content

Forge fails to run alongside minecraft_server.jar on a mac


Recommended Posts

I can't get forge working on my minecraft server on a mac.

 

I'm on a mac running mountain lion with java version "1.6.0_45"

 

I have experience running this successfully in the minecraftedu environment, and I've installed my client and it works. I can't seem to find enough information the get it running on my mac "vanilla"? server.

 

The minecraftforge.net wiki says that placing the universal zip into the same folder where minecraft_server.jar is and running it works. 

When I do this (either by changing the extension to .jar and running it from the finder, or on the command line: "java -jar forge.zip" I get the following error (very quickly):

Exception in thread "main" java.lang.NoClassDefFoundError: aki
Caused by: java.lang.ClassNotFoundException: aki
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

 

I have tried extracting the minecraft_server.jar and dropping all the forge class files into it, re-archiving it and running it that way but it always gives the error: "Invalid or corrupt jarfile minecraft_server.jar".  I'm pretty careful with the extraction and renaming from zip to jar etc. so I don't think it's user error there.  I've done such operations on dozens of machines with good results. 

 

I found a forum thread that suggested that I might be missing libraries (based on the first line of the stack trace above), so I downloaded http://files.minecraftforge.net/fmllibs/fml_libs.zip and dropped these jar files into a (new) directory alongside the server called "lib", as suggested.  I also tried it with them outside a folder, alongside minecraft_server.jar.  Neither worked. 

 

In case it's relevant, my server start.command simply reads:

#!/bin/bash
cd "$(dirname "$0")"
exec java -Xmx1G -Xms1G -jar minecraft_server.jar

 

It seems like maybe I could reference the missing libraries here?  I'm just guessing wildly.  I have no idea if that's even the problem, as the only other "mac" "server" forum threads seemed to have other issues unrelated to mine. 

 

I've also tried a few different versions of the forge universal files, the 'latest', the 'recommended' and a couple of other versions in the Builds list, just for good measure. 

 

I'm pretty sure forge isn't running in my server, because I did create a mod folder in the server directory and dropped the mod I'm trying to load in there (vending-1.5.1-1.0.3.jar) if it's relevant.  When I place a block (the vending machine block) in the client, I see it for a millisecond, then it disappears (meaning that my server isn't running it yet).  I'm not sure how to verify whether forge is running on the server. 

 

I'm assuming that because of the error on trying to run the minecraftforge-universal-1.5.1-7.7.2.682.zip (for example), it's not working. 

 

Thanks in advance for any tips you may have for me. 

 

 

Link to comment
Share on other sites

After several more hours of troubleshooting, I have concluded that this is an actual bug and unlikely to be user error.

 

I've even installed an alternate archiving utlilty (betterzip) for mac, to avoid any possibility of the OS mucking up the jar files (which I don't really think it does, but I'm erring on the safe side).

 

I was able to successfully install forge using the newer 1.5.2 minecraft_server.jar, and for the first time, I watched quite happily as the server booted up and spewed out a bunch of forge-specific language in the terminal and server windows.  :)

 

Unfortunately, 1.5.2 isn't an option for me because the mod I am doing all of this for (http://minecrafteon.com/vending-block-mod-minecraft-1-5-1) isn't available for 1.5.2 yet, and doesn't seem to be compatible with 1.5.2 from my trials- ie. I can't log in with the 1.5.1 client (outdated client error) :(

Of the 20 or so versions of forge for 1.5.1, I have tried about 5 or 6 of them, but after extracting and adding their contents to the server jar and running it, all of them yield the same error as above ("NoClassDefFoundError").  Do I need to try every single version?

 

I'm thinking someone out there must have run into this bug before.  (I have seen hints of other mac/1.5.1/forge issues in other threads, though none of them help me).

 

Additional evidence that my client is working is I get the FML loader screen on the client, and I can see the vending blocks in my inventory and place them for a millisecond, but they instantly disappear (since the unmodded server obviously doesn't support it).

 

I'm wondering if:

a) People are too busy to reply - understandably

b) I'm not clear enough about my issue

c) People know there's an issue but don't know the fix

 

There are quite a few threads with 0 replies that are older than mine and appear to have adhered to the protocol suggested in the "read this or be deleted" thread.  I realize that you're all volunteers, and don't expect support, but am looking forward to figuring out this problem.  Perhaps my subject line wasn't specific enough. 

Link to comment
Share on other sites

I imagine you're asking me if I have the correct version of the specific mod I'm trying to use.

The answer is yes, but the issue I'm having is not with the mod.

The issue is that the 1.5.1 minecraft_server.jar will not run at all after I've added the forge files to it.

1.5.2 works fine, as I said, but 1.5.2 won't run at all. 

 

Before I can connect to the server, it has to be up and running. 

Before I add the mod to the server, I have to get it up and running with forge only.

This is where it fails.

Link to comment
Share on other sites

  • 2 weeks later...

I believe my typo misled you LexManos.

When I said "1.5.2 works fine, as I said, but 1.5.2 won't run at all."

I meant to say "1.5.2 works fine, as I said, but 1.5.1 won't run at all."

(even when both server and client are using that precise version).

 

The mod I want to use runs on 1.5.1 only, so that's the version of the server AND the client I'm trying to get working.

I can get the server and the client working when both are using version 1.5.2, but when BOTH are using 1.5.1 is when I get the errors as I described originally. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.