Re: Java Plug-in tantalizing, but...

1998-05-15 Thread Nozomi Matsumura

Do you convert that html file ?
i.e
From  ... 
To... 
this is written at http://www.javasoft.com/...
sorry, I forgot correct URL. but it linked there.

and HTMLconverter is downloadable. (placed near)
it is useful (It works on linux-jdk.1.1.5v7)

hope this helps. thank you to read my wrong english.

Nozomi Matsumura
[EMAIL PROTECTED]

> I have been unable to get the Java Plug-in to work for me.  The system
> is glibc based, pretty much pre-Debian 2.0.  JDK 1.1.5v5 glibc works
> on this machine, and the Activator Control Panel when run as an
> application comes up fine.  When I try to access it (or any other
> applet designed for Activator) from within Netscape (4.04j2), nothing
> obviously sinister is reported by either the console or the
> ACTIVATOR_TRACE, but all that happens is "Loading Java Applet" in the
> center of the applet area.
> 
> Any assistance or advice would be appreciated.
> 
> -- 
> Robert Coie
> Implementor, Intrigue Ltd.
> 



Re: Java Plug-in tantalizing, but...

1998-05-15 Thread Robert Coie

> Do you convert that html file ?
> i.e
> From=20 ... 
> To... 

Thanks for taking the time to respond.  This isn't the problem,
because it's the stock ControlPanel.html and is already using EMBED.
The plug-in is being triggered OK, it just doesn't seem to run
correctly.

-- 
Robert Coie
Implementor, Intrigue Ltd.



Re: bug - system clipboard does not work

1998-05-15 Thread Albert L. Ting

Robert Lynch writes:
> From: Robert Lynch <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: bug - system clipboard does not work
> Date: Fri, 15 May 1998 07:57:26 -0700
> 
> Duncan Roe wrote:
> [snip-stuff about changing Zara's paste method...]
> > 
> > Not for me! I don't see data from the system clipboard, even after
> > making the above change. And with the 2 lines I changed earlier, it
> > still copies and pastes data that is highlighted in the app.
> >

X11 has multiple "clipboards", include PRIMARY and CLIPBOARD.  When you
highlight some text in a X11 package, such as Netscape, it gets copied to
PRIMARY.  But if you're in Netscape and use the "copy" command, it'll get
copied to the CLIPBOARD.

On Solaris (and I presume Linux as well), the Java clipboard interface only
deals with CLIPBOARD.  That's annoying since it's behaving differently from
other X11 apps.  Even worse, some apps don't have an easy way to transfer
data to/from the CLIPBOARD.  For the heavyweight components, it looks at
both the PRIMARY and CLIPBOARD.

I sent an email to the [EMAIL PROTECTED], and they agreed this is
a problem, although there's no current solution.  I'd prefer the clipboard
api always looked at both buffers, or at least have the ability to set a
System.properties option.  I suggest you send them email as well, perhaps
with enough people, they'll resolve this.

Albert


-- 
Albert L. M. Ting * [EMAIL PROTECTED] * 408-548-3111 * http://www.artisan.com
Artisan Components, Inc. * 1195 Bordeaux Drive * Sunnyvale, CA  94089 * USA




Re: bug - system clipboard does not work

1998-05-15 Thread Robert Lynch

Hi Duncan-

I can't quite get your modifications to make Steve's app work, but
that's not important.  It's not really difficult to paste _inside_ a
Java application.  I think what Steve Zara was doing was highlighting
text in some (say,) non-Java application, and thus then pasting that to
the Java app from the system clipboard.  In that case one receives the
"X11Selection" error I discussed in my previous post, which I discovered
debugging a problem with a CoreJava example.

Say I highlight a couple of words in your e-mail and then use the paste
button in Steve's java application (with your mods), then I get:
-
Exception occurred during event dispatching:
java.lang.NullPointerException: 
at
sun.awt.motif.X11Selection.isDataFlavorSupported(X11Selection.java:223)
at clipboard$2.actionPerformed(clipboard.java:53)
at java.awt.Button.processActionEvent(Button.java:257)
at java.awt.Button.processEvent(Button.java:230)
at java.awt.Component.dispatchEventImpl(Component.java:1781)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)

