aspose file tools*
The moose likes Beginning Java and the fly likes fail to run java  desktop application out side Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "fail to run java  desktop application out side Netbeans" Watch "fail to run java  desktop application out side Netbeans" New topic
Author

fail to run java desktop application out side Netbeans

Sarafaraj Shaikh
Greenhorn

Joined: Nov 03, 2012
Posts: 5
hello friends
I am very new to java and trying to develop java desktop application for windows 7. I am research student of Solapur University, India, I am working on embedded system development and trying to develop desktop application Using GUI tool of net bean for it. It work properly in netbean IDE, but when i am trying to run it outside Actually i got error as " could not found or load main class c:\users\navaj\desktop\dist\uartcomm.jar".
please help me
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

It's actually could not find or load main class ... and it's not "net bean" but NetBeans.

As for your issue, right click the project -> Set configuration -> Customize... and in the dialog under the Run node choose main class used to start your application. Then rebuild (or clean and build) your project.

And please in the future BeForthrightWhenCrossPostingToOtherSites (link).

Welcome to the Ranch!


The quieter you are, the more you are able to hear.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41823
    
  62
This sounds odd, as a jar (as mentioned in the error message) is not a class file. Post the exact command you're using on the command line when trying to run the program.


Ping & DNS - my free Android networking tools app
Sarafaraj Shaikh
Greenhorn

Joined: Nov 03, 2012
Posts: 5
Dear friends

Thanks to replay
I check configuration setting, it is correct as per your guidance. but it till shows same message. also my main class contain main method as it generated default in netbean. that error window disappear immediately. i hardly take its screen shot read it . I also tried new project with default name javaapplication15 but having same problem.
thanks

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41823
    
  62
It sounds like you're double-clicking a jar file; is that correct? That way the command window will disappear right away, giving you no chance of seeing the error message. Instead, open a command window manually, and run the app via "java -jar myJarFile.jar" or whatever command is appropriate. That way you have a chance of seeing the error message.
Sarafaraj Shaikh
Greenhorn

Joined: Nov 03, 2012
Posts: 5
Dear friend thanks

my problem solved by adding rxtx.jar file to my project library and .dll add to lib folder of jre7.

thanks again
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: fail to run java desktop application out side Netbeans