You never need the command line for everyday use. It's for the times something gets in the way: to check which version is installed, to start KafkIO with debug logging, or to reset a preference that stops it from starting properly.
Starting KafkIO from a terminal
Run the KafkIO program with the options after it. Where it is depends on how you installed it (Installation & Updates):
| System | Program |
|---|---|
| Windows (installer) | "C:\Program Files\KafkIO\KafkIO.exe", or the folder you chose
when installing |
| Windows (portable ZIP) | KafkIO.exe in the extracted folder |
| macOS | /Applications/KafkIO.app/Contents/MacOS/KafkIO (or inside
KafkIO.app wherever you put it) |
| Linux (.deb, .rpm) | /opt/kafkio/bin/KafkIO |
| Linux (portable archive) | bin/KafkIO in the extracted folder |
On macOS and Linux, whatever KafkIO prints (help, version, messages about reset preferences, and its log while it runs) appears in the terminal.
On Windows, KafkIO.exe is a windowed program, so Command Prompt and PowerShell don't show what it
prints. To see the output, run run.bat instead, from the same folder as KafkIO.exe: it
passes your options on to KafkIO, shows its output in the console window, and waits for a key press when
KafkIO exits. Options that don't need output, such as --debug or --delpr, work
directly with KafkIO.exe too.
"C:\Program Files\KafkIO\run.bat" --version
Options
Each option has a short and a long form; they do the same thing.
| Option | What it does |
|---|---|
-h, --help |
Prints the list of options, then exits without opening KafkIO. |
-v, --version |
Prints the version (for example KafkIO 2.1.18), then exits without opening KafkIO. |
-x, --debug |
Logs at DEBUG level instead of INFO, to the log file, the Event Log and the
terminal, until you quit. See Debug logging. |
-d, --delpr keys | all |
Resets the listed preferences (comma-separated, no spaces) to their defaults, or all of them, then opens KafkIO as usual. See Resetting preferences. |
-b, --blank |
Accepted but has no effect in the current version (its help text, "Do not open any files at startup", is left over from an older design). |
-Dname=value |
Sets a Java system property before KafkIO starts. See Java system properties. |
KafkIO's own help looks like this (it currently prints it twice, as it does the version):
usage: KafkIO [OPTIONS]
Options: [-b] [-d <KEY1[,KEY2][,KEYn] | all>] [-h] [-v] [-x]
-b,--blank Do not open any files at startup
-d,--delpr <KEY1[,KEY2][,KEYn] | all> Reset preferences: '-d mainFontSize,newline' or '-d all'
-h,--help Display help on command line options
-v,--version Display version
-x,--debug Run in debug log mode
Please report issues at https://www.kafkio.com/contact
Short options can be combined (-xv is -x -v), and a long option can be shortened
as long as it's unambiguous (--deb). An option KafkIO doesn't know, or -d without a
value, makes it print the help above and exit without opening. Anything that isn't an option (a file name,
for example) is ignored.
Debug logging
Use --debug when the normal log doesn't say enough to explain a problem, such as a connection that
times out for no clear reason. Close KafkIO first (see Running more
than one instance), then:
"C:\Program Files\KafkIO\KafkIO.exe" --debug
/Applications/KafkIO.app/Contents/MacOS/KafkIO --debug
/opt/kafkio/bin/KafkIO --debug
Debug logs grow quickly, so only use it while you reproduce the problem.
Log files and debug mode explains where
the logs go and how to send them with a bug report. The portable versions also include
run_debug.bat (Windows) or run_debug.sh (macOS, Linux), which start KafkIO with
--debug plus extra JavaFX graphics logging and save the output to a file.
Resetting preferences
--delpr is for a setting that stops KafkIO from starting or makes it unusable, such as an
unreachable proxy or a font size too big to work with. Close KafkIO, then pass the preference keys (the names
in Show preferences) or
all:
"C:\Program Files\KafkIO\KafkIO.exe" --delpr mainFontSize,overrideDefaultFontSize
/opt/kafkio/bin/KafkIO --delpr useProxy
/Applications/KafkIO.app/Contents/MacOS/KafkIO --delpr all
Your clusters aren't affected. --delpr all is the same as the Reset
preferences button. A key that isn't stored (misspelt, or already at its default) is skipped with
"Unknown preference key". The language, proxy, Kerberos and certificate settings are applied before the reset
runs, so after resetting one of those, restart KafkIO once more.
Managing Preferences has the
details, including a Memory Stick Mode caveat.
Java system properties
Any argument of the form -Dname=value is set as a Java system property before
KafkIO starts (an argument without = is reported and ignored). You rarely need this; the main use
is working around graphics problems (blank or flickering windows, drawing glitches) by switching JavaFX to
software rendering:
"C:\Program Files\KafkIO\KafkIO.exe" -Dprism.order=sw
It lasts until you quit. If it fixes the problem, please report it, with your graphics card and system.
Running more than one instance
Only one copy of KafkIO runs at a time for each user on a computer. If you start KafkIO while it's already running (from the menu, a shortcut or a terminal), the new copy doesn't open a second window: it brings the running one to the front, restoring it if it's minimised and giving it a short shake so you can spot it, then exits. Each user account on a shared machine (a terminal server, for example) can run its own copy.
This matters for the command line, because the new copy processes its options before it notices the running one and hands over:
--debughas no effect: the running copy keeps logging as it was.--delprchanges preferences underneath the running copy, which still holds the old values in memory and may write them back.--helpand--versionare fine: they exit before the check.
So close KafkIO before starting it with options. To work with several clusters at once, you don't need a second copy: connect them all in one window and open several cluster tabs.
KafkIO detects the running copy with lock files in the mb folder of its data folder (for example
%LOCALAPPDATA%\com.certak\kafkio\mb on Windows). The operating system releases the locks when
KafkIO exits, even after a crash, so they never need deleting by hand.