how do i make my program executable so that i can send to other people? I used BlueJ to make a jar file, but when i try to run it i get a fatal exception error.
Printable View
how do i make my program executable so that i can send to other people? I used BlueJ to make a jar file, but when i try to run it i get a fatal exception error.
Creating a JAR is the normal way of doing it - what error are you getting?
"fatal exception - program will now exit"
that's it, completely. i've made jar files before and they work. I don't know if its got anything to do with the newer beta version of bluej or not.
Post the JAR.
unhandled exception.. did your program take arguments ?
Doesn't take any arguments.
I had to rename the file from jar to rar so i could upload to that server.
jar file
The 2 subfolders included, images and data, contain files that my program uses. So the directory structure must remain intact. Would the program's access of external files be causing the error?
I meant post the JAR file you've created. Anyway, I created a JAR of your code. You (or your IDE) has generated a manifest file that says that you execution entry point is the class MainFrame, but it says that it doesn't have a "main" method i.e. a method that begins:
Code:public static void main(String[] args) {
// ...
}
that was the jar file i created. I didn't know that you had to put the args in the main method. I never need to pass it arguments, so I dont bother adding it. But that fixed it.
Yup - it's ALWAYS required.