jclips into mac os

50 views
Skip to first unread message

gadalet...@gmail.com

unread,
Jul 24, 2007, 10:26:01 AM7/24/07
to CLIPSESG
there anyone that can say me if there is a way to use jclips library
into java with mac?

CLIPS Support

unread,
Jul 25, 2007, 1:45:51 PM7/25/07
to CLIPSESG
I was able to create a shared library from the jclips makefile by
including the path /Developer/SDKs/MacOSX10.4u.sdk/System/Library/
Frameworks/JavaVM.framework/Versions/1.5.0/Headers, but I haven't been
able to get it to recognize the native library yet. I'll play around
with it some more.

~/Documents/CLIPS/jclips garyriley$ java -cp .:./jclips.jar -
Djava.library.path=. JClipsExample
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jclips
in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at jclips.JClips.<clinit>(Unknown Source)
at JClipsExample.main(JClipsExample.java:19)
~/Documents/CLIPS/jclips garyriley$ ls
JClipsExample.class jclips
jclips.jar myknowledge.clp
JClipsExample.java jclips.so
clips libjclips.so
~/Documents/CLIPS/jclips garyriley$

On Jul 24, 9:26 am, "gadaleta.ma...@gmail.com"

CLIPS Support

unread,
Jul 26, 2007, 11:47:54 PM7/26/07
to CLIPSESG
1) You have to create a shared library. Download the shared library
source code.
Set the UNIX_V flag in setup.h to 1 and the IBM_MSC flag to 0.
In the makefile, remove the -Woverloaded-virtual option from
the .c.o entry.
Change the libjclips.so entry to the following:

libjclips.jnilib : $(OBJS) jclips_JClips.c
gcc -dynamiclib -o libjclips.jnilib -Wall -D LINUX -I/System/
Library/Frameworks/JavaVM.framework/Headers -framework JavaVM -lm $
(OBJS) jclips_JClips.c

Make the shared library libjclips.jnilib:

make libjclips.jnilib

2) Download jclips.jar, JClipsExample.java, and myknowledge.clp and
place them in the same directory.
Move libjclips.jnilib to the same directory.

3) Launch the Terminal application and navigate to the directory.

4) Compile JClipsExample.java:

javac -classpath jclips.jar JClipsExample.java

5) Run the example with this command:

java -cp .:jclips.jar JClipsExample

gadalet...@gmail.com

unread,
Jul 31, 2007, 7:42:54 AM7/31/07
to CLIPSESG
tank you very very very mutch.....

> > into java with mac?- Nascondi testo tra virgolette -
>
> - Mostra testo tra virgolette -

Reply all
Reply to author
Forward
0 new messages