Results 1 to 6 of 6

Thread: Creation of jar file with MS-DOS

  1. #1
    Join Date
    Dec 2009
    Posts
    211

    Creation of jar file with MS-DOS

    Hello,
    First, I created a file MANIFEST.MF in the META-INF folder that contains the following lines:
    Code:
    Manifest-Version: 1.0
    Created-By: 1.5.0_04 
    Main-Class: someclass
    The file that contains the hand is some.class. I moved the file jar.exe and the folder containing two other folders.
    MS DOS I typed the following command:
    Code:
    cvfm as.jar jar META-INF \ MANIFEST.MF C-cla /.

  2. #2
    Join Date
    Nov 2009
    Posts
    343

    Re: Creation of jar file with MS-DOS

    Hello,
    I think you're right for the command line to better understand things, then I advise you to use an IDE, which it alone, or a tool like Ant (which has its own forum on developing. net), which is everything you want and more. An eclipse like IDE can help you a lot when working with such programs. I think it is better for you to shift to the IDE and write such programs that will definitely help you.

  3. #3
    Join Date
    Nov 2009
    Posts
    356

    Re: Creation of jar file with MS-DOS

    Hello,
    The source code for these classes has good line
    Code:
    package somepackage;
    If they do not belong to the package and it will cause an error. Rather than moving the executable should be better that you change the environment variable PATH your system. I do not know the exact syntax of jar, but I do not remember having used the-C, which from what I understand uses the directory as cal working directory (in this case its content should be added directly to the root).

  4. #4
    Join Date
    Nov 2009
    Posts
    518

    Re: Creation of jar file with MS-DOS

    Hello,
    I agree with the above post and I would like to add to the above post. I think you should try something like:
    jar cvfm some.jar MANIFEST.MF file
    Starts the jar command line to get an error message more explicit:
    Code:
    java-jar some.jar
    And you can also use a ZIP archiver to verify that the contents of your jar is very correct (check in particular tree and the contents of manifest). Hope the information will help you.

  5. #5
    Join Date
    Dec 2009
    Posts
    211

    Re: Creation of jar file with MS-DOS

    Hello,
    I used the IDE JCreator v 4.0. It is not necessary to a package. I used the jar command cvfm as.jar MANIFEST.MF files, if the same problem. When I threw the jar in a command line I get an error
    Code:
    error: Exception in thread "main" java.lang.NoClassDefFoundError file /
    Do you have an idea about this then please help me with this. Also if you have any alternative solution for this then please post back with the same.

  6. #6
    Join Date
    Nov 2009
    Posts
    335

    Re: Creation of jar file with MS-DOS

    Hello,
    From the description of your first class post Authentication should belong to the package call. Now if what you set in your manifest is not consistent with your code is normal that you get exceptions to the execution. If you need more information on this then you can visit the Sun's official site and their you can find a detailed information on the jar files.

Similar Threads

  1. Replies: 5
    Last Post: 13-06-2012, 02:04 PM
  2. Modify file or folder creation date
    By Abode in forum Portable Devices
    Replies: 4
    Last Post: 24-09-2010, 07:35 AM
  3. Creation of an index for file
    By killerboy in forum Software Development
    Replies: 4
    Last Post: 23-04-2009, 11:01 PM
  4. about creation file error
    By shortie009 in forum Operating Systems
    Replies: 3
    Last Post: 09-12-2008, 11:49 AM
  5. Creation / Opening file:
    By rohit007 in forum Software Development
    Replies: 2
    Last Post: 03-10-2008, 07:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,228,288.30210 seconds with 17 queries