java - eclipse(Java) 'Create a Hello World SWT application' 在欢迎>教程下找到

标签 java eclipse swt

我当前的问题如下:

1) 我为 Java 开发人员下载了 Eclipse(在 64 位、Windows 8 上运行 java 8 SE),尝试完成欢迎>教程下的“创建 Hello World SWT 应用程序”。

2) 在步骤 3 下,标题为:导入 SWT 项目;说明如下:

Open the Import wizard from the main menu via File > Import..., and select Plug-in Development > Plug-ins and Fragments. Click Next.

On the Import Plug-ins and Fragments page, select Import from: The active target platform. Plug-ins and Fragments to import: Select from all plug-ins and fragments found at specified location. Import As: Projects with source folders. Click Next.

On the Selection page, Add org.eclipse.swt.{platform}.{os}.{arch} (for example: org.eclipse.swt.win32.win32.x86 for win32) to Plug-ins and Fragments to Import: list. Click Finish.

This will create the org.eclipse.swt.{platform}.{os}.{arch} project which we will need to compile and run the application.

3)我遇到的第一个问题是,当我打开文件>导入时,我没有看到插件开发>插件和片段。当我打开"file">“导入”时,我会看到以下文件夹:常规、CVS、Git、安装、Maven、运行/调试、任务、团队、XML。

4)当我选择“?”时在此信息的右侧,将打开一个窗口,其中包含以下信息:

导入现有项目

You can use the Import Wizard to command link import an existing project into workspace.

  1. From the main menu bar, select command link File > Import.... The Import wizard opens.

  2. Select General > Existing Project into Workspace and click Next.

  3. Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.

  4. Under Projects select the project or projects which you would like to import.

  5. Click Finish to start the import

5) 我应该提到的是,此时我已经创建了一个名为 HelloWorldSWTApplication 的新 Java 项目,但我还没有为该项目创建包或类。因此,在我的 Package Explorer 中,在上述项目文件夹中,仅存在 src 和 JRE System Library。

6) 当按照“导入现有项目”标题下给出的指示进行操作时,“?”时出现的指示。选择“常规”>“现有项目进入工作区”>“选择根目录”>单击关联的“浏览”以找到目录或文件>“浏览文件夹”>“工作区”>“HelloWorldSWTApplication”>“确定”。
但是,我收到以下警告消息:

Some projects cannot be imported because they already exist in the workspace.

在项目字段中,我可以看到文件夹名称和路径,但它们是幻影出来的,我无法选择它们,无法选择“完成”。

问题:我做错了什么?我如何解决其中一个或所有问题?

最佳答案

我认为您正在使用 Eclipse Luna。我沿着"file"->“导入...”的路径查看了对话框。我没有看到插件开发。

如果您转到以前的版本 Eclipse Kepler,您会在那里看到它。 http://eclipse.org/downloads/packages/release/Kepler/SR2

我发现Eclipse文档是针对一个版本编写的,然后Eclipse会在后续版本中进行重大更改。祝你的插件好运。

关于java - eclipse(Java) 'Create a Hello World SWT application' 在欢迎>教程下找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27450663/

相关文章:

java - 如何在 SWT java 的标签中创建动态文本?

java - 从 eclipse viewpart 获取内容

java - 窗口工具栏项目不显示菜单项目

java - JScrollBar:最大值较小时旋钮不可见

Java加密问题

java - 如何让alertDialog在每次运行我的应用程序时弹出?

eclipse - java Servlet在tomcat eclipse上部署 - 需要引用

java - 在 O(n) 和 O(log n) 中计算二进制表示中的 1,其中 n 是位数

android - Eclipse 终止调试按钮变灰

java - 在 Java 中提取媒体属性或将 MediaInfo 安装到 Eclipse 中