Classpath style change

1 view
Skip to first unread message

Joakim Nordström

unread,
Jun 24, 2011, 6:02:15 AM6/24/11
to jam...@googlegroups.com
Forward of previous discussions.

---------- Vidarebefordrat meddelande ----------
Från: Joakim Nordström <joakim.n...@gmail.com>
Datum: 23 juni 2011 15:31
Ämne: Re: Classpath style chanage
Till: Thore Sittly <TSi...@gmx.de>



That's correct. The stack trace isn't printed to stdout. I think the trace is sometimes printed to the log-output -- I have connected a 2nd computer that receives the log output from serial. I've tried to implement the stack trace, but I haven't found a working solution. I think we have to add something to the Throwable class that can record the stack upon exception. The problem was that the stack trace wasn't available in the java_lang_Throwable.c, but rather in one of the c-files before the actual Java method was run.
I'll try to look into that aswell, so you don't have to do the same time consuming exploration I already done.

/Joakim

Den 23 juni 2011 15:07 skrev Thore Sittly <TSi...@gmx.de>:

I think 0.98 is what I'musing, I downloaded it separately.
Seems many programms will show "an exception occured" but not which exception this was. Seems I have to fix the stacktrace stuff ;) So we could track the missing stuff with demo apps more precisely-

regards
Thore

-------- Original-Nachricht --------
Datum: Thu, 23 Jun 2011 13:22:38 +0200
Von: "Joakim Nordström" <joakim.n...@gmail.com>
An: Thore Sittly <TSi...@gmx.de>
Betreff: Re: Classpath style chanage

Hi,
That's great! I had a script for running jikes that changed the classpath like that, but this is better I guess.

Which classpath are you using? I think the 0.98 version is available on the jamiga2 site.

/Joakim
Den 23 jun 2011 11:10 skrev "Thore Sittly" <TSi...@gmx.de>:
>
> Hello Joakim
>
> I ported jikes to MorphOS to compile my demo java programs.
> Unfortunately, jikes accepts unix style path and JAmiga accepts Amiga style path for the CLASSPATH env.
>
> So I decided to modify JAmiga the way, it can handle both, by simply converting unix style path to amiga style path in jni.c.
> So I no longer have to switch the classpath everytime I compile or run an App.
>
> Here the changes, all made in jni.c:
> added in header:
> #include <string.h>
>
> added directly before function
> int JNI_GetDefaultJavaVMInitArgs(struct JDK1_1InitArgs *vm_args)
>
>
> int UnixPath2AmigaPath(char *Pathlist)
> {
>  char *temp;
>  int i,j;
>  BOOL bstart = TRUE;
>  BOOL bIsUnix = FALSE;
>
>  if(strlen(Pathlist) < 1)
>    return(0);
>
>  temp = (char *)malloc(strlen(Pathlist));
>
>  j = 0;
>  for (i=0;i<=strlen(Pathlist);i++)
>  {
>    if(bstart)
>    {
>      bstart = FALSE;
>      if(Pathlist[i] == '/')
>      {
>        bIsUnix = TRUE;
>      }
>      else
>      {
>        temp[j] = Pathlist[i];
>        j++;
>        bIsUnix = FALSE;
>      }
>    }
>    else
>    {
>      if((Pathlist[i] == ',') && bIsUnix)
>      {
>        bIsUnix = FALSE;
>        bstart=TRUE;
>        temp[j] = ':';
>        j++;
>        temp[j] = ',';
>        j++;
>      }
>      if(((Pathlist[i] == 13)||(Pathlist[i] == 10)||(Pathlist[i] == 0)  ) && bIsUnix)
>      {
>        bIsUnix = FALSE;
>        bstart=TRUE;
>        temp[j] = ':';
>        j++;
>      }
>      else if(Pathlist[i] == ',')
>      {
>        bstart=TRUE;
>        bIsUnix=FALSE;
>        temp[j]=',';
>        j++;
>      }
>      else if((Pathlist[i] == '/') && bIsUnix)
>      {
>        bIsUnix = FALSE;
>        temp[j] = ':';
>        j++;
>      }
>      else
>      {
>       temp[j] = Pathlist[i];
>       j++;
>      }
>    }
>  }
>  if(bIsUnix)
>  {
>   printf("true %d",j);
>   temp[j] = ':';
>   j++;
>   temp[j] = '\0';
>  }
>
>  //printf("converting:\n%s\n%s\n", Pathlist, temp);
>
>  free(Pathlist);
>  Pathlist = (char *)malloc(strlen(temp));
>  strcpy(Pathlist, temp);
>
>  free(temp);
>  return(0);
> }
>
> Modified in JNI_GetDefaultJavaVMInitArgs(
>
> add directly before "if(!vm_args->classpath) ..."
>
> UnixPath2AmigaPath(vm_args->classpath);
>
> Hope you like it a bit :)
>
> Regards
>
> Thore
> --
> NEU: FreePhone - kostenlos mobil telefonieren!
> Jetzt informieren: http://www.gmx.net/de/go/freephone




--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone


Reply all
Reply to author
Forward
0 new messages