I have a util class which has a main method. After packaged by Boot Maven plugin, it ends up in BOOT-INF/classes. It does need some other libraries packaged under BOOT-INF/lib. Is there a quick way using the cmdline to run that program, without unzip the jar? Thanks!
            Asked
            
        
        
            Active
            
        
            Viewed 42 times
        
    0
            
            
        - 
                    Is that main class the spring boot's main class? Or other? – acdcjunior Mar 11 '18 at 00:45
 - 
                    1If is an executable jar and the dependencies are specified in the manifest or inside the jar just use, java -jar myjar.jar. See this question https://stackoverflow.com/questions/18413014/run-a-jar-file-from-the-command-line-and-specify-classpath – Jose Da Silva Gomes Mar 11 '18 at 00:57
 - 
                    No, it's my own class, and is not specified in the manifest. – Nathan W Mar 11 '18 at 01:09
 - 
                    You can use command like `java -cp myjar.jar MyMainClass`. – ELITE Mar 11 '18 at 04:42