'How to clear the input of file chooser component on command line in install4j?
The file chooser component always preserve the previous results on command line, just like
example file:
[/bin/example/file.txt]
If I enter a "space" or "Enter" key, the previous value "/bin/exampel/file.txt" will be chose. If I input another path, the value of "example file" will be changed, but how to empty the value of "example file" without changing my code? It's an easy thing in Windows, but I couldn't find anything that works in Linux.
If it's necessary to change my code, all I can think of is when the user input a specific string such as "[]", I call
context.setVariable("file chooser variable", null);
to clear the input manually, which doesn't seem very reasonable.
Is there any better method to clear the input?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
