Hi Team,

I have learned RMI Applcation basics.I have a Doubt in setting the Codebase and security policy file in the program during compile time itself rather than manually giving it during run time .

During run time we will give like below in the command prompt,

C:>java -cp .;c:\hello.jar -Djava.rmi.server.codebase=file:/c:/hello.jar -Djava
.security.policy=server.policy server.Server

Is there a way to set the " -Djava.rmi.server.codebase=file:/c:/hello.jar -Djava
.security.policy=server.policy "
in the program itself during complie time and then while running

can we simply give like this

java -cp . Server.server

Please advise if there is any method available to achieve this ....

4 Years
Discussion Span
Last Post by ~s.o.s~

AFAIK, not possible without code modifications. The simplest thing would be to just create a script (.bat or .sh file) and run the script everytime instead of typing out the entire command...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.