We help IT Professionals succeed at work.
Get Started

Difference between specifying classpath with -cp in command line and in Eclipse-> Run Configurations

Rohit Bajaj
Rohit Bajaj asked
Last Modified: 2014-05-23
I ran a program by giving the following command, the program ran successfully :
java -cp "lib/*;classes" com.yatra.scheduler.runner.MOScheduleSuperPnr

I tried running the same thing from Eclipse. By selecting Run Configurations -> Classpath and then adding all the jars inside lib directory under the User Entries Heading and also the classes folder.

But this gives a runtime error Classdefnotfound.

What could be the reason for this ?
Whats the difference between specifying the classpath in command line using the -cp option and specifying classpath in Eclipse -> Run Configurations->Classpath

Watch Question
IT Business Systems Analyst / Software Developer
Top Expert 2015
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE