Have you tried printing the value of the string being passed to
executeCommand to see that it has what you expect it to be:
e.g. System.out.println("(load-project " + Protegepath + ")");
Perhaps it will not be the same as the string:
"(load-project C:/dev/Protege-2000/projects/OrgOnt.pprj)"
The forward and backward backslashes often create problems
in file specifications.
Bob
-----Original Message-----
From: Karen Fox [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 3:03 PM
To: [EMAIL PROTECTED]
Subject: JESS: Passing a Java Variable in a Jess Call
I am trying to change some of my paths to files into Java variables so
that we only have to change them in one place if necessary. However,
when I try to pass the variable in a rete.executeCommand, it won't work.
Is that because I can't mix Jess and Java?
For instance, this works:
r.executeCommand("(load-project
C:/dev/Protege-2000/projects/OrgOnt.pprj)");
I want to swap out the second part of that (the classpath) to a Java
variable but nothing I've tried has worked. Is this impossible or am I
just approaching it incorrectly?
I've tried isolating the variable:
r.executeCommand("(load-project " + Protegepath + ")");
and storing the information in a jess variable, then using it:
r.executeCommand("(load-project ?Protegepath)");
and many variations of other things. Thus far, the only thing that
works is to have the path in there. I would appreciate any suggestions,
even if it's just to tell me this cannot be done. Thank you all for
your time and talent.
--
Karen Fox
Technical Project Support III
The MITRE Corporation
Colorado Springs, CO
719-572-8368
[EMAIL PROTECTED]
--------------------------------------------------------------------
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]
--------------------------------------------------------------------
--------------------------------------------------------------------
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]
--------------------------------------------------------------------