Solved

Executable JAR File but no Manifest

Posted on 2004-04-21
9
684 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

688 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