Forgot to CC bugs. Ludovic Claude wrote: > Hi Niels, > > This works for me: > > #!/usr/bin/bsh > String a = "Hello"; > System.out.println(a); > > Maybe you were missing the semi colon after "Hello". You need also to > make your hello.bsh file executable > > My test script: > > cat > hello.bsh <<EOF > #!/usr/bin/bsh > String a = "Hello"; > System.out.println(a); > EOF > chmod u+x hello.bsh > ./hello.bsh >
Hi, I am afraid it is not the semi-colon - I may have forgotten it in my original test, but my problem is that it is looking for a command called "String". $ cat > hello.bsh <<EOF > #!/usr/bin/bsh > String a = "Hello"; > System.out.println(a); > EOF $ chmod u+x hello.bsh $ ./hello.bsh ./hello.bsh: line 2: String: command not found ./hello.bsh: line 3: syntax error near unexpected token `a' ./hello.bsh: line 3: `System.out.println(a);' For the sake of it I also tried experimental - same result. However the following works (only used bsh/testing for these): $ bsh <<EOF String a = "Hello"; System.out.println(a); EOF (In terms of executing the code - The bsh prompt however makes it rather useless for other intentions) And calling bsh directly works as well: $ bsh hello.bsh Hello > Can you give the exact version number for bsh on your system? Use > dpkg --status bsh > Testing: [...] Version: 2.0b4-8 [...] When I tried experimental: [...] Version: 2.0b4-9 [...] My /usr/bin/java is the non-free sun6, though I doubt it is the cause of the problem. > Ludovic > ~Niels > Niels Thykier a écrit : >> Hi >> >> I just tested this with bsh (version 2.0b4) and it does not seem to work >> for me. Neither the previous example nor >> >> >> String a = "Hello" >> System.out.println(a); >> >> Which works directly in bsh, but not from a #!/usr/bin/bsh shell. >> >> My kernel version is: 2.6.26-2-686 >> >> ~Niels > > _______________________________________________ > pkg-java-maintainers mailing list > pkg-java-maintain...@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org