Kaffe 1.0beta1 on RedHat Linux 5.1

satya seshu kumar dammu seshukumar49 at netscape.net
Wed Sep 16 03:06:32 PDT 1998


hi KAFFEites,

Urgent help needed..... project deadline nearing......

I am stuck with a problem where my Kaffe 1.0beta1
on RedHat Linux 5.1 (on pentium II) is showing buggy behavior.

a simplified version of my program which reproduces
the behavior is below::

import java.lang.*;
import java.io.*;

public class Test
{
 public static void main(String[] args)
 {
  Runtime r = Runtime.getRuntime();
  System.out.println("Hello World!");
   try
    {
     r.exec("/bin/ls > /home/seshu/zzz ");
    } catch(java.io.IOException e)
      {
       System.out.println(e);
       e.printStackTrace(System.out );
      }
 }

}

%Kaffe Test
no error messages. Kaffe just prints "HelloWorld" string and the file
"/home/seshu/zzz" is not created in the working directory.


%Kaffe sun.tools.ttydebug.TTY Test
Initializing jdb...
Kaffe: ./mem/gc-mem.c:276: gc_heap_malloc: Assertion `mem->next == 0 ||
((uintp)mem->next >= (uintp)blk && (uintp)mem->next < (uintp)blk + gc_pgsize)'
failed.
Abort (core dumped)

I am trying to break my brains with the core file ... but no success yet.....
if u are interested ......i can make the core file available to u.....

thanks a lot,
--seshukumar49 at netscape.net

ps:   1.  This Kaffe is what i found on transvirtual website & it is said to
be
       the latest stuff on transvirtual website (i downloaded it today fresh).
   2.  With my old Kaffe I used to get the exact erroneous behavior that
       Patrick W. O'Neill was getting.


===============================================================
                Previous Mails related to this discussion
===============================================================
Re: More Runtime.exec()
Patrick W. O'Neill (oneill at capsl.udel.edu)
Mon, 7 Sep 1998 19:24:02 -0400 (EDT)

Linux, Debian I believe. I tried the exec you suggested, I recieved the
same error...I haven't tried Kaffe on Solaris, on those systems the
Admins have JDK installed. The same code runs and works there too.

Pat


On Mon, 7 Sep 1998, Mike Boilen wrote:
> That's very interesting. What system are you on? I'm on Solaris 2.6
> and I don't have any problem with that code. It executes gcc correctly
> on my machine (verified because it compiles a test.c I have in that
> directory). I wonder if it is a platform specific problem. You might
> want to try one of the other versions of exec (maybe
> exec(String,String[])) and see if one of those works. If one of the
> other ones works, then we might have a better idea as to what is wrong.
> Does anyone else have any suggestions?
>
> Mike
>
> On Mon, Sep 07, 1998 at 06:38:11PM -0400, Patrick W. O'Neill wrote:
> >
> > > Do you have any more information? Does it print a stack trace or
> > > anything that might be useful? And also which version of exec did you
> > > use? (there are 4 I think) And what were the arguments that you passed
> > > in? Thanks
> > >
> > > Mike
> > -----------------------------
> >
> > No stack trace or anything useful, just that message.
> >
> > public class Test {
> > public static void main(String[] args) {
> > try {
> > Process p = Runtime.getRuntime().exec("gcc test.c> > }
> > catch (Exception e) {
> > System.err.println(e);
> > }
> > }
> > }
> >
> > Was my test code with various commands...I tried full paths too. If you
> > missed my previous email, before the latest snapshot was installed, I got
> > an IOException: File not found, regardless of the command or paths.
> >
> > Thanks
> >
> > Pat
> > -----------------------------------------
> > > On Mon, Sep 07, 1998 at 06:24:34PM -0400, Patrick W. O'Neill wrote:
> > > > Downloaded the latest snapshot, now I get:
> > > >
> > > > java.lang.NullPointerException: null
> > > >
> > > > Full paths on the command or not. Any ideas?
> > > >
> > > > Pat
> > > >
> > >
> >
>

Re: Runtime.exec() Problem.
Patrick W. O'Neill (oneill at capsl.udel.edu)
Sun, 6 Sep 1998 12:47:13 -0400 (EDT)

Thanks, I was unaware of that, there wasn't much documention on the web
page. I'll download that and see if it helps.

Pat


On Sun, 6 Sep 1998, Mike Boilen wrote:
> What version of Kaffe are you using? I know there were a bunch of
> patches to Runtime.exec() since 1.0b1 was released. You might want to
> try using the latest kaffe-snap and see if that helps.
>
> Mike
>
>
> On Sun, Sep 06, 1998 at 10:33:50AM -0400, Patrick W. O'Neill wrote:
> > Hello, I'm relatitivly new to Java, and even moreso to Kaffe. We have a 
> > demonstration that runs only on Linux. This demo generates a logfile,
> > which is read by our java program to display graphically what is going
> > on. Previously, we would generate the logfile on a Linux machine, and
> > run the Java demo on Solaris with the JDK. We would like to be able to
> > generate the logfile on the fly, so our only option is to run the Java
> > demo on the linux machine. That is where Kaffe comes in.
> >
> > We had to do a lot of updating of our code, the books we had were 1.0
> > books, and JDK is more forgiving of deprecated functions than Kaffe is,
> > so we had no need to use 1.1 code until we decided to use Kaffe. We got
> > that all straightend out, but we're having one main problem. We need to
> > run our program from inside our java demo, this would lead me to using a
> > Runtime.exec("command line") call. This works fine under JDK, but I'm
> > having a problem running this with Kaffe. Here is some sample code...
> >

 public class Test{
 public static void main(String[] args) {
 Runtime r = Runtime.getRuntime();
 System.out.println("Hello World!");
 try {
 r.exec("gcc test.c");
 }
 catch(java.io.IOException e) {
 System.out.println(e);
 }
 }
 }

> > No matter what the command is, we get
> >
> > java.io.IOException: No such file or directory
> >
> > I just tried an example using full path names, we don't get the
> > exception, but the command just plain doesn't get executed.
> >
> > I also tried some code I found in the comp.lang.java.help newsgroup...
> >
> >
> > public class HelloWorld{
> > public static void main(String[] args) {
> > try {
> > String cmd = "/usr/bin/ls -l /opt/java/bin";
> > String line = null;
> > Process p = Runtime.getRuntime().exec(cmd);
> > BufferedReader lsOut = new BufferedReader
> > (new InputStreamReader
> > (p.getInputStream() ) );
> > while( ( line=lsOut.readLine() ) != null) {
> > System.out.println(line);
> > }
> > }
> > catch (Exception e) {
> > System.err.println("ls error " +e);
> > }
> > }
> > }
> >
> >
> > But I get the same error. Any ideas as to why this might be happening or
> > how to fix it? Thanks.
> >
> >
> > Pat
> >
> >
>





____________________________________________________________________
More than just email--Get your FREE Netscape WebMail account today at http://home.netscape.com/netcenter/mail



More information about the kaffe mailing list