BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Could not find main class. Program will exit!

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment
View previous topic :: View next topic  
Author Message
Magnus
Guest





PostPosted: Fri Mar 10, 2006 6:03 pm    Post subject: Could not find main class. Program will exit! Reply with 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
Arthur Ore
Guest





PostPosted: Sat Mar 11, 2006 1:03 pm    Post subject: Re: Could not find main class. Program will exit! Reply with 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...
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





PostPosted: Sat Mar 11, 2006 9:03 pm    Post subject: Re: Could not find main class. Program will exit! Reply with 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:
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





PostPosted: Mon Mar 27, 2006 5:04 pm    Post subject: Re: Could not find main class. Program will exit! (some feed Reply with quote

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





PostPosted: Wed Apr 19, 2006 2:03 pm    Post subject: Re: Could not find main class. Program will exit!-Solved? Reply with 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

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





PostPosted: Thu Apr 20, 2006 2:04 am    Post subject: Re: Could not find main class. Program will exit!-Solved? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Deployment All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.