When using my fix to get Jinitiator to work with Windows 7, you might of noticed that your screen is reduce to the Windows 7 basic theme.
I thought I’d write a separate post about how to fix this, as it’s something I often get asked how to do.
Click Start > Control Panel > JInitiator
In the ‘Java Runtime Pparameters’ box, add this:
-Dsun.java2d.noddraw=true‘Apply’ & click ‘Close’.
Now restart your machine.
Now on launching your website application, Windows will no longer be forced into using the basic theme.
I love NetBeans. Sean loves MyEclipse. We both use whichever is most appropriate for the current task. Both have their sweet spots but I think NetBeans is a lot less fiddly to maintain and use…usually.
My most recent attempt to install NetBeans 6.9.1 failed. I couldn’t get it to work on Windows 7 Enterprise 64-bit. Everything about the installation process seemed to work. No errors were thrown and the correct shortcuts were created but whenever I tried to launch 6.9.1 it launched 6.9 instead (I had installed 6.9 previously).
After some digging around and comparing my setup to Sean’s I suspected NetBeans 6.9.1 couldn’t find the version of Java it needed so 6.9 was launched instead. I had loads of Java and NetBeans installations present but not Java 1.6.0_21. I read somewhere about the JavaFX updates needing 1.6.0_21 so I installed it but NetBeans continued to run using the older Java 1.6.0_18 that had been specified during installation.
Isolating the root cause would have been nice, but we’re working in a business here so the best solution tends to be the fastest solution. I removed all the NetBeans installations apart from 6.8 (so I could inherit settings from it). During uninstallation of NetBeans I also opted to remove the settings directory. NetBeans didn’t go quietly. Uninstall program list items remained after uninstallation and the uninstall process failed for second uninstall which prevented any further uninstall attempts until I rebooted. The joys of Windows 7. I then removed all Java installations. I decided to install the 32-bit version of the JDK 1.6.0_21 because the 64-bit version has auto-update disabled and we want auto-update. I then installed NetBeans 6.9.1. Upon launching NetBeans, all was well.
- need to do a bit of tidying up every now and again
- Windows 7 is still annoying
- 64-bit apps are often more trouble than they are worth.
Watch out for 64-bit Java/NetBeans issues:
If someone gave you a Sandisk Cruzer 8GB micro USB stick*, which had their entire life of work stored on it. This stick couldn’t be directory listed under Windows 7 only Windows XP.. nothing could be copied off nor copied on to it.
What would you do ?
Well here’s what I did to recover the files.
first of all I tried all the normal windows based solutions:
Recovery software GetDataBack – (Which has served me well in the past)
No joy! Nothing! Nada! – USB just disconnects when you try anything.
So I turn to Unix for the answer, the USB stick could be mounted and read, it just crashed out when trying to copy the files/directories from the device, saving about 10% of the data.. I’m assuming its a hardware failure of the device.
This is when I turn to open source forensic software – Ubuntu Rescue Remix
Here’s how I used it :
I created a bootable image of the Ubuntu Rescue Disk ‘to a different USB stick’, following the instructions at Pendrivelinux.com
Booted that, then used the following commands :
Create ‘hdd1′ directory in the ‘mnt’ folder
sudo mkdir /mnt/hdd1
Mount your machines hard drive to the folder ‘/mnt/hhd1′
sudo mount /dev/sda1 /mnt/hdd1
Check the ‘mount’ command to see what the USB device your trying to recover is called, in my case its mounted as ‘/dev/sdc1′
Use that information to constuct the following command; ddrescue-retry to read upto 3 times-USB device-name of image to write-name of log to write
sudo ddrescue -r 3 /dev/sdc1 /mnt/hdd1/recovery-image /mnt/hdd1/recovery-log
Create a new directory on your hard drive to store all the recovered files.
sudo mkdir /mnt/hdd1/recovery
Run ‘foremost’ which is some forensic software created by the US Air force; foremost-image name-output directory
sudo foremost -i /mnt/hdd1/recovery-image -o /mnt/hdd1/recovery
This will extract files ‘Without filenames’ to the output directory, slight issue, but lucky to get anything back at all.
* Other USB sticks are available..
We need ‘Jinitiator 184.108.40.206′ to use a core application. The applications in-house team havent managed to get it working with JRE, which is the replacement to Jinit. They insist that you must use Jinitiator 220.127.116.11 & windows XP! Joy! We also know that Jinit is no longer supported by Oracle & refuses to work with Windows 7.
So how do you get around this ?
Install Jinitiator as normal, if your having problems actually getting it to install, just use the Win7 ‘compatibility mode’ to get it to stay on your machine instead of it annoyingly uninstalling itself at the end of a failed install process.
Replace the ‘jvm.dll’ in jinitiator directory (C:\Program Files (x86)\Oracle\JInitiator 18.104.22.168\bin\hotspot\) with this file jvm.dll.
Restart IE* and try again, Windows 7 should reduce your colour scheme and your app should now work.
See post repaint blog post on how to fix the repaint screen issues, if they are happening to you.
*Note, I would never normally recommend Internet Explorer, it’s just that this process doesn’t work for me using Chrome or Firefox, my preferred browsers.
Has your .jar associations ever been hijacked ?
Mine too, after spending far too long following suggestions of people on forums of how to get it back, using your command prompt ‘assoc’ & ‘ftype’ commands and manually editing your regedit etc…
Forget it, grab yourself this handy util ‘jarfix‘
Jarfix has existed since 2002, so can be trusted to correct the .jar association & put back the following -jar flag, so when you launch a .jar file it runs correctly. On typing ‘ftype jarfile’ in your Command Prompt you should see the following.
jarfile=”C:\Program Files (x86)\Java\jre6\bin\javaw.exe” -jar “%1″ %*