6.9 Customizing Java Run Time System
As AHF Scope is written in Java, it is platform independent.
The script ahfscope
invokes the Java Virtual Machine
(JVM) with Oracle classes. Knowledgeable users may consider customizing this script, or
use the environment variable _JAVA_OPTIONS
to determine the way the JVM
executes code.
JVM is the run-time process, which interprets Java classes. All contemporary JVM's incorporate some method of on-the-fly translation of bytecode into native code. Dominating in this field is the Hot Spot. Except for beginning invocations of classes, in most cases Java methods run later in native code. Consequently, they perform at speeds comparable to programs written in native languages, such as C.
- https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html#opengl
- https://docs.oracle.com/javase/8/docs/technotes/guides/2d/new_features.html
-Dsun.java2d.opengl=true
: Use the OpenGL pipeline-Dsun.java2d.d3d=true
: Use the Direct3D accelerator for Microsoft Windows
AHF Scope does not render in 3D, but benefits greatly from the accelerated region repaint available through Direct3D.
JVM options may be used with the java
command, or declared as an
environment variable, _JAVA_OPTIONS
.
_JAVA_OPTIONS="-Dsun.java2d.opengl=True -Dsun.java2d.d3d=true" export _JAVA_OPTIONS
Picked up _JAVA_OPTIONS: -Dsun.java2d.opengl=True -Dsun.java2d.d3d=true
Could not enable OpenGL pipeline for default config on screen 0
OpenGL pipeline enabled for default config on screen 0
In the case of some graphics cards, OpenGL requires the option:
sun.java2d.opengl.fbobject=false
. See section 3.1.5.5
Diagnosing Rendering and Performance Issues in the following document:
http://www.oracle.com/technetwork/java/javase/index-142560.html.
This link is the current and comprehensive description of potential issues with OpenGL and Java 2D drawing package in conjunction with specific hardware/driver versions.