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



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



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
 



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: 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: 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/jfc/tsc/





Enjoy baby bop.


Peter A. Pilgrim
Member of the Association of C/C++ User group UK. 
Thu Sep 10 15:16:12 BST 1998

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



Can you use Java as a Job Scheduler?

1998-11-23 Thread peter . pilgrim

[WORK RELATED] Before I jump off the deep end.

I presume there is nothing to prevent Java being used a job scheduler.
That is the JVM creates say 3 worker threads and each of these worker 
thread executes a process like `/bin/ls -l ; sleep 60'.

I asked because I have called `Process.waitFor()' to wait for the job to 
complete is the past and it obvious blocks the thread, but does JVM itself 
block or does it let the other threads to continue. Latter being ideal I 
can then develop at home (telecomute perhaps on linux-jdk)

Pete



[CANCEL] Re: Can you use Java as a Job Scheduler?

1998-11-23 Thread peter . pilgrim

Of the course, the thread won't block itself if I do not put `synchronized 
run' in the Runnable object!!!
EOT


__ Reply Separator _
Subject: Can you use Java as a Job Scheduler?
Author:  Peter Pilgrim at London
Date:23/11/98 15:30


[WORK RELATED] Before I jump off the deep end.
 
I presume there is nothing to prevent Java being used a job scheduler. 
That is the JVM creates say 3 worker threads and each of these worker 
thread executes a process like `/bin/ls -l ; sleep 60'.
 
I asked because I have called `Process.waitFor()' to wait for the job to 
complete is the past and it obvious blocks the thread, but does JVM itself 
block or does it let the other threads to continue. Latter being ideal I 
can then develop at home (telecomute perhaps on linux-jdk)
 
Pete



Re: Getting a full JVM thread dump

1998-11-24 Thread peter . pilgrim

Have you tried CTRL-\ ?

pete

__ Reply Separator _
Subject: Getting a full JVM thread dump
Author:  craig ([EMAIL PROTECTED]) at lon-mime
Date:24/11/98 18:34


Hi,
 
Does anyone know how to get a full JVM thread dump under linux?  Under 
windows you just do a ctrl-break.  I remember reading about some signal, 
and/or keystroke that could do it.
 
Cheers, Craig



Re: Netscape/CLASSPATH question

1998-11-25 Thread peter . pilgrim


I had to name it explicitly at work (sparc-sun-solaris-2.5.1) and home 
(i586-slackware-linux-gnulib1) to get Netscape to work.

export CLASSPATH=...:${MOZILLA_HOME}/java/classes/java40.jar:...

Pete

__ Reply Separator _
Subject: Re: Netscape/CLASSPATH question
Author:  song ([EMAIL PROTECTED]) at lon-mime
Date:24/11/98 13:37


It will do if I remove MOZILLA_HOME and CLASSPATH
from the .bashrc file (so they are not defined). It sounds 
strange but it works somehow.
 
Mike
--
Mike Song wrote:
 
> Hello all,
>
> Question:
> Netscape complains that it could not find java40.jar in 
> the directories listed in $CLASSPATH.
>
> My system:
> RH Linux 5.2/Netscape 4.5/PC
>
> In my .bashrc file:
> MOZILLA_HOME=/usr/local/netscape
> export MOZILLA_HOME
> CLASSPATH=$MOZILLA_HOME/java/classes:$HOME/java/tutorial 
> export CLASSPATH
>
> env command correctly report above settings. Directory and file 
> permissions are also OK.  java40.jar is located in
> $MOZILLA_HOME/java/classes directory 
>
> When I start netscape to load  a HTML file (which loads an 
> applet), netscape gives the following error message:
> Unable to start a java applet, can not find java40.jar in your 
> CLASSPATH...
> Current value of CLASSPATH:
> /usr/local/netscape/java/classes:... 
>
> The reported CLASSPATH actually contains the directory where
> java40.jar is located. The reported CLASSPATH contains more directories 
> than the settings from .bashrc file.
>
> (By the way, I am able to start the same applet by: 
> appletviewer HelloWorld.html)
>
> Any idear why?
>
> Appreciate you help !
>
> Mike Song
> [EMAIL PROTECTED]



Re: Netscape/CLASSPATH question

1998-11-25 Thread peter . pilgrim

Excuse me. Yes Micheal is absolutely right, about unsetting CLASSPATH.
Must you put a jar in the ${MOZILLA_HOME}/java/classes?

__ Reply Separator _
Subject: Re: Netscape/CLASSPATH question
Author:  Michael.Sinz ([EMAIL PROTECTED]) at lon-mime
Date:24/11/98 14:52


On Tue, 24 Nov 1998 13:37:12 +, Mike Song wrote:
 
>It will do if I remove MOZILLA_HOME and CLASSPATH
>from the .bashrc file (so they are not defined). It sounds 
>strange but it works somehow.
 
Actually, it is documented in Netscape's readme that the 
browser's JVM looks at CLASSPATH if defined and will *only* 
look there for its own classes.  If it is not defined, it 
will look at the directory where the binary lives to find 
the jar/zip files.
 
What I did was to make a netscape script file that lives in 
/usr/local/bin that unsets CLASSPATH, just in case it was set, 
and then runs the netscape binary (thus the netscape binary is 
not actually in the path)  This makes it work perfectly.
 
 
 



Re: JWindow.setLocation()

1998-11-27 Thread peter . pilgrim

I have used JWindow to implement a splash screen for Xenon-SQL. I had a bit 
of trouble with `setBounds()' after I packed it and set it the middle of 
the screen. I turns out that just packing worked on Linux/KDE but failed on 
Solaris/CDE Motif. I have to perform a setSize() and pack() and 
setVisible(true) to get the behaviour that I wanted. Weird code.


WISHLIST:

`Window.raiseWindow()' raise the window to the top the native window stack.

`File.chdir( String path )'  changed working directory.
`File.canExecute()' file is an executable.
etcetera

Pete


__ Reply Separator _
Subject: Re: JWindow.setLocation()
Author:  cata ([EMAIL PROTECTED]) at lon-mime
Date:27/11/98 19:13


Hi Robert,
I'm using KDE.
I think I found a way to temporary solve the problem in my case.
I've noticed that JWindow.setLocation() works fine if the JWindow.isVisible().
 
Fortunately, I use a class that extends JWindow, so I have overridden the 
setLocation method:
public void setLocation(int x, int y) 
{
if(!isVisible())
{
setVisible(true);
super.setLocation(x,y);
setVisible(false);
}
else
super.setLocation(x,y);
}
 
And now it seems to work.
 
Robert P. Biuk-Aghai wrote:
 
> I suspect it's a window manager problem. Which wm do you use?
 
>
>
> I too have noticed problems that I believe to be wm problems. In my 
> case, using fvwm, when I start an application (extending JFrame from
> Swing 1.0.2) with a menubar it is placed at position 0,0. When I click 
> on a menu in the menubar, the menu is displayed aligned with the top
> edge of the menubar, which is also the top edge of the JFrame's
> internal area, rather than being aligned with the bottom edge of the 
> menubar. This has unpleasant side effects when clicking on the menu 
> and releasing the mouse button, as this is taken as a mouse click on 
> whatever menu item (mostly the first one) that is displayed in the
> menu at that position), rather than posting the menu below the mouse 
> cursor awaiting user selection. However, when I move the window
> around, even back to 0,0, it works fine. 
>
> Any advice on this one, or do I just have bear it with patience? 
>
> Robert.
>
> On Fri, 27 Nov 1998, Catalin CLIMOV wrote: 
>
> > Hi,
> > I have an application in a JFrame, and sometimes I have to show a 
> > JWindow somewhere on the screen.
> > It seems JWindow.setLocation() is not working properly. To be more
> > precise, my JWindow appears always at (0,0), doesn't matter the real 
> > location I want.
> > But if I move the JFrame on the screen (with the mouse), and then 
> > display JWindow, it shows where it has to.
> > I use jdk 1.1.7-v1a-glibc with native threads on a RedHat5.1. 
> >
> > Does anyone know what is happening, and how can I solve that ? 
> >
> > Catalin.
> >
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Robert P Biuk-Aghai, University of Macau, Faculty of Science and Technology 
> http://hyperg.sftw.umac.mo/robert/tel: +853-3974365fax: +853-838314 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Microsoft isn't the answer. Microsoft is the question and the answer is no.
 
 
 
--
 \|/  \|/
  @~/ Oo \~@
 /_( \__/ )_\
\__U_/
 
 



Re: Dialogs in applets [finding the nearest frame]

1998-12-02 Thread peter . pilgrim

Stick in this in your main applet code:

static Component getAncestorFrame( Component comp )
{
while ( comp != null && !instanceof Frame )
comp = (Component)comp.getParent() );
return (comp);
}

Pete


__ Reply Separator _
Subject: Re: Dialogs in applets
Author:  welzel ([EMAIL PROTECTED]) at lon-mime
Date:02/12/98 05:23


I saw a message a while back in the list about using modal dialogs in 
Applets.  I just want to get a Dialog to work in an applet and could use 
some advice.  The constructor for a Dialog wants a Frame.  How do I get a 
Frame from a JApplet?
 
Some documentation I had suggested using the getParent() method on the 
applet, but this is no good since it returns a Container.
 
Doug



Re: swing-1.1beta3

1998-12-03 Thread peter . pilgrim



Until JDK 1.2 arrives for Linux you include the path to swing.jar in your 
CLASSPATH explicitly a la

export SWING_HOME=/usr/local/swing-1.1-beta3
export CLASSPATH=.${SWING_HOME}/swingall.jar

Pete
__ Reply Separator _
Subject: swing-1.1beta3
Author:  wdacruz ([EMAIL PROTECTED]) at lon-mime
Date:01/12/98 22:11


