Eclipse 中没有响应:文件 -> 导入 -> 现有项目到工作区

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/756357/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:39:30  来源:igfitidea点击:

No response in Eclipse: File ->Import->Existing Projects into Workspace

javaeclipsegwtimport

提问by Hula

I'm trying to import one of the GWT samples into Eclipse by following the instructions below. But when I browse to the directory containing the "Hello" sample and uncheck "Copy projects into workspace", the Finish button is grayed out, preventing me from completing the import. Any ideas why?

我正在尝试按照以下说明将 GWT 示例之一导入 Eclipse。但是,当我浏览到包含“Hello”示例的目录并取消选中“将项目复制到工作区”时,“完成”按钮变灰,阻止我完成导入。任何想法为什么?

-- Option A: Import your project into Eclipse (recommended) --

If you use Eclipse, you can simply import the generated project into Eclipse. We've tested against Eclipse 3.3 and 3.4. Later versions will likely also work, earlier versions may not.

In Eclipse, go to the File menu and choose:

File -> Import... -> Existing Projects into Workspace

Browse to the directory containing this file, select "Hello". Be sure to uncheck "Copy projects into workspace" if it is checked. Click Finish.

-- 选项 A:将您的项目导入 Eclipse(推荐)--

如果您使用 Eclipse,您只需将生成的项目导入 Eclipse。我们已经针对 Eclipse 3.3 和 3.4 进行了测试。较新的版本可能也有效,较早的版本可能无效。

在 Eclipse 中,转到文件菜单并选择:

文件 -> 导入... -> 现有项目到工作区

浏览到包含此文件的目录,选择“Hello”。如果选中,请务必取消选中“将项目复制到工作区”。单击完成。

采纳答案by Hula

I had the same problem but found this:

我有同样的问题,但发现这个

I just tried this on Eclipse 3.4 1) Create a project named "Showcase" file > new > project

2) Import the Showcase files right-click on the project name

Import File System From Directory (browse to your eclipse samples installation) Showcase (select the directory in the left panel) Into folder (Showcase should be the default value)

This will import the source into your workspace. Use build.xml to build the project. The build will fail as the gwt-servlet.jar is in a shared directory which doesn't get brought into the project via this method.

我刚刚在 Eclipse 3.4 上尝试过这个 1) 创建一个名为“Showcase”的项目文件 > 新建 > 项目

2) 导入 Showcase 文件右键单击项目名称

从目录导入文件系统(浏览到你的 eclipse 示例安装) Showcase(在左侧面板中选择目录) Into folder(Showcase 应该是默认值)

这会将源导入您的工作区。使用 build.xml 来构建项目。构建将失败,因为 gwt-servlet.jar 位于共享目录中,该目录不会通过此方法引入项目。

回答by Pavithra Gunasekara

I also encountered this problem but got through it using following steps.

我也遇到了这个问题,但通过以下步骤解决了。

First open up a command prompt and go inside to the project folder using cd command.

首先打开命令提示符并使用 cd 命令进入项目文件夹。

then execute this command in there. Be sure to install apache ant before doing this.

然后在那里执行这个命令。在执行此操作之前,请务必安装 apache ant。

ant eclipse.generate

this will generate .classpath and .project files

这将生成 .classpath 和 .project 文件

now you can import the project into the workspace just as normal way. file->import->general->existing project

现在您可以像往常一样将项目导入工作区。文件->导入->常规->现有项目

回答by Robert Muil

To import the samples from the Android SDK into Eclipse, do the following:

要将示例从 Android SDK 导入 Eclipse,请执行以下操作:

  1. Click File->New->New Android Project
  2. Select 'Create project from existing sample'
  3. Select your Build Target (The Android API level)
  4. Select the sample app you want.
  5. Finish.
  1. 点击文件->新建->新建Android项目
  2. 选择“从现有示例创建项目”
  3. 选择您的构建目标(Android API 级别)
  4. 选择所需的示例应用程序。
  5. 结束。

This is valid for Eclipse 3.5.2.

这对 Eclipse 3.5.2 有效。

BTW: Link in previous answer is broken.

顺便说一句:先前答案中的链接已损坏。

回答by Ayush Pant

after importing right click on the project ->Goolge->web toolkit setting->click yes the check box and then run as a web application!

导入后右键项目->Goolge->web toolkit setting->点击yes复选框,然后作为web应用程序运行!