0

I'm trying to deploy, on a self contained mode, a JavaFx GUI that uses R with the JRI interface. The application runs perfectly on Net-beans, and when I'm disabling the code that uses JRI, it also runs great on a stand alone mode (with a clickable jar), i think i understand why it doesn't work, i need to pass JVM arguments to the manifest file, the problem is that i don't know how. searching on the web gave me unclear answers (this one was helpful but not enough http://www.rgagnon.com/javadetails/java-0166.html).

here is the manifest file :

Manifest-Version: 1.0
JavaFX-Version: 2.2
implementation-vendor: yschellekens
implementation-title: LineChartWithHoverCoords
implementation-version: 1.0
JavaFX-Application-Class: linechartwithhovercoords.LineChartWithHoverC
 oords
JavaFX-Class-Path: lib/JRI.jar lib/JRIEngine.jar lib/REngine.jar lib/a
 rpack-combo.jar lib/commons-codec-1.5.jar lib/commons-logging-1.1.jar
  lib/csparsej.jar lib/jplasma.jar lib/jtransforms.jar lib/junit-4.11.
 jar lib/junit.jar lib/log4j-1.2.13.jar lib/netlib-java.jar lib/optimi
 zation.jar lib/parallelcolt-0.9.4.jar lib/poi-3.10-beta2-20130904.jar
  lib/poi-examples-3.10-beta2-20130904.jar lib/poi-excelant-3.10-beta2
 -20130904.jar lib/poi-ooxml-3.10-beta2-20130904.jar lib/poi-ooxml-3.9
 .jar lib/poi-ooxml-schemas-3.10-beta2-20130904.jar lib/poi-scratchpad
 -3.10-beta2-20130904.jar
Created-By: JavaFX Packager
Main-Class: com/javafx/main/Main

In order to make it work on Net-beans i needed to add an argument to the JVM (which i also specified it the jvmarg tag in the ant task), and i need to pass it some how to the manifest file.

I tried to add the JVM argument (-Djava.library.path='C:/Users/yschellekens.INTRANET/Documents/R/win-library/3.0/rJava/jri/x64/') through an Ant task with the "jvmarg" tag, but that didn't work ass well.

Ill appreciate any help in that, thanks in advance!!!

gouessej
  • 3,640
  • 3
  • 33
  • 67
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49

1 Answers1

2

OK so i figured it out, I've added a new batch file that contains:

set _JAVA_OPTIONS= -Djava.library.path='C:/Users/yschellekens.INTRANET/Documents/R/win-library/3.0/rJava/jri/x64/' 

 start javaw -jar "linechartwithhovercoords.jar"

thank a lot for:

https://stackoverflow.com/users/1481401/paulb - your awsome!

Community
  • 1
  • 1
Yehoshaphat Schellekens
  • 2,305
  • 2
  • 22
  • 49