Skip to main content



      Home
Home » Newcomers » Newcomers » Could not find the main class. Program will exit.
Could not find the main class. Program will exit. [message #262627] Wed, 06 August 2008 14:45 Go to next message
Eclipse UserFriend
Originally posted by: djmunshi.yahoo.com

Hello,

I've created a jar file from my project and when I double-click on it, it
gives this error.
The error goes away when I remove all the try-catch statements from the
code. I keep all my code, just remove the try statement and the catch
block.

I'm catching the Exception as in,

try
{
..some code...

}
catch (Exception e)
{


}

What is the reason ? Any help would be greatly appreciated.

Thanks so much,

Darius.
Re: Could not find the main class. Program will exit. [message #262630 is a reply to message #262627] Wed, 06 August 2008 16:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cmattmiller.gmail.com

Darius Munshi wrote:

> Hello,

> I've created a jar file from my project and when I double-click on it, it
> gives this error.
> The error goes away when I remove all the try-catch statements from the
> code. I keep all my code, just remove the try statement and the catch
> block.

> I'm catching the Exception as in,

> try
> {
> ..some code...

> }
> catch (Exception e)
> {


> }

> What is the reason ? Any help would be greatly appreciated.

> Thanks so much,

> Darius.


Where is your try/catch located? In Main?
Re: Could not find the main class. Program will exit. [message #262633 is a reply to message #262630] Wed, 06 August 2008 17:07 Go to previous message
Eclipse UserFriend
Originally posted by: djmunshi.yahoo.com

The try-catch blocks are in public methods in the class that contains
main, but none are in main
Previous Topic:Whatever happened to a project that just produces a jar file?
Next Topic:Broken DHTML in Help system after upgrading to Eclipse 3.3
Goto Forum:
  


Current Time: Sat Jul 19 20:21:31 EDT 2025

Powered by FUDForum. Page generated in 0.29026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top