Unable to run jar file inside or outside IntelliJ

Answered

I can debug/run my application from the IntelliJ IDE without issues.

However no matter which method I use to create a jar ("extract to target jar" or "copy to output directory and link via manifest") the resulting jar file will not run from within the IDE or from the command line.  I have spend quite a bit of time searching for solutions. 

Are there any recent articles?

Version info:
IntelliJ IDEA 2017.3.5 (Ultimate Edition)
Build #IU-173.4674.33, built on March 6, 2018
JRE: 1.8.0_152-release-1024-b15 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

0
2 comments
Avatar
Permanently deleted user

Created a new Gradle project. Add the traditional "hello world" class. Runs fine in IDE. Running the artifact results in:

"C:\Program Files\Java\jdk1.8.0_161\bin\java" -Dfile.encoding=windows-1252 -jar xxx.jar
xxx.jar???????????????????

Update: I can get the jar to work as long as I do not use any of the IDE functions. Update build.gradle and run "gradlew jar" from the terminal. 

0

Please sign in to leave a comment.