Javah problem - super class could not be found !!

Hi all,
i have already posted this message but i didn't get enough help to solve my poor situation.
and this is my problem:
i got in my project (myProject) MyClass class.
i wrote in another java class ,in OtherClass.class ,jni function that use MyClass object as parameter to the jni interface, as follow:
private native int myFunction (MyClass obj); //function in OtherClass
when i write the javah command line :
javah -jni OtherClass (in order to create OtherClass.h)
i always get the following error:
A required super class myPackage.MyClass could not be found.
my qoustion is how can i let the javah command line to know about the existence of myPackage.MyClass and how can i create and .h file when i using other class instance as jni function parameter in other class??
Thanks Sendy.

Lets define a few terms here.
Java can be a java virtual machine which is what runs when you type 'java' on the command line. It is also represented by the compiler which runs when you type 'javac'. And in your case it also is represented by 'javah'.
The class path defines where java finds classes that it needs.
In older versions of java you had to tell it where to find everything. It couldn't even find java.lang.String unless you told it were it was. Now days you have to tell it where to find stuff that you add (or where 3rd party libraries are.)
There are two ways to define the class path: a command line option and an environment variable.
A class path can, currently, have three types of things in it:
-A path to a zip file
-A path to a jar file
-A path
For example
-Path to zip file in windows: C:\mystuff\mylib\mystuff.zip
-Path to zip file in unix: /opt/system/projects/mystuff/mystuff.zip
-Path to jar file in windows: C:\mystuff\mylib\myjar.jar
-Path to jar file in unix: /opt/system/projects/mystuff/myjar.jar
-Path in windows: C:\mystuff\mylib
-Path in unix: /opt/system/projects/mystuff
Zip files aren't used as much anymore, but you should at least be aware of them.
Java uses the class path to look for classes which are stored in files. It does this by translating the class name into a file name. It uses packages as directory names and class names as file names. So in your case it would try to find a class called myPackage.MyClass in a file called myPackage\MyClass.class. It would try to find that in any zip files, jar files, in in any paths that you specified in the class path.
So java is trying to find myPackage\MyClass.class in your class path. It would try to find that in any zip files, jar files, in in any paths that you specified in the class path.
Right now your class path is probably just "." which means that if you do the following commands
cd C:\mystuff
javah -jni OtherClass
Then java is going to try to find myPackage.MyClass in the following file
.\myPackage\MyClass.class
That, because you 'cd' to C:\mystuff, translates to the following absolute path
C:\mystuff\myPackage\MyClass.class
So if java doesn't find that file then it is going to tell you that it can't find the file.
So where is your file? Let's say it is here.
C:\work\lib\myPackage\MyClass.class
So you must tell javah where the root is. Keep in mind that 'myPackage' must be part of the path. That is not optional. The root is the directory above 'myPackage'. So the root is
C:\work\lib
So now you have a path that is ready for your class path. So your javah command could look like this
javah -classpath ".;C:\work\lib" -jni OtherClass
Or using an environment variable
set CLASSPATH=.;C:\work\lib
javah -jni OtherClass
Keep in mind in the above that class path is a generic term and there can be other ways to define it. For example the Sun command "java" allows you to use "-classpath" or "-cp".
So does the above help?

