I am trying to work from my thumbdrive, therefore i am setting the java path the java installion inside of my own thumbdrive. However, i am not always on a PC that is always a “G:\”, sometimes it may be H or F depending on how many devices are currently connected.
How may i rewrite this bat so that it is more dynamic?
set Path=G:\dev\04 jdk\jdk1.6.0_29\bin;%Path%
".\dev\01 ide\eclipse-jee-indigo-SR1-win32\eclipse.exe"
pause
The drive the file was started from is in
%~d0(%0being the files full start path).If the drive was
G:\then after double clicking the file in explorer, or runningC:\>G:\the.batthen%~d0 === G:So you can;