Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



Creation of jar file with MS-DOS

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 08-03-2010
Member
 
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 /.
Reply With Quote
  #2  
Old 08-03-2010
Member
 
Join Date: Nov 2009
Posts: 344
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.
Reply With Quote
  #3  
Old 08-03-2010
Member
 
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).
Reply With Quote
  #4  
Old 08-03-2010
Member
 
Join Date: Nov 2009
Posts: 520
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.
Reply With Quote
  #5  
Old 08-03-2010
Member
 
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.
Reply With Quote
  #6  
Old 08-03-2010
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Creation of jar file with MS-DOS"
Thread Thread Starter Forum Replies Last Post
Modify file or folder creation date Abode Portable Devices 4 24-09-2010 08:35 AM
Creation of an index for file killerboy Software Development 4 24-04-2009 12:01 AM
Monitor folder for file modification, creation or deletion using WMI Highlander Windows Server Help 5 27-01-2009 07:45 PM
about creation file error shortie009 Operating Systems 3 09-12-2008 11:49 AM
Creation / Opening file: rohit007 Software Development 2 03-10-2008 08:50 PM


All times are GMT +5.5. The time now is 11:04 AM.