[英]netbeans - java db server doesn't start
I'm trying to use Java DB in netbeans but the server doesn't start. 我正在尝试在netbeans中使用Java DB,但服务器无法启动。 I've tried adding
我试过添加
grant {
permission java.net.SocketPermission "localhost:1527", "listen";
}
but it didn't make any difference. 但它没有任何区别。 I don't know what causes a problem.
我不知道是什么原因导致了问题。 I successfully started the server using cmd but I still cannot connect to the database (the window "connecting to database" pops out but nothing happens, I also don't get any output from Java DB Database Proccess) Any help will be very appreciated.
我使用cmd成功启动了服务器,但我仍然无法连接到数据库(“连接到数据库”窗口弹出但没有任何反应,我也没有从Java DB数据库进程获得任何输出)任何帮助将非常感激。
I have the same problem. 我也有同样的问题。 I found a workaround.
我找到了一个解决方法。 Just change db provided with Java to the one provided with GlassFish:
只需将Java提供的数据库更改为GlassFish提供的数据库:
Open dialog NetBeans → ProjectManager → Services → Databases → JavaDB(right click) → Properties: 打开对话框NetBeans→ProjectManager→服务→数据库→JavaDB(右键单击)→属性:
My screen is from Linux installation. 我的屏幕来自Linux安装。 You probably have something like C:\\java\\jdk1.8.0_40\\db as Java DB Installation.
您可能有类似C:\\ java \\ jdk1.8.0_40 \\ db的内容作为Java DB安装。 .
。 Change this path to the one from Glassfish.
将此路径更改为Glassfish中的路径。 I don't know where it is on Windows, here's mine path:
我不知道它在Windows上的位置,这是我的路径:
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. 这只是解决方法,因为我不知道为什么Oracle提供的Java> = 1.8.0_40的JavaDB服务器在执行后会立即退出。 Probably this is some kind of bug.
可能这是某种错误。
This may be duplicated issue ( Netbeans not starting Java DB Server with JDK 1.8.0_40 ), but I am not sure. 这可能是重复的问题( Netbeans没有使用JDK 1.8.0_40启动Java DB Server ),但我不确定。
Try the grant code as: 尝试授予代码:
grant{
permission java.net.SocketPermission "localhost:1527", "listen,resolve";
};
Also, read Here (click) about the related bug(fix) in the JDK tool 另外,请阅读这里(单击)关于JDK工具中的相关错误(修复)
I had the same problem recently with netbeans 8.2 and JDK 8. I'm writing the solution here for future references. netbeans 8.2和JDK 8最近遇到了同样的问题。我在这里编写解决方案以供将来参考。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.