I'm having some problems to install swing-1.1beta3 on RH5.2.

1. I installed jdk in /java/jdk117_v1a/
2. I downloaded swing11-beta3.tar.z into /java
3. tar xvzf swing11-beta3.tar.z created directory /java/swing-1.1beta3 + 60 
html files own by user uucp and group 143.
4. I added the following lines to .bash_profile for user /home/wdacruz: 
PATH:/java/swing-1.1beta3:$PATH
CLASSPATH=.
SWING_HOME=/java/swing-1.1beta3
export PATH CLASSPATH SWING_HOME
5. wdacruz env shows:
...
PATH=/java/swing-1.1beta3:/java/jdk117_v1a/bin: 
SWING_HOMEL=/java/swing-1.1beta3
...

6. I tested swingapplication.java that start: 

import javax.swing.*;   // This is the final packge name.
// import com.sun.java.swing.*; // Used by JDK 1.2 Beta 4 and all
 // Swing releases before Swing 1.1 Beta 3.
...

7. javac swingapplication.java
I got the error message: Package javax.swing not found in import 
import javax.swing.*;
   ^
JDK1.1.7_v1a works fine, but the compiler does not find the swing 
package. What I am doing wrong?  Did I installed swing-1.1beta3 in the 
wrong d



Re: JFrame

1998-12-04 Thread peter . pilgrim

Use a JWindow instead of a JFrame, but see put the logic to set a 
reasonable window size in overriden `setPreferredSize()'

In this example I set up a maximum size limitation:
 



public class PetesSplash extends JWindow

private JLabel labelImage;
private JLabel copyLabel
private Image aSplashImage;

   // ...

public PetesSplash( String imageName ) {

// ...

copyLabel = new JLabel( "(c) Dukey Enterprise, 1998" );
// ...

// create and add components and then pack em
pack();

// set the window's bounds, centering the window on the screen
// like a splash window.
Dimension size = getSize();
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screen.width-size.width)/2;
int y = (screen.height-size.height)/2;
setBounds(x,y,size.width,size.height);
}

/** Returns the dialog's maximum size */
public Dimension getMaximumSize() 
{
Dimension size = getSize();
Dimension limit = new Dimension();  
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();

limit.width = screen.width * 2 / 3;
limit.height = screen.height * 2 / 3;

// System.out.println("size:"+size);
// System.out.println("screen:"+screen);

if ( screen.width < 900 ) {
// Low resolution display
limit.width = screen.width * 3 / 4;
limit.height = screen.height * 3 / 4;
}
else {
// High resolution display
limit.width = screen.width * 2 / 3;
limit.height = screen.height * 2 / 3;
}

// System.out.println("limit:"+limit);

if (size.width > limit.width)
size.width = limit.width;
if (size.height > limit.height)
size.height = limit.height;

return (size);
}
...

   // ...

}




Pete

__ Reply Separator _
Subject: JFrame
Author:  aa ([EMAIL PROTECTED]) at lon-mime
Date:04/12/98 10:29


Hi

how kan i show one Frame without border?



Re: Important: Java 1.2 licencing changes

1998-12-08 Thread peter . pilgrim

Mrfr! I though a web hacker had crack www.javasoft.com at first!!!

Question is though was Steve in on it?

Pete

__ Reply Separator _
Subject: Important: Java 1.2 licencing changes
Author:  thomas ([EMAIL PROTECTED]) at lon-mime
Date:08/12/98 13:14


Just before 1pm GMT today, I visited http://www.javasoft.com/.  The site 
had been completely redesigned to announce that the JDK 1.2 technology had 
been re-named Java 2, and it was to be distributed under a new (more open) 
licence agreement.  Then a few minutes later it all disappeared and the 
old pages returned!

I have to presume that they just announced things a bit 
prematurely---unfortunately I didn't take copies of the new pages.

Thomas
-- 




Reading (All) Environment Variables in W95/NT

1998-12-14 Thread peter . pilgrim

I am getting some requests from NT users on an application that I wrote on 
a Java/Linux environment. I have a Java application that runs fine on Unix 
and I am trying to get to run perfectly on NT. I have a run time shell 
script that passes the entire environment to the JVM using a system 
property.

java -Denv=`env` xenon.xsql.editor.Xsql

The env produces the multiline environment variables list that we know and 
love. On running the application the program looks for the value of system 
property called `env'. Hence the JVM gets the entire environment. I have 
source code that breaks down the multiline value and cuts out each variable 
definition like `HOME=/home/peterp'. The definition is further split into a 
name and value (`HOME' and `/home/peterp') and then place stored in the 
system properties as renamed property `env.HOME' and `/home/peterp'. In 
short all the environment variable are prepended with `env.'. Using this 
hand-me-down old deprecated source code from an unknown URL, I can write 
code like this:

String imagesDir=System.getProperty("env.IMAGES_DIR");
String searchPath=System.getProperty("env.JAVAFILESEARCHPATH");


Of course this does not work with Windows NT (or 95/98). I am not an expert 
on NT. I do not think there is an equivalent for `env' under NT.
Is there such thing ?

Of course I could write a work around that involve just passing a limited
number of properties to JVM in a NT batch command `.BAT' file.

java -DIMAGES_DIR=%IMAGES_DIR%  ...  xenon.sql.editor.Xsql

Admittedly the full final code would look terrible ugly. I am clueless if 
the DOS? W95/NT Shell allows long character lines. Can you even do `back 
subtitution' using the W95/NT shell is also quite another thing as well? 
Also when I tried extending my `PATH' under W95 I got `out of environment 
space' or something?

However do any other java-linuxers know of a better solution or API?

Any help receives my grateful kudos.

Pete



Re: Reading (All) Environment Variables in W95/NT

1998-12-14 Thread peter . pilgrim

I think a small setup program that generates this default property file 
maybe the answer too. I am thinking of a simple JTable name and value.

Am not sure if I follow you.

Do you mean that I should set this in my application. Because then we have
a chicken and egg scenario. I want to use the properties to define where 
the application gets resources for images, audio, HTML files.

It is also impossible to have access to all possible platforms. What is needed 
is portable and customisable way of setting up default properties per user per 
machine. Something that work on non-UNIX machines as well.

Pete

__ Reply Separator _
Subject: Re: Reading (All) Environment Variables in W95/NT
Author:  Gerrit.Cap ([EMAIL PROTECTED]) at lon-mime
Date:14/12/98 11:49


There is a port available of a lot of unix commands for NT called the MKS 
toolkit, look for more info on www.mks.com. There are even some public 
domain ports but MKS is a low cost and good investment.

On the other hand, if you want to make your software platform independant I 
would stick around with basic java functionalities. So what I would do is 
to use in your java program a self defined properties file and read it 
through the Properties.load method. And out of your program build for each 
platform a way to generate that properties file. This can than be done on 
all platforms you want to run your applications on. There are platforms (eg 
Macintosh) where there is to my knowledge no environment available.

Gerrit.

At 09:58 AM 12/14/98 +, you wrote:
>I am getting some requests from NT users on an application that I wrote on 
>a Java/Linux environment. I have a Java application that runs fine on Unix 
>and I am trying to get to run perfectly on NT. I have a run time shell 
>script that passes the entire environment to the JVM using a system 
>property.
>
>java -Denv=`env` xenon.xsql.editor.Xsql 
>



Re: Reading (All) Environment Variables in W95/NT

1998-12-14 Thread peter . pilgrim

Thanks well I found my copy of jikes which has a `jd.bat' file:

pilgpe@poppy [58] > c jikes-1.11/jd.bat
@echo off
 rem Set JD and JDK to match the appropriate installation directories on 
your system.
 rem
 set JD=c:\derek\jbin\jd.zip
 set JDK=c:\java\lib\classes.zip
 rem
 echo on
 java -nojit -classpath %JD%;%JDK% jd.Main -nojit -classpath 
%JD%;%CLASSPATH%;%JDK% %1 %2 %3 %4 %5 %6 %7 %8 %9

After reading this batch file than I realised immediatelyt that getting 
software to run on different architecture is another  chestnut (problem). 
I guess not every Operating system will provide a batch or scripting 
language! (Well I think the Macintosh does not have one. Does it? )

Pete

__ Reply Separator _
Subject: Re: Reading (All) Environment Variables in W95/NT
Author:  paul ([EMAIL PROTECTED]) at lon-mime
Date:14/12/98 12:00


Try something like this in your NT/95 startup script (smth like this 
must work also on linux/bash with changing \ to /, %% to $, del to rm 
and doing smth with :s and ;s in multiple paths in environment):

set >%TMP%\env
java -Denv.file=%TMP%\env ...
del %TMP%\env

and then in your code:
Properties p = new Properties();
p.load(new FileInputStream(System.getProperty("env.file")); //

Hope this helps.

All the Best
Pavel

[EMAIL PROTECTED] wrote:
> 
> I am getting some requests from NT users on an application that I wrote on 
> a Java/Linux environment. I have a Java application that runs fine on Unix 
> and I am trying to get to run perfectly on NT. I have a run time shell
> script that passes the entire environment to the JVM using a system 
> property.
> 
> java -Denv=`env` xenon.xsql.editor.Xsql 
> 




Re: Reading (All) Environment Variables in W95/NT

1998-12-15 Thread peter . pilgrim

Ok assuming you can do 3 __where__ is the standard place for the property files 
per user per machine? I think it is best to write a software installer program 
to do this task. It would write the property file to `user.home' say and the 
main application would know where to look for it and load that file and make it 
a environment settings default. 

Peter

__ Reply Separator _
Subject: Re: Reading (All) Environment Variables in W95/NT
Author:  summer ([EMAIL PROTECTED]) at lon-mime
Date:14/12/98 23:09



