Link to home
Start Free TrialLog in
Avatar of onyourmark
onyourmark

asked on

increase heap

I am trying to run a Java base program called WEKA. I am running Vista 64 bit.

I installed the program and it ran but then I got an insufficient memory message.
"Not enough memory. Please load a smaller dataset or use larger heap size"
I saw a post on the net at http://www.errorbase.net/Not_enough_memory._Please_load_a_smaller_dataset_or_use_larger_heap_size.

That suggests
this command.
C:\Matlab\weka-3-5-7>java -Xmx256m -jar weka.jar

I changed it to:

C:\Program Files (x86)\Weka-3-6>java -Xmx256m -jar weka.jar
I tried running this at the dos command but it says "java is not recognized as an internal or external command"
But I know that java was installed because the program (WEKA) was running.
How can I adjust the memory?
Avatar of hazgoduk
hazgoduk
Flag of United Kingdom of Great Britain and Northern Ireland image

I always do java -jar -Xmx256m weka.jar

If you just type java into the console it should give you the help text.
If it says unrecognised you need to add java to your PATH environment variable
Avatar of onyourmark
onyourmark

ASKER

Hi, can you tell me how to add it to the PATH environment variable and what I should add?
Thanks!
Right click my computer
Click properties
Advanced system settings
Environment variables

There are user and system variables, you want system.
Scroll down in the system variables box until you find Path
Click it so the Path row is highlighted
Click edit
Add the path to your jre/bin folder at the end and don't forget to put a ; after the current last path to split them.

I had to add ;C:\Program Files\Java\jdk1.6.0_13\jre\bin to mine but yours will probably be ;C:\Program Files\Java\JRE6\bin or something
Hi Thanks. I added C:\Program Files\Java\JRE6\bin  to the PATH.

Then  I went to the dos command and typed -jar -Xmx512m weka.jar

I got "Unable to access jarfile weka.jar"

What doe this mean?
weka.jar would have to be in the folder that you're in on the command line...

I suggest putting weka.jar into C:\
cmd
cd \
java -jar -Xmx512m weka.jar
Hi I think it worked. Is there some way to verify that it has actually increased?

THANKS!
ASKER CERTIFIED SOLUTION
Avatar of hazgoduk
hazgoduk
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for great help.