Re: newbie java -classpath still not working as expected

1999-10-26 Thread Andreas Rueckert

Hi!

This is my classpath for 1.1.7 (it's actually 1 line without the '\'s):

export CLASSPATH=/usr/local/swing/swingall.jar:\
/usr/share/postgresql/postgresql.jar:\
/home/andreas/kde_plaf/kde.jar:\
..:\
/usr/local/jdk1.1.7/lib:\
/usr/local/jdk1.1.7/lib/classes.zip

You can see that . is the only relative path. The threads are in the
classes.zip.

Ciao,
Andreas



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



Re: Question about porting a VM

1999-10-26 Thread Michael Sinz

On Tue, 26 Oct 1999 10:42:07 +0800, Feng-Cheng Chang wrote:

>Hello,
>My friend asked me about the implementation of threads in linux JVM.
>
>He is interested in porting PersonalJava to linux.
>Could somebody give me comments about that?
>Which kind of thread implementation is easier?
>If we decide to implement both green and native threads,
>which one should be done first, and what are the pros and cons?

Both forms have their own difficulties.
Green threads provide you with a "more controlled" environment and may
make debugging easier.  However, this may require some rather nasty
code to do your own thread switching and ASYNC I/O wrapping to make it
all work well.

Native threads save you that effort but then you need to build the
correct thread control constructs for things like the ASYNC GC and
thread death synchronization (for thread.join() types of things)
There are also some signalling issues that are "fun".

If you look at the diffs that Blackdown has for the JDK ports (either the
1.1.7 or the 1.2) you will see a few of the things that are needed.  Note
that both 1.1.7 and 1.2pre2 are not 100% working in native threads and,
some may claim, not 100% in green either...

-- 
Michael Sinz  Technology and Engineering Director/Consultant
"Starting Startups" mailto:[EMAIL PROTECTED]
My place on the web ---> http://www.users.fast.net/~michael_sinz



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



Re: Version snag

1999-10-26 Thread Armen Yampolsky

> On Mon, 25 Oct 1999, Hartnett wrote:
>
> > This same package was installed on Solaris and its runtime and works
> > fine.
> >
> > This group seems to be quick to jump on someone if it is not JAVA
> Linux
> > related in someone's opinion.  I am running Blackdown JAVA 2 on Red
> Hat
> > Linux 6, that sounds like this group to me. I don't see what the
> problem
> > is?  I thought the idea of this list is to try to help others, not
> to
> > try to make someone want not to use these products?
>
> I don't think Dustin was really jumping on you, he tried to give you a
> possibility which is what you asked.
>
I personally found Justin's point that the symptoms
> "would sugest that your code is to blame, not the Blackdown JDK (and
your message is > therefore off-topic)."

inaccurate, inappropriate, and rather indulgent. It was indeed quite
appropriate to post Hartnett's question to this list, IMO. It is far
from proven that the problem is not a classpath, library, or even
Blackdown port problem -- yet.

For Hartnett, besides getting to the developers and asking them exactly
how they check for Java 2, a couple of things just off the top of my
head: Try setting the java version explicitly by running the program
with a -Djava.version=1.2 (that should not be necessary as Blackdown's
JVM does this correctly anyway, but what the hell, let's see what
happens). The other place where things could break is in loading certain
JDK1.2 classes, so maybe we could try substituting Blackdown's rt.jar
with the one from the Windows installation, just as an experiment (I've
never done this, but it should work, and may give us further clues).
Also, an accurate dump of your environment, esp. the classpath, may tell
us something.

Good luck,
-Armen


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



NoRouteToHost Errors

1999-10-26 Thread Rick Moore



Hi!
 
Background:
I have a Java web crawler app which spawns about 15 threads 
with the sole purpose of downloading web pages as fast as possible.  It 
works fine under Windows NT w/jview-- but who wants to use NT?  Under 
FreeBSD (which is derived from the Blackdown work, I believe) the JVM appears to 
hang after a while.  I'm trying to work with the FreeBSD folks for 
support, but in the mean time I'm looking for other options.  Perhaps this 
is an opportunity to work some Linux boxes into my system.
 
