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

Reply
 
Thread Tools Search this Thread
  #1  
Old 29-07-2010
Member
 
Join Date: Jan 2010
Posts: 126
How to create manifest.mf and jar files in java

Hello,
My question will sound silly but the jar was created from eclipse does not work.
Error was
Code:
Could not locate main class ...
I know the question is stupid and I'm sure it's just stupid to pay but I find it alone as a major. Yet the META-INF exists and the class is good in the package "CEO". Here is my MANIFEST.MF file
Code:
Manifest-Version: 1.0
Main-Class: CEO.Principale
Can any one please help me with this? Thanks in advance.
Reply With Quote
  #2  
Old 29-07-2010
Member
 
Join Date: Dec 2009
Posts: 211
Re: How to create manifest.mf and jar files in java

So what exactly is the problem? Apparently, your jar is properly created, it has the manifest file in (the good one?, That is to say that you have created, not "empty"?), But when you launch the program, outside Eclipse via your jar, it crashes? And your classpath is OK?
For more help
1) How to create an executable jar?
2) What is JAR file? Please explain
3) Creation of jar file with MS-DOS
4) Define Manifest File in Java
5) Define Manifest File in Java
6) How to run a jar file
Reply With Quote
  #3  
Old 29-07-2010
Member
 
Join Date: Jan 2010
Posts: 126
Re: How to create manifest.mf and jar files in java

It is precisely when I run it outside of eclipse that AC plant.
Quote:
And your classpath is OK?
Where should I configure it? My application works fine in eclipse but when I create a jar, and I want to run the application outside of Eclipse using the jar, it is at this moment that I get an error message error.
Reply With Quote
  #4  
Old 29-07-2010
Member
 
Join Date: Nov 2009
Posts: 359
Re: How to create manifest.mf and jar files in java

I used the same as you, the Manifest file but I have no problem. In my opinion this comes from a call when executing. How do you executed your jar? Do you use external jar? For example if you need packages contained in an archive test.jar which is the same as the jar that you created, should be indicated in the manifest and in the CLASSPATH when executing. Then for the execution you do if you executes the command in the directory of your jar if not in place of "." you should put "MYPATH" or MYPATH is the path of your application.
Code:
java-classpath "." -jar test.jar
Reply With Quote
  #5  
Old 29-07-2010
Member
 
Join Date: Sep 2009
Posts: 131
Re: How to create manifest.mf and jar files in java

How to configure Eclipse so that it includes the archives used because I do not swing but swt? I added them in my perspective but eclipse does not include them when creating the jar. There is surely a configuration to do but I do not know which. If anyone has the solution, it is welcome.
Reply With Quote
  #6  
Old 10-08-2010
Member
 
Join Date: Dec 2009
Posts: 263
Re: How to create manifest.mf and jar files in java

In fact, Eclipse is doing all alone with the classpath, through its own system files (. Classpath in each project). So, until we have tried outside of Eclipse, we do not see the difficulty.
Reply With Quote
  #7  
Old 11-08-2010
Member
 
Join Date: Nov 2009
Posts: 330
Re: How to create manifest.mf and jar files in java

Absolutely, nothing like making a small jar to himself in the hand at least we are sure that it works, and we know what is wrong when it does not. It's as if you were forced to open VB to launch your application as being unable to make one. Exe
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create manifest.mf and jar files in java"
Thread Thread Starter Forum Replies Last Post
x86 Vista SP1 failed install due to corrupt manifest files. How do I replace them? CyCoSys Operating Systems 3 09-12-2011 02:40 AM
How to create a rolling log files in java? Cordaro Software Development 4 06-02-2010 08:39 PM
Define Manifest File in Java Sandy22 Software Development 3 09-11-2009 06:34 PM
Manifest files deleting problem Benito Networking & Security 2 13-06-2009 02:56 PM
How to create a manifest for my DLL GunFighter Software Development 3 02-04-2009 12:55 PM


All times are GMT +5.5. The time now is 07:11 PM.