Re: Java Awt/Swing is fatally flawed

1998-10-11 Thread peter

You might be interested in what I tell about the Kaffe AWT (and some of its
future directions) on the Atlanta Linux Showcase.

I don't want to engage into a Swing discussion, mainly because I know (since
1996) from biss-awt what is is about to create a portable lightweight framework,
and I therefore have great respect for its developers. But I have two problems
with it: (1) they didn't clean up the basis AWT before they started to build
Swing upon it (deprecateds and all that stuff), (2) it is too big, too expensive
(which esp. shows up when you run it with a JIT, which always requires more
memory - somebody wondered about that a few days ago with respect to TYA).
Again, just my two cents, your milage may vary, and that's fine with me..

--
 Peter Mehlitz Tel: +1 510 704 1660 
 Transvirtual Technologies, Inc.,  Fax: +1 510 704 1893 
 http://www.transvirtual.com   Email:   [EMAIL PROTECTED]
 



Re: GTK+ AWT peer library for Java

1998-11-10 Thread peter

On Tue, 10 Nov 1998, Nigel Gamble wrote:
>I've started a project to implement Java AWT peers in GTK+ (instead
>of in Motif).  Besides breaking the dependency on Motif, I
>believe that this will make it simpler to integrate Java apps
>into the Gnome desktop project.  (See www.gtk.org and www.gnome.org).

Just so you know, I already showed a first version of a Gtk-AWT for kaffe on the
Linux showcase in Atlanta, which will be fully GPLed (probably by end of this
month). This is a complete JNI implementation (with its own, standalone Java
classes), i.e. it will be usable (with some modifications) even if you - for
some reason - don't want to use Kaffe. It isn't complete yet (we first have to
deal with some nasty swing things until we do this), but at least it is a good
starting point.

-- Peter

--
Peter Mehlitz Tel: +1 510 704 1660 
Transvirtual Technologies, Inc.,  Fax: +1 510 704 1893 
http://www.transvirtual.com   Email:   [EMAIL PROTECTED] 



Kaffe giving me error message

1998-05-21 Thread Peter Schuller

Hi!

In addition to JDK1.1.5v7, I wanted a fast JRE (for big stuff like HotJava),
so I downloaded Kaffe (because it's JIT ability) and installed. However, kaffe
always gives me:

java.lang.NoSuchMethodError: initializeSystemClass 

when I try to run a Java class.

Does anyone know what might be wrong?

Thanks!

---
/ Peter Schuller

"I am Gates of Microsoft. You will be assimilated. We will add your currency to
our own. Your computer will adapt to service us. Resistance is futile."

---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org


 PGP signature


Re: re: packages

1998-09-04 Thread peter . pilgrim

> 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.)

If you publish a library of  `packages' for other developers then it is a good
to use fully qualified names as a courtesy. Most of us want to avoid long
compilation times !!!

 



Cheers

Peter

--
Peter Pilgrim  Deutsche Bank (UK) Ltd


"When the seagulls follow the trawler, it is because they think
sardines will be thrown in to the sea."

Eric Cantona commenting on his feet-first attack on 
a Crystal "Ya going down" Palace supporter.



Loading images from JAR.

1998-09-07 Thread peter . pilgrim

What is the meaning of url.toExportedForm() from image contained in JAR 
called something like this?

systemresources://FILE1/+/images/new.gif

I had a lot of trouble reading image file (GIFs) from JARs.

I keep get a stack trace:
 

Have a FuNkiNG good time

Peter

--
import java.std.disclaimer.*;   // "Dontcha just love the API, baby bop!"

-+=+-  Thank FuNk it's FriDAY -+=+-

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: Loading images from JAR.

1998-09-07 Thread peter . pilgrim

I wrote:

> What is the meaning of url.toExportedForm() from image contained in JAR 
> called something like this?
> 
> systemresources://FILE1/+/images/new.gif
> 
> I had a lot of trouble reading image file (GIFs) from JARs.

I had a long look at the FAQ (www.afu.com) and applied the getResourceAsStream()
example there. 


This normally results in stack trace, which I forget to add in the last post:

java.lang.NullPointerException: 
at java.util.Hashtable.get(Hashtable.java)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:117)
at sun.awt.SunToolkit.getImage(SunToolkit.java:129)
at com.sun.java.swing.ImageIcon.(ImageIcon.java:64)
at com.sun.java.swing.ImageIcon.(ImageIcon.java:83)
at xenon.jsql.editor.JsqlEdit.(JsqlEdit.java:173)
at xenon.jsql.editor.JsqlEditList.createNewFrame(JsqlEditList.java:101)
at xenon.jsql.editor.Jsql.(Jsql.java:144)
at xenon.jsql.editor.Jsql.main(Jsql.java:592)


Here is some code:

/** retrieves the image (GIF/JPEG) data from URL.
 * implements performs URL.
 */
protected byte[] getImageData( String url_image )
{
byte[] imageBytes=null;
if (debug) System.out.println( "getImageData("+url_image+")" );

//
// First try reading the resource as a system file.
//
InputStream imageStream=null;// Reset this
try {
imageStream = new FileInputStream( url_image );
}
catch ( FileNotFoundException fe ) { ; }

if (imageStream == null) {
//
// Well that didn't work
// Second, Try to opening the resource as an URL specification.
//
try {
URL url = new URL( url_image );
// Try creating a socket which connects to the
// int port = (url.getPort() == -1) ? 80: url.getPort();
// Socket s = new Socket( url.getHost, port );
imageStream = url.openStream();
if (debug) System.out.println("*opening stream URL*");
}
catch (IOException ioe ) { ; }
}

if (imageStream == null)
//
// Well that also didn't work
//
// Third, Try to opening the resource as as CLASSPATH specification.
// e.g. It may be part of JAR or ZIP
imageStream = getClass().getClassLoader().getSystemResourceAsStream(url_image);
Image img = null;
try {
if (debug) 
System.out.println("imageStream:" + 
   ((imageStream==null) ?"NULL!!":"EXISTS") );
imageBytes = new byte[imageStream.available()];
imageStream.read(imageBytes);
}
catch (IOException ex) {
System.err.println( getClass().getName()+".getImageData: failed to load image 
from URL: " + url_image );
}

if (imageBytes != null)
System.out.println( "imageBytes.length =" + imageBytes.length );

return (imageBytes);
}


Solution?

BTW: linux-jdk1.1.6-libc5 .tar.gz   swing-1.1beta.zip 



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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Java3D working at all?!?

1998-05-27 Thread Peter Schuller

Hi!

I downloaded the Solaris version of Java3D, but the install script complains
about the file being corrupted. Has anyone at all got it workin on Linux?

I was thinking that the implementation might *really* be for Solaris only, and
that the script misstakeny thinks the file is corrupted when the problem is
actually something else.

Thanks!

---
/ Peter Schuller


 PGP signature


Re: Java3D working at all?!?

1998-05-27 Thread Peter Schuller

>> I downloaded the Solaris version of Java3D, but the install script complains
> 
> Doesn't Java3D require JDK 1.2 Beta3 and a Xserver with OpenGL extension?

JDK 1.2 yes. I didn't know about the Xserver extenstion though. Bummer... I knew
it needed OpenGL, but not that it needed to be supported by the X server.

As for the JDK 1.2 problem... Well, I've been able to run examples using
Netscape Communicator, so I figured it would at least work partially.

Argh... And I was so excited about finally finding an OO 3D lib :)

---
/ Peter Schuller

I am Billgatus of Borg. You will be assimilated. Resistance is fut -GENERAL
PROTECTION FAULT IN Borg.EXE-

---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org


 PGP signature


Re: JDK 1.1.5 for Linux

1998-05-27 Thread Peter Harris

 alpha For DEC Alpha
 commonDon't know (never looked)
 i386  PC version(this is the one you want)
 mklinux   For Apple Power PC
 sparclinuxFor Sun Sparcs


At 12:32 PM +1100 28/5/98, Umesh Harigopal wrote:
>I am trying to download JDK 1.1.5 v7 for Linux.
>But I see 5 different directories under .../pub/linux/JDK/JDK-1.1.5
>at almost all ftp sites :
>alpha
>common
>i386
>mklinux
>sparclinux
>
>I am running Linux on a 486 66Mhz DX-2 (please don't ask me to get a
>life,
>I love this computer). Would please tell me which one of these versions
>I am supposed
>to download.
>
>Appreciate your help.
>
>Umesh
>


Computers are not intelligent. They only think they are.





RE: What is the sizeof JDK-1.1.5.tar.gz ??

1998-06-07 Thread Peter Schuller

> I had received more than 75 megabytes!  Something was wrong, right?

Here's mine:

13790029 May  5 12:06 jdk1.1.5-v7-libc5.tar.gz

---
/ Peter Schuller

"Smith & Wesson - the original point'n'click interface!"

---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org


 PGP signature


Re: Getting TYA to compile

1998-06-14 Thread peter johnson

Dear Peter,
I had the same problem initially with tya 0.7.  I fixed it by including the /bin directory in my path.  If you look in the configure file, it's trying to
find the java executable by using the which command.  If the java executable isn't
in your path, you get the message you described. Don't even try to modify tya.h -
that way lies madness.

Hope this helps,
Peter Johnson [EMAIL PROTECTED]


Peter Schuller wrote:

> Hi!
>
> I'm having problem getting TYA to compile... I've done alot of programming but
> I still haven't learned to figure out those automatic configure stuff etc so
> I'm not sure how to fix it.
>
> Configure givs me this:
>
> checking java port... UNRECOGNIZED
> Uknown version of java. Try to config manually by
>
> I've played with the manual settings to no avail. I'm using Steve Byrne's
> 1.1.5v7.
>
> When compiling the header files aren't found, probably because configure by
> some reason identifies Netscape VM as the JDK (?!?!?).
>
> BUT! It does include netscape's headers, here's the comandline :
>
> gcc -Wall -pipe -shared -O6 -m486 -malign-loops=4 -malign-functions=4
> -malign-jumps=4-I/usr/local2/netscape/../include
> -I/usr/local2/netscape/../include/genunix -o libtya.so tya.c tyarecode.c
> tyaruntime.c tyaasm.S
>
> Noteice the "../".
>
> But as I said, I haven't figured all these autoconfig stuff out yet, so I don't
> know where to edit Makefile templates and stuff to replace is with the real path
> to the JDK.
>
> Anyone?
>
> I'm using TYA 06. I know 07 is out and I'll download it ASAP. But this problem
> will most likely persist.
>
> Thanks!
>
> / Peter Schuller
>
> ---
> WWW: hem.passagen.se/petersch/ (might change)
> ---
> PGP public key: Available at hkp://pgpkeys.mit.edu
> PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
> ---
> Linux - The Choice of a GNU Generation
> Be Microsoft FREE!!! Check out www.linux.org






Re: Newbie re:deprecated API ?

1998-06-14 Thread peter johnson

Dear Glenn,
Deprecated APIs, components, etc. are those that have been changed or
dropped in the current Java implementation and will not be supported at
all in the next major revision.  You can go ahead and use them, but be
aware they won't work with some other people's JVM, browser, etc. as
THEY upgrade.
Peter Johnson [EMAIL PROTECTED]

Glenn Valenta wrote:

> When I compile application(not applets) examples out of most of my
> books, (Java-how to program) I get the error ...
>
> "Addition.java uses a deprecated API.
> Recompile with "-deprecation" for details."
>
> And when I recompile with "-deprecation", I get this message...
>
> Addition.java:21: Note: The method boolean action(java.awt.Event,
> java.lang.Object) in class java.awt.Component has been deprecated,
> and class Addition (which is not deprecated) overrides it.
>   public boolean action(Event e,Object o)
>  ^
> Note: Addition.java uses a deprecated API.  Please consult the
> documentation for a better alternative.
>
> What does it mean and where in the documentation?
>
> Source and example are at.
>
> http://ouray.cudenver.edu/~gavalent/java/test2/Addition.html
>
> TIA!
>
> --
> Glenn Valenta  Engineering http://www.coloradostudios.com
> [EMAIL PROTECTED]   http://ouray.cudenver.edu/~gavalent/
> [EMAIL PROTECTED]  <-main mail account






RE: Tutorial

1998-06-15 Thread Peter Schuller

> Where can i find a good and easy t understand tutorial for java except
> that in http://java.sun.com??

Here's one:

http://sunsite.unc.edu/javafaq/javatutorial.html

/ Peter Schuller


---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org




Re: A short one

1998-06-18 Thread peter johnson



Ville Laakso wrote:

> How can I make something happen, say, every 5 seconds?
>
> -Ville Laakso
>  [EMAIL PROTECTED]

At least two ways:

Either call Thread.sleep (5000) or, if you have other things to do,

GregorianCalendar timeout=null, timenow=null ;
timeout = new GregorianCalendar () ;
timeout.add (GregorianCalendar.SECOND, 5) ;
while (true) {
  timenow = new GregorianCalendar () ;
  if (timenow.after (timeout)) {
... do whatever ...
timeout = new GregorianCalendar () ;
timeout.add (GregorianCalendar.SECOND, 5) ;
  }
... do other stuff ...
}

Peter
[EMAIL PROTECTED]






RE: Survey, what tool do you use?

1998-06-18 Thread Peter Schuller

>   What development tool do you use to help on daily coding?
> IDE, simple class browser, or just an editor.

I use XEmacs for all my coding - it's great. The only thing I want now is
something that'll save me from managing makefile (I'm working on such an app
myself). Alternatively, I might, and that's a big MIGHT, get a commercial IDE,
if there is one that runs on Linux, and that I find worth paying for.

/ Peter Schuller

"You can do better with a kind word and a shotgun than with a kind word
alone..." (reputedly said by Al Capone!)

---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org




Re: Trouble in installing jdk in linux machine

1998-06-26 Thread peter johnson



Ulrich Kortenkamp wrote:

> Giju> I tried to install jdk1.1.6 in my linux machine but it was
> Giju> giving some errors which is reported here: I am usning red
> Giju> hat linux.  Please look into the matter.
>
> This seems to me to be related to the shell problem several people
> encountered by now. Try to use a tcsh instead of bash (or vice versa,
> I just don't remember). The scripts do not work correctly with the
> wrong shell.
>
> This should be made an FAQ, or better (Steve!) the .java_wrapper
> script should be corrected. I believe it might be connected to the
> space between #! and /bin/sh, which seems to confuse some
> shells. (just guessing).
>
> Ulli

bash has no problem with this script on my systems.Peter Johnson
[EMAIL PROTECTED]





Re: Slackware & jdk116v2

1998-07-10 Thread peter johnson



Casiraghi Luigi wrote:

> I received a SIGSEGV   11*  segmentation violation.
>
> Here is my configuration:
>
> Linux Slackware 3.0 (kernel 2.0.0)
> jdk1.1.6v2
> libc5 (I upgraded to libc to libc5.4.44 and also ld as recommended)
>
> ldconfig -D output
>
> ldconfig: version 1.9.9
> libdl.so.1 => libdl.so.1.9.9
> ld-linux.so.1 => ld-linux.so.1.9.9

There have been other complaints about these versions; I think you need to
downgrade to 1.9.5 or so.

> ldconfig: warning: /usr/lib/libmenu.so.1.9.9e has inconsistent soname
> (libmenu.so.3.0)
> ldconfig: warning: /usr/lib/libpanel.so.1.9.9e has inconsistent soname
> (libpanel.so.3.0)
> ldconfig: warning: /usr/lib/libform.so.1.9.9e has inconsistent soname
> (libform.so.3.0)
> ldconfig: warning: /lib/libncurses.so.1.9.9e has inconsistent soname
> (libncurses.so.3.0)
>

I've never seen this before, but it looks like you're missing a library or two.

Hope this helps.

Peter Johnson
[EMAIL PROTECTED]




Re: Trying to use LessTif with jdk1.1.6-v2

1998-07-10 Thread Peter Ziobrzynski

Roland Parviainen wrote:
> 
> On Thu, 9 Jul 1998, B. Craig Taverner wrote:
> 
> > > You have to rebuild JDK with LessTif. Attempts to run JDK binaries linked with
> > > Motif against LessTif result in cores. I tried it myself.
> >
> > Is it not possible for blackdown to distribute a lesstif version of the
> > jdk?  I for one would be interested to try it out, particularly for the
> > dynamic library and possible reduced memory usage.
> >
> > Cheers, Craig
> >
> 
> I have used the blackdown jdk port (jdk1.1.5 to jdk1.1.6v2, glibc) with
> lesstif for a couple of months without problems, and I haven't rebuilt the
> jdk binaries... I just set the DYN_JAVA variable and it worked. (And it
> also made the swedish characters (åäö) work in ICQ for java.)
> 
> //Roland Parviainen


Interesting. Do you remember which version of lesstif-current you used? My tests
are based on 1.18 with last change in ChanageLog done on 1998/03/24 23:00:45.

cheers - Peter
-- 
Peter Ziobrzynski, http://www.pzi.net <[EMAIL PROTECTED]>



Re: Emacs and java...

1998-07-21 Thread Peter Eddy

Yes, emacs, xemacs, and vi are all available for NT (I use emacs at work
on NT) however the xemacs port is still not very stable.  The JDE should
work unless you have emacs 2.04 (or whatever is the current beta release
of emacs.)  So get the previous 19.x one.

Also, if you're interested in other Unix tools under NT, you can get the
tcsh and bash shells as well as a lot of Unix utilities such as ls, cp,
find, grep, xargs, from Cygnus.  Sorry, I don't have the links for most
of these things at home, but I'm sure someone on this list has them.

Liam Magee wrote:
> 
> Are these tools available for NT?
> 
> Liam.
> 
> > -Original Message-
> > From: Zhichao Hong [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 22 July 1998 5:32
> > To: Dustin Lang
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Emacs and java...
> >
> >
> > Hi Dustin:
> >
> > It is really terrible to develop something in a pico.  You should try vi
> > or emacs.  Both are very powerful editor tools.  Here is a page about JDE,
> > it is for emacs.  Just following the instruction to install.  It is a
> > great tool and much better than Visual J++ and Visual Cafe.  Take a look
> > at: http://sunsite.auc.dk/jde/
> >



Re: Emacs and java...

1998-07-26 Thread Peter Eddy

Liam Magee wrote:

I don't know about either of the two editors mentioned, but I've been
using emacs and xemacs for quite a while and I don't see any reason to
switch, excepting of course, that emacs editors seem to be carpel-tunnel
inducing.  

peter

> 
> Hardly on topic but - based on the recommendation below, I've been
> evaluating slickedit and Codewright. Has anyone compared these two, and if
> this is not the place to discuss code editors, does anyone know of any
> mailing list which does?
> 
> Liam Magee.
> 
> >
> > Personally I avoid emacs when ever possible having used vi for years (ok,
> > decades). But - I recently came across a REAL programmers editor called
> > slickedit while looking for a Java code beautifier - see
> > www.slickedit.com
> >
> > This really made me sit up - it support emacs and vi (not to
> > mention that old
> > dos favourite brief) editing modes - including regular expressions. Good
> > support for Java/C/C++/et al, and includes a great code beautifier. Even
> > supported on Weird operating systems begining with W, but smile
> > :), it also
> > runs under X.
> >
> > "Linux - I can't believe it's not Microsoft"
> > Jerry T[EMAIL PROTECTED]
> >



Re: Emacs and java...

1998-07-27 Thread Peter Eddy

Steve Cohen wrote:
> 
> I have been using SlickEdit (and its successor Visual Slick Edit) on DOS and
> Windows platforms for almost 10 years.  I swear by them.  You can configure it to
> just about any keystroke configuration you wish - vi, emacs, cua, your own
> hybrid.  Plus you get a lot of bells and whistles in it besides the editor itself
> - code beautification, multifile search and replace with regular expressions,

I don't want to start yet another editor war, but I would like to say
that emacs/xemacs can easily do all these things you mention and quite a
bit more.  Emacs is the ultimate configurable editor, however the
configuration language is LISP, which is actually not hard to use after
a short learning curve.

One thing that I use quite often is emacs ability to open files on other
machines.  For example, if I want to edit a file on my work machine I'd
specify a file name like this: [EMAIL PROTECTED]:~/file.java. I've never
seen this feature in any other editor.



RE: JDK 1.1.5 does not work under XFree86 3.3.1

1998-08-01 Thread Peter Schuller

> The jdk1.1.5  JVM does work with the helloworld file. It is just that
> when I want to run a AWT or Swing example nothing happens at all!
> 
> Please tell me what am I doing wrong ?

Would the JDK 1.1.5 you mentioned happen to be 1.1.5v6? I've had problems with
that one myself. Whenever I ran AWT apps (which includes Swing), nothing would
happen, or on rare occasions the thing would start, but crash in the next 10
seconds as soon as I did something to the GUI...

In any case, I didn't have the same problem with 1.1.5v7. But why not get the
latest? 1.1.6v2.

/ Peter Schuller



jdk1.1.6 & libc.5.4.46 & XFree86 3.3.1 not working in X

1998-08-04 Thread peter . pilgrim


To [EMAIL PROTECTED]

I downloaded the jdk1.1.6v2 for libc5
but I cannot get AWT stuff to work.

I understood you one had to compile XFree86 3.3.1 with thread support
So I did this last week. Still does not work for me when I tried
the demo/GraphicsTest/example1.html with the appletviewer.

Any ideas ?

I ran Steve's collection script and put the results in java-debug.log.gz
(expands to 180k!)


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-8293  Fax: 0171-545-4313
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 java-debug.log.gz


RE: Help!

1998-08-08 Thread Peter Schuller

> This days, I was installing Red Hat 5.0 and jdk1.1.5v7. Java don´t
> work.  Before, I had Slackware  2.0.30, and no problems with java. 
> What can I do?

Could you be more specific? What exactly isn't working?

Did your old Slackware system use libc5 perhaps? RH 5.0 uses glibc. So you
might have to download the JDK again - but this time the glibc version.

To find out which JDK you're using (the one linked against libc or glibc), just
check the filename of the archive you downloaded. If you see "libc" somewhere,
it's the libc version and you need to download the glibc version. If you see
"glibc" somewhere, then libc/glibc incompatibility isn't the source of the
problem.

/ Peter Schuller



Re: write() bug under 2.1.x kernels...

1998-08-08 Thread peter johnson



Arup Mukherjee wrote:

> Hi,
>
> under the 2.1.x kernels, large write()'s to a socket  never come
> back if they block, unless I/O occurs on another socket. I've seen
> this with 1.1.3 thru 1.1.6v2, with both the Steve Byrne and the Sergei
> Nikitin ports under at least 2.1.65 and 2.1.114. The problem is VERY
> reproducible and does not occur under the 2.0.x kernels.
>

This may not be related, but I am also experiencing extremely odd behavior with
sockets running Java v1.1.6v2 JRE, kernel 2.0.30, AMD 586 (? runs more like a
386 - stay far away from this chip), libc 5.4.44.  I have built a client-server
system for multiplayer games and what happens is mainly that neither select(),
read() nor write() to a socket can reliably tell whether the other system is
even present or not.  The Ethernet chip is a PCI version of NE2000.  I can't
tell whether this is a driver problem, a Java problem (the infamous green
threads) or what.  When I run client and server on the same machine, the sockets
work correctly; i.e.: when a client exits, the server immediately gets a broken
pipe on write() and eof on read; same for client if the server exits.

Thanks in advance for any help,
Peter Johnson
[EMAIL PROTECTED]




Re: sending image

1998-08-11 Thread peter johnson

Dear Stefano,
Use PixelGrabber to get an array of bytes (for IndexColorModel) or integers
(standard RGB); send the array, and use MemoryImageSource to re-assemble on
the other end.  Image is not a serializable class - I can't imagine why.
If you must use object streams, wrap the pixels and red, green, blue, alpha
in a class of your own that is declared serializable.  Another way to do it
is to paint the image on a Canvas (or other component) and serialize that,
since all components are serializable.

Hope this helps,
Peter Johnson
[EMAIL PROTECTED]


Stefano Fratini wrote:

> Hallo,
> I'm writing a Java server application which sends (via socket) an image
> to an applet.
> I'm trying to use
> ObjectOutputStream out = new
> ObjectOutputStream(socket.getOutputStream());
> Image img = Toolkit.getDefaultToolkit().getImage("...");
> out.writeObject(img);
> in server side and
> ObjectInputStream in = new
> ObjectInputStream(socket.getInputStream());
> Image img = (Image)in.readObject();
> in client side.
>
> When programs run on my computer (linux RH5.0, jdk1.1.5)
> they give me this error sending image:
> java.io.WriteAbortedException: Writing aborted by exception;
> java.io.NotSerializableException: sun.awt.windows.WImage
>
> What is wrong?
> Does anyone know if there is a  better way  to send image via socket?
>
> Thanks,
>
> stf





Re: Problem playing audio file from an application.

1998-08-26 Thread peter . pilgrim

> Hello,
> 
> I'am trying to play a simple audio(.au) file from an application. When I run my
> application I only hear the beginning of the audio file. Here is the program.
> 
> import sun.audio.*;
> import java.io.*;
> 
> public class Sound {
> 
>   public void play(String soundfile){
> File theFile = null;
>   AudioData theData = null;
> AudioStream as = null;
> try {
>   theFile = new File(soundfile);
>   if (theFile != null) {
> InputStream fis = new FileInputStream(theFile);
> as = new AudioStream(fis);
> theData = as.getData();
>   }
> }
> catch (IOException e) {
>   System.err.println(e);
> }
> AudioDataStream ads = new AudioDataStream(theData);
> AudioPlayer.player.start(ads);
> //try{ Thread.sleep(1500); }
> //catch(Exception e){ System.out.println("sleep failed"); }
> // AudioPlayer.player.stop(as);
>   }
> 
>   public static void main(String[] args) {
> Sound snd=new Sound();
> snd.play("sound.au");  
>   }
> }
> 
> When I unmark the sleep, I hear the whole audio file. But that is offcourse not
> the correct solution.
> 
> I tested the application on different platforms and using severel jdk's with 
> the same results. Playing the audio file with an audio tool works fine.
> 
> Somebody a clue?

Why do call AudioPlayer.stop() ?

AudioPlayer.start() - implicitly spawns a thread to send the audio data to
the audio device via a stream buffer.

Calling AudioPlayer.stop() - terminates the thread, n'est pas ?

Unless your program exits soon after AudioPlayer.start() you
do not need to sleep for X milliseconds.




Cheers

Peter

--
Peter Pilgrim  Deutsche Bank (UK) Ltd

"I'd be an eagle because I love its way of flying and if I were an
angel I'd simply be Eric Cantona with big wings. If I were a sport I'd
be football, of course, and if I were a film I'd be Raging Bull. If I
were any child I would be my children but if I were Eric Cantona I'd
be proud."
On himself

Vive Manchester United Football Club



RE: Netbeans?

1998-08-29 Thread Peter Schuller

> Hi,
> Has anybody tried to use netbeans in linux?

Yep.

> It is a promising IDE, but with a slight problem : It hangs when you try
> to create a new class (for eg).

And randomly when editing code - at least it here it does.

Anyway, let me guess, you enter the class name and press enter, right? If so,
don't press enter, use the mouse and click OK. That fixed the same problem for
me - at least under Beta 1.

> I wouldn't like to admit it, but it runs normally under nt (...)

:( That means the "problem" won't be fixed, not by Netbeans anyway. I guess
the chances of me buying it are rather slim then...

/ Peter Schuller


 PGP signature


Re: problems with finalize()

1998-08-29 Thread peter johnson



[EMAIL PROTECTED] wrote:

> [EMAIL PROTECTED] wrote ([EMAIL PROTECTED])
> > Hello,
> >
> > I have a problem with jdk1.1.6v3a/glibc2. The problem is with
> > the finalize() methods which does not get invoked in my code.
> > Jdk1.1.5v7/glibc2 works fine (ie. the finalize() method is called).
> > Anyone got any idea why?
> > (I tried to create a small example which shows the problem
> > but finalize() get's called for the small example:(
>
> Some additional information might be in order..
> I force the finalizers to be run using System.runFinalizersOnExit(true)
> so I expect that, even though finalization might not run immediately,
> it should run when the VM exits..
>
> Marcel
> --
> "Yields falsehood when preceded by its quotation"
> yields falsehood when preceded by its quotation

Try running System.gc() after all references to the object are null.  This
should force the finalizer to run.
hopr this helps
Peter Johnson
[EMAIL PROTECTED]



Re: Netbeans?

1998-08-30 Thread Peter Schuller

>> :( That means the "problem" won't be fixed, not by Netbeans anyway. I guess
>> the chances of me buying it are rather slim then...
> 
> Then I should leave my hopes for a serious IDE in freebuilder (it is also
> unstable, but it is not called beta2, but release 0.70)

It may not have "beta" in the name, but AFAIK, FreeBuilder is still considered
to be at a very early stage (I may be wrong though). Personally, I don't use it
mainly because the editor is no where near my requirements yet, and I haven't
gotten it to compile anything.

But I think it looks very promesing, and hopefully, in time, it'll be my IDE of
choice.

/ Peter Schuller


 PGP signature


Re: [ANNOUNCE]: JDK-1.1.6v4a

1998-09-07 Thread Peter Ziobrzynski

Many thanks for this release!

I have some problems with understanding the diffs strategy this time. I have not
found any information on this in the release notes (README-1.1.6v4a.html).
So far the patches where cumulative. Now '.in.jdk1.1.6-v4a.diffs.gz.' (note the
strange dots around the name) are 8Kb and the previous jdk1.1.6.v2.diffs for v2
where 120Kb.
I take the patches are no longer cumulative but incremental. Can you confirm or
deny?

- Peter

Karl Asha wrote:
> 
> NOTE: The JDK may take a few hours to appear on the mirror sites. Please
>   be patient.
> 
> Announcing: Java Development Kit 1.1.6 Version 4a for Linux
> ---
> 
> Your Blackdown Linux JDK porting team is pleased to announce
> its Version 4a port of Sun's Java Development Kit 1.1.6 for
> Linux x86.
> 
> New in this Release
> ---
> * This is our v4a port of Sun's JDK 1.1.6 final.
> - fix for removes from choice list (a Sun bug)
> - new fix for set frames non-resizable
> - fix for mwm based window manager frame positioning
> - fix for disappearing frames problem (a Sun bug)
> - fix for open sockets causing poor GUI performance
> - fix for kernel accept() bug, which caused slow Java Web Server
>  - turn-off by: export JDK_NO_KERNEL_FIX=true
> - improvements in Russian font properties
> - fix for CET to be Central European Time
> - fix for Button 1 modifier values
> and many many more fixes since Version 2
> 
> You can find a download site via http://www.blackdown.org/java-linux.html
> "Download the JDK for Linux" link.
> 
> **Other Notes**
> 
> - Most, if not all, troubles with the JDK seg-faulting or
> aborting on Linux x86 are really the result of old/incompatible
> sets of shared libraries being used.   If you run into these
> troubles, please check out the FAQ available from:
> http://www.blackdown.org/java-linux.html
> 
> - The libc5 version of jdk116_v4a was built on a Debian 1.3.1
> machine running Motif 2.0.1 with gcc-2.8.1, and the glibc
> version was built on a RedHat 5.0 machine running SWiM
> Motif 2.1 with egcs-2.91.41.
> 
> - Some problems with Motif and TextFields can be worked around
> by pre-Loading libBrokenlocale.so before invoking java.  See
> the Blackdown Java-Linux Mailing list archive for more info
> 
> - Please check out the README.linux release notes.  For help,
> see the FAQ and the Java-Linux mailing list:
> mailto:[EMAIL PROTECTED]
> 
> - Please report all bugs to the Jitterbug Java-Linux Bug
> Database at: http://www.blackdown.org/java-linux.html
> 
> Thanks especially go to:
> 
>  Steve Byrne, Karl Asha, Stephen Wynne, Juergen Kreileder,
>  Johan Vos, Michael Sinz, Scott Hutinger, and Kevin Hendricks
> 
> Have Fun!
> Java-Linux Porting Team

-- 
Peter Ziobrzynski, http://www.pzi.net <[EMAIL PROTECTED]>
work: +1 650 336-7454, work fax: +1 650 336-0635 home: +1 925 552-7128



JToolbar dockable frame title

1998-09-18 Thread peter . pilgrim

This was a good question posted to me. I do not know the answer.

How do you set the title for a dockable JToolbar frame?
By default I see it has ``AWTApp''.



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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Return key is ignored in XmTextWidgetClass inside static Motif applications.

1998-09-21 Thread peter . pilgrim


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?

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: Java interface to MySQL

1998-09-22 Thread peter . pilgrim

[EMAIL PROTECTED] wrote:
> Corey Shelton wrote:
> > I was told that there's a JAVA web interface for MySQL that works much
> > better than the one currently in Perl.  Could someone point me in the right
> > direction?
> 
> Here's my setup (from a post in comp.databases):
> 
> 
> plus Java support (these aren't RPM's)
> ftp://ftp.tux.org/pub/java/JDK-1.1.6/i386/glibc/v4a/jdk1.1.6v4a-i386-glibc.tar.gz
> http://www.worldserver.com/~mmatthew/mysql/dist/mm.mysql.jdbc-1.1.zip
> 

You can also try Terrence W. Zeller's JDBC driver for MySql
Probably at `http://www.tcx.se/' under contributed software.

I dunno which JDBC is best, though



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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Java Makefile [ was Delete all class files ]

1998-09-22 Thread peter . pilgrim

> Keith T. Garner wrote:
> > >
> > > On Mon, Sep 14, 1998 at 07:17:17, David Warnock said:
> > > > I thought I should be able to connect "find . -name *.class" to
> > "rm"
> > > > somehow using redirection or pipes but cannot get it to work.
> > >
> > > You were very close to one possible solution :)
> > >
> > > find . -name *.class | xargs rm
> > >
> 
> Paul Revis wrote:
> > All of which is more complicated than my favorite method, which is to
> > specify a separate .class file directory with the "-d" option (javac
> > or
> > jikes); then it's just
> > 
> > rm -r classes\*
> 
> I have a problem with this approach and using make, (probably because
> I'm not using make correctly), in that if I use the -d option and use a
> separate .class directory tree, make doesn't recognize the up-to-date
> files there and recompiles everything anyway. I can never get the
> "Nothing to be done for `CLASSES'" message when my Makefile looks like
> 
> 
> CP = $(ROOT):$$CLASSPATH
> COMPILER = jikes
> VM = java
> COPTIONS = -g -deprecation -depend -d $(ROOT)/classes
> ROPTIONS = -Daxiomroot=$(ROOT)
> 
> [a listing of java files here]
> 
> %.class: %.java
> cd $(@D); $(COMPILER) $(COPTIONS) -classpath $(CP) $( 
> run: $(CLASSES)
> $(VM) $(ROPTIONS) -classpath $(CP) axiomsl.PMRunner
> 
> 
> 
> Any ideas?
> -A.

Worst still with packaged java source files. However the following
extracts works fo Xsql and me.

# Makefile

PROGRAMS = test

JCLSS1 = \
   xenon/util/ApplicationResources.class  \
   test.class

JSRCS1 = \
   xenon/util/ApplicationResources.java \
   test.java


# Set up Java compiler and flags
JAVAC = javac
JAVAC_FLAGS = -deprecation -g

# Add the suffixes
.SUFFIXES: .class .java


#
# Rule to compile `java' files
#
.java.class:
$(JAVAC) $(JAVAC_FLAGS) $<

all:: $(PROGRAMS)
 
# This should rebuild all java classes from source
test:: $(JCLSS1)

# Run a shell program to generate launcher script
test::
  make-javaruntime-stub  test

...


The command `make all' or `make test' should now work for you.




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: Delete all class files

1998-09-23 Thread peter . pilgrim

> Thanks to everyone who wrote back! FWIW, the simplest solution for my
> purposes turned out to be the addition of the following line:
>  
> Markus Fritz wrote:
> > 
> > Just use
> > 
> > vpath %.class $(ROOT)/classes
> > 
> > in your makefile
> 
> 
> Cheers,
> -Armen
> 

Please, Just out of interest, what does ``vpath'' do ?

> 
> > 
> > Armen Yampolsky wrote:
> > >
> > > I have a problem with this approach and using make, (probably because
> > > I'm not using make correctly), in that if I use the -d option and use a
> > > separate .class directory tree, make doesn't recognize the up-to-date
> > > files there and recompiles everything anyway. I can never get the
> > > "Nothing to be done for `CLASSES'" message when my Makefile looks like

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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Can Java Catch Signals ?

1998-09-25 Thread peter . pilgrim

Can Java catch signals ?

Could the Java Native Interface be used to help Java catch signals ?

* prelim design in my head *
I have a huge script that run configurable batch jobs sequently over several hours.
I would like to rewrite the damn thing in Java, so that I could write module
to display dynamic status on the web via a browser. The only problem is that
java does not handle system interrupts or external stimuli well enough.

It does not have to be 100% Java. It will have to work on Solaris 2.5+ boxes though
Any ideas appreciated.


Have a FuNkiNG good time

Peter

--
import java.std.disclaimer.*;   // "Dontcha just love the API, baby bop!"

-+=+-  Thank FuNk it's FriDAY -+=+-

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: AudioPlayer

1998-09-25 Thread peter . pilgrim

> Hi All,
> 
> Has anyone come across a way of detecting when an AudioPlayer has
> finished playing it's input stream ? I could subclass the input stream
> to detect this, but there might me a more elegant solution.
> 
> Thanks
> 
> 
> Jerry T

Well you know that AudioPlayer plays onlu sun audio files at 8000Hz.
You can find out the length of the audio clip by getting the size of the file or
from the side of the AudioData's buffer.

Therefore you can predict the time that a sample will finish playing.


Have a FuNkiNG good time

Peter

--
import java.std.disclaimer.*;   // "Dontcha just love the API, baby bop!"

-+=+-  Thank FuNk it's FriDAY -+=+-

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[2]: Can Java Catch Signals ?

1998-09-28 Thread peter . pilgrim

[EMAIL PROTECTED] wrote:
> yes, u can do that, but the underlying native I/O already uses SIGNALS to catch 
>SIGIO,
> SIGALRM which is used to impliment the green_threads/context switching of java (fake)
> threads. So be carefull what sigs u catch, or turn off.
> 
> 

How would I do that though ?

What I would like is just a very simple SignalCatcher for SIGTERM, SIGQUIT, SIGHUP
and SIGINT: just four signals. I want to catach them in Java, and write the capture
to a systems log. So that at least overnight personnel would know how my java batcher
died .

Would I just write a JNI method to register these 4 signals ?
And then perhaps another one to catch the signals ?


> [EMAIL PROTECTED] wrote:
> 
> > Can Java catch signals ?
> >
> > Could the Java Native Interface be used to help Java catch signals ?
> >
> > * prelim design in my head *
> > I have a huge script that run configurable batch jobs sequently over several hours.
> > I would like to rewrite the damn thing in Java, so that I could write module
> > to display dynamic status on the web via a browser. The only problem is that
> > java does not handle system interrupts or external stimuli well enough.
> 



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[2]: Can Java Catch Signals ?

1998-09-28 Thread peter . pilgrim

Last week Trent Jarvi wrote:
> http://www.interstice.com/~kevinh/projects/javasignals/index.html


Hi Kevin

I will let you know if I get this working with Solaris, 
but it is low priority at the mo ...


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: 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: 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: help with swing!

1998-09-30 Thread peter . pilgrim

You will probably need the specify the other jars in Swing too in your 
 classpath. For example motif.jar swing.jar windows.jar too


__ Reply Separator _
Subject: help with swing!
Author:  psteele ([EMAIL PROTECTED]) at lon-mime
Date:28/09/98 17:33


Hello
 
Please help! I am having the following problem using swing-1.0.3 with 
blackdown's jdk1.1.6 under RedHat linux 5.1:
My profile:
 
CLASSPATH=.:/opt/java/swing-1.0.3/swingall.jar 
JAVA_HOME=/opt/java/jdk1.1.6
SWING_HOME=/opt/java/swing-1.0.3
export CLASSPATH SWING_HOME JAVA_HOME
 
 
When I attempt to compile HelloSwing.java downloaded from the sun site I
 
receive the following mesage
 
$ javac HelloSwing.java
HelloSwing.java:1: Package java.swing not found in import. 
import java.swing.*;
   ^
 
HelloSwing.java:5: Superclas JFrame of class HellowSwing not found. 
public class HelloSwing extends JFrame implements ActionListener {
 ^
 
2 errors
 
 
To add insult to injure, I cannot run the SwingSet program that came 
with
swing-1.0.3.  From the SwingSet directory I type:
 
$ ./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 
$
 
Thanks for your help
 
Philip
 
[EMAIL PROTECTED]



Where Can I find libBrokenLocale.so ?

1998-09-30 Thread peter . pilgrim

 Where can I find libBrokenLocale.so?
 
 "One. Two. Three. Hit it!" James Brown
 
 



Re: Where Can I find libBrokenLocale.so ?

1998-09-30 Thread peter . pilgrim

Is the source code available, because I have Slackware 3.5 not RHL.

__ Reply Separator _
Subject: Re: Where Can I find libBrokenLocale.so ?
Author:  javanews ([EMAIL PROTECTED]) at lon-mime
Date:30/09/98 10:38


On RedHat 5.0 its in /usr/lib
 
At 03:17 PM 9/30/98 +0100, you wrote:
> Where can I find libBrokenLocale.so? 
> 
> "One. Two. Three. Hit it!" James Brown
 
Douglas Toltzman

A quickie



Re: Where Can I find libBrokenLocale.so ?

1998-09-30 Thread peter . pilgrim

 Unfortunately I could find any thing at sunsite.doc.ic.ac.uk/pub/linux
 Could you be more specific?


__ Reply Separator _
Subject: Re: Where Can I find libBrokenLocale.so ?
Author:  javanews ([EMAIL PROTECTED]) at lon-mime
Date:30/09/98 11:22


I have a source package, I believe.  I also have the Slackware 3.4 CD. 
Chances are, the most up-to-date sources and distributions would be on 
Sunsite.
I don't remember the URL but its on my links page;
 
http://www.oakstrsft.com/links.html
 
 
At 03:47 PM 9/30/98 +0100, you wrote:
>Is the source code available, because I have Slackware 3.5 not RHL. 
>
>__ Reply Separator 
_
>Subject: Re: Where Can I find libBrokenLocale.so ? 
>Author:  javanews ([EMAIL PROTECTED]) at lon-mime 
>Date:30/09/98 10:38
>
>
>On RedHat 5.0 its in /usr/lib
> 
>At 03:17 PM 9/30/98 +0100, you wrote:
>> Where can I find libBrokenLocale.so? 
>> 
>> "One. Two. Three. Hit it!" James Brown 
> 
>Douglas Toltzman
>
>A quickie
>



Re: Write Once Run Anywhere?

1998-10-02 Thread peter . pilgrim

 The $1 and $2 are inner classes 
 This is how the Java Compiler generates Anonymous Inner classes.
 So on a linux environment you do need them.
 
 May when you copy these filenames the result is garbage filenames.
 
For this reason it is better to package all `*.class' files in a JAR or ZIP 
archive for better transportation(!).

Pete


__ Reply Separator _
Subject: Re: Write Once Run Anywhere?
Author:  stevecoh ([EMAIL PROTECTED]) at lon-mime
Date:02/10/98 02:46


-

 
Now here is a detail that may be more relevant:
There are 19 .java files in the package.  The compilation under linux is making 
them into 19 class files.  When compiling under Win95, 27 class files are 
created.  Two of these are for non-public classes defined in other java files. 
The other six files have names like x$1.class where x.java is one of my 
project files (x.class is also created by the compilation).  I don't know 
what these extra files are for, but the NoClassDefFoundError message is telling 
me that the class it cannot find is x$1.  The extra files do not seem to be 
required under the linux environment, but they appear necessary under the Win95 
environment.
 
 



Re: EVERYONE: javac segmentation fault

1998-10-02 Thread peter . pilgrim

 When I last looked I could not see in jdk-1.1.6v2.
 
 I can think you should create a new text file called `PROBLEMS'
 to focus the naive installer attention. Put also the bugfixes and 
 remedies in this file and put a ptr in the README.linux file.
 
 Pete


__ Reply Separator _
Subject: Re: EVERYONE: javac segmentation fault
Author:  sbb ([EMAIL PROTECTED]) at lon-mime
Date:02/10/98 05:29


Eric Harlow writes:
 > 
 > I installed the jdk1-1-6v4 and can compile java files fine, but running 
 > anything 
 > 
 > 'java classfile'
 > 
 > gets a segmentation fault.  I have RedHat 5.0 on the system and need to do 
 > a java demo next week.  I would prefer not to use win95 to do the demo.
 > I checked the faq and didn't find anything that decribes my scenario.  
 
[General announcement, since this has cropped up a few times in the last day]
 
 
If you get a seg fault on running v4, the FIRST THING that you should do is 
try renaming libc and libdl in java/lib/i386/green_threads to some other name. 
If your ld.so version is 1.9.6 or above (with the libc5 Linux JDK), you
should definitely do this.
 
I think the README.linux mentions this, doesn't it?  
 
Steve
 



Re: Dynamic modification of CLASSPATH

1998-10-02 Thread peter . pilgrim

 You can also get the classpath from SystemProperty( "java.classpath" )
 or something like that.
 
 Then use you write a PathnameResolve sth that search for the classes
 by looking at each of the separated directory. You could use
 the StringTokenizer(":") to get each directory. Loop through all 
 directories and try to see if there is File called xxx.class or 
 whatever.
 
 Or maybe there's a method in ClassLoader which accepts a new 
 (augmented) classpath.

Pete

__ Reply Separator _
Subject: Re: Dynamic modification of CLASSPATH
Author:  gaolei ([EMAIL PROTECTED]) at lon-mime
Date:02/10/98 08:59


You could write your own class loader.
 
Domingo Pinya wrote:
 
> Hi:
>
>There is any way to change the value of CLASSPATH dynamicaly, that is, 
> how I can include a new directory into CLASSPATH after my program is
> runnning, to instantiate a class that is inside it? 
>
> Thanks.
>
 
 



Re: Where Can I find libBrokenLocale.so ?

1998-10-02 Thread peter . pilgrim

 No my problem was getting the [RETURN] key to produce newlines
 in a XmTextWidget (Motif Toolkit as used in the JDK).
 The only trick that did it for me was Emacs Control-J ;-)
 It is a bit of nuisance not having the Return key work in any
 apps that have statically linked Motif objects.
 
 Pete


__ Reply Separator _
Subject: Re: Where Can I find libBrokenLocale.so ?
Author:  alex ([EMAIL PROTECTED]) at lon-mime
Date:02/10/98 15:53


[EMAIL PROTECTED] wrote:
 
> Is the source code available, because I have Slackware 3.5 not RHL. 
>
 
If you have trouble with fonts, try to play with a font.properties.? file for yo
ur locale.
 
It was solving a problem for me. I've never needed that lib.
 
--
 
Cheers.
Alexander
 
 



Re: Dynamic modification of CLASSPATH

1998-10-05 Thread peter . pilgrim

 So I am afraid you must become one with "ClassLoader" (and maybe also 
 the "SecurityManager") class somewhere a long the line(!).


__ Reply Separator _
Subject: Re: Dynamic modification of CLASSPATH
Author:  Michael.Sinz ([EMAIL PROTECTED]) at lon-mime
Date:03/10/98 17:44


On Sat, 3 Oct 1998 12:10:04 -0300 (ADT), Kenny Freeman wrote:
 
>could you not get an instance of runtime and execute 
>'export CLASSPATH=/some/new/classpath' or set env, depending
>what shell your using. Then again, that is not very platfom independant 
>now is it?Well, it would work.
 
Well, it would only work if:
 
1)  THe security manager lets you do that
2)  You start a new JVM from within the context of the call.
 
The #2 thing is critical since the "export ..." will run in a sub-shell 
and will not directly affect the current JVM environment.
 
So, at best you could do:
 
"export CLASSPATH=... ; java startnewjvm"
 
And this is even less likely to be what you need or want and it is 
even less likely to work on many platforms or even the same platform 
with different installations.
 
 
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-06 Thread peter . pilgrim

 Create a shell script to call `java Example' for you a la
 
 #!/bin/sh
 # Set up any defaults just in case
 : ${JAVAVM:=java|kaffe|jikes}
 : ${CLASSPATH:=/whatever/man}
 : ${SWING_HOME:=/you/know/what/time/it/is}
 export SWING_HOME CLASSPATH
 ${JAVAVM} Example
 # fini
 

Or read the Linux-Java-HOWTO (or is Java-Linux-HOWTO) at the LDP
which explains how to configure the kernel so that it will automatically
execute a java class file.

Not recommended for everyday java software development and release 
with all the changes in JDK/JFC/JMF and other 
forthcoming java extensions unless you are planning to build an 
embedded java based system where the contents of the system
are very well defined. And in any case you would have to set 
up a precise environment to find all the extension
I theorise.

Pete

"Java: mad for it!"


__ Reply Separator _
Subject: Re: Does Java apps has to have .class extension?
Author:  javanews ([EMAIL PROTECTED]) at lon-mime
Date:05/10/98 21:52


At 08:19 PM 10/5/98 -0400, Danny Lu wrote:
>But when I try to run a example program I wrote.. and I change 
>the extension.. I got an error stating "Can't find class Example" 
>
>okay at first I tried to compile my example program: 
>   javac Example.java
>
>and I got Example.class... now I change the name of the Example.class to 
>Example:
>   mv Example.class Example
 
Your requirement seems strange but, have you tried;
 
ln Example.class Example
 
and then execute Example ?  I don't know if this will address your problem 
since you didn't tell us what you are trying to do.
 
Another solution may be to create a script that contains "java Example".
 
>then I made the example executable: 
>   chmod u+x Example
>
>and then I ran it...
>   ./Example
>
>I got the error message saying:
>   "Can't find class Example"
>
>that's what I was trying to say hehe =) 
>
>Dan
 
Just a work around if it helps.
 
Douglas Toltzman



Re: AudioClip being Garbled [ was Bug in v4a?]

1998-10-07 Thread peter . pilgrim

 Yes I had audio clips in application being garbled and looping at 
 arbitary points for odd reasons (bad for java games).
 I thought it was because the data was never being completely loaded.
 Ah, maybe I should look `MediaTracker'. Implement Audio version of
 Swing/JFC ImageIcon class. However I realized this class only works
 with images in JDK1.1 ;-(.

MediaTracker
o Supports audio clips

AudioSoundClip 
o notified via observer when sound finished playing.

dream on ("sigh")

__ Reply Separator _
Subject: Re: Bug in v4a?
Author:  sbb ([EMAIL PROTECTED]) at lon-mime
Date:07/10/98 07:10


[EMAIL PROTECTED] writes:
 > Hello,
 > 
 > I installed the latest jdk. With this jdk I get a thread dump (see below) usi
ng
> the following native code (just parsing a string). With jdk1.1.6-v2 it worked 

 
 > I also removed the libc and libdl in the greenthreads directory, but without 
any
 > success. Using libc.so.5.4.46 and libdl.so.1.9.2. 
 > 
 > I have also a problem with drawImage(image, x, y, null) in v4a. In 
 v2 I can 
 
 
see below.
 
 > And my last problem is playing an audio (.au) file in an application. For thi
s I
 > use the audio package from sun. Sometimes it plays only the first part of the 
 > audio file.
 
v5 will be out in a day or so.  It fixes some problems with audio files.  It 
fixes behavior with window managers.  It includes fixes for JNI behavior.
 
Please try it out and let us know if there are still any problems for you.
 
Steve



Re: Xsql

1998-10-16 Thread peter . pilgrim

 Whats the problem ?


__ Reply Separator _
Subject: Re: Xsql
Author:  duan ([EMAIL PROTECTED]) at lon-mime
Date:13/10/98 08:39


 
hi
 
I am wondering if anyone in the list is using Xsql?It is a Java based 
database editor.I am trying to get it to work but to no avail.I keep 
getting lots of error.If someone out there maybe he/she can help me.
 
Peter are you in here?I cannot login into a database...:(
 
thanks 
regards
duan
 



Re: Hogging colours?

1998-10-16 Thread peter . pilgrim

 Have try running your X in 16 bit colour mode!
 
runx  -- bpp16 --
 
 Or something like that


__ Reply Separator _
Subject: Re: Hogging colours?
Author:  sbb ([EMAIL PROTECTED]) at lon-mime
Date:08/10/98 07:46


Dustin Lang writes:
 > 
 > Hi,
 > 
 > I was looking at some stuff I wrote a long time ago (before I had a sane 
 > operating system *grin*), that does something similar to 'xlock -mode
 > swirl' (makes pretty wavy things).  When I ran it in X, instead of
 > hundreds of colour I got 4.  It's not nearly so pretty in 4 colours.
 > *pout*  Does anyone know how to make java be more assertive in its demands 
 > to use many colours?  My hardware is able to do 64k colours and at the
 > moment I have X configured to use 256.
 
Do you already have Netscape running?  It's known to be a colormap hog.  
Can you restart your X session (I mean log all the way out, not just
restart your windowmanager) and just run your Java program w/o starting a bunch 
of other X applications?   Does that help?
 
Steve



Java language question: static classes ?

1998-10-16 Thread peter . pilgrim

 I was looking at the Kim Topley  "Core JFC" book particularly a 
 convenience class to swith the Swing/JFC PL&F (Chapter 13)
 the other day I found it was declared like ?
 
 protected static class SwitchPLAFClass {
   
 
private Frame f;
private LookAndFeelInfo lfi
 
...

 }
 
 
 What is a static class?
 
 I am guessing it is sharable entity.
 
 Pete



Re: Working Button mnemonics under Linux Java?

1998-10-16 Thread peter . pilgrim

 Ah ha! that would explain the current problem I have on my old fvwm2.0 
 stuff.
 ALT - CURSOR KEYS shift across Virtual Screen
 
 Look at the File menu title, set if the F is underlined.
 Look at the Ok button see if the o is underlined.
 
 I had a problem a few months ago where my .fvwmrc file removed
 decorations from any transient window! Consequently anything derived
 from Dialog could not be resized 
 
 (And I thought it was the JDK too.)
 
 
 Pete
 
BTW: Where can I get a copy `xev' I cant find it on system at home




__ Reply Separator _
Subject: Re: Working Button mnemonics under Linux Java?
Author:  Michael.Sinz ([EMAIL PROTECTED]) at lon-mime
Date:15/10/98 17:42


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: Java language question: static classes ?

1998-10-16 Thread peter . pilgrim

 Weirdo
 
So public static SwitchPLAFAction { ... } is a just java object class
that is really instantied just once, like some sort of singleton?

Actually I have used a modified version of the ActionEvent class from   
Kim Topley "Core JFC" example in Xsql as an inner class. So now Xsql can
switch PLAFs too. It works, but I still dont understand public static class ?

I cant find a reference to it in "Exploring Java". I will see if I can
borrow back "Core Java" this weekend.

Pete

__ Reply Separator _
Subject: Re: Java language question: static classes ?
Author:  Ernst.deHaan ([EMAIL PROTECTED]) at lon-mime
Date:16/10/98 13:08


Correct me if I'm wrong, but I do not believe top-level classes can have 
the 'static' modifier applied, but if you want a shared entity, do 
something like this:
 
public class DefaultFactory
   extends AbstractFactory
{
   protected DefaultFactory() { /* empty */ } // or private if you wish 
   public final static DefaultFactory SHARED_INSTANCE = new
DefaultFactory();
   ...
}
 
This is how I create shared entities (for example in JUMP, a framework for 
numeric computations). The only potential problem you have here is 
performance, if a piece of code synchronizes on the shared instance. But 
then again, _most_ shared entities do not have state, so they should not 
have to be synchronized. Malicious code could, however, cause a lifelock 
problem by synchronizing on the shared entity and letting go...
 
GreetinX++, Ernst
 
 
 
Pavel wrote:
 
> >  What is a static class?
> Making classes static has good sense if they are nested. Usually nested 
> class object has hidden member referencing high level class object and 
> hidden constructor parameters. But static nested class is just like a
> high level class. By the way, static public class nested in another
> public class is the single method I know to define more than one public 
> class in one file. I have no idea whether static classes are
> syntaxically allowed on the top level. I think it does not matter -- all 
> such classes are actually static in all senses I can image.
>
> Hope this helps.
>
> Pavel
 



Re: Java language question: static classes ?

1998-10-16 Thread peter . pilgrim

 I think I am fast asleep of course it is STATIC MEMBER.
 
 


__ Reply Separator _
Subject: Re: Java language question: static classes ?
Author:  Peter Pilgrim at London
Date:16/10/98 13:11


 Weirdo
 
So public static SwitchPLAFAction { ... } is a just java object class 
that is really instantied just once, like some sort of singleton?
 
Actually I have used a modified version of the ActionEvent class from   
Kim Topley "Core JFC" example in Xsql as an inner class. So now Xsql can
switch PLAFs too. It works, but I still dont understand public static class ?
 
I cant find a reference to it in "Exploring Java". I will see if I can 
borrow back "Core Java" this weekend.
 
Pete
 
__ Reply Separator _
Subject: Re: Java language question: static classes ?
Author:  Ernst.deHaan ([EMAIL PROTECTED]) at lon-mime 
Date:16/10/98 13:08
 
 
Correct me if I'm wrong, but I do not believe top-level classes can have 
the 'static' modifier applied, but if you want a shared entity, do 
something like this:
 
public class DefaultFactory
   extends AbstractFactory
{
   protected DefaultFactory() { /* empty */ } // or private if you wish 
   public final static DefaultFactory SHARED_INSTANCE = new
DefaultFactory();
   ...
}
 
This is how I create shared entities (for example in JUMP, a framework for 
numeric computations). The only potential problem you have here is 
performance, if a piece of code synchronizes on the shared instance. But 
then again, _most_ shared entities do not have state, so they should not 
have to be synchronized. Malicious code could, however, cause a lifelock 
problem by synchronizing on the shared entity and letting go...
 
GreetinX++, Ernst
 
 
 
Pavel wrote:
 
> >  What is a static class?
> Making classes static has good sense if they are nested. Usually nested 
> class object has hidden member referencing high level class object and 
> hidden constructor parameters. But static nested class is just like a
> high level class. By the way, static public class nested in another
> public class is the single method I know to define more than one public 
> class in one file. I have no idea whether static classes are
> syntaxically allowed on the top level. I think it does not matter -- all 
> such classes are actually static in all senses I can image.
>
> Hope this helps.
>
> Pavel
 



Getting TYA to compile

1998-06-13 Thread Peter Schuller

Hi!

I'm having problem getting TYA to compile... I've done alot of programming but
I still haven't learned to figure out those automatic configure stuff etc so
I'm not sure how to fix it.

Configure givs me this:

checking java port... UNRECOGNIZED
Uknown version of java. Try to config manually by  

I've played with the manual settings to no avail. I'm using Steve Byrne's
1.1.5v7.

When compiling the header files aren't found, probably because configure by
some reason identifies Netscape VM as the JDK (?!?!?).

BUT! It does include netscape's headers, here's the comandline :

gcc -Wall -pipe -shared -O6 -m486 -malign-loops=4 -malign-functions=4
-malign-jumps=4-I/usr/local2/netscape/../include
-I/usr/local2/netscape/../include/genunix -o libtya.so tya.c tyarecode.c
tyaruntime.c tyaasm.S   

Noteice the "../".

But as I said, I haven't figured all these autoconfig stuff out yet, so I don't
know where to edit Makefile templates and stuff to replace is with the real path
to the JDK.

Anyone?

I'm using TYA 06. I know 07 is out and I'll download it ASAP. But this problem
will most likely persist.

Thanks!

/ Peter Schuller


---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org




1.1.6v1 bug report

1998-06-14 Thread Peter Schuller

Hi!

First, is there a list of knows bugs for Steve Byrne's JDK ports? If this one's
already been reported, I want to avoid duplicating bug reports again.

I'm not sure if this is a JDK or Swing bug, but as it worked on all previous
JDK's I've used, I'll report it here first and see what you think:

After moving from 1.1.5v7 to 1.1.6v1, Swing 1.0.1's JMenu:s, at least when
managed by a standard JMenuBar, behaives rather strangely. They are sometimes,
not always, "popped" at the wrong position, placing the first menuitem at the
level of the JMenu's name on the JMenuBar's display. Besides the visual
"weirdness", it has the sideeffect that if the JMenu has time to "react" so to
speak (display) before you release the mouse button, you automatically choose
the first item available.

This is of course not a major issue, but somewhat annoying.

PS.
   Does anyone know a mailinglist dealing with Java in general?
DS.

/ Peter Schuller


---
WWW: hem.passagen.se/petersch/ (might change)
---
PGP public key: Available at hkp://pgpkeys.mit.edu
PGP user ID: "Peter Schuller <[EMAIL PROTECTED]>"
---
Linux - The Choice of a GNU Generation
Be Microsoft FREE!!! Check out www.linux.org




Re: Working Button mnemonics under Linux Java?

1998-10-19 Thread peter . pilgrim

 Could this be something to do with the BrokenLocale.so which I have 
 never been able to find for Slackware 3.x ?
Incidentally I installed KDE1.0 over the weekend, and I can verify that 
the mnemonic also  dont work there too.

Pete

__ Reply Separator _
Subject: Re: Working Button mnemonics under Linux Java?
Author:  jimb ([EMAIL PROTECTED]) at lon-mime
Date:16/10/98 19:22


Eu Hin Chua <[EMAIL PROTECTED]> wrote:
 
> It is bothering me that a considerable number of above-average users
> (some much more competent than myself), using a variety of distributions, 
> jdk releases and swing libraries have singularly and independently
> also failed to get mnemonics functioning. As mentioned, a large variety 
> of window managers have been used on these machines (fvwm, fvwm95,
> AfterStep, WindowMaker, KDE, icewm, Enlightenment), and the Alt keys have 
> always worked in our applications (e.g. Netscape, KDE programs, nedit). 
> 
-
 
I did some more tests of my own, and found that it is in fact related to 
XFree86.  Running Metro-X, Swing mnemonics work; under XFree86 3.3.2.3 
they do not, with everything else the same.
 
I'll investigate some more and try to figure out why this is, and if there 
is a workaround or fix.  In the meantime, you could always buy Metro-X 
(only $39)...  :-)
 
-Jim Burmeister, [EMAIL PROTECTED]



Re: Java language question: static classes ?

1998-10-19 Thread peter . pilgrim

 Thanks that is the correct answer for "static inner class".
 
 With ordinary non-static inner class there is a hidden reference to 
 the outer class. Declaring an inner class static removes this hidden 
 reference. The static inner class becomes referable in global scope 
 with having to refer to an outer class. However a static inner class 
 cannot have it self a static inner class.
 
 Static inner class
 
 1) can be refered to without regard to the outer class. That is you do 
 not to instantiated the outer class to instantiate an inner class.
 
 2) cannot refer to any member or method belonging to the outer class.
 
 public class AppFrame extends JFrame {
 
public static SwitchPLAFAction { 
private LookAndFeelInfo lfi;
private JFrame frame;
SwitchPLAFAction( LookAndFeelInfo lfi, JFrame frame )
{ this.lfi = lfi; this.frame = frame )
... 

}
 
public static void main( String[] args )
{
AppFrame appFrame = new AppFrame( ... );
...
// Now to need to refer to a AppFrame object
SwitchPLAFAction plafAction = 
  new SwitchPLAF( MyLookAndFeel, appFrame );
 
 //
 // Normal inner class instantion
 //   SwitchPLAFAction plafAction = 
 // appFrame.new SwitchPLAF( MyLookAndFeel, appFrame );
 // 
 // 
}
 }
  
 
 Thanks Pavel for putting me straight.
 
 Pete
 "Finito!"
   
 
 


__ Reply Separator _
Subject: Re: Java language question: static classes ?
Author:  paul ([EMAIL PROTECTED]) at lon-mime
Date:16/10/98 16:14


> So public static SwitchPLAFAction { ... } is a just java object class 
> that is really instantied just once, like some sort of singleton?
No, no. I did not mean that static classes are related to singletons. 
They are not AFAIK.
 
> Actually I have used a modified version of the ActionEvent class from 
> Kim Topley "Core JFC" example in Xsql as an inner class. So now Xsql c
an
> switch PLAFs too. It works, but I still dont understand public static class ?
 
This is an example of what I want to say:
 
// File A.java
public class A {
...
public class B { ... }
}
// End of file
// File C.java
public class C {
...
public static class D { ... }
}
// End of file
 
You can use both classes A.B or C.D in any packages such as both of them 
are public. But A.B class has one additional hidden member of A class 
and requires one additional constructor parameter of A type (in default 
"no-arg" constructor) if you create it outside of A class scope. C.D 
class is just like usual Java top level public class.
 
That's all I know about static classes
 
Hope this will help.
Pavel
 
 
// 
 
> 
> I cant find a reference to it in "Exploring Java". I will see if I can
> borrow back "Core Java" this weekend.
> 
> Pete
.. 
> Correct me if I'm wrong, but I do not believe top-level classes can have 
> the 'static' modifier applied, but if you want a shared entity, do
> something like this:
> 
> public class DefaultFactory
>extends AbstractFactory
> {
>protected DefaultFactory() { /* empty */ } // or private if you wish 
>public final static DefaultFactory SHARED_INSTANCE = new
> DefaultFactory();
>...
> }
> 
> This is how I create shared entities (for example in JUMP, a framework for 
> numeric computations). The only potential problem you have here is
...



Re: Swing 1.0.3

1998-10-20 Thread peter . pilgrim

 You CLASSPATH should be defined in your shell like this:
 
 JAVA_HOME=/usr/local/jdk1.1.6
 
 SWING_HOME=/usr/local/swing-1.0.3
 
 CLASSPATH=.:${SWING_HOME}/swing.jar:${SWING_HOME}/motif.jar:${SWING_HO
 ME}/metal.jar:${SWING_HOME}/window.jar:${SWING_HOME}/beaninfo.jar:${JA
 VA_HOME}/lib/classes.zip:

export JAVA_HOME SWING_HOME CLASSPATH


 //   assuming bash or korn shell

Pete

   and Stop apologising for your English
   because it is good.

!muy bien! Mi apprendido Espanyol.

__ Reply Separator _
Subject: Re: Swing 1.0.3
Author:  tyrano ([EMAIL PROTECTED]) at lon-mime
Date:19/10/98 17:58


 
 
 Hi!!
 
 I have some problems with the file swing.jar. When I compile an example, 
 the compiler returns errors. It doesn't find out included packages in 
 swing.jar. CLASSPATH is OK.
 
 I think that my linux (RedHat 5.0 (Hurricane)) doesn't recognize files 
 with extension .jar.
 
 Can you help me???
 
 Thanks & sorry for my English.
 
 
 
 
 



Re: Java language question: static classes ?

1998-10-20 Thread peter . pilgrim

 __ Reply Separator 
 _
 
 Subject: Re: Java language question: static classes ?
 Author:  mlorton ([EMAIL PROTECTED]) at lon-mime
 Date:19/10/98 19:16
 
 
 >  Thanks that is the correct answer for "static inner class". >   

 >  However a static inner class 
 >  cannot have it self a static inner class.
 
 Yes, it can.  Why couldn't it?  The innerness of a static inner class 
 is purely a naming thing.
 
 
 ..
 
 
 In any case I am not seen a case where static inner class has it own 
 static inner classes (yet). Inner classes and Anonymous class are 
 fascinating things but I will stop the recursion here.
 
 Pete
 
 
 



Re: Swing 1.0.3

1998-10-20 Thread peter . pilgrim

 This is how the author of Xsql (moi) has set up the CLASSPATH
 at work with ``sparc-sun-solaris2.5.5''
 
 
 # Filename: `~/.kshrc'
 # Environment file for the Korn Shell
 # Peter Pilgrim
 # 31/12/1997
 
 # Java Developer Kit Root Directory (for JDK 1.1.3)
 ### olde: export JAVA_HOME=/utils/java
 JAVA_HOME=${HOME}/JavaClasses/jdk1.1.6
 export JAVA_HOME
 
 # Java Foundation Classes (Swing 1.0.1 snarfed from the `runnit' 
 script.
 ### olde: SWING_HOME=${HOME}/JavaClasses/swing-1.0.1
 SWING_HOME=${HOME}/JavaClasses/swing-1.1beta
 
 SWING_JARS=${SWING_HOME}/swing.jar:${SWING_HOME}/windows.jar:${SWING_H
 OME}/motif.jar:${SWING_HOME}/metal.jar:${SWING_HOME}/organic.jar:${SWI
 NG_HOME}/mac.jar
 export SWING_HOME
 
 
 ...
 
 
 CLASSPATH=.:${SWING_JARS}:${HOME}/JavaClasses:${JAVA_HOME}/lib/classes
 .zip:/apps/summit/java/lib/connectJdbc113.zip
 export CLASSPATH
 
 
 A bit long winded I know but it make for great configurability.
 In my setup I do not include both swing.jar and swingall.jar maybe 
 that is the difference.
 
 This generates the following CLASSPATH for me:


pilgpe@poppy [58] > 
pilgpe@poppy [58] > printenv CLASSPATH
.:/home/pilgpe/JavaClasses/swing-1.1beta/swing.jar:/home/pilgpe/JavaClasses/swin
g-1.1beta/windows.jar:/home/pilgpe/JavaClasses/swing-1.1beta/motif.jar:/home/pil
gpe/JavaClasses/swing-1.1beta/metal.jar:/home/pilgpe/JavaClasses/swing-1.1beta/o
rganic.jar:/home/pilgpe/JavaClasses/swing-1.1beta/mac.jar:/home/pilgpe/JavaClass
es:/home/pilgpe/JavaClasses/jdk1.1.5/lib/classes.zip:/apps/summit/java/lib/conne
ctJdbc113.zip



BTW: If you find the solution to this setup problem I will put in the next 
release notes.

Pete


__ Reply Separator _
Subject: Re: Swing 1.0.3
Author:  duan ([EMAIL PROTECTED]) at lon-mime
Date:20/10/98 08:28



hi

i seem to have that problem too.

I am trying to use Xsql which required swing.jar.Although i already put it the 
full path in there,it seems that the program cannot find the swing.jar.By the 
way I am using Swing 1.1Beta3.Is it because of the beta version?The thing is 
that only me got that problem.Hmmm

anyway thanks
 
> >  I have some problems with the file swing.jar. When I compile an example, 
> >  the compiler returns errors. It doesn't find out included packages in
> >  swing.jar. CLASSPATH is OK.
> 
 
 
Anybody is trying the Xsql.maybe you guys can help me here.
 
 
regards
duan



Re: Swing 1.0.3

1998-10-20 Thread peter . pilgrim

 Aaaah, Schei**er!!
 
 
 
 Rainer you are quite correct:
 
 http://java.sun.com/products/jfc/CHANGES.txt-1.1beta3
 
 
~~
For Xsql 2.1.7p01 you need Swing 1.1 beta 2 
~~


and My documentation is kookoo!

But you may as well KEEP Swing/JFC 1.1 beta 3 around anyway, because I am going 
to upgrade and repackage the software in the next two weeks. Delay in fact to 
simultaneous introduce new features and bug fixes.

Sorry, it is very frustrating, but I though JavaSoft would not
introduce the package name changes until the final 1.2 version.
Meanwhile I will endeavour to update the documentation precisely
so that users dont experience this problem in the future.

Pete




Extract:

  CHANGES SINCE THE PREVIOUS RELEASE

This file summarizes changes made since Swing 1.1 Beta 2.  Documentation
improvements and look-and-feel cosmetic changes are not listed here.

For the latest, detailed information about Swing, be sure to check our
Web site, The Swing Connection:

http://java.sun.com/products/jfc/tsc/

This file has the following sections:

- New Package Names
- Bug Fixes

=
New Package Names
=
As previously announced, the names of the Swing packages have changed
in this release. The new package names will be used both in Swing 1.1
releases and in JDK 1.2 releases.

A tool to help you convert to the new package names is available
at this URL:

http://java.sun.com/products/jfc/PackageRenamer/

The following table shows how package names have changed.

Old NameNew Name

com.sun.java.accessibility  javax.accessibility
com.sun.java.swing  javax.swing
com.sun.java.swing.border   javax.swing.border
com.sun.java.swing.colorchooser javax.swing.colorchooser
com.sun.java.swing.eventjavax.swing.event
com.sun.java.swing.filechooser  javax.swing.filechooser
com.sun.java.swing.plaf javax.swing.plaf
com.sun.java.swing.plaf.basic   javax.swing.plaf.basic
com.sun.java.swing.plaf.metal   javax.swing.plaf.metal
com.sun.java.swing.plaf.multi   javax.swing.plaf.multi
com.sun.java.swing.tablejavax.swing.table
com.sun.java.swing.text javax.swing.text
com.sun.java.swing.text.htmljavax.swing.text.html
com.sun.java.swing.tree javax.swing.tree
com.sun.java.swing.undo javax.swing.undo

The following package names are unchanged:

com.sun.java.swing.plaf.motif
com.sun.java.swing.plaf.windows

=
Bug Fixes
=
  
  __ Reply Separator 
  _
  Subject: Re: Swing 1.0.3
  Author:  Rainer.Werlein ([EMAIL PROTECTED]) at lon-mime
  Date:20/10/98 10:10
  
  
  On Tue, 20 Oct 1998 15:28:10 +0800 (MYT), Rudhuwan Abu Bakar wrote:
  
  >
  >hi
  >
  >i seem to have that problem too.
  >
  >I am trying to use Xsql which required swing.jar.Although i already put it 
  >the full path in there,it seems that the program cannot find the 
  >swing.jar.By the way I am using Swing 1.1Beta3.Is it because of the beta
  
  No. It's not the beta, it's not heaving read the README. ;-)
  
  Anyway ...
  
  Starting with swing 1.1 beta 3, the new package naming conventions are in use, 
  i.e. the swing packages are javax.swing.*  and no longer com.sun.java.swing.* 
  
  'Old' software need a swing package using the *old* package names, i.e.  any 
  1.0.x - version, or any 1.1 beta *before*  1.1b3.
  
  
  regards
  Rainer



Swing1.1 beta 3 [was Re: Swing 1.0.3]

1998-10-20 Thread peter . pilgrim

 I just downloaded 13 MB Swing-1.1 beta 3  zip file. I am unzipping 
 now. I believe it expands to 47Mb ! (Gulp) My goodness. Why are there 
 so much documentation HTML on everything?
 
 I fear for JDK1.2


__ Reply Separator _
Subject: Re: Swing 1.0.3
Author:  Peter Pilgrim at London
Date:20/10/98 12:17


 Aaaah, Schei**er!!
 
 
 
 Rainer you are quite correct:
 
 http://java.sun.com/products/jfc/CHANGES.txt-1.1beta3
 



Re: Swing 1.0.3

1998-10-20 Thread peter . pilgrim

 I had look at Swing / JFC 1.1 Beta 3 (13 MB for the zip file ) which  
 is a double the size of the previous Swing/JFC 1.1 Beta 2. The guys at 
 Javasoft appeared to have 
 `javadoc'ed the entire javax.swing.* and com.sun.swing.plaf.* ( which 
 makes a lot sense if you in to building your custom look and feels ).
 
 
 Because of the package difference I release the Xsql in two phases. I 
 hope to do publish the first upgrade at the beginning of November, 
 which will work with JDK 1.1 beta 2, leaving plenty of time to publish 
 a second upgrade by December. The second phase will support Swing beta 
 1.3 with the javax.swing.* et el.
 
 I will update my web.
 
 I think this is better solution.
 
Pete


__ Reply Separator _
Subject: Re: Swing 1.0.3
Author:  Peter Pilgrim at London
Date:20/10/98 12:17
 
 
~~ 
For Xsql 2.1.7p01 you need Swing 1.1 beta 2 
~~
 
But you may as well KEEP Swing/JFC 1.1 beta 3 around anyway, because I am going 
to upgrade and repackage the software in the next two weeks. Delay in fact to 
simultaneous introduce new features and bug fixes.
 



Re: applet and netscape

1998-10-20 Thread Peter Harris

The problem may be that a "feature" of Netscape is that reloading a page in
Netscape does _not_ reload any associated applets.

I think if you want to force it to reload applets you need to do something
like hold down the control key (or something like that) while clicking on
reload, or alternately, shut down Netscape and restart it.

Peter

At 2:46 AM +1100 21/10/98, Georgios Y Lazarou wrote:
>Hi,
>
>I have the following problem with applets and netscape:
>
>Linux: slackware 3.5
>Java: jdk1.1.6.v2
>Netscape 4.07
>
>when I load for the first time one of applets in netscape everything
>is ok. Now, when I want to rerun or reload the same applet (an applet
>which plots a function), netscape don't do that. Instead, netscape
>redraws the same plot that was created in the first applet loading.
>When I change the applet code and compile it again, netscape doesn't
>reload the new applet, but again reloads the old applet from its
>cache. To load the new applet with the same name, I have to exit
>netscape and then start it again, and then load the new applet.
>
>How can I fix this problem?
>
>thanks
>Georgios


##
#Peter Harris Ph:  (03) 9628 7089#
#Telstra, Satellite Services  Fax: (03) 9628 7044#
##




Re: Working Button mnemonics under Linux Java?

1998-10-21 Thread peter . pilgrim

 Another thing that bothers me: In my linux-jdk1.1.6v2 pressing return 
 in a TextArea (or JTextArea or even Netscape Navigator ) does produce 
 a newline. Is this a related problem?
 
 Some one did mention to check out libBroken.so but I could not find it 
 in the Slackware sources. 

Pete

__ Reply Separator _
Subject: Re: Working Button mnemonics under Linux Java?
Author:  jimb ([EMAIL PROTECTED]) at lon-mime
Date:16/10/98 19:22


Eu Hin Chua <[EMAIL PROTECTED]> wrote:
 
 
> It is more puzzling that many of these systems have been "straight out of 
> the box" Redhat 5.1 and Debian 2 installs (with all updates applied), they 
> have not been tweaked or heavily modified in any way. The only major
> difference I can discern between the setup of our machines and yours is
> that we all use XFree86 servers (SVGA for Matrox Cards, S3, S3 Virge, and 
> XSuse Matrox) in contrast to your Metrolink server.
 
I did some more tests of my own, and found that it is in fact related to 
XFree86.  Running Metro-X, Swing mnemonics work; under XFree86 3.3.2.3 
they do not, with everything else the same.
 
I'll investigate some more and try to figure out why this is, and if there 
is a workaround or fix.  In the meantime, you could always buy Metro-X 
(only $39)...  :-)
 
-Jim Burmeister, [EMAIL PROTECTED]



Clipboard interaction between Swing/JDK and X11

1998-10-22 Thread peter . pilgrim


[ Subject  was Re: Working Button mnemonics under Linux Java?]

Hello Jim

Another another thing: Can anyone get a X11 selection, say from an XTerm or 
Emacs and paste it directly into a JTextArea or JTextField? I cannot do it.
Is this Swing/JDK related or is it another XFree86 problem ?

( I remember pasting stuff into the AWT TextArea with no problems.
Maybe it is because Swing components are Lightweight whereas AWT's are 
heavyweight and native windows )

Pete

__ Reply Separator _
Subject: Re: Working Button mnemonics under Linux Java?
Author:  Peter Pilgrim at London
Date:21/10/98 11:30


 Another thing that bothers me: In my linux-jdk1.1.6v2 pressing return 
 in a TextArea (or JTextArea or even Netscape Navigator ) does produce 
 a newline. Is this a related problem?
 
 Some one did mention to check out libBroken.so but I could not find it 
 in the Slackware sources. 
 
Pete
 
__ Reply Separator _
Subject: Re: Working Button mnemonics under Linux Java?
Author:  jimb ([EMAIL PROTECTED]) at lon-mime 
Date:16/10/98 19:22
 
 
Eu Hin Chua <[EMAIL PROTECTED]> wrote:
 
 
> It is more puzzling that many of these systems have been "straight out of 
> the box" Redhat 5.1 and Debian 2 installs (with all updates applied), they 
> have not been tweaked or heavily modified in any way. The only major
> difference I can discern between the setup of our machines and yours is
> that we all use XFree86 servers (SVGA for Matrox Cards, S3, S3 Virge, and 
> XSuse Matrox) in contrast to your Metrolink server.
 
I did some more tests of my own, and found that it is in fact related to 
XFree86.  Running Metro-X, Swing mnemonics work; under XFree86 3.3.2.3 
they do not, with everything else the same.
 
I'll investigate some more and try to figure out why this is, and if there 
is a workaround or fix.  In the meantime, you could always buy Metro-X 
(only $39)...  :-)
 
-Jim Burmeister, [EMAIL PROTECTED]



Re: Clipboard interaction between Swing/JDK and X11

1998-10-26 Thread peter . pilgrim

 Thanks for the info.
 
 At work `sparc-sun-solaris2.5.5' with CDE I can copy+paste from a 
 dtterm in to a Swing JTextArea. I have not found a way to copy from 
 GNU Emacs 20.2 into a JTextArea yet.
 
 However using xcutsel -sel CLIPBOARD and pressing the button [copy 0 
 to CLIPBOARD] to copy the selection from Emacs into the CLIPBOARD 
 buffer and then using the Ctrl-V in my Swing app did the trick.
 
 So this will work in KDE at home I presume too.
 
 Yep there must be a better way. Send all messages to JavaSoft.
 
 Thanks again Jim
 


__ Reply Separator _
Subject: Re: Clipboard interaction between Swing/JDK and X11
Author:  jrwatson ([EMAIL PROTECTED]) at lon-mime
Date:24/10/98 10:56


> [EMAIL PROTECTED] wrote:
>
> > Another another thing: Can anyone get a X11 selection, say from an XTerm or 
> > Emacs and paste it directly into a JTextArea or JTextField? I cannot do it. 
> > Is this Swing/JDK related or is it another XFree86 problem ?
 
Yes, this can be done  using a program called "xcutsel".
 
You would start it like this:
 
$ xcutsel -sel CLIPBOARD &
 
When you select some text in xterm or copy in emacs, the text is stored in 
XA_CUT_BUFFER0 (see Xatom.h)
 
xcutsel provides for transfers between the cut buffer and the CLIPBOARD
 
The CLIPBOARD seems to be default for swing (i tested JTextArea) and is the one 
returned by  AWT using Toolkit.getDefaultToolkit.getSystemClipboard. But AWT (I 
have only tested TextArea) seems to use the cutbuffer.
 
You can watch things in the CLIPBOARD with xclipboard.
 
Interestingly Netscape 4.06 supports both the cutbuffer and the CLIPBOARD.  So 
there must be a better way...
 
(i am using slackware 3.5)
 
jim watson
 
 
 



Re: JDK1.2 Port to Linux?

1998-10-26 Thread peter . pilgrim

 Sun has just given a license to port JDK 1.2 to Linux.
 Point your fav browser at http://lwn.net/daily/java.html
 
Pete

 PS: Any plans for distribution on CD ROM?

__ Reply Separator _
Subject: JDK1.2 Port to Linux?
Author:  d.harris ([EMAIL PROTECTED]) at lon-mime
Date:26/10/98 09:52

Blackdown:
I have recently joined this mailing list as I'm now using your lovely 
JDK port.
I had a quick peek in the archived mailing list though I could not find 
any info of plans on a JDK1.2 port...
At the moment I cannot see any problem with me using your JDK1.1.6 port 
but was wondering, looking to the future...Is there a port planned?
 
Dan.



Re: linux on windows

1998-10-26 Thread peter . pilgrim

 [THIS IS JAVA LINUX, MATE]
 
 But I can whole heartily recommend spending 55 GBP  British Pounds on 
 Partition Magic 3.0, because you can repartition your hdd without 
 having reinstall W95/NT. It works much much better than FIPS and it 
 works with the new VFAT oSR2 format.
 
Pete

__ Reply Separator _
Subject: linux on windows
Author:  gelu ([EMAIL PROTECTED]) at lon-mime
Date:22/10/98 17:03


Hello world
 
can anyone tell me if I can install linux (kinda minilinux get installed on 
dos)
on a windows nt/95 without haveing to use fips or anything 
 
that direct hdd access can be trvcked somehow ?
 
gg



Re: _Xglobal_lock

1998-10-27 Thread peter . pilgrim

 Where are your X Window Libraries?
 
 Everyone has them set a /usr/X11R6/lib
 
 Set the library LD_LIBRARY_PATH=/usr/X11R6/lib:
 or set up `ldconfig' by editing your `/etc/ld.so.config'
 file.
 
 
 What distribution do you have Slackware or Red Hat ?
 
 If RH5.0 use the glibc version ie libc 6.0 and above.
 
 If have an older Slackware stick with libc 5.0 you may have to 
 recompile the XFree86 3.2.2 sources to include  multithreaded support. 
 That means downloading first the `LinuxThreads' library, compiling and 
 installing in `/usr/lib' as `/usr/lib/libpthread.a' . Setting up the 
 Imakefile config `site.def' or `linux.cf' files to use -D_REENTRANT 
 -lpthread etc. I cant remember exactly what I did to get JDK1.1.6 to 
 work properly.
 
 Pete
 


__ Reply Separator _
Subject: _Xglobal_lock
Author:  jettero ([EMAIL PROTECTED]) at lon-mime
Date:27/10/98 06:26


I just installed jdk-1.1.6.5-2libc5.i386.rpm.
 
Whenever I run javac (or any other link to the .java.wrapper), I get this:
 
ls: not: No such file or directory
/usr/local/jdk1.1.6/bin/i586/green_threads/java: can't resolve symbol '_Xglobal_
lock'
/usr/local/jdk1.1.6/bin/i586/green_threads/java: can't resolve symbol '_XUnlockM
utex_fn'
/usr/local/jdk1.1.6/bin/i586/green_threads/java: can't resolve symbol '_XLockMut
ex_fn'
 
 
What is it?



Re: Clipboard interaction between Swing/JDK and X11

1998-10-30 Thread peter . pilgrim

 I cannot confirm it or deny it.
 
 This is quite disappointing, and I suppose it has grave consequences 
 for (forthcoming) Drag and Drop API in JFC1.2/JDK1.2
 
 Pete


__ Reply Separator _
Subject: Re: Clipboard interaction between Swing/JDK and X11
Author:  jrwatson ([EMAIL PROTECTED]) at lon-mime
Date:29/10/98 14:24


the conclusion i have reached (after much agony) is that java is only 
required to support copy and paste from java to java, otherwise it is 
platform specific, and not a java problem...can someone confirm this is 
correct?
 
thanks
 
jim watson



Re: Newbie mySQL MkLinux and JDBC

1998-11-02 Thread peter . pilgrim

 What is your problem ? Compiling MySQL out of the box or Compiling a 
 JDBC driver ?
 
 
Why are trying to compile the JDBC driver? You should not need to compile it.
The JDBC driver that I have come across have been precompiled. Therefore you
should just install it on your system and set your CLASSPATH to refer to the
zip or jar file accordingly.

e.g.

CLASSPATH=...:/usr/local/mysql/jdbc-driver-for-mysql.zip:...

export CLASSPATH

__ Reply Separator _
Subject: Newbie mySQL MkLinux and JDBC
Author:  dtbrown ([EMAIL PROTECTED]) at lon-mime
Date:31/10/98 02:04


I'm a newbie, and I'm trying to install a JDBC drivable database engine on my 
MkLinux (DR3) machine.  MySQL should do the trick, and I have configured the 
files without any trouble, but the compile fails.  Is there anyone out there 
who has experience with this installation???
 
Thanks!
 
DTB



Re: JFC Compilation still bothersome

1998-11-02 Thread peter . pilgrim

 No. Swing 1.0.3 should have the older com.sun.java.swing which is 
 correct.
 
 I dont think the order of the swing and JDK jar file in the CLASSPATH 
 will make any difference, but perhaps you should put the `period' 
 `dot' at the front of your CLASSPATH .
 
 Do you have somethin in your ~/.bashrc or equiv login sheel that is 
 redefining the CLASSPATH? 
 
Pete

__ Reply Separator _
Subject: JFC Compilation still bothersome
Author:  sgee ([EMAIL PROTECTED]) at lon-mime
Date:02/11/98 15:52


Still having problems compiling
 
import com.sun.java.swing.*;
 
public class test extends JFrame{
 
 public test(){
  this.setSize(300,300);
  this.setVisible(true);
 }//end constructor
 
 public static void main(String args[]){
  new test();
 }//end main
 
}//end class
 
 
ERROR:
test.java:2: Package com.sun.java.swing not found in import. 
import com.sun.java.swing.*;
 ^
test.java:3: Superclass JFrame of class test not found. 
public class test extends JFrame{
 ^
2 errors
 
I have tried using
import javax.java.*;
 
as well as having added swingall.jar and motif.jar?
 
I appreciate the help this far,
any more ideas?
 
Steve
 



Re: JFC Compiling problems?

1998-11-02 Thread peter . pilgrim

 What is the compilation error ?


__ Reply Separator _
Subject: JFC Compiling problems?
Author:  sgee ([EMAIL PROTECTED]) at lon-mime
Date:30/10/98 19:35


Any reason why I can run ". runnit" from the SwingSet directory, but can't 
get this to compile?
 
import com.sun.java.swing.*;
 
public class test extends JFrame{
 
 public test(){
  this.setSize(300,300);
  this.setVisible(true);
 }//end constructor
 
 public static void main(String args[]){
  new test();
 }//end main
 
}//end class
 
 
SysVariables
JAVA_HOME="/usr/local/jdk1.1.6"
CLASSPATH="/usr/local/jdk1.1.6/lib/classes.zip:/usr/local/swing-1.0.3/swing 
.jar:."
PATH=$PATH":/usr/local/jdk1.1.6/bin"
 
Any ideas on what happens?
 



Netscape Reload Java Applet; Was there a soln?

1998-11-04 Thread peter . pilgrim

 Did anyone solve the Netscape 4.0x bug/feature where you could NOT get 
 an Applet to restart by hitting the [RELOAD] button?
 
 Pete



RE: Netscape Reload Java Applet; Was there a soln?

1998-11-04 Thread peter . pilgrim

 
Thanks a lot mate!

__ Reply Separator _
Subject: RE: Netscape Reload Java Applet; Was there a soln?
Author:  TRAM.N.NGUYEN ([EMAIL PROTECTED]) at lon-mime
Date:04/11/98 17:54


There's workaround for that problem . [Shift key + Reload] should reload 
your applet.
 
-Tram
 
Tram Nguyen N.
Science Application International Corporation 
http://www.saic.com
(619) 646-3357
 
> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] 
> Sent: Wednesday, November 04, 1998 9:47 AM
> To:   [EMAIL PROTECTED]
> Subject:  Netscape Reload Java Applet; Was there a soln? 
> 
>  Did anyone solve the Netscape 4.0x bug/feature where you could NOT 
> get 
>  an Applet to restart by hitting the [RELOAD] button? 
>  
>  Pete



Re: Basics of using JNI under Linux

1998-11-05 Thread peter johnson



Nicholas Matsakis wrote:

> Briefly, I am trying to call a native method under Linux.  I have a
> decent understanding of the JNI, and have gotten my code to load under
> windows, but am unable to load the shared library under Linux. Other
> relevant details include my system profile: Slackware, libc.so.5, JDK 1.1.6v5
>
> As I understand it, the process is:
>
> 1) Write your java file, declaring native methods
> 2) Run javah on the file to get your headers
> 3) Implement the native methods in (my case in) C++
> 4) Compile the C++ code to object files
> 5) Link the object files into a shared library (are the following
>compiler options sufficient?)
>
> gcc -lm -shared -Wl,-soname,libreceng.so -o libreceng.so lots_of_files.o
>
> I am currently not interested in putting version numbers on my shared
> library, is that necessary?
>
> 6) Put the shared library in your shared library path.  Where is this
> path define, exactly? I'm using tcsh, and I presume that $LPATH is the
> path I'm interested in.
>
> 7) Run your java.
> --
> At step 7 I get the following error:
>
> matsakis@natural-log>av index.html
> File not found (libreceng.so)
> Exception occurred during event dispatching:
> java.lang.UnsatisfiedLinkError: no receng in shared library path
> at java.lang.Runtime.loadLibrary(Runtime.java)
> at java.lang.System.loadLibrary(System.java)
> at NLI.RecEng.(Demo.java:87)
> at NLI.Demo.evaluate(Demo.java:70)
> at NLI.Input_Panel.handleEvent(Input_Panel.java:38)
> at java.awt.Component.postEvent(Component.java:1986)
> at java.awt.Component.postEvent(Component.java:1996)
> at java.awt.Component.postEvent(Component.java:1996)
> at java.awt.Component.dispatchEventImpl(Component.java:1793)
> at java.awt.Component.dispatchEvent(Component.java:1708)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)
>
> Any suggestions?
>
> Nick Matsakis

