Jump to content

Recommended Posts

Posted

I am actually uncertain if this is supported or not; I thought it was, but I can't make it work.

 

I am trying to use forge (152/738) to run a minecraft server. I was under the belief that starting with the 1.5 series, forge could be run as the main jar, and launch an unmodified server jar, without needing to patch anything.

 

If I'm wrong, just say so. Otherwise, what's wrong with

java -Xms40m -Xmx500m -jar forge.jar minecraft_server-152.jar nogui

 

The only output:

Exception in thread "main" java.lang.NoClassDefFoundError: ab
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        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)
Caused by: java.lang.ClassNotFoundException: ab
        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)
        ... 12 more

 

No log files.

 

Jeb! The sheep! The fence pens, they do nothing still leak!

Posted

(Silly, silly me. Thank for you the forum "auto search", but it comes AFTER the post is posted).

 

So the answer is: the server has to be called "minecraft_server.jar".

 

java -Xms40m -Xmx500m -jar forge.jar minecraft_server.jar nogui

 

works just fine.

 

Jeb! The sheep! The fence pens, they do nothing still leak!

Posted

Yes, 1.5.2 Forge was developed before they started putting the version name in the jar file, so you can either run it as:

java -cp minecraft_server.1.5.2.jar -jar forge.jar nogui

Or rename it to 'minecraft_server.jar' and just run it as:

java -jar forge.jar nogui

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Alright, I am having trouble with this.

 

I have two servers; one works with this, one does not.

 

Both are using 152, forge 738.

 

This one starts up just fine:

(Only mods on server: Forge, chickencore, NEI)

(server is a test running a superflat world)

 

#!/bin/bash 
cd "$( dirname "$0" )" 
# java -Xms30m -Xmx700m -jar craftbukkit.jar 

java -Xms40m -Xmx500m  \
-d32 -server \
-XX:+UseAdaptiveGCBoundary \
-XX:TargetSurvivorRatio=90 \
-XX:CompileThreshold=300 \
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC \
-XX:CMSInitiatingOccupancyFraction=80 \
-XX:SoftRefLRUPolicyMSPerMB=0 \
-XX:MaxPermSize=150m \
-XX:MaxHeapFreeRatio=25 \
-XX:MinHeapFreeRatio=21 \
-XX:+DisableExplicitGC \
-XX:MaxTenuringThreshold=4 \
-XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution \
-XX:+PrintCommandLineFlags -XX:+PrintGCDetails -Xloggc:GC.log \
-jar -cp minecraft_server-152.jar -jar forge.jar nogui lighting

# LDS: 12 to 24 MB
# Copy: Needs to be more than 1.6 MB (default).

 

Yes, that is "-jar -cp" -- that came from a bad editing insert, but it works.

This one does not:

 

exec $java \
        $JVM_SIZE \
        -Xms${START}m -Xmx${MAX}m \
        -XX:NewSize=${NEW}m -XX:MaxNewSize=${MaxNew}m \
        -XX:+UseAdaptiveGCBoundary \
        -XX:TargetSurvivorRatio=$TargetSurvivorRatio \
        -XX:SurvivorRatio=$RATIO \
        -XX:CompileThreshold=300 \
        -XX:+UseConcMarkSweepGC -XX:+UseParNewGC \
        -XX:CMSInitiatingOccupancyFraction=$CMSInitiatingOccupancyFraction \
\
        -XX:SoftRefLRUPolicyMSPerMB=0 \
        -XX:MaxPermSize=150m \
        -XX:+UseParNewGC \
        -XX:MaxHeapFreeRatio=25 \
        -XX:MinHeapFreeRatio=21 \
        -XX:+DisableExplicitGC \
        -XX:MaxTenuringThreshold=4 \
        -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution \
        -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -Xloggc:GC.log \
        -jar -cp minecraft_server-152.jar -jar forge.jar nogui 152mystIntroWorld

 

Gives this crash:

Exception in thread "main" java.lang.NoClassDefFoundError: ab
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        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)
Caused by: java.lang.ClassNotFoundException: ab
        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)
        ... 12 more

 

And just to double check, here's the "echo" of that command line:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java \
-d32 -server \
-Xms199m -Xmx550m \
-XX:NewSize=114m -XX:MaxNewSize=450m \
-XX:+UseAdaptiveGCBoundary \
-XX:TargetSurvivorRatio=90 -XX:SurvivorRatio=1 \
-XX:CompileThreshold=300 \
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC \
-XX:CMSInitiatingOccupancyFraction=80 \
-XX:SoftRefLRUPolicyMSPerMB=0 \
-XX:MaxPermSize=150m \
-XX:+UseParNewGC \
-XX:MaxHeapFreeRatio=25 -XX:MinHeapFreeRatio=21 \
-XX:+DisableExplicitGC \
-XX:MaxTenuringThreshold=4 -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution \
-XX:+PrintCommandLineFlags -XX:+PrintGCDetails -Xloggc:GC.log \
-jar -cp minecraft_server-152.jar -jar forge.jar nogui 152mystIntroWorld

 

