Foto del Día National Geographic

17 July, 2011

Setting up Fedora Core 15 with Gnome 3 for Java Development

After installing fc15:

Update the system

$ yum -y update
$ yum install kernel-devel
$ reboot

I've an nvidia driver, that just works with the default driver (nouveau) but it doesnt use the full potential of the nvidia card, so I needed to install the official Nvidia drivers via rpmfusion:

$ rpm -Uvh
$ rpm -Uvh
$ yum install akmod-nvidia xorg-x11-drv-nvidia-libs
$ vi /boot/grub/grub.conf

and check if it's added

rdblacklist=nouveau nouveau.modeset=0

in the kernel line

$ reboot

After that, you might need to install Oracle Java in the desktop

Download Oracle JDK latest version

$ chmod +x /path/to/file/jdk-6u25-linux-*-rpm.bin
$ /path/to/file/jdk-6u25-linux-*-rpm.bin
$ alternatives --install /usr/bin/java java /usr/java/latest/bin/java 20000
$ alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 20000
$ alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
$ alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 20000
$ alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 20000

Some commands to test everything is ok:

$ java -version

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

$ javac -version
javac 1.6.0_22

Java(TM) Web Start 1.6.0_22

Until now you have a whole OS with desktop and Java tools, but you cannot program without a little bit of multimedia:

Flash plugin (64bits, if you have 32 bits machine, the commands are slightly different):

$ rpm -ivh
$ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
$ yum install flash-plugin nspluginwrapper.x86_64 nspluginwrapper.i686 alsa-plugins-pulseaudio.i686 libcurl.i686

Bluetooth service works out-of-the-box in FC15 in my dell computer, but it's necessary to enable the service, otherwise you see the bluetooth icon in an undefined status.

$ systemctl status bluetooth.service

bluetooth.service – Bluetooth Manager
Loaded: loaded (/lib/systemd/system/bluetooth.service)
Active: inactive (dead)
CGroup: name=systemd:/system/bluetooth.service

$ systemctl enable bluetooth.service

ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/dbus-org.bluez.service’
ln -s ‘/lib/systemd/system/bluetooth.service’ ‘/etc/systemd/system/’

systemctl start bluetooth.service

Now to wath videos and MP3 you need xine and codecs:
$ yum install gstreamer-plugins gstreamer-plugins-* xine xine-*

The default theme in FC15 is minimalistic and dark, it only needs a few changes:
$ gsettings set show-seconds true
$ gsettings set show-date true
$ vi /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml
$ vi /usr/share/gnome-shell/theme/gnome-shell.css

... and if the font it's bigger than you can bear, just check out Universal Access Settings and make the font size smaller.

# If you are a chrome fan, flash might not work in the 64 bits environment, it needs an small fix:

sudo mkdir -p /opt/google/chrome/plugins
sudo ln -s /usr/lib64/mozilla/plugins-wrapped/ /opt/google/chrome/plugins/

And voilá, you have a fully functional linux environment so that you can create the most amazing Java programs in the world :P.

Mr H.