Page 3 of 3 FirstFirst 123
Results 41 to 45 of 45
  1. #41
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by gowry View Post
    jar cfm jar-file manifest-file *
    Can you put the exact code here you use. I think it's not a bad idea ;)

    Quote Originally Posted by gowry View Post
    specified the folder that containing external jars in the Class-Path attribute.
    So you include that folder, not the files containing in that folders, right?

  2. #42
    gowry's Avatar
    gowry is offline Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    27
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    Can you put the exact code here you use.
    To create myJar.jar I used the command

    Java Code:
    jar cfm myJar.jar manifest.mf *
    I used * because I want to include all the classes in the current directory and its sub directories.


    So you include that folder, not the files containing in that folders, right?
    Not like that.I wrote manifest as:

    Java Code:
    Main-Class: mainClass
    Class-Path: lib/jar1.jar lib/jar2.jar
    and the jar file I created also contains this lib folder.

  3. #43
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  4. #44
    gowry's Avatar
    gowry is offline Member
    Join Date
    Apr 2008
    Location
    India
    Posts
    27
    Rep Power
    0

    Default

    Java Code:
     
    jar cfm myJar.jar manifest.mf pack1\* pack2\* lib\*
    is this you meant?

    it also have the same problem.

  5. #45
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Interesting, either one of the way should work. Only keeping the all folder structure it's work.

    In Netbeans it's true. I can't make a single jar file, because build.xml file keep it's own folder structure to execute the main jar file. I've never try to change there settings. In distribution what I do is create single *.exe file and installation path keep as the initial folder structure. Then I don't want to worried about a single jar file.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 28
    Last Post: 10-26-2010, 04:39 AM
  2. External JavaScript files not loading
    By sajut in forum New To Java
    Replies: 0
    Last Post: 02-15-2008, 05:47 AM
  3. Using Runtime to execute external commands
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-05-2008, 09:14 AM
  4. External Program execution problems
    By vital101 in forum Advanced Java
    Replies: 3
    Last Post: 10-30-2007, 05:17 PM
  5. Use a external file in my program
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:28 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
  •