• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

pass dos path to common.loader

 
Greenhorn
Posts: 2
Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i need to, for testing purposes, reference a class located in g:\testclasses\loggers.jar but i can't get the path right, i tried all sorts of forward- and backslashes.
Tomcat helps me by throwing up and refusing to start. please help me i'm a unix guy with limited patience with Windows



edit: (Tomcat 6)
 
Bartender
Posts: 20838
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Mats!

I recommend using "Unix" format for filesystem paths in Java, even with Windows. It eliminates the possibility that the backslashes will get misinterpreted as escape characters. So, like this:

/g:/testclasses/loggers.jar

However, you didn't actually say where/how you're using that path in code or configuration, so you may need to provide us more info before we can help you solve the problem completely.
 
Mats Berndtsson
Greenhorn
Posts: 2
Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:I recommend using "Unix" format for filesystem paths in Java, even with Windows. It eliminates the possibility that the backslashes will get misinterpreted as escape characters. So, like this:

/g:/testclasses/loggers.jar

However, you didn't actually say where/how you're using that path in code or configuration, so you may need to provide us more info before we can help you solve the problem completely.


OK thanks, it was really that simple! i was referring to the path definition in common.loader in catalina.properties
where i was trying to override one of the our default libs in ${catalina.base}/lib by putting this jar first.
This worked!

Tim Holloway wrote:Welcome to the JavaRanch, Mats!


thanks again, i have been a follower for a while, and this was the first question i couldn't find an answer for
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!