Unlike executable jar there won't be executable war file and why to run class inside war file. Classes inside war files are directly/indirectly loaded by web container/server. if really want to run a class inside a jar which is inside war file, then putting the jar in classpath it can be run as usual.