Once you have installed the JDK (see System Requirements), you need to set the JAVA_HOME environment variable.
To set the JAVA_HOME environment variable on Windows
- Right click on the 'My Computer' icon on your desktop and select 'Properties'.
- Click the 'Advanced' tab.
- Click the 'Environment Variables' button.
- Click 'New'.
- In the 'Variable name' field, enter 'JAVA_HOME'.
- In the 'Variable value' field, enter the directory (including its full path) where you installed the JDK.
- Restart the computer.
To set the JAVA_HOME environment variable on Linux or UNIX based systems
There are many ways you can do it on Linux or UNIX based systems (including Mac OS X). Here are two:
For your current user,
- Open up a shell / terminal window
vi ~/.profile(replace vi with your favourite text editor)- Add
export JAVA_HOME=/path/to/java/home/diron its own line at the end of the file - Add
export PATH=$JAVA_HOME/bin:$PATHon its own line immediately after - Save, and restart your shell
- Running
java -versionshould give you the desired results
For all users in the system,
- Open up a shell / terminal window
vi /etc/profile(replace vi with your favourite text editor)- Add
export JAVA_HOME=/path/to/java/home/diron its own line at the end of the file - Add
export PATH=$JAVA_HOME/bin:$PATHon its own line immediately after - Save, and restart your shell
- Running
java -versionshould give you the desired results
If you are using a GUI, you may not need to open up the shell. Instead, you might be able to open the file directly in a graphical text editor.
If you are experiencing memory errors in FishEye, see Fix Out of Memory errors by increasing available memory.







2 Comments
Hide/Show CommentsJun 11, 2010
Anonymous
Just a small clarification needed, I am installing Java on Windows 2003 Server. And when adding the environment variable, I can either add new USER or SYSTEM variable. I went for a new system variable, hope that was correct. Adding this piece of info (to this otherwise very clear instruction) would make it even clearer...
Jul 31, 2011
Anonymous
Just to help everyone fixing out the following memory problem, allthough the server got enough memory:
java.lang.OutOfMemoryError: unable to create new native thread
If you're running fisheye in a OpenVZ Container, you have to ensure, that you've started you container with
enough processes.
Read that: http://sadsoftware.blogspot.com/2008/07/liferay-alfresco-on-openvz.html
You can check the number of processes by typing
# cat /proc/user_beancounters | grep numproc
uid resource held maxheld barrier limit failcnt
numproc 93 93 128 128 182
So if limit is less like that entry, then set the config for your container as followed:
# vzctl set 101 --save --numproc 1000:1000
and (probably) restart
Add Comment