Re: JDK 111.7v1a_native/incomplete libawt linkage?

1999-05-04 Thread bernd kreimeier

> Moses> LD_PRELOAD=libXt.so libXm.so libXext.so
Juergen:
> We clarified some motif issue: The next 1.2 release will have the necessary
> parts of motif statically linked into libawt. With this change Invocation
> and AWT should work.


Well, any chance to get this working with 1.1.7v1a+native?
I have to deal with glibc, libdl, X11, Invocation all in one
application - a mixture so volatile that I expect my chances
to get 1.1.7v1a+native working to be bigger for the time
being. 


  b.




P.S.: side note - does anybody know why -noasyncgc was removed
from the JDK 1.2 java? Is there a good technical reasons? 





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



Socket bug?

1999-05-04 Thread Andreas Rueckert

Hi!

Platform: RedHat 5.1, Kernel 2.2.3, JDK 1.1.7a

I connect with a FTP client to localhost and check for a data connection
spoofing attack then. I create a IP from a string "127.0.0.1", but it's not
equal to the sockets remote IP:

Remote-IP: 127.0.0.1 
Test-IP: localhost/127.0.0.1 
remoteIp <> testIp

Checked Jitterbug, but couldn't find anything. Is this a known bug in Sun's JDK
1.1.7a? It worked with older JDK's here. Or is it me, doing something wrong
here?
Apologies, if this has been discussed here previously.

Ciao,
Andreas



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



Glibc 2.1.x jdk 1.1.6v5 available

1999-05-04 Thread Christopher Seawood


An _unofficial_ version 1.1.6v5 compiled against glibc 2.1.1 pre1 is
available at http://www.seawood.org/java/ .  Try to be gentle.  If someone
could mirror it or bless it and put it with the official releases to be
mirrored, my provider would be grateful. :)

Details.  It was built on a Red Hat 5.9 box using egcs 1.1.2.  It was
built against a glibc 2.0 built Motif 2.1 distributed by RedHat (I believe
it was the Metrolink version).  The official Blackdown 1.1.6v5 patch was
used for this build plus the glibc 2.1.1-specific patch.  I did not
bother doing a 1.1.7 build because I don't have 1.1.7 source.  As soon as
I can get 1.1.8 source (the first tarball was screwed up), I'll attempt to
build it under glibc 2.1.1 as well.

Also, in that directory is a patch to make Java-WorkShop 3.0 work with the
Blackdown 1.2pre JDK.  You also need the libstdc++-lib6.0-1.so.2
from the Debian 2.1 (slink) distribution (needed by JDK's
libfontmanager.so). Don't forget to go into Preferences->Builder and tell
it to use the standard JDK compiler rather than the "fastjava" compiler
which is a solaris binary.

- cls





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



Re: Socket bug?

1999-05-04 Thread Michael Sinz

On Tue, 4 May 1999 15:35:47 +0200, Andreas Rueckert wrote:

>Hi!
>
>Platform: RedHat 5.1, Kernel 2.2.3, JDK 1.1.7a
>
>I connect with a FTP client to localhost and check for a data connection
>spoofing attack then. I create a IP from a string "127.0.0.1", but it's not
>equal to the sockets remote IP:
>
>Remote-IP: 127.0.0.1 
>Test-IP: localhost/127.0.0.1 
>remoteIp <> testIp

How are you getting the Test-IP?  It looks like you just did a
toString() on the InetAddress object.  That method returns the host
name (assuming it can reverse lookup the name) along with the address.
(localhost is the reverse lookup on your system for 127.0.0.1 - and
it is that for most systems)

>Checked Jitterbug, but couldn't find anything. Is this a known bug in Sun's JDK
>1.1.7a? It worked with older JDK's here. Or is it me, doing something wrong
>here?

This is not a bug in the JDK - you may wish to look at the getHostAddress()
method which will return a string of just the address.

See the java.net.InetAddress JavaDOCs for details.

Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] - http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz



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



Re: why do we need X11 to run purely command line java stuff?

1999-05-04 Thread dog

Michael.Sinz wrt:
> The Blackdown porting group has been thinking about changing the way the
> Linux Java Wrapper works so that it automatically detects if it should
> try to run the "X11" version of Java or not.  (Meaning the version that
> has the AWT peers in it)
> 
> The concept is that if DISPLAY is not set it will automatically set
> the NS_JAVA variable to TRUE.
> 
> ...
> The question is:  Is there a strong feeling against such a change?

absolutely not. this would work very well.

also your commitment to producing a jdk117 that will run with glibc2.1 will
be very warmly greeted.

dog


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



Re: HotSpot

1999-05-04 Thread Nathan Meyers

Steve Byrne wrote:
> 
> Matt Lord writes:
>  > Do you plan on porting HotSpot if and when Sun releases the source code?
> 
> If Sun will license us the code, we'll port it.

For what it's worth, Java Lobby reported a few days ago that Sun is
planning -- says Alan Baratz -- to release HotSpot source through the
SCL in about 3-6 months. The time, they say, is needed to lock down all
of the intellectual property issues first.

Nathan


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



Re: why do we need X11 to run purely command line java stuff?

1999-05-04 Thread Michael Sinz

The Blackdown porting group has been thinking about changing the way the
Linux Java Wrapper works so that it automatically detects if it should
try to run the "X11" version of Java or not.  (Meaning the version that
has the AWT peers in it)

The concept is that if DISPLAY is not set it will automatically set
the NS_JAVA variable to TRUE.

This is mainly to help clear up problems such as these below.  It will
reduce the number of things that the user needs to configure and make it
a bit more automatic, and hopefully reduce the number of times these types
of questions come up.

As it turns out, we are about to do a JDK 1.1.7 V2 release in order to work
with the new glibc 2.1 (plus a few other fixes) and I was wondering if
there is a problem with doing this change in the 1.1.x JDK.  (We also want
to do this in the 1.2 release but it is a bit further down the road)

The result would be that if you don't have X installed or are running this
from a console without X11 (thus without DISPLAY set) it will run the
version without the dependancy on X11 - without having to RTFM and set
the NS_JAVA environment variable.

The NS_JAVA environment variable will still be available for forcing the
issue (or you could unset the DISPLAY variable) but we hope that this
change could make things a bit more automatic.  Plus, since the JVM will
fail to display AWT componenets without the DISPLAY variable it really
should not change the behavior other than the type of error message
that would be generated when trying to run AWT code without a X server.

The question is:  Is there a strong feeling against such a change?



On Mon, 03 May 1999 23:41:25 -0400, James Seigel wrote:

>oh yeah are you using ny image libs?
>Spencer Marks <[EMAIL PROTECTED]> wrote on 3/5/99 8:22 pm:
>
>Make sure you are not using .awt packages because if so you might run
>into the problem that they require a valid DISPLAY environment
>variable. (I just encountered a similar situation...)
>
>Spencer
>
>[EMAIL PROTECTED] (John Kozubik) writes:
>> Hi.
>> 
>> We have a custom server that we wrote in java and runs on linux.  This
>> custom server does nothing but open and close sockets and transfer a few
>> bits of data here and there - needless to say it just runs off of the
>> command line and that is all there is to it.
>> 
>> So, in the interest of building the most spartan and clean linux box I
>> could, I reloaded the machine without any X-window support, X11, or any
>> garbage like that that we will never need.
>> 
>> Now java does not work.
>> 
>> Could you please explain to us how we can run our java command line program
>> without worrying about silly things like X11 printer libraries?  My
>> programmer is under the impression that we MUST install all this GUI crap
>> just to get out simple command line utility working.  I on the other hand
>> think that this is an absurd conception.
>> 
>> Any information would be appreciated,


Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] - http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz



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



Looking for compiler

1999-05-04 Thread Ong Boon Wee

Hi

I am new to Java and am looking for a user-friendly compiler for Java on 
Linux. It would be nice if the compiler has the features of Visual Basic. Does anyone 
know of such compiler?

Ong Boon Wee


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



Sorry! (was: Socket bug?)

1999-05-04 Thread Andreas Rueckert

Hi!

On Tue, 04 May 1999 Michael Sinz <[EMAIL PROTECTED]> wrote:



>This is not a bug in the JDK - you may wish to look at the getHostAddress()
>method which will return a string of just the address.

Michael is right. There was an additional getHostAddress() call, so the
equals() had to fail.
Apologies!

Ciao,
Andreas



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



pre-jdk117_v2 works fine (was: Re: why do we need X11 to run purely command line java stuff?)

1999-05-04 Thread Louis-David Mitterrand

On Tue, May 04, 1999 at 01:19:43PM +, dog wrote:
> Michael.Sinz wrt:
> > The Blackdown porting group has been thinking about changing the way the
> > Linux Java Wrapper works so that it automatically detects if it should
> > try to run the "X11" version of Java or not.  (Meaning the version that
> > has the AWT peers in it)
> > 
> > The concept is that if DISPLAY is not set it will automatically set
> > the NS_JAVA variable to TRUE.
> > 
> > ...
> > The question is:  Is there a strong feeling against such a change?

I think this the Right ThingĀ®, please go ahead with this change.

> absolutely not. this would work very well.
> 
> also your commitment to producing a jdk117 that will run with glibc2.1 will
> be very warmly greeted.

FYI a pre-117_v2 is already available at http://www.wisp.net/~kreilede/
and it works like a charm on my Debian potato system (glibc 2.1.1).

-- 
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.aparima.com

Bill Gates to his broker: "You idiot, I said $150 million on **SNAPPLE**!!!"


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



... java.io.*

1999-05-04 Thread Daniel Ignat

hi 

import java.io.*;

public class f_open
{
   public static void main (String args[])
 {
File f = new File ("message.test",);

 if(f.exists())
   System.out.println(f + " exist");
 else
   System.out.println(f + " oppps ... not exist");
 }
... some topic ;-)

now .. how can I read from file 
first line is:

May  4 15:51:04 dexter pppd[304]: local  IP address *.*.*.*

- in my scenario I need to read first line and:
read from second  May 4 and format text 'May 4'
read from next  15:51:04 and rezult '15:51:04'
read from next  dexter .
read from next  pppd[304]: ...
read from end off line and '. rest of line'

go to next line ...
...

Q: for this class I need to use FileReader - for read-in
   and FileWriter - for write-in ?

Thank ... !

DANIEL
[EMAIL PROTECTED]


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



Re: pre-jdk117_v2 works fine (was: Re: why do we need X11 to run purely command line java stuff?)

1999-05-04 Thread Michael Sinz

On Tue, 4 May 1999 18:44:51 +0200, Louis-David Mitterrand wrote:

>On Tue, May 04, 1999 at 01:19:43PM +, dog wrote:
>> Michael.Sinz wrt:
>> > The Blackdown porting group has been thinking about changing the way the
>> > Linux Java Wrapper works so that it automatically detects if it should
>> > try to run the "X11" version of Java or not.  (Meaning the version that
>> > has the AWT peers in it)
>> > 
>> > The concept is that if DISPLAY is not set it will automatically set
>> > the NS_JAVA variable to TRUE.
>> > 
>> > ...
>> > The question is:  Is there a strong feeling against such a change?
>
>I think this the Right Thing , please go ahead with this change.
>
>> absolutely not. this would work very well.
>> 
>> also your commitment to producing a jdk117 that will run with glibc2.1 will
>> be very warmly greeted.
>
>FYI a pre-117_v2 is already available at http://www.wisp.net/~kreilede/
>and it works like a charm on my Debian potato system (glibc 2.1.1).

Yup - Juergen did the glibc 2.1 changes (plus some more AWT/Window Manager
things)  We are just getting a "roundtoit" for testing and releasing.
(BTW - we have had very few roundtoits.  A few square ones but otherwise
not many at all - and most have been placed into the Java 2 pile which
seems to never have enough.)

Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] - http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz



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



RE: Looking for compiler

1999-05-04 Thread Peter Schuller

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

>   I am new to Java and am looking for a user-friendly compiler for Java on
> Linux. It would be nice if the compiler has the features of Visual Basic.
> Does anyone know of such compiler?

What you're looking for is not a compiler, but an IDE (Integrated Development
Environment).

Since you say you want something like VB, I guess you're into the
click-and-play stuff, in which case I'd recommend Netbeans Developer
(www.netbeans.com). It's free for non-commercial use, written in Java+Swing and
works on Linux.

However, being a commercial product, the source code editor has nowhere near
the same functionallity as emacs/xemacs/vim/jEdit etc... 

There are screenshots on the website which should give you an idea of what to
expect.

/ Peter Schuller

- ---
PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
E-Mail: [EMAIL PROTECTED] Web: http://hem.passagen.se/petersch
Help create a free Java based operating system - www.jos.org.



-BEGIN PGP SIGNATURE-
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBNy8wOcBfJ1FVhL2YEQJSjwCcD9nhFDU7b4ioilSYHs6KnFoyEnsAoNwS
GmWcYVODVSYVtLNY7KxbLSYv
=ESpb
-END PGP SIGNATURE-


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



Car companies adopt Java for multimedia platform

1999-05-04 Thread Alexander V. Konstantinou

Mailed in todays "NewsScan Daily" (now all we have to hope for is that they
make the right choice and choose Linux as the embedded OS :-)

[ ... content removed ...] 

CAR COMPANIES ADOPT JAVA FOR MULTIMEDIA PLATFORM
The Automotive Multimedia Interface Consortium (AMIC) has agreed to use Sun
Microsystems' Java software as its standard for in-car multimedia systems, 
and has appointed Sun and IBM as development partners.  Ford,
Daimler-Chrysler, General Motors, Renault and Toyota formed AMIC last
October in an effort to establish guidelines for hardware and software
interfaces, protocols and gateways.  AMIC plans to invite other companies to
join it, and has already received expressions of interest from BMW, Fiat,   
Honda, Matsuda, Nissan, Opel, Peugeot Citroen, Volkswagen and Volvo.  (EE   
Times 4 May 99)  http://www.techweb.com/wire/story/TWB19990503S0027

[ ... content removed ...] 


Copyright 1999. NewsScan Daily (R) is a publication of NewsScan.com., which
also produces Innovation Weekly, covering trends, strategies and innovations
in business and technology.  In addition, we offer customized publications
and news services covering specific topics and industries of interest to  
corporate and not-for-profit client organizations.  Contact us if you are 
interested in obtaining such services.

Send all subscription messages to [EMAIL PROTECTED] with either
'subscribe' or  'unsubscribe' in the subject line.

Note to organizations: you are welcome to re-post NewsScan Daily on your
intranet without charge, PROVIDED that you let us know that you are doing it.

We call our news section "Above The Fold" to honor the tradition of the
great "broadsheet" newspapers in which editors must decide which news  
stories are of such importance that they should be placed "above the fold"
on the front page


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



Re: Glibc 2.1.x jdk 1.1.6v5 available

1999-05-04 Thread Sandro Hawke

> An _unofficial_ version 1.1.6v5 compiled against glibc 2.1.1 pre1 is
> available at http://www.seawood.org/java/ .  Try to be gentle.  If one
> could mirror it or bless it and put it with the official releases to be
> mirrored, my provider would be grateful. :)

Well, I can mirror it at least:  roads.org/mirrors/www.seawood.org/java

Download away.

-- sandro



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



Re: Glibc 2.1.x jdk 1.1.6v5 available

1999-05-04 Thread Tom McMichael

Sandro Hawke wrote:

> > An _unofficial_ version 1.1.6v5 compiled against glibc 2.1.1 pre1 is
> > available at http://www.seawood.org/java/ .  Try to be gentle.  If one
> > could mirror it or bless it and put it with the official releases to be
> > mirrored, my provider would be grateful. :)
>
> Well, I can mirror it at least:  roads.org/mirrors/www.seawood.org/java
>
> Download away.
>
> -- sandro

Is there a reason why you haven't tried jdk117_v2 with glibc 2.1.1.
I'm using it on my RH 6.0 install and it works great (using with
swing and JDBC).

Go to http://www.wisp.net/~kreilede/

Let me know how it works for you

Tom McMichael
[EMAIL PROTECTED]


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



Re: Glibc 2.1.x jdk 1.1.6v5 available

1999-05-04 Thread Christopher Seawood

On Tue, 4 May 1999, Tom McMichael wrote:

> Is there a reason why you haven't tried jdk117_v2 with glibc 2.1.1.
> I'm using it on my RH 6.0 install and it works great (using with
> swing and JDBC).

Because I've been sitting on this tarball a week waiting for a response
from sbb.  Looking at the mail archives, there was no indication that
anyone was actually looking into the glibc 2.1.x situation so I decided to
go for it.  Now that it's actually been done, I can go back working on
other projects. :)

- cls



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



timezone weirdness

1999-05-04 Thread Godmar Back


 Hi,

I'm using the glibc version of jdk1.1.7v1a on a RH 5.2
system with glibc 2.0.7.

When trying to run some programs, I'm getting this message:
java.lang.Error: dtz null
at java.util.TimeZone.getDefault(TimeZone.java:94)
at
at
at ObjectSerialization.main(ObjectSerialization.java:8)

It  also happens in the compiler:
java.lang.Error: dtz null
at java.util.TimeZone.getDefault(TimeZone.java:94)
at
at java.text.MessageFormat.format(MessageFormat.java)
at java.text.MessageFormat.format(MessageFormat.java)
at java.text.MessageFormat.format(MessageFormat.java)
at sun.tools.javac.Main.getText(Main.java)
at sun.tools.javac.BatchEnvironment.errorString(BatchEnvironment.java)
at sun.tools.javac.BatchEnvironment.error(BatchEnvironment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.java.Environment.error(Environment.java)
at sun.tools.tree.Context.findOuterLink(Context.java)
at sun.tools.tree.Context.findOuterLink(Context.java)
at 
sun.tools.tree.NewInstanceExpression.insertOuterLink(NewInstanceExpression.java)
at sun.tools.tree.NewInstanceExpression.checkValue(NewInstanceExpression.java)
at sun.tools.tree.Expression.checkInitializer(Expression.java)
at 
sun.tools.tree.VarDeclarationStatement.checkDeclaration(VarDeclarationStatement.java)
at 
sun.tools.tree.DeclarationStatement.checkBlockStatement(DeclarationStatement.java)
at sun.tools.tree.CompoundStatement.check(CompoundStatement.java)
at sun.tools.tree.Statement.checkMethod(Statement.java)
at sun.tools.javac.SourceField.check(SourceField.java)
at sun.tools.javac.SourceClass.checkFields(SourceClass.java)
at sun.tools.javac.SourceClass.checkInternal(SourceClass.java)
at sun.tools.javac.SourceClass.check(SourceClass.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An error has occurred in the compiler; please file a bug report 
(http://java.sun.com/cgi-bin/bugreport.cgi).
1 error  

Here's the input with which it happens, save it as ObjectSerialization.java
The weird thing is that it happens only intermittently, though it's
reproducible for a given input.

I'm using green threads and no JIT, although it also happens with
native threads and TYA.

NB: the failure that happened when running the program was produced
after I compiled the .java file with Kaffe's pizza compiler.

More info, in case you're interested:
My env:
HOSTNAME=peerless.cs.utah.edu
LOGNAME=gback
PIXELFXDIR=/usr/pfx/Pixel2
MAIL=/var/spool/mail/gback
MACHTYPE=i386
WWW_HOME=http://www.cs.utah.edu/~gback/
TERM=xterm-color
HOSTTYPE=i386-linux
PATH=/usr/local/java/bin:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/bin:/sbin:/usr/sbin:/usr/local:/usr/etc:/opt/local/bin:/usr/local/bin:/usr/X11R6/bin:/opt/wordperfect/wpbin:/home/gback/bin:.:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/X11R6/bin:/opt/kde/bin:/usr/X11R6/bin
HOME=/home/gback
BITMAPDIR=/home/gback/bitmaps
SHELL=/bin/tcsh
USER=gback
VENDOR=intel
GROUP=cs-rsrch
DISPLAY=:0.0
HOST=peerless.cs.utah.edu
OSTYPE=linux
NNTPSERVER=news
OPENWINHOME=/usr/openwin
PWD=/home/gback/kaffe/test/fail
SHLVL=4
EDITOR=vi
CVSROOT=/usr/lsrc/flux/CVS

gback@peerless [79](~) > ls -l /etc/localtime
lrwxrwxrwx   1 root root   33 Apr 13 18:23 /etc/localtime -> 
../usr/share/zoneinfo/US/Mountain
gback@peerless [80](~) > date
Tue May  4 16:16:08 MDT 1999

Any ideas?  Is this a know problem?
Btw, is there a bug database for this jdk?

Thanks,

- Godmar
 
///
import java.io.*;
import java.util.*;

public class ObjectSerialization {
  public static void main(String[] args) {
WR wr = new WR();
wr.write();
wr.read();
  }

class WR {

FileOutputStream os = null;
ObjectOutput oo = null;
FileInputStream is = null;
ObjectInput oi = null;

WR()  {};

// write an object
 public void write() {
Dated = new Date();
try {
os = new FileOutputStream("SavedObject");
oo = new ObjectOutputStream(os);
} catch ( Exception e ) {
System.out.println(e);
System.out.println("WRITE: Unable to open stream as an object 
stream");
e.printStackTrace();
}
try {
oo.writeObject("Today is: ");
  

Re: Looking for compiler

1999-05-04 Thread Chris Abbey

there are two serious* compilers for java on linux that I know of... javac
that comes with the jdk and jikes from alphaworks.ibm.com. VB isn't a
compiler; it's an overglorified scripting langauge bundled with a propriatary
IDE. I think what you wanted was a reference to an IDE for Linux... there
are many to choose from and everyone likes their own... so in an effort to
not start a religious war I won't even state my preference. -=Chris

*note: when I said serious I meant "ready for prime time" there are others
in development, but I don't think any of them have left beta.

At 10:31 PM 5/4/99 +-800, Ong Boon Wee wrote:
>Hi
>
>   I am new to Java and am looking for a user-friendly compiler for Java on
Linux. It would be nice if the compiler has the features of Visual Basic.
Does anyone know of such compiler?
>
>Ong Boon Wee


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



newb: running Java service?

1999-05-04 Thread Tom Roche

First: I hope this, being more of a Linux question rather than a Java
question, isn't off-topic: if so, please excuse.

Second: feel free to correct any and all errors in conception or
usage you see--I know all too little about Linux, Unix, and system
administration. (But I hope to devote more time to this over the
summer.)

I'm working on a Java-based website, running on Apache on a Linux
box. It has a backend that connects users (applets) to the
database. For testing, I've been logging in and running a script that
runs my backend classes. Now I want the backend to run as a service,
i.e. without a user logged in (like FTP, etc).

Is "service" the proper term to use here? ("daemon"?)

What is "the best way" to do this?

I believe the best way to do this is via inetd: is this correct?

If so, what would be the proper settings for inetd.conf?

Your assistance is appreciated, [EMAIL PROTECTED] 


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



Re: newb: running Java service?

1999-05-04 Thread Dustin Lang


Hi,

I'm not certain about any of this, but here are my guesses:

> Is "service" the proper term to use here? ("daemon"?)

Daemon would probably be more appropriate.

> What is "the best way" to do this?

If I'm not mistaken, many (most?) internet-type daemons, ftpd for example,
will fork() a process, allowing the original process to terminate.  The
fork()ed process runs in the background.

> I believe the best way to do this is via inetd: is this correct?

inetd does the same thing, except whenever a request arrives, it spawns
the appropriate daemon.

Now, I'm assuming that your backend is java, since you mentioned classes.
In my experience, java is slow to start up, but once it's running it's
okay.  If you run your backend through inetd, that means that for each
incoming request, inetd will start up a new java virtual machine.  In a
word: ouch!  Just imagine you have 50 users at once :)

Probably what would be better would be for it to operate the same way as a
standalone daemon.  That way, only one jvm would get fired up and it could
handle each incoming request with a fair bit of speed.

> If so, what would be the proper settings for inetd.conf?

I would guess something like:

 stream tcp nowait root /usr/local/java/bin/java  

There is, I believe, another alternative that I haven't used and know
basically nothing about: servlets.  You can get modules (?) for Apache
that allow it to run server-side java classes.  I believe most of them
keep a jvm resident so that handling each incoming request is fast.  Look
in the list archives or on the web for "Jserv" or "servlet".  Jserv is
just one that comes to mind.

Good luck :)
dstn.


---
--  Dustin Lang, [EMAIL PROTECTED]  --
(java developer, linux guy, green-haired freak)

Why Linux is so cool: /usr/include/string.h:190:
/* Sautee STRING briskly.  */
extern char *strfry __P ((char *__string));
---



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



Re: newb: running Java service?

1999-05-04 Thread Nathan Meyers

If your services are happening in connection with web interaction, which
it sounds like they are, you probably need servlets. Check out Apache
JServ (at the Apache site) -- you can launch your back-end classes right
from Apache.

Nathan


Tom Roche wrote:
> 
> First: I hope this, being more of a Linux question rather than a Java
> question, isn't off-topic: if so, please excuse.
> 
> Second: feel free to correct any and all errors in conception or
> usage you see--I know all too little about Linux, Unix, and system
> administration. (But I hope to devote more time to this over the
> summer.)
> 
> I'm working on a Java-based website, running on Apache on a Linux
> box. It has a backend that connects users (applets) to the
> database. For testing, I've been logging in and running a script that
> runs my backend classes. Now I want the backend to run as a service,
> i.e. without a user logged in (like FTP, etc).
> 
> Is "service" the proper term to use here? ("daemon"?)
> 
> What is "the best way" to do this?
> 
> I believe the best way to do this is via inetd: is this correct?
> 
> If so, what would be the proper settings for inetd.conf?
> 
> Your assistance is appreciated, [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: newb: running Java service?

1999-05-04 Thread Ted Neward

Tom--

If your users are running as applets, why not run your server as a servlet?
Does it need to hold state information across the entire userset, or is
each user interaction stateless?

What I'm suggesting is something like this: create a number of different
servlets to perform each task ("AddFooServlet", "RemoveFooServlet", etc.),
and have the applet simply open up URL connections (with appropriate
parameters sent as URL parameters) to the servlet of the appropriate type.
The servlet performs its thing, hands back any data, and quits. The data
(either direction) could even be URL-friendly string representations of
Serialized data, if necessary.

I can hear the OO purists preparing their flamethrowers now, so let me
issue the one argument that will make all this non-OO work worthwhile:
PERFORMANCE. Holding state is wasteful, so long as the various operations
can be held in a stateless manner (or state is held within the back-end
database, which is usually easier than you'd imagine), since state means
that object is now bound to a single client, and cannot service other
clients--this means you will need to hold 1 object on the server for every
client currently using the system, EVEN IF THE CLIENT ISN'T CALLING YOU AT
THE MOMENT.

With a stateless model, which works well with HTTP servers anyway (and
would allow for HTML-only thin client layers if the requirement came down
the pike, which it usually does, in my experience), a given servlet can be
unloaded when client "a" is still thinking, or service clients "b", "c" or
"d" as necessary. With a stateful model, 4 objects would need to be held
(one for a, b, c and d) until each client dropped out.

Whenever you start thinking about distributed objects, push for
statelessness as much as possible; if that's not feasible, push the state
someplace else, like the back-end database.

In your particular case, a servlet could take the SQL (or whatever you're
handing the back-end, you didn't specify) and pass it directly through to
the database. The servlets can open one (or more, if you want to support
some sort of pooling mechanism, or need to differentiate by
userid/passwords) connection to the database on startup, close it when the
servlet is unloaded, and use the same connection over and over to avoid
having to make that connect each time.

Opinions welcome, well-thought-out arguments welcome, flames > NUL. Hope
this helps.

At 10:15 PM 5/4/99 -0400, Tom Roche wrote:
>First: I hope this, being more of a Linux question rather than a Java
>question, isn't off-topic: if so, please excuse.
>
>Second: feel free to correct any and all errors in conception or
>usage you see--I know all too little about Linux, Unix, and system
>administration. (But I hope to devote more time to this over the
>summer.)
>
>I'm working on a Java-based website, running on Apache on a Linux
>box. It has a backend that connects users (applets) to the
>database. For testing, I've been logging in and running a script that
>runs my backend classes. Now I want the backend to run as a service,
>i.e. without a user logged in (like FTP, etc).
>
>Is "service" the proper term to use here? ("daemon"?)
>
>What is "the best way" to do this?
>
>I believe the best way to do this is via inetd: is this correct?
>
>If so, what would be the proper settings for inetd.conf?
>
>Your assistance is appreciated, [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]



Does JDK 1.2 work with RH 6.0

1999-05-04 Thread Al


I am going to upgrade to Red Hat 6.0 and I was wondering if  JDK 1.2
work with Red Hat 6.0?

Does any JDK work with RH 6.0?

Thanks

Al



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



Re: newb: running Java service?

1999-05-04 Thread zun

On Tue, 4 May 1999, Tom Roche wrote:

> I'm working on a Java-based website, running on Apache on a Linux
> box. It has a backend that connects users (applets) to the
> database. For testing, I've been logging in and running a script that
> runs my backend classes. Now I want the backend to run as a service,
> i.e. without a user logged in (like FTP, etc).

> Is "service" the proper term to use here? ("daemon"?)

"service" is the application, like mail, or web.  The program providing
the service is called the "daemon".  

> What is "the best way" to do this?
> I believe the best way to do this is via inetd: is this correct?

None.  Like everything else, it depends.  Does your backend listen for
network connections and stay up 24/7 and is multithreaded to allow for
multiple clients?  Then the best way is to create a cron job that
runs periodically, checking to see if the server is up, and if not,
starting the server.  You then let the server run all the time.  This is
called "standalone" mode (following Apache's convention).

If your backend just listens for one client and terminates abruptly, then
you could consider inetd.conf.

However, since Java start-up time is significant, it might be better if
the JVM is running standalone.  Also multiple clients would result in
multiple copies of your backend app.

> If so, what would be the proper settings for inetd.conf?

try "man inetd".  If it's too obtuse, let me know.

Another option is to use servlets, the converse of "applets" but embedded
on the server side.  Apache supports JServ (see java.apache.org) which
runs standalone alongside the web server.  Servlets let you do fancy
things which you may want in the future.  In particular you could pool
your database connections and reuse them from servlet to servlet.

. . . Sean.



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



Re: Does JDK 1.2 work with RH 6.0

1999-05-04 Thread zun


On Wed, 5 May 1999, Al wrote:

> I am going to upgrade to Red Hat 6.0 and I was wondering if  JDK 1.2
> work with Red Hat 6.0?

The answer from previous mailings is "not yet".  The next
prerelease/release should fix the problem.

> Does any JDK work with RH 6.0?

A new release of JDK 1.1.7 is already planned Real Soon Now.  If you're
impatient there's an unofficial release of it posted earlier, check the
mail archives at www.blackdown.org. 

. . . Sean.



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



Re: Does JDK 1.2 work with RH 6.0

1999-05-04 Thread Christopher Seawood

On Wed, 5 May 1999, Al wrote:

> I am going to upgrade to Red Hat 6.0 and I was wondering if  JDK 1.2
> work with Red Hat 6.0?

The current glibc 2.0 release of JDK 1.2 works if you use green threads
and the option -Djava.compiler=NONE.  

> Does any JDK work with RH 6.0?

There are glibc 2.1.x builds at http://www.wisp.net/~kreilede/ & 
http://www.seawood.org/java/ .

- cls



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



Re: ... java.io.*

1999-05-04 Thread Jeff Galyan

Use a StreamTokenizer to break the input stream into tokens, using
whitespace as the quote character.

Daniel Ignat wrote:
> 
> 
> now .. how can I read from file 
> first line is:
> 
> May  4 15:51:04 dexter pppd[304]: local  IP address *.*.*.*
> 
> - in my scenario I need to read first line and:
> read from second  May 4 and format text 'May 4'
> read from next  15:51:04 and rezult '15:51:04'
> read from next  dexter .
> read from next  pppd[304]: ...
> read from end off line and '. rest of line'
> 
> go to next line ...
> ...
> 
> Q: for this class I need to use FileReader - for read-in
>and FileWriter - for write-in ?
> 


-- 
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
==
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"

The views expressed herein do not necessarily reflect those of my
employer.

Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.


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



Re: glibc 2.1 binary

1999-05-04 Thread Steve Byrne

Scott Murray writes:
 > On Tue, 27 Apr 1999, Tom McMichael wrote:
 > 
 > [snip!]
 >  
 > > Good point Paul ... checked out jitter bug and according to the "DONE"
 > > section the two choices for glibc 2.1 are:
 > > 1) jdk 1.2
 > > 2) pre-pre-release of jdk117_v2 available at ...
 > > 
 > > http://www.wisp.net/~kreilede/
 > > 
 > > I'm downloading it right now ... will post if I have success
 > > Any comments on this pre-release ?
 > 
 > It seems to fix the problem I (and others I think) had with Runtime.exec
 > hanging sometimes when used with native threads.  Which is good, as I
 > was almost resigned to putting in some Linux specific code into the app
 > I'm working on to avoid the problem under v1a.

What kind of hanging?  Were you waiting for the process to complete explicitly?
I'm very interested to find out more.

We're having that problem in 1.2 with native threads, which is one of the
reasons that we don't say we pass JCK using native threads yet.

Steve


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



Dumb Question

1999-05-04 Thread Luther Baker

I am using Red Hat and recently downloaded your jdk1.2. Unfortunately, I
am not as UNIX savvy as I need to be and the .bz2 extension is throwing
me. gunzip and gzip resond with errors that they don't understand the
file format.

Is there a man page or an http address to download this expander... or
what is .bz2 and am I typing the wrong command in.

Thanks...


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



Dumb Question

1999-05-04 Thread Alex Pozgaj

Luther Baker writes:
 > I am using Red Hat and recently downloaded your jdk1.2. Unfortunately, I
 > am not as UNIX savvy as I need to be and the .bz2 extension is throwing
 > me. gunzip and gzip resond with errors that they don't understand the
 > file format.

The .bz2 files can be handeled with the program called "bzip2".
You can find it at http://www.muraroa.demon.co.uk/


Cheers, alex.
-- 
"Programming today is a race between software engineers striving
to build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.  So far, the Universe
is winning." -- Rich Cook


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



JDK 1.2 on Redhat 6.0 ?

1999-05-04 Thread chetan

Hi all
Any experiences with JDK 1.2 on Redhat 6.0 ?
I have just upgraded from RH 5.1 to RH 6.0 and find
myself without any java.
Do I need to recompile/relink source (if it is available) ?
Regards,
Chetan


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