Problem:
The good news is that the JVM doesn't appear to hang under 
Linux.  That bad news is that now I get a huge number of "NoRouteToHost" 
exceptions.  The strange thing is that it scans about 100 pages OK, then I 
get maybe 50 errors, and then it picks up and starts working again.  The 
cycle is repeated over and over.
 
When I start getting the "NoRouteToHost" exceptions, the 
entire Linux machine appears to have network problems-- not just Java.  
Seems like the JVM is using up a kernel resource which eventually gets freed up, 
but not quickly enough.  Is this possible?  Any ideas or 
suggestions?  The app is pretty small, and I can publish the source if it 
would help.
 
Any help would be greatly appreciated!
 
Here are some details:
 
Redhat 6.1

[rick@spinner geckobot]$ java -version java version 
"1.1.7B"  
[root@spinner /root]# ldconfig -D 2>&1 | grep ld | tail 
-1       ld-linux.so.2 
=> 
ld-2.1.2.so 
[root@spinner /root]# ldconfig -D 2>&1 | grep libc | tail -1 
    libc.so.6 => 
libc-2.1.2.so   
[root@spinner /root]# uname 
-r   
2.2.12-20smp 

 
Regards,
Rick


Config problems with ApacheJServ-1.0

1999-10-26 Thread tpeter


I'm trying to install ApacheJServ-1.0 with a previous install of
Apache_1.3.6 and I'm runing into problems configuring jserv.  I use the
following command line argument according to the instructions: 

"
./configure  \
--with-apxs=/usr/local/apache/bin/apxs \
--prefix=/java/jserv \ 
--with-JSDK=/java/JSDK2.0/lib/jsdk.jar  
"


It spits out the following (in part):

"
checking host system type... Configuration name missing.
Usage: src/scripts/build/unix/config.sub CPU-MFR-OPSYS
or src/scripts/build/unix/config.sub ALIAS
"

And also:

"
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
"

The problem may be occuring in configure starting at line 995:

"
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:962: checking host system type" >&5
"

, Or it may be in config.sub   starting on line 48:

"
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
"



I'm confused.  Does the host information need to be prespecified in some
file, or is this configure script supposed to get the info from the os.  
I haven't a very good understanding of shell scripts, so I could use some
help here. 


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



JavaSpaces

1999-10-26 Thread GC-Braswell, Peter


Any good links out there dealing with JavaSpaces and or JINI?

Cheers,
peter


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



Re: JDBC newbie question

1999-10-26 Thread Peter Mount

On Mon, 25 Oct 1999, John N. Alegre wrote:

> Has anyone else had this experience.  I have been reluctant to move to
> PostgrSQL for reasons of complexity and speed.

Although I don't touch applets anymore, the problems with placing either
all of the classes into a single jar file, or extracting the classes so
they are downloaded individually are old, but tips I still give out when
people ask me about problems with browsers.

> Is the JDBC support that much more advanced in PostgrSQL?

I should hope so, as it takes up a lot of my time :-)

For the next release I'm hoping to have most of the JDBC2 spec complete,
but mainly the BLOB and Array support.

> All comments welcome.
> 
> john
> 
> On 24-Oct-99 Eric vanberkel wrote:
> > I've been thru this.
> > 
> > You go to check you have the 1.2.2 driver and not the
> > 1.2.1, which did not work on my prev2 JDK + latest mysql
> > 
> > Also for apps:
> > java -cp .:$CLASSPATH proggie
> > with a correct classpath set
> > 
> > in applets $CLASSPATH won't work.
> > You'll want to put into your html:
> > 
> > 
> > ..
> > ..
> > 
> > 
> > put the mm jarfile in this tag and in the applet home dir.
> > If there is no jar, copy the mm.mysql level into the applet
> > home dir. I know it's a shame, butt...
> > 
> > If you haven't got a jar you use the jar tools to pack the
> > mm.mysql classes into a jar file.
> > 
> > This knowledge cost me a lotta sweat. I hope it pays off
> > for you brother...
> > 
> > Oh,
> > I managed to step over the line to PostgrSQL. Support for
> > JDBC is much better. This might be a hint. They also
> > upgraded to JDBC2 faster then mysql usually does
> > 
> > Good luck,
> > gr. Eric
> > 
> > --- Jalaluddin Riaz <[EMAIL PROTECTED]> wrote:
> >> hi,
> >> I am a newbie to JDBC programming and am having some
> >> problems. I am 
> >> using mysql rdbms and mm.mysql.jdbc-1.2 driver and have
> >> jdk1.2preV2 
> >> installed. the problem is everytime i try to run a prog.
> >> i get class not 
> >> found exception. the prog is not able to find the driver
> >> class files. i have 
> >> tried different CLASSPATH settings, still does no works..
> >> any ideas.
> >> 
> >> thanks.
> >> 
> >> __
> >> Get Your Private, Free Email at http://www.hotmail.com
> >> 
> >> 
> >>
> > --
> >> To UNSUBSCRIBE, email to
> >> [EMAIL PROTECTED]
> >> with a subject of "unsubscribe". Trouble? Contact
> >> [EMAIL PROTECTED]
> >> 
> >> 
> > 
> > __
> > Do You Yahoo!?
> > Bid and sell for free at http://auctions.yahoo.com
> > 
> > 
> > --
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> --
> E-Mail: John N. Alegre <[EMAIL PROTECTED]>
> Date: 25-Oct-99
> Time: 13:02:49
> 
> This message was sent by XFMail
> --
> 
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 

--
   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]



mailto-protocol and it´s result: UnknownHostExceptionmailhost or ConnectionRefused

1999-10-26 Thread Christian Kruggel

Hi Juergen!

A few days ago you answered my question concerning java´s
mailto-protocol and the exception produced by the appended source:

java.net.UnknownHostException: mailhost

   Juergen> Sounds like a setup problem. Can you ping mailhost?

No. Another nice GUY suggested to mention the localhost as
mailhost in /etc/hosts. Appending the line "127.0.0.1 mailhost"
I was able to ping the mailhost. But that seems just to shift
the problem. Executing the program now leads to a
ConnectionRefused-Exception ...

You said the appended source works fine with your machine
and I agree that it most probably will be a setup-problem with
the mail-deamon. Could you just mail me the corresponding
line of your /etc/hosts? As far as I read the hosts-manpage
this line will customize the behavior of the mailhost.
This method might keep me out of irrelevant details ;-)

Christian

*** SendMail.java 

import java.io.*;
import java.net.*;

public class SendMail {
  public static void main(String[] args) {
try {
  // If the user specified a mailhost, tell the system about it.
  if (args.length >= 1) System.getProperties().put("mail.host",
args[0]);

  // A Reader stream to read from the console
  BufferedReader in = new BufferedReader(new
InputStreamReader(System.in));

  // Ask the user for the from, to, and subject lines
  System.out.print("From: ");
  String from = in.readLine();
  System.out.print("To: ");
  String to = in.readLine();
  System.out.print("Subject: ");
  String subject = in.readLine();

  // Establish a network connection for sending mail
  URL u = new URL("mailto:" + to);  // Create a mailto: URL
  URLConnection c = u.openConnection(); // Create a URLConnection
for it
  c.setDoInput(false);  // Specify no input from
this URL
  c.setDoOutput(true);  // Specify we'll do output
  System.out.println("Connecting...");  // Tell the user what's
happening
  System.out.flush();   // Tell them right now
  c.connect();  // Connect to mail host
  PrintWriter out = // Get output stream to mail
host
new PrintWriter(new OutputStreamWriter(c.getOutputStream()));

  // Write out mail headers.  Don't let users fake the From address
  out.println("From: \"" + from + "\" <" +
  System.getProperty("user.name") + "@" +
  InetAddress.getLocalHost().getHostName() + ">");
  out.println("To: " + to);
  out.println("Subject: " + subject);
  out.println();  // blank line to end the list of headers

  // Now ask the user to enter the body of the message
  System.out.println("Enter the message. " +
 "End with a '.' on a line by itself.");
  // Read message line by line and send it out.
  String line;
  for(;;) {
line = in.readLine();
if ((line == null) || line.equals(".")) break;
out.println(line);
  }

  // Close the stream to terminate the message
  out.close();
  // Tell the user it was successfully sent.
  System.out.println("Message sent.");
  System.out.flush();
}
catch (Exception e) { 
  System.err.println(e);
  System.err.println("Usage: java SendMail []");
}
  }
}


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



