Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Classpath in java code ?!?

Reply
Thread Tools

Classpath in java code ?!?

 
 
cccc
Guest
Posts: n/a
 
      06-04-2004
Is possible set the classpath in java code?

Examle:
String var=System.getProperty("classpath");
var+=";C:\\Programmi\\OpenOffice.org1.1.0\\program \\classes\\classes.jar";
System.setProperty("java.library.path",var);


Thanks,
CC


 
Reply With Quote
 
 
 
 
Michael Borgwardt
Guest
Posts: n/a
 
      06-04-2004
cccc wrote:
> Is possible set the classpath in java code?


No. You can, however, create a URLClassLoader that will load classes from a
location you specify.
 
Reply With Quote
 
 
 
 
cccc
Guest
Posts: n/a
 
      06-04-2004
Thanks,
I need set classpath in my Java Web Start application.
Is possible out of code?

CC

"Michael Borgwardt" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> cccc wrote:
> > Is possible set the classpath in java code?

>
> No. You can, however, create a URLClassLoader that will load classes from

a
> location you specify.



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-04-2004
On Fri, 4 Jun 2004 15:30:01 +0200, cccc wrote:

> I need set classpath in my Java Web Start application.


It is possible to identify resources
to JWS, it takes care fo the details
AFAIU*. [ I have not tried it myself ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.classpath file instead of the CLASSPATH Environment variable. dontspammenow@yahoo.com Java 2 03-02-2008 08:19 AM
changing the classpath at runtime in code Aryeh M. Friedman Java 12 10-27-2007 02:50 AM
problem compiling project, classpath in xml ".classpath" "<classpathentry...>" jameshanley39@yahoo.co.uk Java 2 03-02-2007 12:37 PM
while using javac -classpath some.jar some.java (Where does classpath get stored?) Gabe Java 3 08-27-2004 07:02 PM
CLASSPATH, -cp and -classpath misunderstanding? Flip Java 3 02-09-2004 10:09 PM



Advertisments