Re: How to read from output streams

1999-07-05 Thread Cengiz Tuztas

[EMAIL PROTECTED] wrote:
> 
> Yes I have flushed the writer. As I wrote earlier I can read & write to
> another separate Java program but not C-program.
> 
> Onething I forgot to say though. I'm developing this program in Win98
> platform although end of the day i have to run it on a Linux machine
> for my university project. But I'm unable to test this on linux yet as
> JDK is not ready on the Linux machine yet. Just thinking if this is a
> MS problem?
> 
> I will be happy to know if someone had ever read & wrote to a console
> based C -program from within  a Java program in Linux platform (or
> Win98)?
> 
> THanks for your tip anyway..
> 
> -Mak
Yes, I use the following and it works under Linux Kernel 2.2.10 SuSE
Dist 6.1.

private int exec( String _command , String logname, boolean lock)
{
Runtime rt = Runtime.getRuntime();
Process proc = null;
int exitValue = 0;

try {
String line;
proc = rt.exec( _command );

BufferedReader brstdout = new
BufferedReader( new InputStreamReader( proc.getInputStream() ) );
BufferedReader brstderr = new
BufferedReader( new InputStreamReader( proc.getErrorStream() ) );

while ( ( line = brstderr.readLine() ) != null ) log( logname, line
);
while ( ( line = brstdout.readLine() ) != null ) log( logname, line
);

if ( lock ) 
exitValue = proc.waitFor(); 
}  
catch ( IOException ioe )
{
log( logname, ioe.getMessage() );
}
catch ( InterruptedException ie )
{
log( logname, ie.getMessage() );
}
return exitValue; 


-- 
---
Cengiz Tuztas
Dipl. - Wirt. Inform.

ADA - Das SystemHaus GmbH
Berliner Platz 12 - 41061 Mönchengladbach
Tel.: 0 21 61 / 655 - 7247, Fax: -7216
---


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



problem with jdk 1.2: libhpi.so

1999-07-05 Thread Thierry BARUSTA

Hello,

   I have downloaded the pre v2 version of jdk 1.2 for glibc 2.1.
My disribution of linux is the Suse 6.1. The only thing I have done is
to add the jdk1.2/bin directory to the path. when I run java or javac,
I get the same error which looks like:
libhpi.so: file not found.

could you help me to find the problem?

Thank you in advance.
  Thierry BARUSTA.


__
Get Your Private, Free Email at http://www.hotmail.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: problem with jdk 1.2: libhpi.so

1999-07-05 Thread Juergen Kreileder

> Thierry BARUSTA writes:

Thierry> I have downloaded the pre v2 version of jdk 1.2 for glibc
Thierry> 2.1.  My disribution of linux is the Suse 6.1. The only
Thierry> thing I have done is to add the jdk1.2/bin directory to
Thierry> the path. when I run java or javac, I get the same error
Thierry> which looks like: libhpi.so: file not found.

Thierry> could you help me to find the problem?

You need the glibc 2.0 JDK for SUSE 6.1


Juergen


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: How to read from output streams

1999-07-05 Thread Mak

Thanks a lot. It's really reassuring. I'll try this tomorrow on linux 
machine, hopefully.

THANKS A LOT AGAIN

-Mak

At 10:45 5/07/99 +0200, Cengiz Tuztas wrote:
>Yes, I use the following and it works under Linux Kernel 2.2.10 SuSE
>Dist 6.1.
>
> private int exec( String _command , String logname, boolean lock)
> {
> Runtime rt = Runtime.getRuntime();
> Process proc = null;
> int exitValue = 0;
>
> try {
> String line;
> proc = rt.exec( _command );
>
> BufferedReader brstdout = new
> BufferedReader( new InputStreamReader( 
> proc.getInputStream() ) );
> BufferedReader brstderr = new
> BufferedReader( new InputStreamReader( 
> proc.getErrorStream() ) );
>
> while ( ( line = brstderr.readLine() ) != null ) log( 
> logname, line
>);
> while ( ( line = brstdout.readLine() ) != null ) log( 
> logname, line
>);
>
> if ( lock )
> exitValue = proc.waitFor();
> }
> catch ( IOException ioe )
> {
> log( logname, ioe.getMessage() );
> }
> catch ( InterruptedException ie )
> {
> log( logname, ie.getMessage() );
> }
> return exitValue;
>
>
>--
>---
>Cengiz Tuztas
>Dipl. - Wirt. Inform.
>
>ADA - Das SystemHaus GmbH
>Berliner Platz 12 - 41061 Mönchengladbach
>Tel.: 0 21 61 / 655 - 7247, Fax: -7216
>---


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Advertisment: WebArchive '99 / With RESELL RIGHTS

1999-07-05 Thread joeo

Having this list spam me - this is the second or third time in so many
days - is starting to annoy me.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: javacomm

1999-07-05 Thread Larry Gates


>Date: Sun, 04 Jul 1999 22:22:22 -0700
>From: Kevin Ryan <[EMAIL PROTECTED]>

>The Sun comm API stuff is at:
>   http://java.sun.com/products/javacomm/index.html

It says to "choose a platform".  Which one do we choose for Linux?

-Larry Gates


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Arithmetic bug in Linux JDK 1.1.7v3

1999-07-05 Thread SHUDO Kazuyuki

Hi Albrecht,

> > The following program causes the Linux JDK 1.1.7v3 to crash with a
> > SIGFPE. This is because the x86 causes an arithmetic exception when
> > you divide 0x8000 by -1; the JVM spec, however, says that the result
> > of this should be 0x8000 with NO exception thrown. (The fix is to catch
> > the SIGFPE and tweak the stack with the right value.)

> If you use the TYA JIT please apply the following patch to fix this:
>
> --- tyarecode.c.265   Sat Jun 19 19:35:49 1999
> +++ tyarecode.c   Fri Jun 25 18:40:47 1999

You should treat an `irem' bytecode instruction not only `idiv'.

I've fixed my JIT (http://www.shudo.net/jit/)
with SIGFPE as a suggestion by Matt.
Thanks to Matt.

Kazuyuki SHUDO  Happy Hacking!
  Muraoka Lab., Grad. School of Sci. & Eng., Waseda Univ.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



AW: javacomm

1999-07-05 Thread Nolte, Holger

This is what the faq on that side says:

A: We do not provide a linux implementation. But Kevin Hester
   has written Java communications API drivers for linux and uses our
CommPort 
   driver loading scheme to load his own gnu.io.RXTXCommDriver class. He
gave
   us permission to disclose his web page:

http://www.interstice.com/kevinh/linuxcomm.html

Maybe it helps

Holger

-Ursprüngliche Nachricht-
Von: Larry Gates [mailto:[EMAIL PROTECTED]]
Gesendet am: Montag, 5. Juli 1999 16:04
An: [EMAIL PROTECTED]
Betreff: Re: javacomm


>Date: Sun, 04 Jul 1999 22:22:22 -0700
>From: Kevin Ryan <[EMAIL PROTECTED]>

>The Sun comm API stuff is at:
>   http://java.sun.com/products/javacomm/index.html

It says to "choose a platform".  Which one do we choose for Linux?

-Larry Gates


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Java Servlets: getting started on Linux

1999-07-05 Thread Pat Trainor


I am looking for someone who has actually gotten servlets to
compile on a libc5 slackware installation. I have not made the jump to 6,
as it is not coupled with the migration of all supporting libraries. I
develop on my laptop(Toshiba Tecra with crappy winmodem I can't use,
yet?):

Linux lisa 2.2.1 #2 SMP Sun Feb 14 01:09:47 EST 1999 i586 unknown

And use Apache:

Server version: Apache/1.3.3 (Unix)
Server built:   Dec  4 1998 23:37:57
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_perl.c

My objective is to get JDBC/ODBC to/from my MySQL databases
through servlets. On windows95 I was able to get the standard JDK to work,
but no matter how I wrestled with the CLASSPATH, javax.* never was found.

So, what I'd love to hear from someone is what combination of
versions of releases works together to get the standard javac(JDK) to work
with JSDK.

Now I'm very, very new to Java, but have purchased 14 books,
including "Java Servlet Programming" by John Hunter. As I see it, adding
servlet compatibility to a .java source is simply placing the jsdk.jar in
the CLASSPATH, right? Documentation says that javac compiles servlets,
applets, scriptlets no sweat. I have no fancy Borland or MS tools.

But other documentation says it is included in the JDK v2.0
..problem is that using imports for those classes/packages does not find
the javax.* stuff! On linux I'm hoping to have more success, and it is
also my development platform of choice for Perl and DBI/ODBC.

Additionally, there are many versions of the JDK, apparently,
including GNU style. Which works with what? When is JRE necessary? I hope
someone else has been through this rite of passage before me!

As an aside, has anyone any experience with Netscape Enterprise
v3? I read that it only supports Servlet API v1.0, and is considered
unstable. I may HAVE to develop on this platform, and would really like to
hear what to do, or not, in order to use this platform on Sun Ultra.

BTW: just joined and the list is working great! See:

> How would you like to actually make money on the Internet?

And they said, "What harm could come from a simple programming
language?".. 

pat 
:)

Programming Rates: I do it: $20 You watch: $40 You help: $80
"Pay no attention to the man behind that curtain!"-The Great Oz



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: javacomm

1999-07-05 Thread alx

On  5 Jul, Larry Gates wrote:
> 
>>Date: Sun, 04 Jul 1999 22:22:22 -0700
>>From: Kevin Ryan <[EMAIL PROTECTED]>
> 
>>The Sun comm API stuff is at:
>>  http://java.sun.com/products/javacomm/index.html
> 
> It says to "choose a platform".  Which one do we choose for Linux?

Well, according to the stuff on blackdown, you should get the sparc
solaris version.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: RMI Activatable Object (solved)

1999-07-05 Thread James Caple

Appreciate the help.  I was able to get things working, for the most part, by
setting the following environment variables:

THREADS_FLAG=GREEN
JAVA_COMPILER=NONE

I am, in fact, using native threads under Solaris.

Thanks,

James

Cees de Groot wrote:

> [EMAIL PROTECTED] wrote:
> >Under Solaris 7, my code works fine.  Under Linux, however, the RMI
> >Server Object's method is never gotten into; It's as if the suspended
> >thread blocks the object from all outside methods call.
> >
> >I've started both client and server using -green and turned off the JIT
> >setting my JAVA_COMPILER=NONE environment variable.
> >
> Have you been using green threads on Solaris as well? The RMI daemon
> doesn't take any explicit arguments so I guess you have to do this with
> environment variables. As far as I understood it, the RMI daemon does not
> spawn new threads but rather whole new VM processes per activation group
> and you want to make absolutely sure that all VM's involved run green
> threads in order to eliminate programmer error.
>
> I have Jini running onder Blackdown pre-v2 via RMI activation so it
> seems to be basically working. I did have some problems on my SMP box,
> but on my laptop with native threads things seem to be OK (at least,
> 'ps' indicates some 107 Java procs polluting process table space ;-)).
>
> --
> Cees de Groot   http://www.cdegroot.com <[EMAIL PROTECTED]>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Strange timings for pre-v2 under Linux.

