RE: Socket exceptions under 1.1.6v4

1998-09-29 Thread Jason Dillon

Sorry for the ignorant question... but is 'the next version' avaible yet or is
it still being cooked up?

--jason


On 28-Sep-98 Steve Byrne wrote:
> Paul Reavis writes:
>  > My Voyager-based networking works under v2 but breaks under v4 with
>  > a
>  > 
>  > java.net.SocketException: Socket option unsupported
>  > 
>  > I'm just trying to connect with the Voyager server at a specified port;
>  > it never even makes the connection. Localhost or LAN doesn't seem to
>  > make a difference.
> 
> This is the socket stuff that got broken in v4.  It was a minor change that
> broke some of the socket changing operations.  We've put the code back the
> way
> it was and things should work fine again in the next version.
> 
> Steve



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

1998-09-29 Thread Steve Byrne

Vincent Trussart writes:
 > "B. Craig Taverner" wrote:
 > 
 > > Hi,
 > >
 > > 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).
 > >
 > > 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.
 > >
 > > Does anyone know of a good way to solve this problem?  Any suggestions
 > > around the issue of object creation performance are welcome.
 > 
 > One way to handle this problem would be to create an Object pool.
 > There was an article on javaworld (www.javaworld.com) a few months
 > back.  Basically, instead of creating new objects you request them from the
 > pool.  When they are not needed anymore, you put them back in the pool.  This
 > 
 > way the GC won't collect them.
 > The pool must be able to "clean up" objects and so on...

Right.  I've known projects that have done this and won big.  Creating objects
is somewhat expensive because it's a synchronous operation, and synchronized
operations are slow in the 1.1 VM (1.2 uses a completely different and clever
trick to get the overhead of synchronization down into the noise).

Steve



Modal JInternalFrame?

1998-09-29 Thread Jason Dillon

Does anyone know how to get an JInternalFrame to be modal via JDesktopPane?  I
have looked at the jdk docs, and there is a bit of babble about it in
JOptionPane, but no matter what I try I can not get a JInternalFrame to become
modal.

I looked into showing the glass pane, then adding the frame to it, but that
does not work very well either.  The frame shows up for a quick second, then
vanishes.  Even if that did work, it is quite a pain to show that glass all of
the time.  Did they (swing developers) think that no one was ever going to want
a modal internal frame?

I am trying to avoid using external frames so I can better manage the overall
user experience, but it seems there is no easy way to create a modal dialog in
this fashion.

If you or someone you know has had any experience with this problem PLEASE let
me know.  I am going quite mad, quite quickly over this apparent lack of feature
in swing.

--jason



Re: help with swing!

1998-09-29 Thread Klaus Strebel

Hi Philip,

This was your command-line:
> $ ./runnit
> /opt/java/jdk1.1.6/bin/java -classpath .:/opt/java/swing-1.0.3/swing.j
> ar:/opt/java/swing-1.0.3/windows.jar:/opt/javaswing-1.0.3/motif.jar:/o
> pt/java/swing-1.0.3/metal.jar:/opt/java/swing-1.0.3/organic.jar:/opt/j
> ava/swing-1.0.3/mac.jar:.:/opt/java/swing-1.0.3/swingall.jar SwingSet
> file:/opt/java/swing-1.0.3/examples/SwingSet/doc/api
> Unable to initialize threads: cannot find class java/lang/Thread

Well, do you find classes.zip or classes.jar in the classpath?
That's it, your Java VM doesn't either ;-).

Have fun
Klaus


Klaus Strebel   _/_/_/_/_/_/_/_/_/_/_/
EIGNER + PARTNER AG_/_/
Ruschgraben 133   _/_/
D-76139 Karlsruhe_/_/_/_/_/_/_/_/_/_/_/
Phone:  +49 (721) 6291 - 0  _/  _/
Fax:+49 (721) 6291 - 88_/  _/
Mobile: +49 (172) 764 396 6   _/_/_/_/_/_/_/
E-Mail: [EMAIL PROTECTED]



Re: Huge initialized static data blocks & java.util.zip

1998-09-29 Thread Artur Biesiadowski

On Mon, 28 Sep 1998, Thomas Okken wrote:

> private static final byte myGzippedData =
> {
> 31, -117, 8, 8, -3, -3, 14, 54, 0, 3, 97, 0, -19, 93, 11,
> -126, -37, -86, 14, -35, 42, 60, 46, -39, -1, 18, -34, 88, 31,
> // and so on and so on... 22426 bytes in all
> }

Unfortunantely, such array are initialized in java one by one. So for each
entry you need
dup
sipush index
bipush data
bastore
(8 bytes for each entry).
Max size for any method is 64k, so it is well above it.

You should load it from file - you can use Class.getResourceAsStream or
similar method. It works for both applications and applets.

Artur



Re: Huge initialized static data blocks & java.util.zip

1998-09-29 Thread Bernd Wengenroth

Thomas Okken wrote:
> 
> Hi all,
> 
> I'm working on something that requires a static array of almost 400k.
> I figured that the best way to initialize this array would be to
> compress the data, add a static array with an initializer to put the
> compressed data there (gzip compresses it to about 22k, which seems
> reasonable), and then add a static {} block that uses java.util.zip
> to decompress this data.
> 
> Here's the code, edited for clarity:
> 
> import java.util.zip.*;
> 
> public class MyClass
> {
> 
> }
> 
> I'm having all sorts of problems with this. First of all, it just
> doesn't work. Inflater.inflate() throws a DataFormatException with
> message "invalid block type" (the initializer for myGzippedData was
> generated from a .gz file, and if I dump that data to System.out
> using write(), and pipe that to gunzip, it works fine).
> Also, the .class file is huge -- more than 330k. I would expect an
> initializer that initializes a 22k-array to add only slightly more
> than 22k to the class file! What's going on?
> 

I had the same problem. It seems, that the compiler stores each element 
with some type-information.
Write a example with some string-pattern in the byte-array and look
in the class-file. 

> If I could solve these to problems, I would be a happy camper once
> again; but I was also thinking of a different approach: I could put
> the data into a separate file, and read that to initialize the array;
> I wouldn't even worry about compressing that file, because everything
> will eventually be put into a jar file, and that will take care of
> that. But that leads to the next problem: how do I read a file from
> the jar containing my package, if possible in such a way that the same
> code will work for an application, *and* if this jar is loaded as an
> applet? If someone could share some working code to do that, or point
> me to an example, I would be very grateful!

You can read such files from the resources (All that can be found in
Classpath,
even jar-files; even as applet) with some code like this:

public byte[] readFromResource( String name )
  throws IOException
{
   InputStream is =
getClass().getClassLoader().getSystemResourceAsStream( name );
 // or  InputStream is =
getClass().getClassLoader().getResourceAsStream( name );
   if (is == null)   
 return null;
   ByteArrayOutputStream os = new ByteArrayOutputStream( );
   byte buffer[] = new byte[10240];
   int len;
   while ( (len = is.read( buffer, 0, buffer.length )) >= 0)
 os.write( buffer, 0, len);
   return os.toByteArray();
}

(sorry not tested, just try it). 

If you want to read from zip-files, use ZipInputStream. Very fast and
easy to use.


Regards,
Bernd Wengenroth

-- 

 Bernd Wengenroth
 IoS Gesellschaft für innovative Softwareentwicklung mbH

 Donatusstraße 127-129 WWW: http://www.IoS-online.de
 50259 Pulheim email: [EMAIL PROTECTED]
 Tel: 02234 / 986434   Fax: 02234 / 986433



1.1.7

1998-09-29 Thread Ulrich Kortenkamp

Hi,

today (or yesterday) the solaris and windows versions of the jdk 1.1.7 
were released. Is the porting team already porting this? 

BTW: Many thanks for your great work --- you enabled us to change
to Linux from solaris/windows!

Ulli

-- 
ETH Zentrum, IFW B43, CH-8092 Zürich
Phone +41-1-63 27393 // FAX +41-1-63 21172



Re: help with swing!

1998-09-29 Thread Brad Giaccio

> >
> >$ javac HelloSwing.java
> >HelloSwing.java:1: Package java.swing not found in import.
> >import java.swing.*;
> >   ^

This won't work since swing is under com.sun.java.swing.*

See if that helps,
Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
you know where to find it
  -Kane, Johnson, and anonymous



Re: 1.1.7

1998-09-29 Thread Uncle George

Ugg, jet another version to ascend to.

cant wait till december, when 1.2 will be out
gat

Ulrich Kortenkamp wrote:

> Hi,
>
> today (or yesterday) the solaris and windows versions of the jdk 1.1.7
> were released. Is the porting team already porting this?
>
> BTW: Many thanks for your great work --- you enabled us to change
> to Linux from solaris/windows!
>
> Ulli
>
> --
> ETH Zentrum, IFW B43, CH-8092 Zürich
> Phone +41-1-63 27393 // FAX +41-1-63 21172







Newbie question (libnet_g.so)

1998-09-29 Thread Ranjan Bagchi

Hi everyone,

I'm trying to move some of our Java apps to run on linux boxes.  I 
downloaded jdk1.1.6 and installed it (untarred in /usr/local and set my 
path to find /usr/local/jdk1.1.6/bin).

Well.. I was able to compile a hello world java app.  So I believe I'm 
correctly installed.  But any code hitting java.net causes a VM crash.  The 
output's attached to this message, but looking at the stack trace it looks 
like it's trying to load a library.

When I try and run jdb, I get a file not found for libnet_g.so.  But it's 
there, in .../lib/i586/green_threads

I'd appreciate any help, I'm running SuSE linux on an AMD 233 chip with a 
2.0.35 kernel.

Thanks!

-rj


  
 urltest.java

SIGSEGV   11*  segmentation violation
stackbase=0xb7f0, stackpointer=0xb6f4

Full thread dump:
"Finalizer thread" (TID:0x4065f208, sys_thread_t:0x413a3f04, state:R) prio=1
"Async Garbage Collector" (TID:0x4065f250, sys_thread_t:0x41382f04, state:R) prio=1
"Idle thread" (TID:0x4065f298, sys_thread_t:0x41361f04, state:R) prio=0
"Clock" (TID:0x4065f088, sys_thread_t:0x41340f04, state:CW) prio=12
"main" (TID:0x4065f0b0, sys_thread_t:0x81acfe0, state:R) prio=5 *current thread*
java.lang.Runtime.loadLibrary(Runtime.java)
java.lang.System.loadLibrary(System.java)
java.net.InetAddress.(InetAddress.java)
sun.net.www.http.HttpClient.(HttpClient.java:201)
sun.net.www.http.HttpClient.(HttpClient.java:219)
sun.net.www.http.HttpClient.New(HttpClient.java:230)
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:326)

sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:407)
java.net.URL.openStream(URL.java)
urltest.main(urltest.java:7)
Monitor Cache Dump:
sun.net.www.protocol.http.HttpURLConnection@1080439664/1080800248: owner "main" 
(0x81acfe0, 1 entry)
java.lang.Runtime@1080439840/1080804208: owner "main" (0x81acfe0, 1 entry)
Registered Monitor Dump:
Thread queue lock: 
Name and type hash table lock: 
String intern lock: 
JNI pinning lock: 
JNI global reference lock: 
BinClass lock: 
Class loading lock: 
Java stack lock: 
Code rewrite lock: 
Heap lock: 
Has finalization queue lock: 
Finalize me queue lock: 
Monitor IO lock: 
Child death monitor: 
Event monitor: 
I/O monitor: 
Alarm monitor: 
Waiting to be notified:
"Clock" (0x41340f04)
Monitor registry: owner "main" (0x81acfe0, 1 entry)
Thread Alarm Q:



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

1998-09-29 Thread Uncle George

interesting, considering that 1.2 isn't out yet. U got a mole in the sun
organization?
gat
just ;)

Steve Byrne wrote:

> Right.  I've known projects that have done this and won big.  Creating objects
> is somewhat expensive because it's a synchronous operation, and synchronized
> operations are slow in the 1.1 VM (1.2 uses a completely different and clever
> trick to get the overhead of synchronization down into the noise).





Re: Huge initialized static data blocks & java.util.zip

1998-09-29 Thread Andrew Burgess

In mail.java-linux Thomas Okken <[EMAIL PROTECTED]> writes:

>I'm working on something that requires a static array of almost 400k.
>I figured that the best way to initialize this array would be to
>compress the data, add a static array with an initializer to put the
>compressed data there (gzip compresses it to about 22k, which seems
>reasonable), and then add a static {} block that uses java.util.zip
>to decompress this data.

>private static final byte myGzippedData =
>{
>31, -117, 8, 8, -3, -3, 14, 54, 0, 3, 97, 0, -19, 93, 11,
>-126, -37, -86, 14, -35, 42, 60, 46, -39, -1, 18, -34, 88, 31,
>// and so on and so on... 22426 bytes in all
>}

The jar file suggestions may be better for you but I wondered
if I could get binary data without lots of code being generated and 
came up with this:

public class bigarray {
private static final String myGzippedData = "\001\002\003\000\004\005";
public static void main(String[] args) {
  System.out.println("Len="+myGzippedData.length());
}
}

I didn't check for length restrictions on the String.
Andy
-- 
Andrew Burgess
[EMAIL PROTECTED]
Available for software contract work: www.scruz.net/~cichlid



Re: 1.1.7

1998-09-29 Thread Rob Nugent

It looks like the getResource() problems I was having with JPEGS in large
JAR files may have been resolved by 1.1.7 on NT at least, since some of my
code just sprang into life when I upgraded.

Rob

--


Rob Nugent
Development Manager
UniKix Technologies Europe
[EMAIL PROTECTED]
Tel: +44 (0) 1489 585503
Fax: +44 (0) 1489 881363




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

1998-09-29 Thread Paul Reavis

Steve Byrne wrote:
> 
> Vincent Trussart writes:
>  > One way to handle this problem would be to create an Object pool.
>  > There was an article on javaworld (www.javaworld.com) a few months
>  > back.  Basically, instead of creating new objects you request them from the
>  > pool.  When they are not needed anymore, you put them back in the pool.  This
>  >
>  > way the GC won't collect them.
>  > The pool must be able to "clean up" objects and so on...
> 
> Right.  I've known projects that have done this and won big.  Creating objects
> is somewhat expensive because it's a synchronous operation, and synchronized
> operations are slow in the 1.1 VM (1.2 uses a completely different and clever
> trick to get the overhead of synchronization down into the noise).

Another design pattern is the Flyweight (from the GOF "Design Patterns"
book on just about everyone's bookshelf these days) for large numbers of
objects; the example given is modeling individual character glyphs in a
word processor implementation. 

Both of these ideas really are avoiding the whole instantiation thing
entirely, which may not be what you were looking for - but in any OO
system, especially one with garbage collection, you have to consider the
overhead that each object has above and beyond the memory size of its
state. If you were to build a ton of objects, use them and drop them,
you'd be stressing the GC for sure.

Hotspot and 1.2 promise to help with the both ends of the problem -
we'll how that turns out.

-- 

Paul Reavis  [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.http://www.partnersoft.com



RE: Newbie question (libnet_g.so)

1998-09-29 Thread Ranjan Bagchi

Hi again .. it turns out that SuSE 5.3 has an RPM for jdk1.1.6 on one of 
its CD's (which works).  The difference appears to be that there's a line:

export LD_PRELOAD=/lib/libdl.so.1

Setting this makes the 1.1.6 which I downloaded work as well.  Thanks to 
everyone for the quick response.

-rj


On Tuesday, September 29, 1998 10:46 AM, Ranjan Bagchi 
[SMTP:[EMAIL PROTECTED]] wrote:
> Hi everyone,
>
> I'm trying to move some of our Java apps to run on linux boxes.  I 
downloaded jdk1.1.6 and installed it (untarred in /usr/local and set my 
path to find /usr/local/jdk1.1.6/bin).
>
> Well.. I was able to compile a hello world java app.  So I believe I'm 
correctly installed.  But any code hitting java.net causes a VM crash.  The 
output's attached to this message, but looking at the stack trace it looks 
like it's trying to load a library.
>
> When I try and run jdb, I get a file not found for libnet_g.so.  But it's 
there, in .../lib/i586/green_threads
>
> I'd appreciate any help, I'm running SuSE linux on an AMD 233 chip with a 
2.0.35 kernel.
>
> Thanks!
>
> -rj
>
>
>  << File: urltest.java >>  << File: urltest.crash.txt >> 



Experiences with jdk and lesstif?

1998-09-29 Thread Paul Reavis

I was just wondering what experiences people are having using the jdk
with dynamic lesstif. I recall there were problems awhile back, but
haven't heard much recently. I use Swing exclusively now, which should
put less stress on it. I'm just tired of the huge stomp java puts in my
memory, some of which I assume is static Motif.

-- 

Paul Reavis  [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.http://www.partnersoft.com



libXpm.so, where can i get it?

1998-09-29 Thread vipin agrawal

I'm running on slackware with kernel 2.0.3* and I downloaded the JDK 116 from 
blackdown.  when I try to run the java
or the javac program, I get an error that says that libXpm.so is not found.  I read 
somewhere else
where libXpm.a used to solve the problem.

Where can I get a copy of this file or what package does it come in?

vipin


begin:  vcard
fn: vipin agrawal
n:  agrawal;vipin
org:sun
adr:20380 stevens creek blvd #122;;;cupertino;california;95014;usa
email;internet: [EMAIL PROTECTED]
tel;work:   408-863-3146
tel;fax:408-343-1936
tel;home:   408-255-4181
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:2.1
end:vcard




Re: Modal JInternalFrame?

1998-09-29 Thread Jan-Henrik Haukeland

Jason Dillon <[EMAIL PROTECTED]> writes:

> Does anyone know how to get an JInternalFrame to be modal via
> JDesktopPane?  I have looked at the jdk docs, and there is a bit of
> babble about it in JOptionPane, but no matter what I try I can not
> get a JInternalFrame to become modal.

There's a difference between Dialog and Frame you know. A Dialog could
be set to modal, a Frame not. That said, in an InternalFrame context
it's possible to add InternalFrames to different layers, so that one
Frame will appear on top of another in a modal fashion. Have a look at
swing.JLayeredPane.

The Metalworks demo in the swing example dir. demonstrate this
effect. Check out MetalworksFrame.java with a careful eye to the
xxxLAYER members.

> I looked into showing the glass pane, then adding the frame to it,
> but that does not work very well either.

There is an excellent article at Swing-connection called
'Understanding Containers' - read it!

-- 
Jan-Henrik Haukeland



Re: lesstif - thread safe ?

1998-09-29 Thread Uncle George

i was just trying to see some of the probs in doing a "Native" port of the java 116 
jdk.
Its one thing to try to get ur task ( java ) done, without having to go to other 
software
packages to get it to go also ( like gdb, libdl.so, lesstiff ( a while back ), ld ) .
Since it seems possible ( as it is/has been DONE  by some other group ) to do, i though
i'd give it a shot ( again ).

I'm not sure if the blackdown porters are into this NATIVE thread port - they are a
little secretive on what they are currently doing. Maybe an open collaboration?

Anyway, if i get that far, my bigger problem would be to find a dual cpu alpha to try 
it
on, which would be the only way i know how to test the threading of the port. BUT that 
is
a while away from now.
gat


Danny Backx wrote:

> Even if we're aiming for 1.2, it should be possible to
> make LessTif threadsafe. The r6 Xt documentation describes
> what to do.
>
> >From memory (read this a couple of years ago), I think we
> need to add calls to ensure threadsafeness in a couple of
> standard places.
>
> The calls to place are XtAppLock and XtAppUnlock, see
> http://www.motifzone.com/resources/man/XtAppLock.html .
>
> Specific instructions seem to be in one of the O'Reilly
> books (see
> http://www.redhat.com/linux-info/gtk/gtk-list/1997-July/0173.html)
>
> Does anyone have it ? (I might, I'm not sure.)
>
> Uncle, how about giving it a try ?
>
>   Danny
>
> Jon Fo wrote:
> >
> > >
> > > some folks who ported the java 116/i386/linux have used native threads
> > > to do threading. In their website they suggested that lesstif is not
> > > thread safe - which i suppose means that coordination of Xm calls
> > > between the independent threads just doesn't exist.
> > >
> > > it that true?, and if so are there any though processies going on to
> > > "make it so".
> > > gat
> > >
> > As I recall, Motif 1.2 is not thread safe, so if the port is expecting Motif 1.2.x,
> > then I don't see this as an issue.  In fact, I believe the calls to Motif libraries
> > are (only) made from the AWT thread, so being thread-safe should not be an issue.
> > However, if you write native code that makes Motif calls, you're on your own.
> > I have a workaround that works in some situations.
> >
> > This is further corroborated by the fact that Java on Sun Solaris uses
> > Motif 1.2.x, which as I mentioned before, is probably not thread safe.
> >



Re: Huge initialized static data blocks & java.util.zip

1998-09-29 Thread Stephen Zander

> "Artur" == Artur Biesiadowski <[EMAIL PROTECTED]> writes:
Artur> You should load it from file - you can use
Artur> Class.getResourceAsStream or similar method. It works for
Artur> both applications and applets.

This is the coorrect approach for another reason.

Inflate != gzip | gunzip.

The gzip encoding system includes front-end header information about
the file being encoded.  Just using the output of 'gzip' with Inflate
results in an impedence mismatch.

Save the data in a file & include it in a jar.

-- 
Stephen
---
Perl is really designed more for the guys that will hack Perl at least
20 minutes a day for the rest of their career.  TCL/Python is more a
"20 minutes a week", and VB is probably in that "20 minutes a month"
group. :) -- Randal Schwartz



Re: Experiences with jdk and lesstif?

1998-09-29 Thread Juergen Kreileder

> Paul Reavis writes:

Paul> I was just wondering what experiences people are having
Paul> using the jdk with dynamic lesstif. I recall there were
Paul> problems awhile back, but haven't heard much recently. I use
Paul> Swing exclusively now, which should put less stress on
Paul> it. I'm just tired of the huge stomp java puts in my memory,
Paul> some of which I assume is static Motif.

One of the major problems with lesstif and JDK is changing the font
for widgets. Unfortunately I haven't been able to make a small C
example for this problem yet.
If you want to work with lesstif you should get lesstif-current, many
problems have been fixed recently.

I think you wont save much memory with lesstif unless you have 
several lesstif applications running at the same time.


Juergen

-- 
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802



Re: jdk 1.1.6

1998-09-29 Thread Uncle George

it really hasn't been about the versions of the 21x64x processors, but rather
of HTML space on my ISP. ( now its also about bandwidth @ 250 mb/month xfer ) .
It just takes me about 36 min to do a complete compile ( .c & .java ), less if
i just redo the .o's.
such is life for me at the moment
gat

Bill Roman wrote:

> Uncle George wrote:
> >
> > it was compiled with egcs 1.1a, and -mcpu=21164a
> >
> >
> > Wes Nakamura wrote:
> >
> > > I've got an XL300, so it should be a 21164 (what's the difference
> > > between the 21164 and 21164a anyway?).  Anyone get it running?
>
> As I posted to axp-list, "21164A" includes byte/word extensions.  I don't
> know for a fact, but it would be reasonable to expect this to speed up
> a byte-code interpreter.  These instructions are not supported in 21164
> (used in the XL 300) or any of the 21064 or 21066 variants (AS 200, UDB,
> Avanti, etc.).
>
> As yet another owner of an XL 300, I'll encourage you to also compile
> the JDK with -mcpu=21164.  This should not hurt the 21064 machines, and
> will allow many of us who have the older systems to run it, albeit slowly.





Re: getResourceAsStream on Class-Files

1998-09-29 Thread peter . pilgrim

> Paul Reavis wrote:
> > 
> > Juergen Kreileder wrote:
> > >
> > > > Bernd Wengenroth writes:
> > >
> > > > Hello, I want to load class-files with the
> > > > ClassLoader.getResourceAsStream( String )-methode.
> > > > i.e. xxx.getResourceAsStream( "package/myClass.class" );
> > >
> > > > It's works fine on files without a ".class"-postfix.  But files with
> > > > this prefix are not opened (the methode reports null).  If i copy
> > > > the same file to the same directory, but without the postfix, the
> > > > stream is returned as expected.
> > >
> > > > Any hints ?
> > >
> > > That's a security feature, you can't get classes with getResource.
> > 
> > And you should be able to get around it with a custom classloader (which
> > isn't as hard to implement as you might think).
> 
> *smile*, that exactly what i want.
> I want to speed up the start of plugin-applications with an own
> class-loader.
> I start with a very small preloader, that can display some more custom 
> "loading..."-Messages while the main part of the application is loaded
> from a huge jar-file.
> But i don't want to load ALL classes at startup. 
> Some classes should be loaded on demand from a server.
> I think i must do this with a direct file-access ;)
> 
> 
I think there a few examples in 
"Java Examples In A Nutshell"
By David Flanagan, O'Reilly 
www.ora.com


Cheers

Peter

--
import java.std.disclaimer.*;   // "Dontcha just love the API, baby bop!"
Peter Pilgrim  Dept:OTC Derivatives IT, 
Deutsche Bank (UK) Ltd, Groundfloor 133 Houndsditch, London, EC3A 7DX
Tel: +44-545-8000  Direct: +44 (0)171-545-9977  Fax: 0171-545-4313
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Re: FW: Versioning -- Linux JDK needs your HELP!

1998-09-29 Thread Steve Byrne

Nishikant Kapoor (H) writes:
 > Kapoor, Nishikant X wrote:
 > 
 > > > 1) Your system's libc version
 > > > 2) Your system's libdl version
 > > >
 > > >ldd /bin/i386/green_threads/java
 > > >
 > 
 > nkapoor:/home/nkapoor> ldd $JAVA_HOME/bin/i386/green_threads/java
 > libjava.so => not found
 > libm.so.5 => /lib/libm.so.5.0.9
 > libdl.so.1 => /lib/libdl.so.1.7.14
 > libawt.so => not found
 > libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4
 > libXt.so.6 => /usr/X11R6/lib/libXt.so.6
 > libICE.so.6 => /usr/X11R6/lib/libICE.so.6
 > libSM.so.6 => /usr/X11R6/lib/libSM.so.6
 > libXext.so.6 => /usr/X11R6/lib/libXext.so.6
 > libX11.so.6 => /usr/X11R6/lib/libX11.so.6
 > libc.so.5 => /lib/libc.so.5.4.45
 > libX11.so.6 => /usr/X11R6/lib/libX11.so.6.1
 > libSM.so.6 => /usr/X11R6/lib/libSM.so.6.0
 > libICE.so.6 => /usr/X11R6/lib/libICE.so.6.0
 > 
 > > 3) Whether you had to remove libc and libdl to make Java work for you
 > No.
 > 
 > Well, now that I see it, can anyone please tell me why do I have
 > libjava.so => not found
 > libawt.so => not found

This is easy:  Your system does not know about libjava and libawt, so ldd 
says it can't find them.  HOWEVER, when you run a java program (java, javac,
etc), the LD_LIBRARY_PATH environment variable (which tells libdl where to find
additional shared libraries), gets set to include the
/lib/i386/green_threads directory, where libjava.so and libawt.so live,
and then the bin/i386/green_threads/java program (the actual executable) gets
run, so it can resolve references to things in libjava and libawt just fine.

Steve



RE: Socket exceptions under 1.1.6v4

1998-09-29 Thread Steve Byrne

Jason Dillon writes:
 > Sorry for the ignorant question... but is 'the next version' avaible yet or is
 > it still being cooked up?

Finishing touches are being applied.  The responses to my version request have
died down, and I think have enough information to make the version checking
script work properly.  The other changes (sockets, jni, some window manager
specific fixes) are in, and we're just waiting on me to finish my version
checking script.

 > --jason
 > 
 > 
 > On 28-Sep-98 Steve Byrne wrote:
 > > Paul Reavis writes:
 > >  > My Voyager-based networking works under v2 but breaks under v4 with
 > >  > a
 > >  > 
 > >  > java.net.SocketException: Socket option unsupported
 > >  > 
 > >  > I'm just trying to connect with the Voyager server at a specified port;
 > >  > it never even makes the connection. Localhost or LAN doesn't seem to
 > >  > make a difference.
 > > 
 > > This is the socket stuff that got broken in v4.  It was a minor change that
 > > broke some of the socket changing operations.  We've put the code back the
 > > way
 > > it was and things should work fine again in the next version.
 > > 
 > > Steve
 > 



1.1.7

1998-09-29 Thread Steve Byrne

Ulrich Kortenkamp writes:
 > Hi,
 > 
 > today (or yesterday) the solaris and windows versions of the jdk 1.1.7 
 > were released. Is the porting team already porting this? 

We don't get access to the sources before a release.  In fact, if we started as
soon as the sources were released, it can be up to 7 days before Sun processes
the paperwork to get the 1.1.7 source code, and then we have to reapply our
patches to it.   It takes longer than it should, I'll grant you.  

Steve



Re: Return key is ignored in XmTextWidgetClass inside static Motif applications.

1998-09-29 Thread Juergen Kreileder

> "peter" == peter pilgrim <[EMAIL PROTECTED]> writes:

peter> Juergen Kreilender wrote:
>> > peter pilgrim writes:
>> 
>> > I have had an irritating long term low priority problem with
>> > applications built with a static Motif library. When application
>> > display a XmTextWidget, the [RETURN] does not work. Ie the default
>> > widget translation:
>> 
>> >~Alt ~Shift ~Ctrl Return newline()
>> 
>> > does not seem to work at all on my environment. The translation
>> > seems to be ignore. I tried setting the action to `activate()', I
>> > have __not__ been playing with the X keymap and the `~/.motifbind'
>> > file that I have around seems to be quite correct. I tried setting
>> > an override translation in my ~/.Xdefaults file and then asking
>> > `xrdb' to reload the file. No it did not work. This strange
>> > behaviour happens in the JDK and in Netscape.  It seems that the
>> > virtual motif bindings for ``osfActivate'' dont work for me. BTW: I
>> > am using `fvwm 2'
>> 
>> > My only solution is to use Ctrl-J a la GNU Emacs to get around.
>> 
>> > Does any one know the cure for this weird behaviour?
>> 
>> Did you try the LD_PRELOAD=libBrokenLocale.so trick?

Without this trick umlauts in text components don't work for me (glibc
motif applications only, e.g. JDK, netscape, ...).
We had several bug reports about entering text (not only umlauts) in text
components, for most people preloading libBrokenLocale.so solved the
problem.


Juergen

-- 
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802



Re: Return key is ignored in XmTextWidgetClass inside static Motif applications.

1998-09-29 Thread peter . pilgrim

