Hmmm.. New to the game

1999-02-26 Thread Michael

I need to install the JRE on a server for one specific application..
read the docs, but a little confused.. (Sorry for such a basic question,
but the archives weren't responding)

Of the 3 distros.. I tried first the jre, and then the jdk.. (Still
haven't figured out what the rt is..)  Using the 1.1.7 version GLIBC
It says in the docs that by setting the variable NS_JAVA=true that I
should get the JAVA binary that doesn't require the X installed on the
server, but I still get the "Missing libXp" error..  I simply need this
to handle a chat server application, and I want the minumum footprint..
If I have to use the full JDK then so be it, but the JRE would be
lighter..

Do I still have to install the libXp even if using the smaller version
that doesn't require X
If that isn't true, then why are they complianing?  Have I set the
environment variable incorrectly?

A quick response would be MOST helpful, as I am trying to get this app
up and running for a client by the end of the weekend..

Thanks.


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



java segfaults on Hello.java

2001-07-23 Thread Michael .

Using the example greetings.Hello class as in
http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javac.html,
I compiled successfully but got the following
execution:
--
$ java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone



Another exception has been detected while we were
handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC= 0x0x4025e988
SIGNAL= 11
FUNCTION NAME = (N/A)
LIBRARY NAME  = (N/A)
Please check ERROR REPORT FILE for further
information, if there is any.
Good bye.
Segmentation fault
--

Sometimes the error message doesn't appear (i.e., all
looks as expected).

Using Blackdown's j2sdk1.3_1.3.1-1_i386.deb, Debian
woody, and a custom 2.2.19 kernel.


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


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




Re: java segfaults on Hello.java

2001-07-25 Thread Michael .

This error, incidentally, comes about half the time,
running the command line repeatedly. Adding "-Xrs"
reduces the occurrence to about 1 out of 10 times (and
gives a different PC value, no surprise). Running from
jdb, the error doesn't occur at all.

Leads me to suspect a bug in java's shutdown code.

If anyone else has seen this behavior (or not), I'd
like to know your configuration.

> $ java greetings.Hello World Universe Everyone
> [...]
> Another exception has been detected while we were
> handling last error.
> Dumping information about last error:
> ERROR REPORT FILE = (N/A)
> PC= 0x0x4025e988
> SIGNAL= 11
> FUNCTION NAME = (N/A)
> LIBRARY NAME  = (N/A)
> Please check ERROR REPORT FILE for further
> information, if there is any.
> Good bye.
> Segmentation fault
>
--
> 
> Sometimes the error message doesn't appear (i.e.,
> all
> looks as expected).


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


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




Windowing System

1998-09-02 Thread Michael Emmel

I've written a complete Windowing System in Java .
The top layer is the Swing. It contains a hardware driver a bootstrap
awt driver, And a driver using XTC
a all java XLIB.
It is available at
http://www.fdc.co.uk/jos/src/graphics.tar.gz
I hope some members of this group are intrested.
I'm currently seeing if the JOS group wants it.

Mike



Re: JAVA PROJECT! CODER WANTED!!

1998-09-03 Thread Michael Rohleder

Nelson Minar writes:
 > >> What, are you kidding?
 > >HE'S COMPLETELY NUTS
 > 
 > Maybe a refugee from the Freedows project :-)

Can please stop this stupid thread...

-- 
+#if defined(__alpha__) && defined(CONFIG_PCI)
+   /*
+* The meaning of life, the universe, and everything. Plus
+* this makes the year come out right.
+*/
+   year -= 42;
+#endif
(From the patch for 1.3.2: (kernel/time.c), submitted by Marcus Meissner)



JDK1.1.6v4a socket problem

1998-09-08 Thread Michael Thome

I'm having a socket-related problem new to v4a.  It all still works
under v3a...

Here's the exception:
com.objectspace.voyager.transport.TransportException: java.net.SocketException: Socket 
option unsupported
at com.objectspace.voyager.transport.Gateway.send(Gateway.java:83)
at 
com.objectspace.voyager.message.RemoteMessenger.travel(RemoteMessenger.java:150)
at com.objectspace.voyager.message.RemoteSync.deliver(RemoteSync.java:95)
at 
com.objectspace.voyager.message.RemoteSync.__remoteInvoke(RemoteSync.java:70)
at com.objectspace.voyager.message.Messenger.__invoke(Messenger.java:106)
at com.objectspace.voyager.message.Future$1.run(Future.java:111)
at com.objectspace.thread.ReusableThread.run(ReusableThread.java:82)

I'm using:
JDK1.1.6v4a-glibc (normally with TYA 1.0, currently disabled for debugging).
RH 5.0+patches  (mostly up to 5.1).
glibc-2.0.7 (rpm glibc-2.0.7-19)
ld-2.0.7
XF86 3.3.2  (rpm 3.3.2-3)
kernel 2.1.117 on ppro

The salient bit of the strace seem to be:
setsockopt(22, IPPROTO_TCP1, [1], 4)= 0
but I don't see any obvious differences between a working (v3a) and
broken (v4a) strace - not too difficult to miss something, though...

Cheers,
-mik
-- 
Michael Thome ([EMAIL PROTECTED])



Re: Expanding arrays

1998-09-08 Thread Michael Sinz

On Tue, 08 Sep 1998 17:59:26 +0200, Maarten van Leunen wrote:

>Howdie,
>
>Is there a way to expand arrays. Like, I want to put a unknown number of
>strings in an array.
>
>And then "return" the array of Strings in the Method.
>
>I read one string, and wish to add it to the array without having to
>define the amount of Strings in the array previously.

Generally I tend to use the java.util.Vector class if I really can not
know the size of the array before hand.  Then, if I need to make an
array from it, I just use the copyInto() method after building the
array of the right type and size.  For example:

java.util.Vector v=new java.util.Vector();

///  add all sorts of String object to the vector

String[] result=new String[v.size()];
v.copyInto(result);


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




Re: ddd, gdb, jdb and java: debuging on linux

1998-09-09 Thread Michael Sinz

On Wed, 9 Sep 1998 12:10:23 -0700 (PDT), Luiz Otavio L. Zorzella wrote:

>Hi,
>
>I've been missing a good debuger for java on linux for quite some
>time. It was then that I found this on the ddd
>(http://www.cs.tu-bs.de/softech/ddd/) manual, under "News":

I don't know if it is "good" but the IBM Alphaworks debugger known
as JIKES DEBUGGER works rather well (IMHO) for most JAVA programs.
It is written in 100% "pure" Java so it runs if you Java can do AWT
correctly.  The nice thing is that it comes with source code too.

Check out the Alphaworks web site at http://www.alphaworks.ibm.com/formula

(I have modified the source to have line numbers in the listing window.
Check out the diffs I posted to the JIKES DEBUGGER discussion list)

And, yes, it shows variables and objects and threads and...

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




Re: Java on Linux... bug in InetAddress ??? please help!

1998-09-10 Thread Michael Sinz

On Thu, 10 Sep 1998 13:34:08 -0700, Masuda, Bond wrote:

>Hello,
>
>I am having trouble getting reverse DNS lookups to work on Linux.
>Following is a snip of the code... this works on Windows 95, Windows NT,
>but not on Linux. The problem is that the getHostName method returns the
>ipString instead of the hostname... i.e., it returns something like
>10.2.6.15 instead of whatever.home.edu. The JDK version seems to not
>matter in this particular case... so I don't believe that is an issue. I
>am wondering if this might be a bug in the port of Java to linux.

First - have you tried that address in nslookup?

Just type:

nslookup 10.2.6.15

If this does not return the name of the host then the problem is that
you either do not have the DNS setup or it is set up wrong or the host
really does not have a name.

[...]

>I would appreciate any help on this issue. Thanks in advance.

I wish I could help you more but on my machine your address does not
work but address on the net, such as 204.146.18.33 do work.  (That
should return something like www.ibm.com if I remember correctly...)


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




RE: Java on Linux... bug in InetAddress ??? please help!

1998-09-10 Thread Michael Sinz

On Thu, 10 Sep 1998 14:44:50 -0700, Masuda, Bond wrote:

>Hello Michael,
>
>Thank you for replying so quickly..
>
>The particular address in my message was a bogus address.. I was
>assuming that would be clear when I mentioned the whatever.home.edu. In
>anycase, yes, my DNS is setup properly, as 'nslookup' and 'host' both
>return a hostname and address... in particular,
>
>for IP = 206.19.60.13 I get
>hostname = chinook.tenthmtn.com
>
>but the Java program in my previous message does not work. I believe it
>is capable of doing the reverse lookup... as is my understanding...
>instantiation of the InetAddress object fails if reverse lookup is to
>fail. However, my program continues to execute to the point where it
>calls the getHostName() method. So, to me that means that the object was
>successfully instantiated... which leads me to conclude that reverse
>lookup was successful. However, the getHostName method returns the ip
>address in string representation instead of the hostname. It seems to me
>that the InetAddress object is instantiated, the ipString accepted, the
>reverse lookup successful, but the hostname is not stored in
>InetAddress.

Here is what I ran on my machine:  (Linux 2.0.35 with JDK 1.1.6)

class test
{
public static void main(String[] args) throws Throwable
{
System.out.println(java.net.InetAddress.getByName(args[0]));
}
}

Running it with:

java test 204.146.18.33

produces:

www.ibm.com/204.146.18.33

>In case this matters, I am on Redhat 5.1 Linux kernel 2.0.35. I've used
>both JDK 1.0.2 and JDK 1.1.5. 
>
>You mention that you are able to do reverse lookup on your machine. What
>platform are you on? And did you use the code in my previous message or
>some other Java program? My java program DOES work on windows 95 and
>Windows NT platforms... it DOESN'T WORK ONLY ON Linux.

I have also run your program (with the addition of an import statement
that was not in your original posting) and it produced the correct answer:

java revDNS 204.146.18.33
Hostname is :www.ibm.com

Again, this is on Linux 2.0.35 kernel (x86 CPU) on my small network here.
I have also run both your program and my little test program and they
both produce the same results under Windows using the Sun 1.1.6 JDK.
(And I assume it is the same JDK you are using)

The same result also happens on my Linux 2.0.35 (Alpha 21164) system, but
that was running a JDK 1.1.5 variant.

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




Thread dump?

1998-09-11 Thread Michael Thome


I seem to have forgotten the incantation to get the VM to print a
"full thread dump" on demand - I had thought it was C-\, but it just
core dumps.

I'm currently using the glibc 116v3a.

Thanks,
    -mik
-- 
Michael Thome ([EMAIL PROTECTED])



Re: Well done

1998-09-12 Thread Michael Sinz

On Sat, 12 Sep 1998 16:00:34 -0700, James Howe wrote:

>P.S.  Thanks alot guys !!

I am sure the whole team would like to say "You are welcome."


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




Re: To read from a port

1998-09-13 Thread Michael Sinz

On Sun, 13 Sep 1998 20:56:35 +0200, Carlos Garcia wrote:

>Hi. There is somebody who can tell me how to get information from a
>Ethernet card on my PC system? Of course, I know the protocol of the outward
>system.

>From the ethernet card?  Or do you want to read from a TCP/IP (TCP or UDP)
data stream?  Directly from the card is non-trivial in Java (as in you
will need to do native methods and maybe even more complex code to deal
with the green threads)

However, do networked (Sockets and UDP datagrams) that is all
supported in Java at the pure-Java level.  Check on the java.net
package, and specifically the java.net.Socket and java.net.DatagramSocket


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




Re: Reading /dev/cua? or /dev/ttyS?

1998-09-13 Thread Michael Sinz

On Sun, 13 Sep 1998 17:46:39 -0300, Fernando Soares Barrocal wrote:

>
>Brazilian Hello !
>
>I have a CodeBar Reader attached at /dev/cua1 and I can read from it from
>some applications, opening the "/dev/cua1" file and reading from it ! 
>
>There is any way to do this with java ?

Well, if you do not need to do anything other than opening and read/write
operations, just open that as a file in Java.  Then do the byte I/O
or stream I/O to/from it.

However, controlling the data rate and other serial port parameters will
need to be done with either an external program/native methods or the
new Java Serial (RXTX) extensions.  (I have not played with those as they
came out well after I had needed to do serial port stuff...)

What I did was to use stty and then to run the Java code with the
/dev/cua1 name for the file.  (This is not very cross platform other
than within Unix worlds and even then stty has some strange behaviors)

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




Re: java-linux, reliabilety

1998-09-15 Thread Michael Sinz

On Wed, 16 Sep 1998 13:57:27 -0700, Lukas Hazlehurst wrote:

>
>>> Is java on linux reliable enough to run on a box by itself for a
>>> considerable period of time, or would C be more appropriate ?
>>
>>I have had NO PROBLEMS with Linux Java for server software.  I've had
>>some problems with AWT-related stuff, but that's... well, the Java
>>burden at this point in time.
>
>That was my suspicion, avoiding a pretty UI would make for a more reliable
>service.  The UI would be provided via the network from another machine so
>it wouldn't matter if that fell over.

Actually, I would think that the UI would be generated at the client
machine anyway.

>>Also, for non-AWT apps, you can compile with TowerJ to full-blown native
>>code.
>
>
>This would be a definite plus.  Could i assume that as the compiled code is
>not running under a jvm etc it would be more reliable ?

I would not say that.  I can not talk about TowerJ but there are some
benefits to running within the JVM.  Now, you are limited to the quality
of the JVM but it has been run by and used by many people on many
platforms and so much of the core is very well tested.  The code generator
for any compiler can easily have bugs in it just like the JVM can.
However, the number of cases the code generator may have to deal with
could be far greater (especially if it does complex optimizations).

So, while the JVM could be the weekest link in a server-side Java
program, compiling to native code does not mean that it will be more
reliable, just that the types of problems and the way they manifest
themselves may change (and the ease and manner in which they are tracked
down.)


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




Re: Problem with getting JDK's to work

1998-09-16 Thread Michael Sinz

On Wed, 16 Sep 1998 09:50:49 -0400, Molenda, Mark P wrote:

>I have followed the checks listed on the web page for loading the jdk and
>everything looks great.
>The gzip tar file unloads and I add /usr1/jdk1.1.6/lib/classes.zip to my
>CLASSPATH and /usr1/jdk1.1.6/bin
>to my PATH.  When I try to compile a hello world program with javac it blows
>up with a core dump.
>
>I have RedHat 5.0 and glibc ( at least I think I do from the checks I
>performed in the README's). 

If you have RedHat 5.0 installed, make sure that you do not have the
kaffe JVM installed.  (Or have moved/renamed/etc the files and settings
it had set up)

>Anyone having a similar problem?  I tried this again with jdk1.1.5 v7 same
>problem, I need to get this up and running ASAP. -Mark

I have seen this problem on other systems and it was always that the
javac was from the Kaffe install.  (So I guess and hope that is what your
problem is.)

BTW - Maybe we should add to the FAQ a stronger statement about the Kaffe
RPMs from RedHat?

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




Re: Swing under Linux

1998-05-20 Thread Michael Wong

Following the same question.
Does anyone know of any good IDE which can use swing well?
I tried super mojo and it crashes everytime I tried to import
swing.

Thanks.

Mike.

Paul Reavis wrote:

> Aaron Walker wrote:
>
> > Does anyone know if the JFC (Swing) is available under Linux?
>
> Just download it from javasoft (I grab the tar.Z version) and use
> it. Works great. Swing is 100% java, so no porting required.
>
> --
>
> Paul Reavis  [EMAIL PROTECTED]
> Design Lead
> Partner Software, Inc.http://www.partnersoft.com



--
--
PortfolioHCI, Inc., your information and Internet solution provider

Michael Wong   [EMAIL PROTECTED]
Tel: (301)438-1444 Fax: (301)438-1444
For technical discussion, visit: http://www.portfoliohci.com
--






Re: Swing under Linux

1998-05-20 Thread Michael Wong

Oh, most of the function of swing are also in some other commercial
beans like
the JClass and the shafir.

I've been using them and feel they are quite well.
Anybody got other opinion?

--
--
PortfolioHCI, Inc., your information and Internet solution provider

Michael Wong   [EMAIL PROTECTED]
Tel: (301)438-1444 Fax: (301)438-1444
For technical discussion, visit: http://www.portfoliohci.com
--






Re: Possible bug in Linux JDK 1.1.6 v1 libc5 x86

1998-06-18 Thread Michael Plump

On Thu, 18 Jun 1998, DAVID BALAZIC wrote:

> This might be a bug in JDK 1.1.6 v1 libc5  i386
> 
> I crashes similarily with jdk 1.1.5 v7 libc5 i386
>
> SIGSEGV   11*  segmentation violation
> stackbase=0xb8e0, stackpointer=0xb7ec
> ...

FWIW, I also get errors like this when trying to run ICQ.  And this guy
has the same problem: 
http://www.blackdown.org/cgi-bin/incoming?id=17;user=guest

----
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz





Re: Possible bug in Linux JDK 1.1.6 v1 libc5 x86

1998-06-19 Thread Michael Plump

On Thu, 18 Jun 1998, Steve Byrne wrote:

> Hold on there -- I don't think the guy you mention has the same problem.  He's
> using ld 1.9.9, which seems to have broken binary compatibility with earlier
> versions of ld (like 1.9.6).  I'm pretty sure that's the cause of the problem

wait a minute... I, too, am using ld 1.9.9.  Are you telling me this is a
bad version?  If I downgrade, that won't wreck anything else (in your
opinion) will it?  thanks for your help with this...  I've asked here once
before but no one could help, and finally it sounds like someone is
pointing me in the right direction :-)  I really appreciate this!

