Menu bar problems

2000-03-29 Thread dave

I am running a java telnet application that has a simple menu bar across
the top (class Menubar). 
When running in a win95 environment F10 returns F10 to the terminal
application as it is supposed to. Under linux (java 1.2.2rc4) it takes
me to the first item on the menu bar. I added some code to see if there
were any shortcuts defined for the menu bar and there were none. Bug or
coding error?

-- 
Dave Smith
Candata Systems Ltd.
(416) 493-9020
[EMAIL PROTECTED]


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




TogetherJ

1998-06-12 Thread Dave Joubert

Hi,
I am interested in using TogetherJ on Linux. I downloaded
build 217 to use with 1.1.5v7 and redhat 4.2.

I am having some problems, and would like to know if anybody else
has had any experience with TogetherJ. Like a lot of packaged software,
the documentation assumes nothing will ever go wrong and I am stuck.

Please contact me directly, I will summarize periodicaly.

TIA,
Dave Joubert




a little better in GUI

1998-12-30 Thread Dave Harvill

Okay, got a binary of lesstif, since the source wouldn't compile.  I think
I installed it, I'm honestly not positive whether it took or not, since I
can't get it up as window manager.  However, I don't have the libXm.so
error anymore (Thank you Uncle George!!).  Now I have the following, and
I'm really not at all sure where to start looking:

% java gTest
UU: ELF file class not __ELF_WORDSIZE-bit (libawt.so)
java.lang.UnsatisfiedLinkError: no awt in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at 
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:394)
at java.awt.Window.getToolkit(Window.java:230)
at java.awt.Frame.addNotify(Frame.java:203)
at java.awt.Window.show(Window.java:145)
at gTest.main(gTest.java:10)

hmm... can't get it to copy right.. what looks like 'UU:' now was a
double-quote, small letter i with backwards apostrophe above it, then the
UU. (a different terminal style also produced a small diamond between the
UU and the :).  

If this makes sense to anyone, please let me know.

-dave





Debugger API's

1999-03-08 Thread Dave Larson


Does the blackdown JDK provide the debugger package like
sun.tools.Debug ?


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



[Q] CLASSPATH, JAR searching, etc

1999-09-20 Thread dave madden

Hi.  I'm fairly new to Java, but stumbling along quite nicely, thank
you; but I'm confused about how the VM finds stuff mentioned in
CLASSPATH.  Is there an "everything you wanted to know" FAQ, the kind
of thing that when you get done reading it, you wish you hadn't asked?
I guess that if you give a directory, it'll find .class files there
and in appropriate subdirectories, and if you give a .jar file, it'll
find classes there, but is there any more to it?  Why are there so
many .jar files?  Why are some in ...java/lib, and others in (and
under) ...java/jre/lib?  Is it a Bad Idea to unpack them all into a
master tree, then make a giant .jar containing all the .class files?

* * *

I'm having a problem running the BlackBox example from the Sun
javacomm20-sparc package, with the rxtx-1.3-7 JNI module set up to
implement the machine-specific serial interface.  Under 1.2-pre2, I
get a "NoClassDefFoundError" for javax/comm/CommDriver while loading
the machine-specific code, but the class actually exists in a jar file
specifically named on the java line.  I tried unpacking all the jar
files under /usr/local/packages/java into a temp directory, and that
solves my problem, but I don't understand why the other approach
fails.  Any help?

regards,
d.

dhm@vheissu(483)$ java -verbose -classpath 
BlackBox.jar:.:/usr/local/packages/java/rte/lib/rt.jar:/usr/local/packages/java/jre/lib/ext/jcl.jar:/usr/local/packages/java/lib/comm.jar
 BlackBox 2>&1 | grep comm
[Loaded javax.comm.NoSuchPortException] <---it's finding some javax.comm
[Loaded javax.comm.CommPort]stuff...
[Loaded javax.comm.SerialPort]
[Loaded javax.comm.PortInUseException]
[Loaded javax.comm.SerialPortEventListener]
[Loaded javax.comm.CommPortOwnershipListener]
[Loaded javax.comm.CommPortIdentifier]
[Loaded javax.comm.UnsupportedCommOperationException]
Caught java.lang.NoClassDefFoundError: javax/comm/CommDriver while loading driver 
gnu.io.RXTXCommDriver
[Loaded javax.comm.CommPortEnumerator]

dhm@vheissu(485)$ jar tvf /usr/local/packages/java/lib/comm.jar | grep CommDriver
   277 Sun Nov 15 15:58:08 PST 1998 javax/comm/CommDriver.class


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



Re: Float -> Double conversion bug ?

1999-09-24 Thread dave madden

