1

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?

3
  • Whats seems to be the actual problem? Is your project building or not? Are you, perhaps, confusing java path and classpath? Commented Sep 20, 2013 at 5:31
  • 1
    Depends, if all java apps you are using are "detecting", you are ok not setting it; if you need command-line support (i.e. directly type java ... or javac ...), you will need to do some PATH setup Commented Sep 20, 2013 at 5:31
  • Nothing just want to know. whether I am on right pat or not. everything working fine. Commented Sep 20, 2013 at 6:28

6 Answers 6

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

It's not necessary to set the java path. Eclipse already covers that for you.

Comments

0

You dont need to set the Java Path but you need to set MVN_REPO in eclipse build path if you are using maven

Comments

0

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

Comments

0

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...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.