Tag Archives: Java

Uncategorized

Match your Java installation to your browser…

I run 64-bit Windows 7 at work so, when installing the Sun Java Runtime Environment (JRE) in order to access some of my corporate applications, naturally I installed a 64-bit version of the JRE.

Application 1 ran OK, but application 2 (which is a usability nightmare at the best of times) refused to load.  Then, Dave Saxon was trying to access the same application (also from 64-bit Windows 7) and he realised what I had totally missed: I may be running 64-bit Windows but the default instance of Internet Explorer is 32-bit.  Sure enough, I ran a 64-bit version of Internet Explorer, accessed the application and it worked.

I haven’t tested if a 32-bit JRE installation would work with a 32-bit instance of Internet Explorer on 64-bit Windows but the key lesson here is to run up the appropriate browser architecture for the installed JRE version.

Uncategorized

Stop installing unnecessary software on my PCs

What is it about software companies that they think they can install a load of rubbish on my PCs? This morning, Java was bugging me that it wanted to install an update. That’s fair enough but, as it installed, it asked me if I wanted to install OpenOffice too (I don’t) – I wouldn’t mind this so much if it wasn’t that the default state for the check box was selected.

Apple Software Update pestering for installation of Safari on WindowsNo sooner had Java finished updating itself then the Apple Updater popped up and said “hey, we’d like you to update QuickTime. We can’t be bothered to give you just a patch, so please download 29MB of our bloatware” (I said no because I was using a mobile connection), “and while you’re at it why not install our web browser that seems to have more than its fair share of security issues… that will be another 23MB” (of course, I am paraphrasing here – but you can see the dialog box… complete with checkbox selected by default. Can you imagine the uproar there would be if the Microsoft Office for Mac Updater tried to install another Microsoft product on people’s computers?

It’s not just the update programs either. I seem to recall that one time when I installed Adobe Reader it wanted to put some toolbar in my browser (no thanks). And, whilst they criticise (Windows) PC makers for shipping demo software on new PCs (in the “Stuffed” Get a Mac ad), Apple ships demo software on new Macs (albeit its a demonstration version of Microsoft Office).

Please! Stop installing this crapware. I want a tidy, secure system and the way to do that is to minimise unnecessary installs. Of course, as the software companies all know, 90% of PC users will click any old dialog box and that’s why their PCs run so slowly and fall over so often.

Uncategorized

Checking which version of Java is installed

I just came across a handy way of checking the version of Java that’s installed on a computer. Try typing:

java -version

This seems to work for me on Windows, MacOS and Linux, regardless of the Java vendor (i.e. my RHEL5 box has a GNU version of Java rather than Sun Java, although I’m not sure what happens for the Microsoft Java VM). Of course, if the command is not found, that probably means that you don’t have Java installed (or at least not on your path).

Uncategorized

Installing the Sun Java runtime environment on Fedora Core 5

Fedora logo Java logo
It’s no secret that I’m no fan of Java applications, but its also a necessary evil that I generally need to have installed on my PC. I had a few problems getting it working on my Linux (Fedora Core 5) PC though – this is what I had to do.

The Unofficial Fedora FAQ got me started; however as I didn’t want the whole Java development kit (JDK) installed – just the Java runtime environment (JRE) I downloaded the RPM installer from the Sun Java download site.

Next, I entered the following commands:

su -
chmod +x jre-1_5_0_08-linux-i586-rpm.bin
./jre-1_5_0_08-linux-i586-rpm.bin
yum –enablerepo=jpackage-generic-nonfree install java-1.5.0-sun-compat
ln -s /usr/java/jre1.5.0_08/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

I’m not sure why the link is from the mozilla plugins folder, not from /usr/lib/firefox-1.5.0.6/plugins/ (as I would have expected from a LinuxQuestions.org forum post on the subject) but after a browser restart, I was able to successfully test the Java installation, which was correctly identified as Sun Microsystems Inc. Java version 1.5.0_08 on Linux OS version 2.6.17-1.2174_FC5.

Uncategorized

This is why I’m not a fan of Java

I just wasted 2 days (one of which was on my weekend), and a lot of sleep, trying to work out why I couldn’t upgrade the Windows 2000 server which looks after my domain, DHCP, RIS, SUS and a whole load of other bits at home.

Every time I tried to run Windows Server 2003 setup it seemed to hang – and everything else was pretty slow too. I had to launch control panel applets using their .cpl filenames (e.g. appwiz.cpl for the Add or Remove Programs applet) and services would not stop cleanly.

I decided that my system was badly broken and quickly built a virtual machine on another piece of hardware, promoting that to a domain controller to provide a live backup of Active Directory. As in-place upgrades weren’t working, I resigned myself to the fact that I was going to have to migrate everything to the virtual server, then rebuild the original box but I wanted to cleanly remove the original domain controller from the directory.

Every time I ran the Active Directory installation wizard (dcpromo.exe) it failed – usually with the following error.

Active Directory Installation Failed

The operation failed because:

Failed to prepare for or remove the sysvol replication “The file replication service cannot be stopped.”

(Even though logged events with IDs 13502 and 13503 suggested that the FRS had indeed stopped).

Microsoft knowledge base article 332199 led me to try the dcpromo /forceremoval command but that failed in exactly the same way. I ran dcdiag /s:localhost on each server to look for any issues, checked that each server could ping the other one, that net view \\<em>servername</em> returned a list of shares, and all required DNS entries were present. I checked the DNS settings (to make sure that each server was using itself as the primary DNS server and the other domain controller as a secondary) and restarted just to be sure but all to no avail.

To cut a long story short, I found the answer purely by fluke. I couldn’t get the DHCP server service to stop cleanly (to let me migrate the database to my virtual machine) so I did a Google search for “windows services hang on stop”. This turned up a TechRepublic thread titled APC Java issues cause services to hang. I realised that I do have an APC UPS attached to the server, and that I was using a version of PowerChute Business Edition (PBE) that had been sitting there happily for a couple of years (v6.2.2) – I hadn’t upgraded to 7.x as recommended by APC knowledge base article 7202 because APC had never e-mailed me to notify me of a problem and services that aren’t broken (and that don’t have an inbuilt patching mechanism) generally get left well alone on my systems!

Lo and behold, the APC services had hung on startup and there were various events logged with ID 7022 (the APC PBE Agent service hung on starting). I disabled both the APC PBE client and server services, using the registry (as the services console was inoperable) to locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\servicename\ and set Start to 0x00000004 for disabled (0×00000002 is automatic and 0×00000003 is manual), restarted the server and had the fastest boot sequence in days! My Windows installation was responsive again and I was able to remove the offending applications in a few short clicks.

My problems were nothing to do with Active Directory, DNS or even Windows – they all boiled down to an expired Sun Java Runtime Environment (JRE) certificate and sloppy coding from APC which meant that if their services hung, then so did all subsequent ones. I’ve never been a fan of Java applications on Windows – generally they are slow and have a poor user interface – and this experience has done nothing to change my mind.

Once the APC PBE agent, client and server had been removed, I was able to successfully (and cleanly) demote the original domain controller (avoiding having to follow the steps in Microsoft knowledge base article 216498 to remove data left in the directory after an unsuccessful demotion) but having migrated all the services to my virtual machine, I decided to go ahead and perform a clean installation of Windows on the original hardware anyway. I’m currently mid-way through patching the rebuilt server but I’m so glad that P McGrath from Rocky Mount, VA posted his experience on TechRepublic and Google did it’s thing.

Remind me again – how did we ever manage to find things out before we had the web?

%d bloggers like this: