Image for post
Image for post

How to debug a JAR in terminal and IDE (Java)

How to run a JAR from a terminal/cmd

java -jar YOUR_JAR.jar
java -cp MyJar.jar com.mycomp.myproj.AnotherClassWithMainMethod

How to debug a JAR in your IDE

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044

Conclusion

Written by

Senior Software Engineer @LeanIX. Co-founder of Sedeo. Passion for software engineering and startups. Looking forward to build great things. 有難うございます。🚀

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store