Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

fail to run java desktop application out side Netbeans

 
Sarafaraj Shaikh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sarafaraj Shaikh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic