making my program executable


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: making my program executable

  1. #1
    Join Date
    Mar 2004
    Posts
    635

    making my program executable

    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.

  2. #2
    Join Date
    Mar 2003
    Posts
    834
    Creating a JAR is the normal way of doing it - what error are you getting?
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Mar 2004
    Posts
    635
    "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.

  4. #4
    Join Date
    Mar 2003
    Posts
    834
    Post the JAR.
    ArchAngel.
    O:-)

  5. #5
    Join Date
    Feb 2004
    Posts
    808
    unhandled exception.. did your program take arguments ?
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  6. #6
    Join Date
    Mar 2004
    Posts
    635
    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?

  7. #7
    Join Date
    Mar 2003
    Posts
    834
    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) {
        // ...
      }
    ArchAngel.
    O:-)

  8. #8
    Join Date
    Mar 2004
    Posts
    635
    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.

  9. #9
    Join Date
    Mar 2003
    Posts
    834
    Yup - it's ALWAYS required.
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center