jar problems

Hi

I'm trying to create a jar file which includes two jar-packages and contains a main class.

The manifest file that I have created is:
Manifest-Version: 1.0
Created-By: esi
Main-Class: main.PrislisteMain
Class-Path: "ext_jars/jt400Native.jar" "ext_jars/"ext_jars/poi-2.5.1-final-20040804.jar"

But when I run jar... the Class-Path is ignored and the manifest file in the jar looks like this:
Manifest-Version: 1.0
Created-By: esi
Main-Class: main.PrislisteMain

When I try to run the jar I get: "Could not find the main class"

I'm sure that I'm pointing to the right mainClass-file, and the external jars are included when I pack my jar.

If anyone has any idea, please help

Thanks in advance
nesnemis
LVL 3
nesnemisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

objectsCommented:
looks like your " don't match
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
objectsCommented:
i'd suggest getting rid of them altogether
0
girionisCommented:
> Class-Path: "ext_jars/jt400Native.jar"
> "ext_jars/"ext_jars/poi-2.5.1-final-20040804.jar"

Change the above to

Class-Path: ext_jars/jt400Native.jar ext_jars/poi-2.5.1-final-20040804.jar

and try again. Also make sure that your main class is the PrislisteMain and it is in the /main folder.

0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

sciuriwareCommented:
Did you put those 2 other .jars INSIDE your primary .jar?  That's not right,
you can merge them or keep them apart, but you can't put a .jar inside another .jar!
<*>
0
nesnemisAuthor Commented:
>looks like your " don't match
I see that now, but I've tried earlier wihtout the "'s and that did'nt work either. My main class file is located correctly

But I got it to work, I added two blank lines at the end of my manifest file and it worked!!!

Do you have an idea of why you need that?

Anyway, I'm splitting the points between objects and girionis for quick answers and trying to help, and when I don't post the correct manifest file, it's not easy to see what the real problem is :)

nesnemis
0
sciuriwareCommented:
The extra lines at the bottom of a manifest are mandatory, but not explained by SUN (as far as I know).
I think it's a (small) bug or some future reservation in java.
<*>
0
nesnemisAuthor Commented:
>Did you put those 2 other .jars INSIDE your primary .jar?  That's not right,
>you can merge them or keep them apart, but you can't put a .jar inside another .jar!

works for me...
0
girionisCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.