run the jar file created from windows in linux as executable-Collection of common programming errors
If you’ve not used an operating system dependent commands like running a windows command from java (which will not run in linux for sure) or using a windows specific module, your java will run in all other operating systems. This is one of the most significant features of java which is cross-platform and you can run your code in different operating systems which has that operating system specific java runtime environment installed.
So in all operating systems, just you have to run
java -jar yourjarfile.jar