Feature #989

Updated by Sebastien Jacquot over 4 years ago

Currently, TXM must be installed in an environment where Java is already installed.

This has several drawbacks:
* users must install a compatible Java themselves and it can be difficult to do (find it on the web, choose the right architecture 32/64-bit, the right version, some vendors like Apple sometime change their policy with respect to Java, sometimes there are temporary security risks for some versions or libraries, etc.), adding difficulties globally to run TXM on a machine
* this adds another component to the already big list of independant installations needed to run TXM on a machine (Java, TreeTagger software, TreeTagger models, TXM setup) resulting in a long and error prone installation process and not very practical for users (the ideal scenario for a software installation process is to launch just one installer software and that the installation process is the most automatic)
* if different Java versions can run TXM in a given environment we have the risk that TXM behavior can be different between them (typically at the borderline of the Java language specification - preemptive threads, etc. - or different versions of hosted Java libraries), and this can be very difficult to support and maintain from the point of view of TXM
* last but not least, Java suffers from its reputation of slowness and security risk in browser applets. Putting Java less in the front would help users to concentrate more on the right components for performance issues (like CQP search engine for example which is not written in Java) and not be needlessly alarmed about security risks (TXM execution context is not in an applet).

Embedding a JRE in TXM will greatly simplify TXM users and developers life.

See also https://groupes.renater.fr/wiki/txm-info/public/passage_de_java_6_a_java_7

*Solution*
* Find a JRE for all architectures (Linux 32bit, Linux 64bit, Windows 32bit, Windows 64bit and Mac OS X 64bit)
** Oracle http://www.oracle.com/technetwork/java/javase/downloads
*** it represents +40Mo for the setup and +160Mo for the installation files (65Mo for rt.jar and 60Mo for architecture dependent libs)
*** + most used jre
*** -- does not work with Mac OS X. Eclipse raise an error : "The JVM shared library "/Applications/TXM/TXM/jre/Contents/Home/jre/bin/../lib/server/libjvm.dylib" does not contains the JNI_CreateJavaVM symbol"
** IceTea http://icedtea.classpath.org/wiki/Main_Page
*** jre installers https://github.com/alexkasko/openjdk-unofficial-builds#openjdk-unofficial-installers-for-windows-linux-and-mac-os-x
*** ++ free
*** ++ same jre than the dev jre
*** ++ works with Mac OS X
*** - not much used with Windows and Mac OS X
* No need to modify setup building Bash scripts: add the jre files in org.txm.setups/trunk/archs/TXM directories
* Java version: 1.7.0_??

See also "inclusion d'une JRE dans le logiciel": https://groupes.renater.fr/wiki/txm-info/documentation_java

h3. Validation Test

# Open TXM about dialog
# Open "Install details"
# select "Configurations" tab
# in the ordered list of properties you must find :
<pre>
...
java.runtime.name=OpenJDK Runtime Environment
java.runtime.version=1.7.0-u60-unofficial-b30
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=1.7
java.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
java.version=1.7.0-u60-unofficial
java.vm.info=mixed mode
java.vm.name=OpenJDK 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=1.7
java.vm.vendor=Oracle Corporation
java.vm.version=24.60-b09
...
</pre>

To ensure this is not the current system jvm, in a terminal call :
<pre>
java -version
</pre>

h4. Ubuntu

Ubuntu 14.04 64bit: *OK* (MD)
Ubuntu 13.04 64bit (VM): *OK* (SJ)
Ubuntu 12.04 32bit: *OK* (MD)
Ubuntu 14.04 32bit: *OK* (MD)

h4. Windows

Windows 7 32bit: *OK* (MD)
Windows 7 64bit: *OK* (MD, SJ)
Windows XP (VM): *OK* (MD)
Windows XP: *OK* (SJ)

h4. Mac OS X

Mac OS X 10.6: Java 7 (Oracle) is *not supported* for Mac OS X < 10.7 ; NOR with openjdk unofficial
Mac OS X 10.7+: *OK* with openjdk unofficial
Mac OS X 10.6: with openjdk: starts but then crashes
Mac OS X 10.9.4 (VM): *OK* (SJ)

Back