Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By Tolls

Thread: JNI (Java Native Interface) errors

  1. #1
    bmbsage is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Angry JNI (Java Native Interface) errors

    When running javah -jni {name of class}

    I'm getting the following errors:
    Could not find class file for {name of class}


    When I run the same command in another directory that contains my source files and not the dot.class file I'm getting the following errors..

    C:\ProdDev\VDR PC Software\VDR Viewer 2012\VDR Viewer\src\vdrframes\mainframe>ja
    vah -jni VDR_Main_Frame
    Error: package com.class1.vdr does not exist
    Error: package com.class1.vdr does not exist
    Error: package com.class1.vdr.utils does not exist
    Error: package com.class1.vdr.utils does not exist
    Error: package com.class1.vdr.utils.vdr_information does not exist
    Error: package com.class1.vdr.utils does not exist
    Error: package org.jfree.chart does not exist
    Error: package org.jfree.chart does not exist
    Error: package org.jfree.chart does not exist
    Error: package org.jfree.chart.axis does not exist
    Error: package org.jfree.chart.axis does not exist
    Error: package org.jfree.chart.plot does not exist
    Error: package org.jfree.chart.renderer.xy does not exist
    Error: package org.jfree.data.time does not exist
    Error: package VDR_Summary_Entry does not exist
    Error: cannot find symbol
    symbol: class usb_vdr_device_interface
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class JFreeChart
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class VDRTextBox
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: package VDR_Summary_Entry does not exist
    Error: cannot find symbol
    symbol: class JFreeChart
    location: class vdrframes.mainframe.VDR_Main_Frame.UpdateViewTask
    Error: package VDR_Summary_Entry does not exist
    Error: Could not find class file for 'VDR_Main_Frame'.
    Error: package VDR_Summary_Entry does not exist
    Error: cannot find symbol
    symbol: class VDRTextBox
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class DataForm
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class DataForm
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class ViewLogoPanel
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: class ViewLogoPanel
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: variable usb_vdr_volume_finder
    location: class vdrframes.mainframe.VDR_Main_Frame
    Error: cannot find symbol
    symbol: variable usb_vdr_volume_finder

    etc......

    I've tried multiple solution via web and none seem to work.
    Please Help !!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,775
    Blog Entries
    7
    Rep Power
    21

    Default Re: JNI (Java Native Interface) errors

    This has nothing to do with jni per se. The javah program uses the same class loader as the JVM would; it's a classpath issue. Your .class files are not stored where the classloader expected them to be. aamof the javah program is a java program itself and it uses a bit of reflection to find the native methods in your class; the problem is that it can't find all your classes.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    bmbsage is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Re: JNI (Java Native Interface) errors

    Thank you...

    Where do I find information on my classpaths?
    I'm new to java and could use some help understanding it a bit more.
    Do I need to find this under the enviroment variables in windows ? -------

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: JNI (Java Native Interface) errors

    If you're new to Java then what on earth are you doing mucking about with JNI?

    Start with the basics.
    DarrylBurke likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Call Java Native Interface from web application
    By rcbandit in forum Advanced Java
    Replies: 2
    Last Post: 12-21-2011, 11:10 AM
  2. Replies: 0
    Last Post: 10-03-2011, 09:27 AM
  3. Java web console with Java Native interface
    By rcbandit in forum Advanced Java
    Replies: 1
    Last Post: 08-22-2011, 04:07 PM
  4. Replies: 4
    Last Post: 05-19-2011, 05:05 PM
  5. Java Native Interface Question
    By RichWade in forum Advanced Java
    Replies: 20
    Last Post: 11-29-2010, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •