如何在 Eclipse 中安装 Hibernate Tools?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/351640/
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-10 18:33:25  来源:igfitidea点击:

How to install Hibernate Tools in Eclipse?

eclipsehibernateeclipse-pluginhibernate-tools

提问by Steve Kuo

What is the proper way to install Hibernate Tools in Eclipse as a plugin? The Hibernate sitedoesn't really give any instructions.

在 Eclipse 中将 Hibernate Tools 作为插件安装的正确方法是什么?在Hibernate的网站并没有真正给予任何指示。

Looking at the Hibernate Tools binary HibernateTools-3.2.4.Beta1-R200810311334.zip, it appears that I can just unzip this in my eclipse directory. Do I just unzip it in my eclipse directory? This seems like a hacky was to install it.

查看 Hibernate Tools binary HibernateTools-3.2.4.Beta1-R200810311334.zip,似乎我可以将它解压缩到我的 eclipse 目录中。我只是将它解压缩到我的 eclipse 目录中吗?这似乎是安装它的hacky。

回答by

Well, most convenient and safest way is to use JBoss update site within Eclipse software updates (Help -> Software Updates... -> Add Site...):

好吧,最方便和最安全的方法是在 Eclipse 软件更新中使用 JBoss 更新站点(帮助 -> 软件更新... -> 添加站点...):

The latest stable release update site for JBoss Tools

JBoss 工具的最新稳定版本更新站点

There you can find Hibernate tools together with other handy JBoss plugins.

在那里您可以找到 Hibernate 工具以及其他方便的 JBoss 插件。

回答by Costis Aivalis

Find the stable version of the hibernate plugin (Zip or URL for auto update) in the below URL. http://www.jboss.org/tools/download

在以下 URL 中找到稳定版本的休眠插件(用于自动更新的 Zip 或 URL)。 http://www.jboss.org/tools/download

Do not install everything though. You just need:

不过不要安装所有东西。您只需要:

  1. The entire All JBoss Tools 3.2.0section
  2. Hibernate Tools (HT) from Application Development
  3. HTfrom Data Services
  4. JBoss Maven Hibernate Configuratorfrom Maven Supportand
  5. HTfrom Web and Java EE Development
  1. 整个All JBoss Tools 3.2.0部分
  2. 来自应用程序开发的Hibernate 工具 ( HT)
  3. 来自数据服务的HT
  4. 来自Maven 支持的JBoss Maven Hibernate 配置器
  5. 来自Web 和 Java EE 开发的HT

That's all!

就这样!

In 2013, you will be probably using the latest versions of Eclipse and Hibernate. For Eclipse-4.2.2. and JBoss Tools 4.0 you need:

2013 年,您可能会使用最新版本的 Eclipse 和 Hibernate。对于 Eclipse-4.2.2。和您需要的 JBoss 工具 4.0:

  1. From the Abridged JBoss Tools 4.0, the JBoss Hibenate Toolssection
  2. Hibernate Tools (HT) from Application Development
  3. HTfrom JBoss Data Services
  4. JBoss Maven Hibernate Configuratorfrom Maven Supportand
  5. HTfrom Web and Java EE Development
  1. 来自Abridged JBoss Tools 4.0JBoss Hibenate Tools部分
  2. 来自应用程序开发的Hibernate 工具 ( HT)
  3. 来自JBoss 数据服务的HT
  4. 来自Maven 支持的JBoss Maven Hibernate 配置器
  5. 来自Web 和 Java EE 开发的HT

Then you are ready to go!

然后你准备好了!

回答by Diego Pino

Instructions for Eclipse Indigo:

Eclipse Indigo 使用说明:

Once installed click on Window -> Show View -> Others. A new window pops up. Click on folder Hibernateand select Hibernate Configurationsto setup a DB connection. It is possible to setup a new connection using an existing Hiberbate properties file or creating a JDBC connection.

安装后点击Window -> Show View -> Others。弹出一个新窗口。单击文件夹Hibernate并选择Hibernate Configurations以设置数据库连接。可以使用现有的 Hiberbate 属性文件或创建 JDBC 连接来设置新连接。

