将.class文件添加到Eclipse项目 [英] Adding .class files to an Eclipse project

查看:214
本文介绍了将.class文件添加到Eclipse项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个完整的新手问题,但我无法想像出来,所以我想我会在这里问问,看看发生了什么。

This is a total newbie question, but I can't figure it out so I figured that I would ask it here and see what happened.

这是问题:对于我的java编程类,我们应该下载由我们的教师创建的.class文件,其中包含一个使用我们应用于作业中的方法的定制类。我已经知道在我的实际程序中创建类的所有代码,但是我无法弄清楚哪个目录放在.class文件中。我已经在项目目录中尝试了src和bin文件夹,甚至放置它直接进入项目目录,但似乎没有任何工作。我的教练说,把它放在与我的java程序相同的目录中,但是他们正在使用jGRASP。我做错了什么?

Here's the problem: For my java programming class, we are supposed to download a .class file created by our instructors containing a custom-made class with methods that we are supposed to use in an assignment. I already know all of the code to create the class within my actual program, but I can't figure out which directory to place the .class file in. I have tried the src and bin folders inside the project directory, and even placed it directly into the project directory, but nothing seems to work. My instructors say to just put it in the same directory as my java program, but they are using jGRASP. What am I doing wrong?

推荐答案

您可以将类文件放在任何地方,只需确保将其目录添加到项目的构建路径。右键单击项目,然后在底部的属性然后构建路径,直到找到添加类文件夹。

You can place the class file anywhere, just be sure to add its directory to your project's build path. Right click on the project, then properties at the bottom then build path, til you find add class folder.

这篇关于将.class文件添加到Eclipse项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