473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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.class, 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.edu
ta***@eecs.cwru.edu
mu*********@cwru.edu
http://genomics.cwru.edu

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

Phil...

"cvissy" <c.***@webmail.co.za> wrote in message news:51**************************@posting.google.c om...
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.MF"
Is this not true?


it is true.... the jar utility creates a default manifest file...
"MANIFEST.MF" 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
by: Santhu | last post by:
What is the difference between METADATA and MANIFEST and where do they get stored? Thank you
3
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...
2
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...
0
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...
3
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: ...
4
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...
3
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...
1
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....
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.