Article View: borland.public.jbuilder.java.api
Article #966Re: Probelm with System.setProperty("java.class.path",...)
From: Gillmer J. Derge [TeamB]
Date: Thu, 27 Jun 2002 17:46
Date: Thu, 27 Jun 2002 17:46
20 lines
1787 bytes
1787 bytes
"DMG" <apolo_21@yahoo.com> wrote in message news:3d1adbf4_1@dnews...
> I have a little problem. I am using a tool called
> bcel(http://jakarta.apache.org/bcel/) for examing jar files. When I
choose a
> jar file I put it in the classpath with
> System.setProperty("java.class.path",jarfile + File.pathSeparator+
> System.getProperty("java.class.path")).
I don't think you can set the class path like that. I don't think there's
a mechanism for the system class loader to react to your new class path, so
it will still search the original path for any classes you try to load.
You might need to look into using your own URLClassLoader, so you can more
easily control what is and isn't on the load path.
The article below has more information about using class loaders.
http://developer.java.sun.com/developer/TechTips/2000/tt1027.html
--
Gillmer J. Derge [TeamB]
Technical Details
Message-ID:
<3d1b4f66$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3d1adbf4_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,a0fc198957ce3864
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-06-27 11:11:57 PST
From: "Gillmer J. Derge [TeamB]" <spam@gillmerderge.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3d1adbf4_1@dnews>
Subject: Re: Probelm with System.setProperty("java.class.path",...)
Date: Thu, 27 Jun 2002 13:46:57 -0400
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 24.58.130.24
Message-ID: <3d1b4f66$1_1@dnews>
X-Trace: dnews 1025199974 24.58.130.24 (27 Jun 2002 10:46:14 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews