Re: loadLib / loadLibrary problems
"Gerrit P. Haase" <[email protected]>
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Organization | Esse keine toten Tiere |
| Message-ID | <[email protected]> |
Hi David, > On Fri, Oct 15, 2004 at 04:56:11PM +0200, Gerrit P. Haase wrote: >> Gerrit schrieb: >>> I cannot get sablevm to run, there is only little error message: >> >>> java/lang/UnsatisfiedLinkError >> >>> I tried to find in the sources where loadLib is actually executed, but I >>> cannot find the place where the actual wanted libname / filename is put >>> together. >> >>> I guess it is a problem that the DLLs are named cyg....dll instead of >>> lib...so or s.th. similar. > VMSystem.mapLibraryName (native method implemented in > java_lang_VMSystem.c) puts: "lib" + libname together. > The extension is handled by using: lt_dlopenext to open the lib. > This supposely adds the platform specific extension. > The lt_dlopenext call is located in file java_lang_VMRuntime.c. > NB: The native VMSystem.mapLibraryName is actually no longer necessary > as the concatenation: "lib" + libname can be done in Java... unless on > some platforms Classpath native libs do not start with "lib"? On Cygwin the shared library is called e.g. cygjavalangreflect-1-1-6.dll Doesn't lt_dlopenext look for the according .la file and takes the filename from there? >> However, it doesn;t work. >> I would prefer it hardcoded so I could write the actual name of the file >> searched into the source and thats it. > Add a printf or temporarily hard coded at the lt_dlopenext call site. $ sablevm -Yc /usr/share/java/sablecc.jar org.sablecc.sablecc.SableCC simplec.sablecc ./libjavalang /usr/lib/sablevm/sablevm-classpath/libjavalang java/lang/UnsatisfiedLinkError Fine, I see now that I don't have this library available as shared lib. Ok, now I'll try again. See you later, Gerrit -- =^..^=