Prohibited package name: java

后端 未结 6 1385
灰色年华
灰色年华 2020-11-27 22:21

I tried to get the data from my database name as jaane with user name Hello and Password hello. Error:

java.lang.SecurityException: Prohibited package name:          


        
6条回答
  •  旧巷少年郎
    2020-11-27 22:39

    You need to specify the Database Name, and there are two slashes before localhost. I assume hello is your username and Hello the password...

    Connection connection = DriverManager.getConnection( "jdbc:derby://localhost:1527/DatabaseName","hello","Hello" );
    

    ...that is after you change your package name to something other than java!

提交回复
热议问题