I'm not 100% sure, but I believe you have to use -PIC (position independent code)
flag on the compile.

Peter Johnson
[EMAIL PROTECTED]



Re: JDBC on Linux

1998-11-10 Thread peter . pilgrim

 Have you tried the list of 3rd party drivers at 
http://www.javasoft.com/products/jdbc/jdbc.drivers.html ?

__ Reply Separator _
Subject: JDBC on Linux
Author:  carlos ([EMAIL PROTECTED]) at lon-mime
Date:09/11/98 16:51


I have an applet which imports java.sql and it provides DB access, Sybase 
system 10 specifically, and my applet works fine but I programmed my 
applet on Win32. I downloaded the driver ConnectSoftware's FastForward and 
now I'm with Linux (and I'll be with Linux).
 
I want run my applet on my Linux box but I need a driver. 
Does anybody know how can I get it freely?
 



PLAF Motif Button reduce external Padding or Interspacing

1998-11-13 Thread peter . pilgrim

 In Swing 1.1 Beta 2 the CDE/Motif PLAF seems to put a large gap size 
 or interspacing between components.
 
 I have a three JButtons with an image icon aligned right and text 
 label aligned to the right inside of a normal JPanel. The JPanel is 
 managed by a custom row column layout manager which forces the bounds 
 of the components. In the Metal PLAF this displays very nicely with 
 buttons layed very close together. However when I switch to the 
 CDE/Motif PLAF the interspace between buttons expands, consequently 
 the JButton look a little __squoshed__!
 
 I have tried AbstractButton.setMargins( new Insets( 1,1,1,1 ) )
 
 But this does not work. I think the Motif PLAF UI adds the 
 interspacing but I dont know where to find it. If I can find it, 
 perhaps it just possible I can override it.
 
 Any Ideas?
 



Deprecated `Thread.stop()' in forthcoming JDK 1.2. Why?

1998-11-13 Thread peter . pilgrim

 I read somewhere that Thread.stop() is now deprecated. Now how on 
 earth do we stop a thread ?
 I thought the solution would be Thread.interrupt()
 but that only works when the thread is sleeping, at least in JDK 1.1 
 documentation.
 
 I do not have the JDK 1.2 to hand, and I have started use multiple 
 threads in Swing/JFC/. It seems to be idiocy to have a start method 
 and not have a stop method. The stop() method justs halts the thread 
 object and the garbage collector collects any rubbish.
 
 Thoughts?
 
 Pete



Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Wh

1998-11-13 Thread peter . pilgrim

Ok fair enough you can periodically check at interval on synchronised boolean to
cancel an operation. But I am disappointed.


The reason why I asked is because I use the JDBC. The current JDBC API does not 
allow the operator to have a callback or to read selective rows from the 
database. In other words:

Class.forName( "org.blackdown.jdbc.AnyOldDriver" );
Connection con = DriverManager.getConnection( url, username, password );
Statement stmt = con.createStatement( "select * from JDK_RELEASES" );

stmt.executeQuery();  // One atomic call with no way to run to !!!

Here is a case where it is NOT EASY to apply your notification if your table had
10 rows.

I have a spawn threads to execute the above SQL query and then allowed to 
operator to kill the thread if the query was slow. Hope fully the GC will
clean up afterwards. [In fact the forthcoming Xenon-SQL depends on it]

I guess the way to go will be:

1) Not to write API atomic slow methods like `executeQuery'
Instead use an Iterator or Cursor whatever man

2) Hopefully JDBC 2.0 will provide a method to retrieve N rows at a time. 
A cursor.


Pete

__ Reply Separator _
Subject: Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2.  Wh
Author:  Michael.Sinz ([EMAIL PROTECTED]) at lon-mime
Date:13/11/98 15:32


On Fri, 13 Nov 1998 15:15:29 +, [EMAIL PROTECTED] wrote:
 
> I read somewhere that Thread.stop() is now deprecated. Now how on 
> earth do we stop a thread ?
> I thought the solution would be Thread.interrupt()
> but that only works when the thread is sleeping, at least in JDK 1.1 
> documentation.
> 
> I do not have the JDK 1.2 to hand, and I have started use multiple 
> threads in Swing/JFC/. It seems to be idiocy to have a start method 
> and not have a stop method. The stop() method justs halts the thread 
> object and the garbage collector collects any rubbish.
> 
> Thoughts?
 
There are reasons for some of the thread changes, mainly that the JVM 
can not control the threads as well on native threading systems (even 
more so when the thread is maybe running on another CPU)  There would 
be far too much overhead in normal operation.
 
You can implement your own thread operations but you would then need to 
have the overhead only in those cases.  (It also will have the same 
problems with multi-processor/native thread operations and the like
but if you really want a harsh stop(), it may be the only way)
 
I too like the feature but it is easy enough to have your own notification.
 
A harsh stop may not be able to control what is happening at the moment or 
it would have to only check at certain points within the operations.
 
 
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: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Wh

1998-11-13 Thread peter . pilgrim

 Pass! I have no idea. But it is not really useful in a GUI.
 
 [EXECUTE] SQL query[ABORT] SQL query

What timeout should I have set BEFOREHAND.

Should it be 1 ms , 1sec , and 1 hour

For a non-deterministic application like an event driven GUI. 
I think not, I'm afraid.

For application threads which you and have source for now. It is better
to use a synchronised interval work scheduling as other people have graciously 
suggested. And yes, I agree this is best way for native thread support. However 
if the API does not support it, then you are truly buggered. Most SQL queries 
will be short and hopefully JDBC 2.0 will improve the situation with some sort 
row iterator. Get rows 1 to 100, then 101 to 200, 201 to 301 and so on. May be 
even how many rows will I be returned from this query if database can tell you 
(percentage driven JProgressBar taar daa!).  but for now ...

[ABORT] ---> queryThread.stop()


Unfortunately my weekend begins here.

Pete


__ Reply Separator _
Subject: Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2.  Wh
Author:  paul ([EMAIL PROTECTED]) at lon-mime
Date:13/11/98 17:29


 
 
[EMAIL PROTECTED] wrote:
...
> Class.forName( "org.blackdown.jdbc.AnyOldDriver" );
> Connection con = DriverManager.getConnection( url, username, password 
);
> Statement stmt = con.createStatement( "select * from JDK_RELEASES" ); 
> 
> stmt.executeQuery();  // One atomic call with no way to run to !!!
 
> I have a spawn threads to execute the above SQL query and then allowed to 
> operator to kill the thread if the query was slow. 
Can stmt.setQueryTimeout(someTimeout) help you? Your software could even 
compute different timeouts depending on expected query complexity.
 
Pavel



Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Wh

1998-11-13 Thread peter . pilgrim

 
Ahh Well done JavaSoft!!!



 the default transaction isolation level of the underlying database is used 
for the result set that is created. Note that this code is
just JDBC 1.0 code, and that it produces the same type of result set that would 
have been produced by JDBC 1.0. 

 Connection con = DriverManager.getConnection(
 "jdbc:my_subprotocol:my_subname");
 Statement stmt = con.createStatement();
 ResultSet rs = stmt.executeQuery(
 "SELECT emp_no, salary FROM employees");

The next example creates a scrollable result set that is updatable and sensitive
to updates. Rows of data are requested to be fetched
twenty-five at-a-time from the database. 

 Connection con = DriverManager.getConnection(
 "jdbc:my_subprotocol:my_subname");

 Statement stmt = con.createStatement(
 ResultSet.TYPE_SCROLL_SENSITIVE,
 ResultSet.CONCUR_UPDATABLE);
 stmt.setFetchSize(25);

 ResultSet rs = stmt.executeQuery(
 "SELECT emp_no, salary FROM employees");



``setFetchSize( N )''

Surf to: 

http://www.javasoft.com/products/jdk/1.2/docs/guide/jdbc/spec2/jdbc2.0.frame5.ht
ml

Over to all you JDBC implementors

Pete

__ Reply Separator _
Subject: Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2.  Wh
Author:  Peter Pilgrim at London
Date:13/11/98 18:00


 Pass! I have no idea. But it is not really useful in a GUI.
 
 [EXECUTE] SQL query[ABORT] SQL query
 
What timeout should I have set BEFOREHAND.
 
Should it be 1 ms , 1sec , and 1 hour
 
For a non-deterministic application like an event driven GUI. 
I think not, I'm afraid.
 
For application threads which you and have source for now. It is better
to use a synchronised interval work scheduling as other people have graciously 
suggested. And yes, I agree this is best way for native thread support. However 
if the API does not support it, then you are truly buggered. Most SQL queries 
will be short and hopefully JDBC 2.0 will improve the situation with some sort 
row iterator. Get rows 1 to 100, then 101 to 200, 201 to 301 and so on. May be 
even how many rows will I be returned from this query if database can tell you 
(percentage driven JProgressBar taar daa!).  but for now ...
 
[ABORT] ---> queryThread.stop()
 
 
Unfortunately my weekend begins here.
 
Pete
 
 
__ Reply Separator _
Subject: Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2.  Wh
Author:  paul ([EMAIL PROTECTED]) at lon-mime 
Date:13/11/98 17:29
 
 
 
 
[EMAIL PROTECTED] wrote:
...
> Class.forName( "org.blackdown.jdbc.AnyOldDriver" );
> Connection con = DriverManager.getConnection( url, username, password 
);
> Statement stmt = con.createStatement( "select * from JDK_RELEASES" ); 
> 
> stmt.executeQuery();  // One atomic call with no way to run to !!!
 
> I have a spawn threads to execute the above SQL query and then allowed to 
> operator to kill the thread if the query was slow. 
Can stmt.setQueryTimeout(someTimeout) help you? Your software could even 
compute different timeouts depending on expected query complexity.
 
Pavel



Re: Is there a decent file explorer for Linux?

1998-10-27 Thread peter . pilgrim

 This is already failed project, unless you add custom JNI, because 
 ``File'' class does not support all types of file. e.g. Can I execute 
 a file? Is it a symbolic link? Is it character device? Sacrifice for 
 maximum portability.
 
Pete

__ Reply Separator _
Subject: Re: Is there a decent file explorer for Linux?
Author:  jrwatson ([EMAIL PROTECTED]) at lon-mime
Date:26/10/98 09:57


 
Chi-Ming Yang wrote:
 
>I think it is not difficult to use swing to do one. Do you think it is wort
hy to write one? Would anyone Linux user like it?
 
I think the java-linux list is for technical issues about the port, but Chi-Ming
 Yang has raised a question which relates to philosophies of  java and linux.  C
an there be a java window manager (Jwm) which will live on any platform and bypa
ss the window managers?
"Write once run anywhere" imples there will always be lots of something else to 
run in. Can someone advise a more appropriate place to read about this? I have l
ooked at
 
http://sunsite.unc.edu/javafaq/mailinglists.html
 
jim watson
 



Re: Why no audio player for java-linux?

1998-11-16 Thread peter . pilgrim

Absolut Nonsense.

Have you tried using one of the examples from the JDK demos, if you downloaded 
them. I think one of the applets in the Graphics subdirectory has something 
which plays audio sounds.

Is your sound card properly configured. The only game I know that used sound was
`XGalaga'. I think the problem lies with your software treating AWE64 as a SB16.

It may help to download the latest sound driver that you can get from Open Sound
System, then recompile the linux kernel. I think it is `www.opensound.com'

Pete

__ Reply Separator _
Subject: Why no audio player for java-linux?
Author:  chipg ([EMAIL PROTECTED]) at lon-mime
Date:16/11/98 15:56


I was wondering if the Blackdown port for linux supports sound. 
I have never been able to get a single sound out of java-linux. 
I am using a debian linux distribution with glibc
I have a soundblaster AWE64, but with the basic driver that treats it like an 
SB16
I am able to hear sound with various command line utilities and netscape 
plugins.
I can dump messages to my audio devices (/dev/dsp and /dev/audio) and get sound 
I made sure that appletviewer (actually a simlink to .java_wrapper) has setuid 
root so it can access those devices.
>From the properties menu selection I set unrestricted class access
I downloaded an example program from O'Reilly's Java Examples In A Nutshell 
which uses the simple AudioClip.play() to produce a sound.
Whenever I run the appletviewer with an applet that uses AudioClip.play() and it
comes to to play the clip
I get the following message sent to the terminal
 
no audio device
audio player exit
 
The applet stops.
 
I suspect this error message means the implementation I have is incapable of 
producing sound.
I cannot find any mention of sound problems with java anywhere on the internet 
nobody answers
any question I post related to this in newsgroups. 
Any leads would be greatly appreciated!
-Chip Grandits
 



Re: PLEASE What audio device is java linux looking for???]

1998-11-17 Thread peter . pilgrim

 Is your Sound card set up such that it conforms to the Sound-HOW-TO 
 LDP document.
 
 I presume that `/dev/dsp' symbolicly links to `/dev/dsp0' and 
 `/dev/audio' symbolicly links to `/dev/audio0' or something similar.
 
 If this is true `cat chirp.au > /dev/audio' will work, right?
 
 If not true then check your DMA and Interrupt setting from the 
 Sound-HOW-TO' document. I think the command is `cat /proc/interrupts' 
 and `cat /proc/devices'.
 
 First, I cannot see how the JDK cannot find your audio device, because 
 it will need a `/dev/audio' device file, and because the current JDK 
 1.1 can only play Sun Audio files. Second, writing a program to play 
 8bit through `/dev/audio' is very easy to implement.
 
 You call open("/dev/audio",...) and save the file descriptor handle 
 and set the flag `ioctl(...)' to set the sampling rate to 8000Hz. 
 Create a buffer for audio clip , read your audio clip from disk in to 
 buffer (just like a text file) and `write()' the buffer's contents 
 into the file descriptor `/dev/audio' until the contents are 
 exhausted.
 
 In other words it is as easy as writing a program that copys one file 
 to another with a few caveats empors. Hence I do not think it is JDK 
 is a fault. Your configuration probably is.
 
 BTW: XGalaga is an arcade game on Linux, which can play sounds!
 You might try any program which you can found, that can play sounds 
 like SoundStudio (written in Tcl/Tk/C ), XSox, Vrec, Vplay, etc.  
 Particularly anything that plays `.au' files. Look for players in the 
 Linux Sound & Midi pages for more infos `
 http://www.bright.net/~dlphilp/linux_soundapps.html '

Pete

__ Reply Separator _
Subject: PLEASE What audio device is java linux looking for???]
Author:  chipg ([EMAIL PROTECTED]) at lon-mime
Date:17/11/98 08:01


I cannot get java-linux to make any sound using the AudioClip.play() method
When I run the any applet which should play sound, when the sound is to play I g
et:
 