Juergen Kreilender wrote:
> > peter pilgrim writes:
> 
> > I have had an irritating long term low priority problem with
> > applications built with a static Motif library. When application
> > display a XmTextWidget, the [RETURN] does not work. Ie the default
> > widget translation:
> 
> >~Alt ~Shift ~Ctrl Return newline()
> 
> > does not seem to work at all on my environment. The translation
> > seems to be ignore. I tried setting the action to `activate()', I
> > have __not__ been playing with the X keymap and the `~/.motifbind'
> > file that I have around seems to be quite correct. I tried setting
> > an override translation in my ~/.Xdefaults file and then asking
> > `xrdb' to reload the file. No it did not work. This strange
> > behaviour happens in the JDK and in Netscape.  It seems that the
> > virtual motif bindings for ``osfActivate'' dont work for me. BTW: I
> > am using `fvwm 2'
> 
> > My only solution is to use Ctrl-J a la GNU Emacs to get around.
> 
> > Does any one know the cure for this weird behaviour?
> 
> Did you try the LD_PRELOAD=libBrokenLocale.so trick?
> 
> 
> Juergen


(!)



Can you explain what has this got to do with Motif let alone JDK ?


Cheers

Peter

--
import java.std.disclaimer.*;   // "Dontcha just love the API, baby bop!"
Peter Pilgrim  Dept:OTC Derivatives IT, 
Deutsche Bank (UK) Ltd, Groundfloor 133 Houndsditch, London, EC3A 7DX
Tel: +44-545-8000  Direct: +44 (0)171-545-9977  Fax: 0171-545-4313
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Re: Experiences with jdk and lesstif?

1998-09-29 Thread Paul Reavis

Juergen Kreileder wrote:
> 
> > Paul Reavis writes:
> 
> Paul> I was just wondering what experiences people are having
> Paul> using the jdk with dynamic lesstif. I recall there were
> Paul> problems awhile back, but haven't heard much recently. I use
> Paul> Swing exclusively now, which should put less stress on
> Paul> it. I'm just tired of the huge stomp java puts in my memory,
> Paul> some of which I assume is static Motif.
> 
> One of the major problems with lesstif and JDK is changing the font
> for widgets. Unfortunately I haven't been able to make a small C
> example for this problem yet.

Would this apply to swing widgets, or just the native awt controls?

> I think you wont save much memory with lesstif unless you have
> several lesstif applications running at the same time.

That's the issue, actually. Especially during testing it's not unusual
for me to have a half-dozen Java apps open on one machine (distributed
system). Plus, I'm beginning to use some pure-java tools like
Together/J, so it'd be nice to have a shared library.

-- 

