Make executable jar with JavaFx plugin for gradle -


i'm trying make executable jar. ide netbeans 7.3.1, using gradle plugin netabeans, using javafx plugin gradle.

simple javafx application:

i.lunin.autoposting.main:

package i.lunin.autoposting;  import java.util.logging.level; import java.util.logging.logger; import javafx.application.application; import javafx.event.actionevent; import javafx.event.eventhandler; import javafx.scene.scene; import javafx.scene.control.button; import javafx.scene.layout.stackpane; import javafx.stage.stage;  public class main extends application {     public static void main(string[] args) {         launch(args);     }     @override     public void start(stage primarystage) {         primarystage.settitle("hello world! man!");         button btn = new button();         btn.settext("say 'hello world'");         btn.setonaction(new eventhandler<actionevent>() {             @override             public void handle(actionevent event) {                 try {                     thread.sleep(5000);                 } catch (interruptedexception ex) {                     logger.getlogger(main.class.getname()).log(level.severe, null, ex);                 }                 system.out.println("hello world!");             }         });          stackpane root = new stackpane();         root.getchildren().add(btn);         primarystage.setscene(new scene(root, 300, 250));         primarystage.show();     } } 

gradle file:

build.gradle:

apply from: "http://dl.bintray.com/content/shemnon/javafx-gradle/0.3.0/javafx.plugin" apply plugin: 'java'  sourcecompatibility = '1.7' [compilejava, compiletestjava]*.options*.encoding = 'utf-8'  repositories {     mavencentral() }  dependencies { }  group = 'i.lunin.autoposting' version = '0.0.0'  javafx {     mainclass = 'i.lunin.autoposting.main' } 

when use gradle run, runs inside ide; can't start without ide.

when use gradle :jfxdeploy says finished.

after that, when i'm try start executable jar from:

"... testjava\build\distributions"

it shows following error: "unable find class: i.lunin.autoposting.main"

please me make executable jar under netbeans, gradle.

i had same issue. me turned out build system.
if build app via gradle , javafx on 32bit jvm, resulted in same error had.
if built on 64bit system went fine. guess it's still problem deploy self contained 32bit java apps. tested java 7.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -