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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:40:48+00:00 2026-06-03T19:40:48+00:00

Ok, guys, I’ve read so many examples of javah usage and still got no

  • 0

Ok, guys, I’ve read so many examples of javah usage and still got no luck.
I have Eclipse Android project, so I try following:

cd /path_to_project/
javah -classpath ./bin/classes com.package.ClassName

What I get:

class file for android.app.Activity not found

Ok, so, it sees my class and I just need to add android.jar to classpath:

javah -classpath ./bin/classes:path_to_sdk/android.jar com.package.ClassName

And I get:

Could not find class file for com.package.ClassName

“You’re kidding me! You just saw it and now you can’t find it!”, I say.

Please, any help! I’m desperate here.

Tried compiling simple java class with javac and then using javah – it works fine.

My environment:
Windows 7, cygwin.

  • 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-03T19:40:52+00:00Added an answer on June 3, 2026 at 7:40 pm

    I’ll share what I’ve done to get javah to work for me. I hope it helps.

    For example, I’ve got a project with a package name of ‘com.android.MyProgram’. The activity source code file is located in the directory ‘Path-To-Project/src/com/android/MyProgram’ and the source code file is named ‘MyProgram.java’ and instantiates a class named ‘MyProgram’. My native code is in the directory named ‘Path-To-Project/jni’. I would use the following command line to run ‘javah’ for this project, run from the ‘Path-To-Project’ directory:

    javah -cp src -d jni com.android.MyProgram.MyProgram

    Again, I hope this helps.

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

Sidebar

Related Questions

guys. I have a strange problem. I try to write unit-tests to web-app. I
Guys I need your help here, I got a new project in PHP to
guys! I have problem with my .net application. When I try to print in
guys, I want to parse a xml in android which is got by HTTPPost
Guys I have an activity which has a home button, when the button is
Guys I've 3 tables as follows: Project {id, name, owner, ....} ProjectMilestones {id, project_id,
guys i'm still new on developing system and I've encountered this This is the
guys! I've got 2 forms in application - working form (frmMain) and form of
guys I want to start programing with C++. I have written some programs in
guys I have my xml in a string and I am trying to load

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.