문제

I have three .class files that I'm supposed to black-box test. They are under a package named one.two.three. I'm having difficulty accessing them. I started a new java project in eclipse and created a package with the same name. I then proceeded to add the three .class files to bin/one/two/three. If I try using the classes Eclipse can't find them and I get compiler errors. I'm using the appropriate package header. Any help is greatly appreciated, thanks.

도움이 되었습니까?

해결책

assuming bin/ is your output folder in the Eclipse project settings. Simply dropping the class files under bin/one/two/three will not work as eclipse will either delete them (on clean build) or just ignore these extra artifacts. Do as @Ray Tayek says- keep them in a different directory and edit project classpath and add this as class folder. This should work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top