Hi,
Probably JDK does not recognize subsequent "~" characters within
CLASSPATH,
except for the first.
run the following code:
CLASSPATH=~/servlet.jar:~/server.jar ; echo $CLASSPATH
CLASSPATH="~/servlet.jar:~/server.jar" ; echo $CLASSPATH
The first line, without quotes, the resulting CLASSPATH contains
the full path names of the files, wich is safer to pass as CLASSPATH
to the java binary.
Also I found such behaviour on "pure" ksh
(startserver is a !/bin/ksh script)
on SCO OpenServer Unix - the following
comands will yield the unexpected result you described:
ksh
echo ~/a:~/b
The result will be:
/home/cezar/a:~/b
But on a linux system:
bash
echo ~/a:~/b
result is:
/home/cezar/a:/home/cezar/b
So the main idea is not to let the JVM expand ~ to the name of home
directory, make sure it receives full directory/jar names as CLASSPATH
arguments.
Use $HOME instead of ~ :
CLASSPATH="$HOME/jsdk2.1/server.jar:$HOME/jsdk2.1/servlet.jar:...."
Cezar
--------------------------------
On Tue, 17 Aug 1999, Tran Sy Nguyen wrote:
> Dear sirs,
>
> I have one problem in using the version 2.1 of the Java(tm) Servlet
> Development Kit with the version 1.2 of the Java Development Kit
> installed in the LINUX operating system. Because for this version of
> JDK, the environment variable like CLASSPATH is not recognised, so I
> have to change the line
> java com.sun.web.shell.Startup $*
> in the file "startserver" into the following line
> java -cp $CLASSPATH com.sun.web.shell.Startup $*
> But it don't run correctly.
> For example, with the line like
> java -cp
> ~/jsdk2.1/server.jar:~/jsdk2.1/servlet.jar:~/mm.mysql.jdbc1.0/mysql.jar
> com.sun.web.shell.Startup $*
> It can recognise just the classes in the path "~/jsdk2.1/server.jar".
>
> Whereas, for the version 2.0 of the Java(tm) Servlet Development Kit,
> when I change the line
> java sun.servlet.http.HttpServer $*
> in the file "servletrunner" into the following line
> java -cp $CLASSPATH sun.servlet.http.HttpServer $*
> In this case, it runs correctly because "java" can locate the necessary
> application classes precised by the search path CLASSPATH.
>
> If you know how to solve this problem, can you please show me all the
> necessary things to do?
>
> Thank you in advance for yours considerations.
> Best regards,
> --
> Tran Sy Nguyen mailto:[EMAIL PROTECTED]
> T�l: (84 4) 8696017 Fax: (84 4) 8694509
> Promotion 1997, Institut de la Francophonie pour l'Informatique,
> Nha D, Ngo 42, Ta Quang Buu - Ha Noi - Viet Nam
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html