Reputation: 5
public class Char
{
public static void main(String[] args) {
String plainText = args[0];
char [] a = plainText.toCharArray();
System.out.println(a);
}
}
Upvotes: 0
Views: 37
Reputation: 1944
This is really a Unix CLI question.
The problem is that the wildcard (*) character gets expanded (globbed) to all the entries in the directory prior to being fed to java, i.e., it's translated to something like
java char BooleanLoop.java BooleanLoop.class etcetera etcetera
If you want to feed the * character to java, either wrap it in single quotes ' or escape it with a backslash .
java char '*'
java char \*
Upvotes: 3