1999-07-05 Thread Albrecht Kleine

> I forgot to mention that the machines are running the x86 JIT.  Our next
> step is to find a way to run the Solaris versions of JDK1.2 and see what
> those numbers look like.

TYA jit 1.4 on a plain P200 jdk1.2
takes 100 sec for myprog_static
  and 110 sec for myprog.
  
(But invocation is the most slow part of TYA compared w sunwjit.
 This is because there's not enough knowledge about details 
 on invocation internals w/o using src code)

Cheers
Albrecht


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Advertisment: WebArchive '99 / With RESELL RIGHTS

1999-07-05 Thread Jake Bishop

joeo wrote:

> Having this list spam me - this is the second or third time in so many
> days - is starting to annoy me.
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Advertisment: WebArchive '99 / With RESELL RIGHTS

1999-07-05 Thread Jake Bishop

joeo wrote:

> Having this list spam me - this is the second or third time in so many
> days - is starting to annoy me.
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

I feel the same way:-(


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Strange timings for pre-v2 under Linux.

1999-07-05 Thread Patrick LAM

On Sun, 4 Jul 1999, Albrecht Kleine wrote:

> > I forgot to mention that the machines are running the x86 JIT.  Our next
> > step is to find a way to run the Solaris versions of JDK1.2 and see what
> > those numbers look like.
> 
> TYA jit 1.4 on a plain P200 jdk1.2
> takes 100 sec for myprog_static
>   and 110 sec for myprog.
>   
> (But invocation is the most slow part of TYA compared w sunwjit.
>  This is because there's not enough knowledge about details 
>  on invocation internals w/o using src code)

Thanks.  Note that Kaffe also shows a 15% speedup with static over
virtual.  There just seems to be a very anamolous result for the Linux
JIT, where static is twice as slow.

pat



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: RMI Activatable Object (solved)

1999-07-05 Thread Cees de Groot


[EMAIL PROTECTED] said:
> Appreciate the help.  I was able to get things working, for the most
> part, by setting the following environment variables:
> THREADS_FLAG=GREEN JAVA_COMPILER=NONE

Yeah, that seems to be the most stable configuration for a lot of tasks.

> I am, in fact, using native threads under Solaris. 

That's what I meant: if you have stuff hanging under Linux and not under 
Solaris, and you're using green threads under Linux but native threads under 
Solaris, you cannot really start with blaming the Linux port (even though 
chances are high you're right with the current 1.2 prerelease ;-)). Native and 
green threads make a difference on the Java code level (native threads allow 
for sloppy thread coding, green threads don't), so any comparisons must have 
these options set the same.

Regards,

Cees
-- 
Cees de Groot   http://www.cdegroot.com <[EMAIL PROTECTED]>



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: JDK 1.2 really slow - *NOT A BUG in JDK*

1999-07-05 Thread Bjoern Smith

"W. Christopher Everhart" wrote:

> I was having some problems with the pre-release of JDK1.2 being very very slow.  I 
>tested it with NetBeans, and compared the results to a versino of NetBeans with 
>JDK1.1.7v3 and noticed that both were slow, but the newer version was even slower.
>
> It ends up that the problem was with the distributed X-Windows on RedHat 6.0.  
>Upgrading to the latest maintenance release completely solved the problem and now it 
>flies!!

Very interesting! When you say "the distributed X-Windows", do you mean the XFree86 
server?
What is the version you upgraded to that "makes it fly"?

Regards,

--
Björn Smith Compound Systems AB, phone +46 8 4464260
Email:  [EMAIL PROTECTED]
URL:http://www.compound.se




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]