So basically I made a terminal-dependent Java program and want to start handing it out, but I can't seem to find a way to do that without giving them my code. When making a .jar file it only works on Windows.
When trying to run on Linux (CentOS) I get
Exception in thread "main" java.lang.UnsupportedClassVersionError:
and
Could not find the main class: MyClass. Program will exit.
I'm using the command java -jar MyJar.jar to run them on both. I am using JavaMail in this program so perhaps that could be an issue. There is only one class and it has a main in it.
If anyone even has any alternatives to using a jar file to deliver the program where the user can't read the code that'd be great too. Thanks!