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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:26:03+00:00 2026-06-02T11:26:03+00:00

I have an issue with loading classes via Class.forName(String className) when I amtrying to

  • 0

I have an issue with loading classes via Class.forName(String className) when I amtrying to get a class from another package. It keeps throwing a ClassNotFoundException, even though I am fully declaring qualified (package) names as the class name.

Is there any way to load classes from another package?

Basically, what I am trying to do is load a bunch of different class files using a configuration. This isn’t explicitly necessary (I’m just fooling around with code) but I would like to know if this is possible or not.

As a last note, I am fairly new to code development, having only just begun back in November, with Java as my first language.

  • 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-02T11:26:04+00:00Added an answer on June 2, 2026 at 11:26 am

    It is totally possible. Two things to check:

    1. Use dots as separators: “java.lang.String”, not “java/lang/String” or anything else
    2. Make sure the other package is loadable — i.e., it has to be on the JVM’s class path.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with loading a dll from another computer. It loads pretty
I have a really annoying intermittent issue when loading a series of assets using
I have an issue when saving the object serialization then loading it again.. First
I have an issue I can't get over. I made a simple jQuery album
I have a long table with columns of schedule data that I'm loading via
I have a set of classes I wish to serialize the data from. There
I have a mapping issue with the table-per-class hierarchy in Fluent/NHibernate. When retrieving the
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
We are new to ROR, We have issue in creating Login/Logout process in ROR
Share your ideas please! I have issue to check the folder and convert 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.