• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Use jar file to run console based program

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I run a console based program which contains two files , of which one contains the main. I want to run that program using jar file.
Problem encountered:
I am using javax.comm package in the program.
When i run jar file using : java -jar <filename>.jar
It gives the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/CommPortIdentifier

at ConnectModem.ModemProcess(ConnectModem.java:22)
at ConnectModem.main(ConnectModem.java:18)

My Manifest file is:

Manifest-Version: 1.0
Class-Path: comm
Main-Class: ConnectModem

How can i run the jar file???

Thanks
 
Marshal
Posts: 79240
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to add that other jar to your classpath. Somebody else asked the same thing this morning, I think it was here. Read that thread, which will probably answer your questions.
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
I did solved my problem.
 
Nothing? Or something? Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic