简体   繁体   中英

How to set classpath in eclipse for Jars (in multiple sub-folders)

We have a folder which consists of multiple sub-folder and each sub-folder is having jar files.

Now, we need to add all the jars to eclipse classpath. Is there any better way to add all these jars? rather than adding each file or manually editing .classpath of eclipse?

I think you can only do it manually.

But: you could do a "find" on the command line, and with same sed/awk magic, you might be able to automatically create the entries for your .classpath file.

Alternatively: you should rather look into a build system such as maven or gradle. Such systems allow you to specify dependencies - and the build system will then create an eclipse project for you.

In other words: building up that "meta" information for your projects manually is a thing of the past. Nowadays you only specify what you want to be used, and you use tools that do the rest for you.

you can select all the jar files and then by right clicking them you have to click on build path. eclipse will automatically add all the jar files in classpath...

hope this will help you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM