JNI_CreateJavaVM() == -1

2000-07-05 Thread chris

Hi,
I'm getting started trying to use the JNI from a C++ program.
JNI_CreateJavaVM() returns -1. Not much info there except that it has failed.
Any clues as to where to begin debugging this? I'm using the examples from the
Gordon book on JNI. Does someone have a JNI hello world for the Blackdown
distribution? I don't see anything in the demo directory.

thanks,
chris

-- 
Chris Cross
IBM West Palm Beach
[EMAIL PROTECTED]


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




Re: JNI_CreateJavaVM() == -1

2000-07-06 Thread chris

On Wed, 05 Jul 2000, Juergen Kreileder wrote:
> >>>>> "chris" == chris  <[EMAIL PROTECTED]> writes:
> 
> chris> I'm getting started trying to use the JNI from a C++
> chris> program.  JNI_CreateJavaVM() returns -1. Not much info
> chris> there except that it has failed.  Any clues as to where to
> chris> begin debugging this? I'm using the examples from the
> chris> Gordon book on JNI. Does someone have a JNI hello world for
> chris> the Blackdown distribution? I don't see anything in the
> chris> demo directory.
> 
> There are some examples in the FAQ:
> 
> 
>http://www.blackdown.org/java-linux/docs/support/faq-release/FAQ-java-linux-4.html#ss4.5
> 

Thanks Juergen. Turns out I was using the 1.1 init args with the 1.2 jdk.
Curious about that, why do we need both versions in jni.h when it shipped with
a specific jvm.  And since one has to change the argument structure and
recompile between versions anyway why is the type carried as void* in all the
function calls?

-- 
Chris Cross
IBM West Palm Beach
[EMAIL PROTECTED]


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




CallStaticObjectMethod() never returns

2000-07-19 Thread chris

Hi,
I'm trying to run a very large java application within a DLL through the
invocation interface in order to package this app as a Mozilla service. I use
its static factory method to return an initialized instance in order to cache
the jobject and forward calls to it from a service requestor. The problem is
CallStaticObjectMethod() never returns. I have traced the the java code and it
does appear to execute everything except the return and there are no
java exceptions. I have used other static methods which test the functionality
of the app and it appears to be working perfectly in the java space, just never
returns.

The app is multithreaded and itself has a non trivial jni component (I know,
the picture is getting pretty ugly now ;-)

I switched to the Sun jvm and am not experiencing this problem. Do you think
this is a bug in the Blackdown jvm?

-- 
Chris Cross
IBM West Palm Beach
[EMAIL PROTECTED]


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




Re: JDK on Redhat 5.1

1998-09-01 Thread Chris Kakris


On Tue, 1 Sep 1998, Zhichao Hong wrote:

> Sure, it can. I just took off 5.0 and installed 5.1.  I downloaded jdk and
> isntalled it.  It ran smoothly.  You need to hide the binaries in /usr/bin
> by yourself and set up the correct classpath and path (i.e., hide
> /usr/bin/javac, /usr/bin/javadoc, etc which came with the 5.1.

RedHat 5.1 ships with kaffe (www.kaffe.org), that's where /usr/bin/javac
and /usr/bin/javadoc come from.  The blackdown jdk installs everything
below a single directory where ever you want, eg /usr/local/jdk.  I simply
remove kaffe with a "rpm -e kaffe".

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: JSDK

1998-09-01 Thread Chris Kakris


On Tue, 1 Sep 1998, Travis Thornhill wrote:

> Is there a version of JSDK for linux?

The jserv package comes with the jsdk classes, http://java.apache.org

unzip -t jserv0.9.11/servclasses.zip shows that javax.servlet.* and
sun.servlet.* packages are included.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax




Re: Searching RPM for JDK 1.1.6 libc5

1998-09-02 Thread Chris Kakris


On Wed, 2 Sep 1998, Dan Kegel wrote:

> The trick is to go to the redhat search *page*, then
> use the ftp site search for jdk.  One thing it finds is
> 
> 
>ftp://ftp.redhat.com/pub/contrib/grouped/libc5/i386/Development/Languages/Java/jdk-1.1.5-8.i386.rpm
> 
> I find it easy enough to just use the Blackdown tarballs, though.

I often use http://ftpsearch.ntnu.no/
It bills itself as "The World's largest file search engine".  I recommend
using it when trying to track down the latest release of a software
package.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



[ANN] JConfig 1.2: Linux, Unix, WinNT versions available

1998-09-15 Thread Chris Kelly

Samizdat Productions Releases JConfig 1.2

JConfig is a class library which supplements the core Java API. It lets you
work with files, web browsers, processes, file types, and other system-level
items in a much more advanced manner than that provided by the standard Java
class libraries. A list of JConfig's features is given below.

JConfig 1.2 supports several new platforms, including:

  - Linux
  - Win95, Win98, and WinNT 
  - MacOS
  - most Unix systems

** Download

To download JConfig, go to:

http://www.tolstoy.com/samizdat/jconfig.html

** Special Offer for Linux Developers

Next week, we'll be announcing a special offer just for Linux developers.
We'll announce it to this list, so stay tuned.

** Source Code

The complete Java and C++ source code to JConfig is now available for
licensing. See the page above for details.

** Pricing

You can redistribute the JConfig runtime components with most applications
*free of charge*. See the page above for details.

** Feature List

Here's a partial list of JConfig's features, by category:

Files:
  Enumerate the user's disk drives, and obtain extended information on
  files, directories, volumes, and filesystems: their icons, creation
  dates, version information, mount points, and more... 

Web Browsers:
  Launch a file or URL in the user's Web browser... 

Video Monitors:
  Enumerate and get information on the user's video monitors: bit depth,
  bounds, and more... 

External Processes:
  Create external processes, send basic commands to external processes,
  obtain the PSN or HWND of a process you created, and enumerate the
  currently running processes... 

File Types:
  Find applications associated with a given file type, find applications
  by name, and convert between Windows file extensions and Mac
  creator/file type codes...



Re: Linux/Alpha port of JDK

1998-05-12 Thread Chris Adams

Once upon a time, James Cribb wrote
> Chris Adams wrote:
> > The biggest problem is that I can't run anything that uses the
> > InstallShield Java Edition.
> 
> After I installed the Intel Linux JDK 1.1.5 (v7), the Install Shield stuff in
> Together/J (http://www.oi.com) seemed to activate a bug that killed my window
> manager (ctwm) and hence shut down my X windows session.  To work around this, I
> started a separate X server without a window manager (using the command "X :1")
> and ran the Together/J install program on that X server (by setting DISPLAY=:1
> in my environment).
> 
> Maybe this will help in your situation.

I have a different problem.  X or the window manager doesn't crash.
When I run an InstallShield installation script, I get:

*
Testing /usr/local/jdk-1.1.5/bin/java...
Testing /usr/local/jdk-1.1.5/bin/jre...
2 suitable java interpreter(s) detected

0) I want to specify a path to an interpreter.
1) Use /usr/local/jdk-1.1.5/bin/java
2) Use /usr/local/jdk-1.1.5/bin/jre
3) Terminate this installation.
Select a choice [0-3]: 2
Extracting installation class
InstallShield JavaTM Edition
Extracting installation codedone
SIGSEGV   11*  segmentation violation

Full thread dump:
"AWT-Motif" (TID:0x29d3890, sys_thread_t:0x200024bddb0, state:MW) prio=5
java.lang.Thread.run(Thread.java)
"AWT-Input" (TID:0x29d38d0, sys_thread_t:0x2000249bdb0, state:CW) prio=5
"AWT-EventQueue-0" (TID:0x29d3900, sys_thread_t:0x20ffdb0, state:CW) prio=5
java.lang.Object.wait(Object.java)
java.awt.EventQueue.getNextEvent(EventQueue.java:119)
java.awt.EventDispatchThread.run(EventDispatchThread.java:55)
"Finalizer thread" (TID:0x29cdab0, sys_thread_t:0x20dddb0, state:CW) prio=1
"Async Garbage Collector" (TID:0x29cdb40, sys_thread_t:0x20bbdb0, state:R) 
prio=1
"Idle thread" (TID:0x29cd620, sys_thread_t:0x2099db0, state:R) prio=0
"Clock" (TID:0x29c6110, sys_thread_t:0x2077db0, state:CW) prio=12
"main" (TID:0x29c6160, sys_thread_t:0x120141e70, state:R) prio=5 *current 
thread*
sun.awt.motif.MComponentPeer.setBounds(MComponentPeer.java:467)
sun.awt.motif.MComponentPeer.reshape(MComponentPeer.java:512)
sun.awt.motif.MComponentPeer.initialize(MComponentPeer.java:91)
sun.awt.motif.MTextFieldPeer.initialize(MTextFieldPeer.java:67)
sun.awt.motif.MComponentPeer.(MComponentPeer.java:126)
sun.awt.motif.MTextFieldPeer.(MTextFieldPeer.java:71)
sun.awt.motif.MToolkit.createTextField(MToolkit.java:70)
java.awt.TextField.addNotify(TextField.java:146)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Panel.addNotify(Panel.java:77)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Panel.addNotify(Panel.java:77)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Panel.addNotify(Panel.java:77)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Panel.addNotify(Panel.java:77)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Panel.addNotify(Panel.java:77)
java.awt.Container.addNotify(Container.java:1128)
java.awt.Window.addNotify(Window.java:108)
Monitor Cache Dump:
sun.awt.motif.MToolkit@r": owner "main" (0x120141e70, 1 entry)
Waiting to enter:
"AWT-Motif" (0x200024bddb0)
java.awt.EventQueue@it@r": 
Waiting to be notified:
"AWT-EventQueue-0" (0x20ffdb0)
java.lang.Object@": owner "main" (0x120141e70, 6 entries)
 (0x20bbdb0): owner "Async Garbage Collector" (0x20bbdb0, 1 
entry)
Registered Monitor Dump:
Verifier lock: 
Thread queue lock: 
Name and type hash table lock: 
String intern lock: 
JNI pinning lock: 
JNI global reference lock: 
BinClass lock: 
Class loading lock: 
Java stack lock: 
Code rewrite lock: 
Heap lock: 
Has finalization queue lock: 
Finalize me queue lock: 
Waiting to be notified:
"Finalizer thread" (0x20dddb0)
Monitor IO lock: 
Child death monitor: 
Event monitor: 
I/O monitor: owner "AWT-Input" (0x2000249bdb0, 1 entry)
Alarm monitor: 
Waiting to be notified:
"Clock" (0x2077db0)
Monitor registry: owner "main" (0x120141e70, 1 entry)
Thread Alarm Q:
*

And it exits.  It doesn't matter if I use 'java' or 'jre' as the
interpreter.  I am trying to run Amber, a system monitoring program for
Livingston/Lucent RABU PortMaster remote access servers and routers.  It
is available at ftp://ftp.livingston.com/pub/le/s

Re: JL: Emacs and java...

1998-07-21 Thread Chris Dean


Dustin Lang <[EMAIL PROTECTED]> writes:
> I've decided to give Emacs a try (I normally use pico :) for my java
> development (my full-time job).  Can anyone tell me how to set the
> character emacs uses to indent?  Right now it's using two spaces as a tab.
> I'm a believer in the a-tab-is-a-tab axiom of indentation :)

I have used XEmacs for quite some time and am very happy with it.  FSF 
Emacs is also good.

I use the CC Mode which is the "mode for editing files containing C, C++,
Objective-C, Java, and CORBA IDL code".  This is the standard thing for
XEmacs and FSF Emacs.  If for some reason your online docs aren't installed
correctly, you can look at http://www.python.org/emacs/cc-mode/

Typically, hitting the TAB key in an emacs editing mode doesn't mean
'insert ^I here', it means 'indent this line the appropriate amount
for this programming language'.  Here's an abbreviated version of what 
I have in my .emacs file:

(defun my-c-mode-common-hook ()
  (c-set-style "GNU")
  (setq c-tab-always-indent nil)
  (setq c-basic-offset 4))

(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

I'm not sure if this would work, but you could try changing this to
get your "tab is a tab" behaviour:

(defun my-c-mode-common-hook ()
  (c-set-style "GNU")
  (setq c-tab-always-indent nil)
  (setq c-basic-offset 8))

(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)


Good luck,
Chris Dean



Re: JL: RE: Emacs and java...

1998-07-21 Thread Chris Dean


"Liam Magee" <[EMAIL PROTECTED]> writes:
> Are these tools available for NT?

Emacs is, but not (currently) XEmacs.

http://www.cs.washington.edu/homes/voelker/ntemacs.html

Chris Dean



Re: Printing of Graphics

1998-09-15 Thread Chris Sommers

Maarten,
Try using the swing graphics library. It has a componenet
called JTable which is suitable. I've been using Swing under
a different "popular" OS lately (guilt...), I like it.

This begs the question -

Open question to the  Community: is Swing available for
Linux? Is it stable enough?

- chris

Maarten van Leunen wrote:
> 
> Howdie
> 
> Anybody know any good way of using Toolkit and Graphics in order to
> print Spreadsheet-kinda output? In a slightly easier way then to draw
> rectangles all over the paper and draw text inside them, I hope?
> 
> And how can I put scaling into effect? Drawing stuff despite changes
> sizes?
> 
> --
> Maarten van Leunen
> 
> Student - Fontys Institute of Technology Eindhoven
> e-mail: [EMAIL PROTECTED]
> http://www.il.fontys.nl/~maartenl
> http://lok.il.fontys.nl/

-- 
+--++
| Chris Sommers| e-mail: [EMAIL PROTECTED]  |
| 4738 Gertrude Dr.| (510) 795-7347 |
| Fremont, CA 94536| (fax by arrangement)   |
+--++  
| Occassional Phone #: (530)268-9004 (Grass Valley) |
+---+



Re: Date, TimeZone, Calendar, GregorianCalendar, SimpleTimeZone

1998-09-17 Thread Chris Kakris


On Thu, 17 Sep 1998, Bruce J. Carter wrote:

> Any help would be greatly appreciated.

This is how I set things for the time zone here in Melbourne Australia.
Hope this helps.


import java.util.Calendar;
import java.util.TimeZone;
import java.text.SimpleDateFormat;

public class DateTimeThingy
{
public static void main(String[] args) throws Exception
{
Calendarcalendar;
SimpleDateFormatdateformatter;
String  systemDate;
TimeZonetimeZone;

timeZone = TimeZone.getTimeZone("AET");
dateformatter = new SimpleDateFormat(" HH:mm:ss,  d, ");
dateformatter.setTimeZone(timeZone);

calendar = Calendar.getInstance();
systemDate = dateformatter.format(calendar.getTime());
System.out.println(systemDate);
}
}

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



[ANN] JConfig special offer

1998-09-30 Thread Chris Kelly

Recently, we announced our JConfig class library on this list. As a special,
limited-time offer just for LInux developers, we're offering source code
licenses to the Linux/Unix part of JConfig at a rather steep discount: just $1.

For more information, visit 
before Oct. 15, 1998.

If you have any questions, send email to <[EMAIL PROTECTED]>



JConfig is a class library which supplements the core Java API. It lets you
work with files, web browsers, processes, file types, and other system-level
items in a much more advanced manner than that provided by the standard Java
class libraries. 

To download JConfig, go to:

http://www.tolstoy.com/samizdat/jconfig.html



JTAPI on Linux

1998-10-06 Thread Chris Young




Anyone heard of somebody working on an 
implementation of JTAPI (Java Telephony API) for Linux?
 
/cky


Error

1998-05-13 Thread Chris Dailey

When running some software (Structure Builder by Tendril Software)
under jdk1.1.5v7 including glibc 2.0.7-7 (glibc and glibc-devel) patches
for RedHat5, I get a SEGV kind of thing when it tries to close a small
"loading progress" type dialog.

Here's a subset of the output:

Full thread dump:
"Thread-5" (TID:0x40673190, sys_thread_t:0x4141de0c, state:R) prio=5 *current 
thread*
sun.awt.motif.MComponentPeer.dispose(MComponentPeer.java:215)
sun.awt.motif.MDialogPeer.dispose(MDialogPeer.java:79)
java.awt.Component.removeNotify(Component.java:2526)
java.awt.Container.removeNotify(Container.java:1149)
java.awt.Window.dispose(Window.java:177)
com.tendril.awt.p.dispose(Unknown Source)
com.tendril.frontend.os$ProgressBarDisplay.Ὂ(Unknown Source)
 [I assume nothing else would be helpful] ...

I hope this is helpful.

Regards,
Chris Dailey




Re: Free Java @ JavaOne 1999

1998-10-22 Thread Chris Sommers

Kinf Folks,
What does "BOF" stand for?

- chris sommers

Kenneth Zhang wrote:
> 
> 
> Defnitely interested.  I would like to help out if you guy need any volunteers.  You 
>can contact me at [EMAIL PROTECTED]
> 
> -Kenneth Zhang
> 
> --
> 
> On Wed, 21 Oct 1998 10:05:53   Tim Wilkinson wrote:
> >All,
> >
> >Don't know if anyone else is looking into this but we'd like to put
> >together a free Java BOF at the coming JavaOne and obviously it'd make
> >sense to get all the free Java people together for this. We've tried to
> >do this informally the last two years (they confiscated the megaphone
> >last year) but though we might try to get it into the official program
> >this year.
> >
> >Any interest?
> >
> >Regards
> >Tim
> >
> >--
> >  Tim Wilkinson Tel: +1 510 704 1660
> >  Transvirtual Technologies, Inc.,  Fax: +1 510 704 1893
> >  Berkeley, CA, USA.Email:   [EMAIL PROTECTED]
> >
> >
> >
> >
> 
> Get your FREE E-mail at http://mailcity.lycos.com
> Get your PERSONALIZED START PAGE at http://personal.lycos.com

--



Java 2d

1998-10-23 Thread chris roffler

I am using JDK1.1.6 under linux Redhat 5.1.   I need the capabilities of
2DAPI.   
Some months ago 2Dapi was available as separate package. Now it is part
of JDK1.2. Linux does not have
JDK1.2 yet.  

Does anybody out there have the 'old' java 2d  stuff ?


Chris Roffler



RE: Interprocess Communication with a Java Application

1998-10-23 Thread chris roffler

Why do you want to go through all this trouble ?

Why don't you just use Voyager from ObjectSpace  www.objectspace.com


Chris

  -Original Message-
  From:Michael.Sinz [SMTP:[EMAIL PROTECTED]]
  Sent:Friday, October 23, 1998 2:04 PM
  To:  java-linux; steve
  Cc:  Michael.Sinz; norm
  Subject: Re: Interprocess Communication with a Java Application
   
  On Fri, 23 Oct 1998 10:03:56 -0700, Steve Bankes wrote:
   
  >
  >I am seeking advice about interprocess communication between a
  Java application
  >and other, not necessarily Java, applications.
  >
  >I am developing the Java application under Linux but want to be
  able to run it
  >under Windows.  So far I have been using Linux FIFO's (named
  pipes) rather than
  >sockets.  I am using FIFO's because it is easier to write shell
  scripts that
  >will create, read from and write to FIFO's than for sockets, and
  because there
  >does not seem to be a Java internal socket; i.e there seems to be
  no Java analog
  >of AF_UNIX (UNIX internal protocols) sockets.
  >
  >So far this approach is working fine under Linux.  I know nothing
  about Widows
  >or Windows programming.  I am concerned how portable this will be
  to Windows.
   
  The only real IPC in Java that is platform independant is via the
  network
  I/O classes.  This also happens to work rather well between
  machines, not
  just between processes.  Now, it is not light weight.
   
  Windows NT has a think known as a "named pipe" the is much like a
  fifo.
  However, it requires special code to create/manage one.
  Connecting to
  one (being sender usually) is trivial and even works over the
  network
  from Windows 95 and Windows 98.  However, the other end requires
  NT.
   
  Again, sockets or UDP are very handy and with 127.0.0.1 it even
  should work
  reasonably fast.  (Loopback address)  And, it is easy (or at least
  easier)
  to work over the network to systems of different platforms even.
  I do this
  a lot with normal sockets and RMI and serialization.  (All three
  in one
  program even, but usuaully just sockets since that works almost
  everywhere)
   
  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: Any one working on Java/SNMP agent, MIB design for Network Management

1998-10-25 Thread Chris Sommers

>C.S.,
You might want to check out this web site:
http://www.xtree.com/products/jsnmp/

It describes a commercial Java-based SNMP package.
Good luck on your project.

Does anybody know what ever hapened to Sun's JMAPI project?
It seems to have dried up and disappeared.

- chris

C. Saravanan wrote:
> 
> Hi all!
> 
> Is there anybody out here working with Java based Network management ?
> 
> I am designing a JAVA Agent, Manager and would like to extend SNMP
> 
> functionality for it. I am planning with existing CMU libraries and to
> 
> use JNI. Are you interested...? ( I am having looo...ot of problems )
> 
> ..
> C.S.,
> Presently : Student (M.Tech), IIT (India)
> Future: ORACLE India Development Center.
> ..



Re: RMI anyone?!

1998-11-03 Thread Chris Sommers

Andrew,
Another worthwhile book is "Java RMI" by Troy Downing, IDG
Books.

Good luck.

- Chris Sommers


dan wrote:
> 
> I concur, in general, about the cryptic errors that occur with JNI coding.  I tend 
>not to put
> everything within a single function call, but I do follow the KISS principle (Keep 
>It Simple,
> Stupid).
> 
> May I also suggest the book, "essential JNI:  Java Native Interface" (sic on 
>capitalization), by
> Rob Gordon.  This is an excellent (no, authoritative) book on the subject of JNI.  
>It is very
> well written.  Following the KISS principle, you'll probably only need to read the 
>first 2 or 3
> chapters.
> 
> There are other native interfaces available, as well.  Netscape's JVM has their own 
>native
> interface, developed before JNI was available.  However, Netscape has deprecated 
>this interface
> in favor of JNI.
> 
> Microsoft's JVM uses something called RNI (Runtime Native Interface), and does *not* 
>support JNI
> (you can, however, use Sun's Java Plug-In, which encapsulates Sun's JVM inside an 
>Active-X
> control).  Microsoft will likely never support JNI.  This is, in fact, the source of 
>Sun's
> accusations against Microsoft for not supplying a JVM that is compliant with the 
>Java standard.
> Why does Microsoft do this?  WFC, Microsoft's Java interface to MFC, makes extensive 
>use of
> native calls (as you might expect).  In order to make WFC faster than it would 
>otherwise be, RNI
> allows native code to get the address of Java variables directly (which, of course, 
>would not
> work if data is moved in memory, as the JNI specification allows).  To support JNI, 
>Microsoft
> would have to cripple (in terms of speed, anyway) the WFC, something Microsoft is 
>not likely to
> do.
> 
> We have built a bridge between RNI and JNI for our internal use (we provide Java 
>toolkits for
> data visualization).  This way, our native code and our Java code remains intact.  
>Our bridge
> maps the RNI stubs to call the JNI stubs, and provides the JNI data access functions 
>in the
> event that the JNI is not available.  However, we do not offer this as a product 
>(yet).  If
> there is sufficient interest, we could probably be coaxed into developing this into 
>an actual
> product.  Please e-mail me if you require this functionality.
> 
> I hope this helps.  Native interfaces have been the source of a lot of headaches for 
>Java
> developers.  I repeat my earlier advice:  KISS.
> 
> -dan
> [EMAIL PROTECTED]
> 
> Diego Pons wrote:
> 
> >
> > I'll try to be less terse this time.
> > First, RMI is a great solution, much simpler to code than say RPC's
> > for developing client/server interfaces. The only complication is that
> > to support legacy systems not written in Java, you will need to create
> > a (non-portable) bridge using JNI (see Dan Kirkpatrick's response to you).
> >
> > JNI allows you to interface with the C language, having thus access to
> > the underlying operating system or application interfaces in C.
> > As D.K. says, in JNI you have to map Java classes to C structures on
> > the output arguments, and C to Java on the input arguments, all the while
> > checking for errors at each step. This is a lot easier to say than to do.
> > Most errors will cause the JVM to dump a (most enigmatic) core.
> >
> > Given this difficulty, I suggest to minimize the number of JNI functions.
> > One way is to create a mega-call in JNI where the parameters are a command
> > and a related argument list as strings, in a way similar to ioctl() calls.
> > A typical API would then be handled in this way:
> >
> > my_jni_call(..., OPEN_CMD, arg, NULL)
> > my_jni_call(..., READ_CMD, arg, argsz)
> > my_jni_call(..., WRITE_CMD, arg, argsz)
> > etc, etc.
> >
> > While this goes against elegancy in design, it will add to the robustness
> > of the product by eliminating error-prone Java<->C mapping code.
> > Unfortunately, this came to me only after writing about 3000 lines of
> > the interface code.
> >
> > I suggest reading "Core Java, Volume II", by Horstmann and Cornell for
> > both RMI and JNI examples and references.
> >
> > --
> > Diego Pons Pharos Consulting LLC

--



Re: JDK for 21064?

1998-11-05 Thread Chris Sommers

Disgruntled few,
I am not an expert nor a true hacker, but really! Stop
whining about everything. As a relative newcomer, I am
DELIGHTED about the amount of free, high-quality SW which is
available, such as from the java-linux porting team. People
should not get so indignant; these are the best times for SW
ever.

I left my job in a Silicon Valley telecom startup last
spring, totally burned out. I took some time off, then a
buddy got me hooked on Linux and Java. I was able to get
going for almost zero cost, learned a lot and have now been
able to restart my career as a Java contract programmer, in
part as a result of all the great free stuff out there.

So thanks to all you hard-working hackers. I'm satisfied as
heck! Plus I learn a lot reading your responses on this
forum.

Sorry for using this mail list to express personal opinions
- I just wanted to thank the java-Linux team

- chris



Swing stuff

1998-11-05 Thread chris . roffler

I am using the swing API for my application.  

I am trying to implement my own ToolTip manager for a Canvas.  I got
everything to work except
the location where the ToolTip is displayed on the screen.

I am using an InternalFrame with a JComponent for my canvas in it !
When the Internalframe does not have a menubar the location where the
tooltip is displayed is correct, with a menubar, the tooltip is
displayed at the wrong location ?


Here is the code :
(invoker is the canvas,  this code is taken from JToolTipManager)

public class JPopup
  extends JPanel
{
….

public void show(JComponent  invoker, int x, int y)
{
Point p = new Point(x,y);

SwingUtility.convertPoint(invoker, p, invoker.getRootPane());

this.setBounds(p.x, p.y. this.getSize().width,
this.getSize().height());

invoker.getRootPane().getLayeredPane().add(this,
JLayeredPane.POPUP_LAYER,0);
}
}

Does somebody have an idea what's going on ?


Thanks

Chris



Re: Beans

1998-11-08 Thread Chris Sommers

George,
A worthwhile book to consider  is:

"Developing Java Beans", Robert Englander, O'Reily

It goes into much more depth than the rather superficial and
pat "Teach Yourself Beans in 21 Days" book by Sams books.

- chris

George Karabotsos wrote:
> 
> Hi,
> 
> could anybody give me some starting points of how I should find out more
> about the bean coding standard.
> 
> Regards,
> 
> George.



remove from list

1998-11-13 Thread chris roffler





Re: Mouse Clicks

1998-11-14 Thread Chris Sommers

Karthik,
Assume you have MouseEvent in a variable "event"

int m = event.getModifiers();
if (m & InputEvent.BUTTON1_MASK)   <- detects button 1

Take a look at InputEvents - it has a lot of static
constants used for determining which button was pressed, if
CTRL, ALT or SHIFT were pressed, also etc.

- chris

Karthik Vishwanath wrote:
> 
> Hi all,
> On receiving a mousePressed, how does one determine which mouse
> button is the one clicked?
> 
> ps: i am sorry if this is a purely java based question, but then i do not
> know where else i can post it.
> 
> thanks,
> -Karthik.
> 
> ++
> |  Karthik Vishwanath  |  National Centre for Biological Sciences|
> |  [EMAIL PROTECTED] |  TIFR Centre, IISc Campus, PO Box 1234  |
> |  80-334-5615 or 4062 or 3035 |  Bangalore 560012, INDIA|
> |  Fax 80-334-3851 | |
> ++



Memory Allocation

1998-11-14 Thread Chris Sommers

Estmeemed wizards,
How can I estimate how much memory an object or bunch of
objects consume - besides indirectly, e.g. looking at
Runtime.getRuntime().totalMemory()? For example, how big is
a Vector containing 10,000 of class Double? I'm sure it will
be JVM/platform-dependent, but there must be a way to
estimate it.

Is there documentation on this topic? It seems fundamental.

-chris



Re: RMI binding bug

1998-11-19 Thread Chris Kakris

"Douglas T. Brown" wrote:
> 
> 1)  The correct syntax for the first argument string for rebind is:
> "rmi://host/name", whereas I had only "//host/name".
> 
> 2)  More interesting is that localhost does not work.  Thus,
> "rmi//127.0.0.1/HelloServer" does not work, nor does
> "rmi//localhost/HelloServer".

Are you sure?  (note that you are missing the ":" character in the two
preceeding lines).  I have no problems using rmi://localhost/server.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: Porters: Performance suggestion

1998-11-29 Thread Chris Sommers

Folks,
I believe that using arraycopy as shown below is not
guaranteed to work. One cannot assume that elements of a
Vector are stored in sequential memory locations, especially
as the Vector changes in size and memory is allocated in a
(possibly) fragmented manner obver time.

- chris

Uncle George wrote:
> 
> technically we are to change only the platform dependent code - hands tied
> by license. Ur improvement would not fit into that catagory :( . PLEASE
> file away at javasoft.
> BTW this does not mean that it wont be used, or benefit those here. I have
> no problem with this being posted here
> gat
> 
> Ernst de Haan wrote:
> 
> > Small performance enhancement suggested.
> >
> > The performance of java.util.Vector.copyInto(Object[]) could be
> > improved, I believe. Currently the implementation does something like:
> >
> >public void copyInto(Object[] anArray)
> >{
> >   int i = elementCount;
> >   while (i-- > 0)
> >   {
> >  anArray[i] = elementData[i];
> >   }
> >}
> >
> > Why not make it:
> >
> >public void copyInto(Object[] anArray)
> >{
> >   System.arraycopy(elementData, 0, anArray, 0, elementData.length);
> >}
> >
> > I personally use the copyInto method very often.
> >
> > Is this the place I should post such issues, or should I contact
> > JavaSoft or so?
> >
> > Ernst
> > --
> >  _
> > |  "Come to me all you who are weary and burdened, and I  |
> > |  will give you rest."   |
> > | |
> > | -- Jesus Christ (Mt. 11:28) |
> > |___ _|
> > | Ernst de Haan | email [EMAIL PROTECTED]|
> > | Java programmer   | web   members.xoom.com/znerd/   |
> > | Utrecht University| icq#  21871778  |
> > |___|_|



Re: Unix/Linux commands using Java

1998-12-02 Thread Chris Sommers

Check out O'Reilly books, they have a Perl toolkit set which
includes some java-Perl classes on CD-ROM. I perused the set
briefly at a bookstore. I'm pretty sure the SW was all
public-domain. This was months ago, sorry I can't be more
specific. Someone else must know the details...

- chris

Jaco Greeff wrote:
> 
> > 1. Can I call Unix/Linux commands from my java program?
> 
> Don't know about examples, but check out the Runtime core library.
> (Specifically the Exec method.)
> 
> > 2. Can I combine Perl with Java?
> 
> Ummm... Not exactly sure what you want to do, but using the Exec method
> (check above) you should be able to execute perl code.
> 
> > 3. Can I get javax.swing package in Linux?
> 
> Just download Swing-1.1beta3 for the sun website, add swingall.jar to your
> classpath and away you go. I'm developing using Swing under both Linux and
> Windows and things are running perfectly.
> 
> Greetings,
> 
> // Jaco



Mailing List Maintenance (was Re: DONT SEND ME ANYMORE STUFF!!!!!!!!!!!!!!!!!!!!!!!!!!!)

1998-12-09 Thread Chris Adams

Once upon a time, K.R. Foley <[EMAIL PROTECTED]> said:
>"Michael D. James" wrote:
>> Can we put the unsubscribe instructions (or a link to them) at the
>> bottom of every list message?  Other lists do that.  I think it would
>> cut down the noise.
>
>This is a good idea but it has several downsides:
>1. People with limited bandwidth probably don't want the extra space
>required for the instructions tacked onto every email, especially with
>the volume of messages on this list.

You are kidding, right?  Adding (I'm not sure this is correct for this
list, but you get the idea):

-- 
To unsubscribe, send "unsubscribe" to [EMAIL PROTECTED]

adds 80 bytes to each message.  The body of your message was 1042 bytes,
and was a fairly short message.  I have some java-linux messages stored
here, and the average size of those messages is 2415 bytes.

The amount of space and time saved by including a footer like the one
above would far offset the additional space.

I do think that the list should require a confirmation for subscriptions
also, though.
-- 
Chris Adams - [EMAIL PROTECTED]
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.



Re: Debugging on Linux (Help!)

1998-12-17 Thread Chris Abbey

>1. Is it possible to create a thread dump of this application 
>telnet)after the application has been launched and is running in a 
>background process (a process which may have been started in an earlier 
>sessions)

make sure that when you start it you redirect stdout/err to files
then send it a signal (sig_kill? maybe, depends on your implmentation)
then _copy_ the files. In general you might want to do this anyway
to catch runtime excpetions that boil out of your code and end up
being caught by the jvm. 

>2. Can I use remote debugging to achieve the above and how would it 
>work.

start server with -debug option. Use standalone program to connect...
Jikes!Debugger (www.alphaworks.ibm.com) should fit the bill.

>3. Is there any java command that will generate a thread dump 

The request has been made to javaSoft that a programatic method to
thread/monitor dumps be provided In the meantime you can write a
thread that keeps track of all _your_ threads in the jvm. have each
register with this object then when you want them you push a button
on it (maybe even via RMI) and it takes a dump of each thread object
that's been registered with it and either dumps them to sys.out or a
file, or back to you in a String[] or whatever. (you'd also want to
have an unregister method)

a fourth option (my favorite) is to NOT &/bg your server while
debugging the client, leave it up. This will allow you to put
sys.out.print calls in the server side code and see what's being
called while testing the client -=Chris

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: *strange* rmi/jar related problem

1998-12-17 Thread Chris Abbey

I've seen this before... caused by a bad jar file generated by my script;
try listing the contents of the first jar, they may not be what you expect...
mine were showing up with an 'extra' package, such that my class "foo.bar"
was in the jar file as "builddir.foo.bar". It seemed to be related to what
directory the jar cmd was exec'd from. If I issued it directly OK, but if it
was called from a script things went haywire -=Chris

>Hi, 
>
>I have a strange problem using rmi that is somehow related
>to .jar files.  This is 1.1.7a on Redhat intel 5.1.
>
>Here's what seems to happen:
>- remove all .class & .jar files
>- make (compiles and then produces a .jar file)
>- start rmiregistry
>- run the server, get this error:
>  java.rmi.ServerException: Server RemoteException; nested exception is: 
>java.rmi.UnmarshalException: error unmarshalling arguments;
>nested excep
>  tion is: 
>java.lang.ClassNotFoundException: 
>- jar -xvf the .jar file
>- run the server, works this time.  So it seems that the
>  CLASSPATH does not mention the .jar file?  wrong:
>- jar the .class files into a jar again
>- delete the .class files
>- run the server, it works...running from a jar this time.
>
>Here's an annotated screen capture of this:
>40  4:43killall java   # kill previous rmiregistry & server
>41  4:43psg java   # ps aux|grep.  yes, no java
>42  4:43rmiregistry &
>43  4:43xfilesserver.sh # fails
>44  4:44jar -xvf XF.jar
>45  4:44rm XF.jar
>46  4:44xfilesserver.sh # works
>47  4:44jar -cvf XF.jar *.class   # has *the same* class files as
>before!
>48  4:44rm *.class
>49  4:44newh
>50  4:44xfilesserver.sh # works
>51  4:45rm -rf META-INF/
>52  4:45xfilesserver.sh # works
>
>
>

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: Help!! No appropiate error message trying to bind remote object

1998-12-22 Thread Chris Abbey

When you started the RMIRegistry did it get the correct classpath to find
your _stub and _skel files? This message says no... The message is probably
very appropriate; it is saying that on the remote side of the RMI connection
(which would be the RMIRegistry) there was an unmarshalling excpetion, caused
by the classloader's inability to find Objeto_Stub.class. If you were relying
on picking up your classes via :.: in the classpath somewhere, then you can
fix this be specifying the actual path to your classes explictly. The
RMIRegistry may not be getting started from your CWD... I know it doesn't
on other unix platforms. Try something along the lines of...

cd project/classes/  #or where ever your classes are ...
setenv CLASSPATH `pwd`:$CLASSPATH #change based on your shell of choice
rmiregistry &
java Prueba 

> java.rmi.ServerException: Server RemoteException; nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments;
> nested exception is:
> java.lang.ClassNotFoundException: Objeto_Stub



Re: Some initial impressions (was: emacs vs xemacs)

1999-01-01 Thread Chris Kakris

Michael Doherty wrote:
>
> browsing the web and getting mail. Still haven't gotten Makefile to
> work, but I get some ideas for that when I get back to work Monday.
> (Any sample Makefiles for java would be appreciated - TIA)

Hi Michael

I've included four sample files that I tend to use over and over
again for my projects.  Hope this is usefull:

.makefile.projectX - this lives in my home directory and contains
various variables.  A good way to get around operating system
specifics, for example developing in Linux and deploying on Solaris.

Makefile.common - located at the root of the source tree.
this makefile template is included by every other makefile
in the source tree.

Makefile - this is located at the root of the source tree.  I
use it to generate a jar file for deployment, to generate
the project javadoc and to build the whole project.  you can
modify it to be used at every branch node in your source tree.

Makefile.leaf - (rename this to Makefile) sits in a leaf node
directory of your source tree and lists the source files.  use
to to build other stuff specific to the directory.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax

CP_JDK=/usr/local/jdk/lib/classes.zip
CP_SOURCE=/home/christos/work
CP_JSDK=/usr/local/jsdk/lib/servclasses.zip
CP_JDBC=/usr/share/postgresql/postgresql.jar
CP_EJB=/usr/local/classes/ejbhome.jar

JAVA=/usr/local/jdk/bin/java
JAVAC=/usr/local/bin/jikes
RMIC=/usr/local/jdk/bin/rmic
RMIREGISTRY=/usr/local/jdk/bin/rmiregistry
ECHO=/bin/echo




HAVE_SUBDIRS = true
SUBDIRS  = au com docs
SOURCES  =
CLASSES  = $(SOURCES:.java=.class)
DOCDIR   = docs
DEPLOYDIR= deploy

all:subdirs $(SOURCES)

include Makefile.common

