SET : Java Glossary
©1996-2017 Roedy Green of Canadian Mind Products
Set has at least three meanings:
- A Java Collection interface that simply tracks
whether elements are in a Collection or not, but
nothing else. The most common implemetation is HashSet. Most of the operations you do on your Sets will be methods of Collection.
- Mastercard and Visa’s under-development protocol for sending encrypted
credit card numbers over the net. What makes it interesting in that the merchant
never gets to know your credit card number — only the bank does. This will
cut out most credit card fraud.
- A command in Windows BAT (Batch) files to set the value of a
script variable. The SET environment is a feature of DOS (Disk Operating System)
and W95, W98, Me, NT, W2K, XP, W2003, Vista, W2008, W7-32, W7-64, W8-32, W8-64, W2012, W10-32 and W10-64
to pass large numbers of parameters to programs. It is only half-heartedly
suppored by Java with System.getEnv.
There is no equivalent in other operating systems. It is getenv not getEnv. You can use
JNI (Java Native Interface)
to get at it, or exec, or you can snaffle set parms and pass them in the
java.exe command line with the -D option. Java
Properties take the place of Windows SET environment and INI files. You could
also read them capturing output of an exec 'ed
SET. To set them would require some
In NT/W2K/XP/W2K3 they are stored in the registry.
- In the DOS days you could optionally put spaces around the
equal sign in a SET command. Now, at least in TakeCommand, you cannot. You must
leave them out. If you put them in, you create variable names with trailing spaces,
or values with lead spaces.
- You might try to set an environment variable by execing a SET command. This won’t work, since the set
environment is restored as soon as exec terminates. The SETs you do in a bat file
are only good inside that bat file for the time the bat file in running.
- Restart any command prompt boxes after making changes to the environment.
Reboot if your changes would affect any programs started with the task
Oracle’s Javadoc on Set
class : available:
Oracle’s Javadoc on Collections.unmodifiableSet
Oracle’s Javadoc on Collections.emptySet