[Mapserver-users] java mapscript getPoints is already defined error

Merlos merlos at tsc.uvigo.es
Wed Jun 9 15:20:34 EDT 2004


I also had that problem when compiling java mapscript for mapserver 4.2

If you compare original java files with patched java files you will see that 
it only removes the redundant functions. The problem is that in C++ you can 
return different classes in two methods that have the same name and 
arguments, but in java it is not possible.

So what I did to overtake this error was edit symbolObj.java nd on line 207 
removed this line:

  public lineObj getPoints() {

And added:

  public lineObj getPoints(boolean lala) {
       if (lala==true) {}

 
At least it compiled. And could finish all the stuff following the steps of 
the howto.


Regards. Juan.


I suppose it would be a good idea add it to the wiki.


On Wednesday 09 June 2004 18:27, gabriel hunter wrote:
> Hi all,
>
> I'm new to mapserver, I tried to compile java mapscript but I can't go any
> further without some help.
>
> I followed the JavaMapScriptHowTo, but executing
>
> javac edu/umn/gis/mapscript/*.java
>
> without patching, gives an error about functions already defined:
>
> setExtension and setMimetype in file outputFormatObj.java
> getPoints in file symbolObj.java
>
> and an "attempting to use incompatible return type" on function clone in
> file mapObj.java.
>
> when I apply the patch I can see that change are made to files
> outpuFormatObj.java and mapObj.java, but no changes are made to
> symbolObj.java
>
> so I compiled again and get:
>
> symbolObj.java:207: getPoints() is already defined
>
> I'm using mapserver 4.2, gdal 1.2.0b, gd 2.0.20, swig 1.3.21 on slackware
> 9.1
>
> What can I do?
>
> Thanks in advance.
>
> Gabriel Hunter
>
>
> ---------------------------------
> Do you Yahoo!?
> Friends.  Fun. Try the all-new Yahoo! Messenger

-- 
--
http://www.merlos.biz



More information about the mapserver-users mailing list