That worked! And thanks for the debugging tip--I agree with your
philosophy of giving programmers less "edited" error messages whenever
possible.
On Fri, 20 Apr 2001, friedman_hill ernest j wrote:
> I think david erle shontz wrote:
> > Thanks to several folks I've successfully compiled JConsult. It's a very
> > interesting package, made to accept any script modified to fit its input
> > style. But I haven't been able to get it to execute on my own system
> > yet. When I enter the command to execute the example script:
> >
> > java expert.Consultation file:/C:/Jess60a5/ RuleBase/zoo.clp
> >
> > I get the error message "Cannot open selected rulebase!". I've dug
> > through the source code and found the class containing the error message,
> > but haven't been able to discern what's causing the problem. I have
> > installed Jess60a5 and JConsult at the C: level as above--everything seems
> > to be in
> > place.
>
> I tried this out, and I got the same exception as you. Java
> programmers, listen up: don't code like this! Here's the error message
> in the JConsult source:
>
> try {
> ruleBase = new InputStreamReader (_ruleBaseURL.openStream());
> } catch (Throwable exception) {
> throw new RuleBaseXcp ("Cannot open the selected rule base!");
> }
>
> Note that the Java code -knows- why it can't open the rule base, but
> it doesn't tell you! For debugging, I added a
> "System.out.println(exception)" right before the throw, and, on my
> system, I see this:
>
> % java expert.Consultation file:/home/ejfried/JConsult RuleBase/zoo.clp
> java.io.FileNotFoundException: /home/ejfried/RuleBase/zoo.clp (No
> such file or directory)
> %
>
> So it turns out that JConsult is looking for the RuleBase subdirectory
> as a sibling of the first argument, not as a subdirectory of it and
> -not- relative to the current directory. This means the documentation
> is wrong; maybe JVMs behave differently now in some respect compared
> to when JConsult was last updated, or maybe this is an
> applet/command-line difference. In any case, if I change the arguments to
> read like this:
>
> % java expert.Consultation file:/home/ejfried/JConsult/expert
RuleBase/zoo.\clp
>
> then it works perfectly for me.
>
> Regarding what you say below: JConsult looks as if it will fit the
> bill nicely.
>
>
>
>
> >
> > Our objective was to find a simple deffunction that would display a prompt
> > and some radio buttons, allowing the user to select one. The selected
> > text would be sent back to the function for binding to a variable. There
> > are a couple of interesting examples on the JESS related sites page
> > (including JConsult), but they tend to go deeper than we need (or, given
> > our limited experience with the Java 1.1 AWT model, could follow). If
> > anyone has a simple radio button layout they'd be willing to share, we'd
> > sure appreciate it.
> >
> > Thank you,
> >
> > David Shontz
> >
> >
> > ---------------------------------------------------------------------
> > 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]
> > ---------------------------------------------------------------------
> >
>
>
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Distributed Systems Research Phone: (925) 294-2154
> Sandia National Labs FAX: (925) 294-2234
> Org. 8920, MS 9012 [EMAIL PROTECTED]
> PO Box 969 http://herzberg.ca.sandia.gov
> Livermore, CA 94550
>
---------------------------------------------------------------------
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]
---------------------------------------------------------------------