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 9 of 9
  1. #1
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts

    Making a .jar file

    How would I change all of my class files into one jar file?

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Lost in Localhost...
    Posts
    702
    Thanks
    3
    Thanked 43 Times in 42 Posts
    What operating system are you on?

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Just follow the instructions here:
    http://neptune.netcomp.monash.edu.au.../howto/jar.htm
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    @Millenia:Windows XP

    @Spook: Ok, So in my command prompt I would just say:

    Code:
    jar CF example.jar Example1.class Example2.class Example3.class

    Does that look right?

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Quote Originally Posted by kosstr12 View Post
    @Millenia:Windows XP

    @Spook: Ok, So in my command prompt I would just say:

    Code:
    jar CF example.jar Example1.class Example2.class Example3.class
    Does that look right?
    Depends on what kind of jar file you are trying to create? What is it you are trying to accomplish with a jar file?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #6
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Spookster View Post
    Depends on what kind of jar file you are trying to create? What is it you are trying to accomplish with a jar file?

    I have a Runescape Private server client that run's offline, But it has like 50 class files. I need to get all of my classes compiled so I can embed the client on a website.

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    So you just want to archive them all in one file then? Just follow the instructions in the first part.

    http://neptune.netcomp.monash.edu.au...lesToAnArchive
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #8
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Spookster View Post
    So you just want to archive them all in one file then? Just follow the instructions in the first part.

    http://neptune.netcomp.monash.edu.au...lesToAnArchive

    I did that, But It gave me the "Jar is not recognized as a command blah blah blah"

    If I uploaded all of the classes in a rar file, could someone transfer it for me?

  • #9
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Do you not have the JDK installed with the paths set up properly? I assumed you did since you are compiling java code. If you are getting an error saying jar is not a recognized command then you either don't have the JDK installed or you did not add the JRE bin directory to your system path. Add that bin directory to your system path and open a new command prompt.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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