This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Invoking gcj compile program from "c"


Vaijayanthi Mala Suresh wrote:

> I didn't do any linking explicitly.  I was assuming that if the
> library is placed under /lib folder it will get loaded automatically.

Not by default.  I guess you were trying to use the
`gnu.gcj.runtime.VMClassLoader.library_control' property.

> Later I tried the following before invoking the FindClass()
> 
> 	void *h = dlopen("/lib/libHelloWorld.so", RTLD_LAZY);
> 	if (h == NULL)
> 	{	
> 	     const char *msg = dlerror();		
> 		 printf("VMJ Error %s\n",msg);
>     }
> 
> It returns me an error "File Not Found"

That should work a lot better, but I'm not sure why a "File Not Found"
happens.  I'd try using "strace -f -etrace=file" to see exactly which
file isn't being found.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]