You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Zulfi Khan <zu...@yahoo.com.INVALID> on 2021/06/29 01:16:57 UTC

No main classes found

 Hi,
I am working onNetbeans 12.4.
I have created theproject FibSeries2. When I am trying to run it by selecting theproject name from the left pane and right clicking the mouse and thenselecting “Run”, I am getting a small window which says “nomain classes Found”.

But when I clickBuild, it works but run is not working. When I click on run,  a small window comes, which tell, no main found.





Please guide me.

I have attached theimage.




Zulfi.


Re: No main classes found

Posted by Owen Thomas <ow...@gmail.com>.
It might help you to know Zulfi that a method's "signature" is more than
just its name. It also includes the number and types of each of its
parameters. You can create more than one method with the same name as long
as the parameters are different. This is why the compiler didn't complain
that you declared the main with a String (not a String[]).

On Tue, 29 Jun 2021 at 12:48, Scott Palmer <sw...@gmail.com> wrote:

> Yeah, the main method shown in your screen shot has the wrong signature..
> taking a String instead of a String []
>
> Scott
>
> On Jun 28, 2021, at 9:26 PM, Andreas Reichel <
> andreas@manticore-projects.com> wrote:
>
> Greetings.
>
> You will need to set the "Main Class" in the Project Properties as shown
> below.
> The "Main Class" will need to have a method "public static void
> main(String[] args)"
>
> Best regards
> Andreas
>
> <Image-PSVR50.png>
>
> On Tue, 2021-06-29 at 01:16 +0000, Zulfi Khan wrote:
>
> Hi,
> I am working on Netbeans 12.4.
>
> I have created the project FibSeries2. When I am trying to run it by
> selecting the project name from the left pane and right clicking the mouse
> and then selecting “Run”, I am getting a small window which says “no main
> classes Found”.
>
> But when I click Build, it works but run is not working. When I click on
> run,  a small window comes, which tell, no main found.
>
>
> Please guide me.
>
> I have attached the image.
>
>
> Zulfi.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: No main classes found

Posted by Andreas Reichel <an...@manticore-projects.com>.
On Tue, 2021-06-29 at 04:17 +0100, Som Lima wrote:
> Some legal main method signatures.
> public static void main(String a[])
> public static void main(String[] a)
> public static void main(String... a)

All the same signature byte-code wise, only different ways to write it.

Cheers
Andreas

Re: No main classes found

Posted by Som Lima <so...@gmail.com>.
I understand there are 26 ways to have a main method signatures
Some legal main method signatures.


public static void main(String a[])public static void main(String[]
a)public static void main(String... a)




https://www.backbutton.org
https://backbtn.ddns.net
¯\_(ツ)_/¯
♡۶♡۶ ♡۶

Jakarta EE Application Developer skill challenge

https://lit-taiga-52898.herokuapp.com/

On Tue, 29 Jun 2021, 03:48 Scott Palmer, <sw...@gmail.com> wrote:

> Yeah, the main method shown in your screen shot has the wrong signature..
> taking a String instead of a String []
>
> Scott
>
> On Jun 28, 2021, at 9:26 PM, Andreas Reichel <
> andreas@manticore-projects.com> wrote:
>
> Greetings.
>
> You will need to set the "Main Class" in the Project Properties as shown
> below.
> The "Main Class" will need to have a method "public static void
> main(String[] args)"
>
> Best regards
> Andreas
>
> <Image-PSVR50.png>
>
> On Tue, 2021-06-29 at 01:16 +0000, Zulfi Khan wrote:
>
> Hi,
> I am working on Netbeans 12.4.
>
> I have created the project FibSeries2. When I am trying to run it by
> selecting the project name from the left pane and right clicking the mouse
> and then selecting “Run”, I am getting a small window which says “no main
> classes Found”.
>
> But when I click Build, it works but run is not working. When I click on
> run,  a small window comes, which tell, no main found.
>
>
> Please guide me.
>
> I have attached the image.
>
>
> Zulfi.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: No main classes found

Posted by Scott Palmer <sw...@gmail.com>.
Yeah, the main method shown in your screen shot has the wrong signature.. taking a String instead of a String []

Scott

> On Jun 28, 2021, at 9:26 PM, Andreas Reichel <an...@manticore-projects.com> wrote:
> 
> Greetings.
> 
> You will need to set the "Main Class" in the Project Properties as shown below.
> The "Main Class" will need to have a method "public static void main(String[] args)"
> 
> Best regards
> Andreas
> 
> <Image-PSVR50.png>
> 
> On Tue, 2021-06-29 at 01:16 +0000, Zulfi Khan wrote:
>> Hi,
>> I am working on Netbeans 12.4.
>> I have created the project FibSeries2. When I am trying to run it by selecting the project name from the left pane and right clicking the mouse and then selecting “Run”, I am getting a small window which says “no main classes Found”.
>> But when I click Build, it works but run is not working. When I click on run,  a small window comes, which tell, no main found.
>> 
>> Please guide me.
>> I have attached the image.
>> 
>> Zulfi.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org <ma...@netbeans.apache.org>
>> For additional commands, e-mail: users-help@netbeans.apache.org <ma...@netbeans.apache.org>
>> 
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>


