Package apps

Class SampleMinimalProgram


  • public class SampleMinimalProgram
    extends java.lang.Object
    A simple example of a "Faceless" (no gui) application
    This file is part of JMRI.

    JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

    JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      SampleMinimalProgram​(java.lang.String[] args)
      Constructor starts the JMRI application running, and then returns.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void codeConfig​(java.lang.String[] args)  
      protected static void initLog4J()
      Static method to get Log4J working before the rest of JMRI starts up.
      static void main​(java.lang.String[] args)  
      static java.lang.String startupInfo​(java.lang.String program)
      Static method to return a first logging statement.
      • Methods inherited from class java.lang.Object

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

      • name

        static java.lang.String name
    • Constructor Detail

      • SampleMinimalProgram

        public SampleMinimalProgram​(java.lang.String[] args)
        Constructor starts the JMRI application running, and then returns.
        Parameters:
        args - command line arguments set at application launch
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • startupInfo

        public static java.lang.String startupInfo​(java.lang.String program)
        Static method to return a first logging statement. Used for logging startup, etc.
        Parameters:
        program - the name of the program
        Returns:
        the logging statement including JMRI and Java versions
      • initLog4J

        protected static void initLog4J()
        Static method to get Log4J working before the rest of JMRI starts up. In a non-minimal program, invoke jmri.util.Log4JUtil.initLogging
      • codeConfig

        protected void codeConfig​(java.lang.String[] args)