开发者

Running .class file with a .java file

I have a ListTester.java file in which I've created with some unit tests in开发者_开发技巧 there to check the built in List class in Java.

I have also been given a List.class file to have the junit tests check against to make sure they are correct.

However, i'm not sure how to make sure the .class file is utilized by my .java file when it runs the tests.

How would I go about making it work? From what I was told, I can put it in the same directory as my List12Tester.java file and it should use it automatically.


Use an IDE, like Eclipse. Add the directory where the List12.class resides as a dependency of your project. And tell the people giving you class-files to document and package (in a jar) their code correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