Download Command Prompt Portable for Windows to create a custom command line setup on any Windows computer. In by starting CommandPromptPortable.exe with a command line parameter of the path. Using parameters in batch files:%0 and%9. Batch files can refer to the words passed in as parameters with the tokens:%0 to%9.%0 is the program name as it was. CompleteBatchExample.zip; FME on the Command Line. FME can be run from the command line in Windows: Opening the Command Prompt window and typing FME gives. Java Demo arg1 arg2 arg3 Command Line Arguments in Java: Important Points. Command Line Arguments can be used to specify configuration information while launching your application. There is no restriction on the number of java command line arguments.You can specify any number of arguments; Information is passed as Strings. The program arguments passed at the time of launching of the Java application are called command line arguments. A Java program can be launched either from console or from an editor e.g. To launch a program we use 'java className' command from command prompt or system console.
Tableau provides the tabcmd command-line utility which you can use to automate site administration tasks on your Tableau Server site. For example, creating or deleting users, projects, and groups.
Note: The tabcmd utility is included with Tableau Server and is automatically installed on the initial server node. However its installer is not included, so if you want to run tabcmd on a computer other than the initial server node, you need to download the installer from the Tableau website. For more information, see Install tabcmd below.
Install tabcmd
When Tableau Server or Tableau Online is upgraded to a new version, if an updated version of tabcmd is required, you can download it from the Tableau Server Releases page on the Tableau website.
For Tableau Server, we recommend you download the version that matches your server version. For Tableau Online, we recommend you always download the latest version to avoid issues caused by version incompatibilities. In either case, using an out of date version of tabcmd can cause errors and unpredictable results.
Open a web browser and go to the Tableau Server Releases(Link opens in a new window) page. Go to this page even if you use Tableau Online.
If you're using:
- Tableau Online, select the latest Tableau Server release.
- Tableau Server (Windows or Linux): select the release that matches your server version.
In either case, if the expanded information shows maintenance releases, select the latest maintenance release or the one that matches your server version.
This takes you to the release notes page, called Resolved Issues, where you can read about security improvements and resolved issues.
Scroll to the Download Files section under the resolved issues, select the tabcmd download link that is compatible with the computer on which you’ll run the tabcmd commands.
The remaining steps refer to this computer as “the tabcmd computer.”
Save the installer to the tabcmd computer, or a location accessible from that computer .
Complete the installation steps as appropriate for the operating system of the tabcmd computer:
- Windows
By default tabcmd is installed to
C:Program FilesTableauTableau Server<version>extrasCommand Line Utility
. You can change this during installation and recommend that you install tabcmd to a folder namedtabcmd
at the root of the C: drive (C:tabcmd
). This can make it easier to locate and run, and will accommodate some limitations with the Windows operating system if you add the tabcmd directory to the Windows PATH.Note The tabcmd Setup program does not add the tabcmd directory to the Windows PATH variable. You can add it manually, or you can include the full path to tabcmd each time you call it.
You can install tabcmd in two ways on Windows:
Double-click the installer to follow the steps in the UI:
Accept the license agreement.
If you want to install to a non-default location, click Customize and type or browse to the location you want to install tabcmd to.
Click Install.
If you are prompted by Windows Defender Firewall or User Account Control, click Allow access.
Run the installer from a command prompt:
Open a command prompt as administrator on the tabcmd computer.
Navigate to the directory where you copied the tabcmd installer.
Install tabcmd:
To install to a non-default location:
For example:
For a complete list of command line options you can use with the tabcmd installer, run the installer with a /?. For more information on tabcmd installer command line options, see Install Switches and Properties for tabcmd (Windows).
The tabcmd Setup program creates logs in
C:Users<user>AppDataLocalTemp
you can use if you have problems installing tabcmd. The logs use the naming conventionTableau_Server_Command_Line_Utility_(<version_code>)_##############.log
. - Linux
Note: To run tabcmd on a Linux computer, you must have Java 8 (also called Java 1.8) installed. On RHEL-like systems this will be installed as a dependency when you install tabcmd. On Debian-like systems, you need to install Java 8 (1.8) separately if it is not already installed.
Log on as a user with sudo access to the tabcmd computer.
Navigate to the directory where you copied the
.rpm
or.deb
package that you downloaded.On RHEL-like distributions, including CentOS, run the following command:
sudo yum install tableau-tabcmd-<version>.noarch.rpm
On Ubuntu and Debian, run the following command:
sudo apt-get install ./tableau-tabcmd-<version>_all.deb
To uninstall tabcmd from a Linux computer, see the documentation for the Linux variety you are running.
(Optional) Add the fully qualified location where tabcmd is installed to your system path to allow you to run tabcmd commands without changing to that location, or specifying the location with each command. Steps to do this depend on the type and version of your operating system. For more information, see PATH_(variable).
How to use tabcmd
The basic steps for using tabcmd are as follows:
Open the Command Prompt as an administrator.
On a Windows computer, if you installed tabcmd on a computer other than the initial node, change to the directory where you installed tabcmd.
On a Linux computer, you do not need to change to the install directory.
Run the tabcmd command.
When you use tabcmd, you must establish an authenticated server session. The session identifies the server or Tableau Online site and the user running the session. You can start a session first, and then specify your command next, or you can start a session and execute a command all at once.
Important: If you are using tabcmd to perform more than one task, you must run tasks one after another (serially), rather than at the same time (in parallel).
Commands (such as login
) and the options (such as -s
, -u
, etc.) are not case sensitive, but the values you provide (such as User@Example.com
) are case sensitive.
Examples
The following command demonstrates starting a session with the Tableau Server named tabserver.mycompany.com:
The next example shows a command that deletes a workbook named Sales_Workbook:
Here’s how to accomplish all of the above with one command—note that you do not need login
here:
A Tableau Server can run multiple sites. When a workbook is on the Default site of a multi-site server you don't need to specify Default, the above command is sufficient. However, if the command applies to something on a site other than Default, you need to specify the site ID for that site (see login). Here's the same command for a workbook that's on the West Coast Sales site (site ID wsales
):
The options -s
, -t
, -u
, and -p
are among the tabcmd global variables, which can be used with any command.
For more information, see tabcmd Commands.
Status messages and logs
When a command is successful, tabcmd returns a status code of zero. A full error message for non-zero status codes is printed to stderr. In addition, informative or progress messages may be printed to stdout.
A full log named tabcmd.log that includes debugging, progress, and error messages is written to C:Users<username>AppDataLocalTableau
.
Other articles in this section
Java and the Windows Command Prompt
This page is obsolete.
This document instructs you on how to use the Windows Command Prompt with Java. These instructions are specialized to Windows 7, but aresimilar for Windows XP and Windows Vista.
Java |
You will use the Java compiler javac to compile your Java programs andthe Java interpreter java to run them.You should skip the first step if Java is already installed on your machine.
- Download and install the latest version ofthe Java Platform, Standard Edition Development Kit (Java SE 6 Update 27).Note the installation directory for later—probablysomething like C:Program FilesJavajdk1.6.0_27bin.
- To make sure that Windows can find the Java compiler and interpreter:
Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH. Control Panel -> System and Security -> Programs -> Advanced -> Environment Variables -> PATH-->
Control Panel -> System and Maintenance -> System -> Advanced System Settings -> Advanced -> Environment variables -> PATH. ] -->[ In Vista, select Start -> My Computer -> Properties -> Advanced -> Environment Variables -> System variables -> PATH. ]
[ In Windows XP, Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System variables -> PATH. ]
- Prepend C:Program FilesJavajdk1.6.0_27bin;to the beginning of the PATH variable.
- Click OK three times.
Command-line interface |
You will type commands in an application called the Command Prompt.
- Launch the command prompt viaAll Programs -> Accessories -> Command Prompt.(If you already had a command prompt window open, close itand launch a new one.)You should see the command prompt; it will look something like:
- To check that you have the right version of Java installed,type the text in boldface below. You should see something similar to the information printed below.(It's important that you see the number 1.6 or 1.5for the Java version number, but the rest is not critical.)Then type:
- Since you will be using the Command Prompt frequently,we recommend customizing the default settings.Right-click the title bar of an open Command Prompt window,select Properties and then:
- Window Size to 80 x 25. -->
- Set Layout -> Screen Buffer Size to 80 x 500.
- Select Options -> Edit Options -> QuickEdit Mode.
- Select Options -> Edit Options -> Insert Mode. Start in to 'C:introcs' or whichever directory you'd like to start in when launching the Command Prompt.-->
- Since you will be using the Command Prompt frequently,we recommend customizing the default settings.Right-click the title bar of an open Command Prompt window,select Properties and then:
Compile the Program |
You will use the javac command to convert your Java program into a form more amenable for execution on a computer.
- From the Command Prompt, navigate to the directory containingyour .java files, say C:introcshello, by typing the cd command below.
- Assuming the file, say HelloWorld.java,is in the current working directory, type thejavac command in boldface below to compile it.If everything went well, you should see no error messages.
Execute the Program |
You will use the java command to execute your program.
Java Command Line Input
- From the Command Prompt, type the java command below.If all goes well, you should see the output ofthe program - Hello, World.
Input and Output |
Download Java Program Command Line Parameters Freeware
If your program gets stuck in an infinite loop, typeCtrl-c to break out.
If you are entering input from the keyboard, you can signifyto your program that there is no more data by typingCtrl-z for EOF (end of file).On some DOS systems the first line of output sent to the screen after you enter EOF will be rendered invisible by DOS. This is not a problem with your code, but rather a problem with DOS. To help you debug your program, we recommend including an extra System.out.println(); statement before what you really want to print out. If anyone knows of a better fix, please let us know!
Troubleshooting |
Here are a few suggestions that might help correct any installationwoes you are experiencing. If you need assistance, don't hesitateto contact a staff member.
When I type, 'java -version' I get an error.Check that you edited your PATH environment variable as indicated.A missing ; or an added % is enough to screw things up.Close and re-open a command prompt.Type path at the command prompt and look for an entry that includesC:Program FilesJavajdk1.6.0_27bin;.Check that the version number 1.6.0_27matches the one you installed—Oracle updates Java periodically and youmight have a more recent version.If this doesn't fix the problem, check if you have any old versions of Javaon your system. If so, un-install them and re-install Java.
The command 'java -version' works, but not 'javac -version'. Any thoughts?It's likely a path issue. Try the suggestions from the previousquestion. Also check that you installed the JDK properly by checkingthat the folder C:Program FilesJavajdk1.6.0_27bin exists.
How can I check the values of my PATH variable?Type the following at the command prompt.
The PATHJava Command Line App
variable should begin withC:Program FilesJavajdk1.6.0_27bin;Download Java Program Command Line Parameters Free Trial
Be sure to open the command prompt after you have edited the PATH environment variable.You may also need to reboot for the environment variable change to take effect.I can compile with javac, but I get the error message'Exception in thread 'main' java.lang.NoClassDefFoundError: HelloWorld'when I try to execute it with java.First, be sure that HelloWorld.class is now in the current directory.Be sure to type java HelloWorld without a trailing .classor .java.Check that the command 'java -version' works.Now try to execute with 'java -cp . HelloWorld'.If this works, you need to edit your classpath.(iTunes has a proclivity for changing the classpath,so if you recently upgraded iTunes, this is likelythe source of the problem.)
Where can I learn more about the Windows command line?Here is a short tutorial on the Windows command prompt.Microsoft maintains a completecommand line reference.
How do I change my directory to the H: drive from the Windows Command Prompt?Type H: at the command prompt. Then cd to the appropriate directory.