Problem running jpl.jar project on mac os yosemite

309 views
Skip to first unread message

Javier rivas torres

unread,
Feb 17, 2015, 4:45:13 AM2/17/15
to swi-p...@googlegroups.com
Hi 

Im Frank, does anyone know how make run projects on netbeans or eclipse in a mac os yosemite S.O. I tried everything, and any of them work, i feel really desesperate and i would apreciate any help. I set the eviroment variable, path and swi_home_dir i set the -Djava.library.path and i always find the same message
run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at jpl.JPL.loadNativeLibrary(JPL.java:100)
at jpl.fli.Prolog.<clinit>(Prolog.java:85)
at jpl.Query.open(Query.java:286)
at jpl.Util.textToTerm(Util.java:162)
at jpl.Query.<init>(Query.java:198)
at consultasProlog.Consultas.consultaFicheroProlog(Consultas.java:19)
at utilidades.RellenarModelo.ejecutarArchivo(RellenarModelo.java:30)
at javaprolog.JavaProlog.main(JavaProlog.java:30)
Java Result: 1

Thanks a lot for any information. 

Jan Wielemaker

unread,
Feb 17, 2015, 5:09:28 AM2/17/15
to Javier rivas torres, swi-p...@googlegroups.com
On 02/17/2015 10:45 AM, Javier rivas torres wrote:
> Hi
>
> Im Frank, does anyone know how make run projects on netbeans or eclipse
> in a mac os yosemite S.O. I tried everything, and any of them work, i
> feel really desesperate and i would apreciate any help. I set the
> eviroment variable, path and swi_home_dir i set the -Djava.library.path
> and i always find the same message

Dealing with this stuff is hell. One of the issues is that it is
always unclear whether the main file cannot be found or one of its
dependencies. I'd set DYLD_LIBRARY_PATH to include (besides the
default stuff) the directories holding the Java .dylib and the Prolog
.dylib directories. Verify that you can load jpl.dylib using
`otool -L /path/to/jpl.dylib`

Some people have it running on MacOS ...

Cheers --- Jan

> run:
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpl in
> java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
> at java.lang.Runtime.loadLibrary0(Runtime.java:849)
> at java.lang.System.loadLibrary(System.java:1088)
> at jpl.JPL.loadNativeLibrary(JPL.java:100)
> at jpl.fli.Prolog.<clinit>(Prolog.java:85)
> at jpl.Query.open(Query.java:286)
> at jpl.Util.textToTerm(Util.java:162)
> at jpl.Query.<init>(Query.java:198)
> at consultasProlog.Consultas.consultaFicheroProlog(Consultas.java:19)
> at utilidades.RellenarModelo.ejecutarArchivo(RellenarModelo.java:30)
> at javaprolog.JavaProlog.main(JavaProlog.java:30)
> Java Result: 1
>
> Thanks a lot for any information.
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swi-prolog+...@googlegroups.com
> <mailto:swi-prolog+...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/swi-prolog.
> For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Javier rivas torres

unread,
Feb 21, 2015, 7:56:17 AM2/21/15
to swi-p...@googlegroups.com
Hi everybody

For every one who use mac, i found the solution for this problem, is quite simple but i spend to much time find it out so i want everybody let know how to do it.

First of all , swi prolog must be install as macports, not normal installation
port install swi-prolog
if you dont have install already macports command not found will apear so go to https://www.macports.org/install.php and install macports
after install swi prolog via macports, you only have to navigate to the path of swi prolog macports installation which mine is /opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0 copy this path and set in java.library.path in the java VM as  -Djava.library.path=/opt/local/lib/swipl-6.6.6/lib/x86_64-darwin14.0.0

with this it will work find , please Jan tell people that, it was a waste of time for me and i want to avoid this for other people.

Thanks a lot. Cheers- Frank

Tope Omitola

unread,
Oct 19, 2015, 9:21:23 AM10/19/15
to SWI-Prolog
Thanks Javier Rivas. This worked for me. Tope

Paulo Moura

unread,
Oct 19, 2015, 9:24:09 AM10/19/15
to SWI-Prolog
See also:

https://github.com/SWI-Prolog/packages-jpl/issues/2
> --
> You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/swi-prolog.
> For more options, visit https://groups.google.com/d/optout.

-----------------------------------------------------------------
Paulo Moura
Logtalk developer

Email: <mailto:pmo...@logtalk.org>
Web: <http://logtalk.org/>
-----------------------------------------------------------------




Reply all
Reply to author
Forward
0 new messages