CLIPS and Java Integration

1,325 views
Skip to first unread message

Brian

unread,
Mar 3, 2011, 11:56:11 AM3/3/11
to CLIPSESG, pingts...@yahoo.com
Hello,

I'm trying to integrate my CLIPS file to a Java program for a school
project because I want to create an expert system with a GUI
interface. Later, I plan to store key data from the interface in a
database via JDBC. I'm trying to look at some CLIPS/JAVA examples, so
I'm reading the following resources:

1. CLIPS Reference Manual - The Advanced Programing Guide, using the
files in my downloaded CLIPS 6.3 application, but I'm unable to find
the CLIPSJNI directory.

2. In addition, I tried to follow the directions from a previous
message posted by the CLIPSESG on Feb 7, 2009, I downloaded the most
recent version (v 6.3) but I still cannot find the CLIPSJNI
directory.

3. Finally, I checked out SourceForges website's CLIPS folder from
http://sourceforge.net/projects/clipsrules/develop via Subversion. I
was able to navigate to the CLIPSJNI directory, but I get the
following error message when I execute the instructions from the
Advanced Programing Guide starting on page 190:

Exception in thread "main" java.lang.NoClassDefFoundError:
AnimalDemo //trying to open the AnimalDemo

Can you assist me with this error message? Also, is there any
documentation that provides novice programmers with step by step
instructions assisting with the integration of CLIPS to Java?

Any help will be greatly appreciated :)

- Brian

CLIPS Support

unread,
Mar 3, 2011, 12:19:37 PM3/3/11
to CLIPSESG
Download CLIPSJNI_0.2.zip from here: https://sourceforge.net/projects/clipsrules/files/CLIPS/6.30/
The java classes should already be created in the folders. If not,
there are instructions in the Advanced Programming Guide for how to
compile the java files later in the same section of the Advanced
Programming Guide

On Mar 3, 10:56 am, Brian <BrianFrancis0...@yahoo.com> wrote:
> Hello,
>
> I'm trying to integrate my CLIPS file to a Java program for a school
> project because I want to create an expert system with a GUI
> interface.  Later, I plan to store key data from the interface in a
> database via JDBC.  I'm trying to look at some CLIPS/JAVA examples, so
> I'm reading the following resources:
>
> 1. CLIPS Reference Manual - The Advanced Programing Guide, using the
> files in my downloaded CLIPS 6.3 application, but I'm unable to find
> the CLIPSJNI directory.
>
> 2. In addition, I tried to follow the directions from a previous
> message posted by the CLIPSESG on Feb 7, 2009, I downloaded the most
> recent version (v 6.3) but I still cannot find the CLIPSJNI
> directory.
>
> 3. Finally, I checked out SourceForges website's CLIPS folder fromhttp://sourceforge.net/projects/clipsrules/developvia Subversion.  I

Brian

unread,
Mar 3, 2011, 12:25:31 PM3/3/11
to CLIPSESG
Thanks....this was a extremely helpful :)

On Mar 3, 12:19 pm, CLIPS Support <gdronline2...@swbell.net> wrote:
> Download CLIPSJNI_0.2.zip from here:https://sourceforge.net/projects/clipsrules/files/CLIPS/6.30/
> The java classes should already be created in the folders. If not,
> there are instructions in the Advanced Programming Guide for how to
> compile the java files later in the same section of the Advanced
> Programming Guide
>
> On Mar 3, 10:56 am, Brian <BrianFrancis0...@yahoo.com> wrote:
>
> > Hello,
>
> > I'm trying to integrate my CLIPS file to a Java program for a school
> > project because I want to create an expert system with a GUI
> > interface.  Later, I plan to store key data from the interface in a
> > database via JDBC.  I'm trying to look at some CLIPS/JAVA examples, so
> > I'm reading the following resources:
>
> > 1. CLIPS Reference Manual - The Advanced Programing Guide, using the
> > files in my downloaded CLIPS 6.3 application, but I'm unable to find
> > the CLIPSJNI directory.
>
> > 2. In addition, I tried to follow the directions from a previous
> > message posted by the CLIPSESG on Feb 7, 2009, I downloaded the most
> > recent version (v 6.3) but I still cannot find the CLIPSJNI
> > directory.
>
> > 3. Finally, I checked out SourceForges website's CLIPS folder fromhttp://sourceforge.net/projects/clipsrules/developviaSubversion.  I

Arnold Dumba

unread,
Jun 26, 2018, 3:28:16 AM6/26/18
to CLIPSESG
Greetings everyone;

My name is Arnold, i'm new to clips. I have a project, i'm supposed to develop an expert system using clips and in that project i want to integrate java codes with clips. I'm hereby asking for your help. If you can tell me how to do it..what are the steps to integrate an interface developed in java with the knowledge or facts base developed in clips.

what are the steps to make an executable in clips ?

Regards

CLIPS Support

unread,
Jun 26, 2018, 4:55:54 PM6/26/18
to CLIPSESG

Irina Ira

unread,
Jan 25, 2020, 1:08:23 PM1/25/20
to CLIPSESG

Hi,

I am Irina.

I cant to get facts from clips file using java code.

I trying to use code:


clips.run();


String evaluar = "find-all-facts ((?v mydiagnosis)) TRUE";

PrimitiveValue value = clips.eval(evaluar);


String diagn= value.get(0).getFactSlot("diagn").toString();


JOptionPane.showMessageDialog(rootPane, "My diagnosis "+diagn);


clips.reset(); 


But I have an ERROR:

error: cannot find symbol  

symbol:   method get(int)   

location: variable value of type Primitive Value  java clips


Bellow code doesn't work too:

clips.run();


String evaluar = "find-all-facts ((?v mydiagnosis)) TRUE";

PrimitiveValue value = clips.eval(evaluar);


String diagn=((FactAddressValue) value.getValue()).getFactSlot("diagn").toString();  // There is no possible to set value.get(0)


JOptionPane.showMessageDialog(rootPane, "My diagnosis "+diagn);


clips.reset(); 


Can you help with my problem?

Reply all
Reply to author
Forward
0 new messages