views:

643

answers:

1

Hi,

I have a small GUI application developed with netbeans.

I used the 'clean and build' option to build an executable jar file. .jar file works in my pc. But when i sent the application to my friend he says that it throws 'cannot find the main class' error.

what could be the reason?

Thanks in advance...

+1  A: 

Open project property, select run and set Main-Class (textfield) attribute.

EDIT:

Execute the main class in .jar application,

java -jar Application.jar

adatapost
that was already set to the class name which has the main() method.. that is why it works in my pc.
tamizhan