javadoc:
rm -f $(DOCDIR)/*.html
javadoc -d $(DOCDIR) -author -private -version  \
au.net.dynamic.projectX \
com.beeble.misc
chmod g+w $(DOCDIR)/*.html

deploy:
@$(ECHO) -n "Creating jar file ..."
@jar cf $(DEPLOYDIR)/projectX.jar `find au com -name "*.class" -print`
@$(ECHO) "done."




.SUFFIXES: .java .class $(SUFFIXES)

.java.class:
@echo "compiling $<"
@$(JAVAC) -classpath $(CLASSPATH) $<

CLASSPATH=.:$(CP_JDK):$(CP_SOURCE):$(CP_JSDK):$(CP_JDBC):$(CP_EJB)

# Set some global variables that are used to construct the CLASSPATH
# and that are also used in the leaf-node Makefiles.

include $(HOME)/.makefile.projectX

subdirs:
@if $(HAVE_SUBDIRS); then   \
for i in ""$(SUBDIRS);  \
do ( cd $$i; make );\
done;   \
fi

clean:
@rm -f *.class $(JUNK)

cleanall:   clean
@if $(HAVE_SUBDIRS); then   \
for i in ""$(SUBDIRS);  \
do ( cd $$i; make cleanall );   \
done;   \
fi




HAVE_SUBDIRS = false
SUBDIRS  = 
SOURCES  = Main.java ProjectX.java
CLASSES  = $(SOURCES:.java=.class)
JUNK = test

all:subdirs $(CLASSES) scripts

# This target generates a script for testing our project

scripts:
@$(ECHO) -n "Building scripts  "
@rm -f $(JUNK)
@$(ECHO) "CLASSPATH=$(CLASSPATH)" > test
@$(ECHO) "export CLASSPATH" >> test
@$(ECHO) "$(JAVA) au.net.dynamic.projectX" >> test
@chmod 750 test
@$(ECHO) "done."

include ../../../../Makefile.common




Re: JDBC:RMI --> JDBC --> PostgreSQL

1999-01-06 Thread Chris Abbey

I have some experince with RMI, but none with jdbc... so take this with
appropriate amounts of NaCl

The only thought I have is that the extra colons are throwing rmi, jdbc
or both. I'd try the following sequence:

If you have control over what the rmi name of the object is then get rid
of the colons... use / instead. i.e. rmi://horus/jdbc/postgresql/conrado
(If I were a betting man, my money would be on this one. :)

If you can try the client on the same machine as the seerver then drop the
name from the rmi url. (I assume that won't work in deployment, but might
lead to the culprit)

If whoever parses the jdbc: url knows that the next part is rmi (i.e.
doesn't need to be told so, can assume it and pass on the url blindly)
then drop the "rmi:"; RMI doesn't need it. (I doubt this is an option.)

Good luck, hope this can help. -=Chris


<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



(long) finalizer() - potential bug

1999-01-06 Thread Chris Abbey
main [ 1] | > java/lang/Runtime.gc()V (1) entered
# main [ 1] | < java/lang/Runtime.gc()V returning
# main [ 1] | > java/lang/Runtime.getRuntime()Ljava/lang/Runtime; (0) entered
# main [ 1] | < java/lang/Runtime.getRuntime()Ljava/lang/Runtime; returning
# main [ 1] | > java/lang/Runtime.runFinalization()V (1) entered
# main [ 1] | < java/lang/Runtime.runFinalization()V returning
# main [ 1] | > java/lang/Thread.sleep(J)V (2) entered
>if there was anything on finalization queue we would see it being finalized before now
# main [ 1] | < java/lang/Thread.sleep(J)V returning
>f got nulled out here
# main [ 1] | > java/lang/Runtime.getRuntime()Ljava/lang/Runtime; (0) entered
# main [ 1] | < java/lang/Runtime.getRuntime()Ljava/lang/Runtime; returning
# main [ 1] | > java/lang/Runtime.runFinalization()V (1) entered
# main [ 1] | < java/lang/Runtime.runFinalization()V returning
> if it was on the queue we'd see it here
# main [ 1] | > java/lang/Runtime.getRuntime()Ljava/lang/Runtime; (0) entered
# main [ 1] | < java/lang/Runtime.getRuntime()Ljava/lang/Runtime; returning
# main [ 1] | > java/lang/Runtime.gc()V (1) entered
# main [ 1] | < java/lang/Runtime.gc()V returning
>it should have just been added to queue
# main [ 1] | > java/lang/Runtime.getRuntime()Ljava/lang/Runtime; (0) entered
# main [ 1] | < java/lang/Runtime.getRuntime()Ljava/lang/Runtime; returning
# main [ 1] | > java/lang/Runtime.runFinalization()V (1) entered
>yupers! here it is...
# Finalizer thread [ 0] > F.finalize()V (1) entered
# Finalizer thread [ 1] | > java/lang/Object.finalize()V (1) entered
# Finalizer thread [ 1] | < java/lang/Object.finalize()V returning
# Finalizer thread [ 0] < F.finalize()V returning
# main [ 1] | < java/lang/Runtime.runFinalization()V returning
# main [ 1] | > java/lang/Thread.sleep(J)V (2) entered
# main [ 1] | < java/lang/Thread.sleep(J)V returning
# main [ 0] < F.main([Ljava/lang/String;)V returning
# main [ 0] > java/io/FileInputStream.finalize()V (1) entered
# main [ 0] < java/io/FileInputStream.finalize()V returning
# main [ 0] > java/io/FileOutputStream.finalize()V (1) entered
# main [ 1] | > java/io/OutputStream.flush()V (1) entered
# main [ 1] | < java/io/OutputStream.flush()V returning
# main [ 0] < java/io/FileOutputStream.finalize()V returning
# main [ 0] > java/io/FileOutputStream.finalize()V (1) entered
# main [ 1] | > java/io/OutputStream.flush()V (1) entered
# main [ 1] | < java/io/OutputStream.flush()V returning
# main [ 0] < java/io/FileOutputStream.finalize()V returning

So it looks like Finalizer works just like John and I tought it did. If these
aren't the results you get on blackdown then I for one would say it's a defect.
Sorry to have rambled. Thanks for reading this far. -=Chris

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



finalizer() - BUG!

1999-01-07 Thread Chris Abbey

John,
 At this point I'd say they've got a bug in the version you have installed
on possum, "Linux_JDK_1.1.7_v1a_green_threads", but not on the one on emu,
"stevemw:08/29/98-05:16". I hate to add a variable at this point... but
what about native threaded?? -=Chris

At 07:04 AM 1/8/99 +0800, John Summerfield wrote:
>[summer@emu data]$ java G
>
>finalize
>[summer@emu data]$ java -fullversion
>java full version "stevemw:08/29/98-05:16"
[...]
>[summer@possum data]$ java -fullversion
>java full version "Linux_JDK_1.1.7_v1a_green_threads"
[...]
>[summer@possum data]$ java_g G   
># main [ 1] | < java/lang/Runtime.traceMethodCalls(Z)V returning
># main [ 0] < G.()V returning
># main [ 0] > G.main([Ljava/lang/String;)V (1) entered
># main [ 1] | > G.()V (1) entered
># main [ 2] | | > java/lang/Object.()V (1) entered
># main [ 2] | | < java/lang/Object.()V returning
># main [ 1] | < G.()V returning
># main [ 1] | > java/lang/Runtime.getRuntime()Ljava/lang/Runtime; (0) entered
># main [ 1] | < java/lang/Runtime.getRuntime()Ljava/lang/Runtime; returning
># main [ 1] | > java/lang/Runtime.runFinalizersOnExit(Z)V (1) entered
># main [ 2] | | >
java/lang/System.getSecurityManager()Ljava/lang/SecurityManager; (0) entered
># main [ 2] | | <
java/lang/System.getSecurityManager()Ljava/lang/SecurityManager; returning
># main [ 2] | | > java/lang/Runtime.runFinalizersOnExit0(Z)V (1) entered
># main [ 2] | | < java/lang/Runtime.runFinalizersOnExit0(Z)V returning
># main [ 1] | < java/lang/Runtime.runFinalizersOnExit(Z)V returning
># main [ 0] < G.main([Ljava/lang/String;)V returning
>[summer@possum data]$ 

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: (long) finalizer() - potential bug

1999-01-07 Thread Chris Abbey

At 12:32 PM 1/7/99 +0100, Chr. Clemens Lahme wrote:
>when I added a System.exit( 0 ) call to main, jre does work for me.

Oi. I got the same results. So now there is DIFFERENT behaviour on between
the java and jre runners . . . just peachy. I'm going to have a look into
that might be a bug to Javasoft? -=Chris



<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



suggestion for list (was: Re: STOP asking about Java 1.2 / 2)

1999-01-09 Thread Chris Abbey

The recent on-list exchange between John Summerfield and Kontorotsui has
brought a background thought of mine to the foreground, so I'd like to share
it with the list and see what the general opinion is.

I suggest that the current copy of the FAQ be included with the succesful
subscription message. I know this is possible with majordomo because other
lists do it. I believe this will reduce the volume of these questions because
it appears that most of the people posting this question have just joined
the list. (probably in order to ask that question.)

I also suggest that all messages from the list have a standard footer
appended; something like what Redhat does on their lists. I'd suggest:



(Java && Linux) - [EMAIL PROTECTED] - !(Java || Linux)
To unsubscribe: issue the following command from a shell prompt
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null



or maybe that first line should be:

if (Subject == (Java && Linux)) { To = [EMAIL PROTECTED] };

Comments? Cheers all! -=Chris

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: class finalizer?

1999-01-13 Thread Chris Abbey

>Is there any way to detect when a class is going to be unloaded from the
vm
>sort of the opposite of static { ... }?
>
>--jason

In theory or in practice?

In theory the JLS says so, put a static method finalize() in the class
(sorry, don't remember the protection, maybe public??) and the VM is
supposed to call the method before unloading the class.

In practice . . . well, even Sun never bothered to implement it, and
I doubt the JCK checks for it either. IIRC someone posted a quote from
bugParade re this; check the archives if you're interested or search
for finalization in bugParade.

There was also a suggestion to strike that requirement from the JLS,
hopefully this was given some serious thought before being accepted!

To keep this Java && Linux, are the Blackdowner's considering doing
more than just porting? Not to imply that porting isn't a major
undertaking in and of itself. But are any of you working on enhancements
or bugfixes as well? -=Chris

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: class finalizer?

1999-01-14 Thread Chris Abbey

DOH! The signature was supposed to be:
static void classFinalize() throws Throwable
the one I gave was (obviously) instance finalization... see JLS §12.7.

But it's a academic now, Javasoft has removed it from the JLS -- see
http://java.sun.com/docs/books/jls/class-finalization-rationale.html
for details. -=Chris

At 11:56 PM 1/13/99 -0800, Jason Dillon wrote:
>a static finalize method causes the compiler (jikes in this case) to return:
>
>93. public static void finalize ()
>   <->
>*** Error: The static method "void finalize();" cannot hide the instance
method
>
>--jason 
>


<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: Is the object code replicated?

1999-01-16 Thread Chris Abbey

The JVM spec is quite specific about this. There will only ever be one copy of
any code block. The compiler has no say in this regard as it's required to
produce
files compliant with the .class format, wherein the object data and the
code are
distinctly seperated. The JVM Spec is available online from the Java
Developers'
Connection, goto the documentation and it's a couple links below the JLS.

>Hello,
>suppose I declare a class with a huge amout of instance variables and
>many, long, instance methods.
>
>If I create thousands of objects of this class, of course there will be
required
>thousands times the space of the variables, but what about the method code?
>I guess it's not repicated, but this up to the compiler.
>
>Since it's likely to depend on the platform and JDK release, how does the
Linux
>javac behave?



<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: Is there a good java Linux debugger?

1999-01-21 Thread Chris Kakris


Andre Paradis wrote:
> 
> Could you suggest a couple a good java debuggers under
> 
> linux (free ones are prefered, but any suggestion welcomed)

I use the jikes debugger.  Works fine.  Go to the IBM
alphaworks web site and grab a copy:

http://www.alphaWorks.ibm.com/formula/JikesDebugger

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: Is there a good java Linux debugger?

1999-01-23 Thread Chris Kakris


> Is a java debugger the same thing as a java editor.  I'm looking for a
> Java Editor (preferable with Colours) to use in Linux.  Currently I use
> Kawa  in Win 32, and I am looking for something similar to this for
> Linux.

I use vim with colour syntax highlighting.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: How can I do it?

1999-02-02 Thread Chris Abbey

Do a runtime exec of "cat /proc/meminfo" and attach the process's
stdout to an io reader of some sort (it's only a stream afterall)
@see Ljava/lang/Process, Ljava/lang/Runtime for needed methods.
Just remember that by doing this you have:
1. broken platform independence.
2. created a requirement that your linux users have the /proc
 filesystem installed and configured, and have read authority.
-=Chris

At 05:06 PM 2/2/99 -0800, Juan Carlos wrote:
>Hi,
>
>How can I read the files of /proc directory with JDK?  The information
>of these files is generated with the  cat option.  (EX:  cat
>/proc/meminfo).  It information don´t is fixed in these files.
>
>Thanks for your attention.  
>
>J.C.


<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html

-BEGIN GEEK CODE BLOCK-
Version: 3.12 http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: benchmarks

1999-02-03 Thread Chris Huebsch

Hello,

[EMAIL PROTECTED] wrote:
> 
> Hey all...
> 
> I'm looking to see if anybody knows where I can find some recent benchmarks
> results for the Linux JDK on x86...  Preferably, but not necessarily, with
> CaffeineMark or JMark benchmarks... It would definitely help to have
> results WRT different configurations...  i.e. Using TYA, native threads,
> green threads..
> 
> Also, I'm looking for comments on what you all might deem as the most
> reliable benchmark util to follow as far as Linux is concerned...

I did some tests with shujit and tya with jdk 116v5 on a libc- and a
glibc-system.
I used Linpack, the Sieve of Erastosthenes and EmbeddesCaffeinmark.

The results can be found here
http://www.tu-chemnitz.de/urz/java/news/00021.html (sorry - this page is
in German - babelfish may help!)

cu


Chris
PS: Does anyonke know a JIT for Alpha-Linux or is currently porting
one??
-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



will there be a jdk 2.x??

1999-02-12 Thread Chris Tomlinson

There used to be a note that jdk1.2/2.0 was 'in progress' now that is no
longer there. What is the status for jdk 2.0 for linux??

Thanks and ciao,
Christine Tomlinson




Re: createImage() always returns null

1999-02-14 Thread Chris Huebsch

Hello,

is the Panel already visible?

If not, then show() it before getting a Image!


greetings


Chris

Manfred Bartz wrote:
> 
> I want to create an off-screen image in a Swing application.
> The program compiles without errors, but createImage() always
> returns null.
> 
> The only examples from the tutorial that contain createImage() are
> applets (not swing applications) and seem to work fine.
> 
> For verification, I included the relevant code snippet (as shown
> below) in a swing application example from the tutorial -- same
> result.
> 
> Am I missing something???  or is that a swing bug?
> I am using jdk117_v1a, swing-1.1.1-beta1

...

> 
> Any feedback appreciated
> --
> Manfred

-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu/");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



Re: Problem : can't find class

1999-02-14 Thread Chris Huebsch

Hello,

try adding a "." to the classpath.

CLASSPATH=.:/usr/local/java/lib/classes.zip:/usr/local/java/jsdk/lib/jsdk.jar

Chris

Vinay Pai wrote:
> 
> Hello,
> 
>  I am having the following problem when I try to execute a java program ,
> says :
> can't find class test
...
>  The classpath variable is as follows :
> 
> CLASSPATH=/usr/local/java/lib/classes.zip:/usr/local/java/jsdk/lib/jsdk.jar
> 
> I am using Red Hat Linux 5.0 and jdk1.1.5.
-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu/");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



Re: java programming

1999-02-15 Thread Chris Huebsch

Hello,

> in Java all variables with final qaulifier must be initialised during
> decalration. so you can't compile this code

this is not correct. With Java2 you can use deferred-initialization of
final-variables.

That means that you can declare a: "final  ;" and do later a
" = ;"

But there must be one and only one initialization!

regards


Chris
-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu/");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



Re: About Communication Ports API...

1999-02-15 Thread Chris Huebsch

Hello,

there are Linux-Ports but unfortunately they only support Serial Ports.
(Please correct me if I am wrong.)

Have a look at:

http://www.blackdown.org/java-linux/otherproducts.html

and look for: Java Comm for Linux or RXTX

greetings

Chris

Julian Bolivar wrote:
> 
> Dear Srs.
> 
> Can I  use the Sun's Communication API in the Linux JDK 1.1.7v1a,
> because I need access the PC's Serial and Parallel Ports.
> 
> Regards.
> 
> Julian Bolivar

-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu/");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



Re: Device communication.

1999-02-15 Thread Chris Abbey

Basically you want a non-blocking read... join the club.

Here's _a_ solution: use two threads. The first thread reads the data,
the second thread sleeps for a while and wakes up the first thread if
it hasn't read yet. (yeah, "ugh" was my first reaction to this method
too)

Here's _a_better_ solution (but still not optimal):

byte[]
readUpToNBytesWithOutBlockingForever(
  InputStream from,
  int N,
  int maxLoops) {
byte[] retval = new Byte[N];
int temp;
int rsf = 0;
int lcv = 0;
while (rsf < N && 0 < lcv) {
  temp = from.available();
  if (temp > 0) {
from.read(retval, rsf, temp); //won't block
lcv = 0; //reset loop count var
rsf += temp;
  } else {
++lcv;
//you could also do a thread.sleep() here if your device is
// really slow, or some form of thread.yeild() if you are
// worried about chewing up CPU time in a busy wait state
}
if (rsf = N)
  return retval;
else
  ...
  }

Well, it's ugly code, but you get the idea

Now I'm curious... what file are you using to talk to a serial device?
something in /dev, but which? /dev/cua? does this work both for read
and write? I'm looking at doing some form of out-of-band signaling
between two PCs (right next to each other) and a null modem cable sounds
a lot cheaper than my other ideas ;) 

Oh... but wait... does available() correctly report on these "files"
or do they suffer the same problem as those in /proc?  It would be nice,
in this case, if available() would report the bytes as yet unconsumed
for the port or pipe or whatever is under the file. Of course that assumes
there is a buffering under there... and now I'm getting into deeper water
than I care to swim this week... any kernel hackers care to step in and
tell me I'm being a wishfull fool? :) -=Chris

At 04:25 AM 2/15/99 PST, Ejaz Mohd wrote:
>Hello,
>I've small problem. 
>I've a device connected on a serial port. To communciate with that 
>device I've opened random access file.
>This strategy works but when device is unable to send me the
>required bytes or when device is switched off my java program
>goes in an blocked mode. And unless I press ^C the program does'nt
>come out.
>One of the alternatives is to use 'Communication API' but is their
>any other method?
>Ejaz
>
>__
>Get Your Private, Free Email at http://www.hotmail.com
>
>
>

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--



Re: JavaLinux for servlets [off-topic]

1999-02-17 Thread Chris Huebsch

Hello,

let me contribute a word or two to this discussion...

John Goerzen wrote:
> 
> This is not really the point.  The point is that for a heavily-loaded
> server, even a small difference in performance can make a tremendous
> difference in the system -- possibly the difference between running well and
> not running at all.

AFAIK unix doesn't support real threads. For new requests a new instance
of the CGI is created with fork() or something like that? Now imagine a
server with a load around 99%. 

The first is a "non-java-at-all" Server. It has to create a new process
when a request arives. Where? The system is almost at the limit? It is
likely that it starts paging and if paging starts performance will go
down very fast.

The second server uses servelets and a thread-pool. When a request
arrives a thread is taken from the pool, executes the request and sent
back to the pool. There are no processes to create. Memory is already
allocated (of course - paging may be done here too). When the Server
runs a while then all Classes are native-compiled.

> I do disagree that Java is more maintainable than Perl in general.  If you
> know Perl, it is quite easy to read and maintain.  The regexp support makes
> it far easier to code and maintain anything that parses things that are even
> vaguely complex.

Yes. RegExps are really missing in the java-core. But there are many
pure-java extensions available.

> I do not, and have never, reccommended PHP3 for anything "serious", for just
> these issues, and others.  But mod_perl and FastCGI are quite good for CGI.

Database-Access with php or perl may be simple with simple problems. But
when the problem gets more complex the problems increase exponentially.
For instance you change your database from oracle to informix. With php
you may change all your pages and replace oracle_db_XXX() to
informix_db_YYY(). In java you write a factory which creates the
SQL-Statements and only change the factory. The remaining parts of your
application/applet/servlet remain untouched

> No, I've seen Java programs, and even a "serious" applet or two.  The point
> is that this is not an acceptable or useful paradigm in my opinion.  The
> fact that the language used is Java is really irrelevant.

Java is not just a language! It is an very large API and a Virtual
Machine too.
And one usefull use of Applets: I wouldn't do my online-banking with
ActiveAEKS or just SSL. A-X wouldn't run on a Sparc ;)

> If one really wants this sort of thing, embedded X may be a better solution,
> but it has lots of problems, too.  I don't think it's a good solution either
> (except perhaps for corporate LANs.)

There are some problems which require not much data-transfer but a lot
of graphical work. I cannot imagine transferring every single screen via
X-protocol. (Embedded X is a X-Server inside the browser - isn't it?)
This would almost be like Microsofts "terminal server". (Which needs
huge amounts of main-memory for each clinent)

> You're clouding the issue.  The point is that HTML itself is not adequate in
> the case you're describing.  In fact, the whole Web idea is not adequate
> here, and it was never designed to be.

Of course it wasn't. But applets seem to be a good solution to extend
HTML to be more "active". (And I do not speak of scrolling texts or
animated images!)

> I have never disagreed that a Java-based GUI application (note, not applet)
> as a client would be good, and in fact, in the message to which you are
> replying, you snipped the part where I said so.

As already written - why to risk serious trouble by mixing lots of
different technologies when you can use one? (If you really need peak
performance you could use JNI with ANSI-C on the serverside)

> I wish people would stop comparing a current Java idea with an outdated CGI
> one.  If you want to compare it to CGI, please do us the favor and compare
> it to current CGI ideas.

And I wish people would stop comparing a current CGI idea with an
outdated Java one ;)
Java was designed with JITs in mind. Why would the bytecode assume a
stack-architecture (which is simmilar to intermediate-code of "normal"
compilers) if not to compile the last stage?

regards


Chris
-- 
public class chu extends ChrisHübsch implements TUChemnitz {
  String  email= "mailto:[EMAIL PROTECTED]";
  String  SMSMail  = "mailto:[EMAIL PROTECTED]?Subject=SMS: info";
  URL homepage = new URL("http://www.tu-chemnitz.de/~chu/");
  Talktalkto   = new Talk("[EMAIL PROTECTED]");
  Integer ePlus= new Integer(4628555);
}



dialogs

1999-02-22 Thread Chris Hawks

Hi All!

I didn't find an answer in the mail-list archive [ :-> ], so, I'll ask:

I'm working on a java application that uses several JDialog boxes. If
I use the constructor with params within my extension of JDialog (i. e.
super(dad, title, modal); ), the JDialog does not have a title bar. This
only occurs on the Linux boxes here, the Winderz boxes show the title bar.

If I don't invoke the super call explicitly (or use an empty param
list 'super(); ) the JDialog does have a title, but allows the window
manager to position it instead of centering over the parent object.(even
if I use 'setPositionRelativeTo(dad);'.

Is it Linux, Java, or Me?

 Chris

Christopher R. Hawks
Software Engineer
Syscon International
[EMAIL PROTECTED]

Linux: The OS for people with an IQ over 98




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



RE: System.runFinalizersOnExit

1999-02-23 Thread Chris Abbey

>> `` System.runFinalizersOnExit(true) ''
>> 
>> Does this work/implemented on Blackdown JDK 1.1.7-1a or not?

There was some discusion of this in the past... check the archives if you
weren't around or don't keep the old list messages. some of that discusion
may interest you. IIRC it works in the JDK, but not in the JRE... yup. 
I just checked with 117_v1a; green threads show JDK finalizes JRE does not,
moving to native threads yields no difference. (This was the _first_ piece
of java work ever done on my new Linux box :)

>I'd like to know that too. The JDK docs say that it's unsafe etc, but *why*?

Because the implementations never really worked right for anything beyond
trivial.

>What is so difficult about implementing it? The way I see it, the JVM has to

lots of things make this far from simple, one of the big ones is that the
JVM itself may never get a chance to execute, `kill -9 jvm` would not give
the jvm a chance to do ANYTHING. Not all platforms make the distinction
between a 'kill' and a 'kill -9', take windows for example. Another is
execution environment, often the type of cleanup needed by non-trivial
applications requires active work... make a connection to the server/
database/widget-factory and release my resources, then clean up local and
network resources; these types of activities may need resources which simply
are no longer available in the context of a JVM being shutdown.

>keep track of when all referces to a given object has been eliminated, right?

Yes, but that is NOT finalizeOnExit. That's finalize on unreachable One
thing that makes this different is that at exit the object may still hold
references to any number of other objects, thus it has the potential to call
methods on these objects; but what if that object was alreay finalized...

>So what's stopping the JVM from executing the finalizer before throwing the
>object away?

The very tree structure mentioned before, which is only a degenerate case of
an even worse looking graph -- circular dependency. Let's say the JVM folk
decided to do all kinds of difficult processing to figure out a finalization
tree, AND let's say that it really is a traversable graph (that is, we won't
deadlock trying to finalize) THEN we go through the process of finalizing all
the objects in the tree AND let's say they didn't need any kind of fancy
support that wasn't available in a dying JVM, AND lets also say the manage
to do ALL this work in the time aloted by the OS to clean up from a sigkill...
then what? what have we accomplished? Allowed a few programers to get away
with writing bad code at the expense of everyone. No. Sorry. I think they
got it right on this one... automagic finalization at exit was a nice dream
back in jdk 1.0, then in 1.1 someone saw how really thorny the problem was
and how badly it was being abused, finally in 1.2 reality sets in. OK, I've
drifted off topic too far already, so I'm going to just say "write code that
doesn't require the environment to clean up after you." and leave it at that.
(well, not quite, I don't mean to say cleanup isn't necesary, just that you
as the programmer know what needs to be done better than the JVM as mere code
can determine... do it yourself, you'll get better code that's easier to debug
and better design next time. Trust me.) -=Chris

<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Multi-Threading: Preemptive?

1999-02-24 Thread Chris Raser


Greetings all!  I've got a little problem with the handling of
threads on my machine.  (I'm using RH5.1 w/ your jdk117) 

I'm finding that, given two threads of the same priority, the one
that's currently getting CPU time will starve the other one until an
explicit yield() or sleep() is reached.  Is there any way to fix this? 

I've got a reasonably elegant workaround, but it's a workaround
nonetheless, and I'm reluctant to make it a standard part of my code.  (As
I'll have to do in order to ensure that my code will work on all three of
the platforms that it will be running on.) 

Any help or insights you guys can offer would be appreciated.
Thanks!

-chris

***
 The most important thing in the programming language is the name.  A 
 language will not succeed without a good name. I have recently invented a 
 very good name and now I am looking for a suitable language.  
-- D. E.  Knuth, 1967
***



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



Re: Multi-Threading: Preemptive?

1999-02-24 Thread Chris Raser


On Wed, 24 Feb 1999, David Craig wrote:
> Java doesn't define how threads of the same priority share cpu time In
> some VM implementations the sharing is fair. On others, such as the port
> you're probably using, one thread preempts the other indefinitely.
> 
> Congrats on an elegant workaround. :)
> 
Actually, it's not my own invention, and I'm sure that others have
done something similar.  All I did was create a thread of "MAX_PRIORITY"
that just goes right to sleep.  It preempts everything else, then gives
the little guys a chance to do their thing.  (and I write a minimum of
extra code to keep everything moving)  Maybe "honorable hack" is a better
term than "elegant".  

Thanks for the info- my java-idealism was getting just a little
out of controll there for a second... ;)

-chris

***
 The most important thing in the programming language is the name.  A 
 language will not succeed without a good name. I have recently invented a 
 very good name and now I am looking for a suitable language.  
-- D. E.  Knuth, 1967
***



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



Re: Multi-Threading: Preemptive?

1999-02-24 Thread Chris Raser


On Wed, 24 Feb 1999, Moses DeJong wrote:
> I do not mean to rip on your code or anything, but if you require a

Not at all.  I'm pretty new (the last 3-4 years) to programming,
and most of that has been in persuit of a CS degree, so I haven't had much
of a chance to do any real coding. :(

Right now I'm just testing a small piece of a larger puzzle.  We
need a component that will maintain an array of objects sorted according
to their proximity to a point in space.  That point will be changing
moment-to-moment, so sorting on inserting won't be possible.  The idea is
that we plunk the object into the array at a likely spot, and let the
array maintain the sort from there.  Creating a thread to sort the array
as resources permit seemed a good way to go.

Any sugestions are welcome, and are greatly appreciated.

-chris



***
 The most important thing in the programming language is the name.  A 
 language will not succeed without a good name. I have recently invented a 
 very good name and now I am looking for a suitable language.  
-- D. E.  Knuth, 1967
***



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



Java2

1999-03-08 Thread Chris Kakris

I'd like to say thanks and well done to the porting team.
Keep up the great work guys.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax


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



Re: unpacking JDK1.2

1999-03-09 Thread Chris Kakris

[EMAIL PROTECTED] wrote:
> 
> I noticed that the download I have of the JDK1.2 is 36M and the all of the new
> ones are 24M and 12M, plus they are in a bz2 format.
> How does one go about unpacking this format?
> I have RedHat5.2 and when I try to unpack bzip20rmp all I get is 
> However, I can't find any help files listed for bunzip2
> Can someone help me out?

bunzip2.  it comes with RedHat 5.2.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax


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



Re: Unidentified subject!

1999-03-10 Thread Chris Kakris

> Pavel Kessler wrote:
> 
> The java virtual machine requires libstdc++. which
> IS NOT PART OF MY LINUX DISTRIBUTION ( SuSe 6.0) !

This is a known problem.  Check the mailing list archives at:

  http://www.mail-archive.com/[email protected]

and in particular:

 
http://www.mail-archive.com/[email protected]/msg05631.html

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax


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



Linux/Alpha port of JDK

1998-05-11 Thread Chris Adams

Is anyone working on the Linux/Alpha port of the JDK?  I have problems
with the version downloaded from http://www.voicenet.com/~gatgul/JDK/.

The biggest problem is that I can't run anything that uses the
InstallShield Java Edition.
-- 
Chris Adams - [EMAIL PROTECTED]
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.




jdk-1.1.5-v7-glibc (sbb-port) not working properly

1998-05-18 Thread Chris Picton

Hi

I have a new install of Redhat 5.0 off the CD

I installed jdk1.1.5 (the latest glibc version)

When I run "java" by itself, it prints the options etc on the screen

When I run "java classfile", I get a core dump every time

Is this a known problem, and are there any solutions

Thanks

Chris
[EMAIL PROTECTED]




Re: install JDK without AWT ? [ no x11 ]

1998-08-13 Thread Chris Kakris



On Thu, 13 Aug 1998, Patrick Dockhorn wrote:

> hi,
> 
> I am trying to get JDK, i.e. servlets up and running on my linux
> machine. From what I understand, this requires X11, as the AWT package
> that comes with the JDK obviously requires this library.

If your servlets don't reference any of the classes in the AWT package
then I can't see you having problems if X11 isn't installed - unless I am
mistaken.

However the REAME.linux in the jdk1.1.6 package mentions that by setting
the NS_JAVA environment variable you will ...

"...get the much smaller nonstatically linked Java interpreter.  You
 will not be able to run any AWT based applications with the
 nonstatically linked java interpreter, so only set NS_JAVA for
 non-GUI based applications."

Hope this helps.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



RE: apache + mod_jserv for Linux 2.0.27 ?!

1998-08-17 Thread Chris Kakris


On Mon, 17 Aug 1998, Ted Guild wrote:

> Patrick,
> 
> That mod was written/rewritten last around the time of Apache version
> 1.2.6.  I tried compiling it with 1.3 and was running into troubles
> re-#defined something I found in a FAQ on Apache's site and was still not
> going well.  Have been meaning to retry it with Apache 1.3.1, but haven't
> gotten around to it.  Try mod_jserv with Apache 1.2.6, it went smoothly for
> me.  If you need newer Apache, try another servlet engine many have Apache
> ports.

I recently built apache1.3.1 with mod_jserv0.9.11.  Worked just fine using
the new Apache config system.  I used the following:

  ./configure --prefix=/usr/local/apache \
  --add-module=/usr/local/jserv0.9.11/mod_jserv.c \
  --enable-module=most \
  --enable-shared=max \
  --enable-suexec \
  --suexec-caller=www \
  --suexec-userdir=.www \
  --suexec-uidmin=1000 \
  --suexec-gidmin=1000 \
  --suexec-safepath="/bin:/usr/bin"

Hope this helps.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: Efficiency/GC problem with Runtime.exec()?

1999-03-19 Thread Chris Abbey

At 03:58 PM 3/19/99 +0100, Robb Shecter wrote:
>I've noticed weird behavior with JDK1.1.7a (Suse 6.0) that I didn't see
>with JDK 1.1.6:  When doing the most basic system exec, and then reading
>in the stdin, Java frequently hiccups, for a good second or two, usually
>when garbage is collected.

117_v1a right? although I've not run 116, you should have seen it there
too... unless something else masked the behaviour. What I'm seeing in the
example you posted below is the standard penalty for a garbage collected
language, especially when you're creating as much garbage as you do in
this tight little loop:

>while ((line = in.readLine()) != null) {
>System.out.println(line);

running 117_v1a, native, with the -verbosegc option I see that a quick run
on my "toy" system produced 137598 objects and 8000423 bytes worth of trash!
Most of that is because of this loop, if I take it out then I only get
348 objects and 14432 bytes of trash. (of course I also lose the
functionality of the program ;)  I would highly recommend that you
write your own readln method taking a char[] or a StringBuffer if you
_have_ to have an object and recycling a single object throughout the
operation. Just because gc is there doesn't mean we _have_ to use it ;)

>Here's a small class that demonstrates the problem by calling a command
>that generates a lot of output.  It doesn't hiccup as much as my Find
>class does, but it still shows the effect:

I'm guessing that it doesn't hickup as much because it doesn't result
in as much output, right? I wasn't able to recreate anything longer
than 100ms on my machine (133 Pent, 80MB RAM) with this form, but I've
certainly seen GC's take upwards of a few minutes on machines at work
(don't ask ;)


<*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Efficiency/GC problem with Runtime.exec()?

1999-03-24 Thread Chris Abbey

>Thanks - I really hadn't considered the fact that the call to readLine()
may be
>creating a lot of throw-away objects, too.  I just saw that my loop was
creating
>one String object per iteration, so I thought, "That's not too bad." :)

:) been there... thought that too... then found out The Hard Way(tm)
that one string is also a fair amount of memory...

>I'm still confused, though, by the output from -verbosegc.  When I ran it,
there
>was always a message at the same time as one of these 1-2 second pauses.
Made
>it obvious that gc had something to do with this.  But the gc messages
claimed
>that the garbage collection took only a few milliseconds, while the
perceptible
>pause was at least a full second.

OK, how often did you see GC taking place? my test only ran about 2 min total
(it was `ls -lR /*` on 3/4 gig of fast dasd) but it caused over two dozen GCs
to take place (iirc 4 async, the rest alloc fails). did you see a lot of GC
work going on or was there only a few massive cleanups? (note to anyone with
access to the GC code: it would be _very_helpful_ if you would include the
system time (an unformated long is fine) within the " <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: grrrrrr.....

1999-03-29 Thread Chris Hawks

---On Sat, 27 Mar 1999 18:35:29 -0500,  Matthew McKeon said


>   Where the heck is the activator?!?
>   Does anyone know of any mirrors where I might obtain it?
> 

Matthew:

I don't know if this will work with JAVA1.2, but, with 1.1.7 we simply
copied swingall.jar to /netscape/java/classes and turned off javascript so
the document can't check for the plug-in. This lets us run swing1.1 applets
in netscape4.x.

     Chris

Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International

[EMAIL PROTECTED]





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



Re: java performance under linux

1999-03-30 Thread Chris Abbey

>  I am developing a network performance benchmarking program with java. I
>have resently intalled jdk1.1.7 in my redhat5.1but i am getting very slow
>prefrormance. i.e. a for loop from 0 to 3x10^7 takes about 10 secs while
>when using vcafe in windows95 itneeds about 1 sec on the same machine. I am

Your running with a JIT in winblows aren't you (if you don't know, then
yes, you are; and in vcafe it's one of the fastest in the industry) but
not in Linux (if you don't know then you _ARE_NOT_). Disable it in winblows
and I'll bet you see the performance equal out on that tight loop. Compile
with jikes and I'll bet you see a slim improvement as well. If you're running
serious multi- threaded stuff you might find that linux and native therads
will edge out winblows due to the overall inferiority of the Redmond OS.

>doing something wrong ? What cani do to maximize the performace of my linux
>when running java?

Find a jit for linux that you like, use it, contribute to it and/or it's
developers. There are a couple different jit projects out there.

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Using Syslog from Java

1999-04-05 Thread Chris Kakris

Cynthia Jeness wrote:
> 
> Actually, what I would like to be able to do (if possible) is to contact
> "syslogd" directly from Java using UDP.  I want to avoid native code since
> we need to have this work across all the platforms which support syslogd.
> So does anyone know if it is possible to communicate to syslogd through UDP
> and, if so, where might I find the protocol documented.

I've got a bookmark to this site, but have never actually
downloaded the software but it may help:

  http://www.ice.com/java/syslog/index.shtml

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au/christos
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax


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



Re: Why rmiregistry fail

1999-04-06 Thread Chris Abbey

>java.rmi.ServerException: Server RemoteException; nested exception is:
>java.rmi.AccessException: Registry.rebind 10.103.34.2/10.103.34.2 !=
>java.zj.cninfo.net/10.103.34.5

This exception is what happens when a host on node A attempts to bind an
object in the registry of host on node B. In your case the "nodes" are both
your machine, one before the network change, one after. The solution is to
take the rmiregistry down and restart it... with all the consequences that
come with doing that. -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



x509 certificates and mod_jserv anyone?

1998-08-25 Thread Chris Kakris


Is there a way I can get access to the client's x509 certificate from
a servlet?  I'm using the latest mod_jserv and apache.  Any pointers
appreciated.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: JDBC-ODBC Bridge

1998-08-28 Thread Chris Kakris


On Fri, 28 Aug 1998 [EMAIL PROTECTED] wrote:

> Does anyone know of a JDBC-ODBC Bridge for Linux? I'm running Red Hat
> 4.something Linux, kernel version 2.0.27.

Well I'm currently using postgresql and there's a driver here...

http://rufus.w3.org/linux/RPM/postgresql-jdbc.html

I previously used mysql, try

http://www.tcx.se/Contrib/

And there's one for msql

http://www.imaginary.com/~borg/Java/

Good luck.

Chris

Dynamic Solutions Pty Ltd  http://www.dynamic.net.au
414 Gilbert Road   [EMAIL PROTECTED]
Preston, Victoria 3072 61 3 94718224 - voice
Australia  61 3 94711622 - fax



Re: Intuit-webturbotax

1999-04-15 Thread Chris Abbey

At 05:02 PM 4/14/99 -0700, Bill Broadley wrote:
>It's VERY frustrating to have portable java hamstrung to mac/windows
>usage by just a feature.

They may have a reason for doing it... like they used native code or
something... I'm not familiar with the product.

>Does anyone know of a way to get linux-java to return win95 or similiar
>as an OS?

you mean the property os.name? try adding -Dos.name="Windows NT" to the
invocation. Works for me to fool NT into thinking it's Linux... never
thought to try degrading Linux into thinking it's NT. ;) -=Chris


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: java.util.Calendar timezone problem

1999-04-15 Thread Chris Abbey

You two got me curious... on my linux 117_v1a the system is set to CST via
/etc/localtime -> ../usr/share/zoneinfo/US/Central and `date` returns times
in CDT as expected... (three weeks ago it returned CST as expected) HOWEVER
user.timezone is always EST when I start java, and System.out.println(new
Date()); results in EDT (at least it's consistent...) If I over-ride
user.timezone on the command line with CST then I get CDT, as expected, and
if I override with CDT I get GMT from the println. (believe it or not...
also as expected!)

The only difference between Linux and (IBM's) NT then is that NT sets
user.timezone to _my_ timezone instead of arbitrarily picking EST. Why
isn't Linux??

At 10:16 AM 4/15/99 -0500, Marius Schamschula wrote:
>Feng-Cheng,
>
>You beat me to the post. I've got a similar, related?, problem. I have
>two machines, both running mkLinux DR3. The older runs jdk117_v1a. I've
>got a simple directory listing cgi, JFind, running under Apache (I
>directly use java, not Jserv, via a shell wrapper). It returns the
>correct CST and CDT. The newer machine is running jdk12pre. It returns
>EST and EDT, whereas the unix shell command date returns the correct
>time zone: CST and CDT. JFind uses the java.util.Date routines:
>
>File f = new File (somefile);
>Date d = new Date (f.lastModified ());
>
>Does anyone know what is going on?

I think there has been some massive reworking of the java.util.Date, and 
Gregorian Calendar from 1.1 to 1.2... I wouldn't be surprised if something
broke in the process.

Feng-Cheng wrote:
>Hello all,
>I have a question about the time zone settings:
>My Linux box is using local CST time, but the java.lang.Calendar or
>java.lang.Date always report CDT...
>Here is my program:
>
>import java.lang.*;
>import java.util.*;
>
>public class TestCal {
>public static void main(String[] argv) {
>Calendar cal = Calendar.getInstance();
>System.out.println(cal.getTime());
>}
>}
>
>The output of the program is always CDT time.
  ^^
By "always" you mean since the first Sunday of April right? This is correct
behavior. To test this set your clock back to February or March and run your
program again... it'll report CST. There is probably an option somewhere in
Calendar to not adjust to daylight savings time... but it might confuse a
few people if the clock on the wall and the program don't agree eight months
out of the year. -=Chris


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Running Processes

1999-04-19 Thread Chris Abbey

What kind of error? I have no problems calling the single string signature
of exec, the command you show here executed, both as an array and as a single
string ( "/bin/sh -c grep -in main  *.java > list &" ) although that didn't
do the same as the three element array... because the two are not the same
command. The single string doesn't work at a shell prompt either (grep doesn't
understand the usage) therefore the "> list" part isn't going to have anything
to do, and the "&" part is irrelevant... of course what you meant was 
"/bin/sh -c \"grep -in main *.java > list\" &" or some such wasn't it... :)
either way, the command executed fine on RH5.2, 117_v1a. -=Chris

At 07:11 AM 4/19/99 -0400, Bill Paladino wrote:
>
>The RunTime class seems to be VERY cranky about the String command it sees
>to exec a program. Only likes String arrays and generates a Run Time error
>if you pass it the command as a SINGLE string formatted the same way as the
>String-array. Following works OK but if you change the runCmd to a String...
>
>import java.io.*;
>
>public class RunFile{
>public static void main ( String args[] )
>   throws Exception   {
>
>try {
>  Runtime rt = Runtime.getRuntime ();
>
>//  Build a cmd-string :
>
>  String [] runCmd = { "/bin/sh", "-c",
>"grep -in main  *.java > list &" };
>
>  System.out.println ("RunCmd: " + runCmd[0] +
> runCmd [1] + runCmd [2]);
>  Process procs = rt.exec (runCmd);
>
>  BufferedReader br = new BufferedReader
> (new InputStreamReader (procs.getInputStream()));
>
>  String line;
>  while (( line = br.readLine () ) != null )
>System.out.println (line);
>
>} catch (IOException ioe) {
>   System.out.println ("Runtime/Process error");
>}   // end try
>}   //  end main
>}   //  end class
>
>Any ideas?
>
>
>
>Bill Paladino
>Senior Programmer
>BASCOM Global Internet Services
>275-R Marcus Blvd
>Hauppauge, NY  11788
>516 434 6600 / www.bascom.com
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: RMI troubles

1999-04-19 Thread Chris Abbey

Can the registry find the _Stub and interface classes? I'll bet not...
if the exception basically says "remote exception ... class not found"
then that's your problem. The registry process need the _Stub class,
and inorder to load that it needs the interfaces that it implements.
As with anything, that's just a shot in the dark without seeing the
stacktraces -=Chris

At 04:20 PM 4/19/99 -0600, Wendell Porter wrote:
>Hi everyone,
>
>I have been trying to get RMI to work for some time now.  I am just
>using the simple example from Sun, HelloImpl, but I can't get the full
>process to work.
>
>I can run the server class, and it binds with the registry just fine. 
>When I try to connect with the client, it tells me that the _Stub class
>cannot be found.  In the past, I have also gotten it to where running
>the client returned that the remote interface (Hello) could not be
>found.
>
>The client does run if it is on the same machine as the server, and the
>CLASSPATH contains the classes for the server, but that doesn't do much
>for me since that takes the Remote out of RMI.  Any suggestions would be
>greatly appreciated.
>
>I am running RedHat 5.2 with JDK 1.2 pre-v1 on an Intel box.
>
>Wendell Porter
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: IBM JVM Port

1999-04-20 Thread Chris Abbey

Look back about a week in this list for the answer

At 12:32 PM 4/21/99 +1000, Shafiek Savahl wrote:
>Hello All
>
>IBM have just released their version of a JVM for Win32 which they claim
>is 30% faster than Hotspot from Sun and also Micrsoft's VM.  They also
>plan to be giving it away.  From what I have heard Sun plans to be
>charging for their Hotspot product.  What would be the chance on getting
>IBM's code ported to Linux or is this the wrong forum to be bringing
>this up in.
>
>Shafiek
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: ...

1999-04-20 Thread Chris Abbey
ilable
outside the project becuase people don't need to know that we have a
big/corp/proj/foo.bar(I)B; method, and that we test if it can handle
-99 as input. (very arbitrary example, but I think the point is clear)

>Does anyone know if there is a work on Sun's behalf to do the
>port themselves in the future or atleast carry Blackdown along a
>little faster?

HA-HA! Oh that's a good one!! :) I thought you wanted the port done?
Now you ask if Sun's got any plans to take it over?!?! Oh, I'm laughing
so hard it hurts. I've read statements (on this list no less) describing
some of the help from Sun to blackdown.org . . . so far I'd say we're
getting better support/assistance than any other non-comercial platform.
I was just tickled pink to hear about the agreement, and short of some
_other_ commercial licencee pitching in (which I don't even think is
legal) I think blackdown.org is getting more support than anyone
seriously thought possible.

>I've seen this question asked before on this mailing list, but do
>not remember a reply ever being issued.

There have been many, most not repeatable in mixed company ... then there's
the set that's been sent Basically the summary I've gleaned from reading
between the lines is: "There is a beta out, when there is noticable progress
another will appear and it will be announced on this list. In between the
overall progress of the JCK will be charted on the web. This will repeat
untill one is golden; then it will be released as version 1. then the whole
thing will repeat." Of course that describes most all _volunteer_ linux
development work. ;)

I think the big piece of the picture you (and a lot of other people) are
either missing, or not realising the significance of, is that the porting
team is (I think) a couple dozen people, working in their spare time on six
different ports. After working a normal day job, coming home to the family
and taking care of household responsibilities they go hit the porting work
for a while. They're volunteers. If you (or anyone else) was putting up
a serious chunk of change for this port then they'd have the right to be
"a bit disappointed and/or concerned about Blackdown's progress with
JDK1.2?". No one is. Sun is - if my memory serves - making two engineers
available to work on the port (I doubt that's two _dedicated_ people)
but I believe that's the end of the list of people getting paid for this
work. -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: IBM JVM Port

1999-04-21 Thread Chris Abbey

>Linux doesn't look at
>all like OS/2 (which is a pity), so it might be just as hard -- if not
>harder -- to port IBM's JVM to Linux as it is to port Sun's.

Let's not forget AIX, VM/ESA, and OS/390's unix services! All three
are much closer to Linux than either Win32 or OS/2... and they
all have JVMs, very good ones in fact. I'd like to think no one
would seriously try to start with either the OS/2 or Win32 version,
so it might not be as hard as all that - at least it's already
unix. :) I'll bet the problem would be getting management to let
them and getting the developer resource; but, as David was quoted,
the right people are aware of the interest. -=Chris


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Big-Endians

1999-04-21 Thread Chris Hawks

---On Wed, 21 Apr 1999 13:54:02 -0700 (PDT),  Jeffrey Radick said

> If a Java app exchanges data with data from a non-Java program
> then it must face platform-specific endianness issues.
> Does a program fail to be 100% Pure Java if it exchanges
> data with a non-Java program?  (I'm asking, I'm uncertain
> of the definition of "100% Pure Java".  But, I'd expect
> the answer is "no".)
> 
>> *shrug*
> 

I'm working on a '100% java' replacement for a program that communicates
with a SCO (intel) unix box. For historical reasons the data as a big
stream of ints, floats, strings, etc all little-endian (except the
strings, of course).

So, I created an class to deal with the data input (snippet follows).
Does this mean my app is not '100% java' ??


--re: Re: Big-Endians

 Chris
#include 

Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International

[EMAIL PROTECTED]

Computers are like air-conditioners:
They stop working properly when you open windows.

Linux: The OS for people with an IQ over 98

* Little Endian reader code snippet*
(Data is read into buff via 'normal' means and read in a known order. 
 i.e. int-float-string(20)-byte-int-int-float )

private int pullInt() throws IOException
{
int t, i = 0, j;

for(j = 0; j < 4; j++)
{
t = buff[buffIdx++];
if(0 > t)
t += 0x100;
i |= t << (j * 8);
}
return i;
}

private float pullFloat() throws IOException
{
Float f = new Float(0);
return f.intBitsToFloat(pullInt());
}



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



Re: jre

1999-04-22 Thread Chris Abbey

At 10:00 AM 4/23/99 +0800, Jayvee Vibar wrote:
>Is there a java runtime environment for linux??

yes.

http://www.blackdown.org/java-linux/mirrors.html lists many mirrors
you can choose from. All of them have it. Select any one, then select the
level you want (i.e. JDK-1.1.7), then select your arch. (i.e. i386) then
your libc version (i.e. glibc), then v1a, you'll see four pieces to choose
from: i18n, jdk, jre, and rt.   Oh, and you'll also find a README file,
start there. rt + i18n = jre. jre + devel_tools = jdk.   -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Demo's

1999-04-22 Thread Chris Abbey

At 01:32 AM 4/22/99 -0700, Steven Mills wrote:
[...]
>your web site.   Can you send me a URL with the latest demo's?  I'm
[...]

Since the demos are in java, and java is platform independent, the demos
are platform independent... I'd suggest starting with the ones at
http://developer.javasoft.com/  -=Chris



!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Sun/bashing

1999-04-22 Thread Chris Abbey
not in great big graphics screaming out to the world... but
it's been there since, at least, December.

OK, so it's not even on the initial page - you've got to select others...
but look closely at the list that is there... they're all the comercial
vendors, paying big bucks to Sun I'm sure.

[snip]

>The current status of the JDK is good for early development but the
>silence and

yes the silence is starting to be noticable.

>lack of support *from Sun* is seriously joepardizing any
  
Why does it have to be Sun? It's not like they're developing Java in
a total vaccuumm (how do you spell that word anyway? :|  ) there are
several other companies working with them, any one of whom could pitch
in and help. IBM for example. (dreaming...)

>professional Java development under Linux. You cannot relase a product
>in the market based on a pre-release JDK. You cannot announce release
>dates of your products if Sun doesn't give us a deadline for the final

I think the only person setting any release dates around here should
be Steve. (or the owner of the port for a given arch.) We all saw how
ridiculus Sun looked with 117 and 12pre when they went and announced
a date... :) Steve's response of "Now isn't that interesting." was
a classic.

[...]
>I'm not bashing Sun, I'm trying to post some
>constructive critique.

Which is always a good thing... but how many Sun managers do you think
read this list? If there are any, drop me a note and I'll count you
up and return only the count to the list... promise, won't put your
address anywhere. I suspect that I won't get a single response to that
invitation. Sadly I think this is the wrong forum for these types of
discusion; even worse is the fact that I don't think there even _is_
a correct forum! Either way, based on the chiding I got last time off
list and what I expect when people read this, I think I'm going to try
staying out of these in the future... maybe we all should

>   Sun is, objectively, moving too slowly on the
>Linux platform.

Sun is stretched to the limit; I'm amazed Linux is getting the support
it does. Let's face reality... there is a shortage in the industry of
competent people, plus there are a couple of major drains on the talent
pool (Y2K and € incase anyone forgot...)

> The sooner they realize this the better for us and
> for them.

Try to have an out of body/mind experience for a minute and put yourself 
into the corporate mentality (oxymoron, I know) where Linux is a rumbling
you occasionally hear about in small IT shops, or your staff around the
coffee cart talking about it on their home machines, but otherwise is not
currently threatening the 200,000 transaction per second mainframe you've
had down the hall for years, or the shinny new Sparc 1 you just put in
the machine room to serve your web pages. *These people don't know what we
know.* But they're the ones expensing lunches with the Sun Microsystems
consultant that sold them that 1. And they're the ones meeting the
executive board on the back nine. And they're the ones at the share-
holders meetings with so many proxies they have a reserved seat up front.
It's sickening to think, but untill Linux gets that kind of clout on our
side, the community can't really demand anything. (We're working on it.
One CPU at a time is my motto. ;)  -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: BufferedInputStream gives more byte than the original file has

1999-04-23 Thread Chris Hawks

---On Fri, 23 Apr 1999 14:22:47 +0200,  Willi Richert said

> Curious problem.
> For an ftp-client I have a BufferedInputStream retrieved from the
> ftp-server (proftpd). I read from it and write the File through
> BufferedOutputStream(new FileOutputStream()) to Disk. Now, the file
> written to disk is some K greater than the file read of:
> 
> File on my virtual FTP-Server:
>  #> l big-file.zip
> -r-xr-xr-x   1 root root 15598221 Mär 29 20:02 big-file.zip*
> 
> # > l /tmp/even-bigger-file.zip
> -rw-r--r--   1 williusers15655752 Apr 23 14:06
> /tmp/even-bigger-file.zip
> 

Sounds like you are transferring the file in ascii mode. The server is
supposed to expand the local EOL character to  and the client is
supposed to convert the  to the local convention.

Looks like the server is adding them and your code doesn't show you
stripping them off. You need to do a binary transfer. See RFC0959 for details.

--re: BufferedInputStream gives more byte than the original file has

 Chris
#include 

Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International

[EMAIL PROTECTED]

Computers are like air-conditioners:
They stop working properly when you open windows.

Linux: The OS for people with an IQ over 98





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



Re: Problems with numeric keys on swingall.jar for jdk 1.1.7 for Linux

1999-04-23 Thread Chris Abbey

This may be a swing bug... I seem to remember something about latter versions
of swing not working with 11x, but working with 12 in similar situations...
something about a change (bug fix) in the event model for 11x that early swing
was expecting to be broken, and newer swing is expecting to be fixed. the
result was that new swing on old jvm and old swing on new jvm are both broken.
awt was fine the whole time... you might try a bug parade search on swing
and numberpad ... and you might try holding shift down and typing :) that used
to "fix" a really old pc-dos program I had that mysteriously broke in wfw311.
-=Chris


At 07:10 PM 4/23/99 +0300, Constantin Teodorescu wrote:
>Riyad Kalla wrote:
>> 
>> java.sun.com and then go to (on the left panel) Java Foundation
>> Classes, all of them should be in there. Get 1.1 final or 1.1.1beta, I
>> don't know how stable the beta is though.
>
>I got also JFC 1.1 and 1.1.1 beta 2 (from java.developer.com) and both
>of them don't work with numeric keypad.
>
>Please not : JUST SWING JTextField (JTextArea) component have that
>behaviour !!!
>
>Because AWT TextField accepts digits from numeric keypad !!!
>
>> Is your "num lock" on? :) 
>
>Oouups ... I didn't checked :-)
> 
>> Could it have to do with your X-system and/or WM? 
>
>I am using KDE but I switched to : LessTif , AnotherLevel , AfterStep ,
>fvwm ... but it's the same problem !!!
>When I'm pressing NumLock , only - and + signs can be entered !
>
>The jdk 1.2 pre-1 is working fine with numeric keys in JTextField on my
>RedHat 5.2
>So ... I am waiting for jdk 1.2
>
>Thanks for your help,
>-- 
>Constantin Teodorescu
>FLEX Consulting Braila, ROMANIA
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



tya 1.3 compile problem

1999-04-26 Thread Chris Abbey

Howdy all, I'm having some problems compiling TYA1.3 on a stock RH5.2
box. I know I've compiled TYA1.1 before, on a different (non-RH) box,
but this time around I can't seem to get past the configure step! 

the relevant output in config.log from gcc is:

ld: cannot open crt1.o: No such file or directory

yup, no such file anywhere on my system... something tells me I'm
missing a package somewhere... but I can't figure out which.
I've got 2.0.36 kernel sources installed, as well as 2.7.2.3-14 gcc
and glibc 2.0.7-29 (also libc 5.3.12-27 for compat.) come to think
of it I'm not sure I've built anything since installing this box...
can someone who has built tya on rh5.2 please let me know which
package owns that file. Thanks -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



solved Re: tya 1.3 compile problem

1999-04-28 Thread Chris Abbey

At 10:00 AM 4/28/99 +0200, Andreas Rueckert wrote:
[...]
>glibc-devel-

Bingo! According to rpm I had glibc-devel-2.0.7-29 installed... but I had
exactly ZERO of the files listed by rpm -ql glibc-devel on my system.
Redo the install with --force and TYA compiled beautifully... :-)  now
back to real work at a much better pace. -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Possible Java Bug ?

1999-05-01 Thread Chris Abbey

I'm not 100% certain about this, but I think you might be bending the
JLS a little bit in what you're trying to do  I remember there being
a _recommended_ but not _required_ notation recommended for compilers
in the inner class specs... something like this$1 to access the enclosing
object, and this$2 to access it's enclosing object, etc... (I may have
them numbered backwards... I do remember at the time I read it that this
seemed a bass-akwards way of numbering.) You might want to do some
introspection or disassembly of classes/innerclasses your compiler
generates and see what kinds of private-static-final fields it creates
under the covers for you. I also seem to remember that super() isn't a
real method... just syntax to tell the compiler to replace the standard
call to superclass's null arg ctor with a call to a specific argument
list ctor in your _immediate_superclass_. -=Chris

At 10:43 AM 5/1/99 -0400, Michael Emmel wrote:
>
>To extend my own question I think this is a bug since thre is no way
>for a programmer to intialize the enclsing instance variable.
>I think that Object should have a methos added.

[snip]

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Java/C benchmark

1999-05-01 Thread Chris Abbey

Thanks for pointing out the article, made for interesting reading...
but I'm afraid I have to say your followup comparisons are unfair...

>One interesting point is that TYA is on various benchmarks 
>2-8 times slower than the Symantec jit included with Sun's java 

hmmm... one is developed by a large international company over the
course of a couple years, by an estimated few dozen engineers and costs
money (even if _you_ got it for free, SUN paid Symantic for it); the
other is developed by a small handfull of developers in spare time as
OSS and costs nothing. The one with jdk116+ from Sun is the "little
sister" of the commercial JITC Symantic sells -- reported to be the
best in the industry. Also look at the interpreted only numbers and
you'll see that the win32 jvm is a tad faster than the Linux jvm to
begin with. That blackdown/TYA even _made_ the short list to be
compared is a tribute to the great work by everyone on the two teams!

This was mostly a Win32 article, with a pair of Linux JVMs thrown in,
probably because of Tower's touted performance. Note the absence of:
OS/2, OS/400, OS/390, AIX, HP/UX, SCO, Reliant, Solaris, Be and Mac
in the platform catagory and Kaffe and (whatever that other one is) in
the Linux JVM catagory, and the projects such as Cygnus' GCJ or IBM's
High-Performance compiler for Java in the "let's bend the JVM concept
as far as we can in the name of performance" catagory (that's where I
put TowerJ). Also missing were the other linux jits.

>under Windows (which in turn is slower than the forthcoming hotspot).  

hotspot isn't a JIT, it's a whole new breed of VM... 

>Since TYA is roughly the same speed as the 'sunwjit' 
>jit supplied by sun for the linux java1.2, this means that Sun supplied
>linux a much slower jit than the one it supplies with Windows.  

HUH?! I don't understand this logic... are you comparing 1.1 to 1.2???
or symantic with sunwjit??? either way I gotta say "no fair"

>Is this because they cannot legally supply the Windows jit?  Where
>did this jit come from?  

Which windows jit? the Symantic jit they shipped with 116+ or the "sunwjit"
they ship with 1.2? the first one they licensed binaries from Symantic, 
originally in the "preformance pack" they had for 115 (or maybe it was 114)
the second I'm told was developed in house 

[timings snipped]

very interesting numbers... but any benchmark as short as those really
aren't very good if you only want to look at the java time... you also
captured program load, kernel overhead, etc... which in that short of
time is probably a substantial percentage. a good way to avoid that is
to capture System.currentTimeMillis() before and after a "test" and
subtract... an even better mark is to loop the test a few hundred
times and divide the differences by that mark... for example, if I
wanted to benchmark the performance of my render() method...

long before, after;
static final int loops = 500; //incr for quicker methods
for (int lcv=10;lcv>0;--lcv) {
render();
} //warmed-up the jit, etc...
System.gc();
System.out.println("warmed up");
before = System.currentTimeMillis();
for (int lcv=loops;lcv>0;--lcv) {
render();
//  System.out.println("-=- "+lcv+" -=-"); //use only when testing for gc!
}
after = System.currentTimeMillis();
System.out.println("avg:"+( (after-before)/loops )+"ms.");

then run with -verbosegc and try to adjust -ms and -mx (both the same)
to a value so that you minimize GC, without paging... you can use fewer
loops at that point... from the times you posted for splinefill, I'd
use about 10,000 loops; and for random about 400. -=Chris

p.s. (_way_ off-topic) /pix/sunset640sig.jpg is gorgeous, as is the
background of /pix/cvg640.jpg (not sure what the object is though...)

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



RE: Access Violation

1999-05-02 Thread Chris Abbey

>Hi,
>Sorry to ask again. 

Sorry to harp, but this relates to JAVA ON *LINUX* how?

Cafe doesn't run on Linux, we don't use paths like "c:\", and I don't
think you'll see "Fatal Error: (Access Violation at 015F:02F8D844)"
in any kernel sources Linus approved.


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



Re: ...

1999-05-02 Thread Chris Abbey

At 04:45 PM 5/2/99 -0700, Riyad Kalla wrote:
>  I am not sure if this is an error, or my lack of knowledge.  :)  
>   :) (: University of Arizona :)  

well, you really wrote more... but my mail reader can't phatom the x-html
yours sends... anyway, this is one of the things you start to run into
when the class libs get as ... large ... as they are. Class names start to
collide when you use short hand notation; your solution of switching to
the fully package qualified is "as by design". If you'd rather not have
to, there are a couple things you can do; don't import * unless you really
need everything in the package (I often find I don't) instead use more
(quantitively speaking) more (qualitivly speaking) specific imports. This
usually leads to much uglier import clasues; but has the advantage of
removing any ambiguity the compiler will have (and may even speed up
compiliation by a very small amount). The only other thing I know of
is to not import _anything_ and always use fully package qualified names.
It's not as ugly as it sounds if you have a cool editor like Visual Slick
Edit (I wish I could afford it for home) that picks up your class path
and offers interactive menus _as_you_type_ to pick classes, methods and
fields from. -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Installing TYA, been there? done that?

1999-05-03 Thread Chris Abbey

>./configure tells me it can't find my version.

it's in your path right? I had the same thing first try because
the configure script does `which java` and I hadn't used it yet
in that shell (I don't put it in path unless I'm going to use it)
so running my setup script fixed that up real quick. -=Chris


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Java/C benchmark

1999-05-03 Thread Chris Abbey

>> but I'm afraid I have to say your followup comparisons are unfair... 
>
>hold on - this post was intended to be just a statement of fact,
>not a complaint.  I use blackdown and am very grateful for its existence.

I didn't think it was a complaint at all... just can't see the logical
basis for it as a statement of fact perhaps "illogical" would have
been a beter word that "unfair".

>I've timed tya across releases, and it's gotten steadily faster over the
>last 6 months.  The fact that it already keeps up with the sun-supplied 
>jdk12/linux jit is impressive.

This is tya1.3 & jdk117_v1a -vs- sunwjit & jdk1.2pre1  right??
Not to take anything away from Albrecht, but for anything _real_world_
Java2 (no matter what platform) is slower than jdk1.1.x.

>I primarily wanted to point out the curious fact that the
>jit supplied by sun for Windows is much faster than the 
>jit supplied by sun for Linux, and to ask what this meant.

There's the reference vs production issue Scott pointed out; which
I can whole-heartedly agree with. Plus the issue I just can't accept
as logical of comparing JITs across java levels... that just seems
too much like apples vs oranges to me. -=Chris

p.s. of course if you've been talking about tya on 1.2 this whole time
then I'll gladly retract this whole thread and shut up now :)

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: SIGBUS in AllocSetAlloc & jdbc (fwd)

1999-05-03 Thread Chris Abbey

This isn't a fix, but it'll get you around the problem for
now... I kid you not, it works with some of the code I run
here where people did the same switch logic around rmi. -=Chris

java -Djava.version=1.1.7 your.class.here

 o o
\___/


At 12:05 PM 5/3/99 +0100, Peter T Mount wrote:
>
>[ I'm cc'ing this to java-linux as this seems to be a problem with the
>Linux PPC port - peter ]
>
>On Sun, 2 May 1999, Tatsuo Ishii wrote:
>
>[snip]
>
>> This morning I started to look into this. First, JDBC driver coming
>> with 6.5b did not compile. The reason was my JDK (JDK 1.1.7 v1 on
>> LinuxPPC) returns version string as "root:10/14/98-13:50" and
>> makeVersion expected it started with "1.1". This was easy to fix. So I
>> went on and tried the ImageViewer sample. It gave me SQL an exception:
>
>[snip]
>
>> P.S.  Peter, do you have any suggestion to make JDBC driver under JDK
>> 1.1.7?
>
>Ah, the first problem I've seen with the JVM version detection. the
>postgresql.Driver class does the same thing as makeVersion, and checks the
>version string, and when it sees that it starts with 1.1 it sets the base
>package to postgresql.j1 otherwise it sets it to postgresql.j2.
>
>The exceptions you are seeing is the JVM complaining it cannot find the
>JDK1.2 classes.
>
>As how to fix this, this is tricky. It seems that the version string isn't
>that helpful. The JDK documentation says it returns the version of the
>JVM, but there seems to be no set format for this. ie, with your version,
>it seems to give a date and time that VM was built.
>
>Java-Linux: Is there a way to ensure that the version string is similar to
>the ones that Sun produces? At least having the JVM version first, then
>reform after that?
>
>The PostgreSQL JDBC driver is developed and tested under Linux (intel)
>using 1.1.6 and 1.2b1 JVM's (both blackdown). I use Sun's Win32 1.2 JVM
>for testing. The current driver works fine on all three JVM's, so it seems
>to be the PPC port that has this problem.
>
>Peter
>
>-- 
>   Peter T Mount [EMAIL PROTECTED]
>  Main Homepage: http://www.retep.org.uk
>PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
> Java PDF Generator: http://www.retep.org.uk/pdf
>
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Looking for compiler

1999-05-04 Thread Chris Abbey

there are two serious* compilers for java on linux that I know of... javac
that comes with the jdk and jikes from alphaworks.ibm.com. VB isn't a
compiler; it's an overglorified scripting langauge bundled with a propriatary
IDE. I think what you wanted was a reference to an IDE for Linux... there
are many to choose from and everyone likes their own... so in an effort to
not start a religious war I won't even state my preference. -=Chris

*note: when I said serious I meant "ready for prime time" there are others
in development, but I don't think any of them have left beta.

At 10:31 PM 5/4/99 +-800, Ong Boon Wee wrote:
>Hi
>
>   I am new to Java and am looking for a user-friendly compiler for Java on
Linux. It would be nice if the compiler has the features of Visual Basic.
Does anyone know of such compiler?
>
>Ong Boon Wee


!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



(Slightly) off topic: Piping output from std err to file

1999-05-06 Thread Chris Moolenschot

Something I've wondered for long enough now is how to pipe output from std
err to a file.

I would like to post the reams of error info produced by the JDK1.2pre-v1
without upping the console buffer. It's not the libstdc++ problem, and
similar things happen with the native/green threads jit/nojit options. (I
would also like to be able to catch the reams of exceptions my own programs
sometimes produce ;).

TIA,

Chris Moolenschot


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



Re: (Slightly) off topic: Piping output from std err to file

1999-05-06 Thread Chris Moolenschot



You mean you want to do this from a script/shell (something like java
2>error.log) or from a java application ?

In a shell:

java MyClass > error.log

The only problem is that this pipes std out into err.log not std err ...


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



Re: why do we need X11 to run purely command line java stuff?

1999-05-07 Thread Chris Abbey

At 08:34 PM 5/6/99 -0500, John N. Alegre wrote:
>
>On 04-May-99 Michael Sinz wrote:
>> 
>> As it turns out, we are about to do a JDK 1.1.7 V2 release in order to work
>> with the new glibc 2.1 (plus a few other fixes) and I was wondering if
>> there is a problem with doing this change in the 1.1.x JDK.  (We also want
>> to do this in the 1.2 release but it is a bit further down the road)
>> 
>OH please, Oh please ...when when.  Then I can get back to work!!
>
>john

if you're in that big a hurry you can do it your self and have it tonight:
in the $java_home/bin/.java_wrapper script just add a few lines like:

if [ -z "$DISPLAY" ] ; then
NS_JAVA=TRUE
fi

I've had that in mine for a very long time :)  -=Chris

!NEW!-=> <*> cabbey at home dot net  http://members.home.net/cabbey/ <*>
"What can Microsoft do? They certainly can't program around us." - Linus

-BEGIN GEEK CODE BLOCK-   Version:3.12   http://www.geekcode.com
GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
--END GEEK CODE BLOCK--


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



Re: Number Pad problem still exists in jdk117_v2

1999-05-10 Thread Chris Hawks

---On Sat, 8 May 1999 19:34:10 -0500,  Kelly Campbell said

> Hi,
> 
> I've mailed this list before about problems with the number pad on linux
> jdk117v_1a. I just tried it on the jdk117_v2_x86-glibc2.0 prerelease
> version from wisp.net and it still exists. Basically it's bug id #365 in
> the jitterbug database.
> 
> The num pad works on jdk116_v5 to some extent (the Enter key doesn't cause
> an ActionEvent as it should), but it's completely broken on both
> jdk117_v1a and v2.
> 
> thanks,
> Kelly
--re: Number Pad problem still exists in jdk117_v2

Since I've used the number-pad in a couple of apps, I am confused as
to the problem.

I compiled and ran Kelly's example. I pressed several of the
number-pad keys and the numbers appeared in the box. Then I pressed
 on the number-pad and the words "actionPerformed: '(numbers)'"
appeared on my Xterm screen. According to the source, this is what I expected.

I'm using a stock release of v1.1.7_v1a and Slackware 3.4

 Chris
#include 

Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International

[EMAIL PROTECTED]

Computers are like air-conditioners:
They stop working properly when you open windows.

Linux: The OS for people with an IQ over 98





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



  1   2   3   >