hi.
i'm bilgehan from TURKEY.
i had the similar heap space problem.but i solved it command that shown below.
c:\> java -Xms512m -Xmx1024m [class name]
-Xms[minimum heap size that we want]m -Xmx[max. heap size that we want]m
but this heap sizes can change according to your RAM capacitiy...
Matthew Hutchinson <[EMAIL PROTECTED]>Adresinden Yvnlendiriliyor :
> G'day all,
>
> I'm happy to say my code is working fine, but my question is about Jess,
> Java and memory. I plan to use shadow facts in conjunction with a DB in
> order to store large numbers of facts - but only get 'em when I need 'em.
> Anyway, in the mean time, I was just going to assert a whole bunch of facts
> (say, 66927) into Jess so I could work with them directly - and do the
> database stuff later. But when trying to do this, I get the following
> error:
>
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
>
> I know my code works fine, as I tested it with only asserting 200 facts. Is
> this just simply because Jess ran out memory? A great reason why to use the
> database/shadow fact technique mentioned previously?
>
> My code, if it's relevant:
> -----------------------------------------
>
> public void writeJessFacts(String jf)
> {
> String factsFilename = jf;
>
> try
> {
> engine.executeCommand("(deftemplate street_name_alias \"fact
> template\" (slot actual_name) (slot actual_type) (slot dli_id) (slot
> soundex) (multislot alias) (slot lga) (slot locality) )");
> int count = 0;
> for (count = 0; count < street_name_array.size(); count++)
> //for (count = 0; count < 200; count++)
> {
> engine.executeCommand("(assert (street_name_alias
> (actual_name \""+street_name_array.get(count).toString()+"\") " +
>
> "(actual_type \""+street_type_array.get(count).toString()+"\") " +
> "(dli_id
> "+street_name_ID_array.get(count).toString()+" ) " +
> "(lga
> \""+lga_name_array.get(count).toString()+"\") " +
> "(locality
> \""+locality_name_array.get(count).toString()+"\") " +
> "(soundex
> \""+soundex_code.get(count).toString()+"\") ) )");
> }
> System.out.println("A total of " + count + " facts asserted");
> engine.executeCommand("(save-facts "+factsFilename+"
> street_name_alias)");
> System.out.println(count + " facts written to file (Jess
> format)");
> }
>
> catch (JessException e)
> {
> System.out.println("error with knowledge base: " + e);
> }
> }
>
> -----------------------------------------
>
> A sample fact as written to file:
>
> (MAIN::street_name_alias (actual_name "ANNA PLAINS") (actual_type "RD")
> (dli_id 100060001) (soundex "A514") (alias ) (lga "BROOME") (locality
> "EIGHTY MILE BEACH"))
>
>
>
> Thanks all,
> Matt
>
>
>
>
> --
> Matthew Hutchinson
> Ph.D. Candidate
> Department of Spatial Sciences
> Curtin University of Technology
> GPO Box U1987
> Perth, Western Australia 6845
>
> Visiting Scholar
> Department of Geography and Planning
> University of Akron
> Akron, Ohio USA
>
------------------------------------------------------------
Turmail.com Ucretsiz Eposta Servisi : http://www.turmail.com
Gelismis Spam ve Virus Filtreleme Servisleri
100 Megabyte E-posta kotasi
--------------------------------------------------------------------
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]
--------------------------------------------------------------------