Article View: borland.public.jbuilder.java.api
Article #95Re: java.exe -jar my.jar
From: Arthur Ore
Date: Tue, 03 May 2005 19:18
Date: Tue, 03 May 2005 19:18
30 lines
2083 bytes
2083 bytes
I seem to recall, a few years ago when I tried to manually generate a manifest for a jar file that I got the same error. See http://java.sun.com/docs/books/tutorial/jar/manifest/appman.html and note :- Warning: The text file must end with a new line or carriage return. If my memory is correct, this is what caused the problem for me. Arth "Petar Popara" <none> wrote in message news:427748b8@newsgroups.borland.com... > > I have compressed my project and all dependency jars in my.jar archive. > If I run it like this from CMD line: > > java.exe -jar my.jar > > then an error occur saying that it can't find log4j's Logger class: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/log4j/Logger > > I have included log4j package in my.jar, but the problem is that I > don't know how to specify where it is inside my.jar. I think -classpath > param is only for files on my disk (file system) and not inside my jar > archive (my.jar). I've tried this, but still the same error: > > java.exe -classpath "lib/log4j-1.2.8.jar;lib/...other jars here..." -jar > my.jar >
Technical Details
Message-ID:
<4277ce74@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<427748b8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,16a3ebffbd1a4075 X-Google-Attributes: gid1089d0,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Arthur Ore" <nospamthx_arthur@nospamthx_arthurore.freeserve.co.uk> Newsgroups: borland.public.jbuilder.java.api References: <427748b8@newsgroups.borland.com> Subject: Re: java.exe -jar my.jar Date: Tue, 3 May 2005 20:18:11 +0100 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 82.69.65.131 Message-ID: <4277ce74@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1115147892 82.69.65.131 (3 May 2005 12:18:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail