[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Help needed to run a jar.

Posted on 2006-11-21
5
Medium Priority
?
310 Views
Last Modified: 2012-06-27
Hi All,

I have downloaded  a .jar that contains a manifest  and many .class files only. Attempting to run the jar, the error noted by javaw was that manifest does not have a valid construction, it actually lists no class file that  contains the word "main".

By doing a text search within the jar  for the word "main", I located a certain class file that has it. What suggestions are there to make this program run?
I have win2k and jdk1.5.0_05

I have opened and read the manifest as this:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: duns
Build-Jdk: 1.5.0_06
Extension-Name: freehep-psviewer
Specification-Title: Stand-alone and Embeddable PostScript Viewer
Specification-Vendor: FreeHEP
Implementation-Vendor: FreeHEP
Implementation-Title: freehep-psviewer
Implementation-Version: 2.0-SNAPSHOT


Upon attempting to run the jar :
The notice of failure reads:
Failed to load Main-Class manifest attribute from
freehep-psviewer-2.0-SNAPSHOT.jar

Delphi3
0
Comment
Question by:delphi3
[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
  • 2
  • 2
5 Comments
 
LVL 24

Assisted Solution

by:sciuriware
sciuriware earned 200 total points
ID: 17993672
I think this is just a library to be called from your own program.
This is not a program: it has no main: no entrypoint.

;JOOP!
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 200 total points
ID: 17994076
Simply because there is no Main-Class attribute in manifest file
If you know what is the main class, try running it like this
> java -cp path-to-jar main-class-path
0
 
LVL 4

Author Comment

by:delphi3
ID: 17996125
Hi

As noted in the manifest, since it was built using Build-Jdk: 1.5.0_06
is that a problem since I have jdk1.5.0_05?

 

Delphi3
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 17996975
No that can't be a problem.

;JOOP!
0
 
LVL 4

Author Comment

by:delphi3
ID: 18059831

Hi
I found a program in my files that will add a manifest to a jar.

It is a dead end for now, my need to know is not there any longer.

Closing Q.
D3

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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:
Suggested Courses

656 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