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: run jar file inside a jar file?

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default run jar file inside a jar file?

    hi im looking to make a toolkit in java for a game but i dont know how to show the game screen in the .jar file

    the game itself is a jar file and i was wondering how do i inject that into my .jar file so it shows in a gui window?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: run jar file inside a jar file?

    how to show the game screen in the .jar file
    I'm not sure what you are asking. A jar file can contain class files that the jvm can read and use. The jar file needs to be on the classpath for the jvm to find the class files. There are custom classloaders that can read class files from other locations like inside a jar file.

    how do i inject that into my .jar file
    If the other jar file is on the classpath, your classes can use the classes it contains.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. GUI program to edit classes inside a jar file?
    By supercain in forum Java Theory & Questions
    Replies: 1
    Last Post: January 31st, 2013, 08:24 AM
  2. How do I create and run a jar file?
    By Ecen in forum Java Theory & Questions
    Replies: 10
    Last Post: August 4th, 2012, 11:50 PM
  3. Run a jar file inside a batch file with Windows 7 Task schduler
    By kingnachi in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 15th, 2012, 09:20 AM
  4. How to run program from jar file?
    By jammy in forum Java ME (Mobile Edition)
    Replies: 0
    Last Post: March 28th, 2011, 08:39 AM