To execute SomeClass.main(String [] args) from a deployed war file do:
Step 1: Write class SomeClass.java that has a main method method i.e. (public static void main(String[] args) {...})
Step 2: Deploy your WAR
Step 3: cd /usr/local/yourprojectsname/tomcat/webapps/projectName/WEB-INF
Step 4: java -cp "lib/jar1.jar:lib/jar2.jar: ... :lib/jarn.jar" com.mypackage.SomeClass arg1 arg2 ... arg3
Note1: (to see if the class SomeOtherClass.class is in /usr/tomcat/webapps/projectName/WEB-INF/lib)
run --> cd /usr/tomcat/webapps/projectName/WEB-INF/lib && find . -name '*.jar' | while read jarfile; do if jar tf "$jarfile" | grep SomeOtherClass.class; then echo "$jarfile"; fi; done
Note2: Write to standard out so you can see if your main actually works via print statements to the console. This is called a back door.
Note3: The comment above by Bozhidar Bozhanov seems correct