cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
semmelbroesel
Level 3

Error "Could not find the main class"

Hi,
we have used IA 2008 Standard for a while, and 99% of the time everything works.
But on the computer of one of our clients it fails to install our product.
An error message box opens with the title:

Java Virtual Machine Launcher

And the text:

Could not find the main class. Program will exit.

The user originally had Sun Java 1.6.0_06 installed. When he received this error, he uninstalled Java and installed the current version 1.6.0_13 instead only to receive the same result.
I do not know at this time if he rebooted after uninstalling the old Java version.
He is running Windows XP Service Pack 3. His language is set to Russian.

I have seen a situation where our product itself (also Java based) did not work on a computer in Israel because Java was installed without the additional languages, but the error message was clearly a different one, so I do not know if this is the same situation here or not.

I have spent some time searching for this error message, and everything I have found so far seems to point towards badly compiled Java code, yet this very same installer file works on thousands of other computers, and we already verified the integrity of the installer this person uses (using MD5).

At this time, not being a Java expert myself, I somehow suspect some bad Java variable like JAVA_HOME, something preventing Java from installing properly or maybe something broken about his Temp folder etc.
But on the other hand, IA includes its own Java files, and our installer usually works on computers that have never had Java installed on them (unless it uses the Microsoft VM in those cases).

Any help would be highly appreciated!

Thanks!
Labels (1)
0 Kudos
(7) Replies
pv7721
Level 20

Well, in order to prevent such errors, the simplest thing would be to bundle the JVM version your application supports.
0 Kudos
semmelbroesel
Level 3

IA includes its own Java files, and our installer usually works on computers that have never had Java installed on them


We include the Java files needed for IA and also the ones needed for our application in our installer.

This very same installer file has worked on thousands of computers except for this one that we know of.
0 Kudos
pv7721
Level 20

So when you say that your setup includes all Java files, you actually mean the VM pack? In that case the setup has to use the bundled JVM regardless if the user has or has not a JVM installed on the target machine.
0 Kudos
semmelbroesel
Level 3

Yes, we include the VM pack in our installer.

Is there any external variable or file or something else that could influence anything Java related with this installer?
0 Kudos
pv7721
Level 20

There might be a thing that has an influence, and this is in your IA project: if you open it with the Advanced Designer and go to Project/Config what's in your Valid VM list? Normally it should be set to the bundled VM version, otherwise, through who knows what bug in the IA's algorithm for determining the Java version to use, other JVM than the one bundled might be used.

On the other hand, there might be another thing that I could think of, now that I've reread your initial post: this error happened on a Russian OS and a similar error happened on a Hebrew OS. I think that IA-based setup used to be sensible about the user installing it and this because funny characters in the user name influenced the path towards the launched setup (C:\Documents And Settings\Username\Local Settings\Temp)
0 Kudos
semmelbroesel
Level 3

Thanks, that might be it!

We checked the IA installer build information, and everything looks OK there, but you may be on to something with the Russian OS.

The Hebrew OS was a different error that basically required the user to install Java with additional language support (Java was asked by the OS to use a character set that was not by default installed), but now that I think about it I think that was before we used IA, so we can probably rule that case out.

But I think it could be very likely that a weird character in the user name could cause this, so I'll check back with this customer on that.

Thanks!
0 Kudos
semmelbroesel
Level 3

Hm, that doesn't seem to be it, either.

The client says his user name is a regular one-word name without special characters...

As far as we know, there is one more Java-based installer not working properly on his system (it quits with an error about "error loading the package", but doesn't say what package, so I don't have much to go on).

Any other situations that could cause an error like this or just general Java that could cause this?

FYI, the VM setting you mentioned is set to "1.4+", so if I understand you correctly, even though a VM pack is included, it may also try to access the installed Java VM - but then why does this not happen for the other thousands of users with Java versions ranging from none to 1.5 to 1.6.0_13?

This whole thing is just weird and doesn't make sense...
0 Kudos