Paul Reavis  [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.http://www.partnersoft.com



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

1998-09-29 Thread Steve Byrne

Uncle George writes:
 > interesting, considering that 1.2 isn't out yet. U got a mole in the sun
 > organization?

I used to work there until December of 97.  I kept ensuring that 1.2 compiling
cleanly with gcc, so the port to Linux wouldn't be too bad.  Being on the
inside, you get presentations from time to time about things related to the VM,
and one of them talked about some of the improvements in 1.2.  I think, though,
the new synchronization mechanism is public knowledge, but I'm not certain.

Steve



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

1998-09-29 Thread Paul Reavis

Steve Byrne wrote:
> 
> Uncle George writes:
>  > interesting, considering that 1.2 isn't out yet. U got a mole in the sun
>  > organization?
> 
> I used to work there until December of 97.  I kept ensuring that 1.2 compiling
> cleanly with gcc, so the port to Linux wouldn't be too bad.  Being on the
> inside, you get presentations from time to time about things related to the VM,
> and one of them talked about some of the improvements in 1.2.  I think, though,
> the new synchronization mechanism is public knowledge, but I'm not certain.

I've heard about it from various quarters; it's in the big bag of
HotSpot/1.2 improvements, and there are several white papers and
articles scattered around about those. Uncle George, you might dig
around on developer.javasoft.com and javaworld if you want more info. Or
just keysearch on +java +hotspot and see what crawls up.

-- 

Paul Reavis  [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.http://www.partnersoft.com



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

1998-09-29 Thread dan

I do believe the synchronization improvements are already shipping with JDK1.2beta4,
which is available for Solaris and Win32.  At any rate, synchronization suddenly got
an order of magnitude faster from v1.1.6 to v1.2beta4.

-dan
[EMAIL PROTECTED]

Paul Reavis wrote:

> Steve Byrne wrote:
> >
> > Uncle George writes:
> >  > interesting, considering that 1.2 isn't out yet. U got a mole in the sun
> >  > organization?
> >
> > I used to work there until December of 97.  I kept ensuring that 1.2 compiling
> > cleanly with gcc, so the port to Linux wouldn't be too bad.  Being on the
> > inside, you get presentations from time to time about things related to the VM,
> > and one of them talked about some of the improvements in 1.2.  I think, though,
> > the new synchronization mechanism is public knowledge, but I'm not certain.
>
> I've heard about it from various quarters; it's in the big bag of
> HotSpot/1.2 improvements, and there are several white papers and
> articles scattered around about those. Uncle George, you might dig
> around on developer.javasoft.com and javaworld if you want more info. Or
> just keysearch on +java +hotspot and see what crawls up.
>
> --
>
> Paul Reavis  [EMAIL PROTECTED]
> Design Lead
> Partner Software, Inc.http://www.partnersoft.com



Re: libXpm.so, where can i get it?

1998-09-29 Thread Dustin Lang


Hi,

> I'm running on slackware with kernel 2.0.3* and I downloaded the JDK 116 from 
>blackdown.  when I try to run the java
> or the javac program, I get an error that says that libXpm.so is not found.  I read 
>somewhere else
> where libXpm.a used to solve the problem.
> Where can I get a copy of this file or what package does it come in?

It can be found in the slackware "x1" disk set, file "xpm.tgz".  You can
find it at your favourite slackware mirror site.

dstn.






RE: Experiences with jdk and lesstif?

1998-09-29 Thread Jason Dillon

I had lots of trouble with popup menus using lesstif.  I was never able to
resolve this issue, so I had to stop using it.  I run into similar problems
with netscape.  When you right-click, the menu pops up but does not return
control... ever (well after a kill it does).

--jason


On 29-Sep-98 Paul Reavis wrote:
> I was just wondering what experiences people are having using the jdk
> with dynamic lesstif. I recall there were problems awhile back, but
> haven't heard much recently. I use Swing exclusively now, which should
> put less stress on it. I'm just tired of the huge stomp java puts in my
> memory, some of which I assume is static Motif.
> 
> -- 
> 
> Paul Reavis  [EMAIL PROTECTED]
> Design Lead
> Partner Software, Inc.http://www.partnersoft.com



Re: Modal JInternalFrame?

1998-09-29 Thread Jason Dillon

> The Metalworks demo in the swing example dir. demonstrate this
> effect. Check out MetalworksFrame.java with a careful eye to the
> xxxLAYER members.

This is not really a modal internal frame... it just appears on top of others.
There is nothing to prevent users from mucking with other windows.

I will read the containers bit as you suggest... but I still don't know how to
make an internal become modal.

--jason



Re: Experiences with jdk and lesstif?

1998-09-29 Thread Juergen Kreileder

> Jason Dillon writes:

Jason> I had lots of trouble with popup menus using lesstif.  I
Jason> was never able to resolve this issue, so I had to stop
Jason> using it.  I run into similar problems with netscape.  When
Jason> you right-click, the menu pops up but does not return
Jason> control... ever (well after a kill it does).

The lesstif people fixed this a week ago.


Juergen



Trouble installing JDK 1.1.6

1998-09-29 Thread David Buddrige

Hi all,

I have recently downloaded JDK 1.1.6 from
ftp.progsoc.uts.edu.au/pub/Linux/java to run on my Redhat 5.1 system...
I've un-tar'ed it into /usr/local/jdk1.1.6, and then added the following
lines to my /etc/profile file

PATH="$PATH:/usr/X11R6/bin:/usr/local/jdk1.1.6/bin"
export JAVA_HOME="/usr/local/jdk1.1.6
export CLASSPATH="/usr/local/jdk1.1.6/lib/classes.zip"

I then wrote a very basic "hello world" program, and attempted to
compile it, using javac... however I get the message:

No library path set.

Can anyone tell me what I have done wrong?  I've been searching through
the archives here, and reading through the readme file, however I can't
see what I've missed...

Ta

David Buddrige.
[EMAIL PROTECTED]



service release to fix multicast socket bug

1998-09-29 Thread Simon Lok


Hello,

I am in need of an immediate fix for the multicast socket bug... when
do you think the next jdk revision will be out?  Do you think you can
release a patch or development JDK?  Would you recommend
that I regress (ugh...) to the older revisions of the Linux JDK?

Thanks.

-- SL

/*-*\
sss .  l k
   SSS I MMM OO NNN   L  OO Kk[EMAIL PROTECTED]
  sss I MmM OO N N   Ll OO Kk

"Plan? What plan? I'm making this up as I go along!"
  -Dr. Henry 'Indiana' Jones
-BEGIN PGP PUBLIC KEY BLOCK-
Version: 2.6.3i

mQCNAzXuuWQAAAEEAJzlWEsLBPRM86PrFQZBFZ5aKc1FYjkCCFZvxREeFe0gfsFY
HvzFpoESfGTDrhhsRs/lntFNlOMgIo5zJ3K70cLMCk0uvD47v/bq7gNqPiC2C+tc
8owNBhK8IW+gvuNfRQl2lNhMMnl2gvAW/SOvUDlws3F/gxbFLU+ZHtiIwJbZAAUR
tBlTaW1vbiBMb2sgPHNpbW9uQGxvay5uZXQ+iQCVAwUQNe65ZE+ZHtiIwJbZAQF6
2wP/bwfqVx4z589glX7fQVoDyzGDphKDIei1eeCYDAtZlTUFjeI9USYFAiRSiRJA
H/k4JY1TLG/+YT8WPsb8vVvSm1ERPRq1wOl6AsJkVBKN6KYPJJuF+7ojjcINfwo6
jXH76CYfdXYfQW8AD7xB4zvDB7Mnn2cmlmPdpxuDqbHpnMA=
=fC0Q
-END PGP PUBLIC KEY BLOCK-
\*-*/





Java for Alpha - Linux

1998-09-29 Thread Kim, Hyun




Hello!
 
I had read your document. But I have just alpha 
machine.
I think alpha machine is one of the popular machine in 
workstation market.
I can't seek JDK for Alpha -Linux.
I will develop java chatting system on my system, then I need 
JDK for Alpha-Linux.
If you know about it, please send information 
that.
 
Have a nice day!
Good bye