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

  • Home
  • SEARCH
  • 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 9008875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:03:04+00:00 2026-06-16T02:03:04+00:00

Possible Duplicate: Loading from JAR as an InputStream? Is it possible for me to

  • 0

Possible Duplicate:
Loading from JAR as an InputStream?

Is it possible for me to load a jar file from an input stream (from a url connection, for example), load it into a classloader, and execute it?
Thanks for your time.

  • 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-16T02:03:06+00:00Added an answer on June 16, 2026 at 2:03 am

    Yes; URLClassLoader is intended for this purpose. It can load classes from an array of URLs.

    URL externalJar = new URL("http://example.com/app.jar");
    URL localJar = new URL("C:/Documents/app.jar");
    URLClassLoader cl = new URLClassLoader(URL[]{ externalJar, localJar });
    Class<?> clazz = cl.loadClass("SomeClass"); // you now can load classes
    

    If your InputStream is not based on a URL, you could instead write the stream’s contents to a temporary jar file which you then load using the above approach. (You can load a jar entirely in memory, meaning no temp file is created, but this method takes considerably more effort to do right, because you will need define a custom ClassLoader).

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

Sidebar

Related Questions

Possible Duplicate: Problem when loading php file into variable (Load result of php code
Possible Duplicate: Dynamic Resource Loading Android In Android, I can load a string from
Possible Duplicate: Loading richtextbox content from xml I am trying to save and load
Possible Duplicate: Change the URL in the browser without loading the new page using
Possible Duplicate: Reading the last n lines from a huge text file I have
Possible Duplicate: File download with android How do I download a .txt file from
Possible Duplicate: Loading remote images How to put a picture from the Internet in
Possible Duplicate: Serializable crash error when loading web broser from my application below a
Possible Duplicate: Phonegap - Load Values from Database based on a user ID I
Possible Duplicate: Python: How to read huge text file into memory To process a

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.