Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

JAR file not working macOS Catalina

Hello,


When running jar file in macOS Mojave it's working. After I upgrade in macOS Catalina jar file is not working anymore. Any idea how can I fix this? I tried installing OpenJDK and AdoptJDk still it's not working. I tried to run this in terminal java -jar server.jar i'm getting error


> Exception in thread "main" java.lang.reflect.InvocationTargetException

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(Unknown Source)

Caused by: java.lang.SecurityException: Prohibited package name: java.sql

at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:898)

at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1014)

at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)

at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)

at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)

at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)

at java.base/java.security.AccessController.doPrivileged(Native Method)

at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

at vida.main.VidaMain.main(Unknown Source)

... 5 more


When i launch is using jar launcher im getting this error


The Java JAR File "server.jar" could no be launched. Check console for possible error messages.





Posted on Nov 21, 2019 6:54 PM

Reply

Similar questions

5 replies

JAR file not working macOS Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.