I had a portable JDK on a flashdrive and brought it over to my computer, however, it can not be开发者_运维知识库 used because the JDK points to the JRE on the flashdrive. How do I change this? Where are the java configuration files and what are they called?
Set the (system) environment variable to point to the flashdrive JDK location. Also if you open a command prompt after doing this you will be able to execute javac
and see some output.
If you are using Windows, try opening Control Panel and clicking on "Java". You can edit a number of different settings from this panel.
simplest way in windows creat batch file
set JDK_HOME= .\ set PATH=%PATH%;%JDK_HOME%\BIN
精彩评论