1.1.6 glibc v1-test now available

1998-05-26 Thread Christopher Seawood


I finally got a chance to build this.  It's based upon Byrne's 1.1.6
diffs.  It hasn't been tested much but it works for the java apps I use.
You can grab it from:

http://www.seawood.org/java/

- cls






Passing classes as parameters

1998-05-26 Thread Wim Ceulemans

Hi

Does anyone has experience in passing a class as a parameter in java?

I want to do something like call a method with as parameter a class name and
then create instances of that class in that method. Is this possible?

Regards
Wim Ceulemans
Nice Software Solutions
Eglegemweg 3, 2811 Hombeek
Tel 0032-15-41-29-53 Fax 0032-15-41-29-54





accept bug with JWS??

1998-05-26 Thread Joe Carter

A couple of us are experiencing problems connecting to
the Java Web Server from _remote_ machines.
When used locally the JWS works just fine.
When used remotely it takes two attempts to access a page.

Now this looks like the accept problem, which I thought
had gone away. Can any of the porting people confirm
that this could/could not be the accept bug?

(JDK versions 1.1.5v7, 1.1.6v1 from sbb and also
the 1.1.5 version root:04/15/15-19:01 from sg)

If there's any more information required just ask.

Cheers

-- 
Joe Carter  Software Engineer
Brite Voice Systems Ltd, Gatley, Cheshire. UK.
mailto:[EMAIL PROTECTED]




Re: Passing classes as parameters

1998-05-26 Thread Pavel

Yes. If your class has a no-arg constructor, just do like this:

void method(Class c)
{
...
Object o = c.newInstance();
... // use 'o'
}

Otherwise, look for a Constructor class documenation from
java.lang.reflect package to create and initialize your object with a
constructor with parameters.

All the Best
Pavel

Wim Ceulemans wrote:
> 
> Hi
> 
> Does anyone has experience in passing a class as a parameter in java?
> 
> I want to do something like call a method with as parameter a class name and
> then create instances of that class in that method. Is this possible?
> 
> Regards
> Wim Ceulemans
> Nice Software Solutions
> Eglegemweg 3, 2811 Hombeek
> Tel 0032-15-41-29-53 Fax 0032-15-41-29-54


jdk 1.1.5-? problems in TextComponets

1998-05-26 Thread Giovanni Wagner

Hello Listeners,

using the blackdown java port since over 1 year I ´ve some problems 
after upgrading from 1.1.3 to 1.1.(4,5).
TextField and TextArea encoding of iso 8859-1 is broken. Both components
can´t display german umlauts, while all other Componets I am using 
(Buttons, MenuItems, Choices etc) can do. The occurance of such an umlaut
cuts off all remaining characters.

Having no problems with 1.1.3 and sol2, win95 and aix jdk I hope you know
about my problem and can help. 
Code is available under
  http://fb3-s10.math.tu-berlin.de/~wagio/adress16.tgz

thanx in advance 

Gio






latest glibc debian packages?

1998-05-26 Thread Louis-David Mitterrand

Someone mentioned that the glibc versions of Steve Byrne's ports require
the very latest development versions of glibc. On my Debian-2.0 system
the glibc-2.0.7pre1 won't cut it. Could a kind sould send me a pointer
as where are the latest .deb packages? I've looked on ftp.debian.org and
couldn't find the new "unstable" distribution. Have they hidden it?

TIA

-- 
Louis-David Mitterrand
http://www.aparima.com
[EMAIL PROTECTED]




Re: building shared libraries for native

1998-05-26 Thread Duncan Roe

Hi Craig,

"info gcc" describes this better. It states that FPIC only makes a difference on
the m68k, m88k and the Sparc. N.b. use info! It is kept up to date, while the
man page (sometimes) isn't.

There was some discussion of how shared libraries work without pic, but I remain
bemused that they do. (I discovered that one of mine picks up non-pic code from
a .a archive, on both linux & Solaris. I wouldn't recommend the practice, all
the same).

Cheers ... Duncan.

On Tue, May 26, 1998 at 04:50:21PM +0200, B. Craig Taverner wrote:
> >in ".o".  Example:gcc -fPIC -c -I file1.c -o
>
> Based solely on looking at other peoples makefiles and code, I've been
> using -fpic under linux and -fPIC under solaris.
>
> The gcc man pages say the following:
>
>-fpic  If supported for the target machines, generate  po
>   sition-independent  code,  suitable  for  use  in a
>   shared library.
>
>-fPIC  If supported for the target machine, emit position-
>   independent  code,  suitable  for  dynamic linking,
>   even if branches need large displacements.
>
> I'm not completely sure I understand the differences here.  Does anyone
> know what the effect of interchanging -fpic and -fPIC really is?




Re: Passing classes as parameters

1998-05-26 Thread B. Craig Taverner

> Does anyone has experience in passing a class as a parameter in java?
> I want to do something like call a method with as parameter a class name and
> then create instances of that class in that method. Is this possible?

try this:
public Object makeInstance(String sClassName)
{
Class rClass = Class.forName(sClassName);
Object rObject = rClass.newInstance();
   ... do what you want with the object ...
return(rObject);
}
I've not included any checks for possible exceptions like 'ClassNotFound',
but the idea is sound (and I've tried it).

But the best is to read the javadoc documentation for java.lang.Class

Cheers, Craig

--
"If God had intended Man to Watch TV, He would have given him Rabbit
 Ears."

==
Craig Taverner   --==   Email:[EMAIL PROTECTED]
ComOpt AB   --Tel:   +46-42-212580
Michael Löfmans Gata 6 --==   Fax:   +46-42-210585
SE-254 38 Helsingborg   --   Cell:  +46-708-212598
Sweden   --==http://www.comopt.com
==




Re: Passing classes as parameters

1998-05-26 Thread Geoffrey S. Knauth

> Does anyone has experience in passing a class as a parameter in java?

You can pass the name of a class ("com.foo.package.Name") as a
parameter, and then so long as the class can be found either locally
on the client, or via the ARCHIVE=___.jar tag, you can create an
instance via something like:
new Class.forName("com.foo.package.Name");
  or
java.beans.Beans.instantiate(null, "com.foo.package.Name");

-- 
Geoffrey S. Knauth   http://world.std.com/~gsk




Re: Passing classes as parameters

1998-05-26 Thread Ravi Rao

> From: "Wim Ceulemans" <[EMAIL PROTECTED]>
> Date: Tue, 26 May 1998 08:45:30 +0200

> Does anyone has experience in passing a class as a parameter in java?

> I want to do something like call a method with as parameter a class
> name and then create instances of that class in that method. Is this
> possible?

Yes, very definitely possible.  The package java.lang.reflect contains
all the information you will need.  Many of the classes and methods of
the 'reflect' package are accessible from the class 'java.lang.Class'.

Here is simple example skeleton that contains the main steps you will
probably take in most cases.

---%file: WimExample.java%---
import java.lang.reflect; // might be necessary

public class WimExample
{
  // constructors and stuff

  public void doClass(Class c)
{
  // 1. Create instance of class
  Object obj = c.newInstance();

  // 2. Get reference to all public methods of this class
  //returns array of _public_ methods of class defined by 'c'.
  //The type 'Method' is defined in the 'reflect' package and
  //contains information about the number of parameters and the
  //type of the parameter accepted by the method in question.
  Method[] methods = obj.getMethods();

  // If you know that the 'obj' contains a method (with a particular
  // signature) then you can use (see the 'reflect' package)
  // Method m = obj.getMethod(...);

  // 3. Set up arguments for the method of your choice

  // 4. Use .invoke(...) to invoke the method

  // 5. Receive and process arguments returned by previous 'invoke'.
  //'invoke' returns and instance of 'Object'.  You can use
  //.getReturnType() to find out the type of
  //object returned by the method (please see 'reflect' package).

  // 6. You will have to handle 'InvocationTargetException' which
  //is non-runtime exception and is thrown by many of these
  //methods.  
}
}
-- 
Ravi/




Re: building shared libraries for native

1998-05-26 Thread B. Craig Taverner

>in ".o".  Example:gcc -fPIC -c -I file1.c -o

Based solely on looking at other peoples makefiles and code, I've been
using -fpic under linux and -fPIC under solaris.

The gcc man pages say the following:

   -fpic  If supported for the target machines, generate  po
  sition-independent  code,  suitable  for  use  in a
  shared library.

   -fPIC  If supported for the target machine, emit position-
  independent  code,  suitable  for  dynamic linking,
  even if branches need large displacements.

I'm not completely sure I understand the differences here.  Does anyone
know what the effect of interchanging -fpic and -fPIC really is?

Cheers, Craig

--
"If God had intended Man to Watch TV, He would have given him Rabbit
 Ears."

==
Craig Taverner   --==   Email:[EMAIL PROTECTED]
ComOpt AB   --Tel:   +46-42-212580
Michael Löfmans Gata 6 --==   Fax:   +46-42-210585
SE-254 38 Helsingborg   --   Cell:  +46-708-212598
Sweden   --==http://www.comopt.com
==




RE: jdk 1.1.5-? problems in TextComponets

1998-05-26 Thread Marcus Isaksson

On 26-May-98 Giovanni Wagner wrote:
> using the blackdown java port since over 1 year I ´ve some problems 
> after upgrading from 1.1.3 to 1.1.(4,5).
> TextField and TextArea encoding of iso 8859-1 is broken. Both components
> can´t display german umlauts, while all other Componets I am using 
> (Buttons, MenuItems, Choices etc) can do. The occurance of such an umlaut
> cuts off all remaining characters.

There is a simple work-around for the new 1.1.6 port(it does not work with
older versions), which can be downloaded from:
http://www.blackdown.org/~sbb/1.1.6/v1-test/
(note that this only a test-release)
Download it and edit the file lib/font.properties, by removing everything after
the line:
# exclusion info.

I don't know if this affects anything else, but it works for me.


Marcus Isaksson





Re: latest glibc debian packages?

1998-05-26 Thread Stephen Zander

> "Louis-David" == Louis-David Mitterrand <[EMAIL PROTECTED]> writes:
Louis-David> Someone mentioned that the glibc versions of Steve
Louis-David> Byrne's ports require the very latest development
Louis-David> versions of glibc. On my Debian-2.0 system the
Louis-David> glibc-2.0.7pre1 won't cut it. Could a kind sould send
Louis-David> me a pointer as where are the latest .deb packages?
Louis-David> I've looked on ftp.debian.org and couldn't find the
Louis-David> new "unstable" distribution. Have they hidden it?

Define "won't cut it." I currently have installed

ii  jdk1.1-runtime  1.1.5v5-1  JDK 1.1.x (Java Development Kit) - Runtime o
ii  libc6   2.0.7pre1-4The GNU C library version 2 (run-time files)

and am doing development with it almost as I type.

Try looking under "frozen" or "hamm" for the latest packages. Unstable got removed (I 
think) pending the Debian 2.0 release.

-- 
Stephen (the Debian jdk maintainer)
---
all coders are created equal; that they are endowed with certain
unalienable rights, of these are beer, net connectivity, and the
pursuit of bugfixes...  - Gregory R Block




Re: latest glibc debian packages?

1998-05-26 Thread Juergen Kreileder

Stephen Zander <[EMAIL PROTECTED]> writes:

> > "Louis-David" == Louis-David Mitterrand <[EMAIL PROTECTED]> writes:
> Louis-David> Someone mentioned that the glibc versions of Steve
> Louis-David> Byrne's ports require the very latest development
> Louis-David> versions of glibc. On my Debian-2.0 system the
> Louis-David> glibc-2.0.7pre1 won't cut it. Could a kind sould send
> Louis-David> me a pointer as where are the latest .deb packages?
> Louis-David> I've looked on ftp.debian.org and couldn't find the
> Louis-David> new "unstable" distribution. Have they hidden it?
> 
> Define "won't cut it." I currently have installed
> 
> ii  jdk1.1-runtime  1.1.5v5-1  JDK 1.1.x (Java Development Kit) - Runtime o
> ii  libc6   2.0.7pre1-4The GNU C library version 2 (run-time files)
> 
> and am doing development with it almost as I type.
> 
> Try looking under "frozen" or "hamm" for the latest packages. Unstable got removed 
>(I think) pending the Debian 2.0 release.
> 

There is a new unstable dist (it is called 'slink'), you can find it at
ftp.debian.org:/pub/debian/dists

I'm using jdk-1.1.5v7 (tar.gz version) with libc6_2.0.7pre3-1.

Juergen.


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