<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Andreas, <br>
 <br>
This is what I did. <br>
 <br>
I got the mapserver source code and untarred it and did the following <br>
 <br>
./configure --with-jpeg --with-gd --with-proj  --with-gdal=/usr/local/bin/gdal-config 
<br>
make <br>
 <br>
Then I got the SWIG Version 1.3.11 source. <br>
 <br>
.<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>configure --with-javac=/usr/java/j2sdk1.4.0/bin<span
 class="moz-txt-tag">/</span></i>  --with-java=<i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>usr/java/j2sdk1.4.0/bin<span
 class="moz-txt-tag">/</span></i>  --with-javaincl=<i
 class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/java/j2sdk1.4.0/include<span
 class="moz-txt-tag">/</span></i> <br>
make <br>
make install <br>
 <br>
I created a directory called java in mapserver-src/mapscript and created
 a symlink for mapscript.i inside it.  (In the new nightly builds, you might
not need this step since it should be already in there)<br>
 <br>
/usr/local/bin/swig -java -shadow -package mapscript mapscript.i <br>
 <br>
It created some java files. <br>
Then I did <br>
FLAGS="-DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JPEG  -DUSE_GD_WBMP
-DUSE_GD_FT -DUSE_WMS -DUSE_TIFF -DUSE_JPEG -DUSE_EPPL  -DUSE_GDAL"gcc -fpic
-c $FLAGS -I/usr/java/j2sdk1.4.0/include  -I/usr/java/j2sdk1.4.0/include/linux
mapscript_wrap.c <br>
gcc -fpic -shared -o libmapscript.so -L/usr/lib -lgd -ljpeg -lfreetype  -lpng
-lz -ltiff  -L/usr/local/lib -lgdal.1.1 -lproj mapscript_wrap.o  ../../libmap.a 
<br>
 <br>
 <br>
Java programs didn't compile right off the bat. I need to correct all  those
'long' variable types and return types. Then it compiled. (New nightly build
should compile clean) <br>
<br>
In tomcat, I added the following line in /etc/tomcat4/conf/tomcat4.conf<br>
<br>
export LD_LIBRARY_PATH=/opt/mapserver/mapscript/java:$LD_LIBRARY_PATH<br>
<br>
I have the mapserver installed on /opt/<br>
<br>
I have attached a servlet sample .<br>
<br>
Thanks <br>
Sathis <br>
Andreas Hirner wrote:<br>
<blockquote type="cite"
 cite="midF236JFUZJPg7g0bBVuN00019231@hotmail.com">Hello, <br>
 <br>
I have been able to compile mapserver 3.5 on Linux/Suse 7.3 and got the demo
 running. Now I am thinking of using Java mapscript within Jsp Pages. <br>
Does anybody know how to go about this. Do I have to use Swig to create the
 Java sources from the nightly builds or are there other Java sources  available.
Is the functionality or reliability of Java mapscript similar to  that of
the Perl or PHP versions or are there any limitations. Are there any  manuals
covering the usage of Java mapscript. And so on.. <br>
I would appreciate any information or hints concerning the compilation and
 usage of Java mapscript in the linux environment. <br>
 <br>
Thanks in advance <br>
Andreas Hirner <br>
 <br>
 <br>
_________________________________________________________________ <br>
Chat with friends online, try MSN Messenger: <a class="moz-txt-link-freetext" href="http://messenger.msn.com">http://messenger.msn.com</a> <br>
</blockquote>
<br>
<br>
</body>
</html>