[ www.notava.org > ¬<><↑ (notavaBOOT) ]
notavaBOOT -- an excutable file for Windows that boots java
** LICENSE
There is no warranty for this software. You may use, copy, distribute,
and/or modify this software and modified versions.
** REQUIREMENT
Windows95, NT 4.0 or later.
(The test bed is Windows2000 only.)
** DESCRIPTION
Notation:
- <parent> is the parent directory of the notavaboot.exe including the last \
- <title>.exe is the file name of the notavaboot.exe without <parent> and \
- <title> is the file name of the notavaboot.exe without .exe
- <parameters> is the parameters given to the notavaboot.exe
E.g. if the notavaboot.exe is renamed to C:\bin\foo.exe,
<parent> is C:\bin\
<title>.exe is foo.exe
<title> is foo
and, <parent><title>.exe is C:\bin\foo.exe
notavaboot.exe boots a software as following:
1) If <parent><title>.notavaboot dose not exist,
boot java %<title>_VMOPTIONS% -jar <title.jar> <parameters>,
where %<title>_VMOPTIONS% is the value of the <title>_VMOPTIONS
environment variable and <title.jar> is one of the followings:
<parent>..\lib\<title>.jar
<parent><title>.jar
<parent>lib\<title>.jar
<parent>..\<title>.jar
2) If it exists, boot a software specified as following steps:
2-1) Divide the text in the <parent><title>.notavaboot into tokens;
the separator is white spaces which is not quoted by double quotes.
E.g.)
A input: java %OPTS% -jar %@..\lib\foo.jar "%OPTS% "%OPTS% * *;
is divided into 7 tokens.
2-2) Expand environment variables:
a) Replace a string surrounded by % and not quoted by double
quotes, with the value of the environment variable whose name is
the string, or empty string if there is not the variable. If
the surrounded string is a part of a token, the replacement is
quoted by double quotes. If the surrounded string is a whole
token, the replacement is not quoted except for the replacement
is a name of a existing file.
b) Replace %* with <parameters>.
c) Replace %@ with <parent> quoted by double quotes.
The replaced token is divide into tokens like 2-1. Replacements
are not recursive.
E.g.)
If the value of OPTS is -Xmx128m -ea,
the 7 tokens: java %OPTS% -jar %@..\lib\foo.jar "%OPTS% "%OPTS% * *;
are replaced by the 8 tokens:
java
-Xmx128m
-ea
-jar
"<patent>"\..\lib\foo.jar
"%OPTS% ""-Xmx128m -ea"
*
*;
2-3) Expand wildcard: If a token contains * or ? that is not quoted by
double quotes,
a) Divide the token into paths with the semicolon sepalator.
b) If a path contins * or ? that is not quoted by double quotes,
replace the path with the files (or directories) the path
mathes. * OR ? SHOULD NOT BE A PART OF THE PARENT DIRECTORIES
OF THE PATH. E.G. parent\*.java IS LEGAL BUT *\foo.java IS NOT
LEGAL.
If a token does not contain a semicolon, a file makes a token
quoted by double quotes. If it dose, files are jointed with
semicolon and make a token quoted by double quotes.
E.g.)
If the current directory contains files A, B and C only,
the above 8 tokens are replaced by the 10 tokens:
java
-Xmx128m
-ea
-jar
"<patent>"\..\lib\foo.jar
"%OPTS% ""-Xmx128m -ea"
"A"
"B"
"C"
"A;B;C"
2-4) Remove all double quotes and boot the program represented by the
first token with the parameters represented by the other tokens.
E.g.)
Boot java with the 9 parameters:
-Xmx128m
-ea
-jar
<patent>\..\lib\foo.jar
%OPTS% -Xmx128m -ea
A
B
C
A;B;C