Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21st April 2008, 06:14 PM
susmit_koirala Offline
Registered User
 
Join Date: Mar 2007
Posts: 12
has anyone implemented the java network interface (jni) in fedora8?

I tried to develop a GUI interface in java for a c program i had developed and everything went right until when i tried to run the final code

Exception in thread "main" java.lang.UnsatisfiedLinkError: no hello.so in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1700)
at java.lang.Runtime.loadLibrary0(Runtime.java:841)
at java.lang.System.loadLibrary(System.java:1067)
at HelloWorld.<clinit>(HelloWorld.java:6)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again


After that i searched a lot about how to set this java.library.path so that my shared library works well but all in vain .can anyone help me /????????
Reply With Quote
  #2  
Old 22nd April 2008, 03:13 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,617
You must not have searched hard enough.

java -Djava.library.path=put_your_path_here ...
Reply With Quote
  #3  
Old 22nd April 2008, 04:17 AM
susmit_koirala Offline
Registered User
 
Join Date: Mar 2007
Posts: 12
Thank u.But after setting the path a new problem has come up .A following error message has come up.Could you please tell me what the problem could be

Exception in thread "main" java.lang.NoClassDefFoundError: /home/susmit/sixth sem/miscellaneous/interface/second
Caused by: java.lang.ClassNotFoundException: .home.susmit.sixth sem.miscellaneous.interface.second
at java.net.URLClassLoader$1.run(URLClassLoader.java: 221)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:209)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 24)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 69)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:337)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again


Further i would like to tell you that the java version that i am using is:
java version "1.7.0"
IcedTea Runtime Environment (build 1.7.0-b21)
IcedTea Client VM (build 1.7.0-b21, mixed mode)
Reply With Quote
  #4  
Old 22nd April 2008, 05:01 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,617
"Class not found" usually means that java can't find the *.class files you are trying to run. Do this command before running your Java program:
export CLASSPATH=.

The "." means the current directory. That way java will be able to find your *.class files in whatever directory you run the program in. You can put that statement in your ~/.bash_profile so that it works every time you login.
Reply With Quote
  #5  
Old 22nd April 2008, 02:56 PM
susmit_koirala Offline
Registered User
 
Join Date: Mar 2007
Posts: 12
:P well actually the class not found exception was generated owing to my silly mistake.

But when i set my path with java -Djava.library.path=put_your_path_here .. and carry on execution the same error message regarding not able to load the shared library............ came up

what shall i do next?????
Reply With Quote
  #6  
Old 23rd April 2008, 04:21 AM
susmit_koirala Offline
Registered User
 
Join Date: Mar 2007
Posts: 12
But when i set my path with java -Djava.library.path=put_your_path_here .. and carry on execution the same error message regarding not able to load the shared library............ came up

what shall i do next?????

Ppl help me common
Reply With Quote
Reply

Tags
fedora8, implemented, interface, java, jni, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora8 Sees My (Ethernet) Windows Network... darms Servers & Networking 0 11th February 2009 06:01 AM
fedora8 messed up java jtravnick Using Fedora 69 13th December 2007 11:32 AM
In FC6 network interface doesn't come up if 'service network restart' command is run. rajat123 Servers & Networking 3 3rd May 2007 06:15 PM
network interface problem appelmoes Using Fedora 1 28th September 2006 05:58 PM
network interface down dementhor Servers & Networking 4 26th September 2005 09:06 PM


Current GMT-time: 09:35 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat