 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Magnus Guest
|
Posted: Fri Mar 10, 2006 6:03 pm Post subject: Could not find main class. Program will exit! |
|
|
I have an app that is started via an icon that starts a bat-file with
all needed classpath files added.
This installation has been working for over 100 installations.
Now, I have a client that get the "Could not find main class. Program
will exit!" message.
What could cause this?
Using WinXP.
He first tried with JRE 1.5.6 and the 1.4.3 and have been un-installing
and installing the app in various step and order to make it work but
always the same problem.
He has another PC where it works so I asked him to send me the 2
different classpaths since I don't know where else to look.
TIA |
|
| Back to top |
|
 |
Arthur Ore Guest
|
Posted: Sat Mar 11, 2006 1:03 pm Post subject: Re: Could not find main class. Program will exit! |
|
|
Hi Magnus,
I don't know if this helps, but I'm sure I had a similar situation a couple
of years ago, when I ftp'd a jar file from one machine to another. I forgot
to put ftp into binary mode, which must have caused a corruption. Don't know
whether that could have happened here?
Arth
"Magnus" <magnus_bjorkman (AT) yahoo (DOT) com> wrote in message
news:4411b8b6$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I have an app that is started via an icon that starts a bat-file with all
needed classpath files added.
This installation has been working for over 100 installations.
Now, I have a client that get the "Could not find main class. Program will
exit!" message.
What could cause this?
Using WinXP.
He first tried with JRE 1.5.6 and the 1.4.3 and have been un-installing
and installing the app in various step and order to make it work but
always the same problem.
He has another PC where it works so I asked him to send me the 2 different
classpaths since I don't know where else to look.
TIA |
|
|
| Back to top |
|
 |
Magnus Guest
|
Posted: Sat Mar 11, 2006 9:03 pm Post subject: Re: Could not find main class. Program will exit! |
|
|
Arth,
Thanks for your input but that can not be the case here since the
installation is from an innosetup script that installs everything.
The installation could not have been "corrupt" either since they could
install and run on another machine.
Still a puzzle to me.
Arthur Ore wrote:
| Quote: | Hi Magnus,
I don't know if this helps, but I'm sure I had a similar situation a couple
of years ago, when I ftp'd a jar file from one machine to another. I forgot
to put ftp into binary mode, which must have caused a corruption. Don't know
whether that could have happened here?
Arth
"Magnus" <magnus_bjorkman (AT) yahoo (DOT) com> wrote in message
news:4411b8b6$1 (AT) newsgroups (DOT) borland.com...
I have an app that is started via an icon that starts a bat-file with all
needed classpath files added.
This installation has been working for over 100 installations.
Now, I have a client that get the "Could not find main class. Program will
exit!" message.
What could cause this?
Using WinXP.
He first tried with JRE 1.5.6 and the 1.4.3 and have been un-installing
and installing the app in various step and order to make it work but
always the same problem.
He has another PC where it works so I asked him to send me the 2 different
classpaths since I don't know where else to look.
TIA
|
|
|
| Back to top |
|
 |
Magnus Guest
|
Posted: Mon Mar 27, 2006 5:04 pm Post subject: Re: Could not find main class. Program will exit! (some feed |
|
|
I was told that they have another SW installed that change the
classpath. However, they didn't tell me what SW or what the change was.
Does anyone know of a way to get the "latest" JRE from the registry and
use that in a bat file where I define the classpath needed to run my SW?
Magnus
Magnus wrote:
| Quote: | Arth,
Thanks for your input but that can not be the case here since the
installation is from an innosetup script that installs everything.
The installation could not have been "corrupt" either since they could
install and run on another machine.
Still a puzzle to me.
Arthur Ore wrote:
Hi Magnus,
I don't know if this helps, but I'm sure I had a similar situation a
couple of years ago, when I ftp'd a jar file from one machine to
another. I forgot to put ftp into binary mode, which must have caused
a corruption. Don't know whether that could have happened here?
Arth
"Magnus" <magnus_bjorkman (AT) yahoo (DOT) com> wrote in message
news:4411b8b6$1 (AT) newsgroups (DOT) borland.com...
I have an app that is started via an icon that starts a bat-file with
all needed classpath files added.
This installation has been working for over 100 installations.
Now, I have a client that get the "Could not find main class. Program
will exit!" message.
What could cause this?
Using WinXP.
He first tried with JRE 1.5.6 and the 1.4.3 and have been
un-installing and installing the app in various step and order to
make it work but always the same problem.
He has another PC where it works so I asked him to send me the 2
different classpaths since I don't know where else to look.
TIA
|
|
|
| Back to top |
|
 |
Magnus Guest
|
Posted: Wed Apr 19, 2006 2:03 pm Post subject: Re: Could not find main class. Program will exit!-Solved? |
|
|
We finally managed to find the problem. Oracle had put a couple of
javaw.exe on the PC that were found first when launched.
Fix: The bat file was changed from
"javaw -classpath ".\classes\jdat ..."
to
"C:\WINDOWS\SYSTEM32\javaw -classpath ".\classes\jdat...".
Now the APP starts without any problem.
Q: Would it be safer to always refer to the full C:\WINDOWS\SYSTEM32
path in the bat-file or can I end up with other problems if I do this?
I don't want to change anything on the PC like PATH, CLASSPATH, etc.
TIA
| Quote: | I have an app that is started via an icon that starts a bat-file
with all needed classpath files added.
This installation has been working for over 100 installations.
Now, I have a client that get the "Could not find main class.
Program will exit!" message.
What could cause this?
|
|
|
| Back to top |
|
 |
Lori M Olson [TeamB] Guest
|
Posted: Thu Apr 20, 2006 2:04 am Post subject: Re: Could not find main class. Program will exit!-Solved? |
|
|
Magnus wrote:
| Quote: | We finally managed to find the problem. Oracle had put a couple of
javaw.exe on the PC that were found first when launched.
Fix: The bat file was changed from
"javaw -classpath ".\classes\jdat ..."
to
"C:\WINDOWS\SYSTEM32\javaw -classpath ".\classes\jdat...".
Now the APP starts without any problem.
Q: Would it be safer to always refer to the full C:\WINDOWS\SYSTEM32
path in the bat-file or can I end up with other problems if I do this?
I don't want to change anything on the PC like PATH, CLASSPATH, etc.
TIA
|
I hate Oracle. I really, really do. The installer jams crap onto the
front of the PATH that always breaks every Java(tm) app on the system.
I'm afraid nothing is "safe" about using the
C:\WINDOWS\SYSTEM32\javaw.exe file. On Windows, the "last Java
installed" always wins. So if you use the "java.exe" or "javaw.exe"
from the SYSTEM32 directory, the Java version can change out from under
you. If you have a specific version of Java that you want to use, you
might want to reference the real javaw.exe (those ones in SYSTEM32 are
stubs that look in the registry for the real location), from a specific
JRE, like "C:\Program Files\Java\jre1.5.0_04\bin\javaw.exe"
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|