Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

increase heap

Posted on 2009-05-09
8
Medium Priority
?
1,029 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

722 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