Platform-specific notes for the JVM
Android™
The Java Interface can be used in Genero apps build for the Android / GMA platform.
On Android devices, custom Java classes need to be part of the .apk package and can be used without any further configuration.
com.fourjs.gma.vm.FglRun
class to access such system specifics.For more details, see Executing Java code with GMA.
iOS
The Java interface cannot be used in apps running on iOS devices: There is no standard free JVM available.
IBM® AIX®
Consider the following notes when using the Java Interface with the IBM Java VM on AIX:
If you get java.lang.UnsatisfiedLinkError
exceptions, set the path to native
shared libraries in the LIBPATH environment variable:
$ LIBPATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/j9vm:$JAVA_HOME/jre/lib/ppc64:$LIBPATH
$ export LIBPATH
This is required when using Java code that needs to access native code supplied as part of the JRE. For example, without setting LIBPATH to the appropriate path, the JVM cannot find the shared library libnet.so.
Using the -Djava.library.path=path-to-native-library
java VM
option does not seem to help.
See also IBM AIX platform notes.
HP-UX®
Consider the following notes when using the HotSpot JVM on HP/UX:
If you get an error when fglcomp or fglrun try to load the libjvm library, define the LD_PRELOAD environment variable as follows:
$ LD_PRELOAD=libjvm.sl
$ export LD_PRELOAD
Using LD_PREPLOAD can make other applications fail. LD_PRELOAD should only be set for the runtime system. If you need to run other applications in the same environment as your application programs, you can set the LD_PRELOAD_ONCE or JAVA_PRELOAD_ONCE variable in the shell scripts found in FGLDIR/bin.
See also HP-UX platform notes.
Microsoft™ Windows®
On Microsoft Windows platforms, make sure that the PATH environment variable does not contain double quotes around the path to the JVM.DLL dynamic library, otherwise the DLL loader will fail to load the JVM.
See also Microsoft Windows platform notes.
Mac® OS X®
The JAVA_HOME environment variable must be set to use the Java interface on Mac® OS X.
export JAVA_HOME=`/usr/libexec/java_home`
The Genero runtime system uses the Java Native Interface (JNI) to interact with the JVM and execute Java code.
By default on Mac OS X, the JNI feature may not be activated.
$ /usr/libexec/java_home
Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
-t JNI
option:$ /usr/libexec/java_home -t JNI
Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
If the output is empty or reports an older version, JNI is not enabled for the default java installation.
$ sudo vi `/usr/libexec/java_home`/../Info.plist
<string>JNI</string>
" in the <array>
of the JVMCapabilities
key: <dict>
<key>JVMCapabilities</key>
<array>
<string>CommandLine</string>
<string>JNI</string>
</array>
See also Mac OS X platform notes.