Netbeans无法使用JDK 1.8.0_40启动Java DB Server [英] Netbeans not starting Java DB Server with JDK 1.8.0_40

查看:384
本文介绍了Netbeans无法使用JDK 1.8.0_40启动Java DB Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的设置: 1)Windows 8.1 2)JDK 1.8.0_40 3)Netbenas 8.0.2

That's my setup: 1) Windows 8.1 2) JDK 1.8.0_40 3) Netbenas 8.0.2

系统正在运行JDK 1.8.0_31,并且一切运行正常. 已卸载JDK 1.8.0_31并安装了JDK 1.8.0_40,并已安装JAVA_HOME var 调整以反映新的JDK版本,从C:\ java \ jdk1.8.0_31到 C:\ java \ jdk1.8.0_40.

The system was running JDK 1.8.0_31 and everything was working pretty well. JDK 1.8.0_31 was uninstalled and JDK 1.8.0_40 installed and JAVA_HOME var was adjusted to reflect the new JDK version, from C:\java\jdk1.8.0_31 to C:\java\jdk1.8.0_40.

我对Netbeans进行了以下更改: 1)菜单工具|库:已更改"Java DB驱动程序"以反映JDK版本随附的库:C:\ java \ jdk1.8.0_40 \ db \ lib \ derby.jar C:\ java \ jdk1.8.0_40 \ db \ lib \ derbyLocale_pt_BR.jar(我来自巴西)C:\ java \ jdk1.8.0_40 \ db \ lib \ derbyclient.jar C:\ java \ jdk1.8.0_40 \ db \ lib \ derbynet.jar 2)在服务"选项卡上,右键单击"Java DB",然后单击属性"菜单项:a)将"Java DB安装"设置为C:\ java \ jdk1.8.0_40 \ db b)当所有内容都在数据库位置时,数据库位置相同工作正常.

I applied the following changes to my Netbeans: 1) Menu Tools | Libraries: 'Java DB Driver' was changed to reflect the libraries which come with JDK version: C:\java\jdk1.8.0_40\db\lib\derby.jar C:\java\jdk1.8.0_40\db\lib\derbyLocale_pt_BR.jar (I'm from Brazil) C:\java\jdk1.8.0_40\db\lib\derbyclient.jar C:\java\jdk1.8.0_40\db\lib\derbynet.jar 2) 'Services' tab, right-click on 'Java DB', Properties menu item: a) 'Java DB Installation' setup to C:\java\jdk1.8.0_40\db b) Database location is the same when everything was working fine.

在(1)中,唯一的区别是JDK根目录.

In (1) the only difference is in the JDK root dir.

现在,当我右键单击服务"选项卡上的"Java DB"时,没有任何反应,没有错误, 没有消息,什么都没有.

Now when I right-click on 'Java DB' on 'Services' tab nothing happens, no error, no messages, simply nothing.

如果我右键单击任何现有的Derby连接,然后选择连接..." 小窗口显示消息正在连接数据库,请稍候..." 在状态栏中(在Netbeans主窗口的底部),有一条消息 启动Java DB服务器"使该进程永远运行,这是因为 什么都没发生.我可以关闭小窗口,然后尝试关闭消息 在状态栏上,出现另一个窗口,显示消息您确定要 取消启动Java DB Server吗?".我单击是"按钮,然后单击另一个窗口. 带有有线消息"Java DB服务器未在0秒内启动.您是否要 等待另外0秒钟?"出现,我单击否"按钮,并且 启动Java DB Server似乎停止了.

If I right-click on any existing Derby connection and choose 'Connect...' a small windows shows up with the message "Connecting to database, please wait..." and in the status bar (on the botton of Netbeans main window) there's a message "Starting the Java DB Server" and that process stays running forever 'cause nothing happens. I can close the small window, then I try to close the message on status bar another windows shows up with the message "Are you sure you want to cancel Starting Java DB Server?". I click "Yes" button and another window with a wired message "The Java DB server did not start in 0 seconds. Do you want to wait another 0 seconds?" shows up, I click "No" button and the process of starting Java DB Server seems to stop.

感谢您为解决有线问题所做的贡献.

I appreciate any contributions to get that wired problem solved.

推荐答案

我有同样的问题.我找到了解决方法.只需将Java提供的数据库更改为GlassFish提供的数据库即可:

I have the same problem. I found a workaround. Just change db provided with Java to the one provided with GlassFish:

  1. 确保已使用GlassFish(和JavaDB)安装了NetBeans
  2. 打开对话框NetBeans→ProjectManager→服务→数据库→JavaDB(右键单击)→属性:

  1. Make sure you have NetBeans installation with GlassFish (and JavaDB)
  2. Open dialog NetBeans → ProjectManager → Services → Databases → JavaDB(right click) → Properties:

我的屏幕来自Linux安装.您可能将 C:\ java \ jdk1.8.0_40 \ db 作为 Java DB Installation..将此路径更改为Glassfish中的路径.我不知道Windows上的位置,这是我的路径:

My screen is from Linux installation. You probably have something like C:\java\jdk1.8.0_40\db as Java DB Installation.. Change this path to the one from Glassfish. I don't know where it is on Windows, here's mine path:

这只是解决方法,因为我不知道为什么Oracle提供的Java> = 1.8.0_40提供的JavaDB服务器在执行后立即退出.可能是某种错误.

This is only workaround, as I don't know why JavaDB server provided by Oracle with Java >= 1.8.0_40 exits immediate after execution. Probably this is some kind of bug.

这篇关于Netbeans无法使用JDK 1.8.0_40启动Java DB Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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