简体   繁体   中英

Error: Unable to access jarfile C:\Projects

In Eclipse, I made a jar out of a project P2 which was dependent on P1. This jar is stored in the C:\\Projects folder. I get the error when I try to run it using Eclipse> Run > external tools. Please tell me how i can fix it and how these things work so that i can understand why the problem occurred.

My guess is that I made a mistake while setting the options to run this Jar using external tools > external tools configurations.

My system - windows 7, 64-bit.

You have to add the jar to your build path.

Right click the project -> Build Path -> Configure Build Path... -> Libraries -> Add External JARs...

However I haven't use run-> external tools yet and so it may not solve your problem. The above solution should allow to get your project running with "Run As".

i guess you are trying to run a jar using eclipse, and your jar needs that dependent jar P1 to run. Change your project P2 manifest file to include jar P1 as its dependency. It should work. Hope it helps.

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