The recommended way to add a custom class to Liferay's startup process is to:
A.
Create a portal-ext.properties file in the Liferay Home directory that adds the custom class to global.startup.events, and add the custom class to the deployed Liferay application
B.
Create an Ext plugin that replaces the value of global.startup.events with the custom class, and add the custom class to the plugin
C.
Create a portal-ext.properties file in the Liferay Home directory that replaces the value of global.startup.events with the custom class, and add the custom class to portal-impl.jar
D.
Create an Ext plugin that adds the custom class to global.startup.events, and add the custom class to the plugin