aspose file tools*
The moose likes Tomcat and the fly likes pass dos path to common.loader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "pass dos path to common.loader" Watch "pass dos path to common.loader" New topic
Author

pass dos path to common.loader

Mats Berndtsson
Greenhorn

Joined: May 23, 2011
Posts: 2

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)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mats Berndtsson
Greenhorn

Joined: May 23, 2011
Posts: 2

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass dos path to common.loader