First, if you have ArcGIS 10, then your code should not work. At the release of ArcGIS 10, the ARCGISHOME environment variable is no longer used because the SDK can be installed in an entirely different location from the Engine or Desktop runtime.
The environment variables that replaced ARCGISHOME are the following:
1. If you have ArcGIS Desktop installed and are trying to use the Engine runtime that is packaged with desktop, then use the AGSDESKTOPJAVA. This environment variable will point to the runtime location of where ArcGIS Desktop is installed on the machine. If you do a default installation, then the path would be something like the following on XP: C:\program files\ArcGIS\Desktop10.0\java\lib (the desktop version of arcobjects.jar should be in this location).
2. If you have ArcGIS Engine Runtime installed and are trying to use this as your runtime, then use the AGSENGINEJAVA environment variable. This environment variable will point to the runtime location of where ArcGIS Engine is installed on the machine (yes, this location can now be different than your desktop software and yes you can have desktop and engine installed on a machine). If you do a default installation, then the path would be something like the following on XP: C:\program files\ArcGIS\Engine10.0\java\lib (the engine runtime version of arcobjects.jar should be in this location).
On thing to pay attention to is that sometimes Windows does not remove environment variables, so you might still have ARCGISHOME as an environment variable on your machine, even though you uninstalled the previous version of ArcGIS from your computer. If this is the case, remove this old environment variable and double-check that the new environment variables above are present and pointing to the correct locations (they should be, unless you manually moved your ArcGIS installation location).
I think this will help your application discover the correct runtime, then allow it to initialize correctly.
Hope this helps!
-=Steve