java.lang.SecurityException: Prohibited package name: java.pack.splitdemo
今天隨便寫了一個小程式,居然報下面的這樣錯誤,檢視了半天發現程式確實寫的沒問題。就只好在包和類名上面檢視,
我居然把package name 寫成以java開頭, java.pack.splitdemo。
所以就報錯了,
隨便改成什麼都可以,不能以java開頭。
具體錯誤如下:
java.lang.SecurityException: Prohibited package name: java.pack.splitdemo
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"
解決方案:
把包的名稱改掉..包名不能以java開頭。
相關文章
- Android Studio中的package name和application IDAndroidPackageAPP
- 應用市場中包名(package name)的唯一性Package
- 建立Android專案時Package name應該咋填?有限制嗎?AndroidPackage
- Office 365 - For security reasons DTD is prohibited in this XML documentXML
- not an rpm package (or package manifest):Package
- not an rpm package (or package manifest)Package
- packagePackage
- DB_NAME&TANCE_NAME&DB_UNIQUE_NAME&ORACLE_SID&GLOBAL_NAME&DB_DOMAIN&SERVICE_NAMEOracleAI
- Package Specification 和 Package Body 及 Package有什麼區別? (轉)Package
- 深入安卓Package Manager和Package Installer安卓Package
- 建立packagePackage
- error: '[class name]' does not name a typeError
- CUUG 筆記ORACLE db_name instance_name gobal_name service_name db_unique_name分析筆記OracleGo
- Package ssh is not available, but is referred to by another package 錯誤PackageAI
- 更改Global_name, domain_name, db_name 的方法AI
- DB_NAME、DB_UNIQUE_NAME、SERVICE_NAME和INSTANCE_NAME等的區別
- java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxyJavaExceptionAPPAndroidthread
- ORA-04042 procedure, function, package, or package body does not existFunctionPackage
- java 包(package)JavaPackage
- alter package/procedurePackage
- Package and ClassPath (轉)Package
- db_name,db_domain, global_name, service_name的區別AI
- Oracle修改instance_name、db_name、db_unique_name、service_namesOracle
- flutter package get 卡FlutterPackage
- Go package time 用法GoPackage
- yum error - package is a duplicate withErrorPackage
- package.jsonPackageJSON
- The DBMS_System PackagePackage
- utl_mail packageAIPackage
- Oracle 基礎 ----packageOraclePackage
- Rust Package Manager:CargoRustPackageCargo
- name server cannot be used, reason: Temporary failure in name resolutionServerAI
- instance_name、db_name、ORACLE_SID、db_name等的區別Oracle
- asp.net mvc get controller name and action nameASP.NETMVCController
- db_name和db_unique_name的區別
- java中不帶package和帶package的編譯執行方式JavaPackage編譯
- 包頭(Package)與包體(Package body)的學習與應用Package
- Laravel Package 中文文件LaravelPackage