java class path and '/' character in directory names
java class path and '/' character in directory names
- Subject: java class path and '/' character in directory names
- From: Jesse Grosjean <email@hidden>
- Date: Sat, 19 Jul 2003 14:22:54 -0400
My application starts its own JVM using the code:
[[NSJavaVirtualMachine alloc] initWithClassPath:myCustomPath]
and then loads class files that exist in myCustomPath (which is the
resources path to my application bundle). This all works fine except in
one hard to debug, but just figured it out YEAH, case:)
The problem is if the user installs my application in a directory where
they include a "/" character in the directory name as can be done by
the finder. Directory "to/do" for example. In this case my resource
path contains a ':' character in the directory name since that's what
'/' is converted to by the underlying file system. So now the directory
is named "to:do". The problem is that the JVM uses this colon character
to delimit parts of the classpath, and thus the JVM isn't able to find
my classes when I try to load them. Just for fun I also tried to let
project builder load the JVM for my by checking "needs java" instead of
loading the JVM myself, but I still ran into the same problem...
So it looks to me like in the current setup no Java applications will
work if they are in a directory with a '/' character? Is there a way
around this problem or should I just popup a dialogue notifying the
user that they should move the app to a different location?
Thanks,
Jesse
----------------------------------------------------------------
Jesse Grosjean / Hog Bay Software, Quality Mac Software
163 Westway RD #204
Greenbelt, MD 20770
email@hidden
http://www.hogbay.com/software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.