Exception in thread "main" java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 *
Perl is forgiving about malformed matching constructs, as in the expression *a, as well as dangling brackets, as in the expression abc], and treats them as literals. This class also accepts dangling brackets but is strict about dangling metacharacters like +, ? and *, and will throw a PatternSyntaxException if it encounters them.
Explicitly get the URLConnection object associated with the URL using getConnection()
and be sure to call close() on the URLConnection itself after the request.