Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

fail to run java desktop application out side Netbeans

 
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
 
Bartender
Posts: 825
5
Python Ruby Java
  • 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!
 
Rancher
Posts: 43016
76
  • 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
Posts: 43016
76
  • 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
    Bookmark Topic Watch Topic
  • New Topic