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 !!
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
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 ? -------
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.