Java path setting batch file


Autoria(s): Prince, Rikki; Prince, Rikki; Mcsweeney, Patrick
Data(s)

03/10/2013

Resumo

This is a batch file written to help students on ECS' Programming 1 course (COMP1202) using iSolutions machines which have the JDK, but do not add it to the PATH variable, making compilation from the command line difficult. It attempts to find the JDK directory and add it to the Windows PATH. The code is as follows: @SET JAVA_HOME=C:\Program Files\Java @FOR /F %%G IN ('DIR /B "%JAVA_HOME%\JDK*"') DO @SET JDK_HOME=%JAVA_HOME%\%%G @SET PATH=%JDK_HOME%\bin;%PATH% @javac -version @echo. @echo %JDK_HOME%\bin successfully added to Windows PATH @echo. @echo Now type 'javac'. @echo. @echo. @echo. @CMD

Formato

other

Identificador

http://www.edshare.soton.ac.uk/11513/1/javaPath.bat

Java path setting batch file - Rikki Prince and Rikki Prince and Patrick Mcsweeney Keywords:java, path, comp1202

Relação

http://www.edshare.soton.ac.uk/11513/

Tipo

Resource

NonPeerReviewed