Once setup your DB connection click on Ping to test everything is correct.

设置数据库连接后,单击 Ping 以测试一切是否正确。

Lastly, click on the Open HQL Editorbutton (third button on the top Hibernate Configurations menu) to run a HQL query.

最后,单击Open HQL Editor按钮(顶部 Hibernate Configurations 菜单上的第三个按钮)以运行 HQL 查询。

回答by Luís de Sousa

Installing Hibernate Tools on Eclipse Neon (4.6)

在 Eclipse Neon (4.6) 上安装 Hibernate 工具

Go to the menu Help> Install New Softwareand click the Addbutton.

转到菜单Help>Install New Software并单击Add按钮。

Use something like JBoss Hibernatefor the name and insert the following URL for the location:

使用类似JBoss Hibernate的名称作为名称,并为位置插入以下 URL:

http://download.jboss.org/jbosstools/neon/stable/updates/ 

Wait for the product tree to load and then expand the JBoss Web and Java EE Developmentfolder and select the Hibernate Toolsproduct and click the Next >button. Then follow on accepting all the subsequent questions, licence, etc.

等待产品树加载,然后展开JBoss Web and Java EE Development文件夹并选择Hibernate Tools产品并单击Next >按钮。然后继续接受所有后续问题、许可等。

When the installation is finished, restart Eclipse as required. After that, to open the Hibernate perspective go to the menu Window> Perspective> Open Perspective> Othersand search for Hibernate.

安装完成后,根据需要重新启动 Eclipse。之后,要打开 Hibernate 透视图,请转到菜单Window> Perspective> Open Perspective>Others并搜索Hibernate

回答by Divyesh Kanzariya

Method-1 Online Hibernate Tool Installation

方法一 在线 Hibernate 工具安装



In Eclipse IDE, menu bar, select Help>> Install New Software …put the Eclipse update site URL "download.jboss.org/jbosstools/updates/stable/Eclipse_Version

在Eclipse IDE,菜单栏,选择Help>> Install New Software…把Eclipse更新站点的URL“download.jboss.org/jbosstools/updates/stable/ Eclipse_Version

Eclipse Install New Software - Hibernate

Eclipse 安装新软件 - Hibernate

Select the tool and click on Next. Do not select all the tools; it will install all the unnecessary tools. We just need hibernate tools.

选择工具并单击下一步。不要选择所有工具;它将安装所有不必要的工具。我们只需要休眠工具。

Accept licence agreement and click finish.It will take some minutes to complete installation process.

接受许可协议并单击完成。完成安装过程需要几分钟时间。

Installation Process

安装过程

After installation, restart the eclipse to verify whether Hibernate tools is installed properly,we will look at Hibernate Perspective in Eclipse->>Window->>Open Perspective->>Other

安装完成后,重启eclipse以验证Hibernate工具是否安装正确,我们在Eclipse->>Window->>Open Perspective->>Other查看Hibernate Perspective

Method-2 Offline Installation

方法二离线安装



If you don't have the internet connection and want the offline method to add hibernate tools in eclipse. To install the Hibernate Tools, extract the HibernateTools-5.X.zipfile and move all the files inside the features folder into the features folder of the eclipse installation directory and move all the files inside the plugins folder into the plugins folder of the ecilpse installation directory.

如果您没有互联网连接并希望离线方法在 Eclipse 中添加休眠工具。安装Hibernate Tools,解压HibernateTools-5.X.zip文件,将features文件夹内的所有文件移动到eclipse安装目录的features文件夹中,将plugins文件夹内的所有文件移动到ecilpse安装目录的plugins文件夹中。

After restart, Go to Eclipse->>Window->>Open Perspective->>Other, the following dialog box appears, select Hibernate and click the Okbutton.

重启后,进入Eclipse->>Window->>Open Perspective->>Other,出现如下对话框,选择 Hibernate 并点击Ok按钮。

Check Eclipse Perspective

检查 Eclipse 透视图

That's it . We successfully installed JBoss Hibernate Tools in Eclipse. :) now Happy Coding

