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
Solved

Executable JAR File but no Manifest

Posted on 2004-04-21
9
679 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

789 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