| Reply | « Previous Thread | Next Thread » |
|
Does anybody know if there is any way I can look at the contents of System.err on a Nokia phone (or indeed System.out, since, looking at the implmenentation they are the same)? I'm getting a NullPointerException that I can't reproduce on the emulator and would very much like its stack trace.
Thanks. Neil. P.S. Does anyone else find the absence of a Throwable.printStackTrace(PrintStream) method VERY annoying?! It's not like it saves any space by not having it... |
|
for emulators you can:
emulator <options> | cat This will make the emulator output visible in the console. Unless you are using djgpp or cygwin you probably won't have cat.exe so find a copy on the internet, or just compile the following C cat program Code:
#include <stdio.h>
/* compile with: gcc cat.c -s -O2 -o cat.exe */
int main(int argc, char **argv)
{
FILE *stream;
int c;
if (argc == 1)
stream = stdin;
else
stream = fopen(argv[1], "r");
if (!stream)
return(-1);
while( (c=fgetc(stream)) != -1)
fputc(c, stdout);
if (argc > 1)
fclose(stream);
return(0);
}
out of luck, I don't think it can be done. Alex |
| alex_crowther |
| View Public Profile |
| Find all posts by alex_crowther |
|
" Does anyone else find the absence of a Throwable.printStackTrace(PrintStream) method VERY annoying?! "
Truly unbelievable, along with the lack of ways of trapping an OutputStream's output after it's been created, and the fact that System.err and System.out are final. I'm tempted to write a test app. to see if all manufacturer's KVMs *do* make .err and .out final... |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|