I have no idea what condition your system is in now, as it sounds like you've been manually doing a lot to it. If it can't find the native library, you need to put it somewhere in the ld loader path. Try /usr/lib, which is where the RPMs put it.
On Thu, Feb 21, 2008 at 5:53 PM, java4me <[EMAIL PROTECTED]> wrote: > Dan, > > Thanks again for all the help. > > > Wait, if you used the RPMs why have you done all this manual copying > of files into various directories? I did this based on your suggestion. > The reply I sent to you on Feb. 13 stated that I used the RPM. > > I also tried the command line based on your suggestion. Not the best for > me but I am willing to try your suggestions to fix the problem. > > I am logged in as root. > > I have tried reading the javax-usb-devel messages and replies to solve the > problem. > > [javax-usb-devel] no JavaxUsb in java.library.path Thu, 28 Jul 2005 11:35:14 > -0700 > > I have tried using the FAQ. I have tried Google. I have tried the sun java > forum. > > I have had little success. > > > > > Dan Streetman wrote: > > > Wait, if you used the RPMs why have you done all this manual copying > > of files into various directories? Just use the RPMs and it should > > work, if you have /proc/bus/usb mounted with the proper permissions > > (or are running as root). > > > > On Wed, Feb 20, 2008 at 8:51 PM, java4me <[EMAIL PROTECTED]> wrote: > > > >> Dan, > >> > >> I am using Netbeans IDE. > >> > >> run: > >> > >> > >> Exception in thread "main" java.lang.RuntimeException: Error : > Properties file javax.usb.properties not found. > >> > >> > >> at FindUsbDevice.getVirtualRootUsbHub(FindUsbDevice.java:77) > >> > >> at FindUsbDevice.main(FindUsbDevice.java:29) > >> > >> Java Result: 1 > >> > >> I added the following to CLASSPATH in IDE. /usr/local/lib which > contains the java.usb.properties and I receive the following error. > >> > >> run: > >> > >> > >> Exception in thread "main" java.lang.RuntimeException: Error : Error > while loading shared library libJavaxUsb.so : no JavaxUsb in java.library.path > >> > >> at FindUsbDevice.getVirtualRootUsbHub(FindUsbDevice.java:77) > >> > >> at FindUsbDevice.main(FindUsbDevice.java:29) > >> > >> Java Result: 1 > >> > >> BUILD SUCCESSFUL > >> > >> Dan this is from your last reply. > >> > >> > >> and the native .so > >> library into your JRE's lib/i386 directory. > >> > >> I put the libjavaxUsb.so.1.0.1 in the lib/i386 directory. > >> > >> > >> you can copy all 3 > >> of the jar files into your JRE's lib/ext/ directory > >> > >> All .jar files are in JRE's lib/ext/ > >> > >> > >> If you are new to Java, you could try using the RPMs instead of doing > >> this stuff yourself...? I am new to JAVA. I used the RPMs. > >> > >> What are the possible causes for the error? > >> > >> Error while loading shared library libJavaxUsb.so : no JavaxUsb in > java.library.path > >> > >> > >> > >> > >> Dan Streetman wrote: > >> > >> > I think you are confused as to how the Java CLASSPATH works. > >> > > >> > You need to have the DIRECTORY that contains the properties file in > >> > your CLASSPATH. You need to have the ACTUAL JAR FILES that contain > >> > the java code in your CLASSPATH. So just putting /opt/javax-usb/lib > >> > in your CLASSPATH will not work if there are only jar files in that > >> > directory. > >> > > >> > If you are new to Java, you could try using the RPMs instead of doing > >> > this stuff yourself...? > >> > > >> > Also you do NOT need to add /usr/lib to your LD_LIBRARY_PATH. That > >> > directory is part of the standard ld loader path for all UNIX systems > >> > that have ever existed as far as I know. > >> > > >> > Alternately, which might be easier for you - if you get the code from > >> > CVS (not the latest release) and build it yourself, you can copy all 3 > >> > of the jar files into your JRE's lib/ext/ directory, and the > >> > properties file into your JRE's lib/ directory, and the native .so > >> > library into your JRE's lib/i386 directory. Then you do not need to > >> > worry about setting your CLASSPATH or LD_LIBRARY_PATH at all - the JRE > >> > will automatically find all the classes and properties file and native > >> > library. Do note that the class with your main method (that you > >> > specify on the command line) needs to be in your CLASSPATH, you can't > >> > directly invoke classes from the JRE's lib/ext directory. > >> > > >> > On Feb 19, 2008 11:18 PM, java4me <[EMAIL PROTECTED]> wrote: > >> > > >> >> Mark, > >> >> > >> >> Thanks for the help. > >> >> > >> >> Here are the results from command line. > >> >> > >> >> I did not build from command line. > >> >> > >> >> [EMAIL PROTECTED]:~# echo $CLASSPATH > >> >> > >> >> /opt/javax-usb/lib:/opt/javax-usb/etc > >> >> > >> >> [EMAIL PROTECTED]:~# echo $LD_LIBRARY_PATH > >> >> > >> >> /usr/lib > >> >> > >> >> [EMAIL PROTECTED]:~# java -jar > "/TestShare/FindUsbDevice/dist/FindUsbDevice.jar" > >> >> > >> >> Exception in thread "main" java.lang.NoClassDefFoundError: > javax/usb/UsbDevice > >> >> > >> >> Here are the results from Netbeans. > >> >> > >> >> Build results: > >> >> > >> >> To run this application from the command line without Ant, try: > >> >> > >> >> java -jar "/TestShare/FindUsbDevice/dist/FindUsbDevice.jar" > >> >> > >> >> jar: > >> >> > >> >> BUILD SUCCESSFUL (total time: 5 seconds) > >> >> > >> >> Run results: > >> >> > >> >> Exception in thread "main" java.lang.RuntimeException: Error : Error > while loading shared library libJavaxUsb.so : no JavaxUsb in java.library.path > >> >> > >> >> at FindUsbDevice.getVirtualRootUsbHub(FindUsbDevice.java:77) > >> >> > >> >> at FindUsbDevice.main(FindUsbDevice.java:29) > >> >> > >> >> Java Result: 1 > >> >> > >> >> > >> >> Mark Scott wrote: > >> >> > >> >> > >> >>> java4me wrote: > >> >>> > >> >>> > >> >>> > >> >>>> Here is the info you requested. > >> >>>> > >> >>>> > >> >>> With respect, that's not entirely true. > >> >>> > >> >>> > >> >>> > >> >>>> What does "echo $CLASSPATH" show? > >> >>>> > >> >>>> [EMAIL PROTECTED]:/TestShare/FindUsbDevice/src/findusbdevice# echo > $classpath > >> >>>> /opt/javax-usb/lib:/opt/javax-usb/etc/javax.usb.prperties > >> >>>> > >> >>>> > >> >>> classpath is not the same as CLASSPATH. > >> >>> > >> >>> But it's not clear (to me, at least) if you're using a shell or > Netbeans > >> >>> to run your application. If the shell then CLASSPATH (not > classpath) is > >> >>> what you need to set. If Netbeans then I'm not sure if the CLASSPATH > >> >>> environment variable is relevant. I'm sure Netbeans will have some > way > >> >>> to let you put an arbitrary directory on the runtime classpath > though. > >> >>> > >> >>> > >> >>> > >> >> > >> > > >> > > >> > >> > >> > > > > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel