ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Hawkins <>
Subject Problem loading system library
Date Tue, 08 Jun 2004 16:43:24 GMT
I realize this resurfaces an old problem however i am a newbie here and 
don't quite get the response that was posted in 2001

i am getting:

java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3044 in java.library.path

when i am trying to run a java app from within ant. <on OSX from the 
terminal>; my code is below:

<property name="java.library.path.all" 
     <target name="Run"
             description="Run.  Assumes distro is already built.">
       <java jar="${dist}/jammit.jar" dir="dist" fork="true" 
           <bootclasspath refid="boot.class.path"/>
           <jvmarg value="-Djava.library.path=${java.library.path.all}"/>

of course there was a response to a similar problem that was posted 
years ago:

> This was exactly my problem as well, so I wrote the attached task.  It 
> allows you to
> use <env> tags (like with <exec>) when invoking the JVM.
> <taskdef classname="ant.extensions.JavaWithEnvTask" name="java-env">
>   <classpath>(wherever you compile the task)</classpath>
> </taskdef>
> ...
> <project ...>
>   <target ...>
>     <java-env src="..." dest="...">
>        <env key="LD_LIBRARY_PATH" path="..."/>
>        ...
>     </java-env>
>   </target>
> </project>
> Otherwise the task uses the same attributes and elements as <java>
> Hope it helps!

however i don't see how this fits in what i am trying to do. has anyone 
else made use of this and can help out? or is there an easier way?
i have also tried the <env/> directive i.e. <env key="LD_LIBRARY_PATH" 
value="${java.library.path.all}"/> to no avail. that is unless on OSX 
java does not look in the LD_LIBRARY_PATH?

btw the .so that it is looking for is in my ${lib}/swt directory.

thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message