Re: No main classes found

Posted by Andreas Reichel <an...@manticore-projects.com>.
Greetings.

You will need to set the "Main Class" in the Project Properties as
shown below.
The "Main Class" will need to have a method "public static void
main(String[] args)"

Best regards
Andreas


On Tue, 2021-06-29 at 01:16 +0000, Zulfi Khan wrote:
> Hi,
> I am working on Netbeans 12.4.
> I have created the project FibSeries2. When I am trying to run it by
> selecting the project name from the left pane and right clicking the
> mouse and then selecting “Run”, I am getting a small window which
> says “no main classes Found”.
> But when I click Build, it works but run is not working. When I click
> on run,  a small window comes, which tell, no main found.
> 
> Please guide me.
> I have attached the image.
> 
> Zulfi.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: No main classes found

Posted by Som Lima <so...@gmail.com>.
sysout   +  TAB / CTRL  + space   will expand into

System.out.println("")

sysout you will likely use more times than psvm (public static void main)



https://www.backbutton.org
https://backbtn.ddns.net
¯\_(ツ)_/¯
♡۶♡۶ ♡۶

Jakarta EE Application Developer skill challenge

https://lit-taiga-52898.herokuapp.com/

On Wed, 30 Jun 2021, 00:51 Juan Algaba, <ja...@colef.mx> wrote:

> Tip: You can type "psvm" then the TAB key and netbeans code template
> feature will generate a main method for you.
>
> On Mon, Jun 28, 2021 at 8:59 PM Zulfi Khan <zu...@yahoo.com.invalid>
> wrote:
> >
> > Hi,
> > Thanks for pointing out the problem in the signature of main. I wrote
> the main class as:
> >
> > package com.mycompany.fibseries2;
> >
> > /**
> >  *
> >  * @author zulfi
> >  */
> > public class MyTest {
> >     public static void main(String[] args){
> >         System.out.println("Test");
> >     }
> > }
> >
> >
> > It worked.
> >
> > Zulfi.
> >
> > On Monday, June 28, 2021, 8:16:57 PM CDT, Zulfi Khan <
> zulfi6000@yahoo.com> wrote:
> >
> >
> > Hi,
> > I am working on Netbeans 12.4.
> >
> > I have created the project FibSeries2. When I am trying to run it by
> selecting the project name from the left pane and right clicking the mouse
> and then selecting “Run”, I am getting a small window which says “no main
> classes Found”.
> >
> > But when I click Build, it works but run is not working. When I click on
> run,  a small window comes, which tell, no main found.
> >
> >
> > Please guide me.
> >
> > I have attached the image.
> >
> >
> > Zulfi.
> >
> >
>
>
> --
>
> -Juan Algaba
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: No main classes found

Posted by Juan Algaba <ja...@colef.mx>.
Tip: You can type "psvm" then the TAB key and netbeans code template
feature will generate a main method for you.

On Mon, Jun 28, 2021 at 8:59 PM Zulfi Khan <zu...@yahoo.com.invalid> wrote:
>
> Hi,
> Thanks for pointing out the problem in the signature of main. I wrote the main class as:
>
> package com.mycompany.fibseries2;
>
> /**
>  *
>  * @author zulfi
>  */
> public class MyTest {
>     public static void main(String[] args){
>         System.out.println("Test");
>     }
> }
>
>
> It worked.
>
> Zulfi.
>
> On Monday, June 28, 2021, 8:16:57 PM CDT, Zulfi Khan <zu...@yahoo.com> wrote:
>
>
> Hi,
> I am working on Netbeans 12.4.
>
> I have created the project FibSeries2. When I am trying to run it by selecting the project name from the left pane and right clicking the mouse and then selecting “Run”, I am getting a small window which says “no main classes Found”.
>
> But when I click Build, it works but run is not working. When I click on run,  a small window comes, which tell, no main found.
>
>
> Please guide me.
>
> I have attached the image.
>
>
> Zulfi.
>
>


-- 

-Juan Algaba

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: No main classes found

Posted by Zulfi Khan <zu...@yahoo.com.INVALID>.
 Hi,Thanks for pointing out the problem in the signature of main. I wrote the main class as:
package com.mycompany.fibseries2;

/**
 *
 * @author zulfi
 */
public class MyTest {
    public static void main(String[] args){
        System.out.println("Test");
    }
}

It worked.
Zulfi.

    On Monday, June 28, 2021, 8:16:57 PM CDT, Zulfi Khan <zu...@yahoo.com> wrote:  
 
  Hi,
I am working onNetbeans 12.4.
I have created theproject FibSeries2. When I am trying to run it by selecting theproject name from the left pane and right clicking the mouse and thenselecting “Run”, I am getting a small window which says “nomain classes Found”.

But when I clickBuild, it works but run is not working. When I click on run,  a small window comes, which tell, no main found.





Please guide me.

I have attached theimage.




Zulfi.