Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[INSTALL] Ubuntu Minecraft Installer [UPDATE 2.0]


  • Please log in to reply
93 replies to this topic

#1

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 09 April 2011 - 04:04 AM

:SSSS:

Complete Ubuntu Installer Script (v2.0)
by Alloc
[email protected]
UPDATES: (5/07/11)
-added desktop shortcut feature
-minecraft will be added to your applications menu under games
-improved java detection script
-checks for the existence of files before creating new ones
-user is now asked what they'd like to do  
-complete uninstall function implemented
-now uses the official minecraft icon
-user can now choose between OpenJDK and Sun-Java  
-troubleshooting menu added
NEW:
-the script can now download and install the minecraft server client  :Red:
-the script can uninstall the server client  :Red:
-the script downloads a nice little server icon to use with the launchers it creates  :Red:
Posted Image << server icon                            



Setting up a solid installation of minecraft on Ubuntu can be a hassle.
But this installer script will do all the hard work for you!

Basically the script does this:
- Asks you if you'd like to Install or Uninstall Minecraft
if you chose Install:
- Looks for Sun-Java
- Downloads and installs Sun-Java if needed
- Sets Sun-Java as default
- Downloads Minecraft for you!
- Installs it to a new .minecraft folder!
- Writes a shell script to your bin folder
- Creates a shortcut on your desktop that you can use to run Minecraft!
- Creates a launcher in your Applications menu for Minecraft!
- Lets you run Minecraft from terminal with a simple "minecraft" command!
- also, it makes you happy!

How To Run It
1. Download the file from the link below
2. Right click and open the file's Properties
3. Browse to the Permissions tab and check the executable box
4. Double click on the file and choose RUN IN TERMINAL!

Tutorial
odo6QbdCfeU


Alternatively: you can give it executable permissions via the terminal and run it from there
:~$ cd /path/to/downloaded/file/
:~$ chmod -x Minecraft_Installer_20.sh
:~$ bash Minecraft_Installer_20.sh

After the script has run, you'll have a nice launcher on your desktop and you'll be able to just open up terminal and type "minecraft" to play!



  :Lime: Download Link:HERE


:iapprove:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :Diamond:  :Orange:  :soil:
I'd love to here your feed back and suggestions!
oh, and I wouldn't mind your problems and errors either :Notch:
[email protected]
:soil:  :Orange:  :soil:  :Orange:  :soil:  :Orange:  :soil:  :Orange:  :soil:  :Orange:  :Purple:  :Orange:  :Purple:  :Orange:  :Purple:  :Orange:  :Purple:  :Orange:  :Purple:  :Orange:  :Purple:

The Script:
#!/bin/bash


# Alloc's Minecraft Installer:

# feel free to change, update, improve, and release this script

# suggestions of feedback? reach me at [email protected]

# This script, in no way, is directly distributing any protected minecraft files
# all files are downloaded directly from minecraft.net. Don't worry, you won't be
# breaking the "one big rule" :)

# happy mining!

# latest update 5/07/2011


echo ""
echo "@-------------------------------------------@"
echo "@	 Alloc's Bash Minecraft Installer	  @"
echo "@	 Version 2.0						   @" 
echo "@										   @"
echo "@	 Please feel free to improve		   @"
echo "@	 this script however you desire.	   @"
echo "@										   @"
echo "@	 [email protected]						  @"
echo "@-------------------------------------------@"

counter=1

#----------------------------------#
#		   DOTS FUNCTION		  #
#----------------------------------#
# this function simply prints three dots. It waits .1 seconds between each dot
function dots {
while [ $counter -le 3 ]
do
echo -ne "."
sleep .1
((counter++))
done
let counter=1
echo
}
## END DOTS

