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 http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
$ rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
$ 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

Then:
$ reboot


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

Download Oracle JDK latest version
Execute:

$ 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/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 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

$javaws
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 http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
$ 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/bluetooth.target.wants/bluetooth.service’

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 org.gnome.shell.clock show-seconds true
$ gsettings set org.gnome.shell.clock 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/nswrapper_32_64.libflashplayer.so /opt/google/chrome/plugins/nswrapper_32_64.libflashplayer.so


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.

No comments: