473,749 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

manifest files not loading

hi, i'm having a very odd problem... here is my system:

debian linux
java: j2sdk 1.4.1_02

everything is running fine, except for one little problem... i have a
custom manifest file called manifest.txt:

Main-Class: UserInterface

that is the only line in the file... sweet.

so i'm in the directory with my class files (including
UserInterface.c lass, which has the main entry function)

so at the line:
jar cvmf manifest.txt jarfile.jar *.class
everything gets added, and the first line of the verbose output is that
the manifest is added...

but when i try to use:
java -jar jarfile.jar


i get the output saying that the Main-Class attribute for jarfile.jar
failed to load...

so i extract the archive and look at the manifest file...

no entry for Main-Class.

i try switching the "m" and the "f" from the command line (thereby
switching the order of the files listed, too)... but no luck.

i try creating an archive without a manifest ("M" option), and add the
custom one later (the "umf" option)... still pops in a default manifest,
with no reference to a Main-Class attribute....

i'm at wits end... is there maybe a bug in the linux release?

hopefully?

help me, please!

thanks!

murat

--
Murat Tasan
mx**@po.cwru.ed u
ta***@eecs.cwru .edu
mu*********@cwr u.edu
http://genomics.cwru.edu

Jul 17 '05 #1
2 2354
I was under the impression that the manifest file
had to be in the directory "META-INF" and have the
name "MANIFEST.M F"
Is this not true?

Phil...

"cvissy" <c.***@webmail. co.za> wrote in message news:51******** *************** ***@posting.goo gle.com...
Hi there,

I have had the same problem before and you wont believe what I found
was wrong...... I didnt have an end of line character?!?

Honestly!! when I just wrote the line

Main-Class: Whatever

and didnt press enter after 'Whatever', the manifest file in the jar
was not updated..

try this, Im not promising anything tho.

Jul 17 '05 #2
Hi,
I was under the impression that the manifest file
had to be in the directory "META-INF" and have the
name "MANIFEST.M F"
Is this not true?


it is true.... the jar utility creates a default manifest file...
"MANIFEST.M F" in the "META-INF" directory, but this just has default
information.

You can add your own custom information to the default manifest by
creating another file (it can be named anything - im partial to
'man' because it is short). All i put in my 'man' file, when i want
to make the jar executable, is the string indicating the main class.
then i run the script

jar -cvfm myJar.jar man *.*

and it jars everything , however it does put the 'man' file in the jar
too but it doesnt affect anything (you can prevent that by being more
specific about the files yu want included in the jar)
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8707
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
3
1409
by: Gary McGill | last post by:
I have a C# solution with a dozen or so projects. There are references between the projects, and these were all added as "Project" references. Everything's been working fine for months, but suddenly today it all collapsed in a heap. I get a mysterious error when running the project: "The located assembly's manifest definition with name '<MyClass>' does not match the assembly reference" Using the fuslogvw tool I can see that the...
2
5689
by: Alexander Wehrli | last post by:
Hi, I embedded some configuration XML-File into my assembly. Everything goes fine if I want to read these Properties. But if I want to change a property, the runtime says me that this stream is not writable. How can I write to a ManifestResourceStream? Is this impossible? Regards Alexander
0
1075
by: Tom | last post by:
I am using VS 2005 Beta 2. I tried the click once publish wizard to deploy my application.. Now when I try to debug my application I get an error saying that my application can not run due to an "error in the manifest. Re-installing the application may fix the problem." When I delete the manifest files in the /debug directory the application runs...the next time i build the application the manifest files are recreated. I have not found any...
3
3233
by: Jonathan Payne | last post by:
Hi, I am interested in adding a manifest file to the resources for a MFC application. When I create an AppWizard MFC app with a manifest file it adds the following lines to the .rc file: #ifdef _UNICODE IDR_MANIFEST RT_MANIFEST "res\\TestManifest4.manifest"
4
3640
by: Kunle Odutola | last post by:
I'm trying to understand where the information in the META.INF directory including MANIFEST.MF etc is to be found for .NET assemblies. Also some projects such as Eclipse's OSGi kernel stores additional info in the MANIFEST.MF file. What would be the .NET equivalent where such info can be stored? Kunle --
3
4411
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
1
7087
by: John Bowman | last post by:
Hi All, I originally sent this to the dotnet.security ng, but no repsonse in 5 days. Hopefully, someone here can explain to me what's going on. I'm fairly new to .NET app security and manifests. I'm working with a test app: "MyApp.exe". Couple Q's: 1) When I turn on the security project setting in VS2005 for "Enable
0
2319
by: stormogulen | last post by:
Hello all, I'm having some problems understanding how the runtime locates assemblies, and I hope you can help me shed some light on it. I'm deploying a web service, which uses some 3rd party dll (FelibFilterLib.dll). The problem is as follows: 1) The webservice is xcopied to the server, and the dll in question (FelibFilterLib) is located in the bin directory of the web service
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.