JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
TestBug611AWT.java
Go to the documentation of this file.
1
2package com.jogamp.opengl.test.junit.jogl.awt;
3
4import java.awt.Desktop;
5import java.io.File;
6
7import com.jogamp.opengl.GLProfile;
8
9import org.junit.Test;
10import org.junit.FixMethodOrder;
11import org.junit.runners.MethodSorters;
12
13import com.jogamp.common.os.Platform;
14import com.jogamp.opengl.test.junit.util.UITestCase;
15
16/**
17 * As reported in Bug 611, on Windows XP is a performance issue:
18 * After JOGL initialization there seems to be a huge time lag
19 * when trying to open the Desktop folder.
20 * <p>
21 * Test disabled since showing the Desktop folder will
22 * disturb the 'desktop' .. if there is another way to show
23 * the performance bug, pls do so.
24 * </p>
25 * <p>
26 * Since Windows XP is out of life .. we may not care ..
27 * </p>
28 */
29@FixMethodOrder(MethodSorters.NAME_ASCENDING)
30public class TestBug611AWT extends UITestCase {
31
32 @Test
33 public void test00() {
34 // make junit happy
35 }
36
37 // @Test
38 public void test01() {
39 try {
40 // System.setProperty("jogamp.gluegen.UseTempJarCache", "false");
42 Desktop desktop;
43 if (Desktop.isDesktopSupported()) {
44 desktop = Desktop.getDesktop();
45 } else {
46 desktop = null;
47 }
48 if(null != desktop) {
49 final String home = System.getProperty("user.home");
50 File homeFolder = null;
51 if(null != home) {
52 {
53 final File tst = new File(home + "/Desktop");
54 if( tst.canRead() ) {
55 homeFolder = tst;
56 }
57 }
58 if(null == homeFolder) {
59 final File tst = new File(home);
60 if( tst.canRead() ) {
61 homeFolder = tst;
62 }
63 }
64 }
65 if(null == homeFolder) {
66 if(Platform.getOSType() == Platform.OSType.WINDOWS) {
67 homeFolder = new File("c:\\");
68 } else {
69 homeFolder = new File("/");
70 }
71 }
72 if(null != homeFolder) {
73 desktop.open(homeFolder);
74 }
75 }
76 } catch(final Exception ex) {
77 ex.printStackTrace();
78 }
79 }
80
81 public static void main(final String args[]) {
82 org.junit.runner.JUnitCore.main(TestBug611AWT.class.getName());
83 }
84}
Specifies the the OpenGL profile.
Definition: GLProfile.java:77
static void initSingleton()
Static initialization of JOGL.
Definition: GLProfile.java:204
As reported in Bug 611, on Windows XP is a performance issue: After JOGL initialization there seems t...