Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: .jar in JFrame

  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .jar in JFrame

    Hello there fellow programmer.
    I have just started on Java. I have a lot of experience in C#.

    I have a project going on, where I need a .jar (minecraft.jar) to show its grapichs inside a JFrame (I can change this if needed).
    How would i do this?
    I have seen it be done before (http://www.worldofminecraft.com/Game_Client)
    Here the minecraft.jar is running inside a window.
    I am about 99% that this application is made in Java, since it runs from wom.jar

    So question 2, how would I edit the variables stored inside minecraft.jar, from wom.jar?
    The thing is also happening in the program sent above.
    Where we have small modifications to the game, even though minecraft.jar remains untouched.

    I have tried to get in contact with the developer of the program linked above, but he does not reply.

    TL;DR:
    I would like to know how to basically run a .jar inside a JFrame in another .jar.
    And how to make modifications to the game shown, without modifying first named .jar.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You link the external jar in as a resource for your project. You don't manually change anything in an external jar, you use whatever the resource provides you with in its API to perform the modifications. Extend and compose as you see fit.
    If you have an IDE, there should be an option to link in external resources which you can import the class from. Otherwise, it can be performed from javac and jar.
    See here for more information on javac: http://docs.oracle.com/javase/6/docs...ris/javac.html
    And here for jar: http://docs.oracle.com/javase/6/docs...laris/jar.html

    I'd recommend using an IDE to do this for you as its a lot easier to do. It would take time for me to go back and figure out how to do this from javac and jar since its been so long since I've needed to do so.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •