This content has been marked as final. Show 3 replies
The question doesn't make any sense to me. If Java needs the JAVA_HOME variable set, how is it ever going to execute any code that does so? And if it doesn't need it, why set it?
If you are setting this for some other applications that you want to use then you're probably doing some platform specific tasks so set it by executing an os command.
what is it that you are actually trying to accomplish?