|
P: 1
|
Hi
I have a UNIX script which creates a report. In that script I have to define the java classpath. Also I need to check if the java classpath specified exists or not. Below is the command i use
XY=./abc/cde:./bgh/nkl
# check if path defined in $jXY exists
IFS=:
for i in $XY
do
if [ -f $i ]
then
echo $i
else
exit
fi
done
java -classpath.:$XY <parameters to create report>
When i run this without checking whether path exists or not, the report is generated, but when i include the statements to check for existence of path in $XY, i am getting the error "./bgh/nkl is missing the manifest file entry"
But it actually has the manifest entry. I want to know how the check for existence of path can affect the generation of report in the java -classpath statement.
| |
Share this question for a faster answer!