質問

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