Re: Working with many .java files

1999-08-02 Thread Kristian Soerensen



> 
> How do you manage a project with so many .java files, say more than 100?
> I can't believe I'll be forced to wait 3 minutes of compilation (on a 128Mb
> K6-2 350Mhz) every time I forget a ; or mistype a variable.


Go to http://alphaworks.ibm.com
download and install jikes

[elof@hugin HEII]$ perl -e 'foreach(glob "*.java") { $i++;$size += -s $_; } print "$i 
files\t$size bytes\n";'
47 files555079 bytes
[elof@hugin HEII]$ rm *class;time jikes *java 
1.29user 0.08system 0:01.37elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (471major+1711minor)pagefaults 0swaps


The actual compile time is of course hardware dependent, the numbers above
are on a little K6-2 350 with 100 MHz memory bus and 128 MB RAM, which
sounds remarkable similar to what you have.


---  http://www.image.dk/~elof  --
Kristian Elof Soerensen  [EMAIL PROTECTED]   (+45) 45 93 92 02 


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



RMI on Linux

1999-08-02 Thread Marshall Greer

Hey-

Anyone been able to succesfully launch rmiregistry and bind
UnicastRemoteObjects to it on Linux?

First, do you know of any way to debug rmiregistry when it launches? The
reason I'm asking is this, when I launch rmiregistry "./rmiregistry 1099
&" as a daemon process all seems fine.

However, when I fire up a RMI Server App I wrote to demonstrate
distributed objects and it attempts to bind itself to a url via
Naming.rebind(String name, Object object) the following exception is thrown:

"Caught exception while registering: java.rmi.ConnectException:
Connection refused to host: [ns2-lsan03.pbi.net:1099]; nested exception is:
java.net.ConnectException: Connection refused"

For some reason, the application is trying to bind itself to port 1099 on
one of Pacific Bell Internet's computers, which we use for DNS
resolution.  My dilemma is that I don't know if it's trying to bind to PBI's
computer because rmiregistry on the local machine isn't really working or if
there's some configuration file, that I don't know about, which is redirecting
rmiregistry to bind objects to that machine.

Any advice would be greatly appreciated.

M

--
Marshall Greer
Systems Manager
The Galef Institute
[EMAIL PROTECTED]
310.479.8883


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



Re: RMI on Linux

1999-08-02 Thread Nelson Minar

>Anyone been able to succesfully launch rmiregistry and bind
>UnicastRemoteObjects to it on Linux?

Yep. I'm not using the rmiregistry script itself, but I make extensive
use of RMI in my work and it's just fine in Linux. Make sure you have
the latest JDK you can run, RMI gets frequent bugfixes.

>First, do you know of any way to debug rmiregistry when it launches?

You can always write your own registry, it's quite simple using
java.rmi.registry.Registry

>Connection refused to host: [ns2-lsan03.pbi.net:1099]; nested
>exception is: java.net.ConnectException: Connection refused" For some
>reason, the application is trying to bind itself to port 1099 on one
>of Pacific Bell Internet's computers, which we use for DNS
>resolution.

Maybe that address at pbi.net is your current dynamic IP address
assigned by pacbell.net? Java (and libc) is a bit weird about this.
Basically, machines have multiple IP addresses (usually at least
127.0.0.1 and whatever Internet address you're currently using). But
libc and Java often assume there's only one IP address.

If a service binds to one address and another service tries to look up
on another, it gets confused. The order of things in /etc/hosts can
affect this, as well as DNS, /etc/nsswitch.conf, what order you bring
the interfaces up on. There are FAQs about this, but I don't
understand it myself. Maybe someone can explain it.
 
A quick test - try your code with no network connections running. or
try it with PPP running the whole time, or...

  [EMAIL PROTECTED]
.   .  . ..   .  . . http://www.media.mit.edu/~nelson/


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



Re: please help a java-linux newbie with swing

1999-08-02 Thread Dimitris Vyzovitis

Ken Huisman wrote:

>
> I downloaded swing from sun and I unpacked it in a directory, followed
> the instructions and so on.  The problem I have is when I go to run
> the SwingSet example, I get the following error:
>
> /usr/local/jdk/lib/i686/native_threads/libawt.so: undefined symbol: XtShellStrings 
>(libawt.so)
>
> I tried using green_threads and I get the same error
> (except pointing to green_threads/libawt.so)
> I am not sure if this error means there is a missing symbol in
> libawt.so or if libawt.so is looking for another library with this
> symbol that I do not have.
>

What kind of Xserver are you using?
I remember having  a similar problem with Xi's AcceleratedX in a RH5.2 box.
XFree should do the job though...


-- dimitris [mailto:[EMAIL PROTECTED]]




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



Re: Cut-n-paste?

1999-08-02 Thread Larry Gates


>Date: Sat, 31 Jul 1999 15:12:11 -0700
>From: Nathan Meyers <[EMAIL PROTECTED]>

>This discussion inspired me into a burst of frenzied activity, and I've
>written a simple JNI-based solution. Check out XClipboard at
>http://www.teleport.com/~nmeyers/FreeWare/

It works!!

Nathan, this is absolutely amazing!!!  Exactly what I had in mind.  
Wow! what an excellent newsgroup!!!

I was able to call the method readPrimarySelectionString() without a
problem.  The additional code to my program is only 3 lines: the
"import util.nmeyers.XClipboard;" statement, then these 2 lines within
one of my methods:

XClipboard xc = new XClipboard();   
String clip = xc.readPrimarySelectionString(); 

I decided to put your libXClipboard.so in /usr/local/lib, and then
globally include this path in LD_LIBRARY_PATH by specifying it in
/etc/profile.

The Makefile worked well on my Slackware 3.6, jdk117_v1a system.

As you said, there's a 2nd half to this problem: passing data from
XClipboard.java to XClipboard.c and then putting it into the PRIMARY
clipboard. 

It's funny that there's no way to do this without JNI.  If you use
a TextArea class, it will accept paste-ing with the mouse, so somewhere
within the bowels of the JVM, it must be reading the primary clipboard.

>XClipboard handles the problem of getting the pasted bits from X.
>Calling it from a mouse action is left as an exercise to the reader :-).
>
>Nathan

great program, Nathan.  This should be posted on the blackdown website
under "3rd Party Projects and Packages".

-Larry Gates


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



Re: Cut-n-paste?

1999-08-02 Thread Nathan Meyers

Thanks for the enthusiastic review...

As for pasting into TextArea, that's probably Motif or the X Toolkit (on
which Motif is built) doing it for you, not JDK code. Based on my one
brief experiment, I don't think you'll see it with Swing components. I
wouldn't be surprised if Motif/Xt also takes care of pushing bits the
other way. A more general (not specific to Motif/Xt) solution could be
added to XClipboard... it's just a bit harder than the first part of the
problem.

Nathan


Larry Gates wrote:
> 
> >Date: Sat, 31 Jul 1999 15:12:11 -0700
> >From: Nathan Meyers <[EMAIL PROTECTED]>
> 
> >This discussion inspired me into a burst of frenzied activity, and I've
> >written a simple JNI-based solution. Check out XClipboard at
> >http://www.teleport.com/~nmeyers/FreeWare/
> 
> It works!!
> 
> Nathan, this is absolutely amazing!!!  Exactly what I had in mind.
> Wow! what an excellent newsgroup!!!
> 
> I was able to call the method readPrimarySelectionString() without a
> problem.  The additional code to my program is only 3 lines: the
> "import util.nmeyers.XClipboard;" statement, then these 2 lines within
> one of my methods:
> 
> XClipboard xc = new XClipboard();
> String clip = xc.readPrimarySelectionString();
> 
> I decided to put your libXClipboard.so in /usr/local/lib, and then
> globally include this path in LD_LIBRARY_PATH by specifying it in
> /etc/profile.
> 
> The Makefile worked well on my Slackware 3.6, jdk117_v1a system.
> 
> As you said, there's a 2nd half to this problem: passing data from
> XClipboard.java to XClipboard.c and then putting it into the PRIMARY
> clipboard.
> 
> It's funny that there's no way to do this without JNI.  If you use
> a TextArea class, it will accept paste-ing with the mouse, so somewhere
> within the bowels of the JVM, it must be reading the primary clipboard.
> 
> >XClipboard handles the problem of getting the pasted bits from X.
> >Calling it from a mouse action is left as an exercise to the reader :-).
> >
> >Nathan
> 
> great program, Nathan.  This should be posted on the blackdown website
> under "3rd Party Projects and Packages".
> 
> -Larry Gates
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


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



How can I help?

1999-08-02 Thread Mike Christiansen

I have wanted to contribute to Linux for a while now. I would most like
to help make my favorite programming language successful on my favorite
OS. What can I do?

Mike


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



Re: [OT] jikes [was headed OT: Re: Working with many .java files]

1999-08-02 Thread Daniel Barclay



> From: Moses DeJong <[EMAIL PROTECTED]>


>  In Java the path
> name of the file defined what package it should be inside of.

NO!  It's the package clause _inside_ the source file that defines 
which package the class belongs to. 


Whether the source file is in a directory hierarchy matching the package
hierarchy should matter only for features like automatic recompilation.

Java tools should not force you into matching the package hierarchy
unless you want to use those features.





Daniel








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



Trouble with policytool

1999-08-02 Thread Walter Chang

When I ran policytool and tried to add a policy entry, the program hung
without giving me any error message.  Has anyone experienced this?  Can
I work around it?

Walter



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



Re: RMI on Linux

1999-08-02 Thread Chris Abbey

>Anyone been able to succesfully launch rmiregistry and bind
>UnicastRemoteObjects to it on Linux?

Yup, use a lot of it... works quite well.

>First, do you know of any way to debug rmiregistry when it launches? The
>reason I'm asking is this, when I launch rmiregistry "./rmiregistry 1099
>&" as a daemon process all seems fine.

There is so little to it that debugging is fairly trivial... if it didn't
throw an exception, and you get a hit on `netstat -an | grep 1099` then
it's up.

>However, when I fire up a RMI Server App I wrote to demonstrate
>distributed objects and it attempts to bind itself to a url via
>Naming.rebind(String name, Object object) the following exception is thrown:
>
>"Caught exception while registering: java.rmi.ConnectException:
>Connection refused to host: [ns2-lsan03.pbi.net:1099]; nested exception is:
>java.net.ConnectException: Connection refused"

what is the URL? try "rmi://127.0.0.1/servername", if that fixes it then
take a look at the output of a call like InetAddress.getLocalHost() or play
around with some of the other methods in this class, brcause this sounds
like a TCP configuration problem...


  cabbey at home dot net <*> http://members.home.net/cabbey
   I want a binary interface to the brain!
Today's opto-mechanical digital interfaces are just too slow!


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



Re: RMI on Linux

1999-08-02 Thread Glenn Valenta

> 
> what is the URL? try "rmi://127.0.0.1/servername", if that fixes it then
> take a look at the output of a call like InetAddress.getLocalHost() or play
> around with some of the other methods in this class, brcause this sounds
> like a TCP configuration problem...
> 

I can get mine to work locally, but when I put it up on my page, I get all
sorts of security errors in the netscape java console. BTW, I'm using
"rmi://24.1.12.134/servername"

Does rmiregistry need to be run as root becuase it uses low ports?

Is there something I need to have set up to connect to RMI over a net? 

http://24.1.12.134:5829/java/swl/index.html

Here is my helloworld that I used Marshall. 

http://24.1.12.134:5829/java/swl/hello.java   Interface
http://24.1.12.134:5829/java/swl/helloApplet.java  applet
http://24.1.12.134:5829/java/swl/helloImpl.java  server/imp

TIA!

-- 
Glenn Valenta   Engineering @ http://www.coloradostudios.com
[EMAIL PROTECTED]   http://ouray.cudenver.edu/~gavalent/
[EMAIL PROTECTED]  Personal mail
[EMAIL PROTECTED] Work mail


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



Re: JWS on Linux

1999-08-02 Thread John N. Alegre

There is a link at the blackdown site

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

Follow the instructions in the "JavaWebServer" section and it all just works.

john

On 28-Jul-99 Matt Zagni wrote:
> Adil,
> 
> About a week ago I posted my results on installing the JavaWebServer1.1.3
> it has been done before (My system is running SuSE6.1).
> I installed a very old installationof JWS on Slackware and SuSE5.3 too
> (but that was after a major build of the glib libraries).
> 
> I also posted my patched files too, for future reference.
> (you will have to midify it with your location of 
> java_home and the jshome too).
> 
> Try searching in the archive list for the search words
> of JavaWebServer it will be there.
> 
> Good luck
> 
> Matt
> 
> 
> 
>> Resent-Date: Wed, 28 Jul 1999 06:54:13 -0500
>> From: Adil Atilgan <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED]
>> Subject: JWS on Linux
>> Date: Wed, 28 Jul 1999 14:42:25 +0300
>> MIME-Version: 1.0
>> Resent-Message-ID: <[EMAIL PROTECTED]>
>> Resent-From: [EMAIL PROTECTED]
>> X-Mailing-List: <[EMAIL PROTECTED]> archive/latest/928
>> X-Loop: [EMAIL PROTECTED]
>> Resent-Sender: [EMAIL PROTECTED]
>> 
>> I am trying to Install Java Web Server on redhat 6.0 . 
>> There is a jwebs-linux.diff file which lets you to use sparc version of
>> JWS on Linux. 
>> 
>> When applied jwebs-linux.diff file I got an error message . 
>> I am using 
>> patch -p0 < jwebs-linux.diff
>> 
>> I got an error message of
>> 
>> can't find file to patch at input line 3
>> Perhaps you used the wrong -p or --strip option?
>> The text leading up to this was:
>> --
>> |--- ../../sparc-S2/bin/startup_wrapper  Thu Oct 30 14:42:05 1997
>> |+++ startup_wrapper Thu Mar  5 00:39:06 1998
>> --
>> 
>> Does anybody succesfully applied JWS on  Linux
>> 
>> TIA
>> 
>> Adil Atilgan
>> 
>> 
>> --
>> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>> 
> 
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

--
E-Mail: John N. Alegre <[EMAIL PROTECTED]>
Date: 02-Aug-99
Time: 18:44:02

This message was sent by XFMail
--


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



Re: Trouble with policytool

1999-08-02 Thread Oliver Fels

At Tue, 03 Aug 1999 Walter Chang wrote:
>When I ran policytool and tried to add a policy entry, the program hung
>without giving me any error message.  Has anyone experienced this?  Can
>I work around it?

Yes:
Edit your poliy files manually.

Oliver
--
___
Oliver Fels| e-mail: 
Neurotec Hochtechnologie GmbH  | [EMAIL PROTECTED]
Team Manager JAVA-/IT-Security |
Friedrichshafen, Germany   | 
---


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



serial communication

1999-08-02 Thread R MUTHUSWAMY


i want to program serial port, what is the api should i get. 

Thanks in advance,
MUTHU.


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