I created a Gradle application that won't run correctly but running the class directly in command line works as expected

// Distro: ElementaryOS Luna  $ uname -sr  Linux 3.18.1  $ java -version  java version "1.7.0_65"  OpenJDK Runtime Environment (IcedTea 2.5.3)  (7u71-2.5.3-0ubuntu0.12.04.1)  OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)  $ ./gradlew -v

 ------------------------------------------------------------  Gradle 2.2.1  ------------------------------------------------------------

 Build time:

2014-11-24 09:45:35 UTC  Build number: none  Revision:

  6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a

 Groovy:



 2.3.6  Ant:





 Apache Ant(TM) version 1.9.3 compiled on December 23 2013  JVM:





 1.7.0_65 (Oracle Corporation 24.65-b04)  OS:





  Linux 3.18.1 amd64

Here is my project: https://github.com/CptSpaceToaster/Lightscreen

I can compile and build a project as expected using gradle, however the application pluggin fails to find the class for some reason

I was able to repeat the bug on another linux (kernel 3.18.6) box, which was running Java 8 update 40 - http://i.imgur.com/o9rEIor.png

$ git clone https://github.com/CptSpaceToaster/Lightscreen.git  $ cd Lightscreen  // This should fail, and I don't know why  $ ./gradlew --info run  // But this should work  $ /usr/lib/jvm/java-7-openjdk-amd64/bin/java  -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/toaster/Github/Lightscreen/build/classes/main:/home/toaster/Github/Lightscreen/build/resources/main Lightscreen

Log: http://pastebin.com/JF9X1VQ5

I was NOT able to repeat this behavior on windows Thoughts? I’m reporting this as a bug, however it may be stupid configuration on my end.

Fixed:

Removed the following line from my build.gradle ‘’‘applicationDefaultJvmArgs = [""]’’’

Apparently, this passes in a blank argument to the JVM (maybe surrounded in quotes… maybe not) And that causes it to fail on Unix systems.

Thank you darylteo for the fix over in #gradle.