Solved

increase heap

Posted on 2009-05-09
8
1,020 Views
Last Modified: 2013-11-23
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?
0
Comment
Question by:onyourmark
  • 4
  • 4
8 Comments
 
LVL 3

Expert Comment

by:hazgoduk
ID: 24343224
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
0
 

Author Comment

by:onyourmark
ID: 24343274
Hi, can you tell me how to add it to the PATH environment variable and what I should add?
Thanks!
0
 
LVL 3

Expert Comment

by:hazgoduk
ID: 24343308
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
0
 

Author Comment

by:onyourmark
ID: 24343369
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?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Expert Comment

by:hazgoduk
ID: 24343422
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
0
 

Author Comment

by:onyourmark
ID: 24344035
Hi I think it worked. Is there some way to verify that it has actually increased?

THANKS!
0
 
LVL 3

Accepted Solution

by:
hazgoduk earned 500 total points
ID: 24344582
Well if it doesn't crash still because of that error it's increased. Not sure if there is a way to actually confirm how much ram the java process is using. It definitely does work though. I have a huge program that won't load without it but runs perfectly with it in. Put it in a batch file as well then you can just double click that instead of going through the command line every time. Just type the command into a file called weka.bat

Maybe if you open task manager and go to processes the java process will have 256 in the momory column
0
 

Author Closing Comment

by:onyourmark
ID: 31579747
Thanks for great help.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now