Solved

Executable JAR File but no Manifest

Posted on 2004-04-21
9
681 Views
Last Modified: 2008-02-01
I have an executable JAR file that i did not create.  its for a demo of a trading application.

if i try to run it i get :  Failed to Load Main-Class Manifest attibute from xyz.jar

let me start by saying im not a developer but know just enough to be dangerous.

if i view the contents of the jar file with 'jar tf' i can see all the packages/classes and reference to META-INF\Manifest.mf

there is no presence of a manifest file in the directory structure of the provided CD.

is the anyway for me to figure out what the main-class value should be and 'hack' my own manifest or do i have to go back to the developer/provider?
0
Comment
Question by:kdegiglio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10884768
It may not be an executable one

try

java -classpath xyz.jar LikelyLookingClassName
0
 

Author Comment

by:kdegiglio
ID: 10884780
xp seems to think it is exeutable because the TYPE shows as "EXECUTABLE JAR FILE"

could that be misleading, or is it probably correct?

i will try the above with a few different classnames.  
is there any way to interrogate the jar for the presence of a main?
0
 
LVL 92

Expert Comment

by:objects
ID: 10884788
grab jstart at http://www.objects.com.au/products/jstart
Use it to open your jar and it will tell you what main's are available.

> could that be misleading, or is it probably correct?

yes, thats just cause its a .jar
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:CEHJ
ID: 10884795
>>could that be misleading

Yes. It always says that
0
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 125 total points
ID: 10889409
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10893332
kdegiglio, can you tell us how you used that comment as the answer?
0
 
LVL 92

Expert Comment

by:objects
ID: 10894130
did jstart help u find any main()'s?
0
 

Author Comment

by:kdegiglio
ID: 10894627
the first link in the accepted answer allowed me to find the main class by greping
0
 
LVL 92

Expert Comment

by:objects
ID: 10894679
did u try jstart? am just looking for some feedback.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question