Java Eclipse - How do I change the classpath?

六月ゝ 毕业季﹏ 提交于 2019-12-08 19:51:29
M Ghanem

First make sure that the .jar file is exist in the given path,if so then you can easily try making a new project and copy your material to it, and configure it to the .jar path.

If this doesn't work you may need to remove the temporary files from your project and eclipse on your laptop.

Also, please give more description about what happens on right clicking the project > build path > configure build path ?

Hope everything works well.

user1528958

I had the same problem and just discovered the solution to this.

Go to project>properties>Java Build Path>Libraries>Add External JARS.

After specifying JAR file at a certain location, you will see it in previous window "JARs and class folders on the build path:" with "JAR_fileName - C:\YOURPATH".

Don't stop here instead click on the "+" button to the left to expand it, and IF it says "Source attachment: (NONE)", you double click it and add the path to the JAR file by selecting Workspace location.

This solved the problem for me.

Had the same problem and non of the above solutions worked.

This is how I fixed it.

  1. go to your project folder
  2. open .classpath file (enable view hidden files if its not showing)
  3. edit the path
  4. delete the project from workspace. Imp: Don't select (Delete project content) checkbox when prompted. !!!
  5. re-import the same project

I had the same issue... I was refering jars from a mapped drive, when I moved them to my local drives, it started working fine. Also try giving a shorte path for the jars.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!