Link to home
Start Free TrialLog in
Avatar of kdegiglio
kdegiglio

asked on

Executable JAR File but no Manifest

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?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

It may not be an executable one

try

java -classpath xyz.jar LikelyLookingClassName
Avatar of kdegiglio
kdegiglio

ASKER

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?
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
>>could that be misleading

Yes. It always says that
ASKER CERTIFIED SOLUTION
Avatar of rama_krishna580
rama_krishna580
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
kdegiglio, can you tell us how you used that comment as the answer?
did jstart help u find any main()'s?
the first link in the accepted answer allowed me to find the main class by greping
did u try jstart? am just looking for some feedback.