The main differences will be the directory it is run from, the specific version of Java you use and the command line options.
Of these, the most likely cause of a problem is running a different version of Java. I would check that
java -version
is the same as in netbeans.
I would also run your JAR from the command line to ensure that you see an exceptions/error produced.