The class that contains the main method for nucleus is called "ASMain". It is contained in a JAR file called "glassfish.jar" When nucleus is used for other Java servers, these may not be appropriate names. The class name is visible to the user in the following cases:
- in "jps" output
- in the "jconsole" opening screen (here the whole package is visible: com.sun.enterprise.glassfish.bootstrap.ASMain
1. Leave this as it is.
2. Rename the class to something more generic. "Main" is probably too generic because other Java programs, most specifically, NetBeans, uses Main. "GFMain" might be appropriate since the Java package name contains "glassfish".
3. Rename the class to be something specific to nucleus, such as NucleusMain. Rename the JAR file to nucleus.jar. Expect that nucleus-derived products provide their own JAR file that contains main, i.e., a class that extends NucleusMain. This would also require modifying the launcher so that it could identify the right JAR file to launch when starting the server.
Related to this issue is other meta data that is associated with the main program. For example, the jvisualvm program displays the GlassFish logo and "GlassFish" next to the name of the process. This is based on the full class name showing up in the following file in jvisualvm: visualvm/application/src/com/sun/tools/visualvm/application/type/MainClassApplicationTypeFactory.java. If the name of the class is changed, then jvisualvm must be updated too.