DragonetMC / Dragonet-Legacy

Old version of the Dragonet Server Software.
http://dragonet.org/
Other
101 stars 28 forks source link

Unable to make and load a start.command file (for Mac) #136

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm currently using the latest build at the moment which would be #272, yet whenever I try to load up the jar with a .command file (can't run .bat files), I always get this error in the terminal:

Unrecognized option: - Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.

[Process completed]

If someone could provide me with a proper start file, it would be much appreciated.

mastercoms commented 8 years ago

What is your command file? There is an extra - somewhere.

DefinitlyEvil commented 8 years ago

Maybe because he tried allocate too much memory for the JVM. ;P

jlirochon commented 8 years ago

Hi @ManticorCC,

Please try the following:

#!/bin/bash
cd "$(dirname "$0")"
JAR=$(find . -name "dragonet-*.jar" | sort -r | head -n1)

echo "Launching $JAR..."
java -Xms256M -Xmx768M -jar $JAR
mastercoms commented 8 years ago

@DefinitlyEvil It saysUnrecognized option: -, so there is an extra - somewhere.

ghost commented 8 years ago

Thanks @jlirochon, the script worked. I can join the server on my mac w/ version 1.8.9, yet I am unable to find my server on iPhone playing PE. By the way, I also have a rack mount server running Ubuntu Server that I'd like host dragonet on as well; I'm assuming I can't use the same script? Sorry, but I have very little to no coding experience...

Edit: PE version is obviously 0.13.0

jlirochon commented 8 years ago

The Mac and the iPhone must be on the same network, otherwise the server won't be listed. You can try to add a server manually in PE to test if you can join. If you can't, check your firewall rules. You need to open UDP port 19132 (on your Mac)

mastercoms commented 8 years ago

@jlirochon Those memory values are a bit low, I think.

jlirochon commented 8 years ago

@mastercoms what would you recommend ?

Honestly I don't know the exact purpose of those values. As a non-Java developer, It seems to me that Java will always grow bigger than the values you choose.

DefinitlyEvil commented 8 years ago

@ManticorCC You should check out the brand new DragonProxy.

mastercoms commented 8 years ago

@jlirochon I haven't profiled Dragonet to find optimal memory values, but I think 768 - 1024 would be good for it. The JVM will listen to Java flags.