如何将Java项目导入Eclipse? [英] How to import a Java project to Eclipse?

查看:171
本文介绍了如何将Java项目导入Eclipse?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试导出一个Java项目。我可以使用选项Export - > Java - > JAR文件创建一个JAR文件。我无法将此jar文件导入到Eclipse中(对java而言没有导入选项)。我在这里做错什么?



使用Eclipse Java EE IDE进行Web开发人员(版本:Juno发布)

解决方案

比导出和导入jar有一个更简单的方法。让我们假设你的项目名为MyProject123。只需:


  1. 只需使用文件管理器打开工作区,

  2. 复制文件夹MyProject123,其中包含该项目并将其粘贴到其他工作空间

  3. 打开eclipse并创建一个名为MyProject123的新项目

Eclipse将会识别工作区中有一个名称的项目,并将其导入。所有你需要做的是在新项目上刷新(按F5)。


I was trying to export a Java project. I was able to create a JAR file by using the option Export -> Java -> JAR file. I am not able to import this jar file into Eclipse (no import option for java). Am I doing anything wrong here?

Using Eclipse Java EE IDE for Web Developers (Version: Juno Release)

解决方案

There is a simplier way than exporting and importing the jar. Lets assume your project is named MyProject123. Just:

  1. Just open the workspace with your file manager,
  2. Copy the folder MyProject123 that contains the project and paste it in an other workspace.
  3. Open eclipse and create a new Java Project named MyProject123

Eclipse will recognize that there is a project with that name in the workspace and will import it. All you have to do is to make refresh (press F5) on the new project.

这篇关于如何将Java项目导入Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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