Jv_CreateJavaVM problems

steve steve@netfuel.com
Thu Apr 3 16:57:00 GMT 2003


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.
> 
> 




More information about the Java mailing list