Actually, I /meant/ to paste THIS URL:
http://www.blackdown.org/cgi-bin/jdk/incoming?id=18;user=guest
which is a guy who is DEFINITELY having the same problem (and notably,
using ld.1.9.9...)

so you think that is the problem?

--------
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: Possible bug in Linux JDK 1.1.6 v1 libc5 x86

1998-06-19 Thread Michael Plump

On Fri, 19 Jun 1998, DAVID BALAZIC wrote:

> I also have ld.so 1.9.9 , does that matter ?

I downgraded to ld.so.1.9.6 and got the exact same errors (I even diffed
the two error files, and they were EXACTLY the same...)

----
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: Possible bug in Linux JDK 1.1.6 v1 libc5 x86

1998-06-19 Thread Michael Plump

On Fri, 19 Jun 1998, Steve Byrne wrote:

> Your errors are different -- there have been reports of people having a
> completely working environment with 1.9.8 (as I recall) and things failing
> immediately with 1.9.9.  JDK is starting for you?  Do simple AWT apps work?

ehhh there was one file I forgot to link to the old version.  Once I
_fully_ downgraded to 1.9.6, it worked fine.  Thanks :-)

----
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: help me

1998-06-21 Thread Michael Plump

On Mon, 22 Jun 1998, Cho Hui Dae wrote:

> hi! can you help me? i have the following error whenever i run
> every programs included in linux jdk 1.1.6. what happened?
> first of all, i got "Segmentation fault" with libc library in
> jdk. so i removed it coz i have already installed the same version
> of libc. then i can run some programs. but they didn't work with
> this error. please help me. i couldn't subscribe [EMAIL PROTECTED]
> coz mail returned to me. mail server couldn't find it's id.
> help me. and sorry for my lame english

you need to install version 1.9.6 (or lower) of ld.so.  I was getting the
same errors and did that and it worked fine.  Others have reported the
same thing...

One caveat: after installing ld.so.1.9.6, when you restart ld-linux.so.1
will STILL be pointing to ld-linux.so.1.9.9.  I have to manually change
the link to ld-linux.so.1.9.6 EVERY TIME I RESTART.  The same goes for
libdl.so.1 (after restart it points to libdl.so.1.9.9 and I have to make
it point to libdl.so.1.9.6).  be EXTREMELY careful when doing this or you
can hose your ENTIRE COMPUTER and have to fix it from a boot disk (thats
what I did)...

if you wan more specific instructions, just ask...

--------
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: JDK 1.1.5/1.1.6 glibc dump

1998-06-26 Thread Michael Plump

On Wed, 24 Jun 1998, Bernd Kreimeier wrote:

> Happens with and without greenthreads/libc|libdl in the
> LD path. RedHat 5.1, glibc-2.0.7-13. 
> 
> Any ideas?

check your /lib/ld.so.1 and /lib/libdl.so.1 and see what versions they are
(an "ls -l" should tell you)
then try running it with 1.9.6?

--------
Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: another Linux JDK?

1998-07-10 Thread Michael Rohleder

Tom Sedge writes:
 > I don't think they are ready with their JDK yet - couldn't find that on
 > the site.

I also could not find any pricing information about turboj...

-- 
A diplomat is man who always remembers a woman's birthday but never her age.
-- Robert Frost



Re: JDK 116

1998-07-14 Thread Michael Ash

THE site for the JDK port to Linux project is:

www.blackdown.org

All of the necessary software and installation instructions are there. 
You may need to upgrade glibc--I did, which can be done via
sunsite.unc.edu or from some Linux vendors, e.g., www.redhat.com

Michael Ash[EMAIL PROTECTED]
Department of Economics &  tel 510/643-7094   [o]
Institute of Industrial Relations  510/644-0338   [h]
2521 Channing Way #510/642-6432 [fax]
Berkeley, CA 94720-   http://socrates.berkeley.edu/~maash

On Tue, 14 Jul 1998 [EMAIL PROTECTED] wrote:

> 
> 
> I would like to run jdk 1.1.6 on a linux box. What do I need in terms of
> software and where to I get it from ?
> 
> Many thanks in advance.
> 



Loosing Windows

1998-07-16 Thread Michael Rohleder

Doug Welzel writes:
 > I've been running the Java version of ICQ and AOL's Instant Messenger on a
 > Linux system with JDK 1.1.6 and both programs have been "loosing windows".
 > For example, when you go to send someone a message in ICQ, the window
 > flashes up on the screen and then disappears.  This seems to happen with
 > some window managers, but not others.. what I'm wondering is.. could this
 > be an issue with the jdk or is it a purely window manager issue?

imho, this is an wm issue.
Try it out with different windowmanagers...

-- 
Music in the soul can be heard by the universe.
-- Lao Tsu



Re: GUI debugger for Java-Linux?

1998-08-03 Thread Michael Rohleder

James Cassidy writes:
 > I've used ddd, it works with java (use ddd --jdb to start).  Didn't 
 > use it a lot, so I can't attest to how well it works.  It does have
 > quite a following for it's use in other languages.  Check out:
 > 
 > http://mumm.ibr.cs.tu-bs.de/softech/ddd/  

It does not run for me with jdb. gdb works very well, but with jdb ddd 
crashes a lot...

-- 
Don't take life seriously, you'll never get out alive.



Re: Out of memory - Garbage collector

1998-08-26 Thread Michael Sinz

On Wed, 26 Aug 1998 09:59:37 +0100, [EMAIL PROTECTED] wrote:

>Help
>
>I believe there may be a problem with the garbage collector as it
>doesn't seem to release all the memory when it is not reference
>
>(But I could be wrong)
>
>I have list my version, m/c spec and a simple program
>
>Many thanks for any help in advance
>
>Daividm
>
>
>JDK_Version: jdk 1.1.6v2
>   JDK_Arch: i386 (x86)
>   Linux_Dist: Slackware
>   Linux_Dist_Ver: 2.0.0
>   Libc_Ver: 1.8.2
>   Ld_Ver: 0.1.2
>   Dyn_Java: no
>
>
>   I have a very small program that reads the entries in a zip file. The
>file is4.9MB 
>   in size and contains 5302 entries. The program uses both methods for
>reading a zip file
>   nextentry and enumeration. Under the enumeration method it runs out
>of memory.
>   I have tried the program under Borland JBuilder (1 & 2) and (canyou
>believe it)
>
>   microsoft J++ and they work fine.
>
>   I have 128MB of real memory and 128MB of swap, and the program still
>runs out ofmemory.I have even force 'gc' but the program still
>fails. Something must be wrong with  the   manangement of the memory.
>
>   That means each entry uses more than 48K. That can't be right.
>Considering I ran the JBuilder on 32MB memory

Most likely you need to change the default maximum heap size.  It is
set to a relatively small number.  This same behavior happens under
the JDK from Sun on Windows too.

Try, for example, to use the -mx32m which states that the JVM can use up
to 32 meg of memory.

Also, the Sun implementation of the GC does not currently compact
memory (even though it has indirect pointers)  This is not a big
issue, but in tight spaces it can make a difference.

Anyway, try running your code with -mx32m and see what happens.

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




re: packages

1998-08-26 Thread Michael Sinz

On Wed, 26 Aug 1998 11:33:42 -0300 (ADT), Kenny Freeman wrote:

> 
>> I personally am rather against most import statements as they can
>> only help to confuse the issue of what you are looking at.  Even worse
>> is import of a whole package - since then you do not even see in the
>> code all of the possible class names that just got defined...  However,
>> if used very rarely and only when really justified, they can help
>> reduce the typing needed and not reduce the maintainability of the code.
>> 
>> Sorry about that, but I have had to fix code where the top of the
>> file had import .*; import .*; etc.  Basically importing every
>> package in the whole product - almost 30 lines of these - and then
>> trying to figure out what the DataTrack class is and which one it used -
>> since there was a different one in three different packages...
>> 
>> BTW - This was only one person who did this in his souce - and his
>> code was usually the code we had to fix.  But he was a contractor and
>> did not follow our coding standards.
>
>Well, that is still no real argument against packages. However the
>.whatever packages were generated, there should have been a way to
>make things a bit less cryptic. I couldn't imagine not being able to use
>the import statement. Things like:
> tmp = new ken.encryption.RSA.RSAMessageDigest()
> tmp2 = new ken.util.file.FileReader("blah.txt")
>get on my nerves pretty quick. People who make bad names for packages like
> should keep there code to themselves. Well, thats my $ 0.02

No, it names were not x.  I just am not in a position to explain the
names.  The names were nice, but the imports where all of the type:

import ORG.junk.foo.bar.*;  
import ORG.junk.blah.foo.*; 
import ORG.junk.blah.bar.*;

etc. for about 30 lines...

So, the code was importing classes that it never needed or used,
it was importing conflicting classes, and it was very hard to maintain.
(All of his source files started with the same set of lines but none
of them used all of the classes...)

I would have liked it if the import statement could *not* have "*"
and thus you would have to:

import ORG.junk.foo.bar.TimeTrack;
etc.

This way you would always have a true listing of what you have imported
and from where.  (The "*" just is a problem.)

Personally, I never use that.  I have an editor that makes life easier
and I can type rather quickly, so I have fully qualified names on all
classes that are outside of the package that the source is in.  It also
means that when I read the code I can see instantly what package the class
came from.)

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




re: packages

1998-08-26 Thread Michael Sinz

On Wed, 26 Aug 1998 12:02:55 -0300 (ADT), Kenny Freeman wrote:

>I see your point now. I agree with you when you say doing this is a bad
>thing:
>   import foo.bar.*;
>   import foo2.bar2.*;
>This does cause problems and is not nec. a good thing to do - but I was
>generally thinking allong the lines of importing one or two utility
>classes to save me the trouble of typing out the really long names.
>Importing * is a bit lazy, and in larger classes really does make it
>difficult to keep things organized. Like you said, if you don't import *,
>but list every class like:
>import ken.encryption.RSA.RSAMessageDigest;
>import ken.util.FileReader;
>it makes it more obvious what classes are used compared to the *, where
>you really have to go through the code and find out.

Not only that, but when you go through the code and see a class name,
how can you know where it came from:

SomeClass item=new SomeClass(a,x,t);

With import statements that have "*", where in the world did this
come from?  And don't ask me to name my class "UtilTextFoobar"
when it is already in the "ORG.sinz.util.text" package...


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




Re: [Fwd: re. Jit for linux]

1998-05-29 Thread Michael Rohleder

Rani Pinchuk writes:
 > What about TYA? (It is still alive right?) - you can find its URL in
 > Java Tools for Linux page of blackdown:
 > http://www.blackdown.org/java-linux/javatools.html 

And it works great for me!

-- 
Working on SCO is like traveling back in time.




java-linux-announce ?

1998-06-01 Thread Michael Bell

Hi,

Is there a [EMAIL PROTECTED] mailing list ?

--
Regards,

Mick.



Michael J. Bell, Consultant  Mail: [EMAIL PROTECTED]
Adavanced Technology Division Web: www.cmgplc.com
CMG PLC   Tel: +44 (0) 171 592 4000
London






can't execute java or other utils

1998-06-04 Thread Michael Compton

Hello,
I'm sure this is a stupid question, but I'm stumped:

I've installed the 1.1.5 glibc JDK on my RedHat 4.2 Pentium.  Whenever I
try to run java or the other apps in the bin directory, I get "command
not found". I'm pretty sure my PATH, CLASSPATH, and library paths are
OK;  I can run javac without a problem, but running java, jre, or other
apps gives me a "comand not found".   I've even connected directly to
the java bin directory, triple checked that java (and java_ns and
java_dyn) are executable by everyone (and owner and group), and have
explicitly specified the file (i.e. "./java").  I always get "command
not found".

Am I doing something obviously wrong?  Thanks in advance for any help
you might be able to provide.

Thanks much,
Michael Compton
[EMAIL PROTECTED]




Thanks for all the work.

1998-09-17 Thread Michael Hamilton


Being able to use Linux and the JDK at home has made a real difference
on recent projects.

Michael




Re: OS/2 JVM three times faster than others!?

1998-09-17 Thread Michael Sinz

On Thu, 17 Sep 1998 05:29:19 +, Dan Kegel wrote:

>Dan Kegel wrote:
>> 
>> Check out
>> http://www.infoworld.com/cgi-bin/displayTC.pl?/980914analysis.htm
>> 
>> It shows OS/2's latest JVM to be *three times* faster than
>> any other.  (They haven't tried Blackdown's v4a yet; they only
>> used v2.)
>
>I should mention - the test was run on dual-processor machines
>(except for Linux, which they couldn't get running in SMP mode).
>So perhaps OS/2's JVM is only 1.5x times faster on a single
>processor, and has much better native threading than the others.

Well, the Windows NT test is also done on the same dual-processor
system and it too shows to be 1/3 as fast as the OS/2 version.

The thing is the OS/2 has a *very good* threading model.  It works
very well.  And OS/2 applications and tools generally make use
of this and depend on this since it is almost impossible to write
a reasonable GUI application without at least 2 threads due to the
way the input queue works.  Having over 100 active threads in the
system is not uncommon.  (The good threading model is also why OS/2
tends to be a very good file server in larger networks - it handles
user connections rather well...)

I hope they get a chance to run the V4 port of the JDK since the socket
fix has a *major* impact on any programs that tend to wait on a socket.
(Which generally is done a lot in client/server code)

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




Re: Problem spawning process with "several words"

1998-09-16 Thread Michael Sinz

On Wed, 16 Sep 1998 22:41:34 +0800, Jon Priddey wrote:

>Any help much appreciated:
>
>I've got some code which integrates with RCS.
>It creates a Process with:
>Runtime.getRuntime().exec("ci -m\"blah blah blah\" filename",env);
>
>where "blah blah blah" is the description of the check-in.
>Enclosed in double quotes (") to group the words as a single parameter. 
>
>My 116v2 seems to have problems with this, though it works fine on a Sun
>JDK. 
>
>ci gets the args as:
>1/ -m"blah
>2/ blah
>3/ blah"
>4/ filename.

I think you have the quotes in the wrong spot.  On the command line
you need to type:

ci "-mblah blah blah" foo.c

Doing

ci -m"blah blah blah" foo.c

does not work since the " is in the middle of an argument word.  (Standard
shell parsing, which is what happens when you use the exec() method.



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




Re: Help of Setting up java for Linux

1998-09-17 Thread Michael Sinz

On Thu, 17 Sep 1998 14:03:25 +0800, Ong Choon Seng wrote:

>Hi,
>
>I have install the rpm package (jdk-sbb-1.1.6-4a.glibc.i386.rpm) from redhat's ftp on 
>my rh5.1 system but have problem running classes.
>
>I am very now to this environment so any help would be greatly appreciated.
>
>I know that you have to setup the classpath option but how do I do that?
>
>I was trying to run the HelloWorld class with :-
>java -classpath \home\java HelloWorld

Well, unless the JAVA classes are in \home\java this will most likely fail
as you have listed:

>but encounter the following error :-
>Unable to initialize threads : cannot find class java/lang/Thread

Most likely you should not need to set up CLASSPATH using the -classpath
option.  The problem with that option (or feature) is that it *replaces*
the classpath environment variable.  Not only that, the JAVA Wrapper does
not automatically add the Java system classes to the classpath in that
case.  (It does add them to the classpath environment variable)

BTW - I think that Sun has caused the largest harm to Java due to the
complexities and irregularities of the setting of CLASSPATH.  Yes, there
is lots of power there, but there is no excuse for the Java startup to
not always add on the location of the system classes.  If someone is
replacing them, not search would get that far but most users do need
them so having to put them into the classpath has become a major pain
and hassle for the users of Java.

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




Re: OS/2 JVM three times faster than others!?

1998-09-17 Thread Michael Sinz

On Thu, 17 Sep 1998 02:08:00 +, Dan Kegel wrote:

>Check out
>http://www.infoworld.com/cgi-bin/displayTC.pl?/980914analysis.htm
>
>It shows OS/2's latest JVM to be *three times* faster than
>any other.  (They haven't tried Blackdown's v4a yet; they only
>used v2.)
>
>Perhaps the Blackdown team will be interested in getting
>a copy of the benchmark code they used; it looked easier
>to run than the Volanomark.

We will see.  I have EMailed the author and asked if we could get
a copy of the test programs.

BTW - OS/2 has a very nice threading system and a rather solid
network stack and these are the real reasons the stuff ran so
much faster.  Why do I know this?  Well, friends at IBM tell me
that the JVM they made for OS/2 and NT are almost the exact same
code (plus/minus the technical differences between platforms)
That includes the JIT and the core JVM, both of which are very
much the same since x86 code generation is the same on either
platform.

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




Re: javac problem

1998-09-17 Thread Michael Sinz

On Thu, 17 Sep 1998 09:45:55 +0100, Matt Zagni wrote:

>Mats,
>
>I have the same problem when I try to install netbeans.
>you mentioned that to over come this problem I should
>
>> This is an old one delete (or rename) the libc.so* and /or libdl.so* 
>
>Are these major lib's and what other applications will the above
>impact ?

Make sure you delete them from inside the JDK directory tree
and not the public versions!  See the Blackdown FAQ 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




Re: RXTX, SerialImp.c

1998-09-21 Thread Michael Sinz

On Mon, 21 Sep 1998 08:12:26 -0700, Dan Kegel wrote:

>[EMAIL PROTECTED] wrote:
>> The major thing I have done with ioctls() is to do a nonblocking read
>> FIONREAD which also returns the number of bytes available for reading. I
>> could not find a similar function using termios. I can't think of a way
>> to avoid this. (I would actually like to go even lower and use
>> interrupts for notification as the polling is wasteful of resources.)
>
>Would select() be applicable?

Depends on the filehandle.  Serial file handles on some UNIX systems
sometimes block even in non-blocking mode.

>(This is the greatest functions for doing I/O
>efficiently; you can sleep the current thread
>until any of a number of file descriptors has
>i/o ready for you.  Java suffers greatly from
>its absence.  It's the key to implementing 
>truly monsterously high performance web 
>servers and the like, where the number of 
>clients far exceeds the number of available
>threads.)

Actually, I feel that select(), while powerfull, is a great way to
work around the fact that there are thread limits or that, for a long
time, UNIX systems did not have threads.  The Java model is to have
threads be very easy and accessable and, if used in that form, can
simplify the cases of many clients.  Operating systems with no real
thread limit have shown how this can be a major benefit in simplifying
and optimizing such code.

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




Re: CLASSPATH problem

1998-09-21 Thread Michael Sinz

On Mon, 21 Sep 1998 15:48:51 -0500, Larry Bottorff wrote:

>I just downloaded jdk1_1_6-v2-glibc_tar.gz and set it up in
>/usr/lib/jdk1.1.6. I'm using Red Hat 5.1 on Intel and I had previously
>updated glibc with glibc-2_0_7-19. I also set up my path to
>/usr/lib/jdk1.1.6/bin. When I try to compile: javac hello.java, I get
>the error message CLASSPATH is not set! All right, but the README.linux
>says I shouldn't have to set a CLASSPATH. However, the README seems to
>apply to Version 4a, and I downloaded from /v2 (see file name
>above). I then tried to add a CLASSPATH variable to my bash shell with
>export CLASSPATH=.:/usr/lib/jdk1.1.6/lib/classes.zip, and I get "No
>library path set", even when echo $CLASSPATH gives me back a good
>string. What am I missing? . . .

Darn this is getting "old" (not your fault Larry)

Check "which javac" and you may find that it is in /usr/bin and
if you look at the file it will be trying to run kaffe.

The JDK (both from Sun and our port of it) does not need the CLASSPATH
set to find its own classes (only for external packages that you may
had added, such as swing or 3rd party things)

Anyway, remove javac and a whole bunch of other java* files in /usr/bin
since they are not the ones you want to use.

It may be best to just remove kaffe from the installed packages and
this should remove the javac/javadoc/javah/etc files that have been
placed there by kaffe's RPM.

We really should put up a major line/paragraph in the install document
about the problems with RedHat and the kaffe RPM.

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




Re: Swing: Can't find class ClassName

1998-09-22 Thread Michael Sinz

On Tue, 22 Sep 1998 14:16:39 -0700, William Tchen wrote:

>Thanks for your suggestion, but I think the CLASSPATH variable on my system
>is properly set (which includes
>swingall.jar), otherwise I can't compile a file that refer to Swing classes.
>My CLASSPATH is:
>
>CLASSPATH=.:/JAVA/jdk1.1.6/lib/classes.zip:/JAVA/swing-1.0.3/swingall.jar

I figured the classpath was correct given that it compiles...

> I include the example file that I want to compile here:
>
> package JFCBook.Chapter2;
>
>import com.sun.java.swing.*;
>
>public class BasicFrame {
>public static void main(String[] args) {
>JFrame f = new JFrame("Simple Frame");
>f.setSize(250, 200);
>f.setVisible(true);
>}
>}
>
>When I compile this file, there is no error message. But when I run it using
>'java BasicFrame'
>it says 'Can't find class BasicFrame'. Have you ever experience this before?
>Thanks for time.

Well, the problem is that the class is not "BasicFrame" 
but "JFCBook.Chapter2.BasicFrame"

If you remove the package statement or if you use the full class name
when trying to run the class you will be fine.

The java command needs the full class name since ther is no "import"
for the class name used to run from the command line - import is only
a compile-time typing shortcut and not a run-time item.  Classes that
are not in a specific package are in the "outer" package - as in nothing
to prefix the name.


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




Re: JDK & native threads

1998-09-23 Thread Michael Sinz
 non-blocking file descriptors.  This was done due to a
problem outside the control of the Java group (the shell would get confused)
but this has been addressed in Solaris (and is not an issue in Linux)

Plus, with native threads this is (or should not be) an issue.

Also native threads still have issues with blocking calls and monitor locks.


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




Re: JDK & native threads

1998-09-23 Thread Michael Sinz

On Wed, 23 Sep 1998 09:29:19 -0400 (EDT), [EMAIL PROTECTED] wrote:

>
>On Tue, 22 Sep 1998, Gerald Gutierrez wrote:
>
>> I'm starting to pull out my hair from the fact that the current JDK is
>> based on user threads. I can't call anything that can potentially block,
>> because everything will block.
>> 
>
>Are you saying that if my application has 5 threads running, and
>one of them blocks on a blocking method (i.e., BufferedReader.readLine()
>on a client socket) then the 4 other threads are blocking (not running) 
>also during this time??

No...  The JVM and the green threads wrappers make all of this work
with the magic of select() and poll() and other such "wonderful"
things.

The problem comes when you use native methods and the native code blocks
on something (either because it is not using green threads wrappers or
because the blocking call is not part of the green threads wrapper)
Then you will block.

(Ok, so on older versions, reads from STDIN/STDOUT/STDERR were a problem
but this has been addressed)


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




Re: JDK & native threads

1998-09-23 Thread Michael Sinz

On Wed, 23 Sep 1998 09:42:48 -0700, Gerald Gutierrez wrote:

>> (Ok, so on older versions, reads from STDIN/STDOUT/STDERR were a problem
>> but this has been addressed)
>> 
>
>
>Are you sure ? The following seems to indicate that at least
>STDIN will block everything.

Yes, I am sure - you need to use the Linux port V4a to solve this.

STDIN/STDOUT/STDERR were blocking file descriptors in previous ports.
On Solaris they still are (until JDK 1.2 unless they do a JDK 1.1.7
maybe?)

If you check the Java-Linux bug database (jitterbug) you will see
that I was the one to report this and that Kevin was the one who
did most of the work to address this.

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




Re: Need help with initial Java setup

1998-09-27 Thread Michael Sinz

On Sun, 27 Sep 1998 16:24:46 +0200, Stefan Huebner wrote:

>Hello !
>
>I was just trying to install Java for the first time on my Linux Box,
>but I m not able to use appletviewer, or to view my class-files from
>the command-prompt:
>
>Linux 2.0.35 with Java-binaries support
>glibc 2.0.7-19
>
>I installed jdk 1.1.6 to /usr/local/java and created the symlinks
>/usr/bin/java -> /usr/local/java/bin/java and
>/usr/bin/appletviewer -> /usr/local/java/bin/appletviewer

You may find that using SymLinks will cause some problems - depending
on many other things.  It is much better to put /usr/local/java/bin
into your path an make sure that the java/etc are *not* in /usr/bin

>My $CLASSPATH is set to
>".:/usr/local/java/lib:/usr/local/netscape/java/classes/java40.jar"

This can also be a problem.  The Netscape class files are for when
running the Netscape JVM.  Netscape should never need you to define
a classpath at all (do not set CLASSPATH when running netscape and it
will work correctly)

I generally try not to set CLASSPATH or to set it to something as
simple as ".:./obj"  (since I tend to compile my class files into
a different directory tree)

Silly details:

The Java wrapper script will automatically try to find the classes.zip
file (or directory or jar or a whole list of possible places) before
it starts the JVM.  However, it does this by using the $0 (command name)
to find it.  With symlinks the $0 name points to /usr/bin/java (for example)
and this is not where the rest of the Java files are.  You can still
use the symlinks if you also set up a JAVA_HOME to point to where the
Java files are installed.  This normally should not be needed if you
simply put the java/bin directory into your path.

Netscape does equally complex stuff.  It tries to find itself (and there
is a setting but I forgot what it was) and once it does, it does
even more by automatically adding *all* jar files in the directory
where it stores its jar files.  This is so that plug-in and add-on
java things can be done without the CLASSPATH setting.  Note that there
actually is a problem with some versions of Netscape where if you have
CLASSPATH defined at all when Netscape runs it does not try to find its
own Java directories and thus will fail to run Java.  The best thing to
do is not to have CLASSPATH defined when starting Netscape.

All of this is, of course, for the "normal" usage.  Advanced users are
welcome to "shoot them selves in the foot" ;^)

Seriously, this is one of the worst parts about Java.  But it also sometimes
is "needed" in order to try something or do something tricky.  I just wish
it was not abused so many times for things that really did not need to
have special settings.

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




Re: fast multiple object creation ... can it be done!

1998-09-28 Thread Michael Sinz

On Mon, 28 Sep 1998 21:34:24 +0200 (CEST), B. Craig Taverner wrote:

>I'm dealing with a performance issue in java where it appears that
>performance is noticably affected by the fact that many (thousands) of
>relatively small objects need to be created very quickly (multiple small
>memory allocations). From my C/C++ background I would have considered
>solving this problem by allocating the objects in reasonable sized blocks
>of objects (single alloc for many objects to minimize system calls).
>Individual objects could still be accessed (perhaps
>calloc/sizeof/typecast) and could then continue to be referenced in the
>normal way (hashtables, vectors, trees, etc). 

This is really part of what a "better" JVM would do for you.  In
most cases, it really should be the domain of the JVM to solve some
of these optimization issues.

>However, I do not see any obvious way to achieve this in java.  You cannot
>simply allocate a chunk of memory (you also cannot know the object size,
>or typecaste the memory to the object type).  If I allocate an array of
>objects, I'm simply allocating an array object that contains references to
>the correct object type, but does not actually contain those objects, and
>they still need to be created.

Well, there is no direct way to do this.  However, some things that can
be done is to have static methods be used to get instances of objects
and keep the constructor private.  Then the objects can make their own
tracking of usage and reuse themselves rather than always recreating
themselves.  (These are generally known as object pools)  Sun even
talked about how these can help with objects that are expensive to
create, such as threads.

>Does anyone know of a good way to solve this problem?  Any suggestions
>around the issue of object creation performance are welcome.

Well, other than doing work on a JVM to make better allocation systems
and stuff like that, the only choice is doing the pooling of objects
within your own Java code but this can complicate things and make the
code that much harder to understand and maintain.

A JVM could, for example, notice that you are reusing certain objects
and implement the pools "automatically" for you and thus provide the
benefit for all java code without adding complexity to the Java code.
(Just to the JVM, but that is ok since it is somewhat reused :-)

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




Re: JDK 1.2

1998-09-30 Thread Michael Sinz

On Thu, 01 Oct 1998 00:57:23 +0200, Flag wrote:

>Maybe a stupid question,
>
>Is there the jdk 1.2 for Linux?!?!?!?

Not a stupid question - but one that we can only say that the source
code licenses are not available from Sun until the product ships.  We
have, thus, not even seen the JDK 1.2 source and have no idea as to
how much work it would be to do the port.

We hope to get the code as soon as possible but from what Sun has
said about the 1.2 changes, it could be a lot of work (and thus time)
to do the Linux port.  (We hope it will not be too much, but...)

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




Re: Write Once Run Anywhere?

1998-10-01 Thread Michael Bell



Rob Nugent wrote:

> Steve Cohen wrote:
>
> > No, that's not it.  The classpath is right.  With the same classpath, under
> > Win95, the copied CLASS files fail, but compiled source files work.
>
> You might want to check that you didn't intrduce any problems when transferring
> the files to Win95 e.g. by a) accidentally coercing the file name to the wrong
> case or b) if you ftp'd them make sure they were ftp'd in binary mode.
>
> We have a project here with over 400 class files that work just fine on
> WinNT/Win95/Linux, AIX etc

