how to set Java classpath using java code

Can I set environment variables in java using java program. . With out going to properties->Advanced->Environment Variables and set the path.

cheers

mallik

[174 byte] By [mallik.83a] at [2007-11-27 10:53:21]
# 1

http://forum.java.sun.com/thread.jspa?threadID=5196002&tstart=0

Double post. Post replies in other thread.

floundera at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 2

use Runtime.

http://forum.java.sun.com/thread.jspa?threadID=780815&messageID=4441376

Pls. don't double post

Message was edited by:

Yannix

Yannixa at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 3

not that it would do you any good.

jwentinga at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 4

What is it about "post replies in other thread" that people don't understand?

floundera at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 5

Thanks...

but the data in the bellow link not solve my problem.!!!!

http://forum.java.sun.com/thread.jspa?threadID=780815&messageID=4441376

cheers

mallik

mallik.83a at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 6

> Thanks...

> but the data in the bellow link not solve my

> problem.!!!!

>

> http://forum.java.sun.com/thread.jspa?threadID=780815&

> messageID=4441376

>

> cheers

> mallik

then try this:

how to execute dos command

http://java.ittoolbox.com/groups/technical-functional/java-l/how-to-execute-dos-command-249513#

Yannixa at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 7

@Yannix: be aware that the variables you set using Runtime.exec() on are only valid for that special shell process and are by no means global. If the OP wants to set the classpath for his own program, it will get him nowhere. I'd suggest using UrlClassLoader so a classpath isn't needed, but then, I'd even more suggest that the OP should give us a usable description of his intents and problem.

CeciNEstPasUnProgrammeura at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...
# 8

got it master CeciNEstPasUnProgrammeur!

Yannixa at 2007-7-29 11:43:39 > top of Java-index,Java Essentials,Java Programming...