dcsimg
How to set classpath in Linux??
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kirti_Wanjale
Posted On:   Thursday, December 9, 2004 02:16 AM

Scenario : I have written a program in java for native interface i.e. JNI programming. It is working on Linux platform (redhat 9.0) but now I want to include that code in JSP and the code requires some Classfiles but i am not getting where to store that classfiles?? Please help me.


The answer i got is to set the path of classfiles in Classpath of application server. But how to do that??? Could someone elaborate more on same?


Kirti

Re: How to set classpath in Linux??

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, December 11, 2004 09:26 AM

If you are just talking about Java .class files, put them in the WEB-INF of your web app WAR file (under the package name subdirs), or put them in a Jar file and then put the Jar file in the WEB-INF/lib.


But are you perhaps talking about compiled native code, either in ".so" dynamic library files for Unix, or ".dll"'s for Windows?


If so, then you have to add them to the process's LD_LIBRARY_PATH (for Unix) or PATH (for Windows), where the "process" is the JVM of the web server. Either add to the LD_LIBRARY_PATH (or PATH) in the environment before running the process, or else in the startup script that runs the process.
About | Sitemap | Contact