Re: Tomcat Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/3/06, Ryan Ollerenshaw <ryanollerenshaw@xxxxxxxxx> wrote:
I am able to compile a java mapscript file from the command line using:

javac -classpath ./mapscript.jar MapServerTest.java

But when i try to turn my code into a servelt and run it over Tomcat i keep
getting:

java.lang.UnsatisfiedLinkError: no mapscript in java.library.path

I have tried adding: export CLASSPATH=./mapscript.jar
to my ./tomcat5/bin/startup.sh file but that does not seem to help.  Am i
missing a setting somewhere, why cant Tomcat find the .jar file?  I have it
in the same directory as my .java file and also in /common/lib and
/shared/lib

Thank you for any help that you can provide

Getting closer to the solution.  I have found i can use the following
code to print out the classpath that my program is actaully using the
code is:

Get the System Classloader
       ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

       //Get the URLs
       URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

       for(int i=0; i< urls.length; i++)
       {
          out.println(urls[i].getFile());
          out.println("<br>");
       }

and the classpath that is printed is:

/usr/java/j2sdk1.4.2_12/lib/tools.jar
/etc/tomcat5/bin/dist/commons-daemon.jar
/etc/tomcat5/bin/bootstrap.jar

But i am not sure where this is getting set, i do have the following
in my /tomcat5/bin/startup.sh

export CLASSPATH=./mapscript.jar:.:/etc/tomcat5/webapps/my_test/WEB-INF/classes

so why is this not my classpath at run time??

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux