(追記) (追記ここまで)

SET : Java Glossary

home page go to the Java Glossary Home go to the Computer Buyer’s Glossary up jump to foot of page Google search web for more information on this topic Pinterest pin button
*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)
©1996-2017 Roedy Green of Canadian Mind Products

Set
Set has at least three meanings:
  1. 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.
  2. 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.
  3. 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 JNI. In NT/W2K/XP/W2K3 they are stored in the registry.

Tips

  • Set variables are supposed to be case-insensitive, but they are not quite. Traditionally they are written all upper case. To make them more portable, you are best to think of them as case-sensitive.
  • Don’t put quotes around the SET value, even when it contains spaces, but put them around the set variable
    SET CUSTOMER=Roedy Green
    IF "%CUSTOMER%" == "Roedy Green" Echo That's me

Gotchas

  • 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 manager.

Learning More

Oracle’s Javadoc on Set class : available:
Oracle’s Javadoc on Collections.unmodifiableSet : available:
Oracle’s Javadoc on Collections.emptySet : available:

standard footer
CMP home jump to top

This page is posted
on the web at:

http://mindprod.com/jgloss/set.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\set.html
Canadian Mind Products
Please read the feedback from other visitors, or send your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Canadian Mind Products
IP:[65.110.21.43]
Your face IP:[40.74.122.252]
(追記) (追記ここまで)
Feedback You are visitor number
website statistics
[フレーム]

AltStyle によって変換されたページ (->オリジナル) /