#----------------------------------#
#		 INSTALL FUNCTION		 #
#----------------------------------#
# This is the main install function, here all the files are downloaded/created and installed
function Install {
# the first thing it does is check to see if the .minecraft folder already exists
# if so, then we don't need to create a new one, if not, we do.
if [ -e /home/$(whoami)/.minecraft ]
then
	echo  ".minecraft folder exists"
	if [ -e /home/$(whoami)/.minecraft/minecraft.jar ]
	then
		echo  -ne "have you run this before?"
		dots
	
	fi
	echo ""
else 
echo -ne "creating /home/$(whoami)/.minecraft"
dots
cd /home/$(whoami)
mkdir .minecraft
fi	




#--------------------------------------------
cd /home/$(whoami)/.minecraft
#--------------------------------------------
# after the .minecraft folder is created, the script checks for Sun-Java
# by checking to see if the installation folder is present, if so, then
# it will not download it, however it will still make sure that sun-java
# is default, just in case openjdk is already installed
echo -ne "looking for Sun-Java"
dots
if [ -e /usr/lib/jvm/java-6-sun ] 
then
	if [ -e /usr/lib/jvm/java-6-sun/bin ]
	then 
		if [ -e /usr/lib/jvm/java-6-sun/bin/java ]
		then
		echo "Sun-Java is already Installed!"
		echo -ne "We need to make sure that it is the default Java installation"
		dots
		echo "Don't worry if you see lots of errors"
		echo "this requires root access"
		# setting the default java creates alot of unneeded text, therefore it is done 
		# in a new terminal window, because people dont' really need to see it
		sudo gnome-terminal -x sudo update-java-alternatives -s java-6-sun
		echo "Sun Java set as Default."
		fi
	fi
echo ""
else
echo -ne "you'll need to install Sun-Java-JRE"
dots
echo "this will require root access!"
echo "prepare for lots of text!"
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo update-java-alternatives -s java-6-sun
echo ""
echo ""
echo ""
echo " JAVA INSTALL SUCCESSFUL!"
echo "------------------------------------"
echo ""
echo ""
echo ""

fi 

#--------------------------------------------
# the .jar file is simply downloaded to the .minecraft folder from minecraft.net
# it first checks to see if the user already has it, if so, it won't be downloaded
echo -ne downloading minecraft.jar
dots
if [ -e /home/$(whoami)/.minecraft/minecraft.jar ] 
then
echo looks like you already downloaded it!
else
wget -q www.minecraft.net/download/minecraft.jar
echo "downloaded."
fi
echo""
echo -ne downloading icon
# the icon is also downloaded from minecraft.net, only if needed
dots
if [ -e /home/$(whoami)/.minecraft/icon.png ] 
then
echo "you already have the icon!"
else
wget -q http://www.minecraft.net/favicon.png
mv favicon.png icon.png
echo saved to /home/$(whoami)/.minecraft
fi
echo ""
#---------------------------------------------
echo -ne "writing bin shell"
# this writes a seperate shell script in the /usr/local/bin folder, this is what allows the user
# to run minecraft from terminal, just by typing minecraft.
dots
if [ ! -e /usr/local/bin/minecraft ] 
then
touch minecraft
echo java -jar /home/$(whoami)/.minecraft/minecraft.jar >> minecraft
echo -ne saving to usr/local/bin
dots
echo this requires root access:
sudo cp minecraft /usr/local/bin/
cd /
cd /usr/local/bin
sudo chmod +x minecraft
echo "done"
else 
echo excecutable already written
fi
echo ""
#--------------------------------------------
echo -ne writing desktop shortcut
dots
cd /home/$(whoami)/.minecraft/
if [ -e /home/$(whoami)/.minecraft/install_files ] 
then
echo -ne previous version detected, updating
dots
rm -rf install_files
fi
mkdir install_files
cd install_files

touch alloc-installer.desktop
echo "[Desktop Entry]" >> alloc-installer.desktop
echo "Type=Application" >> alloc-installer.desktop
echo "Encoding=UTF-8" >> alloc-installer.desktop
echo "Name=Minecraft" >> alloc-installer.desktop
echo "Comment=awesome game" >> alloc-installer.desktop
echo Exec= java -jar /home/$(whoami)/.minecraft/minecraft.jar >> alloc-installer.desktop
echo Icon= /home/$(whoami)/.minecraft/icon.png  >> alloc-installer.desktop
echo Categories=Game >> alloc-installer.desktop
echo "Terminal=false" >> alloc-installer.desktop
#----------------------------------------------------
echo -ne granting the shortcut excecution permissions
dots
echo this requires root access
cp alloc-installer.desktop /home/$(whoami)/Desktop
sudo chmod +x /home/$(whoami)/Desktop/alloc-installer.desktop
echo "done"
echo ""
#---------------------------------------------
echo -ne writing menu item
dots
touch alloc-menu.directory
echo [Desktop Entry] >> alloc-menu.directory
echo Value=1.0 >> alloc-menu.directory
echo Type=Directory >> alloc-menu.directory
echo Encoding=UTF-8 >> alloc-menu.directory
echo "done"
echo ""
echo -ne installing to Applications menu
dots
xdg-desktop-menu install alloc-menu.directory alloc-installer.desktop
xdg-desktop-menu forceupdate
echo installed
#--------------------------------------------
echo ""
echo "SUCCESS!"
echo ""
echo -e "Minecraft has been successfully Downloaded and Installed \nCheck your desktop and Applications menu for launchers! \nYou can also run it from terminal with a 'minecraft' command! \ncontact: [email protected]" 
echo "Happy Mining!"

echo""

}
## END INSTALL

