java - Cannot import Jar in Eclipse -
i having problem using external jar files in java project. know question mutual here, checked others , did not work my. have solution called "testjarreference", in solution have 2 projects:
testproject projecttojar i added bundle "projecttojar" named "testpackage" , class "referenceme", method "test()" outputs console. exported project jar, , in testproject went configure build path > add together external jars... selected exported jar.
in class in testproject have main method in it, tried "import projecttojar.testpackage.referenceme;" keeps saying "the import projecttojar cannot resolved" no matter how alter it. tried creating 'lib' folder , placing in there, no luck.
i tried closing out of eclipse, , cleaning project, no luck. frustrating because everywhere have read solution same; create sure jar added build path, is, have no thought why not working. help?
press “ctrl + shift + o“ , eclipse import automatically. http://www.mkyong.com/eclipse/how-to-import-class-automatically-in-eclipse/
if doesn't work, must problem of importing jar project.
java eclipse jar reference buildpath
No comments:
Post a Comment