Us too, > 50,000 lines of 100% Java. Windows NT/95 is a bit more reliable than
other platforms as the JVM is from Javasoft (except of course for the Date handling
screw up in the various 1.1.x versions)

--
Regards,

Mick.

~~~~~~~~
Michael J. Bell, Consultant   Mail: [EMAIL PROTECTED]
Advanced Technology Division   Web:  www.cmgplc.com
CMG PLCTel:+44 (0) 171 592 4000
London





Re: Write Once Run Anywhere?

1998-10-01 Thread Michael Thome

>>>>> "Steve" == Steve Cohen <[EMAIL PROTECTED]> writes:
>   I copied the files across using a DOS floppy disk and the linux
> mcopy program.   The files were copied in jar's, first a jar with the class
> files and then a different jar with the source files.
> A key clue is this:  When we get the NoClassDefFoundError, the class it is
> looking for is package.1.class.  No such class exists, but package.
> is the class containing the main
> method.

My bet is that the DOS floppy stage is corrupting your filenames.  My
current system is a peer-peer app with 1500 classfiles that are
compiled on and run on all permutations of win95/winnt/macos/solaris/linux
with nary a problem (well, ok - so some MacOS VMs cannot deal with
some zip formats...).  For moving stuff between linux and the DOS
world, I usually use samba - if I must use a floppy/ZipDisk, I'll
pre-zip my class tree.

good luck,
-mik
-- 
Michael Thome ([EMAIL PROTECTED])



Re: java.lang.reflect.Method invoke bug?

1998-10-01 Thread Michael Sinz

On Thu, 01 Oct 1998 19:58:11 -0400, Andrew V. Shuvalov wrote:

>Hi!
>
>   I have continous problems trying to call "invoke" in
>java.lang.reflect.Method class. I spend several hours and have the
>impression that it is not implemented. I use
>redhat-5.1 and
>jdk-1.1.6sn-1.1glibc package
>
>1) Did somebody ever happens to run "invoke"?
>2) What is the most stable and/or complete Java for Linux distribution?
>( I see many choices on ftp.redhat.com )

I use Invoke in my server support classes all the time.
This has worked in the Linux JDK since 1.1.5 at least (I think
that was when this code went into service on a Linux box)
This code is currently running in all JDK 1.1.6 versions on Linux.
(Including the current test of the v5 changes)

Here is an example of the code:

/**
 * This method is called to process the command that this
 * entry is for.  It uses reflection to find the command
 * and process it in the handler object.
 *
 * @param context The command context that the command handler will need.
 */
public void HandleCommand(CommandContext context)
{
if (Method == null)
{
// We assume that this is to be handled by the
// context itself...
context.nullMethod();
}
else
{
CommandProcessor handler=context.getProcessor();

// First, get the class of the handler object...
java.lang.Class handlerClass=handler.getClass();

// Just in case the method is not there...
try
{
// Now, get the method for this command...
java.lang.reflect.Method handlerMethod;

handlerMethod=handlerClass.getMethod(Method,HandlerArgTypes);

// Put together the argument array...
Object[] args=new Object[1];
args[0]=context;

// Just in case there is a access/invoke violation...
try
{
// Finally, we need to invoke the method...
handlerMethod.invoke(handler,args);
}
catch (java.lang.IllegalAccessException e)
{
// Let the user know (and thus let the system 
know)
// This should really never happen.
context.Error(e.toString());
}
catch (java.lang.reflect.InvocationTargetException e)
{
// Let the user know (and thus let the system 
know)
// This should really never happen.
context.Error(e.toString());
}
}
catch (java.lang.NoSuchMethodException e)
{
// Let the user know (and thus let the system know)
// This should really never happen.
context.Error(e.toString());
        }
}
}


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




Re: Trouble JDK 1.1.6 + HOTJAVA

1998-10-02 Thread Michael Sinz

On Fri, 02 Oct 1998 18:16:59 +0400, Alexander Davydenko wrote:

>>  > > * You DO NOT need to set JAVA_HOME.  Doing so can be bad for your health
>>
>> What makes you think HotJava needs JAVA_HOME?  Look at the launching script.  I
>> think you need to set JDK_HOME (or JRE_HOME) but not JAVA_HOME, but the script
>> is the final arbiter.
>
>I can't catch a thought... What wrong is to set JAVA_HOME ?
>
>The starter script is doing the same thing.
>
>I just make it work simpler, by setting up that. :)

If that is the only Java VM on your system, then it should not cause
a problem.  However, setting this can lead to problems if you install
a new JDK to try it and forget to unset it.  Or if you have another JVM
installed that may happen to use JAVA_HOME

Since it gets set in the script, setting it externally can cause
problems/confusion.  It is not that it, in and of itself, is bad.

With so many different people doing so many different linux systems
and so many different ways they install things, it is easier to just
make a blanket statement that *generally* is true and assume that those
who are more advanced users can work though the stuff.

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




Re: slightly off-topic

1998-10-03 Thread Michael Sinz

On Sat, 3 Oct 1998 02:15:03 -0500 (EST), Fred McDavid wrote:

>Hi,
>
>I keep hitting an obstacle while coding and I was hoping someone here
>could help enlighten me:
>
>A bunch of the java-standard methods return "Object" and when I try to
>use them, I get the following error:
>
>  >> Incompatible type for declaration. Explicit cast needed to convert
> java.lang.Object to (whatever)
>
>In this particular instance, I've created a class which is a descendant
>of java.awt.Checkbox.  I add an ItemListener and the listener, therefore,
>receives an ItemEvent.  I call ItemEvent::getItem() and try to call a
>method that I've created for the descendant class...hence the error which
>would seem to imply that if I'm going to use the ItemEvent (or the java
>hashtable or a bunch of other stuff that I've just worked around), I
>can only call Object::(whatever Object methods there are) after my
>objects go thru the mill.
>
>I'm pretty sure whatever I'm missing is pretty basic...could anyone
>shed some light on this for me?

Well, are you asking why or how?

The "why" a generic "Object" type is returned from a number of methods
is because these methods are usually dealing in the abstract with any
type of object - such as the java.util.Vector class is able to store any
object type.  Since all objects are subclasses of Object, the methods
are defined to take (and return) an Object so that you are now able to
use an object of any class, including those of your making.

The "how" to get arround this is much like C/C++ type casting.  If,
for example, you have stored objects of class java.lang.String in a
vector, you would get them back out as follows:

java.util.Vector myVector=new java.util.Vector();

myVector.addElement("A string as an element");

String data;

data=(String) myVector.elementAt(0);

Now, note that even though a bit of code like this in C could be
dangerous since you could be taking some other object and saying
it was a String, in Java, at run time (since the compiler can not
know what type of object is in the vector) the JVM will make sure
that the object returned is a String object otherwise an exception
will be raised.

If you have an object you can also find out what its type is or
you can ask if it is an instance of a specific class without the
overhead of a try/catch of an exception while trying to typecast
the object.  In most cases one actually knows that all the elements
in a vector are strings/etc so normally the cast is all that is
needed or wanted.

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




Re: Java-Linux networking problem < Connection refused >

1998-10-05 Thread Michael Sinz

On Mon, 05 Oct 1998 06:21:19 +, Glenn Valenta wrote:

>I'm new to Java and also not too experienced in Linux so forgive me 
>if this is a simple question, but I couldn't find it in the FAQs.
>
>When I try to open a network socket, I get...
>
>   java.net.ConnectException: Connection refused 
>
>at this line...
>
>   socket = new Socket("localhost", 8205); 
>
>I think I may have a permission problem somewhere but I can't even 
>open the socket as root. Any Ideas?
>
>Does this sound like a host.allow or host.deny problem?
>
>At the moment, I have written a simple client / server app to simply
>get started in java networking. The problem is with anything that opens 
>a port. I have compiled sample code from a few books and get the same 
>error each time.
>
>I'm using jdk 1.1.6 on Redhat 5.1 with the updated lib.
>
>I have placed the full source on my Webpage at...
>
>http://ouray.cudenver.edu/~gavalent/java/problem1.html

Well, the problem is nothing to do with security given that you are
running as a full application and are connected via localhost.

The first thing I noticed was that you are not connecting to the same
port that the server is "servicing".  You created the server socket on
port 4747.  You need to connect to that port.  I do not know what 8205 is
since you do not service that port in any of the code you have posted.

Also, just in case of a strange setup - check that you can "ping localhost"
meaning that your system knows that as a name.  (Normally one should
have that setup but I have run into people who either deleted that definiton
from their hosts file or never put it in...)

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




Re: Does Java apps has to have .class extension?

1998-10-05 Thread Michael Sinz

On Mon, 5 Oct 1998 19:16:27 -0400 (EDT), Danny Lu wrote:

>Hi,
>   Can anyone tell me does Java applications has to have .class 
>in order for it be to executed in Linux?

???  Java does not directly need .class to run.  In fact, to use the
java binary support in the Linux kernal, you may want to not have .class
as the name of the main() class.

However, standard Java will load classes from .class files.
(Or the equiv in jar/zip files)

This means that when you do:

java Foo

You are telling Java to load Foo.class.

Same for if a class called Bar is used, the JVM will look for it as
Bar.class.  (Well, the default class loader will do that and if it is
already loaded, it will not need to look again)


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




Re: Java and CVS

1998-10-06 Thread Michael Thome

>>>>> "Travis" == Travis Shirk <[EMAIL PROTECTED]> writes:
> (CVS, sources vs. binaries, Make, javac)
> Has anyone ever solved this problem.  This is the first time I've really
> wished for header files, because C/C++ does not have this problem during
> compile time.

Sure it does, just different and (in practice) simpler because of the
flattened namespace.

We've stopped using make, mostly because we need to be able to build
on multiple OSes and to DOS-derived camp claims they cannot understand 
makefiles.  Admittedly, makefiles that work on DOS and *nix are not
always the prettiest things.

So - our current approach is to:
 1. Have our source tree mirror the class structure exactly.  $SRC
 2. All class files go into a tree outside the source tree. $BIN

our compiles look something like:
javac -d $BIN -classpath ${SRC}:$CLASSPATH $files

Turns out that javac can find and compile java sources on demand if
the desired sources are either (A) in the classpath or (B) in the
javac command line (This seems to work with Jikes, also).

This is still pretty hairy when you've got a sufficiently complex
system - we've written a custom system builder (in java, of course)
that handles our compile.

Cheers,
-mik
-- 
Michael Thome ([EMAIL PROTECTED])



JDK 1.1.7 source released yet?

1998-10-07 Thread Michael Thome

Any of you noncom licensees been able to get their 117 distribution
yet? Sun keeps pointing me at files on their server that don't exist.

thanks,
-mik
-- 
Michael Thome ([EMAIL PROTECTED])



Re: DatagramSocket option in jdk1.1.6v4

1998-10-07 Thread Michael Sinz

On Wed, 7 Oct 1998 02:26:37 -0400 (EDT), Gwobaw A. Wu wrote:

>Hi,
>I thought this problem is fixed in jdk1.1.6v4, but I still have it:
>java.net.SocketException: invalid DatagramSocket option
>at 
>java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:155)
>at java.net.MulticastSocket.create(MulticastSocket.java:111)
>at java.net.DatagramSocket.(DatagramSocket.java:114)
>at java.net.DatagramSocket.(DatagramSocket.java:100)
>at java.net.MulticastSocket.(MulticastSocket.java:92)
>
>jdk1.1.6v1 did not have this problem though.

Watch for jdk1.1.6v5 - it should be up on the web sites very soon.
This is a known problem that was introduced in v4a (sorry)

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




Re: Java app without X installed

1998-10-07 Thread Michael Sinz

On Wed, 7 Oct 1998 21:05:39 +0800 (WST), John Summerfield wrote:

>On Tue, 6 Oct 1998, Steve Byrne wrote:
>
>> 
>> Aw, come on, man!  RTFM!  I covered this in great detail; you should take the
>
>Well I for one don't know which frigging document you're talking about.
>I've just installed the jre on a system without X. To make the jre even run
>I found it necessary to install a part of XFree even though I don't want
>the gui.
>
>I can see no mention of this in any of the documentation included with the
>package jre1.1.6-v4a-i386-libc5.tar.gz.
>
>Exercise patience and courtesy in your replies. You too were a beginner
>once.

It is a bit hidden - it is in the README.linux file under the NS_JAVA
option.  :-)

If you set that environment variable, the non-statically linked non-AWT
JVM will be used.

One thing we can look at is to use the non-AWT/X version automatically
whenever the DISPLAY variable is not set.  You could still set the NS_JAVA
to always use that, but at least it would be less confusing/more automatic
for the cases where X is not running, let alone installed.


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




shared lib error

1998-10-10 Thread Michael Rohleder

I am getting a shared lib error when running jedit with v5:
/usr/local/java/lib/i586/green_threads/libnet.so: undefined symbol: 
java_net_PlainSocketImpl_socketCreate (libnet.so)

Where should java_net_PlainSocketImpl_socketCreate be defined?

-- 
C makes it easy for you to shoot yourself in the foot.  C++ makes that
harder, but when you do, it blows away your whole leg.
-- Bjarne Stroustrup



Java Awt/Swing is fatally flawed

1998-10-11 Thread Michael Emmel

Hello I've been working for a while on and all java Windowing system.

My current version  is written on top of the Swing toolkit. Which is
practically all  Java.

Well it turns out even Swing is flawed.

The problem with Swing is the attempt to reuse  Graphics context and not
being thread safe.
Plus it is removed from the hardware by the underlying windowing system
and is hacked to run at a higher level
of abstraction.
You get hosed sooner or later.  I've have come to
some conclusions tonight. One if you wish to use any native graphics
above the level of basic device drivers
and  a drawing package you will not e able to do it in a generic
manner.  There are too many places were inconsistencies
cause basic problems. Second if you move to the swing model things get
better but you still suffer inconsistencies from trying to
save multiple graphics context's i.e. SwingGraphics does not really
work.
I think the guys at Id software or any other game developer could attest
to this. It's well understood in the gaming
community but ignored by  the commercial GUI resellers.

In my opinion there are only three choices for a GUI in java.
1.) Allow each platform to expose its native interface this is akin to
the approach taken by Apple, Sun and  Microsoft.

This results in continuos problems that can in my opinion never be
resolved.

2.) Try a middle ground this is the approach taken by Swing and
previously Apple/Next in Openstep.

This approach works a lot better but still results in some fairly basic
problem mainly resulting from not having direct
graphics hardware access across platforms and dealing with native
windows. This approach simply reduces the number
of problem which result from  using the first approach. I does not
eliminate them.


The real problem results from graphics code having to go from very high
level  draw object methods to low level blitting ops.
There is no way to support this on top of  platform which contain even
simple differences.

Swing in my opinion will fail just as Openstep would have.


3.) The last resort is to support java directly at the primitive
graphics layer. This turns out to be the only viable solution.
This is the path I took and it works well. I did it not because
I originally though it would be the best solution but
simply because I wanted to build it.  Now I feel its the only
viable solution.  This is the approach taken by the Game
developers. They do it for speed for the most part but it turns
out to be the only way to build a stable consistent GUI system.
   In reality a GUI is nothing more than a basic game.



The main reason I'm writing this is to one hope the Linux community
explores adding low level Java graphics support to
 Linux. I believe that with ggi Linux could become  one of the few
platforms were Java graphics work correctly.
 You can continue to support X but Java graphics object must be first
class citizens with the native  graphics.
  This is not really a language issues but a simple matter of true java
support. To forget java for a moment.
  I for one would not want to write some hybrid which supported both
KDE and Gnome but this is exactly what  the
AWT is today.   Next the Swing is again much better but is akin t
supporting Gnome inside KDE which leads to
some interesting problems.  I don't think anyone would whant to
solve theres problems in C/C++ why  would you expect
them to magically go away in Java. As another example Exceed is a fine X
windowing solution for Windows NT but
is suffers  numerous integration problems. Most people don't worry about
them because it offers a solution but it
will never be as good as native Win32 or native X period.


This bring up a basic problem with Linux. It's intel centric. Although
linux runs on a multitude of CPU's it is still centered around
 the intel cpu. It's offered e quit a bit of freedom in choosing a free
OS. but try finding binaries for the alternative platforms.
 The percentages of Linux running on various cpu's closely mirrors that
of commercial offerings.  Within the Linux community
 few have left the intel dominated computer market.
This is a big problem IMHO.

Although Linux likes to represents a challenge to Windows it's actually
more threatening to the Intel side of the monopoly.
Once you chose and alternative OS  moving to and alternative CPU is not
a big issue.  Considering the number of seats of Linux
accumulating over the next few years and the fact they can easily switch
cpu designs.  Then Linux could represent a viable
platform for a secondary cpu manufacture. This is one of the
unrecognized powers of linux. I suspect that Linus may have
realized this otherwise why is he working for Transmeta  I think the
only real problem is Linus is a systems programmer
and does not understand all the needs of applications programmers nor
should he. Its up to the application programmers
to express those needs to Linus and the other systems programmers.
Once th

Re: javac dies silently

1998-10-11 Thread Michael Sinz

On Sun, 11 Oct 1998 08:59:43 -0400, strider wrote:

>Greetings.
>
>I notice that, after the 1.1.5 distribution of Java on Linux, regardless of
>which port or subversion I try, javac no longer works.  It seems to be a link to a 
>file called .java_wrapper, which basically sets a bunch of system vars.  What it 
>doesn't do is compile .java files.  There doesn't appear to be anything about this in 
>the FAQ.  The java and javah executables work, so the whole dist. isn't bad.  I'm 
>using 1.1.6-5 glibc on RH 5.0/KDE 1.0.
>
>What do I need to do/get to make javac work?

It should just work.  Make sure (since you are RedHat 5.0) not to have
Kaffe installed from the default Kaffe archives.

I basically run RedHat 5.0 on the system that I built the v5 glibc version
of the JDK 1.1.6 Linux port.

Note also that if you have JAVA_HOME set or something in CLASSPATH
that points to an old JDK install, this can cause things not to run.
However, given that you are getting a silent failure it sounds more
like a Kaffe install collision.

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




Re: Java Awt/Swing is fatally flawed

1998-10-11 Thread Michael Emmel

Dan Kegel wrote:

> Michael Emmel wrote:
> > Hello I've been working for a while on and all java Windowing system.
> > My current version  is written on top of the Swing toolkit. Which is
> > practically all  Java.
> > Well it turns out even Swing is flawed.
> >
> > The problem with Swing is the attempt to reuse  Graphics context and not
> > being thread safe. ...
>
> Could we pause for a moment here, and have you explain
> the problem in greater detail?  In particular, what is
> the problem with not being thread-safe?
>
> It seems to me that the Swing architects came to
> a conclusion about how to write thread-safe programs:
> thread safety is difficult.  The best way to achieve
> it is to carefully segment programs such that the
> interfaces between threads are particularly well understood.
> For instance, rather than allowing lots of threads to call the
> many methods of a Graphics or other complex object,
> and attempt to have all these methods lock all
> the resources they reference in a way that avoids deadlock,
> only allow simple objects like queues to be used by
> multiple threads.  That's why Swing is not thread-safe:
> they expect you to segment your program so that only
> one thread manages the user interface, and communicates
> with the rest of your program through a carefully
> designed thread-safe interface (e.g. a queue or two).
>
> I happen to have helped fix a bunch of deadlocks in
> a complicated Java user interface by doing just that,
> so I trust their judgement.

Well that illustrates my point. A developer should not have to do that.
The Swing team should provide the queue interface it should not have to be
cobbled together by every developer  that wants to write a complex graphics
program.
I never had any problems with Display Postscript under  Nextstep. The
interface was
very  easy to use and multi threaded drawing was  much easier to implement.
Just fill a message buffer and send it. The locking is at the message level.
Pretty trivial.
Real time drawing can be done by allowing direct access for a screen portion
and requiring
that a window painting in this mode is alway it the highest layer so it
cannot be coverd up.
The Windowing system simply enforces clipping. You could also "lock" its
position or  throw away the feed while moving.
Javasofts  callback model is non-intutive and easy to screw up. Your right
that a drawing queue
should be used but it should be provided by Javasoft. Plus translation and
current paint mode should be exposed and thus reversible. A simple reset to
default for graphics contexts would be quit useful.
As far as the graphics reuse I found a bug with Swing when it has a lot of
graphics context's it seems
it does not correct for translation correctly but since they play games with
clip rects and translations.
The SwingGraphics state does not match the underlying native graphics state
so I finally gave up
and decided to spend my time doing something more useful  like bitching about
Java's drawing model.
Although I  think trigger a bug  there stuff is so screwed up I can't decide
who has the bug.
Also the decision to not make SwingGraphics public should be reviewed.
Drawing should not be this hard IMHO.


give this a try in a Swing subclass with a few widgets on it.
For me I dont trigger a bug until sevberal object try to share a Native
context.

public void paint( Graphics g ) {
super.paint(g);
g.setPaintMode(); // makes the context un reusable.
g.dispose();
}
This code should have no effect at all except to cause the graphics to really
dispose;
Now maybe I don't know what I'm doing but it seems to blow the Swing up when
it gets several
objects sharing a Native graphics context. Like I said I looked and gave up
trying to figure it out.
The games they play  becuase of underlying design  problems are difficult to
trace.
What really irritated me not the bug but even with the code in front of me
It's so
hacked I can't trace it.

>
>
> You go on to write:
> > The NT thread model is flawed it allows race conditions.
>
> I thought NT implemented threads fairly well-
> and that's why Java code that runs on other Java ports
> sometimes has race conditions on NT Java, because
> those other platforms don't do preemptive multithreading,
> and therefore hide race conditions.
>
> This is an interesting discussion, but it probably
> deserves to be split up into a few pieces- the
> Swing discussion should probably move to comp.language.java.gui.

Okay I'll drop it but I find NT will switch from thread  A to B before
A enters a lock. Thus B runs and deadlock is avoided.
I guess I should say thread starvation also
which I lumped into race condition. Anyway from experience I find that code
which runs
on  NT locks up tight under Unix I've never experienced the reverse. And on
investigation there is a bug in the code.
But this disccusion should not be here it happens with Green threads to.
I just figured if I was complaining I might as well say it all : )




Re: Fw: javac dies silently

1998-10-11 Thread Michael Sinz

On Sun, 11 Oct 1998 13:08:26 -0400, Nathan Buggia wrote:

>How do you de-install Kaffe? Where is it located?

Remove the RPM - you can use GLINT (the GUI) to remove packages
that are installed.


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




Re: Swing and Threads

1998-10-11 Thread Michael Emmel

Gerald Gutierrez wrote:

> > > Well that illustrates my point. A developer should not have to do that.
> > > The Swing team should provide the queue interface it should not have to be
> > > cobbled together by every developer  that wants to write a complex graphics
> > > program.
> > > I never had any problems with Display Postscript under  Nextstep. The
> > > interface was very  easy to use and multi threaded drawing was  much
> > > easier to implement.
> > > Just fill a message buffer and send it. The locking is at the message level.
>
> Are you sure ? The UI libraries of NeXTSTEP are not threadsafe, and it
> was strongly encouraged that the UI be accessed by only one thread.
> Interaction with the UI via multiple threads often yielded strange
> results. This is the primary reason why there are so many
> "MultiThreadedApp" objects around. These things used to buffer UI
> requests from child threads, and release them to be executed when the
> main thread is scheduled and executing so that conflicts would not
> occur.
>
> To clarify, I mean NeXTSTEP in terms of the 3.x versions, not OPENSTEP.

  Short answer the UI used a single DPSContext you were free to create as many as
you wanted.  Thre creation is expensive
I  never used more than two.
The Contexts were individually thread safe. So you can eather create a new Context
or manage your default one.
You were gasp given a choice.

Alos to Dan Kegel I noted privatley that invoke later allowed my stuff to at least
work.
Unfortuntley when you drag a window wich uses invokelater from drawing the
Components can be drawn
before the window so its just a work around not a fix.  Having the Window chase its
panels is only mildly amusing.


Mike



rmid with JDK1.1.6

1998-10-12 Thread Michael Kranz

Hello,

I didn't find the RMI-Server rmid within JDK1.1.6. How can I implement RMI
on a Server under Linux? Any documentation abou this?

Thank you and best regards
Michael
-
Gesellschaft fuer Informatik e.V. (GI)
Wissenschaftszentrum
Ahrstrasse 45
D-53175 Bonn

Tel.: +49(0)228/302-145 / Fax: +49(0)228/302-167
e-mail: [EMAIL PROTECTED] / WWW: <http://www.gi-ev.de/>
---------
Michael Kranz
Tel.: +49(0)228/302-156 / e-mail: [EMAIL PROTECTED]
-




Re: RH5.1 configuration problem for running with Java???

1998-10-12 Thread Michael Sinz

On Mon, 12 Oct 1998 09:52:09 -0400, Wendy Richardson wrote:

>Hi,
>
>I am trying to run a Java application on RH5.1 with a glibc version of
>jre1.1.6v5.  My Java app uses JNI and X/Motif in the native part (legacy
>code).
>I get the following error:
>
>jre Jsaf
>libc.so.5: cannot open shared object file: No such file or directory
>(libfoo.so)
>Class not found: Jsaf

libc.so.5 ???  Should this not be libc.so.6 for a GLIBC system?
Could you be running the libc5 version of the JDK?

>Does anyone have any suggestions for what might be wrong with my
>configuration on RH5.1?  I wasn't able to find a newer version
>of ld for RH5.1.
>
>Is it ok to use a shared object file (*.so) that was built on RH4.2 on a
>RH5.1 machine with Java & JNI?

Hmmm... I don't know.  I have never tried to mix LIBC5 and GLIBC too
much.  RedHat 5.0 has libc5 libraries so that you can run the libc5
binaries.  However, if your JNI code needs to interact with the green
threads based function wrappers you may end up having problems.  It
is something I have yet to ever try.

(I tend to try to stay in 100% Java whenever possible)


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




Ooops, we have a small LIBC5 problem...

1998-10-12 Thread Michael Sinz

On 09 Oct 1998 15:22:30 -0400, Kyriakos Georgiou wrote:

>
>You have probably got this correction already, but here it is
>anyways.  It caused a "function {isGreaterOrEqua not found" with my bash
>(version 1.14.7(1))

Sorry to all of you who may have run into this problem.  This is the correct
fix to the problem in checkVersions and we are building some new archives
that will have this fixed.  We also will put up a fixed checkVersions script
so that you do not neet to down load the whole thing again.  (I know I
would not want to just for this...)

Again, I am sorry for the error.

BTW - you are welcome to use this patch since it does solve the problem:

-8<8<-8<-
--- bin/checkVersions.orig  Fri Oct  9 15:13:34 1998
+++ bin/checkVersions   Fri Oct  9 15:13:45 1998
@@ -103,8 +103,8 @@
 
 # 5.4.33 & 1.9.6 seem to do it too
 if isGreaterOrEqual "$libdlVers" 1.9.6 ||
-   {isGreaterOrEqual "$libcVers" 1.5.44 &&
-isGreaterOrEqual "$libdlVers" 1.9.9}
+   { isGreaterOrEqual "$libcVers" 1.5.44 &&
+ isGreaterOrEqual "$libdlVers" 1.9.9 }
 then
 # supplied libraries are not needed
return 1
-8<8<-8<-

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




Re: JAVA Error

1998-10-13 Thread Michael Sinz

On Tue, 13 Oct 1998 14:31:36 +0530 (IST), Syed Mubin wrote:

>   Hi,
>   
>   I've installed jdk1.1.6 on RHL5.1 ,Iam able to create and run
>   applets but when i try to compile and run a standlalone
>   application program i get the following errors
>
>   class hello{
>
>   public static void main(String args[])
>{
>System.out.println("HELLO");
>}
>   }
>
>   ERROR SHOWN
>   [syed@barfi syed]$ javac hello.java 
>   [syed@barfi syed]$ java hello
>   Can't find class hello

Try doing an ls -l hello.class after the javac.  If the file is not
there, do a find . -name hello.class

If it showed up in a sub-directory, you most likely made a package
statement in the source file that placed it inside a package rather
than at the "root"

Oh, and try this without CLASSPATH set.  (I noticed that you had
CLASSPATH set.  If you really need CLASSPATH set, make sure you have
"." in the CLASSPATH in addition to the other directories - just in
case)


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




Re: small patch

1998-10-13 Thread Michael Sinz

On 09 Oct 1998 15:22:30 -0400, Kyriakos Georgiou wrote:

>
>You have probably got this correction already, but here it is
>anyways.  It caused a "function {isGreaterOrEqua not found" with my bash
>(version 1.14.7(1))
>
>later
>Kiriakos
>
>
>
>
>--- bin/checkVersions.orig Fri Oct  9 15:13:34 1998
>+++ bin/checkVersions  Fri Oct  9 15:13:45 1998
>@@ -103,8 +103,8 @@
> 
> # 5.4.33 & 1.9.6 seem to do it too
> if isGreaterOrEqual "$libdlVers" 1.9.6 ||
>-   {isGreaterOrEqual "$libcVers" 1.5.44 &&
>-isGreaterOrEqual "$libdlVers" 1.9.9}
>+   { isGreaterOrEqual "$libcVers" 1.5.44 &&
>+isGreaterOrEqual "$libdlVers" 1.9.9 }
> then
> # supplied libraries are not needed
>   return 1

Well, in bash version 2.01.1(1) this change seems to be a problem.
We are going to have to do something different since there seems to
be a conflict of behavior here.

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




Re: Threads / CLASSPATH?

1998-10-14 Thread Michael Sinz

On Wed, 14 Oct 1998 13:29:45 +0100, Danny Ayers wrote:

>Hi,
>Thanks for all the suggestions relating to CLASSPATH - I though this
>would be a fairly quiet list (Java&Linux = FairlyObscure^2, mail->0),
>not so!
>
>I've still got a problem though. When trying to run java mpEDIT (nice
>basic java text editor I downloaded) I get 'Can't find class
>java.lang.Thread'. Now other stuff runs ok, and the lib is there in the
>.zip file. mpEDIT runs ok on a Windows machine.

Hmmm...  This tends to happen when the Java classes.zip file is not found
by the JVM.

I have seent this in two cases:

1)  When Kaffe is installed since it will answer to "java" and does
not automatically find its own classes.zip file (since it used to
use Sun's)

2)  When a program wrapper script uses the jre and the -cp/-classpath
option since this option *replaces* the classpath that the java_wrapper
supplies.  This is, IMHO, a bug, but it is how it works.  In these
cases, it is sometimes needed to actually have CLASSPATH set to
point at classes.zip.

I personally think that no user should every point at classes.zip and
that the system should automatically make sure it is at the end of
the classpath so that things work.  However, there are so many different
startup scripts for so many different programs written by so many
different people who have had to deal with the many different behaviors
of past Sun JDK releases, it is hard to get this all cleaned up.

>I've seen mention of the green_threads stuff (but nothing relating
>directly to my problem) is this related?

No...  "green" threads are also known as "user based" threads which
means the threading is handled by the JVM on its own vs "native" threads
which uses the operating system kernel to manage the threading.  Either
way works, albeit in different ways.  Native threads can be overall better
but only if the OS supports a good threading model without too much
overhead.  OS/2 and Solaris both have very nice threading support.  Windows
NT has reasonable threading support but not very good performance.  The
Linux kernel threading support is rather high in overhead and there are
complications with respect to the way the GC works.


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




Linux JIT?

1998-10-08 Thread Michael Rohleder

Jason Dillon writes:
 > Is there any other JIT compiler for Linux other than TYA?  I have been using
 > TYA for a while.  I have found that it does not really help for swing
 > applications, rather it hinders.  I was using NetBeans with TYA and it was
 > quite slow to react to ui events.  It was also eating about 30% of my p2
 > constantly at idle.  Without TYA the ui reacts much, much faster and eats 30% of
 > my p2 spuratically at idle.

Is it just me? netbeans with tya feels a lot faster!
It eats up cpu, yes, but running it without tya also?!