no audio device
audio player exited
 
(running with -debug, yeilds no additional information) 
I can play sound with other applications.
The appletviewer (.java_wrapper) has setuid root 
I have a /dev/dsp and /dev/audio
IS JAVA-LINUX LOOKING FOR SOMETHING ELSE!!!
Do these devices need some special characteristics?
 
I need some specific info on HOW blackdown implements sound, 
what does Blackdown's JVM do?!
 
[EMAIL PROTECTED] wrote:
 
> Absolut Nonsense.
>
 
What? This is from a vodka ad?
 
> Have you tried using one of the examples from the JDK demos, if you downloaded
> them. I think one of the applets in the Graphics subdirectory has something
> which plays audio sounds.
>
 
I've downloaded applets written by James Gosling for sun for the purpose of 
showinghow easy it is to play a sound.  It doesn't work! Nothing works, not from
O'Reilly
nothing I've written works, see goofy attached files.
 
> Is your sound card properly configured. The only game I know that used sound w
as
> `XGalaga'. I think the problem lies with your software treating AWE64 as a SB1
6.
>
 
What is XGalaga?
 
> It may help to download the latest sound driver that you can get from Open Sou
nd
> System, then recompile the linux kernel. I think it is `www.opensound.com' 
>
 
Excellent Idea!Did that!
Got the latest Driverrs from OSS!
got old code out of the way, untarred new code
ran make xconfig, make dep, make clean, make zImage, copied image, ran /sbin/lil
o
rebooted:
Still doesn't work.
 
> Pete
 
If I can't figure out how this works, the Microsoft JVM is how all our code will
 be
tested!
I will be staying late at work to reformat the HD on our linux box to re-install
windows 95
 
 
 
 
 
 
 
 
 
 
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
oneChirp.java
A stupid applet written to prove sound doens't work on my system 
*/
 
public class oneChirp extends Applet {
  protected AudioClip chirp;
  public void init() {
chirp = this.getAudioClip(this.getDocumentBase(), "chirp.au");
  }
  public boolean mouseDown(Event e, int x, int y) {
chirp.play();
return true;
  }
}
 


I cannot get java-linux to make any sound using the AudioClip.play() method
When I run the any applet which should play sound, when the sound is to play I get:

no audio device
audio player exited

(running with -debug, yeilds no additional information)
I can play sound with other applications.
The appletviewer (.java_wrapper) has setuid root
I have a /dev/dsp and /dev/audio
IS JAVA-LINUX LOOKING FOR SOMETHING ELSE!!!
Do these devices need some special characteristics?

I need some specific info on HOW blackdown implements sound,
what does Blackdown's JVM do?!

[EMAIL PROTECTED] wrote:

> Absolut

Re: Two questions on Swing:

1998-11-18 Thread peter . pilgrim

1) There is a problem with XFree86 that prevents top level accelerators 
being installed. I believe this with Metrolink X server with any problem. 
Mind you I have the exact same problem on 
sparc-sun-solaris-2.5.1-cde-motif1.2-jdk1.1.6-swing-1.1-beta-2

2) I think you can override the installed PLAF (pluggable look and feel) 
settings, but it means search through the source code in the 
`com.sun.swing.plaf.basic.BasicScrollBarUI' class. I think you must override the
defaults that are loaded in the UIManager properties.

UIManager.put("scroll.bar.foreground", Color.red );



It is stupid that you can't customise externally the components. 
Give me X resources any day. Perhaps that how JavaSoft should have coded it.
Maybe it needs a :


public class Resource { String name, Object value }

Resource resources[] = {
{ "troughArea.foreground", Color.red },
{ "troughArea.arrowColour", Color.blue },
} 


UIApplicationsResources.registerResources( JScrollBar.getUI().getClass(), 
resources );

...

// Read French Canadian property bundle file MyAppBundle_fr_ca.properties

ResourceBundle bundle=ResourceBundle.getBundle( "MyAppBundle" )
UIApplicationsResources.mergeBundle( "MyApplication", bundle )

Something like that. Dreaming ...

__ Reply Separator _
Subject: Two questions on Swing:
Author:  stevecoh ([EMAIL PROTECTED]) at lon-mime
Date:18/11/98 02:41


Here are two questions I've had on swing.  One pertains to java-linux, 
the other doesn't, but you guys have been very helpful to me so I 
thought I'd ask both.
 
1)  Accessing top level menus via keyboard in Swing.  Using Swing 1.0.3 
and jdk 1.1.6.  I can attach keystrokes to menu items via setMnemonic 
and this works.  When I attach keystrokes via setMnemonic() to top level 
JMenu, however, the keystroke doesn't work, even though the mnemonicized 
keystroke does appear in the Menu onscreen.  That's under redhat 5.0.
If I take the program and run it on Win95 then the key stroke access 
does work.  What's going on here?
 
2)  Is there any way to change the colors of the arrow buttons and thumb 
in a JScrollBar? I can change everything but that and with the colors 
I've chosen, they look really stupid.  I realize that this probably 
violates the whole look and feel idea which is so prevalent in Swing, but 
there ought to be some way to get at these things.



[ANNOUNCE] New Release Xenon-SQL V2.2.9.8

1998-11-18 Thread peter . pilgrim

SOFTWARE RELEASE ANNOUNCEMENT
===

Xenonsoft, South London, England is very pleased to announce the
availability of:


Xenon-SQL, the java based interactive SQL Editor, version 2.2.9.
 The Personal End User Edition. 


This software allows you use connect to relational database like MySql,
Sybase, and Oracle and submit SQL queries and commands to the target
databases. In order for `Xenon-SQL' to connect to a database you __MUST__
have a suitable JDBC (Java Database Connectivity) driver specifically for
your database. Most commercial database suppliers have a supplied (or
contributed) JDBC driver around somewhere, so surf the Internet to find it!


The Xenon-SQL software can be obtain from the FTP server:

   `ftp://ftp.demon.net/pub/java'

or as a last resort `http://www.xenonsoft.demon.co.uk/software.html'.

The requires the Java Development Kit minimum version 1.1.5 and Swing also
known as the Java Foundation Classes miminum version 1.2-Beta 2. These are
available from JavaSoft's web site: `http://java.sun.com/products/'

*** WARNING ***: The software will __NOT__ work with JFC 1.2-Beta 3 because
this release features the new stable package name `javax.swing.*'. The
current version of the software expects to find Swing under the package
name `com.sun.java.swing.*' as in the JFC 1.2-Beta 2 release.

*** NOTE ***: In the near-future, `Xenon-SQL' will be upgraded to use the
new JFC/Swing package names.


The software was developed on a Linuxed/PC with Blackdown's 1.1.6v3 port of
the JDK `http://www.blackdown.org/java-linux.html'


SunSoft[tm] maintains a list of JDBC drivers from a number of third party
vendors on it web pages See the following URL for a list of JDBC drivers
provided:

http://java.sun.com:80/products/jdbc/jdbc.drivers.html

Please read the license file `LICENSE*'. For installation instructions read
the `INSTALL' file.




NEW FEATURES
=

o  Xenon-SQL is now MULTI-THREADED! Each editor frame can now execute
   separate SQL commands as a background task. The application is no longer
   blocked on the AWT event queue. No more hours glasses or watches. A
   background command thread is started with the [Execute] button. The
   thread can be halted by the new [Stop] image button. I did a test to
   prove the concept worked by forcing the thread to sleep 10.0 seconds
   whilst using two editor frames.

o  Since Xenon-SQL is now multithreaded. Two new components have been
   created and introduced, namely the `JFlashProgressPanelBar' and
   `JStatusBar'.  The flash progress bar animates when SQL command is
   executed as a background task. The status bar is container for the new
   flash progress bar and a message label, where `Xenon-SQL' writes generic
   messages.

o  Xenon-SQL now uses the `JFileChooser' component, because the API is more
   stable. SQL command history can save in `native' format and portable
   `ascii' text format. The native format is a java object serialisation,
   and the text format allows you to edit and change the entire SQL command
   history in an external editor, such as GNU Emacs. Save your some changes
   and reload the history back into Xenon SQL.

o  Meta Data Query Tree Dialog displays extra tree nodes in addition to
   representing all catalogues in the database. The new tree nodes are
   primary keys, imported key, exported keys, database types, and index
   information. There new node have some nice icons to go with them.

o  `Strategies' to calculate the best column width in a table, and therefore
   display a visually pleasantly table.

o  `Pluggable Look And Feel' overdue support for a standard Swing/JFC
   feature. Yes. `Xenon-SQL' can now switch between "look and feels".

o  `SliderDials' to control the row height and the intercell spacing in the
   tables. These slider dials behave look and behave similar to the leading
   edge dials as seen in the Silicon Graphics[tm] `Inventor' 3D Graphics
   application.

o  A user request to load up multiple JDBC drivers at start-up time has been
   added. The property in the `~/.xsql_login' file has been changed to
   allow this. The property is now called `Xsql.jdbc.driverList'.

o  More internationalisation has been added to fully support the above new
   features.




OLD FEATURES 2.1.7p01
===





The software has been tested:

+  against MySQL[tm] compiled on Linux with the
   `twz1.jdbc.mysql.jdbcMysqlDriver' JDBC driver.


+  against Sybase[tm] SQL Server/11.03 with the
   `connect.syabse.SybaseDriver 3.0' JDBC driver.






You can download the Java Foundation Classes from JavaSoft:

http://java.sun.com/products/jfc

You can find out the lastest information about Swing from JavaSoft's
Web site, The Swing Connection:

http://java.sun.com/products

Re: Linux + java + oracle

1998-11-19 Thread peter . pilgrim


SunSoft[tm] maintains a list of JDBC drivers from a number of third party
vendors on it web pages See the following URL for a list of JDBC drivers
provided:

http://java.sun.com:80/products/jdbc/jdbc.drivers.html



__ Reply Separator 
_
Subject: Linux + java + oracle
Author:  przemol ([EMAIL PROTECTED]) at lon-mime
Date:19/11/98 10:05


How can I connect to Oracle using java on Linux ? 
But ! we have in job Oracle 7.1.* so I cannot
use Oracle Thin driver which works only with 
Oracle 7.3.* (I guess) and above.
 
przemol
-- 
[EMAIL PROTECTED]



Re: Linux + java + oracle

1998-11-20 Thread peter . pilgrim

Check your CLASSPATH. It must indicate the zip file or jar file which contains 
the `oracle.jdbc.driver.OracleDriver.class'.

Pete

__ Reply Separator _
Subject: Re: Linux + java + oracle
Author:  duan ([EMAIL PROTECTED]) at lon-mime
Date:20/11/98 00:52


 
maybe this is unrelated but i need help
 
I am using JDBC driver to connect to Oracle 8.0.5 under linux.
 
However i keep getting unknown driver.I use 
oracle.jdbc.driver.OracleDriver as the name of the JDBC driver?Anyone can 
tell me if this is the correct driver.
 
Sorry for this.I have no way to go for help.
 
regards
duan
 



Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2. Wh

1998-11-23 Thread peter . pilgrim

In fact the JDBC provides anyway to handle this in `Statement.cancel()' 
which allows an executed SQL query or update to be halted from _another_ 
thread. In other words the CancellableThread or equivalance is the 
responsibility of the JDBC driver implementor not the JDBC user. Careful 
programming with state transitions should alleviate any headaches ... 
 
Pete

__ Reply Separator _
Subject: Re: Deprecated `Thread.stop()' in forthcoming JDK 1.2.  Wh
Author:  trebla ([EMAIL PROTECTED]) at lon-mime
Date:22/11/98 19:32


Steve Byrne <[EMAIL PROTECTED]> writes:
 
> This, in effect, is that the interrupt mechanism does.  It sets an 
> interrupted flag in the thread that user code can watch for, and I 
> think it breaks you out of Thread.sleep or other thread related
> operations.
 
Right.  Sleeping and blocking I/O are interrupted by the interrupt 
mechanism; when this happens, the I/O methods and the sleep method 
throw an appropriate exception that tells you it is interrupted.
 
I want to remark that there is no silver bullet; so I am glad that a 
silver bullet is deprecated.



Re: Keyboard input problems

1998-11-23 Thread peter . pilgrim

I have a whiteboard edition of Together/C++ for NT4.0 at work. I thought 
that you had to explicitly get TC++ to scan by choosing the menuitem from 
the menu bar. First, I did not know it did not worked in parallel with 
other tools?! Are you using TJ's built in editor to work?  Don't.  Get 
Emacs/XEmacs/Jed/Jove or other alternivate editor to change your files , 
then ask TJ to update and scan when you want it to update the UML object 
modesl. That's my suggestion anyway.

Pete
__ Reply Separator _
Subject: Keyboard input problems
Author:  jcollins ([EMAIL PROTECTED]) at lon-mime
Date:23/11/98 03:35


Greetings -
 
I am trying to evaluate a large Java package from Object International 
called Together/J.  It comes up, analyzes classes, and generates 
documentation both with the jdk1.1.7v1a interpreter and with the tya 
compiler.  With the compiler, it's performance is tolerable, except that 
it can't really handle keyboard input in most input contexts.  If you 
type r..e..a..l..l..y  s..l..o..w, it works OK, but as soon as you type 
at a normal pace, the characters get scrambled badly -- you don't lose 
characters, but they are out of order.  It's very repeatable.  I'm 
writing to java-linux about this because the same app on NT works fine. 
About the same performance, but keyboard input works.
 
Is this a known problem?
 
Environment: RH 5.0, kernel 2.0.34, glibc 2.0.7, Dell Pentium2/266, 128 
meg RAM.
 
Cheers -
 
John Collins
University of Minnesota



Re: why cant my netscape execute JDK-1.1.* - progs ?

1998-11-23 Thread peter . pilgrim

On my netscape 4.05 at home (and at work) I had put 
`${MOZILLA_HOME}/java/classes/java40.jar' explicitly in my ``CLASSPATH'' 
environment variable. (preferably set this in my ~/.tcshrc)

Pete

__ Reply Separator _
Subject: why cant my netscape execute JDK-1.1.* - progs ?
Author:  mic ([EMAIL PROTECTED]) at lon-mime
Date:23/11/98 12:40


i got JDK-1.1.6 for Linux (SUsE) 
and netscape 4.5 ... 
i downloaded a java-tutorial with included 
examplefiles from the www
the example-applet-files are provided both as 
1.0.* - and 1.1.* -versions ...
opening these files with my browser works well 
with the 1.0.* - versions but fails for 1.1.*
 
the appletviewer that is included in the JDK-package 
works with both versions ... netscape on the other 
hand claims to do that as well ... however :-(
 
what could be wrong ?
 
thanx for any hints
 
mic
 
_ 
Michael Brunsteiner
<[EMAIL PROTECTED]>




Re: Is Swing available?

1998-11-23 Thread peter . pilgrim

Try `http://www.javasoft.com/products/jfc'. Swing/JFC is 100% pure Java so you 
just need to download the zip file from JavaSoft after you registerly freely 
with them. I would advise you to get the Swing/JFC 1.1 Beta 3 

Pete
__ Reply Separator _
Subject: Is Swing available?
Author:  pjh ([EMAIL PROTECTED]) at lon-mime
Date:23/11/98 13:21


First, my apologies for what I know has to be a dumb question.
 
I just started trying to use java with RHL 5.2 and downloaded all the tarballs 
for jdk, jre, etc. and then used the examples from the Java NutShell book to 
"exercise" the installation with everything fine except -

 
Patrick



  1   2   3   4   5   >