Class CommandLineArguments

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class CommandLineArguments
    extends java.lang.Object
    implements java.lang.Cloneable
    An instance of this class can be obtained from the application to access the command line options that were passed to the application. The fields of this class map one-to-one with the command line option names, and therefore may change over time, although an effort is made to keep options compatible whenever possible.

    Non-standard options start with an 'x'. These may be revoked at any time in future versions.

    Since:
    3.0
    Author:
    Chris Jennings
    See Also:
    StrangeEons.getCommandLineArguments()
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CommandLineArguments clone()  
      java.lang.String[] getFiles()
      Returns an array of the files included on the command line to be opened when the application starts.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • version

        public boolean version
        When present, this option causes the application to simply print the build number and exit.
      • glang

        public java.util.Locale glang
        This option specifies a locale to use for the game language.
      • ulang

        public java.util.Locale ulang
        This option specifies a locale to use for the user interface language.
      • loglevel

        public java.util.logging.Level loglevel
        This option defines the minimum level of messages which will be logged via StrangeEons.log.
      • resetprefs

        public boolean resetprefs
        When present, all user preferences will be reset to their default values as if the application had just been installed for the first time.
      • plugintest

        public java.lang.String plugintest
        This option runs the application in plug-in test mode, testing the specified bundle.
      • resfolder

        public java.io.File resfolder
        Location of the user resource folder.
      • run

        public java.io.File run
        Script file to run in script mode; see ScriptRunnerModeHelper.
      • x

        public boolean x
        If set, display help for non-standard options and exit.
      • xAAText

        public java.lang.String xAAText
        Non-standard quality-tuning option.

        This option forces the method used to antialias (AA) text. Java attempts to read system-wide AA settings, but this often fails on Linux. So by default Strange Eons uses the default settings on Windows and macOS but will enforce LCD antialiasing otherwise. Setting this option forces a different method:

        auto
        use the value found in system settings
        off
        disable antialiasing
        on
        greyscale antialiasing for all fonts
        gasp
        greyscale antialiasing based on the font's GASP table
        lcd
        subpixel antialiasing for the most common LCD layout (same as lcd_hrgb)
        lcd_hbgr, lcd_vrgb, lcd_vbgr
        subpixel antialiasing for other LCD layouts
      • xDisableJreCheck

        public boolean xDisableJreCheck
        Non-standard development option.

        This option prevents Strange Eons from checking the JRE version at startup. Normally, Strange Eons checks which version of Java it is running against and will refuse to start unless it is a known compatible version.

      • xDebugException

        public boolean xDebugException
        Non-standard development option.

        This option causes an exception to be thrown during startup. It is used to test how ErrorDialog handles uncaught startup exceptions.

      • xDisableProjectRestore

        public boolean xDisableProjectRestore
        Non-standard debugging option.

        This option prevents Strange Eons from attempting to re-open the project that was open the last time the application exited. This may be useful if this is preventing the application from starting normally. This option is set implicitly if the plugintest option is used.

      • xDisableFileRestore

        public boolean xDisableFileRestore
        Non-standard debugging option.

        This option prevents Strange Eons from attempting to re-open the same files that were in use the last time the application exited. This may be useful if this is preventing the application from starting normally. This option is set implicitly if the plugintest option is used.

      • xDisableAnimation

        public boolean xDisableAnimation
        Non-standard debugging and performance option.

        This option disables animation effects that may not be played correctly on some platforms.

      • xDisableStartupThreads

        public boolean xDisableStartupThreads
        Non-standard debugging option.

        If this option is set, certain initialization steps that are normally performed in a separate thread to decrease startup time will instead be performed in the main startup thread. Try setting this option if you encounter unexplained problems while starting the application.

      • xDisableFilterThreads

        public boolean xDisableFilterThreads
        Non-standard debugging option.

        Disables the use of threads to accelerate image filters in the package ca.cgjennings.graphics.filters and use of multiple threads by SplitJoin.

      • xDisablePluginLoading

        public boolean xDisablePluginLoading
        Non-standard debugging and development option.

        Prevents plug-ins from being loaded. This can be used to facilitate building an application class-data sharing archive.

      • xDisableSystemMenu

        public boolean xDisableSystemMenu
        Non-standard debugging option.

        This option disables use of the system menu bar on macOS. It has no effect on other platforms.

      • xDisableAcceleration

        public boolean xDisableAcceleration
        Non-standard debugging and performance option.

        Setting this option will disable optional hardware acceleration regardless of platform. This option supersedes all other acceleration-related options.

      • xEnableAcceleration

        public boolean xEnableAcceleration
        Non-standard debugging and performance option.

        Since many video card drivers do not fully support hardware acceleration, it is disabled by default on Windows. Setting this option will enable it, which means enabling Direct3D acceleration unless the xOpenGL option is also set.

      • xEnableWindowsAcceleration

        public boolean xEnableWindowsAcceleration
      • xOpenGL

        public boolean xOpenGL
        Non-standard debugging and performance option.

        This option attempts to enable the OpenGL rendering pipeline for graphics instead of using the default pipeline. It may result in improved performance on some systems, although it may also result in rendering issues if driver support is poor.

        On Windows, the xWinAccel#xEnableWindowsAcceleration option must also be set. Adding this switch will request OpenGL instead of Direct3D acceleration.

        On Linux, the default is to try to use xrender-based acceleration. Adding this switch will attempt to use OpenGL instead. Either option can fail, in which case software rendering is used.

      • xMigratePrefs

        public boolean xMigratePrefs
        When present, this option forces an attempt to migrate settings from an older Strange Eons 1 or 2 installation, if one exists on this system. Normally, preference migration is only attempted when the (SE3) user preference file does not exist.
      • migratePrefs

        public boolean migratePrefs
        Alias of xMigratePrefs.
      • xRestartLock

        public java.io.File xRestartLock
        Internal use option.

        This option is not meant to be set by the user. It is supplied automatically when the application is attempting to restart itself. The supplied file is a temporary file locked by the application instance that initiated the restart; the restarting instance will repeatedly attempt to acquire its own lock in order to detect when the initiating instance has terminated.

      • console

        public boolean console
        Internal use options.

        Allows some Windows launcher applications to enable "console mode" without the option being rejected.

    • Method Detail

      • getFiles

        public java.lang.String[] getFiles()
        Returns an array of the files included on the command line to be opened when the application starts. Note that the returned array is a copy, so callers may modify it freely.
        Returns:
        a possibly empty array of the files specified on the command line