Package apps
Class SampleMinimalProgram
java.lang.Object
apps.SampleMinimalProgram
A simple example of a "Faceless" (no gui) application
This file is part of JMRI.
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 -
Constructor Summary
ConstructorsConstructorDescriptionSampleMinimalProgram(String[] args) Constructor starts the JMRI application running, and then returns. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcodeConfig(String[] args) protected static voidStatic method to get Log4J working before the rest of JMRI starts up.static voidstatic StringstartupInfo(String program) Static method to return a first logging statement.
-
Field Details
-
name
-
-
Constructor Details
-
SampleMinimalProgram
Constructor starts the JMRI application running, and then returns.- Parameters:
args- command line arguments set at application launch
-
-
Method Details
-
main
-
startupInfo
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
Static method to get Log4J working before the rest of JMRI starts up. In a non-minimal program, invoke jmri.util.Log4JUtil.initLogging -
codeConfig
-