Javatpoint Logo

what is a setting class path? give an example?

By: jayasa*** On: Tue Nov 08 16:12:14 IST 2016     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
give me answer anybody
Up0Down

 
you just have to set your java installed path in classpathImage Created0Down

By: [email protected] On: Tue Nov 08 16:59:39 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
give a brief explanation
Image Created0Down

By: [email protected] On: Tue Nov 08 17:33:37 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
In cmd prompt you can go to your current project folder or mention set classpath="the jdk installation path "(like C:\Program Files\Java\jdk1.8.0_111\bin)

or
you can add this in your environment variable as JAVA_HOME
Image Created0Down

By: [email protected] On: Thu Nov 10 14:45:00 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
You can set the ClassPath in JAVA using two ways
1. Temporary
2. Permanent
1) Temparary class path
Start-->CommandPrompt(CMD)
set path="C:\Program Files\Java\jdk1.7.0_79\bin"
----->It will expire when command prompt is closed
2) Permanent class path
From the desktop--> right click the Computer icon.-->Choose Properties from the context menu.
Click the Advanced system settings-->Advanced-->Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New.
In the Edit System Variable (or New System Variable) window,

Variable name:CLASSPATH
Variable value:C:\Program Files\Java\jdk1.7.0_79\bin

CLICK OK
Type JAVAC on your command prompt
restart your System
Image Created0Down

By: [email protected] On: Thu Nov 10 21:11:13 IST 2016 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No