Classpath in java code ?!?

Discussion in 'Java' started by cccc, Jun 4, 2004.

  1. cccc

    cccc Guest

    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
     
    cccc, Jun 4, 2004
    #1
    1. Advertising

  2. 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.
     
    Michael Borgwardt, Jun 4, 2004
    #2
    1. Advertising

  3. cccc

    cccc Guest

    Thanks,
    I need set classpath in my Java Web Start application.
    Is possible out of code?

    CC

    "Michael Borgwardt" <> ha scritto nel messaggio
    news:...
    > 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.
     
    cccc, Jun 4, 2004
    #3
  4. 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
     
    Andrew Thompson, Jun 4, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flip
    Replies:
    3
    Views:
    7,337
    Tony Morris
    Feb 9, 2004
  2. Gabe
    Replies:
    3
    Views:
    1,093
  3. Replies:
    2
    Views:
    774
  4. Aryeh M. Friedman

    changing the classpath at runtime in code

    Aryeh M. Friedman, Oct 25, 2007, in forum: Java
    Replies:
    12
    Views:
    654
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Oct 27, 2007
  5. Replies:
    2
    Views:
    1,125
    Mike Schilling
    Mar 2, 2008
Loading...

Share This Page