From 6551170427e5857ce754f7aeba208105b9b3e2cd Mon Sep 17 00:00:00 2001 From: xyli Date: Fri, 3 Mar 2023 15:27:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ejar=E5=8C=85=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E8=8E=B7=E5=8F=96=E6=B5=8B=E8=AF=95=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/TestPath.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/TestPath.java b/src/test/java/TestPath.java index ead4459..c819614 100644 --- a/src/test/java/TestPath.java +++ b/src/test/java/TestPath.java @@ -64,5 +64,15 @@ public class TestPath { } + @Test + public void test() throws MalformedURLException { + URL url = new URL("jar:file:/home/jpom/server/lib/server-2.4.8.jar!/BOOT-INF/classes!/"); + String file = url.getFile(); + String x = StrUtil.subBefore(file, "!", false); + System.out.println(x); + System.out.println(FileUtil.file(x)); + + System.out.println(StrUtil.subBefore("sssddsf", "!", false)); + } } -- Gitee