Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Class Path Issues

 
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run this file as a BAT . but its not finding the classes that i set in the class path. Pls what can be the problem


This is the BAt file
************************************************************************
SET CLASSPATH=c:\classs\WsClient4Axis.jar;c:\classs\jaxrpc.jar;c:\classs\webservices.jar

java -jar Abiodun.jar

******************************************************************


and here is the error

C:\>java -jar Abiodun.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service


I can conveniently run this in eclipse with the Jar files above
 
author and iconoclast
Posts: 24204
44
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 you use the -jar switch, the CLASSPATH (as well as the -cp and -classpath switches) are all ignored. That's the way it's supposed to work -- an application jar shouldn't have any external dependencies.

Instead, add that jar to the classpath and start the app by explicitly naming the main class, without the -jar switch.
 
What's that smell? I think this tiny ad may have stepped in something.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic