I am facing an issue where I need to run a jar file from cmd.
This jar was compiled using jdk 1.5.The server from where I run this jar file has jdk 1.4 and jre 1.4 set in the path.
I don't have the necessary permissions to modify this path from the environmental variables because of business issues.
I tried to set the path from cmd prompt using the below command
set path=%path%; "C:\Program Files\Java\jre1.5.0_05\bin"
now when I check the version of the java jre again it still shows the older version 1.4
I cannot override the path variable using
set path="C:\Program Files\Java\jre1.5.0_05\bin"
as it affects the other variables.
Please can someone help me with a workaround for this issue so that I can run the jar from cmd while at the same time run it using jre1.5?Is there any such command which allows setting the jre version at the same time while running the jar?