Juergen Kreileder <[EMAIL PROTECTED]> suggests:

 =>Don't use '==' to compare floating point values, instead compare 
 =>their difference against a small value:
 =>
 =>double epsilon = 0.0001;
 =>double a, b;
 =>...
 =>if (a - b < epsilon) ...

Actually, you probably want to say:

  if (Math.abs( a - b ) < epsilon) ...

:-)

d.


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



Re: Out of memory in JavaDoc in Java 1.2prev2

1999-09-24 Thread dave madden

 =>From: Rachel Greenham <[EMAIL PROTECTED]>
 =>...
 =>I can't create a Javadoc of my library! I get out of memory errors. The
 =>computer has loads of memory left over.

"I can't be overdrawn -- I still have checks left!" :-)

 =>Any ideas what I can do about this?

The http://java.sun.com/products/jdk/javadoc/faq.html#memory>Javadoq
FAQ notes:

Javadoc does take a lot of memory because (unlike javac) it must
simultaneously load all the classes being documented[...]

The http://java.sun.com/products/jdk/1.3/docs/tooldocs/solaris/javadoc.html#javadocoptions">Javadoc
docs give you the option to increase memory allocation (in fact,
it's the example for the "-J" option):

% javadoc -J-Xms32m -J-Xmx32m com.mypackage

to set the initial and maximum heap sizes, respectively.

I've used these args myself to produce documentation for all the core
classes, and a few extensions, in one swell foop.

d.


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



Re: CAT command

1999-09-27 Thread dave madden

 =>> From: Juan Carlos [mailto:[EMAIL PROTECTED]]
 =>> 
 =>> ¿How to execute an linux command, to obtain any
 =>> information, using Java?  (ex:  the CAT command).  
 =>> I have Red Hat version 5.3, and jdk1.1.5. 

I suspect you're asking:

In a Java program, how do I execute an external program and read its
results from an InputStream?

I'm using 1.2, and you can do it like this:

import java.lang.*;
import java.util.*;
import java.security.*;
import java.io.*;

class foo {
public static void main( String [] argv )
throws IOException
{
Process  p = Runtime.getRuntime( ).exec( 
"/bin/date" );
InputStream  i = p.getInputStream( );
int  ch;

while ((ch = i.read( )) != -1) {
System.out.println( "Got '" +
new 
Character((char)ch).toString( ) +
"'" );
}

System.out.println( "Done!" );
}
}

d.


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



Re: Runtime problems

1999-09-27 Thread dave madden

 =>From: "Hartnett" <[EMAIL PROTECTED]>
 =>...
 =>"/usr/jdk117/bin/../bin/checkVersions: /tmp/ldd.out.858" Permission denied"

Do you know why you'd be getting a "Permission denied" error related
to this file?  I'd check the permissions on /tmp:

ls -lgd /tmp

You should see:

drwxrwxrwt   4 root root 3072 Sep 27 19:46 /tmp/

If you see anything else in the permissions column, you've got a
problem.  I suspect that you have other permission problems as well,
particularly since you mention that you installed a new disk in the
system.  In fact, I'd go out on a limb and guess that you tried to
copy the working system over to the new disk with "cp -R" or some
such, and it worked fine (as far as you could tell) while logged in as
root. All clues that will point to directory permission problems, once
you've been sysadmining for far too long.

d.

PS: No, I don't know an easy way to fix the permissions on all the
directories once you're in this sorry state.  I learned my lesson long
ago, and now use cpio to copy directory trees.


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



Re: "proper" place for the .so native libraries

1999-09-30 Thread dave madden

 =>From: Brett Smith <[EMAIL PROTECTED]>
 =>...
 =>Where is the "proper" location for the *.so native library files?

I've had good luck putting them under:

   .../jdk-1.2/jre/lib/i386/
    appropriate platform here!

 =>One JNI tutorial said the following:
 =>LD_LIBRARY_PATH='pwd'
 =>export LD_LIBRARY_PATH

The first problem is that you've used forward-tics instead of
back-tics.  You should have said:

LD_LIBRARY_PATH=`pwd`
export LD_LIBRARY_PATH

This has a better chance of working, but LD_LIBRARY_PATH is
notoriously cranky.  It's best if you can set things up so you don't
need it.

 =>Also, does the blackdown install set a LD_LIBRARY_PATH? or need  one?  if
 =>so, where is it located?

The "java" shell script sets LD_LIBRARY_PATH appropriately when you
run it; if you had a LD_LIBRARY_PATH set previously, then it
{pre?app?}pends the directories it needs.  (Same with CLASSPATH, I
think.)  I've had trouble with both, and now try my damndest to avoid
having to set both.

d.


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



Re: "proper" place for the .so native libraries

1999-10-05 Thread dave madden

 =>From: "Ted Neward" <[EMAIL PROTECTED]>
 =>...
 =>Does "had good luck" mean without having to modify LD_LIBRARY_PATH? Or
 =>/etc/ld.so.conf?

Yes.  If you run the java script with "sh -x" (you have to give it the
full path to the script, too, IIRC) you'll see that it calculates a
CLASSPATH and a LD_LIBRARY_PATH that it uses to run the JVM.

d.


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



Re: Java and Linux

1999-10-11 Thread dave madden

 =>From: [EMAIL PROTECTED]
 =>...
 =>Q1: What version of Java (1.1 or 1.2) does JVM inside Blackdown JDK package
 =>support?

Both versions are available.

 =>Q2: A Java application was developed on Windows NT 4.0 (Intel) by using
 =>VisualCafe 3.0.  Can we simply move all class files of the application to
 =>Redhat 6.0 Linux (Intel), and use JVM inside Blackdown to run it without any
 =>modification?

I've had some success going from Linux to NT; I'd guess that if your
app is not too complicated, there's some chance that you'll be able to
do what you describe.

d.


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



jar problem

1999-12-06 Thread Dave Bazell

I just installed jdk1.2.2 on my redhat 5.2 system.  I tried to unjar a
file.  First I had to make some links to my bin directory to get rid of
some errors.  After doing that, I now get:

% jar -xvf weka-3-0.jar
/bin/i386/native_threads/jar: error in loading shared libraries
libhpi.so: cannot open shared object file: No such file or directory

I have the following links :

i386 -> /usr/local/jdk1.2.2/bin/i386
realpath -> /usr/local/jdk1.2.2/jre/bin/i386/realpath

According to the installation documentation, I should have been able to
use the software right out of the box, after doing the shell script.
That doesn't seem to be the case.

I would like to unjar my file.  Any ideas?


Dave


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



intermittent extremely slow GC

2002-11-08 Thread Dave A King
I'm trying to troubleshoot some really bizarre behavior in a recent build of
our application.  We have changed our memory usage quite a bit, utilizing
more caching, etc.  Overall performance has unsurprisingly improved and all
looked good during QA after we tackled some memory leaks and unbounded
caches.  In general, we spend 1% or less time in GC.  Minor collections
happen often but quickly, usually under 100ms.  Major collections happen
every couple hours, generally taking ~3 seconds.  After each major
collection, the heap in use is reduced approximately the same each time, so
apparently we are leak-free.  Everything was looking good...

After running this for over a week in production under moderate load
(significantly less than we ran in QA scenarios), I started noticing some
wild behavior.  About 100 hours in to the application's lifetime, major
collections started taking much longer then it had in the days prior.  45+
seconds becomes the norm.  And on top of that, some minor collections take
several seconds, and in some cases as long as 45 seconds.

The boggling part is that the application itself isn't doing anything
differently 100 hours in than it had in the first few hours of its life.
Each app server handles several hundred client connections, that have an
average session length of a few hours.  Each client has the same type of
functions.  Why on earth would GC time change so dramatically after the app
has been up for a few days?  Why would it take so much longer to clear the
heap of the same amount and type of data that it had done in a tenth of the
time before?

Any input would be appreciated...  Here is some example output from verbose
GC...

Normal behavior:

13122: [GC 441755K->382806K(516800K), 0.0547972 secs]
13135: [GC 442710K->383552K(516800K), 0.0621738 secs]
13152: [GC 443456K->384087K(516800K), 0.0714369 secs]
13166: [GC 443991K->385705K(516800K), 0.0968161 secs]
13181: [GC 445609K->385720K(516800K), 0.1021833 secs]
13195: [GC 445622K->385748K(516800K), 0.0390663 secs]
13208: [GC 445648K->387175K(516800K), 0.0490246 secs]
13230: [GC 447075K->388661K(516800K), 0.0740566 secs]
13243: [GC 448787K->389577K(516800K), 0.0829134 secs]
13258: [Full GC 449481K->144520K(516800K), 3.1433411 secs]
13272: [GC 204424K->146891K(516800K), 0.0390291 secs]
13288: [GC 206795K->147522K(516800K), 0.0864487 secs]
13307: [GC 207762K->147822K(516800K), 0.0402269 secs]
13324: [GC 207725K->148218K(516800K), 0.0444241 secs]

Abnormal behavior:

617481: [GC 429003K->369069K(516800K), 0.0502329 secs]
617485: [GC 428973K->371054K(516800K), 0.0752230 secs]
617491: [GC 430956K->371764K(516800K), 0.4616861 secs]
617495: [GC 431667K->372278K(516800K), 0.2441826 secs]
617498: [GC 432182K->374942K(516800K), 0.8099241 secs]
617501: [GC 434846K->378277K(516800K), 0.3345280 secs]
617504: [GC 438181K->380583K(516800K), 0.7288399 secs]
617509: [GC 440486K->389948K(516800K), 1.2321482 secs]
617516: [Full GC 449849K->125578K(516800K), 111.9440899 secs]  **
617631: [GC 185482K->134830K(516800K), 0.2384958 secs]
617635: [GC 194734K->138885K(516800K), 17.7584829 secs]   **
617664: [GC 198789K->140709K(516800K), 1.1765528 secs]
617667: [GC 200613K->142999K(516800K), 1.1135330 secs]
617670: [GC 202903K->143896K(516800K), 0.1886063 secs]
617674: [GC 204399K->145748K(516800K), 0.0643682 secs]
617679: [GC 205651K->146747K(516800K), 0.2402821 secs]

and 

619471: [GC 305211K->244553K(516800K), 0.0485077 secs]
619479: [GC 304566K->245821K(516800K), 0.0509443 secs]
619490: [GC 305722K->246337K(516800K), 42.9122648 secs]
619550: [GC 306238K->251121K(516800K), 0.6206665 secs]
619556: [GC 311023K->252685K(516800K), 1.2239046 secs]


History of Full GC's over life of application:

9.53674e-07: [Full GC 17737K->2084K(516800K), 0.1908865 secs]
541.745: [Full GC 35627K->28499K(516800K), 0.6089849 secs]
13258.4: [Full GC 449481K->144520K(516800K), 3.1433411 secs]
18632.4: [Full GC 449434K->117622K(516800K), 4.1499891 secs]
31353.9: [Full GC 449503K->138192K(516800K), 2.9364882 secs]
44821.5: [Full GC 449635K->128602K(516800K), 3.5222492 secs]
72966.8: [Full GC 450272K->109305K(516800K), 3.1930017 secs]
90394.6: [Full GC 449639K->101752K(516800K), 3.3126717 secs]
102110: [Full GC 449730K->140655K(516800K), 7.4890938 secs]
113514: [Full GC 450201K->144888K(516800K), 4.6597281 secs]
124882: [Full GC 449649K->140969K(516800K), 3.2997761 secs]
141718: [Full GC 449502K->86848K(516800K), 8.5978765 secs]
165566: [Full GC 450117K->129728K(516800K), 2.6545095 secs]
176843: [Full GC 449487K->153627K(516800K), 3.2301273 secs]
182390: [Full GC 449720K->152101K(516800K), 3.2152205 secs]
191575: [Full GC 449424K->133796K(516800K), 4.2745676 secs]
202382: [Full GC 450226K->160236K(516800K), 4.7137709 secs]
212753: [Full GC 449944K->153338K(516800K), 4.3132010 secs]
223311: [Full GC 497070K->104709K(516800K), 5.0850315 secs]
246687: [Full GC 451648K->97212K(516800K), 6.9727917 secs]
262569: [Full GC 450214K->155561K(516800K), 4.2221823 secs]
273356: [Full GC 44

RE: intermittent extremely slow GC

2002-11-08 Thread Dave A King
i definitely think swap is my issue.  I'm kicking myself for not noticing
it...

What's odd is the only thing that has changed on these servers in many weeks
is the java code for our application.  We have a fixed heap size if 512MB.
Where is all this extra memory coming from?  1GB real memory and 700+MB swap
in use.  Does the jvm itself leak memory, even with a fixed heap size?

-d-

> -Original Message-
> From: Matt Avery [mailto:mavery@;einnovation.com]
> Sent: Friday, November 08, 2002 9:51 AM
> To: Dave A King
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: intermittent extremely slow GC
> 
> 
> If any memory has paged to swap, garbage collection through the swap 
> will be excruciatingly slow.  Is another app consuming 
> memory, forcing 
> the server to use the swap partition heavily?
> 
> Dave A King wrote:
> > I'm trying to troubleshoot some really bizarre behavior in 
> a recent build of
> > our application.  We have changed our memory usage quite a 
> bit, utilizing
> > more caching, etc.  Overall performance has unsurprisingly 
> improved and all
> > looked good during QA after we tackled some memory leaks 
> and unbounded
> > caches.  In general, we spend 1% or less time in GC.  Minor 
> collections
> > happen often but quickly, usually under 100ms.  Major 
> collections happen
> > every couple hours, generally taking ~3 seconds.  After each major
> > collection, the heap in use is reduced approximately the 
> same each time, so
> > apparently we are leak-free.  Everything was looking good...
> > 
> > After running this for over a week in production under moderate load
> > (significantly less than we ran in QA scenarios), I started 
> noticing some
> > wild behavior.  About 100 hours in to the application's 
> lifetime, major
> > collections started taking much longer then it had in the 
> days prior.  45+
> > seconds becomes the norm.  And on top of that, some minor 
> collections take
> > several seconds, and in some cases as long as 45 seconds.
> > 
> > The boggling part is that the application itself isn't 
> doing anything
> > differently 100 hours in than it had in the first few hours 
> of its life.
> > Each app server handles several hundred client connections, 
> that have an
> > average session length of a few hours.  Each client has the 
> same type of
> > functions.  Why on earth would GC time change so 
> dramatically after the app
> > has been up for a few days?  Why would it take so much 
> longer to clear the
> > heap of the same amount and type of data that it had done 
> in a tenth of the
> > time before?
> > 
> > Any input would be appreciated...  Here is some example 
> output from verbose
> > GC...
> > 
> > Normal behavior:
> > 
> > 13122: [GC 441755K->382806K(516800K), 0.0547972 secs]
> > 13135: [GC 442710K->383552K(516800K), 0.0621738 secs]
> > 13152: [GC 443456K->384087K(516800K), 0.0714369 secs]
> > 13166: [GC 443991K->385705K(516800K), 0.0968161 secs]
> > 13181: [GC 445609K->385720K(516800K), 0.1021833 secs]
> > 13195: [GC 445622K->385748K(516800K), 0.0390663 secs]
> > 13208: [GC 445648K->387175K(516800K), 0.0490246 secs]
> > 13230: [GC 447075K->388661K(516800K), 0.0740566 secs]
> > 13243: [GC 448787K->389577K(516800K), 0.0829134 secs]
> > 13258: [Full GC 449481K->144520K(516800K), 3.1433411 secs]
> > 13272: [GC 204424K->146891K(516800K), 0.0390291 secs]
> > 13288: [GC 206795K->147522K(516800K), 0.0864487 secs]
> > 13307: [GC 207762K->147822K(516800K), 0.0402269 secs]
> > 13324: [GC 207725K->148218K(516800K), 0.0444241 secs]
> > 
> > Abnormal behavior:
> > 
> > 617481: [GC 429003K->369069K(516800K), 0.0502329 secs]
> > 617485: [GC 428973K->371054K(516800K), 0.0752230 secs]
> > 617491: [GC 430956K->371764K(516800K), 0.4616861 secs]
> > 617495: [GC 431667K->372278K(516800K), 0.2441826 secs]
> > 617498: [GC 432182K->374942K(516800K), 0.8099241 secs]
> > 617501: [GC 434846K->378277K(516800K), 0.3345280 secs]
> > 617504: [GC 438181K->380583K(516800K), 0.7288399 secs]
> > 617509: [GC 440486K->389948K(516800K), 1.2321482 secs]
> > 617516: [Full GC 449849K->125578K(516800K), 111.9440899 secs]  **
> > 617631: [GC 185482K->134830K(516800K), 0.2384958 secs]
> > 617635: [GC 194734K->138885K(516800K), 17.7584829 secs]   **
> > 617664: [GC 198789K->140709K(516800K), 1.1765528 secs]
> > 617667: [GC 200613K->142999K(516800K), 1.1135330 secs]
> > 617670: [GC 202903K->143896K(516800K), 0.1886063 secs]
>

Java Platform on Linux

2004-08-21 Thread Dave Barker-Plummer
We are beginning to port our Java application to Linux and want to 
ensure that we are testing on a configuration that is sufficiently 
"typical" to maximize our chances that it will run for our users.  My 
assumption is that we will use Blackdown Java 1.4.x, but what version 
of Linux is most commonly used to host and/or best suited to to this 
version of Java?  (Perhaps this is a ill-informed question and any 
Linux version can host this implementation of Java.)

Are there known issues with any Linux products and Blackdown Java 
1.4.2?  Where would I find out details?

Finally, two questions about packaging for Java on Linux.  How do I 
go about making Java aware of the window manager under which it is 
being run, so that the style of our widgets can match the hosting 
environment?  I am aware of the SLAF package which contains look and 
feel implementations for some common window managers.  How might I 
detect the currently running WM and instantiate the appropriate look 
and feel?

KDE has the option of using a Mac-style menu bar associated with the 
monitor, rather than associated with each window.  How could I detect 
that the user has this preference set, and make my application 
respond accordingly.

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