Re: Directory Structure for java





yes it is using Class.getResource

java -cp build:icons VTASystem

presumably ; not :

Possibly - i only use unix platforms, where it's a : - is it a ; on
windows?

yes - or \; under cygwin

Assuming that the resource references are written relative to the
project root (/icons/foo.png, /icons/JPEGS/bar.jpg, etc), and that
you're running that command from the project root.

No they aren't. There is a single directory of icons that is used
throughout the code.

Hold on - could you give an example of exactly what the resource paths
look like? If they have a leading slash, they're relative to the project
root (actually, the classpath root - see below), and if they don't,
they're relative to the class on which getResource was called. From what
you say, it sounds a lot like the former.

with a leading slash
getResource("/icons/foo.png");


.



Relevant Pages

  • Re: listing directories only?
    ... > This command displays only the name of the sub-dir, ... > the full path from the root, ... You can add a slash with sed, you can sort with .. ...
    (comp.unix.solaris)
  • Re: Finding a projects root directory
    ... i.e. to ascend up the directories until it is found. ... I use the parent directory of the lib/ directory as project root. ... I'm using lib/ as the fallback in place of README*. ...
    (comp.lang.ruby)
  • Re: Finding a projects root directory
    ... the case of needing a reliable way to identify the project's root ... i.e. to ascend up the directories until it is found. ... I use the parent directory of the lib/ directory as project root. ...
    (comp.lang.ruby)
  • Re: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
    (comp.sys.mac.system)
  • Re: [ squeeze ] Grub2 RAID1 LVM2 boot failure
    ... insmod mdraid ... That UUID it's not the same that grub will use for boot. ... the `root` partition from the point of view of grub is the partition ... BTW this command is undocummented in the wiki, ...
    (Debian-User)