Alternatively, you can right-click on a file of Jess code and choose
"Run...", then create a "Jess Application" launch configuration, and
type "nrc.fuzzy.jess.FuzzyMain" as the "Main class"; the Jess code
will be run with FuzzyMain.
I haven't tried this in a while, so I'm not 100% positive that this
works right now, but last time I checked, the debugger worked this way
too -- i.e., you could debug Jess code that used the fuzzy extensions
by using FuzzyMain as the main class when debugging under a "Jess
Application" configuration.
On Jul 16, 2008, at 3:11 PM, Orchard, Bob wrote:
I was assuming that you might be running from a command line prompt.
However, if you are able to run the Jess
Console from Eclipse, then it should be simple to run the FuzzyJess
Console. In the properties for your project you seem
to to have already added the required jar files to the Build Path
Libraries ... something like I have below ...
<Outlook.jpg>
You likely had the jess.jar file added to the libraries already and
then added the fuzzyj110a.jar file to your list of libraries.
Also to start your project (using the JessConsole I assume?) you had
to specify the appropriate location of the JessConsole
class with its 'main' method. So you just need to change that Main
Class to be the one with the FuzzyJessConsole.
since the FuzzyJessConsole class already exists I would set it as
follows ...
<Outlook.jpg>
Does this make sense?
Bob Orchard
National Research Council Canada Conseil national de recherches
Canada
Institute for Information Technology Institut de technologie de
l'information
1200 Montreal Road, Building M-50 M50, 1200 chemin Montréal
Ottawa, ON, Canada K1A 0R6 Ottawa (Ontario) Canada K1A 0R6
(613) 993-8557
(613) 952-0215 Fax / télécopieur
[EMAIL PROTECTED]
Government of Canada | Gouvernement du Canada
From: [EMAIL PROTECTED] [mailto:owner-jess-
[EMAIL PROTECTED] On Behalf Of seyed hossein
Sent: Wednesday, July 16, 2008 1:28 PM
To: jess-users@sandia.gov
Subject: Re: JESS: Installing Fuzzy on Jess
Thanks alot for the response Mr. Orchard, and sorry that if I'm
bugging you and other jess users with my basic questions. Just
learning programming with Eclipse in 2nd year university and doing
research on Fuzzy and Jess. To run a given FuzzyJess example in
Eclipse, I simply added the FuzzyMain.java and FuzzyConsole.java
java-classes to my existing FuzzyJessExample Project (with the
fuzzyJess .jar files in its library). But, to start the
FuzzyConsole, since I didn't know were to execute:
java -classpath "%classpath%";f:\fuzzyjtoolkit\fuzzyj110a.jar;.\
nrc.fuzzy.jess.FuzzyConsole
I got stuck and for a few days I can't figure it out where I should
type & execute this command on Eclipse.
I'd apperciate any responds/hints from anyone.
Thanks,
Seyed
On 7/12/08, Orchard, Bob <[EMAIL PROTECTED]> wrote:
That error usually means that you are not using the FuzzyJess Main
class and are still using the Jess Main
class.
From the manual ...
How to use the Fuzzy Extensions with Jess
To use the extension with Jess is really quite simple. You need to
have access to the FuzzyJ Toolkit and FuzzyJess packages (nrc.fuzzy
and nrc.fuzzy.jess). These will have been obtained with the
appropriate licence requirements being met. Normally these will be
in a Java jar file for easy inclusion in the classpath variable. The
only other thing that is required is that instead of using the Rete
object in programs, you must use the FuzzyRete object. For
convenience the classes nrc.fuzzy.jess.FuzzyConsole and
nrc.fuzzy.jess.FuzzyMain have been provided and they can simply
replace any use of jess.Console or jess.Main.
Consider the code for FuzzyMain:
public class FuzzyMain extends Main
{
public static void main(String[] argv)
{
FuzzyMain m = new FuzzyMain();
m.initialize(argv, new FuzzyRete());
m.execute(true);
}
}
and the code for FuzzyConsole:
public class FuzzyConsole extends Console
{
public FuzzyConsole(String name)
{
super(name, new FuzzyRete());
}
public static void main(String[] argv)
{
new FuzzyConsole("Fuzzy Jess Console").execute(argv);
}
}
To start the FuzzyConsole one might execute a command line similar
to the one to start the standard Jess Console:
java -classpath "%classpath%";f:\fuzzyjtoolkit\fuzzyj15a.jar;.\
nrc.fuzzy.jess.FuzzyConsole
with appropriate entries in the -classpath option to allow all
necessary classes to be located. If you have been able to use
standard Jess then you will no doubt have little trouble using
FuzzyJess.
Bob Orchard
National Research Council Canada Conseil national de recherches
Canada
Institute for Information Technology Institut de technologie de
l'information
1200 Montreal Road, Building M-50 M50, 1200 chemin Montréal
Ottawa, ON, Canada K1A 0R6 Ottawa (Ontario) Canada K1A 0R6
(613) 993-8557
(613) 952-0215 Fax / télécopieur
[EMAIL PROTECTED]
Government of Canada | Gouvernement du Canada
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:owner-jess-
[EMAIL PROTECTED] On Behalf Of seyed hossein
Sent: Monday, July 07, 2008 12:52 PM
To: jess-users@sandia.gov
Subject: Re: JESS: Installing Fuzzy on Jess
Sorry for the delay in answering but I'm away on vacation (for
another week or so) .. but
the details are in the FuzzyJ User Guide ... see the chapter on
FuzzyJess and the section
How to use the Fuzzy Extensions with Jess
This is a Java problem but you must use the FuzzyJess Console of the
FuzzyJess Main class
as described in the section mentioned above ..
Bob.
In eclipse you can right click your project, and go to the
"properties"
option. In this list there is a "Java Build Path" section. Click the
libraries tab and add your jar file there. The classpath is just
the path
that the ...
Thanks for the replies,
I thought the materials in the "FuzzyJess-How to use the Fuzzy
Extensions with Jess" section were covered by simply following Mr.
Wyrick's comments on the addition of the fuzzyJ110a.jar file in
Eclipse project properties>Java Build Path>Libraries.
Doing so, the fuzzyJess example mentioned in that section seems
error free in Eclipse, however it still gives a warning of
"Undefined function at token 'fuzzy-match' ".
Is this a common error on Jess or is there something wrong with my
program?
Thanks,
Seyed
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------