Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Error occurred during initialization of VM

 
Natalia Lopez
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I'm trying to install tomcat5 on fedora

I did

yum install tomcat5
/etc/init.d/tomcat5 start

but when I go to http://myip:8080

The tomcat is not running
I can see on the logs:...

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

How can I fix it?
Thanks a lot!
 
arulk pillai
Author
Ranch Hand
Posts: 3380
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How much memory have you got in your machine?
 
Natalia Lopez
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have 1 Gb of RAM
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well...seems like you have an improper installation of Java.

1. Remove Java installation from your machine, install it afresh and try again.

2. Write a simple hello world program and try compiling it. So that you will get more meaningful error message. It is a possibility that some variable is not properly set or something like that. Trace it down and remove.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you run a Java program, you can use the -Xmx switch on the command line to specify how much memory Java can allocate at most. For example, to let Java use up to 256 MB memory, run it like this:

java -Xmx256m com.mypackage.MyProgram

For Tomcat, have a look at the script that you use to start up Tomcat. I don't know exactly what it's called, probably tomcat.bat or catalina.bat in the bin directory of your Tomcat installation directory. You could add the -Xmx setting to the line in that script that starts Tomcat.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic