Setting path and classpath in Java जावा में पथ एवं क्लास पथ सेट करना
जावा डेवलपमेंट किट (JDK) इंस्टॉल करने के बाद, आपको सिस्टम में पाथ और क्लासपाथ सेट करना आवश्यक होता है ताकि जावा प्रोग्राम किसी भी फोल्डर से रन हो सकें।
🔹 What is PATH in Java? | जावा में पाथ क्या होता है?
The PATH
is the address of the bin
folder of the JDK. It allows you to run Java tools like javac
and java
from the command prompt.
PATH
JDK के bin
फोल्डर का पता होता है। इसके माध्यम से आप कमांड प्रॉम्प्ट से javac
और java
जैसे टूल्स चला सकते हैं।
Example:
set PATH=C:\Program Files\Java\JDK1.6.20\bin;
ऊपर दिए गए उदाहरण में JDK के bin फोल्डर का पता पाथ के रूप में सेट किया गया है।
🔹 What is CLASSPATH in Java? | जावा में क्लासपाथ क्या होता है?
The CLASSPATH
is used to tell Java where to find user-defined classes and packages. It defines the location of required Java libraries.
CLASSPATH
जावा को यह बताने के लिए उपयोग होता है कि आवश्यक क्लास और पैकेज कहां स्थित हैं। यह जावा लाइब्रेरी की लोकेशन को दर्शाता है।
⚙️ How to Set CLASSPATH in Windows | विंडोज़ में क्लासपाथ कैसे सेट करें?
You can set the classpath from Control Panel in Windows by following these steps:
Control Panel से क्लासपाथ सेट करने के लिए निम्नलिखित स्टेप्स अपनाएँ:
1️⃣ Click on Start (प्रारंभ करें)
2️⃣ Open Control Panel (कंट्रोल पैनल)
3️⃣ Choose System and Security (सिस्टम और सुरक्षा चुनें)
4️⃣ Select Advanced System Settings (उन्नत सिस्टम सेटिंग्स चुनें)
5️⃣ Click Environment Variables (पर्यावरण चर पर क्लिक करें)
6️⃣ Under System Variables, click New (नवीन पर क्लिक करें)
7️⃣ Set the Variable Name as: CLASSPATH
Set the Variable Value as:
C:\Program Files\Java\JDK1.6.20\jre
उदाहरण:
वेरिएबल नाम (Variable Name): CLASSPATH
वेरिएबल मान (Variable Value): C:\Program Files\Java\JDK1.6.20\jre
8️⃣ Click OK to save. (ठीक चुनें और सेव करें)
Comments
Post a Comment