1

I am running into an issue when running jar file using IntelliJ Idea. Project is using JAVA 1.8.0_201. When JAR is created I build the artifacts and upon running the JAR I get the error: enter image description here

Here is the intellij settings enter image description here

I am using IntelliJ 2018.3, Community

KingKeyy
  • 59
  • 7
  • how are you building the Jar.? And could you please clarify what is the exact issue? In your question you said you faced issue in BUILDING jar file.. on next line you said Error is on RUNNING jar file. Please correct me if I misinterpreted your question. – miiiii Mar 01 '19 at 11:32
  • Hello, The issue is with running the already built file. When double click the file in "C:\Java\PackingCheck\out\artifacts\PackingCheckasdasd\PackingCheck.jar". I build it in intellij Build > Build Artifacts > //Name\\ > Build – KingKeyy Mar 01 '19 at 11:46
  • This looks like your system admin may be blocking the JAR from running. Are you doing this on a work computer? – Zephyr Mar 01 '19 at 14:21
  • Do you have antivirus/firewall? Try with it disabled or make sure that IDE [settings directories](https://intellij-support.jetbrains.com/hc/en-us/articles/206544519) IDE installation home and project files are excluded from the scan. – Andrey Mar 01 '19 at 17:10

1 Answers1

1

From the official site

Java has further enhanced security to make the user system less vulnerable to external exploits. Starting with Java 7 Update 51, Java does not allow users to run applications that are not signed (unsigned), self-signed (not signed by trusted authority) or that are missing permission attributes.

Solution (*I never tried practically), you can self-sign the jar file of your project, (AND important to) mention (import) your certificate in the Java Security Control Panel. With this, your application will be treated as signed and verified application, and should have no issues running it.

For how to self sign the JAR, following links might help you.

https://www.java.com/en/download/help/java_blocked.xml

https://docs.oracle.com/javase/tutorial/deployment/jar/intro.html

https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/rsa_signing.html

Java Error: "Your security settings have blocked a local application from running"

miiiii
  • 1,580
  • 1
  • 16
  • 29