I have also had a lot of trouble with classpath.
First, I will complain a little bit ( for therapeutical reasons), then I'll give you
my solution.
Complain: it is sad that at this point of the new millenium we are still stuck on dox
boxes, bat files, set variables and all that "DOS" kind of thing that should have
dissapeared a long time ago. That a system today still depends on that stuff is very
regrettable, in my opinion.
Sun's is to blame for that, probably. But even Microsoft was shipping two years ago
Windows CE developing systems that were based on bat files calling bat files, setting
enviromental variables and once again, all these crap with DOS kinda boxes and class
paths. So microsoft is also a sinner.
At the same time Microsoft loves making things "slighltly incompatible". Dos boxes in
Windows95 and NT are QUITE different.
Disregarding whether you have windows98 or 95 or NT, you will sooner or later end up
with trouble with the class path.
The reasons have to do not only wit the differences in the implementation of a DOS box
in NT and 95/98, but also in the java.exe program.
If you run orion directly from the jar file, then the classpath that you put in the
environment variables is lost. At least so it was for me
To overcome that you have to invoque orion in another way ( quoted at the end of this
email, but, if you are impatient, is it done like this: java
com.evermind.server.ApplicationServer )
But this overcomes only one of the problems, namely getting the class path into orion
via java's virtual machine/dosbox,etc.
The second problem you will have is that windows95/98 does boxes will not accept a SET
if it is too long (like longer 256 chars or so).
This makes at least my classpath unsuable, because you just define a couple of jar
files, a couple of directories and you are over the limit for the set.
Because of that I was forced to give up running Orion in windows98. A real pity
because otherwise it seemed to be ok within windows98.
In NT my bat file creating the classpath and calling orion in a way that it gets hold
of that classpath works. However, an in order to spoil any trace of happiness, my bat
file runs perfectly only once. If you try to run it a second time from within the same
dos box it fails ( something overflows). So after you executed it once you have to
close the dox box and open a new one. However this is not a big issue, since you open
the dox box just to invoque orion, and once orion is running you do not care anymore
about the dox box.
Here are the contents of my bat file
***************
echo on
rem *************Standart Class path - Directories -*********
set CLASSPATH=%CLASSPATH%;C:\java\jdk\bin;c:\development\classes;
C:\development\packages;c:\development\jars;C:\java\jdk\lib
rem *************Standart Class path - Jar files containign standart stuff *********
set CLASSPATH=%CLASSPATH%;c:\java\orion\tools.jar;
set CLASSPATH=%CLASSPATH%;c:\development\jars\servlet.jar;C:\Development\jars\ejb.jar;
set CLASSPATH=%CLASSPATH%;C:\Development\jars\jsp.jar;
rem *************Orion server related Class path*********
set CLASSPATH=%CLASSPATH%;C:\java\orion\orion.jar;
rem ************* XML PArser stuff and JNaming for preferences*********
set
CLASSPATH=%CLASSPATH%;C:\Development\jars\jaas.jar;C:\Development\jars\jpda.jar;c:\development\jars\servlet.jar;
set CLASSPATH=%CLASSPATH%;C:\Development\jars\jndi.jar;C:\Development\jars\ejb.jar
set CLASSPATH=%CLASSPATH%;C:\Development\jars\xml.jar;C:\Development\jars\xml4j.jar
set CLASSPATH=%CLASSPATH%;c:\development\packages\saxjava.zip
rem ************* Nexus stuff *********
rem set
CLASSPATH=%CLASSPATH%;C:\Development\packages\se\Nexus\NXCID10.JAR;C:\Development\packages\se\Nexus\IAIK_J~1.JAR;C:\Development\packages\se\Nexus\JDK11X~1.JAR;C:\Development\packages\se\Nexus\LDAPJDK.JAR
rem ************* Database and ODBC related stuff *********
set CLASSPATH=%CLASSPATH%;C:\Development\jars\jdbc2_0-stdext.jar
rem ************* Oracle 8i Stuff *********
set
CLASSPATH=%CLASSPATH%;c:\development\classes\816classes12.zip;c:\development\classes\816nlscharset12.zip
rem ************* Oracle 8.05 Stuff *********
rem set CLASSPATH=%CLASSPATH%;D:\orant\jdbc\lib\classes111.zip;
rem ************* JSWDK stuff *********
set JAVA_HOME=c:\java\jdk
set jsdkJars=.\webserver.jar;.\lib\jakarta.jar;.\lib\servlet.jar
set jspJars=.\lib\jsp.jar;.\lib\jspengine.jar
set
beanJars=.\examples\WEB-INF\jsp\beans;.\webpages\WEB-INF\servlets;.\webpages\WEB-INF\jsp\beans
set
miscJars=.\lib\xml.jar;.\lib\moo.jar;c:\Development\jars\jdbc2_0-stdext.jar;c:\Development\jars\xml4j.jar
set appJars=%jsdkJars%;%jspJars%;%beanJars%;%miscJars%
set sysJars=%JAVA_HOME%\lib\tools.jar
set appClassPath=%appJars%
set CLASSPATH=%CLASSPATH%;%appClassPath%;${sysJars}
rem ************* Call to orion server type 1 *********
java com.evermind.server.ApplicationServer
echo off
rem ************* Call to orion server type 2 ( from the jar file) *********
rem java %PROPERTIES% -jar orion.jar
----- Original Message -----
From: Ruud Noordermeer <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: den 7 januari 2000 10:13
Subject: Problems with 'ClassPath' and Orion
> Hey Guys!
>
> I'm new to Orion and am trying to get it running on my W95 system.
>
> Until now I cannot access classes outside of the orion environment.
> It looks like the classpath is not correctly set.
>
> When I run one of my test servlets which checks the Java VM it tells
> me only the 'orion.jar' is on my classpath, even though I've used the
> classpath entries in 'web-application.xml.
>
> I'm using:
> Windows-95
> Java JDK 1.2.2
> Orion 0.8.2
>
> I've tried:
> setting classpath in 'default-site/web-application.xml'
> setting classpath in 'config/web-application.xml'
> adding -classpath on startup of java - orion server
> defining a classpath in OS-environment
>
> Any suggestions????
>
> Thanks in advance!
>
> Ruud Noordermeer.
> ProGaia Web Solutions
> +-----------------------------------------------------------------+
> |Ruud Noordermeer Email: [EMAIL PROTECTED]|
> |ProGaia Web Solutions BV [EMAIL PROTECTED]|
> +-----------------------------------------------------------------+
>
>