#----------------------------------#
#	 SERVER INSTALL FUNCTION	  #
#----------------------------------#
function ServerInstall {
echo -ne "Looking for Server File"
dots
if [ -e /home/$(whoami)/Minecraft_Server/bin/minecraft_server.jar ]
then
	echo -ne "Server Files already installed!"
	dots
	Main
else
echo "not found!"
fi
echo ""
echo -ne "Creating Server Directory"
dots
mkdir /home/$(whoami)/Minecraft_Server
cd /home/$(whoami)/Minecraft_Server
mkdir bin
cd bin
echo ""
echo -ne "Downloading"
dots
echo -ne "	 -minecraft_server.jar"
echo	 "   done!"
wget -q http://www.minecraft.net/download/minecraft_server.jar

echo -ne "	 -server_icon.png	 "
echo	 "   done!"
dots
wget -q http://i.imgur.com/ugDRM.png
mv ugDRM.png server_icon.png

echo ""
echo -ne "Writing Shell Launcher"
dots
if [ -e minecraft_server ] 
then
	rm minecraft_server
fi
touch minecraft_server
echo "cd /home/$(whoami)/Minecraft_Server" >> minecraft_server
echo "pwd" >> minecraft_server

echo "java -Xmx1024M -Xms1024M -jar bin/minecraft_server.jar" >> minecraft_server
echo -ne  "Copying to bin folder"
dots
echo "This may require root access:"
sudo cp minecraft_server /usr/local/bin
sudo chmod +x /usr/local/bin/minecraft_server
echo "done"
echo ""

echo -ne "Creating launchers"
dots

mkdir install_files
cd install_files

if [ -e alloc-server_installer.desktop ] || [ -e alloc-menu.directory ] 
then
	rm alloc-server_installer.desktop
	rm alloc-menu.directory
fi
touch alloc-server_installer.desktop
  echo "[Desktop Entry]" >> alloc-server_installer.desktop
  echo "Type=Application" >> alloc-server_installer.desktop
  echo "Encoding=UTF-8" >> alloc-server_installer.desktop
  echo "Name=Server Minecraft" >> alloc-server_installer.desktop
  echo "Comment=Server GUI" >> alloc-server_installer.desktop
  echo Exec=  minecraft_server >> alloc-server_installer.desktop
  echo Icon= /home/$(whoami)/Minecraft_Server/bin/server_icon.png  >> alloc-server_installer.desktop
  echo Categories=Game >> alloc-server_installer.desktop
  echo "Terminal=false" >> alloc-server_installer.desktop
#----------------------------------------------------
echo -ne "Granting the shortcut excecution permissions"
dots
echo this requires root access
cp alloc-server_installer.desktop /home/$(whoami)/Desktop
sudo chmod +x /home/$(whoami)/Desktop/alloc-server_installer.desktop
echo "done"
echo ""

echo -ne "Writing menu item"
dots
touch alloc-menu.directory
  echo [Desktop Entry] >> alloc-menu.directory
  echo Value=1.0 >> alloc-menu.directory
  echo Type=Directory >> alloc-menu.directory
  echo Encoding=UTF-8 >> alloc-menu.directory

echo -ne "Installing server launchers"
dots
xdg-desktop-menu install alloc-menu.directory alloc-server_installer.desktop
xdg-desktop-menu forceupdate
echo "done"
echo ""
echo  -e "The Minecraft server client has been installed! \nrun it from the launchers, or by typing 'minecraft_server' into terminal"


## END SERVER INSTALL 
}

