Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8151901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:32:49+00:00 2026-06-06T15:32:49+00:00

im trying to extract some files from a jar-file downloaded using java-webstart. below code

  • 0

im trying to extract some files from a jar-file downloaded using java-webstart.
below code was used to locate the jar and initiate the FileSystem

1 final ProtectionDomain domain = this.getClass().getProtectionDomain();
2 final CodeSource source = domain.getCodeSource();
3 final URL url    = source.getLocation();
4 final URI uri    = url.toURI();
5 Path jarPath = Paths.get(uri);
6
7 FileSystem fs = FileSystems.newFileSystem(jarPath, null);

This works fine when the jar-file is on a local disc, but fails at line 5 in the JWS scenario, because the

logs says: url=http://localhost:8080/myjarfile.jar

java.nio.file.FileSystemNotFoundException: Provider "http" not installed
at java.nio.file.Paths.get(Unknown Source)

If I understand JWS correctly, myjarfile.jar has been downloaded to some cache already, so implementing a FileSystemProvider for http to get some content from myjarfile.jar seems slow and complicated. So any good ideas of how to proceed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:32:51+00:00Added an answer on June 6, 2026 at 3:32 pm

    the logs says: url=http://localhost:8080/myjarfile.jar

    That was a security decision made by Sun, before Oracle acquired them. They decided it was no business of applets or JWS apps. to know the location of the resources on the local file-system, so the URI returned will now always point back to the server, even if they are cached locally & the app. has all-permissions security level.

    So any good ideas of how to proceed?

    Redesign the app. That is the only practical solution.

    There are a number of ways to iterate a Zip or Jar for the content, but the simplest method is to include a list of the content in a known location of the Jar, locate it using getResource(), read it, then extract each resource.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to extract some information from an xml file using xslt. I've used
I'm trying to extract functions and function headers from some source code files. Here's
In my code I am trying to extract some data from a file. I
I'm trying to use WWW::Mechanize to extract some links from the HTML page using
I'm trying to write some code to extract Exif information from a JPG. Exif
I am trying to extract some information from a binary file. It looks like
I'm trying to write a code to extract some form data from a HTML
I'm trying to extract a set of data from some (large) text files. Basically,
I'm trying to extract some FastQ files from bam files. Picard can do this
I am trying to ultimately extract some files from a tar archive within PHP,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.