Results 1 to 8 of 8
  1. #1
    ravian is offline Senior Member
    Join Date
    Nov 2007
    Posts
    115
    Rep Power
    0

    Default JAR file with .java files

    Usually JAR files have class files packed in. I want to pack the .java files along with .class files into JAR file. Please tell me how this is possible.

    Why this is not a common practice?

  2. #2
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    its the easy process if ur using any tool of java.just right click on the file then select Export then in jva folder jar format...and continue ..

  3. #3
    ravian is offline Senior Member
    Join Date
    Nov 2007
    Posts
    115
    Rep Power
    0

    Default

    Thanks. I want to do it from command prompt using JAR tool. How to do it?

  4. #4
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    i think tool is must to do that.., i dont know...from command prompt

  5. #5
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    ya man i got it 4 ur sake

    jar cf archive_name.jar files

    examples:
    jar CF example.jar One.java

    jar CF example.jar One.java Two.java Three.java

  6. #6
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    i think in adv java u only posted about, Anonymous class check that one also

  7. #7
    ravian is offline Senior Member
    Join Date
    Nov 2007
    Posts
    115
    Rep Power
    0

    Default

    Thanks a lot man for looking into this.
    I appreciate.

  8. #8
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    pack the .java files along with .class files into JAR file. Please tell me how this is possible
    See here Creating a JAR File.
    Why this is not a common practice?
    Sometimes jar files are used to conserve band width for network use.

Similar Threads

  1. Applet - reading text files packed into JAR file
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:15 AM
  2. How to read a text file from a Java Archive File
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:13 AM
  3. How to filter files in file upload using html contorl
    By deivaganesh in forum Advanced Java
    Replies: 0
    Last Post: 01-29-2008, 06:31 AM
  4. Replies: 20
    Last Post: 12-17-2007, 03:20 PM
  5. Replies: 1
    Last Post: 06-06-2007, 04:20 AM

Posting Permissions

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