I'm very new to Ubuntu, installed 12.04 for the first time a few days ago.

So I basiclly got a game (feedthebeast, mod for minecraft). Now the jar file which I downloaded works just fine, but I find it clunky to go find it everytime I want to play, so I want a shortcut.

Someone on Youtube made this as a .sh file which I can then later make a .desktop in my applications to make the shortcut, pretty complicated tbh but the path in this file is obv his path.

BINDIR="$(dirname "$(readlink -fn "$0")")"
cd "$BINDIR"
export LD_LIBRARY_PATH="/usr/lib/jvm/java-7-ora­cle/jre/lib/amd64"
java -Xms1G -Xmx4G -jar ~/.ftblauncher/FTB_Launcher.jar

But how do I find MY java path, the correct one for this to work. I tried multiple ways, but for some reason I don't got the folders, where people are suposed to have java - when I run whereis java this is what I get:

/usr/bin/java /usr/bin/x11/java/ /usr/share/java/ /usr/share/man/man1/java1.gz

Neither looks like the one he used above.

I installed java following this video:


Essentially I jsut want a shortcut for my .jar file so I can easily access my game on the unity dock

If you guys can help me, or come up with an easier way to make this shortcut for my .jar file I would be so happy!


just make a launcher like this:

gnome-desktop-item-edit --create-new ~/Desktop

in the "command" box put in

java -Xms1G -Xmx4G -jar /full/path/to/FTB_Launcher.jar

that should leave you with a launcher on your desktop. copy that to ~/.local/share/applications to get it on your launcher.

By " jar file which I downloaded works just fine" I assume you are launching it by double-clicking /right-click->open-ing the file? if that works fine try these steps:

1) press ctrl+alt+t ; this will open a terminal

2)enter / paste this : cd .ftblauncher ; the terminal prompt will end with ~/.ftblauncher$

3)enter java -Xms1G -Xmx4G -jar FTB_Launcher.jar ; If this launches FTB, then we can go to the next step: (do you have 4G of ram? -Xmx4G means use a max of 4GB)

4)This suggests that FTB needs to know where it's files are: it needs its "current directory" set. we can do this by making a small launcher script: (it's essentially the same as the one you showed, just waay simpler) Save the following code in a some file, say ftb.sh. Set it to be executable (right-click->properties->permissions->allow executing.)

cd ~/.ftblauncher
java -Xms1G -Xmx4G -jar FTB_Launcher.jar

5)make the launcher as before, only this time let the command be /full/path/to/ftb.sh ; make the file executable by right-click->properties->permissions->allow executing.

getting hands really dirty: save this as ftb.desktop. the icon line is optional if you can get your hands on a small icon .png file

[Desktop Entry]
Name[en_US]=Feed the beast
Name=Feed the beast

mark the file as executable you can just drag it onto the launcher.. (mark as solved when u done :) good luck )

  • Sorry as stated I'm very new to linux and I don't understand how to make the launcher that way, can ou specify which programs I need to open and where I need to put this info etc. – Floplox Jul 27 '13 at 15:08
  • Ok I figured out how to make the launcher icon, but for some reason it ain't working java -Xms1G -Xmx4G -jar /home/Leonpn/.ftblauncher/FTB_Launcher.jar Thats my path, it looks correct to me, so don't know what is wrong – Floplox Jul 27 '13 at 15:45
  • hmm... is the launcher (made by entering the command in the terminal) set to be executable? anyway, I've given another method. Sorry If i'm a bit verbose.. tried to explain my steps so you can experiment on your own and become a linux geek too :P – staticd Jul 28 '13 at 9:44
  • Pew!! Did a lot of messing around with this but I got it working, much love - your guide was very helpfull, I basicly just had to edit the ram to 2GB since thats what I got and in command: /home/[username]/.ftblauncher/FTB.sh So simple when you figure it hehe - cheers again. – Floplox Jul 29 '13 at 13:43
  • Ran into another problem! - I got the launcher on the desktop and works perfectly! but. I can't get it on my unity launcher. when I go to dash it's there and I can run the program from there. It doesn't have text beneath it like the rest of my applications though and when I try to drag it out onto my launcher it just disappears :/ What I would like is to get it working on the launcher and then delete the original on the desktop since I don't need 2 shortcuts, but when I deleted it or put it into the .local/share/applications it wouldn't work - so I had to copy it there in order for it to work – Floplox Jul 29 '13 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.