Search code examples
javaeclipseclasspatheclipse-classpath

classpath and Eclipse


I would like to export the classpath configuration of my java application from eclipse.

  • how Can I set the classpath manually?
  • how can I package it keeping the configuration the same.

The application is a standard java application.


Solution

  • You may not be able to get a single classpath string from your eclipse project that you can use to set the classpath on command line. But you can build your classpath using the information present in .classpath file. It basically will tell you all the required libs that are required in classpath. You may have to switch the view to navigator to see the .classpath file. You can do this by going to menu

    Window->Show View -> Navigator

    You will see few entries in that file. You may find all the required jars under the kind "lib". Then you may use all those jars to build the classpath