Can't get file inside jar file

Completed

I need to get virtualFile from a third-party .jar file.

I use

URL url = new File(file_path).toURI().toURL();
VirtualFile virtualFile = VfsUtil.findFileByURL(url);

It only works for files that are not in any jar file.

Example:

Not found:

file:/C:/Users/Husker/Documents/IntelliJ%20IDEA%20Projects/TestWebLaF/libraries/weblaf-ui-1.2.12.jar!/com/alee/skin/light/resources/image.xml

Found:

file:/C:/Users/Husker/Documents/IntelliJ%20IDEA%20Projects/TestWebLaF/src/test/com/alee/skin/light/resources/tableheader.xml


How can I get files inside jar file?

0
1 comment

Please do not crosspost between this forum and Slack

0

Post is closed for comments.