ATO AUSKey Under Fedora 21

Written by James McDonald

December 11, 2014

The first question I had was which version of the Oracle Java Development Kit should I install?

If you have firefox-34.0-1.fc21.x86_64 installed (note the x86_64) you need to install the x64 version of the Oracle JDK

Do not do this: yum localinstall jdk-8u25-linux-i586.rpm

The 32bit version of the jdk is the wrong one for the 64bit Firefox.

Do this:

yum localinstall jdk-8u25-linux-x64.rpm

Use alternatives and the update-alternatives commands  to install the symlinks so you switch between java versions if you need to:

alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000

# JDK java compiler and java archive packer/unpacker
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 200000

# links Oracle java to Firefox
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/jre/lib/amd64/libnpjp2.so 200000

# if you make a mistake on the above remove the mistake with the --remove switch
# to remove java it's 
# alternative --remove <name> <path>
alternatives --remove java /usr/java/latest/jre/bin/java

Once you have the alternatives added set them as the default using update-alternatives

# must do these as the openjdk is probably installed and you'll want the oracle java as the default
update-alternatives --config java
update-alternatives --config javaws

# these might be the only options, but doesn't hurt to check
update-alternatives --config javac
update-alternatives --config jar

# configure Firefox to see the Java Plugin
# a symlink is created at /usr/lib64/mozilla/plugins/libjavaplugin.so 
# to another link at
# /etc/alternatives/libjavaplugin.so.x86_64 which links to
# /usr/java/latest/jre/lib/amd64/libnpjp2.so
update-alternatives --config libjavaplugin.so.x86_64

Once that is done make sure you copy your AUSkey to ~/AUSkey e.g. /home/rupert/AUSkey

Check that java is working by typing about:plugins into the firefox address bar. You should see something similar to  “Java(TM) Plug-in 11.25.2”

Verify it’s working by going to http://java.com/verify

Then head over to http://bp.ato.gov.au/ and login

More information for AUSkey under Linux is available at the Google Group https://groups.google.com/forum/?anchor=!forum/auskey#!forum/auskey

Java install information is here http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/

Apparently you can use the native openjdk along with the the icedtea-web plugin. I think if I had installed this first it would just work but because I had already installed the Oracle plugin I had to do the following

# Install icedtea-web
yum install icedtea-web.x86_64

# add the /usr/lib64/IcedTeaPlugin.so as an option
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/lib64/IcedTeaPlugin.so 200000

# make it the default (so firefox loads it instead of the Oracle plugin)
update-alternatives --config libjavaplugin.so.x86_64

After I installed icedtea-web it created /usr/bin/javaws.itweb and I was missing /usr/bin/javaws but was getting an error when trying to re-create /usr/bin/javaws pointing to the oracle jre
alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000
failed to read link /usr/bin/javaws: No such file or directory

This tip from here fixed the above: http://johnglotzer.blogspot.com.au/2012/09/alternatives-install-gets-stuck-failed.html

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...