(Yes, looking over that echo, MaxNew needs to be adjusted, but that's not an issue here. Apple's java, if given both NewSize and MaxNewSize, and using the CMS collector, will never actually adjust the memory in Eden, and the extra is just never used and wasted. I can't test Oracle's Java 6 (obviously :-) and J7 on macs still had issues last time I tried.)

 

What does work is changing the last line of that to

        -jar forge.jar nogui 152mystIntroWorld

 

with a copy of the server in "minecraft_server.jar".

 

keybounceMBP:Myst10.5-78 michael$ ls minecraft*
2308 minecraft_server-152.jar  2308 minecraft_server.jar
keybounceMBP:Myst10.5-78 michael$ 

Jeb! The sheep! The fence pens, they do nothing still leak!

Posted

Ok, help needed once more.

 

I have a jar mod that I want to use with Forge. It's compatible with forge (more village biomes, the 1.5.x versions, http://www.minecraftforum.net/topic/1430150- ).

 

At the moment, I have to unzip the jar, unzip and add in forge, and then that mod.

Is there a way to use unmodified jars given that this mod wants to be inside the jar?

Jeb! The sheep! The fence pens, they do nothing still leak!

Posted

The 1.6 stuff is not forge compatible, no.

 

The 1.5 stuff is.

 

Still waiting for one of my mods to get 1.6 SMP (single player is working) before updating.

Jeb! The sheep! The fence pens, they do nothing still leak!

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hi,  I'm using Forge 47.3.0 for Minecraft 1.20.1 I apologise if this is obvious I am very new to modding for Minecraft. I sucessfully made a mod that launched without errors or crashes (without it doing anything) but in order to add the features I need, I need to add "Custom Portal API [Forge]" as a dependency. However no matter the way I've tried to acheive this, it crashes. I am pretty sure it's not the way I'm putting it in the repositories, the dependencies or the way I'm refrencing it, as I've a hundred diffrent combinations and multiple Maven methods. And on all those diffrent variations I still get this crash: pastebin.com/UhumzZCZ Any tips would be invaluable as I've been loosing my mind over this!
    • Hi, i'm really having problems trying to set the texture to my custom item. I thought i'm doing everything correctly, but all i see is the missing texture block for my item. I am trying this for over a week now and getting really frustrated. The only time i could make the texture work, was when i used an older Forge version (52.0.1) for Minecraft (1.21.4). Was there a fundamental change for textures and models somewhere between versions that i'm missing? I started with Forge 54.1.0 and had this problem, so in my frustration i tried many things: Upgrading to Forge 54.1.1, created multiple new projects, workspaces, redownloaded everything and setting things up multiple times, as it was suggested in an older thread. Therea are no errors in the console logs, but maybe i'm blind, so i pasted the console logs to pastebin anyway: https://pastebin.com/zAM8RiUN The only time i see an error is when i change the models JSON file to an incorrect JSON which makes sense and that suggests to me it is actually reading the JSON file.   I set the github repository to public, i would be so thankful if anyone could take a look and tell me what i did wrong: https://github.com/xLorkin/teleport_pug_forge   As a note: i'm pretty new to modding, this is my first mod ever. But i'm used to programming. I had some up and downs, but through reading the documentation, using google and experimenting, i could solve all other problems. I only started modding for Minecraft because my son is such a big fan and wanted this mod.
    • Please read the FAQ (link in orange bar at top of page), and post logs as described there.
    • Hello fellow Minecrafters! I recently returned to Minecraft and realized I needed a wiki that displays basic information easily and had great user navigation. That’s why I decided to build: MinecraftSearch — a site by a Minecraft fan, for Minecraft fans. Key Features So Far Straight-to-the-Point Info: No extra fluff; just the essentials on items, mobs, recipes, loot and more. Clean & Intuitive Layout: Easy navigation so you spend less time scrolling and more time playing. Optimized Search: Search for anything—items, mobs, blocks—and get results instantly. What I’m Thinking of Adding More data/information: Catch chances for fishing rod, traveling villager trades, biomes info and a lot more. The website is still under development and need a lot more data added. Community Contributions: Potential for user-uploaded tips for items/mobs/blocks in the future. Feature Requests Welcome: Your ideas could shape how the wiki evolves! You can see my roadmap at the About page https://minecraftsearch.com/about I’d love for you to check out MinecraftSearch and see if it helps you find the info you need faster. Feedback is crucial—I want to develop this further based on what the community needs most, so please let me know what you think. Thanks, and happy crafting!
  • Topics

×
×
  • Create New...

Important Information

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