Thanks for welcoming me to the community!
I'd like to get some help regarding Run/Debug configuration in IntelliJ IDEA. We use a .jar file and I need to setup a run configuration in my IDE. I go to Run>Edit Configurations>JAR Application and then the various options pop up. I have the .jar file but wish to know which properties need to be set in which fields. We use a .bat file to startup the .jar and I'm posting the same below.
Could someone please look at the start.bat file and tell me what I need to be feeding into my Run/Debug options?
java -Djsse.enableSNIExtension=false -Xmx1200m -XX:MaxPermSize=256M -agentlib:jdwp=transport=dt_socket,server=y,address=30306,suspend=n -jar my-sample-jar.jar -gui
Here's what I see in my IntelliJ window :
Besides, I used Maven to build up the project in IntelliJ (by importing the .pom file). Appreciate your valuable feedback, looking forward to contributing here!
Welcome Manan! You should be able to create a target for the jar application in IntelliJ by following these steps.
EDIT: Upon initially reading your question I didn't see you already had the steps for creating a new jar configuration, but I'll leave the images here for future readers.
First, open your run/debug configurations in the top right:
Then create a new configuration with the plus:
Enter the appropriate information for the jar. I've edited and shown what you should use. (Comments aren't valid and for demonstration)
You can run or debug the configuration by selecting from the dropdown and selecting the required button. ctrl-d debugs and ctrl-r runs by default.
To expand upon what you should enter for the fields (see the image above for your exact configuration):
-Xmx1200m
sets the maximum RAM of the JVM. I tested what I showed for your configuration. You can separate them with spaces as you would on the command-line.java programName arguments
.Default
.Note you can directly run your Maven project without creating a jar first, just in case that's what you're doing. Also, the -XX:MaxPermSize=256M
appears to be deprecated and using address 30306
caused an error when I tested, but an arbitrary 5005
did work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With