Start with something like this:
String url = "jdbc:derby://localhost:1527/netld;collation=TERRITORY_BASED:PRIMARY";
String cleanURI = url.substring(5);
URI uri = URI.create(cleanURI);
System.out.println(uri.getScheme());
System.out.println(uri.getHost());
System.out.println(uri.getPort());
System.out.println(uri.getPath());
Output from the above:
derby
localhost
1527
/netld;collation=TERRITORY_BASED:PRIMARY
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…