Author: echatellier Date: 2013-10-31 23:54:54 +0100 (Thu, 31 Oct 2013) New Revision: 3825 Url: http://forge.codelutin.com/projects/isis-fish/repository/revisions/3825 Log: Simplify R native library loading (now it's magic) Removed: branches/4.0.1/src/main/assembly/isisfish64.bat branches/4.0.1/src/main/assembly/isisfish64.sh branches/4.0.1/src/main/assembly/x64/ branches/4.0.1/src/main/assembly/x86/ Modified: branches/4.0.1/pom.xml branches/4.0.1/src/main/assembly/bin.xml branches/4.0.1/src/main/assembly/isisfish-log4j.properties branches/4.0.1/src/main/assembly/isisfish.bat branches/4.0.1/src/main/assembly/isisfish.sh branches/4.0.1/src/main/java/fr/ifremer/isisfish/IsisFish.java Modified: branches/4.0.1/pom.xml =================================================================== --- branches/4.0.1/pom.xml 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/pom.xml 2013-10-31 22:54:54 UTC (rev 3825) @@ -147,7 +147,7 @@ <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-j2r</artifactId> - <version>1.0.2</version> + <version>1.1-SNAPSHOT</version> <scope>compile</scope> </dependency> Modified: branches/4.0.1/src/main/assembly/bin.xml =================================================================== --- branches/4.0.1/src/main/assembly/bin.xml 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/bin.xml 2013-10-31 22:54:54 UTC (rev 3825) @@ -6,7 +6,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 1999 - 2010 Ifremer, CodeLutin + Copyright (C) 1999 - 2013 Ifremer, CodeLutin, Eric Chatellier %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -31,12 +31,6 @@ <formats> <format>zip</format> </formats> - <!--dependencySets> - <dependencySet> - <outputDirectory>lib</outputDirectory> - <scope>runtime</scope> - </dependencySet> - </dependencySets--> <fileSets> <fileSet> @@ -46,12 +40,6 @@ <include>*.jar</include> </includes> </fileSet> - <!-- <fileSet> - <directory>target</directory> - <includes> - <include>*.jar</include> - </includes> - </fileSet> --> <fileSet> <includes> <include>README*</include> @@ -66,8 +54,6 @@ <includes> <include>isisfish.sh</include> <include>isisfish.bat</include> - <include>isisfish64.sh</include> - <include>isisfish64.bat</include> </includes> </fileSet> <fileSet> @@ -83,21 +69,5 @@ <file> <source>target/${artifact.artifactId}-${artifact.version}.jar</source> </file> - <file> - <source>src/main/assembly/x86/jri.dll</source> - <outputDirectory>jri</outputDirectory> - </file> - <file> - <source>src/main/assembly/x86/libjri.so</source> - <outputDirectory>jri</outputDirectory> - </file> - <file> - <source>src/main/assembly/x64/jri.dll</source> - <outputDirectory>jri64</outputDirectory> - </file> - <file> - <source>src/main/assembly/x64/libjri.so</source> - <outputDirectory>jri64</outputDirectory> - </file> </files> </assembly> Modified: branches/4.0.1/src/main/assembly/isisfish-log4j.properties =================================================================== --- branches/4.0.1/src/main/assembly/isisfish-log4j.properties 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/isisfish-log4j.properties 2013-10-31 22:54:54 UTC (rev 3825) @@ -5,7 +5,7 @@ # $Id$ # $HeadURL$ # %% -# Copyright (C) 2011 - 2012 Ifremer, CodeLutin, Chatellier Eric +# Copyright (C) 2011 - 2013 Ifremer, CodeLutin, Chatellier Eric # %% # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as Modified: branches/4.0.1/src/main/assembly/isisfish.bat =================================================================== --- branches/4.0.1/src/main/assembly/isisfish.bat 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/isisfish.bat 2013-10-31 22:54:54 UTC (rev 3825) @@ -5,4 +5,4 @@ rem SET PATH=%PATH%;%R_HOME%\bin\i386 echo [Script] Isis starting... -java -Xmx900M -Djava.library.path=jri -DR.type=jni -jar ${project.build.finalName}.${project.packaging} %1 %2 %3 %4 %5 %6 %7 %8 %9 > debug.txt 2>&1 +java -Xmx900M -jar ${project.build.finalName}.${project.packaging} %1 %2 %3 %4 %5 %6 %7 %8 %9 > debug.txt 2>&1 Modified: branches/4.0.1/src/main/assembly/isisfish.sh =================================================================== --- branches/4.0.1/src/main/assembly/isisfish.sh 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/isisfish.sh 2013-10-31 22:54:54 UTC (rev 3825) @@ -1,6 +1,5 @@ #!/bin/bash MEMORY="-Xmx1024M" -JRIARGS="-Djava.library.path=jri -DR.type=jni" -java $MEMORY $JRIARGS -jar ${project.build.finalName}.${project.packaging} $* &> debug.txt +java $MEMORY -jar ${project.build.finalName}.${project.packaging} $* &> debug.txt Deleted: branches/4.0.1/src/main/assembly/isisfish64.bat =================================================================== --- branches/4.0.1/src/main/assembly/isisfish64.bat 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/isisfish64.bat 2013-10-31 22:54:54 UTC (rev 3825) @@ -1,8 +0,0 @@ -@echo off - -rem Uncomment following 2 lines to easy configure R for ISIS-Fish -rem SET R_HOME=C:\Program Files\R\R-2.14.1 -rem SET PATH=%PATH%;%R_HOME%\bin\x64 - -echo [Script] Isis starting... -java -Xmx1024M -Djava.library.path=jri64 -DR.type=jni -jar ${project.build.finalName}.${project.packaging} %1 %2 %3 %4 %5 %6 %7 %8 %9 > debug.txt 2>&1 Deleted: branches/4.0.1/src/main/assembly/isisfish64.sh =================================================================== --- branches/4.0.1/src/main/assembly/isisfish64.sh 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/assembly/isisfish64.sh 2013-10-31 22:54:54 UTC (rev 3825) @@ -1,6 +0,0 @@ -#!/bin/bash - -MEMORY="-Xmx1024M" -JRIARGS="-Djava.library.path=jri64 -DR.type=jni" - -java $MEMORY $JRIARGS -jar ${project.build.finalName}.${project.packaging} $* &> debug.txt Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/IsisFish.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/IsisFish.java 2013-10-28 17:11:18 UTC (rev 3824) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/IsisFish.java 2013-10-31 22:54:54 UTC (rev 3825) @@ -119,16 +119,17 @@ // permet de faire fonctionner la compilation en webstart System.setSecurityManager(null); + // set Rtype in jni mode + System.setProperty("R.type", "jni"); + // i18n is not inited here if (log.isInfoEnabled()) { log.info("Starting Isis-Fish " + IsisConfig.getVersion() + " with args : " + java.util.Arrays.toString(args)); log.info("Date: " + SimpleDateFormat.getInstance().format(new java.util.Date())); log.info("Java version: " + System.getProperty("java.runtime.version") + ", " + System.getProperty("java.vm.name")); - log.info("System arch: " + System.getProperty("os.arch")); - log.info("R_HOME: " + System.getenv("R_HOME") + ", R.type: " + System.getProperty("R.type")); + log.info("Plaform/arch: " + System.getProperty("os.name") + "/" + System.getProperty("os.arch")); + log.info("R_HOME: " + System.getenv("R_HOME")); log.info("PATH: " + System.getenv("PATH")); - log.info("java.library.path: " + System.getProperty("java.library.path")); - } // initialisation de l'application