« VMWare ESX 3 - No Root ssh remote access by DefaultB2Evolution 2.0 Upgrade - Part 2 - Modifying blog's skin »

The case of the "Could not find the main class" Java Error


Permalink 09:55:53 pm by guy, Categories: Windows, Oracle, Random Stuff

Today I got involved in a task to collect the configuration and state of our Dell/EMC SAN. As part of the Dell support contract we are eligible for full service SAN software updates for the first year. Dell sent us a utility called “Lasso” to automatically retrieve the configuration of the Fiber Switches, SAN Controllers, and Windows and VMWare hosts.

During installation it confirmed that I had the JRE 1.5 or better installed (as well as the latest EMC Navisphere CLI tool). Everything was apparently good and I got the tool installed. Unfortunately when I tried to run the tool (just a little batch file that calls JAVAW with the appropriate jar file parameters. This is what popped up:

I figured it was something simple like a path, but it is always frustrating when an app installs without error and then doesn’t work. I’m not a JAVA fan either, so that doesn’t help.

After I played a bit with trying to play with the command line to get a better error message and spent some time with my friend Google, I was no closer to solving the problem. In frustration I pulled out my trusty Sysinterals toolbelt and ran Process Monitor.

I didn’t do a screenshot of the output, so I can’t point at it for you. At first I missed the extremely obvious problem. I was expecting that it was some kind of path problem leading to not being able to find one of the Java JAR files from the tool. I was right, but not quite. It WAS a path problem, but it wasn’t looking for the Lasso files. I scanned the output and didn’t see any obvious “File not found” messages. Then, I noticed the obvious, all the references to the JavaW.exe were referencing the JRE in the ORACLE directory. If you noticed, this blog entry is tagged to the Oracle category. Oracle strikes again! If you look at me previous Oracle blog entry you will see that I get a little frustrated with Oracle software. I’ll reiterate, I’m sure Oracle is an awesome database, I’m just not a fan. Incredibly complex and the Java UI tools are clunky as anything I’ve ever run into.

Anyway, it turns out that the two different Oracle Homes that I have installed on my computer each have explicitly added their JRE directories into my path and they were both pre-JRE 1.5 which was my requirement. This effectively hijacked the 1.5 JRE that I had installed. Here are the various path entries that I removed.

C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;

Once I removed these path entries the Dell tool started to work. I might add, on a positive note, that the Dell application did NOT have the expected clunky Java interface, it was actually pretty decent.

May 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
I'm a generalist, at least if I'm honest. In my job I am primarily a developer, but also a sysadmin, and (as little as possible) technical support. I know a little about a lot of things, a lot about some things, and everything about nothing. Here I will post random learnings...


XML Feeds

User tools

free blog