Forums Register Login

Java Error occurred during initialization of VM

+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
How much memory have you got in your machine?
+Pie Number of slices to send: Send
Hi
I have 1 Gb of RAM
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
Did you just should on me? You should read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 19821 times.
Similar Threads
anyone - please - what's wrong with my path or classpath
Could not reserve enough space for object heap
Eclipse, NoClassDefFoundError: java/lang/Object
VM can't recognize classpath when used with -Xrun
Problem Uninstalling jdk-6u14-i586
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:52:52.