就是这样 。我们在 Eclipse 中成功安装了 JBoss Hibernate Tools。:) 现在快乐编码

References :

参考 :

回答by VonC

Since it is for Ganymede (eclipse 3.4), I would advise to uncompress the zip in the dropinsin the HibernateTools-3.2.4.Beta1-R20081031133 directory created after the name of the archive.

由于它是针对 Ganymede (eclipse 3.4),我建议解压缩HibernateTools-3.2.4.Beta1-R20081031133 目录中的dropins中的zip 文件,该目录是在存档名称后创建的。

Once it is done, create in the [eclipse\dropins\HibernateTools-3.2.4.Beta1-R20081031133]an 'eclipse' directory, in which you will move the plugins and features directories creating at the extraction of the files of the archive.

完成后,在[eclipse\dropins\HibernateTools-3.2.4.Beta1-R20081031133]“eclipse”目录中创建,您将在其中移动在提取存档文件时创建的插件和功能目录。

Add a .exclipseextension in [eclipse\dropins\HibernateTools-3.2.4.Beta1-R20081031133\eclipse]:

在 .exclipseextension 添加[eclipse\dropins\HibernateTools-3.2.4.Beta1-R20081031133\eclipse]

name=QuickRex
id=org.hibernate.eclipse
version=3.2.4b1

So:

所以:

eclipse
    dropins
         HibernateTools-3.2.4.Beta1-R20081031133
             eclipse
                 .eclipseextension
                 features
                 plugins

Relaunch eclipse and the plugin Hibernate should be detected.

重新启动 eclipse 和插件 Hibernate 应该被检测到。

If you install another eclipse, just copy the content of your dropins directory to the new eclipse\dropinsand your set of plugins will be detected again.

如果您安装另一个 eclipse,只需将您的 dropins 目录的内容复制到新的eclipse\dropins,您的插件集将再次被检测到。

回答by nopnop77

Menu Help > Install new software

菜单帮助 > 安装新软件

Use this url : http://download.jboss.org/jbosstools/updates/stable/

使用这个网址:http: //download.jboss.org/jbosstools/updates/stable/

回答by James Drinkard

I'm running Eclipse Indigo 64 bit on Windows 7 64 bit and I kept getting missing dependency errors associated with Maven and other plugins using the JBoss Tools 3.3.X latest download. Here is the link.

我在 64 位 Windows 7 上运行 Eclipse Indigo 64 位,并且使用 JBoss Tools 3.3.X 最新下载时,我一直丢失与 Maven 和其他插件相关的依赖项错误。这是链接

So, I opted to only install Hibernate Tools with nothing else by typing in "hibernate" at the top of the install software dialog in eclipse. Only 4 items showed up, so that is all I installed. It worked fine with no problems. Here is the tutorialthat I used to get it installed properly after several failed attempts.

因此,我选择仅通过在 Eclipse 的安装软件对话框顶部键入“hibernate”来安装 Hibernate Tools。只显示了 4 个项目,这就是我安装的全部内容。它运行良好,没有任何问题。这是我在多次尝试失败后用来正确安装它的教程

I don't know if part of this was due to having a lot of plugins already installed or if this is the best solution or not, but I thought I'd share it with everyone.

我不知道部分原因是因为已经安装了很多插件,或者这是否是最好的解决方案,但我想我会与大家分享。

回答by André

I can't for the life of me get the Next or Finish button to not go grey

我一生都无法让“下一步”或“完成”按钮不变灰

This is the eclipse pain in the ass UI. If you unckecked previously some components because they have broken dependencies, it blocks in the license. You have to unselect them in the first step.

这就是屁股 UI 中的 eclipse 痛苦。如果您之前取消选中某些组件,因为它们具有破坏的依赖关系,它会阻止许可证。您必须在第一步中取消选择它们。

Note that avoid to use the update feature of Eclipse it broke all my plugin, I had to delete my ./eclipse folder and reinstall all.

请注意,避免使用 Eclipse 的更新功能会破坏我所有的插件,我不得不删除我的 ./eclipse 文件夹并重新安装所有。