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 4556432
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:21:54+00:00 2026-05-21T17:21:54+00:00

So I have created an instance of a class by searching through jar files

  • 0

So I have created an instance of a class by searching through jar files with no problems, I have it set to create an instance using c.newInstance() (Is instance the right word to use here?)

Later on in the program I may want to create another instance of that class if a certain event occurs. How can I go about creating this without having to search through all of the Jar files until I find the right one and then creating it again? Is there a way to create it somehow if I still have a reference to the first one?

Please assume that I do not know the name of the classes that will be loaded until runtime and there will be multiple classes that will be loaded.

Thanks

  • 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-05-21T17:21:55+00:00Added an answer on May 21, 2026 at 5:21 pm

    Assuming “x” is the object you created …

    x.getClass().newInstance();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created my custom MembershipProvider. I have used an instance of the class
Using the client-side ASP.NET AJAX library, I have created an instance of a client
I have a class named insect child of sprite.I have created a instance of
I have created an instance class from Ext.Component to use the ul tag. here
I have a class (simulation) which creates an instance of another class (GUI). Inside
I have a class Page that creates an instance of DB , which is
Example: I have an class that inherits from UIImageView. An object creates an instance
I have created a multi-instance performance counter and I pass it mixed case instance
When you have a function with a string parameter, does that create another instance
I have a tableView:didSelectRowAtIndexPath: where I create a ViewController-Instance each time an item is

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.