436 #ifdef MACOSX
437 /* darwin has a per-user temp dir */
438 static char tmp_path[PATH_MAX];
439 int pathSize = confstr(_CS_DARWIN_USER_TEMP_DIR, tmp_path, PATH_MAX);
440 if (pathSize > 0 && pathSize <= PATH_MAX) {
441 sprops.tmp_dir = tmp_path;
442 }
443 #endif /* MACOSX */
444
445 /* Printing properties */
446 #ifdef MACOSX
447 sprops.printerJob = "sun.lwawt.macosx.CPrinterJob";
448 #else
449 sprops.printerJob = "sun.print.PSPrinterJob";
450 #endif
451
452 /* patches/service packs installed */
453 sprops.patch_level = "unknown";
454
455 /* Java 2D/AWT properties */
456 sprops.awt_headless = NULL; // don't set this (to anything) by default
457 #ifdef MACOSX
458 // Always the same GraphicsEnvironment and Toolkit on Mac OS X
459 sprops.graphics_env = "sun.awt.CGraphicsEnvironment";
460 sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit";
461
462 PreferredToolkit prefToolkit = getPreferredToolkit();
463 if (prefToolkit == HToolkit) {
464 sprops.awt_headless = "true";
465 }
466 #else
467 sprops.graphics_env = "sun.awt.X11GraphicsEnvironment";
468 #ifdef JAVASE_EMBEDDED
469 sprops.awt_toolkit = getEmbeddedToolkit();
470 if (sprops.awt_toolkit == NULL) // default as below
471 #endif
472 sprops.awt_toolkit = "sun.awt.X11.XToolkit";
473 #endif
474
475 /* This is used only for debugging of font problems. */
476 v = getenv("JAVA2D_FONTPATH");
477 sprops.font_dir = v ? v : NULL;
478
479 #ifdef SI_ISALIST
480 /* supported instruction sets */
481 {
482 char list[258];
483 sysinfo(SI_ISALIST, list, sizeof(list));
484 sprops.cpu_isalist = strdup(list);
485 }
|
436 #ifdef MACOSX
437 /* darwin has a per-user temp dir */
438 static char tmp_path[PATH_MAX];
439 int pathSize = confstr(_CS_DARWIN_USER_TEMP_DIR, tmp_path, PATH_MAX);
440 if (pathSize > 0 && pathSize <= PATH_MAX) {
441 sprops.tmp_dir = tmp_path;
442 }
443 #endif /* MACOSX */
444
445 /* Printing properties */
446 #ifdef MACOSX
447 sprops.printerJob = "sun.lwawt.macosx.CPrinterJob";
448 #else
449 sprops.printerJob = "sun.print.PSPrinterJob";
450 #endif
451
452 /* patches/service packs installed */
453 sprops.patch_level = "unknown";
454
455 /* Java 2D/AWT properties */
456 #ifdef MACOSX
457 // Always the same GraphicsEnvironment and Toolkit on Mac OS X
458 sprops.graphics_env = "sun.awt.CGraphicsEnvironment";
459 sprops.awt_toolkit = "sun.lwawt.macosx.LWCToolkit";
460
461 // check if we're in a GUI login session and set java.awt.headless=true if not
462 sprops.awt_headless = isInAquaSession() ? NULL : "true";
463 #else
464 sprops.graphics_env = "sun.awt.X11GraphicsEnvironment";
465 #ifdef JAVASE_EMBEDDED
466 sprops.awt_toolkit = getEmbeddedToolkit();
467 if (sprops.awt_toolkit == NULL) // default as below
468 #endif
469 sprops.awt_toolkit = "sun.awt.X11.XToolkit";
470 #endif
471
472 /* This is used only for debugging of font problems. */
473 v = getenv("JAVA2D_FONTPATH");
474 sprops.font_dir = v ? v : NULL;
475
476 #ifdef SI_ISALIST
477 /* supported instruction sets */
478 {
479 char list[258];
480 sysinfo(SI_ISALIST, list, sizeof(list));
481 sprops.cpu_isalist = strdup(list);
482 }
|