Jv_CreateJavaVM problems

steve steve@netfuel.com
Thu May 22 23:43:00 GMT 2003


I have been working with the 3.3 release of gcc.

If you compile using -static -lpthread -ldl -lgcj it works with and with 
out the work around mentioned below.

However I can not get the dynamically liked version to work at all. 
Still have the same problem mentions if PR 8685.

Thanks
Steve
steve wrote:
> Andrew,
> 
> I am now less sad.  Some minor tweeks for type and it works.
> 
> Thanks
> Steve
> 
> Andrew Shuttlewood wrote:
> 
>> On Thu, 2003-04-03 at 16:46, steve wrote:
>>
>>> Hey GCJ guys
>>>
>>> At one point there was a work around for the arg[0] related problems 
>>> documented in problem 8685. If one called _Jv_ThisExecutable("Some 
>>> String")  Jv_CreateJavaVm would succeed.
>>
>>
>>
>> My solution (appeared) to work.
>>
>>
>>
>> extern const char **_Jv_argv;
>> extern int _Jv_argc;
>>
>> int main(int argc, char *argv[])
>> {
>>   _Jv_argc = argc;
>>   _Jv_argv = argv;
>>   JvCreateJavaVM(argv[0]);
>> ........
>> }
>>
>> (obviously the argv[0] argument to JvCreateJavaVM doesn't do anything,
>> but setting the _Jv_ thingies did the biz for me.
>>
>>
> 
> 


-- 
Steve Pribyl
Steve AT NetFuel dot com
Computer Infrastructure Practitioner



More information about the Java mailing list