• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

java -classpath

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
while compiling used jt400 jar for compliing fallowing code


for compiling javac -classpath jt400.jar IFSListFiles.java its compling with out error

for executing if i use java -classpath jt400.jar IFSListFiles
its giving error
Exception in thread "main" java.lang.NoClassDefFoundError: IFSListFiles

if i put jt400.jar in system class path its working fine my requirment is i need to pass the jt400.jar in the class path
can any one help me out
thanks in advance
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your classpath includes only that one jar, then only classes in that jar will be found -- so your application class won't be found. You need to use a path with multiple entries. On UNIX, use ":" to separate the entries; on Windows, use ";". You can use "." (dot) to mean the current directory. So, for example, something like

java -classpath jt400.jar:. IFSListFiles

By including the "." entry, I'm telling Java to look in the current directory for classes, as well as in that jar.
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply its working now
 
I have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic