Hello,
I am a pure Linux guy. I wrote a Java program that is going to be used
by some Windows people, and I wish the startup of the program to be as
simple as possible, namely to double-click on the icon of a BAT script
on the CDROM. The program accesses files in a directory which path is
given as an argument on the command line. The script I have now is the
following:
--- start of script ---
set AB_JAR_DIR=D:\ab
set AB_DATA_DIR=D:\ab\data
set AB_MEM_MAX=200m
cd %AB_JAR_DIR%
java -Xmx%AB_MEM_MAX% -Ddatapath=%AB_DATA_DIR% -jar ab-0.1.3.jar
--- end of script ---
Unfortunately I know that there are people around who have their CDROM
attached to another drive letter than D:, which would prevent that
script to be executed properly. Thus the question:
How do I find the drive letter of the CDROM the script was started
from, and how do I use it in the script ?
Is there a simpler way to to that ?
Thanks in advance.
Disclaimer: I didn't find any active comp.*.dos.* newsgroup to post
that question and I am fully aware of the fact this might not be the
ideal place to ask that question, but I am sure there are other
DOS-illiterate Java programmers (like me) around for whom the answers
might be useful too.