Tuesday, August 7, 2012
This post is for all who has just started learning java or planning to do so. If you are from a C/C++ background then you will see that you didn't have to do all these things. You only had to install TurboC. But in Java it is necessary to set the path as without it you cannot compile or run a java program from command prompt if your source file resides in a different location as that of the compiler. At that situation windows won't be able to recognize javac as a command. Many of you will think that they can compile or run from an IDE like Eclipse,NetBeans,JCreator or BlueJ. But you will understand later that many things can't be done from here which can be done from your command prompt. Follow these steps carefully :
1 : Download and install the latest version of jdk(i.e. jdk7) in order to keep yourself always updated.
2 : Go to the location where you have installed jdk and look for bin folder. the path may look like this C:\Program Files\Java\jdk1.7.0\bin. Just copy this path from the location bar.
3 : Now right click on My Computer and select Properties. It will open the system window.
4 : Now select Advanced System Settings from the window as shown
5 : Now select Environment variables
6 : Now look for Path under System Variable. Either double click it or select edit after choosing it.
7 : Now go the beginning and paste the path that you have copied earlier and then give a semi-colon.
WARNING : Do not change any other things and don't forget to give the semi-colon as either of this will cause system problems.
8 : Now press OK and give Administrator permission while doing it. You will have to press OK for two times to close the other dialogs that were already open. That's it. You have successfully set the path and compile from anywhere with javac command. If still windows can't recognize the javac command then you have done some mistake in the procedure. Plz check it.
1 : Download and install the latest version of jdk(i.e. jdk7) in order to keep yourself always updated.
2 : Go to the location where you have installed jdk and look for bin folder. the path may look like this C:\Program Files\Java\jdk1.7.0\bin. Just copy this path from the location bar.
3 : Now right click on My Computer and select Properties. It will open the system window.
4 : Now select Advanced System Settings from the window as shown
5 : Now select Environment variables
6 : Now look for Path under System Variable. Either double click it or select edit after choosing it.
7 : Now go the beginning and paste the path that you have copied earlier and then give a semi-colon.
WARNING : Do not change any other things and don't forget to give the semi-colon as either of this will cause system problems.
8 : Now press OK and give Administrator permission while doing it. You will have to press OK for two times to close the other dialogs that were already open. That's it. You have successfully set the path and compile from anywhere with javac command. If still windows can't recognize the javac command then you have done some mistake in the procedure. Plz check it.
Labels:Java FAQs
Subscribe to:
Post Comments
(Atom)
Total Pageviews
Followers
Labels
- Algorithms (7)
- Annotation (3)
- Files (6)
- Generics (3)
- Graphics2D (5)
- Graphics2D-Images (7)
- Inheritance (2)
- J2EE (9)
- Java 8 (4)
- Java FAQs (19)
- JDBC (3)
- Networking (2)
- Packages (1)
- Reflection (4)
- Security (7)
- Sorting (2)
- Swing (3)
- Threads (3)
- Utils (3)
Popular Posts
-
Today I will show you how you can implement Bankers algorithm in Java. The Banker's algorithm is a resource allocation and deadlock a...
-
------------------------- UPDATE ------------------------- I have updated the code on request of some followers so that they can directly...
-
Today I am going to show how to convert a postfix expression to an infix expression using stack in Java. In an earlier post here we ...
-
Today in this article I will tell you how to convert an infix expression to postfix expression using stack. This is an important applicat...
-
--------------------UPDATE------------------- I have updated my post so that now it can detect IE 11. This modification was necessary as t...
-
Today I am going to show you how you can generate and validate captcha. A CAPTCHA (an acronym for "Completely Automated Public Turin...
-
Today I am going to post a program that will be able to produce all the mColorings of a given graph G. What is mColoring : The problem st...
-
Today in this article I will show you how to create or develop a Tower of Hanoi game in Java. The Tower of Hanoi is a famous problem tha...
Links
Blog Archive
-
▼
2012
(
25
)
-
▼
August
(
8
)
- Differences between AWT and Swing
- How to set Java compiler's path in Windows7
- What is the difference between import and #include...
- What is a JIT compiler in Java ?
- Why cant you declare a class private ?
- Java program to create Bubbles using Graphics2D
- Rotate Text in Java using Graphics2D transform
- Java program to draw partially transparent image
-
▼
August
(
8
)
0 comments:
Post a Comment