Reputation: 53
I already installed java in pc, and I am using eclipse for coding.
My question is that, is it necessary to set the java path. because eclipse detect java automatically.
I think for eclipse there is no need to set java path. we can work directly.
Can anyone tell me proper answer for this.
Is it necessary or not to set the java path?
Upvotes: 1
Views: 140
Reputation: 775
Not necessary if want use java only through ides like eclipse,Neatbeans...but if u want to run program through command line..you have to set path...
Upvotes: 0
Reputation: 13844
not necessary if you just want to run and compile in eclipse. However if you want to run and compile in command prompt then its necessary to set path
Upvotes: 0
Reputation: 1268
You dont need to set the Java Path but you need to set MVN_REPO in eclipse build path if you are using maven
Upvotes: 0
Reputation: 1727
Well, it's strongly advisable to set JAVA_HOME.
If Eclipse finds your JDK - it's ok. But if you're using some other Java technologies (like MAVEN, ANT, JBoss, Tomcat etc.) - they require JAVA_HOME to be set.
So, I strongly advice you to do that :)
P.S. And also to add JDK's bin directory to your PATH - in order to use java or javac command from the command line.
Upvotes: 1
Reputation: 741
If you use some IDEs for writing code and compile it, NO. They automatically(or manually) detects where the jdk is installed.
But if you want to compile the application from command line(eq: javac, maven, ant) then you need to set the env path.
Upvotes: 2
Reputation: 2973
It's not necessary to set the java path. Eclipse already covers that for you.
Upvotes: 0