Make Java Executable

[ad_1]
Step by Step Directions:

I’ve been asked many times to show how to make a java program executable. It is actually very easy to make Java executable on any computer.

The main tool you’ll use on a PC is the Command Line or DOS Prompt. To find it click Start and in the box at the bottom type cmd.exe. If you’re on a MAC, just search for terminal in the search box.


Posted

in

by

Tags:

Comments

27 responses to “Make Java Executable”

  1. Daniel Pan Avatar

    You do not know how much you seriously helped me. I have looked all over the internet to kind out how to run a file by just double clicking but all they ever showed was just using Command Prompt/Terminal and that was the end of all their videos. This video explained so well, regardless of even using Terminal, because you also showed the equivalent for Command Prompt in Windows. Again, thank you so much and I will continue to see if there are any other further videos that you have to help me πŸ™‚

  2. Mohammed Hamouda Avatar

    awesome man, many thanks

  3. ε‘¨ζ˜Ÿζ˜Ÿ Avatar

    Okay, guys don't forget the

    <return> or <enter>

    after "Main-Class: Filename" in the text file, or you will get some strange error.

  4. William Combs Avatar

    THANK YOU!!

    It's sometimes just the simple things that make all the difference.

  5. Fernando Hood Avatar

    These guys always leave out the most important things. This does not work most of the time unless certain run time libraries are present..

  6. Abir Mahmood Abir Avatar

    hello derek , i exported the runnable jar file of your paint app but the resources are not included there . i mean the images for icons doesn't work. what should i do?

  7. John Nico Austria Avatar

    I do this on my gui programs. I follow all the steps and I created a jar file. But if I open it, nothing happens.

  8. Ryan Davis Avatar

    great demonstration!

  9. simon rothman Avatar

    It gives me an error at the very start. It says as following:

    'javac' is not recognized as an internal or external command,
    operable programm or batch file.

    What am I supposed to do?

  10. Runnable19 Avatar

    What is the difference between this and "Clean and Build Project" on Netbeans ?

  11. SicholanTUBE Avatar

    this does not help me at all

  12. Analysis InfoSec Avatar

    How long did it take you to become such an excellent and versed programmer?

  13. Sofia YT Avatar

    hey Derek my runs and everything but my photo assets don't show when i run it

  14. Giovanni Gonzalez Avatar

    When i try to open the .jar file my MacBook says "The Java JAR file could not be launched. Check the console for possible error messages.

  15. IRGeekSauce Avatar

    Where can I find information on getting rid of the ".jar" in the application name? I have a small app that I made, and I created the .jar, but any java apps I see don't have the .jar extension in the name. It's just an executable with the app name. ???

  16. Yiannis Ioannidis Avatar

    Good One.
    But how can we make an executable jar which has dependency to some other jar?
    How can we reference from the command line to that dependency jar so as our App to run successfully?

  17. Indian Pulse Avatar

    ur sound is so irritating

  18. KittenFlash Avatar

    Hey @Derek Beans! I have done everything exactly like you but it doesen't work.
    Everytime I start the main file an error shows up: Could not find the main class. Programm will exit.
    Can you please help me

  19. The A-Project Avatar

    Hi derek, it seems that i cannot run my simple application. It says thatcould not find or load main class, i have changed my directory even to the folder containing the class file . I am using windows. pls help thanks

  20. Matthew Quinn Avatar

    Hi Derek, having a bit of trouble with this.

    I have a main class and another class that is related to this class (extends it).

    I made the manifest file and the cmd prompt line, but when I run the jar file I get an error: "a java exception has occurred".

    Can you please help? Thanks

  21. Antendol Miles Avatar

    its not working in pc

  22. Oliver Griffin Avatar

    Hi Derek! I am having a problem. I made a simple program called Test to use for this video, which has 2 classes in it, the main one being Test. However, every time I try and run my program, it says "Error: Could not find or load main class Test". This is after following everything you did in the video. Any help fixing this problem would be appreciated! πŸ˜€

  23. Connor Brown Avatar

    I can't even find the files on my mac

  24. navid617 Avatar

    If you have .txt files going with your class, where would you save them?

  25. fpspsyduck Avatar

    im getting this as an error: Invalid or corrupt jarfile manifest.txt
    what does this mean and how can i fix it?

  26. Max Taylor Avatar

    Hey Derek
    how do you enhance the "javac -d ../classes *.java" command so that it walks the tree of packages and avoid jamming them into a single location.
    Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *