Article View: borland.public.jbuilder.java.language
Article #701classpath issue
From: Preston
Date: Wed, 01 Dec 2004 22:37
Date: Wed, 01 Dec 2004 22:37
19 lines
1548 bytes
1548 bytes
I have a jar that I've created using JBuilder. If I run the jar from within
JBuilder it works fine. If I run it from the command line I get a
classNotFoundException.
I've tried creating and setting a CLASSPATH environment variable. I've even
tried doing java -jar myjar.jar -classpath pathToDependantJar. Neither of
these has worked.
Finally, I began to wonder if my jar was clearing the path or something
similar so I put in
System.out.println("Classpath = " +System.getProperty("java.class.path"));
When the app runs, it shows the classpath as being myjar.jar and nothing
else.
Why is it ignoring the environment variable or the -classpath parameter. I'm
sure it's an option in JBuilder somewhere.
Preston
Technical Details
Message-ID:
<41ae47c9@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f74b3,d2955265e6ebc78e,start X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Preston" <nospam@nospam.com> Newsgroups: borland.public.jbuilder.java.language Subject: classpath issue Date: Wed, 1 Dec 2004 15:37:28 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 67.164.205.228 Message-ID: <41ae47c9@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101940681 67.164.205.228 (1 Dec 2004 14:38:01 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail