Steps to Set Class path Settings for Java (In Windows)
(Setting required environment variables)
Information: We can create two types of environment variables for our system.
1. User Variables: Its scope is for current logged in user only. For other user it will not visible
2. System Variables: Its scope is for current system (OS) only. It will be visible across all the users of current OS.
Go to your computer properties
Accessing System Environment variables from following screen.
Creating JAVA_HOME variable as follows
Variable Name: JAVA_HOME
Variable Value: The path where your java installed means JDK home directory
The following screen shows you creating JAVA_HOME
Edit system path variable and specify the java path
In the existed system path variable add java path value (%JAVA_HOME%/bin)
In the System variables block you can see path variable, select path variable and click on edit button.
Add java path as follows
Once click on edit in variable value you can see existed path variable.
You can add ;%JAVA_HOME%/bin; to existed path value. Here each value is separated by semicolon.
This specify the java path which will used by java applications and servers.
The following diagram shows edit the system path variable
Note
To set heap memory size for JVM, you need to JAVA_OPTS system variable and add the following value
Variable name: JAVA_OPTS
Variable value: -server -Xmx1028m -XX:MaxPermSize=320m -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dsun.lang.ClassLoader.allowArraySyntax=true;
(Based on your requirement you can set memory size)
(Based on your requirement you can set memory size)






No comments:
Post a Comment