Re: mailto-protocol and it´s result: UnknownHostExceptionmailhostor ConnectionRefused

1999-10-26 Thread Juergen Kreileder

> Christian Kruggel writes:

Christian> Hi Juergen!
Christian> A few days ago you answered my question concerning
Christian> java´s mailto-protocol and the exception produced by
Christian> the appended source:

Christian> java.net.UnknownHostException: mailhost

Juergen> Sounds like a setup problem. Can you ping mailhost?

Christian> No. Another nice GUY suggested to mention the localhost
Christian> as mailhost in /etc/hosts. Appending the line
Christian> "127.0.0.1 mailhost" I was able to ping the
Christian> mailhost. But that seems just to shift the
Christian> problem. Executing the program now leads to a
Christian> ConnectionRefused-Exception ...

Try 'telnet localhost smtp'.  I'm pretty sure you'll see the same
problem, i.e. something like 'Connection refused'

As said before, what java tries to do is:

1. Connect to System.getProperty("mail.host") on the smtp port (number
   25).
2. If 1 failed connect to localhost on the smtp port
3. If 2 failed lookup mailhost (which is not the same as localhost on
   many systems), if mailhost is unknown throw a UnknownHostException
   else try to connect to mailhost on the smtp port, if that fails
   throw a ConnectException.

The conclusion is that you don't have a Mail Transfer Agent on the
hosts System.getProperty("mail.host"), localhost, and mailhost.
Adding mailhost to /etc/hosts wont help, you have to install and
configure an MTA (exim, sendmail, smail, ...) somewhere.  (Another
option is to set the property mail.host to a host that will act
as a mail relay for your host).


Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Porting Team
http://www.blackdown.org/java-linux.html


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



Re: mailto-protocol and it´s result: UnknownHostExceptionmailhost or ConnectionRefused

1999-10-26 Thread schen

Hi Christian, everyone,

On Tue, 26 Oct 1999, Christian Kruggel wrote:

> Hi Juergen!
> 
> A few days ago you answered my question concerning java´s
> mailto-protocol and the exception produced by the appended source:
> 
> java.net.UnknownHostException: mailhost
> 
>Juergen> Sounds like a setup problem. Can you ping mailhost?
> 
> No. Another nice GUY suggested to mention the localhost as
> mailhost in /etc/hosts. Appending the line "127.0.0.1 mailhost"
> I was able to ping the mailhost. But that seems just to shift
> the problem. Executing the program now leads to a
> ConnectionRefused-Exception ...

Er, you're supposed to replace "mailhost" with the name of your actual
SMTP server.  You shouldn't be messing around with /etc/hosts.

You can get your SMTP server from your browser settings or email client
settings.

. . . Sean.



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



Re: mailto-protocol and it´s result: UnknownHostExceptionmailhost or ConnectionRefused

1999-10-26 Thread schen

To clarify:

As the usage in the program says, you're supposed to run the program like
this:

java SendMail 

As Juergen said, evidently you are not specifying the correct server name
so it defaults to "mailhost" which doesn't exist for you.

It probably worked on the Sparc 5 because the SMTP mail service was
probably running on it, whereas from your email it's evident that no mail
service is running on your Linux machine.

Please email privately if you have further problems, this is getting
off-topic.

. . . Sean.



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