-- 
`The great thing about mod_rewrite is it gives you all the
 configurability and flexibility of Sendmail. The downside to
 mod_rewrite is that it gives you all the configurability and flexibility of
 Sendmail.'
   -- Brian Behlendorf
  Apache Group 



RE: help!!!

1998-10-11 Thread Michael Sinz

On Sat, 10 Oct 1998 23:51:23 -0700 (PDT), Jason Dillon wrote:

>Try setting your classpath to contain jdk116/lib/classes.zip:
>
>sh:
>
>CLASSPATH=/where/ever/you/put/it/jdk116/lib/classes.zip
>export CLASSPATH

This should not be needed.  The problem below is most likely that
he is not running the javac from the jdk116/bin directory.
That is a simple script that will set CLASSPATH for you.  If
you get a CLASSPATH NOT SET error it is either KAFFE that is running
and not the jdk116/bin/javac command or it is some other problem
like that since the javac script (which is just .java_wrapper) always
makes sure CLASSPATH is set.

>csh:
>
>setenv CLASSPATH /where/ever/you/put/it/jdk116/lib/classes.zip
>
>You should also set JAVA_HOME to /where/ever/you/put/it/jdk116/ in the same
>fashion.  That should fix it.  Let me know if it doesn't.

Please do not set JAVA_HOME.  It is not needed and generally will
help add to confusion rather than reduce it.

>On 11-Oct-98 Willy wrote:
>> Sir/Madam,
>>   Good day!!!
>>   I download the jdk_1.1.6-v5-x86-lib5.tar.gz... then untar it... it
>> extracted on jdk116 directory then... and when i run javac it return the
>> error message "CLASSPATH NOT SET" please help me how to solve this
>> problem... We're students now developing a software using Java in
>> Linux... please help us as soon as possible

Do you have KAFFE installed.  If you do a "which javac" you should see
that it is running the jdk116/bin/javac  If that is not what it is running
your path may be incorrect or you may have some other javac in the path
that you will want to remove

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




Re: javac dies silently

1998-10-12 Thread Michael Sinz

On Sun, 11 Oct 1998 17:36:08 -0400, strider wrote:

>On Sun, 11 Oct 1998 09:50:15 -0400, "Michael Sinz" <[EMAIL PROTECTED]> wrote:
>>
>> It should just work.  Make sure (since you are RedHat 5.0) not to have
>> Kaffe installed from the default Kaffe archives.

>>> On Sun, 11 Oct 1998 08:59:43 -0400, strider wrote:
>>>I notice that, after the 1.1.5 distribution of Java on Linux, regardless of
>>>which port or subversion I try, javac no longer works. 
>
>Thanks for responding.  I've removed Kaffe from my system, as well as older versions 
>of the JDK, and javac still does nothing.  Any other ideas?

Hmmm...  I can not think of a reason off the top of my head.  I would
look at what the javac is trying to run.  For example, check what

java -version

outputs.  (javac is just a java program that happens to be a Java Compiler)


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




Re: rmid with JDK1.1.6

1998-10-14 Thread Michael Kranz

Hi Andrea, Hi Joe,

thank you both for your answers.

>Kontorotsui wrote:
>> Probably because RMI is implemented in Java 1.2. I am waiting for RMI
too,
>> right now I'm forced to work on a Solaris workstation...at least it's not
>> windows :)


Right, I also was told to wait for 1.2.

>
>Eh? RMI is in the linux JDK already. And it works.
>"rmiregistry" I think is the command u want...
>I've had linux Java talking to solaris Java via RMI.


Ok. But I was really looking for the rmi object activation process on the
server "rmid". So what you did "to solaris" I want to do "to linux".

>1.2 was going to have RMI over IIOP (CORBA),
>but I don't think that's going to make it in now...


Yes, looking in the official JDK1.2Beta4 documentation there are entries for
package org.omg.CORBA, but probably it's to early to rely on this for stable
implementations.

Michael
-
Gesellschaft fuer Informatik e.V. (GI)
Wissenschaftszentrum
Ahrstrasse 45
D-53175 Bonn

Tel.: +49(0)228/302-145 / Fax: +49(0)228/302-167
e-mail: [EMAIL PROTECTED] / WWW: <http://www.gi-ev.de/>
-
Michael Kranz
Tel.: +49(0)228/302-156 / e-mail: [EMAIL PROTECTED]
-




Re: rmid with JDK1.1.6

1998-10-14 Thread Michael Thome

>>>>> "Michael" == Michael Kranz <[EMAIL PROTECTED]> writes:
>> Kontorotsui wrote:
>>> Probably because RMI is implemented in Java 1.2. I am waiting for RMI
> too,
>>> right now I'm forced to work on a Solaris workstation...at least it's not
>>> windows :)
> Right, I also was told to wait for 1.2.
>> 
>> Eh? RMI is in the linux JDK already. And it works.
>> "rmiregistry" I think is the command u want...
>> I've had linux Java talking to solaris Java via RMI.
> Ok. But I was really looking for the rmi object activation process on the
> server "rmid". So what you did "to solaris" I want to do "to linux".
Do you mean "rmic"?  The stub and skeleton compiler?

The linux and Solaris versions are effectively identical - certainly
in regards to RMI.  We've been using RMI (client, server and
compile-time) on all of {windoze,linux,solaris,macos} since the beta
days of 1.1 - I'm not sure what you could be looking for that isn't
there. 

cheers,
-mik

-- 
Michael Thome ([EMAIL PROTECTED])



Re: Sun's ORB & Java-Linux

1998-10-14 Thread Michael Thome

>>>>> "Gerald" == Gerald Gutierrez <[EMAIL PROTECTED]> writes:
> Has anyone got Sun's ORB to work with Linux's Java port ? I'd like to
> use CORBA with Java but it says on Sun's web page that JavAIDL is for
> JDK1.2 only. It'd also be great if the ORB is actually stable.
> Suggestions for alternative ORBs perhaps ?
There were a number of pre-release versions of JavaIDL for 1.1.x
versions - I occasionally use one that came off a sun developers CD,
but you can probably find an archived copy somewhere.

cheers,
-mik

-- 
Michael Thome ([EMAIL PROTECTED])



Re: mpEDIT+Threads/CLASSPATH?

1998-10-14 Thread Michael Sinz

On Wed, 14 Oct 1998 15:41:02 +0100, Danny Ayers wrote:

>Thanks (Ernst & Michael) for the replies - I should have included the
>following in my query :
>
>mpEDIT is a text editor, very like wordpad, for java, free with source
>from :
>
>http://members.tripod.com/~mpTOOLS/mpEDIT.html
>
>Thanks (Ernst & Michael) for the replies - I should have included the
>following in my query :
>
>the script to run mpEDIT is as follows -
>java -classpath src:$CLASSPATH mpTOOLS.mpEDIT.mpEDIT $1 $2 $3 $4

Unless the src directory is needed in the classpath, try using just

java mpTOOLS.mpEDIT.mpEDIT $*

You could also do:

CLASSPATH="src:${CLASSPATH}"
java mpTOOLS.mpEDIT.mpEDIT $*

if you need the src part.  The -classpath option *replaces* the classpath
environment variable and thus prevents the java_wrapper from adding its
classes.zip path.  (A bug, IMHO, but it is how it does things)

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




Re: rmid with JDK1.1.6

1998-10-15 Thread Michael Kranz

Hi,

believe it or not: I really mean rmid; look at

http://java.sun.com/products/jdk/1.2/docs/tooldocs/solaris/rmid.html

The same is true with Windows. So my question was, is there rmid in
JDK1.1.6, especially under Linux? What I learned from you, folks: Apparently
not. But read ahead...

Is there any equivalent for rmid? If I interpret Mik and Joe correctly, it
seems so, because they say running RMI-Objects with Linux. But how does an
application-object-server under JDK1.1.6 activate business-objects (which I
compile with rmic and register via rmiregistry) without rmid? (According to
the JDK1.2 documentation above even rmiregistry has to access rmid). Maybe
you are already using some CORBA-stuff underneath instead of "Pure RMI"??

Mik wrote:
>Do you mean "rmic"?  The stub and skeleton compiler?
>
>The linux and Solaris versions are effectively identical - certainly
>in regards to RMI.  We've been using RMI (client, server and
>compile-time) on all of {windoze,linux,solaris,macos} since the beta
>days of 1.1 - I'm not sure what you could be looking for that isn't
>there.

Joe wrote:
>I'm confused now.
>What is "rmid"?
>
>My linux box has the same java facilities as the solaris box.
>I'm fairly certain you can talk either way.
>
>There's no "rmid" in the solaris 1.1.6.
>My solaris stuff only uses rmiregistry...

Best regards
Michael
-
Gesellschaft fuer Informatik e.V. (GI)
Wissenschaftszentrum
Ahrstrasse 45
D-53175 Bonn

Tel.: +49(0)228/302-145 / Fax: +49(0)228/302-167
e-mail: [EMAIL PROTECTED] / WWW: <http://www.gi-ev.de/>
-
Michael Kranz
Tel.: +49(0)228/302-156 / e-mail: [EMAIL PROTECTED]
-




Re: rmid with JDK1.1.6

1998-10-15 Thread Michael Sinz

On Thu, 15 Oct 1998 10:15:03 +0100, Michael Kranz wrote:

>Hi,
>
>believe it or not: I really mean rmid; look at
>
>http://java.sun.com/products/jdk/1.2/docs/tooldocs/solaris/rmid.html
>
>The same is true with Windows. So my question was, is there rmid in
>JDK1.1.6, especially under Linux? What I learned from you, folks: Apparently
>not. But read ahead...

No.  Note that elsewhere in the JDK 1.2 documentation (which is not
final yet) it shows that rmid is a new feature of JDK 1.2.  It was not
part of the JDK 1.1 (1.1.x) releases.

When the JDK 1.2 is released and we have ported it to Linux, rmid will
most likely be part of that release.

>Is there any equivalent for rmid? If I interpret Mik and Joe correctly, it
>seems so, because they say running RMI-Objects with Linux. But how does an
>application-object-server under JDK1.1.6 activate business-objects (which I
>compile with rmic and register via rmiregistry) without rmid? (According to
>the JDK1.2 documentation above even rmiregistry has to access rmid). Maybe
>you are already using some CORBA-stuff underneath instead of "Pure RMI"??

If you are doing things that only work in JDK 1.2, you may need to wait
for JDK 1.2.  Otherwise, please refer to the JDK 1.1 documentation on how
RMI is activated and works.  Sorry I can not be of more specific help
other than to point you at:

http://java.sun.com/products/jdk/1.1/docs/tooldocs/solaris/index.html

and

http://java.sun.com/docs/books/tutorial/rmi/index.html

(The solaris documentation is basically the "unix" documentation)


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




Re: setup question

1998-10-15 Thread Michael Sinz

On Thu, 15 Oct 1998 07:44:31 -0400, Jim Ridenour wrote:

>   First let me say I'm new to Linux, but I do run other programs on it
>successfully.
>I have two questions:
>
>1. On Blackdown's mirror sites for JDK116_v5 they have two files beginning
>with jdk... and differing only by the letter "b" toward the end.  The one
>without the "b" appears to be the one I want and uncompresses to the JDK.
>The one with the "b" on the end won't even uncompress.  What is it?

We have started to release the files in both tar.gz and tar.bz2 format.
The bz2 compression format (bzip2) is a new compression system that
happens to do a nice job on the JDK (saving a bit over 10% in size and
since the archive is over 10megs that means over 1meg smaller archives)

Many people do not have bzip2 support on their systems.  Plus, tar.gz
is a well established format that works on almost all platforms (including
Windows/WinZIP)  tar.gz also uses much less RAM to decompress a file.
(bzip2 can use a lot of memory to do a decompress and the memory it
takes depends on the way the file was compressed)

The main reason we are trying bzip2 format is to see if people really
want it due to the smaller file sizes.  (Not all files are smaller)
I know it takes me twice as long to upload the two different formats
and thus I would like to have only one, but since I do the upload in
auto-pilot mode while I am away from my machines usually, it does not
bother me too much)

>2. Having uncompressed JDK116v5 (the one without the "b" at the end) it
>creates all the directories to hold the jdk.  If I go into /jdk116v5/bin
>and create a test.java file and then invoke "javac test.java", nothing
>happens.  I just get a command prompt back.  No test.class file is created,
>no errors, no messages, nothing.  Both the test.java and the javac are in
>that directory so paths shouldn't be the problem.  Any ideas?

Hmmm...  I don't have an idea right now.  I normall add the jdk116v5/bin
directory to my path and do my work elsewhere.

>PS   I should say this is on RedHat 5.0 and I used their package manager to
>remove all Kaffe files.  Also, I am using the glibc version which by the
>tests Blackdown describes for telling which library you have, is the one I
>need.  

Thanks for that PS.  I build the glibc libraries on RedHat 5.0 (albeit
updated to current releases of the kernel and other security/bug fixes)

What happens if you just type "java -version" or "javac"

The first should give you the version of the java system you are running
and the second should output the compiler options.  If this does not
happen, try doing "which java" or "which javac" to find out where things
may be coming from.


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




Re: rmid with JDK1.1.6

1998-10-15 Thread Michael Sinz

On Thu, 15 Oct 1998 14:51:46 +0200 (MET DST), Kontorotsui wrote:

>
>On 14-Oct-98 Joe Carter wrote:
>>My linux box has the same java facilities as the solaris box.
>>I'm fairly certain you can talk either way.
>>
>>There's no "rmid" in the solaris 1.1.6.
>>My solaris stuff only uses rmiregistry...
>
>I have to use solaris because there is the JDK1.2. I thought that RMI
>was available on in 1.2, but I see it also in the 1.1.6, now.
>
>But does it work?

RMI was available in all 1.1 JDK versions.  JDK 1.1 does not have rmid
but RMI has worked for a long time.

>>Can anyone comment on the differences between 1.1 and 1.2 RMI?
>>(beyond the running over IIOP...)
>
>Yes, I'd like to know the differencies too, please.

The best places to look are:

http://java.sun.com/docs/books/tutorial/rmi/index.html

http://java.sun.com/products/jdk/1.1/docs/tooldocs/solaris/index.html


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




Re: Working Button mnemonics under Linux Java?

1998-10-15 Thread Michael Sinz

On Thu, 15 Oct 1998 12:29:30 -0400 (EDT), Jim Burmeister wrote:

>Eu Hin Chua <[EMAIL PROTECTED]> wrote:
>
>> Has anyone ever managed to get keyboard mnemonics working for JButtons
>> using Swing?
>> 
>> e.g.
>> 
>> OKButton.setMnemonic('o');
>> 
>> Under windows 95/8/NT, all of my code (including the SwingSet demo)
>> performs as expected, with the ALT key being used to activate the mnemonic
>> for both buttons and menu items. Under Linux, nothing happens at all.
>
>Swing button mnemonics work just fine for me, both in standalone buttons
>and menus.  I've used them in my own code, and I also just checked the
>SwingSet demo and it works OK too.  I did nothing special to set them up;
>pressing Alt+key has always just worked.
>
>Here's my setup:
>
>  Red Hat Linux 5.0 w/upgraded glibc libraries
>  Blackdown JDK 1.1.6v4a
>  Swing 1.0.3
>  Metro-X 4.3 X server
>
>Chances are, the problem is not with the JDK; it's with the way you have your
>X server configured.  Are you able to use the Alt key in other X applications?
>Check your .xinitrc or .xsession script for "xmodmap" commands; if you've used
>xmodmap to reconfigure your keyboard, the Alt keys might be generating keysyms
>other than what the JDK is expecting.  You can use the "xev" program to see
>whay keysyms your Alt keys are generating; here's what the output looks like
>on my system, for the left and right Alt keys respectively.  The keysym on
>the third line is what's important: it should be "Alt_L" and "Alt_R".

Note also that many users may have the window manager set up to use
the alt key for their own use.  Many of the alt key strokes a friends
machine do window operations or scrolling operations or desktop operations.

>-Jim Burmeister, Metro Link Incorporated <[EMAIL PROTECTED]>

Thanks for your answer Jim - There are so many places where the
configuration in unix systems can "confuse" users.

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




Re: RPM JDK installation on RedHat 5.1

1998-10-15 Thread Michael Sinz

On Wed, 14 Oct 1998 17:51:51 +0100, Arif H Saleem wrote:

>hi!
>
>We have used the jdk 1.1.6v5 tar.gz to build an rpm on an i386 RedHat 5.1
>system. We have glibc 2.0.7-19 installed (also glibc-devel) and lesstif 0.86.5. 
>We had no problem building the rpm but on installation we get a failed 
>dependency:
>
>libXm.so.2 required by jdk-1.1.6-5

My guess is that the person who made the package did that.

MetroLink provided the JDK group with Motif developer kits so that we
can build the JDK with Motif *and* statically link it.  The JDK archives
we have produced include both the static and dynamic linked versions
of the JVM (java, java_dyn, etc)  For most users, just installing
the JDK and using it will result in the user getting the statically
linked JDK.  Setting DYN_JAVA to some value will make the wrapper
script load the dynamic linked version of the JVM.

>We understand that this is provided by Metro Link Motif 2.0 ( we checked their
>web page)  but it does not seem to be included with LessTif. (It only has
>libXm.so.1) 
>Does this mean that we either have to buy Metro Link Motif or recompile 
>against LessTif ???

No.  Now, if you were to compile the JDK you would need either Motif
or LessTif.  Currently we have run into a number of strange behaviors
in LessTif that prevent the JDK from running 100% correctly with AWT
code.  The MetroLink Motif does not have these problems.


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




Re: lifeless javac with RedHat 5.0 JDK1.1.6v5

1998-10-15 Thread Michael Sinz

On Thu, 15 Oct 1998 17:15:47 -0400 (EDT), Jim Burmeister wrote:

>Jason Chambers wrote (well, quoted):
>
>> If I create a test.java file and then invoke "javac test.java", nothing
>> happens.  I just get a command prompt back.  No test.class file is
>> created, no errors, no messages, nothing.
>
>A few weeks ago, when I decided to start using Java, I downloaded the JDK 
>(version 1.1.6v4a) and installed it on my Red Hat 5.0 system.  I had this
>exact problem.  A further problem was that most other Java programs would
>cause the java runtime to segfault.
>
>I fought with it for a while (being the type of person who exhausts all
>possibilities before asking for help).  Eventually, I ran across this
>section in the README.linux file:
>
>Generally, you should get the glibc version if your machine is running
>glibc, but libc5 should work acceptably as well, if you have a recent
>(say, past April 1, 1998) version  of the glibc library installed on
>your machine (RedHat 5.0 by default comes with an older version of glibc,
>you need to get the 2.0.7-7 version from RedHat to win).
>
>Even though this text referred to a different case than my setup (it talks
>of running the libc5 version of JDK, not the glibc version), I decided to
>try upgrading my C libraries to see if it would help.  So I downloaded the
>latest glibc update packages from ftp.redhat.com (glibc-2.0.7-19) and
>installed them.  Once I did that, the JDK worked flawlessly.

The wording is not too good in that section.  The updating is needed
also for older glibc systems if you want to run the JDK.

>Can we get an official answer from someone on the porting team to the
>following questions:
>
>1. Should the latest version of the JDK for glibc work on a stock Red Hat
>   Linux 5.0 machine?  It would appear the answer to this is "no", since I
>   and others have had problems.

I would think that it could have problems given the scope of bug fixes
that have been done in glibc.  If you look at the list, it really sounds
like an update to glibc 2.0.7-19 would be a very good idea.

It is too bad that some popular older releases may need updating but
the fact is that the code continues to evolve and important fixes
are being made to the glibc code base.

>2. If the answer to #1 is "no", is the recommended solution to update the
>   glibc package on your system?  While this was the solution I found, the 
>   previous poster noted that some people would rather not make such a
>   drastic change to their system unless absolutely necessary.

Given the fixes (both security related and otherwise) this is a very
good idea.  There are fixes that have to do with time zones, threading,
and lots and lots of security and exploit fixes.

>3. If the user does not wish to upgrade their C library, is there a workaround
>   (I've seen talk of doing stuff with the C libraries in the green_threads
>   directory, but didn't try it since I had already solved the problem).
>   Or, is the Red Hat 5.0 glibc package sufficiently broken that the only
>   solution is to upgrade?

Well, it may be that if they don't want to upgrade glibc then doing libc5
may work, but even that may be a problem.

Even Red Hat claims that you need the May 28th, 1998 release of glibc
to be compatible with future security fixes in other modules.  This
includes the JDK.

>4. Once official answers to these questions are determined, I think they
>   should be explained clearly in README.linux.  I looked at the v5 version
>   of this file, and no new information on this subject was added since v4a,
>   when I fought with the problem.

Since you most resently fought with the problem, what is the best answer
here?  (Other than to fix the wording to recommend to update to a known
working version of glibc.  2.0.7-19 seems to be a good one)


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




Re: glibc question

1998-10-16 Thread Michael Sinz

On Fri, 16 Oct 1998 18:21:02 -0400 (EDT), [EMAIL PROTECTED] wrote:

>
>An offpoint but related question Does anyone know of an easy
>way to get the glibc source files installed? The latest version
>from gnu is 2.0.6 (btw, how can redhat have a later version that
>gnu itself...) and the latest srpm from redhat is version 2.0.7-13.
>
>I need the source files for debugging. Anyone know of a convenient
>way to get the right source installed without making everything
>get messed up?

Well, if you are RPM enabled, just install the SRPM.

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




Re: Zero sized display panes from recompiled jdk

1998-10-16 Thread Michael Sinz

On Fri, 16 Oct 1998 17:15:04 -0600, John  Campbell wrote:

>Im getting very small display panes which cannot be resized
>from my recompiled jdk1.1.6v5. The down-loaded jdk works
>fine.  I suppose i'm not loading lessTif correctly. Any ideas
>about where to start? -John Campbell

This is one of the LessTif problems that I know of.  From the last
LessTif build I did it still was a problem.  It works correctly in
every Motif build (1.2, 2.0, and 2.1)

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




Re: Zero sized display panes from recompiled jdk

1998-10-16 Thread Michael Sinz

On Fri, 16 Oct 1998 17:15:04 -0600, John  Campbell wrote:

>Im getting very small display panes which cannot be resized
>from my recompiled jdk1.1.6v5. The down-loaded jdk works
>fine.  I suppose i'm not loading lessTif correctly. Any ideas
>about where to start? -John Campbell

This is one of the LessTif problems that I know of.  From the last
LessTif build I did it still was a problem.  It works correctly in
every Motif build (1.2, 2.0, and 2.1)

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




Re: libawt.so purgatory

1998-10-18 Thread Michael Sinz

On Sun, 18 Oct 1998 17:56:17 +1000, jim watson wrote:

>
>
>
>
>(Jon Peterson) wrote:
>
>> /usr/local/java/bin/i586/green_threads/java_ns: can't resolve symbol
>> 'XFreeColors'
>
>Jon,
>
>It appears to be running java_ns...?
>
>I dont have v2 but the README.linux for v5 states:
>
>"You will not be able to run any AWT based applications with the nonstatically
>linked java interpreter, so only set NS_JAVA for non-GUI based applications.
>[For the curious: in the bin/i586/green_threads/ directory, the executables
>(java for the static version, and java_ns for the non-static version) are kept.
>"
>
>I got the same error message by setting NS_JAVA=true in a otherwise good
>setup...

Yup, that is what would happen.  If you want to use the dynamically
linked Java with AWT you need to set DYN_JAVA=true.  This version will
need to have Motif shared libraries on your system.  Normally you would
not set either DYN_JAVA or NS_JAVA if you want to run AWT and do not own
a copy of Motif.

NS_JAVA is mainly there so that you can run non-GUI Java applications without
X-Windows installed.  Such as server-side applications/servlets.  This
reduces the size of the memory used and does not require that X be installed
on the system.

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




Re: question about installing

1998-10-18 Thread Michael Sinz

On Sun, 18 Oct 1998 03:17:58 -0600, Sunny Sandhu wrote:

>
>Hi, 
>
>i'm not sure if this is the right email address to send a question of
>this nature to, i apologize if it isn't.
>
>I just downloaded the file jdk_1.1.6-v5-glibc-x86-tar.bz2 and i am
>unsure how to install it.  I am new to Linux, and i am aware of the
>command 'tar zxvf filename', but i get an error message that it doens't
>look like a tar archive.  i tried renaming to a .Z and .tar extension
>but it didn't work.

.tar.bz2 files are much like .tar.gz files only they are compressed using
bzip2 rather than gzip.  bzip2 is rather new and not "fully established"
yet so many systems do not have this installed.  Tar also does not directly
know about bzip2 (at least the versions I have)

So, you need to get BZIP2 to decompress the file and then run that through
"tar -xf".  Otherwise you could download the .tar.gz version of the file.
It is the exact same tar file only with gzip compression.  This normally
is very easy to extract since tar tends to know how to deal with this
if you use "tar -zxf" (the -z tells it to use gzip filter)


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




Re: Sending objects down a stream problem

1998-10-18 Thread Michael Sinz

On Sun, 18 Oct 1998 17:29:52 -0600, Glenn Valenta wrote:

>I'm almost sure this is one of those problems cuased by
>my misconception of how things work in Java v.s. C++,
>but I have run this thing around for days without resolve. 
>
>Maybe someone can see the obvious
>
>I'm trying to send a serialized class down a network pipe and am 
>only getting the first one on the other end. The rest seem to vanish.

[code deleted...]

You are trying to send the same object down the same (already open)
object output stream.  The serialization stuff keeps track of what
was sent already and does not send it again.

You can either send new objects or close and open new streams for
each one.


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




core dumping on execution

1998-06-16 Thread Michael Plump
.0 => libform.so.3.0.0
libmenu.so.3.0 => libmenu.so.3.0.0
libpanel.so.3.0 => libpanel.so.3.0.0
libbfd.so.2.8.1.0.1 => libbfd.so.2.8.1.0.1
libopcodes.so.2.8.1.0.1 => libopcodes.so.2.8.1.0.1
libgpm.so.1 => libgpm.so.1.10
libdb.so.1 => libdb.so.1.85.4
libgdbm.so.2 => libgdbm.so.2.0.0
libdb.so.2 => libdb.so.2.0.0
libg++.so.27 => libg++.so.27.2.8
libstdc++.so.27 => libstdc++.so.27.2.8
libvgagl.so.1 => libvgagl.so.1.2.10
libvga.so.1 => libvga.so.1.2.10
/lib:
libproc.so.1.2.6 => libproc.so.1.2.6
libdl.so.1 => libdl.so.1.9.9
ld-linux.so.1 => ld-linux.so.1.9.9
libtermcap.so.2 => libtermcap.so.2.0.8
libm.so.5 => libm.so.5.0.9
libgdbm.so.1 => libgdbm.so.1.7.3
libcurses.so.1 => libcurses.so.1.0.0
libc.so.5 => libc.so.5.4.44
libncurses.so.3.0 => libncurses.so.3.0.0
libe2p.so.2 => libe2p.so.2.3
    libext2fs.so.2 => libext2fs.so.2.3
libss.so.2 => libss.so.2.0
libuuid.so.1 => libuuid.so.1.1
libcom_err.so.2 => libcom_err.so.2.0
libc.so.4 => libc.so.4.7.6
libm.so.4 => libm.so.4.6.27
libcurses.so.0 => libcurses.so.0.1.2


Michael Plump | Snorks make me smile, okay? eh | [EMAIL PROTECTED]
"Frankly, I don't know where such independent monkey ringers come from."
   --Joe Dietz




Re: Zero sized display panes from recompiled jdk

1998-10-19 Thread Michael Sinz

On Mon, 19 Oct 1998 10:37:43 -0600, John  Campbell wrote:

>>>>> Michael Sinz wrote
>>John  Campbell wrote:
>>>Im getting very small display panes which cannot be resized
>>>from my recompiled jdk1.1.6v5. 
>>This is one of the LessTif problems that I know of.  From the last
>>LessTif build I did it still was a problem.  
>
>Are you your'e saying is that there is no work-around?

Well, I did not find out for LessTif.  The problem I saw was
that the java.awt.Window objects I created would only render a 10x10
pixel area in the top left even though the whole 120x80 pixel area was
there.  Other windows moved under it, you would notice that it really
was 120x80 in size but all rendering was clipped to the 10x10 size.

The exact same Java source code on Windows, Solaris, MacOS, and Linux
with Motif works correctly.  It also works as an applet in Netscape
under Windows, Linux, and MacOS.  It may actually work elsewhere but
these are the only test platforms I have.  (Oh, and it works with FreeBSD
with Motif)


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




Re: FW: Slackware and static versus ELF

1998-10-19 Thread Michael Sinz

On Mon, 19 Oct 1998 14:39:40 -0700, Marsh, Douglas wrote:

>
>Well this is an update, I've collected bits and pieces of later/newer, ELF
>compiled, X lib files from two other linux systems where the installed (not
>me) custom installed his X Windows (one was Slackware and the other RedHat,
>but both have more than new enough ELF X libs). The JRE is happy, and I
>believe the JDK should also... 
>
>I'll check out the XFree86 org for the newest ELF precompiled version. I was
>just wondering if anybody had a bare minimum X lib tgz or something... I'm
>just developing and running "console" applications. Nothing (yet) GUI! Is
>there a version of the JRE which is console only (i.e. required no X
>libraries)?

If you set NS_JAVA to something (like "true" or "yes" or "foo" or "xxx")
then the Java wrapper scripts will run a version of the JVM that does
not need X and, in fact, can not use X.  This is specifically made so
that server-side Java applications/servlets can be run without the overhead
that the larger JVM-with-X support code has.  (Only a memory overhead
issue, but memory is overhead :-)

This works fine for all console and network based socket code.

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




Re: Java Plugin doesn't work

1998-10-20 Thread Michael Sinz

On Tue, 20 Oct 1998 13:10:43 +0800 (HKT), Robert P. Biuk-Aghai wrote:

>On Fri, 16 Oct 1998, Patrick Lamb wrote:
>
>> I got it to work by setting the NPX_PLUGIN_PATH environment variable. 
>> (It's in one of the FMs...)  IIRC, it isn't supposed to be needed for a
>> default installation, but the plugin suddenly started working when I set
>> it anyhow.  In my case I set
>>   NPX_PLUGIN_PATH=/home/pdlamb/.netscape/plugins
>>   export NPX_PLUGIN_PATH
>> in my .bashrc.  
>> 
>>  Pat
>
>I have in the meantime downloaded the activator.i18n-linux-glibc
>plugin (previously I used the activator-linux-glibc plugin), installed
>it, and set the NPX_PLUGIN_PATH variable to the ~/.netscape/plugins
>directory. Upon starting Netscape 4.06, I get following message:

Just a simple question - is there a reason why you are trying the
plug-in in 4.06?  I have seen things about problems starting in 4.05
with the plug-in due to some changes in the browser.  Also, starting in
4.06, Netscape has finally main-lined the JDK 1.1.x Java into their
browsers and thus there generally is no need for the plugin.

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




Re: CheckVersions Error...

1998-10-22 Thread Michael Sinz

On Wed, 21 Oct 1998 20:58:22 -0700, Dustin Preisler wrote:

>new to Linux, attempting to
>install and run the Blackdown
>Java..
>get a:
>/usr/lib.java/jdk116_v5/bin/checkVershions:
>{isGreaterOrEqual: command not
>found
>error...
>thats when i try to do a
>javac
>or
>javac -g
>on any .java file...
>can anyone help me out
>thanks..

You can hand-patch that file or you can:

--- bin/checkVersions.orig  Fri Oct  9 15:13:34 1998
+++ bin/checkVersions   Fri Oct  9 15:13:45 1998
@@ -103,8 +103,8 @@
 
 # 5.4.33 & 1.9.6 seem to do it too
 if isGreaterOrEqual "$libdlVers" 1.9.6 ||
-   {isGreaterOrEqual "$libcVers" 1.5.44 &&
-isGreaterOrEqual "$libdlVers" 1.9.9}
+   ( isGreaterOrEqual "$libcVers" 1.5.44 &&
+isGreaterOrEqual "$libdlVers" 1.9.9 )
 then
 # supplied libraries are not needed
return 1

which is the difference in checkVersions that support
both BASH 1.x and BASH 2.x syntax.  (Sorry about the problem
but my only LIBC5 system has BASH 2.x...)

This should be in the v5a version of the JDK 1.1.6 JDK.


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




Re: apache, jserv, blackdown's vm, memory leak?

1998-10-22 Thread Michael Sinz

On Thu, 22 Oct 1998 15:29:42 -0500, Keith T. Garner wrote:

>I'm out at a clients and we're investigating using Linux, Apache, and
>Jserv in Apache for the new services they want to roll out to their
>customers.
>
>Being a Linux user for years, I have no doubt of its ability, but being
>a company they want to play it safe.  I've been doing an unrelisitic-
>for-my-clients-uses tests where a java servlet that speaks over RMI is
>being hit anywhere from 3 to 8 times a second.  Its working beautifully
>except I think I may have discovered a memory leak.
>
>When I first ran the test servlet, memory would grow quickly and would
>eventually fill up the heap and cause the vm to exit.  After doing some
>quick research I found out that the garbage collection thread was never
>running because it was such a low priority thread and the cpu (and the
>vm) was pegged with requests, so it never got a chance to collect.
>I throw a System.gc() call at the end of the servlet, and the mongo
>growth stopped.  However, after 7-10 hours of being pounded on, the
>memory footprint still grows a little bit.
>
>After I stopped the bombing I expected the the vm to shrink a bit, but
>it never did...Which makes me think is a very time memory leak that is
>showing up after constant pounding and a long period of time.  And I can't
>figure out if its in the vm, or in something that mod_jserv does to the
>vm.

First, something to do:  Have something in the JVM print out the memory
status (used and total memory) or log this every few minutes...

However, I would guess that this is one of two things:

1)  A real memory leak - they do happen sometimes in Java (either the
actual VM or the Java code running on it.

2)  A fragmentation tractor
This is when memory gets used in just the wrong order and released
in just the wrong order and thus causes memory to get very fragmented.
Normally this requires a memory leak but sometimes, even with no
memory leak this can happen, but only to a certain point.

Things to do:

a)  In addition to the call to gc, you can try to force any finalizers to
run.  Sometimes objects need to run a finalizer and sometimes that
needs to run on its own thread and...  Anyway, this can help in rare
cases.

b)  Check that the memory use within the VM is really going up (that
is what the output of the VM memory status is for)  If the amount of
memory used does not grow, the problem is not within the Java code
itself.  If the amount of total memory does not grow then the
problem is not in the heap space itself but is in an actual JVM memory
leak outside of the Java heap (most likely not)

>I can't track the possible bug down much more then this, which is
>fustrating because its useless as a bug report.  However, I do want to
>see if anyone can verify my results.

Do you have the servlet handy?

Which version of the JVM?  (Some earlier versions had problems with
threads not freeing all resources)

I have some Java server-side stuff running that tends to be up as long
as the OS stays up.  It is still in testing stage but there is a connection
to it at least every 30 seconds with loads as high as one every 2 or 3
seconds during rush hour.  (And it has lots of threads but I wrote my
own thread pool class since this was started back when there was a bug
in the Sun code that leaked a bit of memory for every thread you created.)


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




Re: Interprocess Communication with a Java Application

1998-10-23 Thread Michael Sinz

On Fri, 23 Oct 1998 10:03:56 -0700, Steve Bankes wrote:

>
>I am seeking advice about interprocess communication between a Java application
>and other, not necessarily Java, applications.
>
>I am developing the Java application under Linux but want to be able to run it
>under Windows.  So far I have been using Linux FIFO's (named pipes) rather than
>sockets.  I am using FIFO's because it is easier to write shell scripts that
>will create, read from and write to FIFO's than for sockets, and because there
>does not seem to be a Java internal socket; i.e there seems to be no Java analog
>of AF_UNIX (UNIX internal protocols) sockets.
>
>So far this approach is working fine under Linux.  I know nothing about Widows
>or Windows programming.  I am concerned how portable this will be to Windows.

The only real IPC in Java that is platform independant is via the network
I/O classes.  This also happens to work rather well between machines, not
just between processes.  Now, it is not light weight.

Windows NT has a think known as a "named pipe" the is much like a fifo.
However, it requires special code to create/manage one.  Connecting to
one (being sender usually) is trivial and even works over the network
from Windows 95 and Windows 98.  However, the other end requires NT.

Again, sockets or UDP are very handy and with 127.0.0.1 it even should work
reasonably fast.  (Loopback address)  And, it is easy (or at least easier)
to work over the network to systems of different platforms even.  I do this
a lot with normal sockets and RMI and serialization.  (All three in one
program even, but usuaully just sockets since that works almost everywhere)

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




Re: Problem compiling with the JDK

1998-10-23 Thread Michael Sinz

On Thu, 22 Oct 1998 16:41:16 -0500, Andrew P. Karels wrote:

>I am having problems useing the javac compiler in the Blackdown JDK.
>When I just type "javac" I get the message "No library path set".  I
>have RedHat linux ver. 5.1 JDK version 1.1.6.v5 glibc.

That message tends to mean that you have kaffe installed from the old
RedHat RPM.  It makes a javac shell script in /usr/bin that tries
to use kaffe as the JVM.

Try checking that "which javac" points to your /bin/javac
and not to /usr/bin/javac


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




  1   2   3   4   5   >