The J2EE reference implementation needs to have access to the class files provided by J-Integra® in order to respond to the JSP/Servlet requests. In this application server there are three environment variables that are important and must be set correctly:
PATH: This environment variable specifies the location of the executable (.exe, .com, .bat, etc) files and application extension files (.DLL, .OCX, etc). If you want to take advantage of J-Integra®s authentication mechanism, you should include the path to the J-Integra®s bin directory to your PATH environment variable. For example if you have installed the J-Integra® in D:\jintegra then you should add D:\jintegra\bin to your PATH.
CLASSPATH: This environment variable is used by the Java virtual machine to find the classes that have been used in your JSP/Servlet files. For each COM object, you use J-Integra®'s com2java application to create the wrapper proxies. You can include the path to the created proxy classes to the CLASSPATH or you can pack them up in a jar file and then put the jar file in a directory that is part of CLASSPATH. Let say you have created the proxy files for Excel COM control and you have put them in a directory called excel. While you are on the parent directory of the excel directory, enter this command:
jar cvf excel.jar excel/*.classThis command creates a file called excel.jar. If you have installed the J-Integra® in D:\jintegra, then there is a directory called lib under jintegra that contains a file called jintegra.jar. This file contains all the classes that are part of the J-Integra® bridge. You must include the path to this file to the CLASSPATH. It would be a good idea to add the generated jar files for each COM object to this directory, too. Hence, copy the excel.jar file to D:\jintegra\lib and then add D:\jintegra\lib\jintegra.jar and D:\jintegra\lib\excel.jar to your CLASSPATH.
J2EE_CLASSPATH: The J2EE server uses this environment variable to access some classes that are part of J2EE. It is recommended to add the same items that you have added to your CLASSPATH to this one, too.
After you change your environment variables, you must stop your J2EE server and re-start it.
It is recommended that you create a batch file and set these environment variables on that batch file and before you start your J2EE server, run the batch file to set the environment variables and then start the J2EE server. Here is a sample batch file: (We assume you have installed JDK1.3.1 as your JDK in D:\jdk1.3.1, J2EE SDK in D:\j2sdkee1.3, and the J-Integra® in D:\jintegra and also you have added the excel.jar to D:\jintegra\lib.)
PATH= D:\jdk1.3.1\bin;D:\j2sdkee1.3\bin;D:\jintegra\bin;%PATH%;
SET CLASSPATH=.;D:\jdk1.3.1\jre\lib\rt.jar;D:\j2sdkee1.3\lib
\j2ee.jar;D:\jdk1.3.1\lib\tools.jar;D:\j2sdkee1.3\lib\system\cloudscape.jar;D:\jintegra\lib\jintegra.jar;D:\jintegra\lib\dcomawt.jar;D:\jintegra\lib\excel.jar;
SET J2EE_CLASSPATH=.;D:\jintegra\lib\jintegra.jar;D:\jintegra\lib\dcomawt.jar;D:\jintegra\lib\excel.jar;
SET JAVA_HOME=D:\jdk1.3.1
SET J2EE_HOME=D:\j2sdkee1.3
The TomCat Servlet Container needs to have access to the class files provided by the J-Integra® in order to respond to the JSP/Servlet requests. In this Servlet Container there are three environment variables that are important and must be set correctly:
PATH: This environment variable specifies the location of the executable (.exe, .com, .bat, etc) files and application extension files (.DLL, .OCX, etc). If you want to take advantage of J-Integra®s authentication mechanism, you should include the path to the J-Integra®s bin directory to your PATH environment variable. For example if you have installed the J-Integra® in D:\jintegra then you should add D:\jintegra\bin to your PATH.
CLASSPATH: This environment variable is used by the Java virtual machine to find the classes that have been used in your JSP/Servlet files. For each COM object, you use J-Integra®'s com2java application to create the wrapper proxies. You can include the path to the created proxy classes to the CLASSPATH or you can pack them up in a jar file and then put the jar file in a directory that is part of CLASSPATH. Let say you have created the proxy files for Excel COM control and you have put them in a directory called excel. While you are on the parent directory of the excel directory, enter this command:
jar cvf excel.jar excel/*.classThis command creates a file called excel.jar. If you have installed the J-Integra® in D:\jintegra, then there is a directory called lib under jintegra that contains a file called jintegra.jar. This file contains all the classes that are part of the J-Integra® bridge. You must include the path to this file to the CLASSPATH. It would be a good idea to add the generated jar files for each COM object to this directory, too. Hence, copy the excel.jar file to D:\jintegra\lib and then add D:\jintegra\lib\jintegra.jar and D:\jintegra\lib\excel.jar to your CLASSPATH
TOMCAT_HOME: This environment variable specifies the root directory for the TomCat.
After you change your environment variables, you must stop your TomCat server and re-start it.
It is recommended that you create a batch file and set these environment variables on that batch file and before you start your TomCat server, run the batch file to set the environment variables and then start the TomCat server. Here is a sample batch file: (We assume you have installed JDK1.3.1 as your JDK in D:\jdk1.3.1, J2EE SDK in D:\ j2sdkee1.3, TomCat in D:\jakarta-tomcat-3.2.3, and the J-Integra® in D:\jintegra and also you have added the excel.jar to D:\jintegra\lib.)
PATH= D:\jdk1.3.1\bin;D:\j2sdkee1.3\bin;D:\jintegra\bin;%PATH%;
SET TOMCAT_HOME=D:\jakarta-tomcat-3.2.3
SET CLASSPATH=.;D:\jdk1.3.1\jre\lib\rt.jar;D:\j2sdkee1.3\lib \j2ee.jar;D:\jdk1.3.1\lib\tools.jar;D:\j2sdkee1.3\lib\system\cloudscape.jar;D:\jintegra\lib\jintegra.jar;D:\jintegra\lib\dcomawt.jar;D:\jintegra\lib\excel.jar;
SET J2EE_CLASSPATH=.;D:\jintegra\lib\jintegra.jar;D:\jintegra\lib\dcomawt.jar;D:\jintegra\lib\excel.jar;
SET JAVA_HOME=D:\jdk1.3.1
SET J2EE_HOME=D:\j2sdkee1.3
The WebSphere Application Server needs to have access to the class files provided by the J-Integra® in order to respond to the JSP/Servlet requests. In this Application Server there are two environment variables that are important and must be set correctly:
PATH: This environment variable specifies the location of the executable (.exe, .com, .bat, etc) files and application extension files (.DLL, .OCX, etc). If you want to take advantage of J-Integra®s authentication mechanism, you should include the path to the J-Integra®s bin directory to your PATH environment variable. For example if you have installed the J-Integra® in D:\jintegra then you should add D:\jintegra\bin to your PATH.
jar cvf excel.jar excel/*.class
This command creates a file called excel.jar. If you have installed the J-Integra® in D:\jintegra, then there is a directory called lib under jintegra that contains a file called jintegra.jar. This file contains all the classes that are part of the J-Integra® bridge. You must include the path to this file to the CLASSPATH. It would be a good idea to add the generated jar files for each COM object to this directory, too. Hence, copy the excel.jar file to D:\jintegra\lib and then add D:\jintegra\lib\jintegra.jar and D:\jintegra\lib\excel.jar to your CLASSPATH. The WebSphere Application server uses a file called setupCmdLine.bat (located in the bin directory of your WebSphere) to set up the environment for running different application. In order to set the PATH and CLASSPATH, open up this file and add the path to your jar files to the end of the WAS_CLASSPATH. For instance if you have installed the J-Integra® on D:\jintegra directory and also you have added the excel.jar file into D:\jintegra\lib, you must change the WAS_CLASSPATH to look like this:
SET WAS_CLASSPATH=%WAS_HOME%\properties;%WAS_HOME%\lib\bootstrap.jar;D:\jintegra\lib\jintegra.jar; D:\jintegra\lib\excel.jar;
After you change your environment variables, you must stop the WebSphere Application Server and re-start it.
Here is a sample setupCmdLine.bat: (We assume you have installed the WebSphere Application server in C:\WebSphere, and the J-Integra® in D:\jintegra and also you have added the excel.jar to D:\jintegra\lib.)
SET COMPUTERNAME=MYCOMPUTER |