This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java program" Watch "java program" New topic

java program

Jason Collins

Joined: Mar 23, 2005
Posts: 5
I made a small java program that keeps track of my account. Much like a bank uses. I have no clue how to make this into a installer that after installed with create a .exe to envoke the program to start up and run. Can someone plz direct me to a post about this.. or perhaps even tell me if its possible or how to do it. I have searched now for a couple of hours about this and have seen things like netbeans that is suppose to be used for deployment. However, i still havent understood if this is gonna do what im lookin for.
marc weber

Joined: Aug 31, 2004
Posts: 11343

The Java solution is an executable JAR (Java Archive) file. See this page for a tutorial...

If you really need a Windows .exe from your Java app, there are various third-party products available (e.g., exe4j, JexePack, or JSmooth), although I don't know how well any of these work.
[ April 26, 2005: Message edited by: marc weber ]

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
most will create an executable stub on top of the classfiles, and either still require a JVM to be installed or packing an entire JVM into the exe or required DLLs (with the resulting massive application size).

Jason Collins

Joined: Mar 23, 2005
Posts: 5

that tutorial didnt work for me. The class file the envokes the start of my gui program is a static method. It seems to not recognize that this is the file with my MAIN method in it. I cannot get the program to start if i change this method so thats it no longer static. Y is this.. and what can i do about it? Im soo frustrated at this. Whats the point to learning java if i cant even make the programs installable for my users without going through a bunch of crap. I been tryin to figure this out since i posted this. I hear 40 different ways to do this. I will settle for the executable jar file but its not workin cause it gives me an error that the file i stated as the class file with the MAIN method in it is not the correct one. GRRR! This is mad! This is my first semester in java and I made a B but ill give it up quick if I cant distribute the programs i make easily! Thats just plain dumb.

here is the error i get when i try to run the .jar file. I probably just messed up the manifest file. Which knowing me .. isnt a hard thing to do. anyways here is the error message:

Failed to load Main-Class manifest attribute from C:\Program Files\Java\jdk1.50_02\bin\testWindow.jar

this is my Main-Class file

// This program creates an instance of the *
// Window class. *

[ April 27, 2005: Message edited by: Jason Collins ]
Jason Collins

Joined: Mar 23, 2005
Posts: 5
ok ignorate my ranting and raving.. i fixed it. My dummie butt forgot to hit return and leave a empty line at the end of my manifest file. Like i said.. i was sure i messed it up. Thanks for listening to my ranting .
I agree. Here's the link:
subject: java program
jQuery in Action, 3rd edition