Eclipse gives the error "... is not a valid place for related resources."

When I try to add a new Classpath variable in Eclipse for my build path configuration, and the path I add is a directory in which the current workspace is a subdirectory, Eclipse gives an error:

'C:\JavaStuff' is not a valid location for linked resources.

Why does Eclipse impose this restriction? I can’t think of a good reason for this ... I might want to put my JARs in C:\JavaStuff\libsand have my workspace in C:\JavaStuff\workspace, and then reference the libs (on my machine) through JAVASTUFF_DIR\libswhere JAVASTUFF_DIR C:\JavaStuff. This limitation prevents me from doing this.

+3
source share
1 answer

, , , - Classpath... , Java, , Java Build Path " ". , , .

, Eclipse , JAR , " ", , , OK, " Java", (.. MY_BASE_DIR MY_BASE_DIR/libs/library.jar. .

+1

Source: https://habr.com/ru/post/1755707/


All Articles