#----------------------------------#
#	SERVER UNINSTALL FUNCTION	 #
#----------------------------------#
function ServerUninstall {
if [ ! -d /home/$(whoami)/Minecraft_Server ]
then
	echo Server is not installed!
	return
fi
cd /home/$(whoami)/Minecraft_Server/bin/install_files
echo -ne "Removing Launchers"
dots
xdg-desktop-menu uninstall alloc-menu.directory alloc-server_installer.desktop
echo "done"
echo ""
echo -ne "Removing Desktop Icon"
dots
cd /home/$(whoami)/Desktop
if [ -e alloc-server_installer.desktop ]
then
	rm alloc-server_installer.desktop
	echo "done"
else
	echo "Does not exits"
fi
echo ""
echo -ne "Removing Server"
dots
if [ -d /home/$(whoami)/Minecraft_Server/bin ]
then
	cd /home/$(whoami)/Minecraft_Server
	rm -rf bin
	echo "done"
fi
echo ""
echo -ne "Removing launch script"
dots
echo "this requires root access"
sudo rm /usr/local/bin/minecraft_server
echo "done"

echo "Uninstall Successful"
}
#----------------------------------#
#	   UNINSTALL FUNCTION		 #
#----------------------------------#
function Uninstall {
echo -ne "Looking for Minecraft"
dots
if [ ! -e /home/$(whoami)/.minecraft/minecraft.jar ]
then
	echo -ne "  -folder not detected"
	dots
	if [ ! -e /usr/local/bin/minecraft ]
	then
	echo -ne "  -bin launcher not detected"
	dots
	echo""
	echo "Minecraft doesn't seem to be installed!"
	Main
	return
	fi
fi
echo "Minecraft found!"
echo -ne "Uninstalling Minecraft"
dots
echo "NOTE: You're save files will be kept"
cd /home/$(whoami)/.minecraft
echo ""
echo -ne "Deleting files and folders"
dots
rm -rf bin
rm -rf texturepacks
rm minecraft.jar
if [ -e options.txt ]
then
	rm options.txt
fi
if [ -e lastlogin ]
then
	rm lastlogin
fi
rm minecraft
rm -rf resources
rm icon.png
cd install_files
echo "Removing Application Launcher"

xdg-desktop-menu uninstall alloc-menu.directory alloc-installer.desktop
echo "Removing Desktop Shortcut"
rm /home/$(whoami)/Desktop/alloc-installer.desktop
rm -rf /home/$(whoami)/.minecraft/install_files
echo ""
echo -ne "Removing Binary Launcher"
dots
echo "this requires root access:"
sudo rm /usr/local/bin/minecraft
echo ""
echo "Minecraft has been uninstalled :(" 

}
## END UNINSTALL

#----------------------------------#
#	 TROUBLESHOOT FUNCTION		#
#----------------------------------#
function TroubleShoot {
echo ""
echo ""
echo "#----------------------------------#"
echo "#	   Troubleshooting Menu	   #"
echo "#----------------------------------#"

echo "What would you like to do? (enter number of choice)"; echo "";
echo "1. install/update Sun-Java"
echo "2. install/update OpenJDK"
echo "3. use Sun-Java to run minecraft from now on"
echo "4. use OpenJDK to run minecraft from now on (not generally encouraged)"
echo "5. these options didn't fix it!"
echo "6. return to the main menu"
TINPUT=0
read TINPUT
if [ $TINPUT -eq 1 ]
then
	echo -ne "Installing/Updating Sun-Java"
	dots
	echo "this requires root access:"
	sudo apt-get install sun-java6-jre
	echo ""; echo ""; echo; echo "Finished!"; echo "";
	TroubleShoot
else
if [ $TINPUT -eq 2 ]
then
	echo -ne "Installing/Updating OpenJDK"
	dots
	echo "this requires root access:"
	sudo apt-get install openjdk-6-jre
	echo ""; echo ""; echo; echo "Finished!"; echo "";
	TroubleShoot
else
if [ $TINPUT -eq 3 ]
then
	echo -ne "Making Sun-Java the default"
	dots
	echo "Don't worry if you see lots of errors"

	sudo gnome-terminal -x sudo update-java-alternatives -s java-6-sun
	echo ""; echo ""; echo; echo "Finished!"; echo "";
else 
if [ $TINPUT -eq 4 ]
then
	echo -ne "Making OpenJDK the default"
	dots
	echo "Don't worry if you see lots of errors"

	sudo gnome-terminal -x sudo update-java-alternatives -s java-6-openjdk
	echo ""; echo ""; echo; echo "Finished!"; echo "";
else
if [ $TINPUT -eq 5 ]
then
echo "-------------------------------------------------"
echo "if these troubleshooting options didn't fix your,"
echo "problem, I'd be glad to help you out! "
echo "[email protected]"
echo "-------------------------------------------------"
read NOTHING
Main
else
if [ $TINPUT -eq 6 ]
then
return
else
echo invalid choice
TroubleShoot
fi
fi
fi
fi
fi
fi
}

