I'm having some trouble getting this to run on Linux. I'm not sure how exactly to change the start file to work for the OS. Any ideas?
Tested on Ubuntu 8.10 and 9.04
java -Xms800M -Xmx800M -classpath .:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar
-Djava.library.path=native/linux Main
(all on 1 line)
I found it to be a little laggy on my machine so I cranked the ram usage up to 800 rather than 512 default which smoothed everything out.
If you wish you can put it back to default -Xms512M -Xmx512M
Did you remember to add the shebang? If it's a .sh file you need the shebang.
#!/bin/sh<# or bash java -Xms800M -Xmx800M -classpath .:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar-Djava.library.path=native/linux Main
I'm still having trouble. When running, you select "run in terminal", correct? Whenever I attempt to do this, the terminal flashes open and immediately closes.
I've now tried running from the terminal via "./minecraft-osx.sh". It says "line 12: -Xms512M: command not found". Again, any ideas?
First: Use this code
#!/bin/sh
java -Xms512M -Xmx512M -classpath :lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar -Djava.library.path=native/linux Main
It works perfectly for me.
if you want to get a shortcut, use this code.
#!/bin/bash
cd ~/Documents/minecraft #replace the path with where you saved it
./test.sh & #replace ./test.sh with the name of the file
and it should work, be sure to apply the don't lose focus hack
It's opening now, but I'm getting this error when it tries to load the game: "org.lwjgl.LWJGLException: X Error - disp: 0x8704ff0 serial: 38 error: BadMatch (invalid parameter attributes) request_code: 1 minor_code: 0
at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:28"org.lwjgl.LWJGLException: and this error: "X Error - disp: 0x8704ff0 serial: 47 error: BadMatch (invalid parameter attributes) request_code: 1 minor_code: 0
at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:28"
The code i gave you in my post works fine for me.
I was lazy and just edited the .bat file.
You can just double click on the bat file and select "Open in terminal" and she's good to go.
Starting the client itself is fine. The minecraft.sh file works like a charm. Thanks for that.
The problem is this: After I start the client and log in and pick a server the game tries to start. After my screen flashes a couple times a box opens up that says something like this: org.lwjgl.LWJGLException: X error - disp: 0x94a8830 serial: 47 error: BadMatch (invalid parameter attributes) request code:1 minor code: 0
I think it's something to do with the graphics. org.lwjgl.LWJGLException is indeed one of the classes packaged in lwjgl.jar. At this point I doubt there's any way any of you can help, but on this off chance you know some miracle cure, help is greatly appreciated.
Try redownloading, I think your lwjgl might be corrupted. I'm not sure though, as I'm not really a java person, but that seems to make the most sense.
Some people have mentioned that they needed to download the lightweight java gl library and install it manually themselves.
It's also possible that you don't have opengl installed in your x server. Since minecraft (and lwjgl) need opengl, this could also cause your issues.
If you do definitely have opengl (you can run the 3d gears test app fine) then the site to redownload the lwjgl stuff from is: http://www.lwjgl.org/
Thanks for the help, the problem isn't solved, I'm working on drivers, but I'm putting it off for now. More important stuff to do. Thanks again, you can close the thread.
The latest stable from the website won't work for me either. I could only get it working with this version:
http://www.4shared.com/file/144722823/db7b5769/liblwjgl.html
Hey, i've tried both versions of the script (on Ubuntu 4.09), but when i try to run them, they give me the following errors:
guyboy@ubuntu:/media/TREKSTOR/un$ ./minecraft-osx.sh
bash: ./minecraft-osx.sh: /bin/sh<#: bad interpreter: No such file or directory
or
guyboy@ubuntu:/media/TREKSTOR/un$ ./minecraft-osx.sh
bash: ./minecraft-osx.sh: /bin/sh^M: bad interpreter: No such file or directory
=S I don't know too much about Linux.
IVE TRIED EVERYTHING!!!
I keep getting errors and cant find where to edit the .bat or other files or how to install java on ubuntu 10.04
Run the .sh, not the .bat
get firefox and it will have a type of Java but it wont be it entirely...its called Icetea pack or something like that
I'm having a similar problem. I'm unable to allocate enough memory.
I've been running :
ava -Xms512M -Xmx512M -jar /home/USER/desktop/minecraft.jar
as well as
ava -Xms512 -Xmx512 -jar /home/USER/desktop/minecraft.jar
My problem is that I have an insufficiently large memory allocation and that the game crashes pretty much as soon as I have 2-3 items or alter the terrain. Could some one give me a script to help me run? I tried :#!/bin/sh
java -Xms800M -Xmx800M -classpath
.:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar
-Djava.library.path=native/linux Main
But the computer didn't recognise the "Main" and nothing happened. Help please...
Are you opening the Jar file with JDK java 6 runtime? I had a problem opening the file until I used that one
Im having the same issue as medusa on #18. It gives me the error below when running the sh file. im on ubuntu 10.04 . Heres minecraft-osx.sh:
</div><div><div>#!/bin/sh</div><div><br></div><div>/usr/bin/java -Xms800M -Xmx800M -classpath .:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar -Djava.library.path=native/linux Main</div><div>
</div><div><div>Exception in thread "main" java.lang.NoClassDefFoundError: com/mojang/minecraft/MinecraftApplet</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.defineClass1(Native Method)</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.defineClass(ClassLoader.java:634)</div><div><span class="Apple-tab-span"> </span>at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader.access$000(URLClassLoader.java:73)</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader$1.run(URLClassLoader.java:212)</div><div><span class="Apple-tab-span"> </span>at java.security.AccessController.doPrivileged(Native Method)</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader.findClass(URLClassLoader.java:205)</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:321)</div><div><span class="Apple-tab-span"> </span>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:266)</div><div>Caused by: java.lang.ClassNotFoundException: com.mojang.minecraft.MinecraftApplet</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader$1.run(URLClassLoader.java:217)</div><div><span class="Apple-tab-span"> </span>at java.security.AccessController.doPrivileged(Native Method)</div><div><span class="Apple-tab-span"> </span>at java.net.URLClassLoader.findClass(URLClassLoader.java:205)</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:321)</div><div><span class="Apple-tab-span"> </span>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)</div><div><span class="Apple-tab-span"> </span>at java.lang.ClassLoader.loadClass(ClassLoader.java:266)</div><div><span class="Apple-tab-span"> </span>... 11 more</div><div>Could not find the main class: Main. Program will exit.</div></div><div>
Can someone just upload their client please ?
How to run Minecraft on Ubuntu:
I have the same issue as medusa and luckysmack. It would be helpful if, like givo said, someone upload their client folder with instructions on how to run it. I have tried all of the codes in this forum, with no results.
ok slightly annoyed now ive been through ever single mentioned fix for both .bat and .sh
i get a few errors across all of them
Im running latest Java (Useing Java Webstart)
Terminal loves to show this error:
sed: invalid option -- E
Meanwhile Java 6 Throws this at me:
Failed to find the '<' charater that marks the end of a CDATA element. Exception parsing xml at line 0
at com.sun.deploy.xml.XMLParser.skipPCData(XMLParser.java:190)
at com.sun.deploy.xml.XMLParser.nextToken(XMLParser.java:108)
at com.sun.deploy.xml.XMLParser.parse(XMLParser.java:64)
at com.sun.javaws.jnl.XMLFormat.parse(XMLFormat.java:75)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:84)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:102)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:207)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:447)
at com.sun.javaws.Main.launchApp(Main.java:313)
at com.sun.javaws.Main.continueInSecureThread(Main.java:249)
at com.sun.javaws.Main$1.run(Main.java:111)
at java.lang.Thread.run(Thread.java:662)
the .sh Script im using Currently is
#!/bin/sh
JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
DIR=`echo $0 | sed -E 's/\/[^\/]+$/\//'`
if [ "X$0" != "X$DIR" ]; then
cd $DIR
fi
RUN=true
while [ $RUN == "true" ]; do
$JAVA -classpath skin:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/World of Minecraft.jar:lib/minecraft.jar -Djava.library.path=native/linux -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -Xmx800M Main
if [ $? -ne 10 ]; then RUN=false; fi
done
I think i've given as much Information as i can and and those who say dont forget to mod mincraft.jar yes i have alredy modded minecraft.jar for focus
Running Ubuntu 8.04
WoM Coins: 0
I also have Java installed in /usr/Java