Solved

Executable JAR File but no Manifest

Posted on 2004-04-21
9
668 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
  • 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
 
LVL 86

Expert Comment

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

Yes. It always says that
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array11 challenge 16 51
HashMap Vs TreeMap 12 48
base64 decode encode 12 96
unix in java example 9 39
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now