Great question. I haven't had any problems creating JAR files myself, although I appreciate it is a two-step process which might seem a bit complicated. This tutorial walks through the process:
https://www.jetbrains.com/help/idea/creating-and-running-your-first-java-application.html#package
Personally, though, I wouldn't use an IDE to create a JAR file, unless it's only a pet project. You really want a reproducible, automatable process for this, i.e. by using a build tool like
Maven or Gradle. This way, the JAR will be produced the same way whether you create it on your own machine, in the continuous integration environment, or some other system.