3  Use java.util.Properties. This is what it's for. Here's what the stored 
format looks like:
[summer@possum etc]$ cat sp.profile
#Some comments supplied by app
#Mon Dec 14 13:38:48 GMT 1998
watchthis=BHP
dbserver=http://database/cgi-bin/
MyCharts.y=698
MyCharts.x=1216
watchlist=http://database/cgi-bin/list 
[summer@possum etc]$ 


> I am getting some requests from NT users on an application that I wrote on 
> a Java/Linux environment. I have a Java application that runs fine on Unix 
> and I am trying to get to run perfectly on NT. I have a run time shell 
> script that passes the entire environment to the JVM using a system 
> property.
> 
> java -Denv=`env` xenon.xsql.editor.Xsql 
> 



Request For OS Sys Props [was Re: Reading (All) EnvVars ]

1998-12-16 Thread peter . pilgrim

Right then.

I notice that the GIMP is very in that it creates a `~/.gimp subdirectory' 
to place multiple configurations. So does the the CDE on my Solaris box in 
`~/.dt'. On non-Unix machine the `dot' directory does not make a lot of 
sense. Is there a way to find if the JVM is running on a unix box or not?


If not I can do it the hard way.
can you mail me your UNIX & non UNIX settings:

System.out.println( "os.name= "+ System.getProperty( "os.name"));
System.out.println( "os.arch= "+ System.getProperty( "os.arch"));
System.out.println( "os.version = "+ System.getProperty( "os.version"));

Somebody must have already have done this, if not I publish the results in 
a web table in 1999!

Peter Pilgrim

__ Reply Separator _
Subject: Re: Reading (All) Environment Variables in W95/NT
Author:  summer ([EMAIL PROTECTED]) at lon-mime
Date:15/12/98 15:44


On Tue, 15 Dec 1998 [EMAIL PROTECTED] wrote:

> Ok assuming you can do 3 __where__ is the standard place for the property file
s 
> per user per machine? I think it is best to write a software installer program

> to do this task. It would write the property file to `user.home' say and the 
> main application would know where to look for it and load that file and make i
t 
> a environment settings default. 
> 

There is a convention on unix that user's config stuff ins written in ~/ 
with the result my home directory's become littered with dozens of .*rc 
files.

I've settled on putting mine in ~/etc/ 
You can find the home directory from the system properties and build a valid 
directory name for the runtime environment using other information there. I 
don't know what MACs impose, but on OS/2 it's reasonable to assume long file 
names (HPFS is optional, but lots of other software requires it possibly 
including java: I have OS/2 plus java, but as I have no FAT partitions the 
question didn't come up.  NT's NTFS also allows long names: neither's case 
sensitive though so AB.DATA = ab.datA. Don't know the rules for WIN9x, but I 
assume that it's compatible in this respect with NT.

>

-- 
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support. 
Configuration, networking, combined IBM ftpsites index.



Re: Request For OS Sys Props [was Re: Reading (All) EnvVar

1998-12-16 Thread peter . pilgrim

Thanks. 

I had no know idea if "." prefix directories are reasonable of not
reasonable on Win 95/98/NT. Note this is just UNIX convention, that makes
sense for UNIX like operating system, because of the default
de facto behaviour of the `/usr/bin/ls' program.

In short you do not mind if a program creates
`C:\Winnt\Profiles\johndoe\.gimprc'
directory to stores a properties file , say `default.config' on your 
machine. Assuming %USRPROFILE% is `C:\Winnt\Profiles\johndoe'.


BTW: This `SysProps.java' program is handy.

Pete

__ Reply Separator _
Subject: Re: Request For OS Sys Props [was Re: Reading (All) EnvVar
Author:  paul ([EMAIL PROTECTED]) at lon-mime
Date:16/12/98 13:21


Well, 

First of all this is information you asked for.

os.name= Windows NT
os.arch= x86
os.version = 4.0

Then, why do you think this practice (with directories in user.home 
started from .) is bad on WIN32? Yes, files started from '.' are visible 
in explorer, so what? Sun's Workshop and my software and many other 
softwares (even not written on java, e.g. Netscape Communicator) still 
use directories and files instead of registry to store settings on 'by 
user' basis. Storing settings on 'by machine' basis is not standardized 
on Unix and is also difficult on Win32 (registry has more drawbacks than 
advantages). Note that currently (Java 1.1 platform) user.home on NT is 
set to directory %HOMEDRIVE%%HOMEPATH% but in 1.2. it will be set to 
directory %USERPROFILE% that actually plays more as Unix home directory 
on Windows NT than %HOMEDRIVE%%HOMEPATH% (it is so usual for Microsoft to 
change the meaning of well known words in their products ;-) ). 

All the Best
Pavel



 syspro~1.jav


Re: RMI-Question

1999-01-12 Thread peter . pilgrim

