Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Packing up a into an executable.

  1. #1
    Member MrLowBot's Avatar
    Join Date
    Nov 2018
    Location
    Sweden
    Posts
    121
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Packing up a into an executable.

    Hey.

    I have two classes, on main and one GUI, and i want them to execute as one jar with everything in it.
    I can normally do this with one class but how do i do this with two classes that need each other?
    Could not find any videos on it so thought that i would ask here first.

    How do i do this? Thanks.
    "Tick, tack"

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,383
    Thanks
    53
    Thanked 2,398 Times in 2,351 Posts

    Default Re: Packing up a into an executable.

    IDEs normally have a way to package your program into a jar file.
    If you are not using an IDE, the jar command can be used to create a jar file that contains all your classes and resources.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. I can not create an Executable .Jar File
    By sakonpure6 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: December 27th, 2013, 07:55 PM
  2. No sound in executable jar
    By BestSanchez in forum What's Wrong With My Code?
    Replies: 9
    Last Post: August 25th, 2012, 06:01 PM
  3. .jar executable
    By mwr76 in forum Java Theory & Questions
    Replies: 2
    Last Post: October 9th, 2011, 11:27 AM
  4. Jar Executable File
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 43
    Last Post: June 23rd, 2010, 03:53 PM
  5. Making executable JAR more "executable"
    By ni4ni in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 1st, 2010, 01:19 PM