Endorsed libraries, classpath

K

Krishnan Raghu

I have a few .jar files in C:\j2sdk1.4.2_03\jre\lib\endorsed that are
required for an application that I'm coding. I currently run the application
as follows:

$> java AppRun

Java adamantly requires the .jar files to only be in the endorsed\ directory
for this to work.. But I would like my application to run with the .jar
files being in the same directory as the application *without* having them
in j2sdk/jre/lib/endorsed:
$> java -classpath . AppRun

(For instance, if AppRun.java and AppRun.class are in C:\work, I want to be
able to move all the required .jar files currently in endorsed\ to inside
C:\work and still get the application to run).

Any suggestions?

Thanks!
Krishnan
 
H

Hans Kratz

Krishnan said:
I have a few .jar files in C:\j2sdk1.4.2_03\jre\lib\endorsed that are
required for an application that I'm coding. I currently run the application
as follows:

$> java AppRun

[...]

(For instance, if AppRun.java and AppRun.class are in C:\work, I want to be
able to move all the required .jar files currently in endorsed\ to inside
C:\work and still get the application to run).

Any suggestions?

java -Djava.endorsed.dirs="C:\work\endorsed" AppRun


Best regards,


Hans
 
K

Krishnan Raghu

Hans Kratz said:
Krishnan said:
[...]

(For instance, if AppRun.java and AppRun.class are in C:\work, I want to be
able to move all the required .jar files currently in C:\j2sdk1.4.2_03\jre\lib\endorsed\ to inside
C:\work and still get [AppRun] to run).

Any suggestions?

java -Djava.endorsed.dirs="C:\work\endorsed" AppRun

Very nice, thank you.

-Krishnan
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top