aboutsummaryrefslogtreecommitdiffstats
path: root/src/javax/media/j3d/MasterControl.java
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2016-10-28 16:13:28 -0700
committerHarvey Harrison <[email protected]>2016-10-28 16:49:08 -0700
commit68c2395b3098f374973e66ca962a0bde929e0a1d (patch)
tree8b3488bd6d01da9e144cbd463610574ca54b618d /src/javax/media/j3d/MasterControl.java
parent3defef76b49fb2263956edb79a3b0815a6d8beba (diff)
j3dcore: allow Java3D to operate in headless mode when using the noop renderer
[Suggested by Emmanuel Puybaret] Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/javax/media/j3d/MasterControl.java')
-rw-r--r--src/javax/media/j3d/MasterControl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/javax/media/j3d/MasterControl.java b/src/javax/media/j3d/MasterControl.java
index 0d7af66..c63dfd9 100644
--- a/src/javax/media/j3d/MasterControl.java
+++ b/src/javax/media/j3d/MasterControl.java
@@ -833,6 +833,11 @@ private static String getProperty(final String prop) {
// Use default pipeline
}
+ // Java 3D cannot run in headless mode unless using the noop renderer
+ if (java.awt.GraphicsEnvironment.isHeadless() && pipelineType != Pipeline.Type.NOOP) {
+ throw new java.awt.HeadlessException();
+ }
+
// Construct the singleton Pipeline instance
Pipeline.createPipeline(pipelineType);