Similar Messages

  • Error: Class could not be found.

    I was trying the JNI tutorial, copied and pasted the HelloWorld.java program, compiled it. Then when I was trying to run the javah -jni command, it gave me this error "Error: Class HelloWorld could not be found". I am 100% sure that the class file was in the folder. Anyone else have this problem?
    Thanks!

    I got it.... by adding -classpath .

  • VerifyError: Error #1014 (class could not be found)

    I have a Flash Pro CS5 project that I have built some classes for in Flash Builder using some of the mx classes, like ArrayCollection and HTTPService. I have a Flash Project in my Flash Builder 4.0 pointing to the Flash Pro project. I started out by adding the Library Path to the Flex SDK 4.0.0 in my Flash project paths. Things seemed to work fine at first but now I am getting the following error:
    VerifyError: Error #1014: Class mx.collections::ArrayCollection could not be found
    If I change all my ArrayCollections to be just Arrays, then the same error just cascades down the list of "missing" mx classes, like HTTPService, etc. I individually added the the framework.swc, the rpc.swc and even the framework_rb.swc and rpc_rb.swc files to the paths but with the same error results.
    I'm trying to set up a relatively smooth workflow between Flash developers and Flex developers on my team but this is a huge roadblock.
    I have looked all over and not found a good solution for this problem. Can anyone help?
    Dana

    I figured out a solution. It had to do with conflicting or out of order library paths, I think. There were several paths to other projects in the project and Flash Pro global paths. I think some of them are automatically added by either the FP or the FB IDEs. When I removed all of the unnecessary paths, then it compiled just fine.

  • Class could not be found error

    Hi All,
    I'm trying to implement the BADI NETW_USER_FIELDS_F4 to be able to define a search help for an user field in transaction CJ20N.
    The Badi implemenation, class are active. But upon executing the F4 help, the program dumps with the following description
    " CREATE OBJECT: Class "\CLASS=CL_EX_NETW_USER_FIELDS_F4" could not be found. "
    The dump is from the get_instance method at the following line -
      CREATE OBJECT exit TYPE (abs_type_classname).
    The parameter 'exit' which is a type ref to object returns "illegal reference". Not sure where am I making the mistake.
    Pls note that the dump is even before the program reaches the BADI implementation, so the code I have in the AT_F4 method is not of significance I suppose.
    Any help would be highly appreciated.
    Thanks
    Uday

    Hi
    Try to see the <a href="https://websmp102.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=865187">note 865187</a>, it could be helpful for you.
    If you can't see the note, this is an extract:
    Summary
    Symptom
    You have implemented BAdI NETW_USER_FIELDS_F4 to provide F4 help for Network Activity User Fields.
    You go to transaction CJ20N or CN22 and press 'F4' on a Network Activity User Field. Short Dump occurs because of
    Runtime errors         CREATE_OBJECT_CLASS_NOT_FOUND
    Exception              CX_SY_CREATE_OBJECT_ERROR
    OR
    You go to transaction SE18 and do a Check(CTRL + F2) on BAdI NETW_USER_FIELDS_F4. The system gives a Message:
    Message no. ENHANCEMENT367
    "BAdI class CL_EX_NETW_USER_FIELDS_F4 does not exist."
    Other terms
    BAdI NETW_USER_FIELDS_F4, BAdI class CL_EX_NETW_USER_FIELDS_F4 does not exist, F4 help for Network Activity User Fields
    Reason and Prerequisites
    This is because BAdI Adapter Class CL_EX_NETW_USER_FIELDS_F4 is not present.
    Solution
    You will have to create the exit class by performing the following steps:
    1. Go to Transaction SE18.
    2. Enter BAdI Definition name NETW_USER_FIELDS_F4.
    3. Go to menu path Utilities->Regeneration.
    Now the BAdI class CL_EX_NETW_USER_FIELDS_F4 should get generated.
    Max

  • ITunes 7.3 problems 'original file could not be found'

    I deeply regret updating to iTunes 7.3 last Sat. Since moving to 7.3 virtually all my iTunes music library, located on a seperate Black Book hard drive is now not accessible on the PC. A few songs play but the majority of the 5000 songs on my library, when you attempt to play them result in the error message: 'original file could not be located - would you like to locate?' I can then track the file to the library and Itunes makes the connection and it plays. I can't face carrying this our every time.
    I have tried deleting 7.3 and reloading but still with the same result and I am now terrified of syncing my
    Ipod for fear of disabling that as well.
    Have others had this problem?
    Is this a feature of 7.3 and can anyone recommend a solution? Very much hope so.
    Despairing.
    Steve

    Well I've tried installing itunes 7.3.2 on two different computers and it has messed up each one of them and itunes is no longer functional on either machine. I have no idea what is going on. in both situations the error message comes up that there are files missing and itunes must be reinstalled. i also cannot delete itunes and an attempt at installing a previous version gave me the exact same error.
    this is very disappointing. i finally took the plunge and purchased a mac and am waiting for it to arrive. if this is the kind of service to expect i'm afraid i'll be very disappointed.
    HAS ANYONE FIGURED THIS OUT YET???

  • My air app gives VerifyError: Error #1014: Class flash.events::SoftKeyboardEvent could not be found.

    Hi,
    I'm devlopping an air application, MacOSX 10.6.8, flex4.5.1 and air 2.6, suddenly the application will not start anymore, giving the following error:
    VerifyError: Error #1014: Class flash.events::SoftKeyboardEvent could not be found.
              at spark.automation.delegates.components.supportClasses::SparkSkinnableTextBaseAutomationImp l$/init()[E:\dev\4.5.1\frameworks\projects\automation_spark\src\spark\automation\delegates \components\supportClasses\SparkSkinnableTextBaseAutomationImpl.as:73]
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2821]
              at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2729]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx \preloaders\Preloader.as:542]
              at flash.utils::Timer/_timerDispatch()
              at flash.utils::Timer/tick()
    A colleague with the same setup has no problems. Also when i create a new air project in flashbuilder it will not start either, but not throwing the error.
    Anyone with the same problems? Or anyone who knows what might be the cause?
    kind regards,
    Arjen Veneman

    Found the solution.  We had to add swf-version=11 in our flex config.  Odd that we should have to start doing that now all of a sudden (we weren't setting that explicitly before).  Seems like a bug in the SDK.

  • VerifyError: Error #1014: Class flash.events::NativeWindowBoundsEvent could not be found.

    When I run project from FB 3, it works but on Double click on
    the .swf gives the error
    VerifyError: Error #1014: Class
    flash.events::NativeWindowBoundsEvent could not be found.
    What is problem and solution of it.
    Thanks

    We had a similar problem in my project.  Took a lot of research and trial and error, but we finally narrowed it down to the resource.properties file.  Turns out that if the file gets too big it causes this problem.  Extending the timeout doesn't help.  You have to break your resource.properties into more granular files to reduce the file size.  This seems to fix the problem.  We have had it happen several times since then and we know how to fix it, so we get it fixed pretty quickly.
    Not sure if this will fix your problem, but it fixed ours.

  • Intermittent "VerifyError: Error #1014: Class MyPackage::MyClass could not be found." at runtime.

    VerifyError: Error #1014: Class MyPackage::MyClass could not be found.
    [SWF] DesktopSwf.swf - 3,226,951 bytes after decompression
    My team and I are seeing a high frequency of these errors when running our ActionScript Project.  The package and class referenced in the error switches between roughly a dozen different classes.  At times, I'll go a whole day without running into this.  Other times, I'll lose much of the day to it.  Sometimes a full clean/build causes the error to appear/disappear.  Sometimes restarting FlashBuilder appears to help.  Sometimes deleting and re-importing all project helps.  Sometimes nothing helps but the passage of time.  We've basically resorted to superstition in our attempts to work around this.
    The project is pure ActionScript (no Flex), using Flash Builder 4.7 and AIR SDK 3.7.0 build 1760.  The error occurs on Mac and PC.  The application project depends on a hierarchy of ActionScript Library Projects.  The class being referenced in the error lives in one of these library projects, but not always the same one.  I've tried a couple of different linkage paradigms with the library projects, but it hasn't made a difference.  The error does not occur in builds created by our Ant script.  Our library projects used to be Flex Projects, and we never saw this error.  We believe our problems started after switching to using ActionScript Projects for everything.  We'd prefer not to go back to relying on Flex.
    Has anyone else run into something like this?  Any ideas on what I could try?

    I figured out a solution. It had to do with conflicting or out of order library paths, I think. There were several paths to other projects in the project and Flash Pro global paths. I think some of them are automatically added by either the FP or the FB IDEs. When I removed all of the unnecessary paths, then it compiled just fine.

  • My iPod cannot be synced because the required file could not be found.  How do I fix this problem?

    Peace.  My name is Free.  Thanks in advance for any help u can offer.  My iPod cannot be synced because the required file could not be found.  How do I fix this problem?

    Hi antiklady,
    I see that you may be having an issue with compatibility of iTunes when connecting your iOS device. This sort of issue can arise if you have two versions of iTunes installed on your computer, which I feel may be the case. Here is an article that can tell you how to identify the version of iTunes that you have open:
    iTunes: How to find which version you are using - Apple Support
    http://support.apple.com/en-us/HT201521
    If the version of iTunes that is opened is not the version you are required to use for the iOS device in question, try searching through your computer or applications folder to see if there may be two versions of iTunes installed on your computer. Then, uninstall the version that is incompatible using these steps:
    Remove and reinstall iTunes and related software components for Windows Vista, Windows 7, or Windows 8 - Apple Support
    http://support.apple.com/en-us/HT1923
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Ordinal 55 could not be found in the dynaminc link library iertutil.dll cs5.5 installation problem.

    Okay, so when i downloaded the trial version of Flash Professional CS5.5, the following popup "popped up".
    "The dynamic link library iertutil.dll could not be found. Reinstalling the application may solve this problem."
    So i went to a site that had helped me with this sort of thing before dll-files.com, and downloaded iertutil.dll, and placed it in my System32 folder.
    I pressed OK on the previous pop-up, only to be greeted with:
    "Ordinal 55 could not be found in the dynaminc link library iertutil.dll"
    Flash CS5.5 finished installing and works great, but the same Ordinal 55 popup pops up at least a hundred times a day, (It's even popping up as I write this) even when Flash isn't open
    I'm using Windows XP SP2, I have Internet Explorer 6 SP2 (though i usually use Google Chrome Instead)
    Thanks in advance...

    Hi Bansal,
    When does this error start to occur? Check Event Viewer and see if we could find any other messages.
    Take a try with the SFC command:
    Use the System File Checker tool to repair missing or corrupted system files
    Further, try the following if SFC won't help:
    How to repair or reinstall Internet Explorer in Windows
    Best regards
    Michael Shao
    TechNet Community Support

  • Can someone please tell me the cause of the msg-The song could not be used because the original file could not be found- and how I might correct that problem?

    Can anyone please tell me the cause of the msg-The song"    " could no be used
    because the original file could not be found-and how I might correct that problem?  Lou

    I stupidly tried to copy my music files to an external drive so I could transfer them to my new iMac (old Macbook Pro is being retired). I now know I should've tried home sharing or something to transfer the music.
    Anyway, the situation I am in is that I have not managed to transfer anything and I now cannot access the music on my old Macbook Pro either! I have the message "the song 'xyz' could not be used because the original file could not be found. Would you like to locate it?". I understand that this is because iTunes cannot locate the files. When I try to locate the files I find nothing.
    I have tried searching my whole Macbook Pro for mp3 files and m4a files and Spotlight cant find any! The tracks are all still listed in iTunes. I also searched the external hard drive. I definitely haven't deleted anything. So where could they have gone and is there anything else I can do to search for them? I have a feeling I am just not searching for them in the right way because I have not deleted anything.
    Old computer is Macbook Pro OS X 10.6.8 with iTunes 10.4.1
    New computer is iMac OS X 10.7.2 with iTunes 10.5
    All I want to do is to set everything back to how it was so I can try the transfer a better way.
    Please help. Thanks, Dashford.

  • Problem saying song could not be used because original file not found

    Hi,
    I updated itunes to 10.1.1 over the weekend and now my libray has massive problems. Most of my older music has an exclamation mark next to it and when I try and play it, it says "Song cannot be used because orginal file could not be found".
    I have tried to reload the content but the same problem persists, this is really annoying to say the least. What can I do.
    Thanks

     
    Solution may be found if you search in the "More Like This" section over in the right column. 

  • Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

  • Hello. I have a new Computer and import my mediathek with an externe storage. When opened the new Mediethek in front of every song there is a explanation mark: original song could not been found. I try everything. Whats the Problem??

    Hello. I have a new Computer and import my mediathek with an externe storage. When opened the new Mediethek in front of every song there is a explanation mark: original song could not been found. I try everything. Whats the Problem??

    But it seems the OP has a setup where the media is on the external drive, and the library files are on the internal. This is what I refer to as a split library, Migrating such from one computer to another is not straightforward. Often iTunes will have some definite idea about where the files should live, and updating the setting of the media folder won't change that. If it requires a drive letter change that is usually not too hard, but sometimes there is another preference file that needs tweaking to indicate which of the old & new layouts for the library is being used. In more extreme cases I have a script for automatically making track by track repairs.
    tt2

  • Problem installing windows - 'The installer disc could not be found'

    Hello everyone,
    I'd successfully partitioned my hard drive and am now trying to install windows. When I click on 'start installation' in boot camp assistant, there is a delay of 20 seconds and then a message, saying that 'the installer disc could not be found'. This is despite the windows CD showing up in the finder.
    I've tried re-booting, re-starting boot camp and removing the CD, to no avail. For what it's worth I've also tried a friends windows CD just in case it is my one causing the problem.
    Any tips?
    Thanks in advance.
    Rob

    I had the same issue with the installer disc not being found by boot camp, I tried multiple times with no luck, tried several windows vista home basic discs and made sure they were bootable, still no luck, finally I got the trial version of parallels, installed windows that way and it worked, the interesting thing is that afterwards, I left the CD I was using in the dvd drive, shut down the computer, next time I started the laptop, it wanted to boot up with the windows installation dvd I left in the drive, I cancelled, started mac os then ran boot camp and it worked fine.
    Sounds to me like software issues from apple... I hope you find the solution, all this was very frustrating...

Maybe you are looking for

  • My ipod classic 120GB won't sync to itunes

    I have updated itunes and un-installed and re-installed it multiple times but I've had no luck. I have deleted all the content off of my ipod but it still won't sync to itunes, any help please? I have spent hours trying to find a solution but I feel

  • How can I get my radio buttons on one line?

    I have tried to put two radio buttons in one text cell in a table, but I can´t get them side by side. They stack on top on each other, in a vertical list, no matter what I do. Sorry for the stupid qustion, but this is my first attempt in LiveCycle De

  • Investment Management - PM Integration

    Hi Experts, can we settle investment order cost to AUC? I am able to settle order cost to Fixed Asset (After clicking on 'Complete Asset'), It is creating settlement rule for that fixed asset. But can't we settle order cost to AUC (Before comleting a

  • RMMMPERI: period opening

    Does RMMMPERI keep a log? I need to know when (date, time and user) was a period opened. I always give reward points for correct answers F

  • ? Instead of icons on dock

    Tried to set up a second user on my laptop and all of the dock icons appear in the form of a "?" And will not open.