Well if you ran it in Netbeans, then there is a compiled version somewhere in your Netbeans project files. .class files are compiled Java files, and if one of them has a "public static main(String[] args)" method, then you can run it from the command line outside of Netbeans with "java ClassName".

The .jar file is created automatically after you compile the project. Some versions require you to only compile the project and won't create it if you select "compile-and-run". You can locate it on the "[project_name] > dist" folder. That file is the executable for the project; unless it has folder dependencies or any other shenanigans, it should run fine without Netbeans if you just take it and place it anywhere else.