🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #94

java.exe -jar my.jar

#94
From: Petar Popara
Date: Tue, 03 May 2005 09:48
18 lines
1602 bytes
    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: <427748b8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!pd7cy1no!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,16a3ebffbd1a4075,start
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Petar Popara" <none>
Newsgroups: borland.public.jbuilder.java.api
Subject: java.exe -jar my.jar
Date: Tue, 3 May 2005 11:48:17 +0200
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 193.138.1.206
Message-ID: <427748b8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115113656 193.138.1.206 (3 May 2005 02:47:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!pd7cy1no!pd7cy2so!shaw.ca!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail