• 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

Filesystem path contains .'s -how to package

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a filesystem path contains a directory structure with dots ( /this/2.0.8/bin ), how do I handle that in a package name ( this.2.0.8.bin )?
Thank you.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a filesystem path contains a directory structure with dots ( /this/2.0.8/bin ), how do I handle that in a package name ( this.2.0.8.bin )?
That's an interesting dillema. I think the short answer is don't use dots in your directory names. The package name you suggest would point to this/2/0/8/bin, if a subpackage name could start with a digit, which it can't. Regardless, package names should be designed to be meaninful and intuitive, the example you gave is far from either.
 
Ian Montgomery
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, that is the dilema. Path is on an existing system and, unfortunately, can't be changed. I guess I'll see if I can put my .jar elsewhere.
Thank you.
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are just looking to place a jar, then this isn't a problem. Just make sure that the structure in the jar reflects the class structure and edit the CLASSPATH to include this/2.0.8/bin/myjar.jar.
In this case, you don't need to identify these directories in the code yourself.
reply
    Bookmark Topic Watch Topic
  • New Topic