Soln: Use the RMI itself to implement an authentication protocol yourself
ie get your clients to use a username and password if possible. The server 
verifies the username and password. In any case why would want to restrict 
the service just by machine name (host)? Far better to use a proper 
authentication.

Pete

__ Reply Separator _
Subject: RMI-Question
Author:  jan.suchanek ([EMAIL PROTECTED]) at lon-mime
Date:12/01/99 16:59


Hello!

I am working on a project which uses RMI. I wrote a server which runs 
very well. I problem I got is that every client is allowed to connect to 
my server and call the remote methode. What I want is, that only hosts 
who are allowed to make a remote call can connect to my server. How can 
I get there. I have really no idea...

Any help is welcome...

Greetings Jan Suchanek

-- 
Jan Suchanek, University of Ulm, Germany 
[EMAIL PROTECTED]

NVNC ID VIDES, NVNC NE VIDES
- Motto of the Unseen University, Ankh-Morpork -



How to get Netscape 4 working Swing and JMF Applets?

1999-01-13 Thread peter . pilgrim


I am trying to get Netscape to work with Swing and JMF. What is written in 
the README file does not work at all.

Java Applet Support:

  Java Applet support is available for all Unix platforms.

  To run Java applets with the Java-enabled version, Communicator
  needs to be able to load Java class files from a file called
  java40.jar.  This file is included in the distribution, and is
  searched for using the following algorithm:

 if($CLASSPATH environment variable is set)
 Look at $CLASSPATH, where $CLASSPATH is a
 colon-delimited list of / entries.
 else
 Search in order:
 
 $MOZILLA_HOME/java/classes
 $HOME/.netscape
 /usr/local/netscape/java/classes
 /usr/local/lib/netscape


The only way to get Java Applets to work in Netscape 4.5 is to unset 
CLASSPATH env variable. How can I then make the browser find the Swing/JFC 
and JMF (or any other 3rd party) jar files then ?

Pete



RE: How to get Netscape 4 working Swing and JMF Applets?

1999-01-14 Thread peter . pilgrim

Thanks alot. Netscape's README is a bit of nonsense with regards to the 
CLASSPATH. If you make sure that the CLASSPATH is unset then everything
work.

I though about install the jars in $MOZILLA_HOME/java/classes
or making symbolic links to the jars from $SWING_HOME and $JMFHOME
but really I think this is too long in tooth. Netscape should has this sorted.

Copying files to the codebase directory does not help diskspace, but thanks for 
a soln.

Pete




__ Reply Separator _
Subject: RE: How to get Netscape 4 working Swing and JMF Applets?
Author:  SHarris ([EMAIL PROTECTED]) at lon-mime
Date:13/01/99 18:52




> The only way to get Java Applets to work in Netscape 4.5 is to unset 
> CLASSPATH env variable. How can I then make the browser find the
> Swing/JFC 
> and JMF (or any other 3rd party) jar files then ? 
> 
> Pete
> 
I forgot to say that if you put the jars in the html, like 
archive="tkb107.jar, oracle.zip, swing103.jar">,
then you need to put these jar files in the same 
directory as your html on the web server.



Re: How to get Netscape 4 working Swing and JMF Applets?

1999-01-14 Thread peter . pilgrim

I did all of this and it does work under Linux or Solaris.

I think copying the jar to $MOZILLA/java/classes is best.

Pete



__ Reply Separator _
Subject: Re: How to get Netscape 4 working Swing and JMF Applets?
Author:  pridemor ([EMAIL PROTECTED]) at lon-mime
Date:13/01/99 14:31


Write a shell script to launch netscape, instead of calling it directly. 
In the script, you can set your CLASSPATH as needed, including 
java40.jar.





[EMAIL PROTECTED] on 01/13/99 06:28:51 AM

To:   [EMAIL PROTECTED] 
cc:(bcc: Russell Pridemore/Lex/Lexmark)
Subject:  How to get Netscape 4 working Swing and JMF Applets?





I am trying to get Netscape to work with Swing and JMF. What is written in 
the README file does not work at all.

Java Applet Support:

  Java Applet support is available for all Unix platforms.

  To run Java applets with the Java-enabled version, Communicator 
  needs to be able to load Java class files from a file called 
  java40.jar.  This file is included in the distribution, and is 
  searched for using the following algorithm:

 if($CLASSPATH environment variable is set)
 Look at $CLASSPATH, where $CLASSPATH is a 
 colon-delimited list of / entries.
 else
 Search in order:
 
 $MOZILLA_HOME/java/classes
 $HOME/.netscape
 /usr/local/netscape/java/classes
 /usr/local/lib/netscape


The only way to get Java Applets to work in Netscape 4.5 is to unset 
CLASSPATH env variable. How can I then make the browser find the Swing/JFC 
and JMF (or any other 3rd party) jar files then ?

Pete







PC-PLUS Magazine UK

1999-01-16 Thread peter . pilgrim

FYI

PC PLUS Magazine UK will happily do us all of us who live in the UK a big 
favour and download the Java 2 Platform for LINUX and burn it on CD ROM ( 
when the porters release it). So look out for a copy of the mag.
It's big timesaver for me. I still have dial up.

In the February Issue which is still available has the JDK 1.1.7 v1a
on CD ROM.

For more infos http://www.pcplus.co.uk


If you live in Europe you may get the magazine imported.

Pete



 



Jittering sound playing on Java/Linux

1999-02-04 Thread peter . pilgrim

Fellows

When the JVM plays .au files on my machine it seems to be suffering 
jittering and glitches. I think this happens because the sound playing 
green thread is not getting enough CPU to push mu law bytes down to 
/dev/audio.

I am using black-down libc5 jdk1.1.7-v1a and Slackware Linux kernel 2.0.36
with 32MB RAM 200MHz Pentium II machine.

Is this fixable? Is my machine or the kernel or the JVM or the sound driver 
oss/free ?

BTW: Rebooting my machine into Win95 and playing audio via Micro$oft JVM is 
a lot cleaner. So I dont think my machine's performance is at fault.

Any ideas appreciated.

Cheers

Pete








 freeinstaller is almost here! 




Re: Another JDK 1.2 Status Report

1999-02-05 Thread peter . pilgrim

Thanks for the infos.

Question are green thread slower than native threads ?

Would this affect the performance of the forthcoming Java Sound API and 
Java Media Framework API. Or am I barking (mad) up the wrong tree?

Pete

__ Reply Separator _
Subject: Another JDK 1.2 Status Report
Author:  kbhend ([EMAIL PROTECTED]) at lon-mime
Date:04/02/99 00:15


Hi,

I thought I would pass along some good news.  The porters ran with plan B 
and so we now have a working green_threads version that can and does run 
the JCK to completion without hanging on both x86 and ppc.  We still have 
to find and fix all of the errors reported by the JCK, but at least now we 
can actually run it.

We still can't quote a date, but now at least we are moving forward again 
and can hopefully pass the JCK under green_threads and worry about finding 
and fixing the native_threads (linuxthreads?) problems after our initial 
releases.

Sorry, I can't provide more info, but rest assured we are all working hard 
to get this thing out the door as soon as possible.

I am sure Steve Byrne will let the list and the world know when he is ready 
with the x86 release with the other platforms to follow along soon after.

Kevin

Blackdown Porting Team for PPC


-- 
Kevin B. Hendricks
Associate Professor, Operations & Information Technology 
School of Business, College of William & Mary 
Williamsburg, VA 23187, [EMAIL PROTECTED] 
http://business.tyler.wm.edu




Re: JavaSound and JMF performance [was Re: Another JDK 1.2

1999-02-05 Thread peter . pilgrim

When I last looked at the Java Medio Homepage at the Javasoft site
I can recall that the audio sound rendering engine could work
well on Pentium 90 at only 20% of the level. AND AND it could
handle up to 64 channels. I will need to see it to believe it methinks.

The JMF will need to native libraries ported to linux to work at full MPEG.

BTW: Does any one know of an open sourced MPEG3 player written for Java?
LONG SHOT

Pete

__ Reply Separator _
Subject: Re: JavaSound and JMF performance [was Re: Another JDK 1.2
Author:  akonstan ([EMAIL PROTECTED]) at lon-mime
Date:05/02/99 13:50


On Fri, Feb 05, 1999 at 09:46:14AM +, [EMAIL PROTECTED] wrote: 
[... snip ...]
> Would this affect the performance of the forthcoming Java Sound API and 
> Java Media Framework API. Or am I barking (mad) up the wrong tree?

The Java Sound API depends on native code to provide some of the sound 
functionality, so it would have to be seperately ported to Linux anyway. 
The pure Java JMF implementation would clearly be affected by the 
performance of the Virtual Machine.  Given that the demo clips provided 
with JMF 1.1a can be played using JDK1.1 with green threads and no JIT 
(on a 200MHz pentium linux box) most likely means that they will also
do so in JDK1.2.  Full MPEG movie playback is a different question ...

Alexander



Re: Keyboard mnemonic problem

1999-02-11 Thread peter . pilgrim

What's an XBD?

Peter


__ Reply Separator _
Subject: Re: Keyboard mnemonic problem
Author:  cbsmith ([EMAIL PROTECTED]) at lon-mime
Date:11/02/99 03:19


On Thu, 11 Feb 1999, Jackie Manning wrote:
> On my system, RH 5.1 updated to 2.0.36, jdk1.1.7-v1a, keyboard mnemonics 
> do not function.  The same
> programs function properly on my laptop, RH 5.1 - 2.0.35, jdk1.1.7-v1a. 
> 
> Can anyone give me a clue where to look for the problem?
I've got a friend who's got the same problem. I haven't looked at his 
system carefully, but from preliminary tests, it appeared as though his 
XBD was not setup properly.

--Chris



Re: Keyboard mnemonic problem

1999-02-12 Thread peter . pilgrim

Whenever I start Motif applications on my linux box the [RETURN] does not 
work, but strangely enough Control-J work. I basically have given up.

Does XBD (X keyboard extension) cure this problem ?
How can I see XBD ?

Peter


__ Reply Separator _
Subject: Re: Keyboard mnemonic problem
Author:  cbsmith ([EMAIL PROTECTED]) at lon-mime
Date:11/02/99 03:19


On Thu, 11 Feb 1999, Jackie Manning wrote:
> On my system, RH 5.1 updated to 2.0.36, jdk1.1.7-v1a, keyboard mnemonics 
> do not function.  The same
> programs function properly on my laptop, RH 5.1 - 2.0.35, jdk1.1.7-v1a. 
> 
> Can anyone give me a clue where to look for the problem?
I've got a friend who's got the same problem. I haven't looked at his 
system carefully, but from preliminary tests, it appeared as though his 
XBD was not setup properly.

--Chris



System.runFinalizersOnExit

1999-02-23 Thread peter . pilgrim


`` System.runFinalizersOnExit(true) ''

Does this work/implemented on Blackdown JDK 1.1.7-1a or not?

I find it does __not__ work for me ? 
Meaning no finalizers are called when the JVM terminates. 
However I tested the same code on Solaris/Sun JDK and it works!
Anyone know the reason why?

(  And yes I know in Java 2 the call is deprecated, and 
I dunno why  JavaSoft announced in 1.1 and deprecated in 1.2
you'ill have to ask them not me. )

Pete



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



Re: System.runFinalizersOnExit

1999-02-23 Thread peter . pilgrim

Well I hope you they invent the API

`System.onJVMExit( ExitNotifiable  myIWannaBeNotifiedAtExitObject )'

Otherwise how can we be sure that resources are released
when the JVM exits. That temporary file creating utility 
object class will be soon redundant then, won't it?
( I guess this also touches my Can Java catch signals
post a couple moons ago. )

Pete


__ Reply Separator _
Subject: Re: System.runFinalizersOnExit
Author:  pohnewein ([EMAIL PROTECTED]) at lon-mime
Date:23/02/99 13:19


I don't know if it works in the blackdown port.

I only know that the problem with running finalizers is that they get 
called sequencely and that leads to problems, because in a complex 
reference structure they shouldn't get called sequencely but depending 
on the structure, but that's very difficult if not impossible in most 
cases, therefore I guess they don't want to allow it anymore.

That's what I think, correct me.

P@

[EMAIL PROTECTED] wrote:
> 
> `` System.runFinalizersOnExit(true) '' 
> 
> Does this work/implemented on Blackdown JDK 1.1.7-1a or not? 
> 
> I find it does __not__ work for me ?
> Meaning no finalizers are called when the JVM terminates.
> However I tested the same code on Solaris/Sun JDK and it works! 
> Anyone know the reason why?
> 
> (  And yes I know in Java 2 the call is deprecated, and
> I dunno why  JavaSoft announced in 1.1 and deprecated in 1.2 
> you'ill have to ask them not me. )
> 
> Pete
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 
- 
Save software competition, use Linux and Java! 
mailto:[EMAIL PROTECTED]


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



Dynamically modifying CLASSPATH

1999-03-08 Thread peter . pilgrim

Can one dynamically modified the CLASSPATH within Java and to create an 
application that loads classes from a modified class path?


For example:

Properties propsJVM = System.getProperties();
String ncp = extraClassPath + pathSep +
System.getProperty("java.class.path");
propsJVM.put("java.class.path",ncp);


The next step is thus

try { Class.forName("org.xenon.FunkyDancer"); }
catch ( ClassNotFoundException e ) { ... }

This does not work for me on JDK1.1.7 sparc-sun-solaris-2.5.1 ?
But can this sort of code work?

Peter


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



Re: Dynamically modifying CLASSPATH

1999-03-08 Thread peter . pilgrim

Don't worry I have figured it out.

Peter

__ Reply Separator _
Subject: Re: Dynamically modifying CLASSPATH
Author:  sfloess ([EMAIL PROTECTED]) at lon-mime
Date:08/03/99 13:24


Peter:

You can't modify the system class path.  However, if you create your own class 
loader, than you can do it with the classloader.  If you do not understand, 
please reply...



[EMAIL PROTECTED] wrote:

> Can one dynamically modified the CLASSPATH within Java and to create an 
> application that loads classes from a modified class path?
>
> For example:
>
> Properties propsJVM = System.getProperties(); 
> String ncp = extraClassPath + pathSep +
> System.getProperty("java.class.path"); 
> propsJVM.put("java.class.path",ncp);
>
> The next step is thus
>
> try { Class.forName("org.xenon.FunkyDancer"); } 
> catch ( ClassNotFoundException e ) { ... }
>
> This does not work for me on JDK1.1.7 sparc-sun-solaris-2.5.1 ? 
> But can this sort of code work?
>
> Peter
>
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


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



  1   2   3   >