how do i make executable

Reply

Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

how do i make executable

 
0
  #1
Nov 11th, 2005
hello,

I am using netbeans and i wonder how you make a executalbe so you can drag and drop it into a floppy then run the prog on someone else's computer.

Is it call making a jar file or sommthing. ANy help is this simple or wat?

God bless.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: how do i make executable

 
0
  #2
Nov 11th, 2005
You can't, period.

There are some tools that will create exe-wrappers but they effectively just pack an entire JVM in with the classfiles.

Create an executable Jar instead, that can then be run on any computer that has a JVM installed by either double clicking on it (if the machine is so configured) or by using the java -jar <somejar.jar> command.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: how do i make executable

 
0
  #3
Nov 12th, 2005
Originally quoted by jwenting

Create an executable Jar instead, that can then be run on any computer that has a JVM installed by either double clicking on it
Ok, so how do u do this in netbeans? I got to here but what do i do. My program creates a window with hello world in it. I can't get it to work. This is i got so far
Attached Thumbnails
stuff.JPG  
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: how do i make executable

 
0
  #4
Nov 13th, 2005
Don't know how to do it from Netbeans. Should be mentioned in the documentation somewhere if it's possible.
If not check the JDK documentation for the jar command which tells you how to do it by hand (which you should learn to do anyway, you won't always have netbeans available).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 55
Reputation: NPH is an unknown quantity at this point 
Solved Threads: 1
NPH NPH is offline Offline
Junior Poster in Training

Re: how do i make executable

 
0
  #5
Nov 13th, 2005
You could create a batch file (.bat). This answer is for Windows computers. It is not an executable but it is very simple to make.

Suppose you main method is in the class MyTest. Then create a file called MyJavaRun.bat. (The name is arbitrary)

Inside the file write:

  1. java MyTest
  2. pause
The first line runs the JVM giving it the main class and the second command prevents the window from closing all of a sudden when the program exits.

Then just double click the .bat file and it will run the Java program.

For more help, www.NeedProgrammingHelp.com
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: how do i make executable

 
0
  #6
Nov 14th, 2005
I still cannot do thuis. I follow the instructions but I create a java.content file. not a jar executealbe file? Why is this so hard. Surely someone has netbeans and has created a jar file.



:cry:

I'm trying to keep this as simple as poss... using sams teach meself java 2 in 24 minutes.

  1. import javax.swing.*;
  2.  
  3. public class SalutonFrame extends JFrame {
  4. public SalutonFrame()
  5. {
  6. super ("Salut la monde");
  7. setSize(350,100);
  8. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  9. setVisible(true);
  10. }
  11. public static void main(String[] args)
  12. {
  13. SalutonFrame sal = new SalutonFrame();
  14. }
  15. }

I have create a folder wit two files. one with SalutonFrame.java and one with the class properties.

How do i manifest, is tat the word, this folder and create a jar executalbe in NETBEANS

god bless
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: how do i make executable

 
0
  #7
Nov 14th, 2005
Do you know how to create one via the commandline?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: how do i make executable

 
0
  #8
Nov 14th, 2005
Originally quoted by server_crash

Do you know how to create one via the commandline?
No, can you show me. I just assumed it would be easier in netbeans,since it is uses a point and click interface, but I'm having noo luck.

You will have to explain it step by step. Like how to set the command prompt to the right directory. And stuff. I is very stupid. sorrie



If this works I owe you one
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: how do i make executable

 
0
  #9
Nov 14th, 2005
Hi everyone,

Originally Posted by iamthwee
can you show me
Read the below thread carefully. There are links there that teach you specifically how to make an executable jar step by step

Here is the link

http://www.wizardsolutionsusa.com/fo...read.php?t=100

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: how do i make executable

 
0
  #10
Nov 14th, 2005
He doesn't even know how to compile his sources... Read carefully.

Another victim of the IDE. Learns the tool, not the language, and gets stuck when there's no nice shiny "run" button for something.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC