question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JRT - Resource.getURI() returning incorrect URI

See original GitHub issue

Hey luke

On getting URL’s when running in JImages they are looking like

jar:/jrt:/<module name>!/package

So I find myself doing :

URI uri = URI.create(url.toString()
			                        .replace("jar:jrt:/", "jrt:/")
			                        .replace("!", ""));

😃 I think somewhere although jar:/ is impossible in JImages, its adding the reference and applying the “!” to the module name 😃

I’ll try get the verbose ready

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lukehutchcommented, Jun 9, 2020

Fixed and released in 4.8.84. Thanks for the report!

0reactions
lukehutchcommented, Jun 14, 2020

How is this wrong? Please suggest an alternative.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resource (ClassGraph 4.8.58 API) - Javadoc.io
Use getURI() instead if the resource may have come from a system module, or if this is a jlink'd runtime image, since "jrt:"...
Read more >
Java Jar file: use resource errors: URI is not hierarchical
When you get a resource from classloader you have to specify the path that the resource has inside the jar, that is the...
Read more >
java.nio.file.FileSystems.newFileSystem java code examples
This exception is thrown when a program attempts to create an URL from an incorrect specification. BitSet (java.util). The BitSet class implements abit...
Read more >
Java Examples for org.eclipse.emf.codegen.ecore.genmodel ...
This java examples will help you to understand the usage of org.eclipse.emf.codegen.ecore.genmodel.GenModel. These source code samples are taken from ...
Read more >
JDK-8224946 jrtfs URI to Path and Path to URI ... - Bug ID
JDK-8224946 : jrtfs URI to Path and Path to URI conversions are wrong ... This fails because the file path returned by JrtFIleSystemProvider...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found