Anyone use variables to shorten classpath declaration?
- From: "snoopy_@xxxxxxxxxx" <snoopy_@xxxxxxxxxx>
- Date: 1 Feb 2007 12:12:44 -0800
Anyone use variables to shorten classpath declaration? For example,
if I want to point to /opt/myclasses/testpackage.jar, could I do the
following?
update .profile to include
PACKAGE_DIR=/opt/myclasses
CLASSPATH=$PACKAGE_DIR/testpackage.jar
export CLASSPATH
The reason I am asking is because I am trying to troubleshoot an issue
where an application failed to find some jar files, and I found that
one profile sourced another, but the variable it uses as a shortcut
isn't defined at the time the CLASSPATH is defined, however, if I
check the path after all the source files are picked up it looks right
via "echo $CLASSPATH" because I have since defined PACKAGE_DIR.
For example, the definition aboe is switch to look like:
CLASSPATH=$PACKAGE_DIR/testpackage.jar
export CLASSPATH
PACKAGE_DIR=/opt/myclasses
I know it's a strange question, but I'm pulling out my hair trying to
figure out why we had CLASSPATH issues with our system.
.
- Follow-Ups:
- Re: Anyone use variables to shorten classpath declaration?
- From: Nigel Wade
- Re: Anyone use variables to shorten classpath declaration?
- Prev by Date: Re: question about assigning null to a reference object
- Next by Date: how to read letters
- Previous by thread: Re: When the stop() in Thread class changed to final method?
- Next by thread: Re: Anyone use variables to shorten classpath declaration?
- Index(es):
Relevant Pages
|
Loading