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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:34:33+00:00 2026-05-28T03:34:33+00:00

I am on Android 2.2 SDK and could not get my static block inside

  • 0

I am on Android 2.2 SDK and could not get my static block inside MultiUserChat class to execute. I have tried to force load it as

try 
{
    String qual = MultiUserChat.class.getName();
    ClassLoader.getSystemClassLoader().loadClass(qual);
        
} catch (ClassNotFoundException e) {

    e.printStackTrace();
}

and it always hits the catch block. ‘qual’ gets the valid name of the class… what can it be?

  • 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-28T03:34:33+00:00Added an answer on May 28, 2026 at 3:34 am

    Your app includes both framework classes like ArrayList and Activity, plus application classes like FlashlightActivity. The framework classes are loaded by the system class loader (and also the bootstrap class loadeR); the application classes are loaded by the application class loader.

    The system class loader can only see the system classes. It doesn’t know the application class path and it can’t be used to load application classes. You need to use the application class loader to do that. The easiest way to get a reference to the application class loader is via an application class:

    try {
        String qual = MultiUserChat.class.getName();
        MyActivity.class.getClassLoader().loadClass(qual);
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried https://github.com/sugree/twitter-android-sdk , but could not get it work....I am not even sure
here's the log: ……/android-sdk-mac_86/platforms/android-8/images//kernel-qemu: Interrupted system call qemu: could not load kernel '……/android-sdk-mac_86/platforms/android-8/images//kernel-qemu Please
I have just begun working with the Android SDK and I am having problems
I cannot get the Eclipse SDK to recognize my Android device (a gTablet). I
I have upgraded my Android SDK to version 2.3 and Android Development Tools 8.0.0.
I am able to get a manual proxy set up in firefox using android-sdk
I have the following shader taken from the android SDK sampele: final String vertexShader
i have been following the steps from http://developer.appcelerator.com/get_started and getting an error Could not
As you might know, Android's SDK features a AsyncTask class which allows for code
The Android SDK offers the standard menu icons via android.R.drawable.X . However, some standard

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.