i.e., more or less what Steve was getting.

Whereas, if one makes the change to (gutting of!) his button method as I
mentioned:
-
...
b2.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e)
{

  Transferable data=Clip.getContents(this);
  //System.out.println("data is: "+data);
String result = "";
try {
result =
(String)data.getTransferData(DataFlavor.stringFlavor);
}
catch (Exception ex) {;}
t2.setText (result);
t1.setText (result);
}
});
...
---
a paste of some non-Java stuff works (shows up in both areas.)

Matters are a bit confused here, IMO because there's not a lot of
agreement on what's being attempted. ;-)

FWIW.

Bob L.
-- 
Robert Lynch-Berkeley CA [EMAIL PROTECTED]
http://www.best.com/~rmlynch/

Duncan Roe wrote:
> 
> The application now works for me after changing 2 lines. At least, after Copy of
> slected text in pane 1 and "Paste", both panes display the text and nothing else
> - was that the intention?
> 
> Using jdb, I found that the mime-type of the message was "text/plain;
> charset=unicode", which Transfer's getTransferData method didn't recognise,
> therefore returning null.
> 
> The second problem was that once getTransferData returned a non-null object, the
> cast of it to StringReader caused a runtime exception. A cast to String is OK
> however.
> 
> The changes are appended. Why it worked as-is on the other platforms is another
> question.
> 
> -Duncan
[major snip of Steve Zara's code, to which was appended the error msg:]
> > The stack trace is:
> > Exception occurred during event dispatching:
> > java.lang.NullPointerException:
> > at sun.awt.motif.X11Selection.isDataFlavorSupported(X11Selection.java:223)
> > at clipboard$2.actionPerformed(Main.java:53)
> > at java.awt.Button.processActionEvent(Button.java:254)
> > at java.awt.Button.processEvent(Button.java:227)
> > at java.awt.Component.dispatchEventImpl(Component.java:1764)
> > at java.awt.Component.dispatchEvent(Component.java:1704)
> > at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
> >
[snip]
> 
> ---
> 
>   Name: t5
>  Part 1.2 Type: Plain Text (text/plain)
>Description: Context diff of changes




Re: bug - system clipboard does not work

1998-05-15 Thread Duncan Roe

Hi Robert,


On Thu, May 14, 1998 at 09:53:24PM -0700, Robert Lynch wrote:
> 
>
> Say I highlight a couple of words in your e-mail and then use the paste
> button in Steve's java application (with your mods), then I get:
> -
> Exception occurred during event dispatching:
> java.lang.NullPointerException:
> at
> sun.awt.motif.X11Selection.isDataFlavorSupported(X11Selection.java:223)
> at clipboard$2.actionPerformed(clipboard.java:53)
> at java.awt.Button.processActionEvent(Button.java:257)
> at java.awt.Button.processEvent(Button.java:230)
> at java.awt.Component.dispatchEventImpl(Component.java:1781)
> at java.awt.Component.dispatchEvent(Component.java:1708)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)
> 
> i.e., more or less what Steve was getting.

Yes, I get this too, *if* I use "paste" before I ever used "copy".

In this case the app receives an (almost) empty object:-

 AWT-EventQueue-0[1] dump data
 data = (sun.awt.motif.X11Selection)0x406e4ca8 {
 int atom = 161
 X11SelectionHolder holder = null
 Transferable contents = null
 String dataString = null
 int targetArray[] = null
 Object data = null
 }

After pressing copy (so, invoking Clipboard.setContents()), an object containing
a String is obtained:

 AWT-EventQueue-0[1] dump data
 data = (Transfer)0x406ec170 {
 String s = null
 }

This string is either null or whatever was highlighted *inside the application*
when copy was pressed.

>
> Whereas, if one makes the change to (gutting of!) his button method as I
> mentioned:
> -
> ...
> b2.addActionListener( new ActionListener() {
> public void actionPerformed(ActionEvent e)
> {
>
>   Transferable data=Clip.getContents(this);
>   //System.out.println("data is: "+data);
> String result = "";
> try {
> result =
> (String)data.getTransferData(DataFlavor.stringFlavor);
> }
> catch (Exception ex) {;}
> t2.setText (result);
> t1.setText (result);
> }
> });
> ...
> ---

Not for me! I don't see data from the system clipboard, even after making the
above change. And with the 2 lines I changed earlier, it still copies and pastes
data that is highlighted in the app.

The book (Javanut2) says you get system clipboard data from
Toolkit.getSystemClipboard() and that Clipboard() is for intra-application cut &
paste. That is the behaviour I am seeing with or without your changes.

Without your changes however, I do get the original error if paste is
"accidentally" done before copy.

> Matters are a bit confused here, IMO because there's not a lot of
> agreement on what's being attempted. ;-)

I'LL SAY

>
> FWIW.
>
> Bob L.

Cheers ... Duncan.


import java.net.*;
import java.awt.*;
import java.awt.datatransfer.*;
import java.io.*;
import java.awt.event.*;

class clipboard extends Frame implements ClipboardOwner{
  TextArea t1=new TextArea("Area 1...",20,20);
  TextArea t2=new TextArea("Area 2...",20,20);
  Button b1=new Button("Copy");
  Button b2=new Button("Paste");
  Panel pA=new Panel();
  Panel pB=new Panel();
  ClipboardOwner owner=this;
  Clipboard Clip=getToolkit ().getSystemClipboard ();

  public void lostOwnership(Clipboard b,Transferable c)
  {
System.out.println("We lost ownership!");
  }

  public static void main(String args[])
  {
clipboard c=new clipboard();
c.resize(new Dimension(300,300));
c.show();
  }

  clipboard()
  {
setLayout(new BorderLayout(10,10));
pA.setLayout(new FlowLayout());
pB.setLayout(new FlowLayout());
pA.add("West",t1);
pA.add("East",t2);

b1.addActionListener( new ActionListener() {

  public void actionPerformed(ActionEvent e)
  {
Transfer trans=new Transfer(t1.getSelectedText());
Clip.setContents(trans,owner);
  }
});


b2.addActionListener( new ActionListener() {
  public void actionPerformed(ActionEvent e)
  {

Transferable data=Clip.getContents(this);
//System.out.println("data is: "+data);
String result = "";
try {
  result = (String)data.getTransferData(DataFlavor.stringFlavor);
}
catch (Exception ex) {;}
t2.setText (result);
t1.setText (result);
  }
});

pB.add(b1);
pB.add(b2);

add("South",pB);
add("Center",pA);
  }
}



class Transfer implements Transferable
{
  String s;

  public Transfer(String s)
  {
this.s=s;
  }

  public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, 
IOException
  {
if (flavor.getMimeType().equals("text/insidejava")) return s;
if (flavor.getMimeType().equals("text/plain; charset=unicode")) return s;
if (flavor==DataFlavor.stringFlavor) return s;
return null;
  }

  public boolean isDataFlavorSupported(DataFlavo

Re: bug - system clipboard does not work

1998-05-15 Thread Duncan Roe

Hi Robert,

On Fri, May 15, 1998 at 07:25:26PM +1000, Duncan Roe wrote:
>
> Not for me! I don't see data from the system clipboard, even after making the
> above change. And with the 2 lines I changed earlier, it still copies and pastes
> data that is highlighted in the app.
>
> The book (Javanut2) says you get system clipboard data from
> Toolkit.getSystemClipboard() and that Clipboard() is for intra-application cut &
> paste. That is the behaviour I am seeing with or without your changes.
>
I missed the call to getSystemClipboard circa line 12. So it looks as if that is
just not working here. What window manager are you using? - I use fvwm95

Cheers ... Duncan.




Bug ID 4097810: 2000 votes ;-)

1998-05-15 Thread Bernhard Fastenrath


http://developer.javasoft.com/developer/bugStats/top25.shtml:

Votes  Bug ID   Category
2000   4097810 general:other
   Support JDK on Linux

Party!!!

-- 
 Bernhard Fastenrath   phone +49 228 55991-51 (fax-44)
 Gesellschaft fuer Digitale Sicherheit mbH,http://www.digital-security.com




Re: bug - system clipboard does not work

1998-05-15 Thread Robert Lynch

Duncan Roe wrote:
[snip-stuff about changing Zara's paste method...]
> 
> Not for me! I don't see data from the system clipboard, even after making the
> above change. And with the 2 lines I changed earlier, it still copies and pastes
> data that is highlighted in the app.
>
Hi Duncan-

Whoops!  I see what's happening.  You have to highlight some non-Java
material, say, in Netscape mail, _then_ use Netscape "copy".  Then the
stuff goes onto the system clipboard, whence it comes off into Zara's
amended application on hitting paste button...

I think my mistake in a prior e-mail is due to the fact that I did this
copy a while back in my editing, and that stuff then stayed on the
clipboard.  So, I was wrong, it is not enough to just highlight some new
material to put it on the system clipboard.

The essence of what I am saying, discovered by working with a Ch. 6 Core
Java data transfer example, is that in Windoze, apparently (haven't
really tried it, but assume Core Java authors have), stuff goes on and
off the system clipboard as it is specified mime-wise, tho you can only
essentially transfer strings at this point in time.  (The Core Java
example base64 encodes an image as a string, then transfers it via the
system clipboard.)

But in X, if you put something _on_ the system clipboard with your own
mime type, it always comes _off_ as an X11Selection.

Now is that absolutely clear?  What did I say, anyhow? ;-)

Bob L.
-- 
Robert Lynch-Berkeley CA [EMAIL PROTECTED]
http://www.best.com/~rmlynch/




NPE using Swing

1998-05-15 Thread Paul Reavis

I've been stuck at 1.1.3 for awhile; these 1.1.5s haven't been working
for me at work. (At work, we use Debian 1.3.1 (libc5); at home I use
Debian 2.0b (glibc); home everything is fine).

Anyway, with 1.1.5v7, I get:

Exception occurred during event dispatching:
java.lang.NullPointerException:
at sun.awt.motif.X11Graphics.drawImage(X11Graphics.java:275)
at
com.sun.java.swing.SwingGraphics.drawImage(SwingGraphics.java:271)
at com.PartnerSoft.gui.ImageCanvas.paint(ImageCanvas.java:57)
at
com.sun.java.swing.JComponent.paintChildren(JComponent.java:382)
at com.sun.java.swing.JComponent.paint(JComponent.java:537)
at
com.sun.java.swing.JComponent.paintChildren(JComponent.java:382)
at com.sun.java.swing.JComponent.paint(JComponent.java:537)
at com.sun.java.swing.JLayeredPane.paint(JLayeredPane.java:555)
at
com.sun.java.swing.JComponent.paintChildren(JComponent.java:382)
at com.sun.java.swing.JComponent.paint(JComponent.java:522)
at java.awt.Container.paint(Container.java:702)
at java.awt.Component.dispatchEventImpl(Component.java:1723)
at java.awt.Container.dispatchEventImpl(Container.java:939)
at java.awt.Window.dispatchEventImpl(Window.java:443)
at java.awt.Component.dispatchEvent(Component.java:1704)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)

I'm currently trying to track down a small case I can send y'all that
causes this; it's happening in the map browsing portion of our app. A
visual clue: some of the controls (a JButton, and a JTextField) aren't
drawn at all.

Just thought you might be able to sort it out from the dump; dunno.
Here's the output of ldconfig -v in case that helps:


ldconfig: version 1.9.5
/usr/local/lib:
/usr/lib/libc5-compat:
/lib/libc5-compat:
/usr/X11R6/lib:
libIm.so.0 => libIm.so.0.11
libXpm.so.4 => libXpm.so.4.7
libMagick.so.3.8 => libMagick.so.3.8.2
libXtst.so.6 => libXtst.so.6.1
libXt.so.6 => libXt.so.6.0
libXmu.so.6 => libXmu.so.6.0
libXi.so.6 => libXi.so.6.0
libXext.so.6 => libXext.so.6.3
libXaw.so.6 => libXaw.so.6.1
libXIE.so.6 => libXIE.so.6.0
libX11.so.6 => libX11.so.6.1
libPEX5.so.6 => libPEX5.so.6.0
libICE.so.6 => libICE.so.6.3
libXp.so.6 => libXp.so.6.2
libSM.so.6 => libSM.so.6.0
/usr/lib:
libtcl7.4.so.1 => libtcl7.4.so.1
libdf.so.4.0 => libdf.so.4.0.2
libvgagl.so.1 => libvgagl.so.1.2.10
libvga.so.1 => libvga.so.1.2.10
libtiff.so.3 => libtiff.so.3.4.035
libpaper.so.1 => libpaper.so.1.0.2
libtcl7.6.so.1 => libtcl7.6.so.1
libtk4.2.so.1 => libtk4.2.so.1
libslang.so.0.99.34 => libslang.so.0.99.38
libz.so.1 => libz.so.1.0.4
libcompface.so.1 => libcompface.so.1.0.0
libtk4.1.so.1 => libtk4.1.so.1
libjpeg.so.6a => libjpeg.so.6a.0.0
libpng.so.1 => libpng.so.1.0.89c
libextcli_Xt.so.1.0 => libextcli_Xt.so.1.0
libextcli_Xm.so.1.0 => libextcli_Xm.so.1.0
libextcli_Xlib.so.1.0 => libextcli_Xlib.so.1.0
libtcl7.5.so.1 => libtcl7.5.so.1
libstdc++.so.27 => libstdc++.so.27.2.1
libg++.so.27 => libg++.so.27.2.1
libopcodes.so.2.7.0.9 => libopcodes.so.2.7.0.9
libbfd.so.2.7.0.9 => libbfd.so.2.7.0.9
libmh.so.3.2 => libmh.so.3.2
libgdbm.so.1 => libgdbm.so.1.7.3
libdb.so.1 => libdb.so.1.85.4
libhistory.so.2 => libhistory.so.2.1
libpanel.so.3.0 => libpanel.so.3.0
libmenu.so.3.0 => libmenu.so.3.0
libform.so.3.0 => libform.so.3.0
libgnumalloc.so.5 => libgnumalloc.so.5.4.33
/lib:
ld-linux.so.1 => ld-linux.so.1.9.5
libproc.so.1.12 => libproc.so.1.12
libuuid.so.1 => libuuid.so.1.1
libe2p.so.2 => libe2p.so.2.3
libext2fs.so.2 => libext2fs.so.2.3
libss.so.2 => libss.so.2.0
libcom_err.so.2 => libcom_err.so.2.0
libreadline.so.2 => libreadline.so.2.1
libncurses.so.3.0 => libncurses.so.3.0
libm.so.5 => libm.so.5.0.9
libc.so.5 => libc.so.5.4.44
libdl.so.1 => libdl.so.1.9.5
ld-linux.so.1.8.12 => ld-linux.so.1.8.12

--

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






Java Support on Red Hat 5.0

1998-05-15 Thread Brett Roy

I am about to buy and install the Red hat 5.0 version of Linux on my system
at home.  I am a Microsoft loyal who is getting fed up with MS and wanting
something a bit more stable, more dependable, and hopefully, a bit more
predicatable!

In addition, I am learning Java.  I wanted to know if Red Hat 5.0 comes with
JDK support, any dev tools, or other stuff or if I will need to
secure/install it on my own?

I take it the NEW java ports would not be in Red Hat 5.0 but I was hoping to
at least have SOMETHING until I can figure out how to start using the newer
JDK ports.

If RedHat DOES NOT come with anything Java then could I get a fast and dirty
starting point on how to get the newest stable Java release on my Linux
machine?

Thanks a bunch.  Hopefully once I am up to speed I can contribute back to
the group some.  I have learned plenty just from listenting in over the past
2-3 weeks.

Brett
[EMAIL PROTECTED]