## END TROUBLESHOOT

#----------------------------------#
#		  MAIN FUNCTION		   #
#----------------------------------#
function Main {
echo ""
echo "------------------------------------------------------"
echo "What would you like to do? (enter number of choice) "; echo "";
INPUT=0
while [ $INPUT != 1 ] && [ $INPUT != 2 ] && [ $INPUT != 3 ]
do
echo "1. Install Minecraft"
echo "2. Uninstall Minecraft"
echo "3. Install Minecraft Server"
echo "4. Uninstall Minecraft Server"
echo "5. TroubleShooting"
echo "6. Exit"
if [ -e /usr/local/bin/minecraft ] && [ -e /home/$(whoami)/.minecraft/minecraft.jar ]
then
echo "7. Play Minecraft!"
fi
read INPUT
if [ $INPUT -eq 1 ] 
then
	Install
	Main
	return
else 
if [ $INPUT -eq 2 ] 
then
	Uninstall
	Main
	return
else
if [ $INPUT -eq 3 ]
then
	ServerInstall
	Main
	return
else
if [ $INPUT -eq 4 ]
then
	ServerUninstall
	Main
	return
else
if [ $INPUT -eq 5 ]
then
	TroubleShoot
	Main
	return
else
if [ $INPUT -eq 6 ]
then
	return
else
if [ $INPUT -eq 7 ] && [ -e /usr/local/bin/minecraft ] && [ -e /home/$(whoami)/.minecraft/minecraft.jar ]
then
minecraft
else

	echo "invalid choice"
	Main
fi
fi
fi
fi
fi
fi
fi

done
}


#----------------------------------#
#	  CALL THE MAIN FUNCTION	  #
#----------------------------------#

Main

# THE END 

Notice:
This script does not hold or contain any protected material or files. You are free to change and distribute this script however you so desire.

Register or log in to remove.

#2

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 09 April 2011 - 06:13 AM

Update: added Desktop Shortcut Feature

#3

Vortex_v
    Vortex_v

    Out of the Water

  • Members
  • 9 posts

Posted 09 April 2011 - 06:36 AM

I'm curious as to why you are creating an executable to do something that a simple shell script can do?

Have you seen the nice debian init.d script? it's on the wiki.

#4

The_Wolf
    The_Wolf

    Out of the Water

  • Members
  • 3 posts

Posted 09 April 2011 - 09:29 AM

Double click minecraft.exe, done. (I'm assuming windows as you didn't post OS)

#5

Vortex_v
    Vortex_v

    Out of the Water

  • Members
  • 9 posts

Posted 09 April 2011 - 09:38 AM

The_Wolf said:

Double click minecraft.exe, done. (I'm assuming windows as you didn't post OS)

are you referring to my post? if so. Then it's  ubuntu orientated post. I didn't expect to need to state ubuntu as the os I was talking about :Diamond:

