I think Yingying Chen wrote:
> Dear ejfried,

Yes, yychen?

> 
> So it seems impossible to use batch command having prompt for input
> in java application? 


Well, no sir, not impossible at all. You just have to wrap your head
around the fact that as long as the Jess program you've invoked by
calling "batch" is still running, then "batch" hasn't returned, and
thus in your code, the Java executeCommand() method hasn't yet
returned, and therefore any code after that hasn't been executed
yet.

When you need to invoke a Jess program that potentially will run for
an undetermined time, just as for any other long-running, independent
process, invoked in an applet or in any other piece of Java software,
you should do so in a Thread dedicated to that purpose. Look at how,
as just one example, any of the hundreds of thousands of "Animator"
applets are implemented. Hint: it's not by using an infinite loop in
the "init" method!


> Now I am reading the book "JESS in Action", but I don't find any
> applet example with Jess embedded.

That's because applets are pretty much dead. I can't imagine why
anybody would implement an applet with Jess embedded in it when they
could put Jess on the server and use Servlets instead. 

Note though, that the problem you're having doesn't have anything to
do with applets; the same thing would happen in any other code that
made the same mistake.

> Is that possible that you can give me the source code for Jess
> Applet Demo at http://herzberg.ca.sandia.gov/jess/demo.shtml ?  We
> need to use JESS in our project for E-commerce course and we are
> considering using applet.

Yep. Write to Craig Smith, [EMAIL PROTECTED], and get a free academic
Jess license. You'll then get the source to the applet.



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to