=?x-unknown?q?Re=3A_mailto-protocol_and_it=B4s_result=3A___?==?x-unknown?q?UnknownHostExceptionmailhost_or_ConnectionRefused?=

1999-10-26 Thread Brian Wellington

On 26 Oct 1999, Juergen Kreileder wrote:

> As said before, what java tries to do is:
> 
> 1. Connect to System.getProperty("mail.host") on the smtp port (number
>25).
> 2. If 1 failed connect to localhost on the smtp port
> 3. If 2 failed lookup mailhost (which is not the same as localhost on
>many systems), if mailhost is unknown throw a UnknownHostException
>else try to connect to mailhost on the smtp port, if that fails
>throw a ConnectException.

The problem is that (3) uses the InetAddr class to do a DNS lookup, which
calls gethostbyname (on unix, at least).  This is just plain wrong, since
this looks up A records for mailhost, when it should be looking up MX
records of mailhost.  So, if mailhost has MX records and no A records,
which is perfectly valid, java will fail.

There's no good way around this.

Brian


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



Re: Config problems with ApacheJServ-1.0

1999-10-26 Thread Martin Olveyra

[EMAIL PROTECTED] wrote:

> I'm trying to install ApacheJServ-1.0 with a previous install of
> Apache_1.3.6 and I'm runing into problems configuring jserv.  I use the
> following command line argument according to the instructions:
> ...
> I'm confused.  Does the host information need to be prespecified in some
> file, or is this configure script supposed to get the info from the os.
> I haven't a very good understanding of shell scripts, so I could use some
> help here.

Perhaps if you add to 'configure' the option --host=[the type of your system]
the problem will be fixed.
If this doesn't work, may be you have a wrong environment variable. Type 'set'
to see all environment variables and check if you have such one that may lead
to an error in some config script, (i.e. some variable with a name that is used
in the config scripts but has a wrong value). It is the only thing that I can
say you at the distance.


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



Re: Re: mailto-protocol and it's result: UnknownHostExceptionmailhost or ConnectionRefused

1999-10-26 Thread Chris Abbey

At 17:53 10/26/99 -0400, Brian Wellington wrote:
>On 26 Oct 1999, Juergen Kreileder wrote:
>
>> As said before, what java tries to do is:
>> 
>> 1. Connect to System.getProperty("mail.host") on the smtp port (number
>>25).
>> 2. If 1 failed connect to localhost on the smtp port
>> 3. If 2 failed lookup mailhost (which is not the same as localhost on
>>many systems), if mailhost is unknown throw a UnknownHostException
>>else try to connect to mailhost on the smtp port, if that fails
>>throw a ConnectException.
>
>The problem is that (3) uses the InetAddr class to do a DNS lookup, which

this is correct behavior. At that point in step 3 you should have either
a DNS name, or an IP address; either is a valid input to getHostByName.

>calls gethostbyname (on unix, at least).  This is just plain wrong, since
>this looks up A records for mailhost, when it should be looking up MX

again, this is the correct behavior. The mail.host system property and
mailhost DNS alias should both refer to a host which is running an MTA
on the standard port and willing to accept outbound mail from this node.
Said host reference may be via TCP/IP address or DNS name.

>records of mailhost.  So, if mailhost has MX records and no A records,
>which is perfectly valid, java will fail.

no, actually that is not a valid DNS configuration. Per rfc974 MX records
may only refer to hosts. (A records per rfc1034) MX records in fact play
no part in this discusion as they map how to get mail into a domain, not
out of it.

>There's no good way around this.

sure there is. correctly configure your machine per the standard. java
is trying to be friendly and handle most cases of missing configuration
by trying all the posibilities in order of likelyhood to work - here it
shows it's attempts to be cross-platform; had this been a unix program
it would have tried the standard configuration for smtp host and failing
that would have errored rather than trying to trackdown the other ways to
configure.

As this is now certainly offtopic for java-linux (and I'll assume
advanced-java as well) please followup off list if you choose. -=Chris

  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]