A shell script in linux or windows is the same thing. Usually with the advantage of being a standard feature of every install. (sh in linux is fairy universal. or sh like syntax in most shells and quite frankly if you are using a weird one that doesn't do sh like syntax (ok.. weird to me :D then you will know how to maintain or convert scripts your self anyway.)

The advantage of of shell scripts also means that you can
1. immediately add any new paramaters that you want as apposed to recompiling a c program.
2. You need to make sure that the correct package is installed with this current method. With a shell script you remove that requirement and don't need to add any additional packages.
3. I can see immediately what's going on in a script.

#6

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 09 April 2011 - 04:15 PM

UPDATE: No more compiling!

Vortex_v said:

I'm curious as to why you are creating an executable to do something that a simple shell script can do?.

From what i was reading, I was under the impression that only compiled binary's could be directly run from the bin folder. I had been trying to run shell scripts but was getting a Permission Denied Error. However, I've learned how to correct that now.  The binary launcher has now been replaced with a short executable shell script!

Thanks for the feedback!

#7

Failure #117

Posted 09 April 2011 - 04:42 PM

Or you can just download the launcher from minecraft.net...?

#8

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 09 April 2011 - 05:06 PM

Failure #117 said:

Or you can just download the launcher from minecraft.net...?
You mean download the jar file? You can do that, but using it isn't very convenient.

I'll compare the two methods of getting minecraft for you:

Downloading from minecraft.net
-you download a .jar
-you have run "java -jar /path/to/download/minecraft.jar to play
-you can't run it with just a "minecraft" command
-you'll have to manually create any launchers or shortcuts.

Downloading my Script
-you download and run a shell script
-you can now run it with a "minecraft" command from terminal
-you get a nice looking launcher on your desktop instead of an ugly .jar file
-everything is set up for your

It really is quite useful!

#9

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 11 April 2011 - 06:49 PM

Update

-Installer now checks for Java, and installs OpenJDK as necessary
- Minecraft is now installed to your applications menu, under the Games tab!
- Video tutorial added!

Check it out!

#10

Morlok8k
    Morlok8k

    Redstone Miner

  • Members
  • 677 posts
  • Location: Pacific Northwest, USA
  • Minecraft: Morlok8k
  • Xbox:Morlok8k

Posted 11 April 2011 - 11:02 PM

you know that notch says that you should use the Sun (Oracle) Java and not one of the alternatives.

(as for the server i haven't tried it, but with the client sun java works much better than openjdk)
Minecraft Land Generator  |   Memory issues? Try this:  java -Xincgc -Xmx1024M -Xms512M -jar Minecraft.jar
"We must be that generation that stands athwart history yelling: 'Hey, jackass, get your government off my freedom!'" - Jason Mattera

#11

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 12 April 2011 - 01:09 AM

Morlok8k said:

you know that notch says that you should use the Sun (Oracle) Java and not one of the alternatives.

ah yes, thanks for your concern. What I found is that the desktop icon, and the applications menu launcher, don't work with Sun Java. I can't even seem to get it to run from terminal with Sun. That's why I'm using OpenJDK as a default it also comes with ubuntu so it's convenient.

As for the launchers not working, that could just be me. So I gave the installer to four people in a programming class of mine (which happens to be java) and told them to try it with both sun and openJDK. I'll know tomorrow what worked for them on different systems and let you know.

So did you try the installer? How did it work for you?
ps. if you have minecraft installed already, running the installer won't mess anything up, it'll just create the shortcuts

as with anything code related... its always a WIP :P

edit: I'm now implementing a feature that asks users what java environment they want to use

#12

Vortex_v
    Vortex_v

    Out of the Water

  • Members
  • 9 posts

Posted 15 April 2011 - 12:25 PM

I've had no issues with openjdk when used to run the server.jar file. Is there a post on the forum that details the potential performance issues you speak of? I've not seen such a post. I've seen vague "it doesn't run" or "it doesn't run as well" kind of posts but no actual proof or in depth discussion about this.

As far as I can tell Open jdk for linux is:
1. not maintained by oracle (that's a plus in every way :P )
2. it actually works with minimal effort (apt-get install openjdk*)
3. openjdk has source code provided (I'm not sure if oracles java has the source available.. I doubt it) so this means that targeted builds can be made to speed up performance if required.

#13

Vortex_v
    Vortex_v

    Out of the Water

  • Members
  • 9 posts

Posted 15 April 2011 - 12:31 PM

alloc said:

UPDATE: No more compiling!

Vortex_v said:

I'm curious as to why you are creating an executable to do something that a simple shell script can do?.

From what i was reading, I was under the impression that only compiled binary's could be directly run from the bin folder. I had been trying to run shell scripts but was getting a Permission Denied Error. However, I've learned how to correct that now.  The binary launcher has now been replaced with a short executable shell script!

Thanks for the feedback!

well good to hear that you found the solution :P I wish you good progress on this tool.

#14

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 15 April 2011 - 06:44 PM

Vortex_v said:

well good to hear that you found the solution ;) I wish you good progress on this tool.

Thanks vortex, the script is coming along nicely!

UPDATE! 4/15/2011

-the java detection script has been improved (see below)
-there was a bug with the bin file launching minecraft multiple times, this has been fixed
-the script will no longer download and create files if they already exist

OpenJDK debate:
This script still checks for OpenJDK specificly and installs OpenJDK if it is not found.
I know notch himself suggests Sun-Java, however, I have not been able to get minecraft to run with Sun on all three of my computers. I gave the script to four others and none where able to run minecraft without OpenJDK.
I know what notch says, but for now its openJDK all the way.

-future plans:
the script will immediately try to launch minecraft after installation. If it was indeed unsuccessful, it will remove OpenJDK and check for Sun-Java and install it accordingly. If the launch fails again, I'll refer users to the support section in the forums.

Thanks!

#15

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 16 April 2011 - 06:38 PM

UPDATE! 4/16/2011

- The user may now choose to Install or Uninstall
- now uses official minecraft icon
- Save files will not be deleted upon uninstallation,
- A new video is in the works to showcase the new features

I am looking for 11.04 testers!
Thanks!

#16

olavk2
    olavk2

    The Meaning of Life, the Universe, and Everything...

  • Members
  • 42 posts

Posted 17 April 2011 - 07:01 PM

alloc said:

Morlok8k said:

you know that notch says that you should use the Sun (Oracle) Java and not one of the alternatives.

ah yes, thanks for your concern. What I found is that the desktop icon, and the applications menu launcher, don't work with Sun Java. I can't even seem to get it to run from terminal with Sun. That's why I'm using OpenJDK as a default it also comes with ubuntu so it's convenient.

As for the launchers not working, that could just be me. So I gave the installer to four people in a programming class of mine (which happens to be java) and told them to try it with both sun and openJDK. I'll know tomorrow what worked for them on different systems and let you know.

So did you try the installer? How did it work for you?
ps. if you have minecraft installed already, running the installer won't mess anything up, it'll just create the shortcuts

as with anything code related... its always a WIP :(

edit: I'm now implementing a feature that asks users what java environment they want to use
well i havve no problem using sun instead of open jdk and im running ubuntu 10.10 64 bit
and thanks its alot easier than using the .jar
my youtube channel(press the image to go there)
Posted Imagei provide Minecraft, War Thunder and World of Tanks videos

#17

Crass
    Crass

    Tree Puncher

  • Members
  • 16 posts

Posted 18 April 2011 - 06:35 AM

This is really helpful and awesome, thank you so very much. I really hope they add Minecraft to the Ubuntu Software Center, but in the meantime this will do the trick!

#18

Lohengriehn
  • Location: Germany
  • Minecraft: yes

Posted 18 April 2011 - 10:31 AM

Just want to leave a Thank you! also.
Your installer works fine and its nice to have a desktop icon for minecraft.

I tried the complete installer with openjdk installation. After testing it out (Ive deinstalled sun-java-jre before) I found out that openjdk doesnt work better than the sun-java-jre on my machine. Rolled back to sun-java-jre.

- Lohengriehn

#19

alloc
    alloc

    Tree Puncher

  • Members
  • 16 posts
  • Location: michigan
  • Minecraft: jibblesnbits

Posted 18 April 2011 - 03:06 PM

Crass said:

This is really helpful and awesome, thank you so very much. I really hope they add Minecraft to the Ubuntu Software Center, but in the meantime this will do the trick!
I hope so too! thanks for the feedback!

olavk2 said:

well i havve no problem using sun instead of open jdk and im running ubuntu 10.10 64 bit
and thanks its alot easier than using the .jar

Lohengriehn said:

Just want to leave a Thank you! also.
Your installer works fine and its nice to have a desktop icon for minecraft.

I tried the complete installer with openjdk installation. After testing it out (Ive deinstalled sun-java-jre before) I found out that openjdk doesnt work better than the sun-java-jre on my machine. Rolled back to sun-java-jre.
- Lohengriehn

Thanks for the feedback guys, I really appreciate peoples interest in the script!  As I've said before I'll be implementing a feature to let users choose their Java distribution. I've got a sloppy copy done and working, and now I'm just trying to make it completely fool proof.
There will also be a third "Troubleshooting" option at the main menu which will identify the installed form of Java and let the user choose to switch from one to the other, or just install both and choose a default.
look for its release in the coming days!
Thanks!
-Alloc

#20

olavk2
    olavk2

    The Meaning of Life, the Universe, and Everything...

  • Members
  • 42 posts

Posted 26 April 2011 - 12:55 PM

I found out a problem which I had, I was going to upgrade to beta 1.5 but it didn't let me so I had to remove it and use the .jar provided at minecraft.net   :(
my youtube channel(press the image to go there)
Posted Imagei provide Minecraft, War Thunder and World of Tanks videos