Re: current directory

1999-12-27 Thread Dustin Lang


Hi,

> how can I get current directory in servlet?

This is not Linux-specific, or even servlet-specific, for that matter.
There is a trick, though it feels like bad programming form:

new File(".").getAbsolutePath();

In the future, you would do better by finding a more appropriate forum for
questions that are not specific to the Linux JDK(s).

Cheers,
dstn.


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



Re: how to extract .tar.bz2 ?

1999-12-27 Thread Dustin Lang


Hi,

> I download Blackdown jdk1.2.2:
> 
> jdk-1.2.2-RC3-linux-i386.tar.bz2
> 
> I can not use "tar xvfI jdk-1.2.2-RC3-linux-i386.tar.bz2"
> command in linux # prompt. Anyone help me ?

If your tar program is older, it will not know about bunzip2, ie, it will
not understand the "I" option.  You alos need the bunzip2/bzip2 program(s)
installed.

If your still have problems after checking out these possible problems,
contact me off-list, and be sure to include specific error messages you
encountered.

Cheers,
dstn.


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



Re: JDK 1.2.2 RC3 with some JITs

1999-12-27 Thread SHUDO Kazuyuki

I wrote:

> Hi Blackdown guys,

> But still a problem is preventing the RC3 from working
> with some JITs.

I am sorry. Blackdown JDK is not wrong at all.
I guessed wrong.

> But JDK 1.2.2 RC3 raises SIGSEGV after the
> signal handler returns. Therefore the JITs which utilize
> signals for exception handling don't work well with the RC3.

This was a problem related to LinuxThreads library.
LinuxThreads places two pieses of sigcontext (whose type
is sigcontext *) on stack. The signals.c contains the
following code.

  static void pthread_sighandler(int signo, SIGCONTEXT ctx)
  {
...
sighandler[signo](signo, SIGCONTEXT_EXTRA_ARGS ctx);

A second argument to pthread_sighandler is the first
sigcontext supplied by kernel and the function places
the sigcontext onto stack again. If the JIT wants to
modify sigcontext and affect it, the former should be
modified, not the latter. My JIT modified the former
sigcontext and couldn't affect the sequent execution.

> It is unfortunate that the Blackdown team doesn't know
> requirements of JIT well.

For instance, JIT developers have a strong desire to get
sigcontext in the signal handler for JIT. I guess, JDK
doesn't pass sigcontext to a signal handler because
Linux 2.0 and libc5 can't pass it to the handler. But
most OSes and JDKs can do it.

Kazuyuki SHUDO  Happy Hacking!
  Muraoka Lab., Grad. School of Sci. & Eng., Waseda Univ.


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



Jar file with JDBC

1999-12-27 Thread ALPESH KOTHARI

Hello all,

I have written an application using Java2. It works
fine with JDBC interface. I prepared a jar file of all
the class file as well as 'postgresql.jar'.(I am using
postgresql-6.5 as db).

At this time it gives null pointer exception whenever
it encounters a first create table statement.
The application works fine without making jar file.

What can be possible cause of problem?

Thanking You,
With Regards
Alpesh


=
KOTHARI ALPESH D.
STUDENT M. TECH.
CEDT
INDIAN INSTITUTE OF SCIENCE
BANGALORE-560 012
INDIA
_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



Re: I can compile file1.java but cannot run file1.class in Linux.

1999-12-27 Thread Thomas Bonk

On Mon, Dec 27, 1999 at 11:07:46AM -0800, [EMAIL PROTECTED] wrote:
> I have a question about Java in Linux. I install jdk-1.1.5-8.i386.rpm in
> Linux by typing rpm -ivh jdk-1.1.5-8.i386.rpm. After that I can compile
> a java file (javac file1.java) but I cannot run it (java file1.class). I
> don't see any help included with jdk. I really need your help.

Is ./. in your CLASSPATH?

bye, Thomas
-- 
"I was gratififed to answer promptly, and
 I did. I said I didn“t know."
 (Mark Twain)


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



Y2K readiness.

1999-12-27 Thread Morten Primdahl


Hi

I've looked all over blackdown.org for a y2k statement, but
I've found none. Any of you know if there are any y2k issues with
the blackdown ports? (specifically jdk117_v1a).

Thanks

Morten

-- 
Morten Primdahl Caput ApS   Tel +45 33 12 24 42 
[EMAIL PROTECTED]Nygade 6Fax +45 33 91 24 42
http://www.caput.comDK-1164 Kbh K


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



Re: I can compile file1.java but cannot run file1.class in Linux.

1999-12-27 Thread Artur Biesiadowski

[EMAIL PROTECTED] wrote:
> After that I can compile
> a java file (javac file1.java) but I cannot run it (java file1.class). I
> don't see any help included with jdk. I really need your help.

You have to type
java file1

not java file1.class


Artur


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



Re: jdk1.2

1999-12-27 Thread Edward W. Rouse

I thought the readme for blackdown 1.2 specified glibc2.1.2 and specifically

said not to use 2.1.2?
Ed.

Nathan Meyers wrote:

> me wrote:
> >
> > Hi,
> >
> > I've downloaded jdk1.2, and installed it, but when I tried to run it
> > says "can't find libjava.so". I'm using Mandrake 6.5 and glibc 2.1.1.
> > Where can I get this libjava.so library? Thanks.
>
> It's in the JDK. Usually this error means a mismatch with the glibc
> version. Did you get the JDK1.2 specifically for glibc2.1? With your
> setup, you can use one of these:
>
> - Blackdown JDK1.2 for glibc2.1
> - Inprise JDK (from Sun)
>
> but you can't use either of these:
>
> - Blackdown JDK1.2 for glibc2.0
> - Blackdown JDK1.2.2 (requires glibc2.1.2)
>
> Nathan
>
> > Howard
> >
> > --
> > 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]


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



RE: I can compile file1.java but cannot run file1.class in Linux

1999-12-27 Thread Kontorotsui


On 27-Dec-99 [EMAIL PROTECTED] wrote:
> After that I can compile
> a java file (javac file1.java) but I cannot run it (java file1.class). I
> don't see any help included with jdk. I really need your help.

What about java file1? :)
The class extension must not be included, this is true if you run it also on
*argh* windows from the *argh* dos terminal.

---
Andrea "Kontorotsui" Controzzi - MALE Student of Computer Science at 
University of Pisa  -  Italy  -  E-mail: [EMAIL PROTECTED]
My home page: http://www.cli.di.unipi.it/~controzz/intro.html


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



Re: I can compile file1.java but cannot run file1.class in Linux.

1999-12-27 Thread Chris Abbey

then you should use the same commands in Linux as you used in winblows:
'java file1', not 'java file1.class'. This second is looking for a class
named 'class' in a package 'file1'.

p.s. I'd recommend upgrading to one of the 1.1.8 vms available on the web.

At 11:07 12/27/99 -0800, [EMAIL PROTECTED] wrote:
>Hello everybody,
>
>Have you got a merry Christmas? Now everything was in the past and I
>feel frighten when there are only a few day left before the year 2000.
>It doesn't mean Y2K but I think I didn't anything this year so I try to
>learn something in the last days of 1999.
>
>I have a question about Java in Linux. I install jdk-1.1.5-8.i386.rpm in
>Linux by typing rpm -ivh jdk-1.1.5-8.i386.rpm. After that I can compile
>a java file (javac file1.java) but I cannot run it (java file1.class). I
>don't see any help included with jdk. I really need your help.
>
>Thanks in advance.
>
>Bye and good luck.
>
>PS: I'm sure that there's nothing wrong in file1.java. I can compile and
>run it in windoze.
>
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>

  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: Jar file with JDBC

1999-12-27 Thread Peter Mount

On Mon, 27 Dec 1999, ALPESH KOTHARI wrote:

> Hello all,
> 
> I have written an application using Java2. It works
> fine with JDBC interface. I prepared a jar file of all
> the class file as well as 'postgresql.jar'.(I am using
> postgresql-6.5 as db).
> 
> At this time it gives null pointer exception whenever
> it encounters a first create table statement.
> The application works fine without making jar file.
> 
> What can be possible cause of problem?

Can you give me some more details please, as you are the second person in
a week to tell me about a null pointer problem.

Also, what exact version are you using, 6.5, 6.5.1, 6.5.2 or 6.5.3?

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



Re: how to extract .tar.bz2 ?

1999-12-27 Thread Jacob Nikom

6. Unzip the file with bzcat
bzcat jdk1.2pre-v2-debug.tar.bz2 > jdk1.2pre-v2-debug.tar
7. Untar the file
tar xvf jdk1.2pre-v2-debug.tar
8. Set up the path
set path = (/homes/nikom/work/java/bin1/jdk1.2/bin $path)

Jacob Nikom

[EMAIL PROTECTED] wrote:
> 
> I download Blackdown jdk1.2.2:
> 
> jdk-1.2.2-RC3-linux-i386.tar.bz2
> 
> I can not use "tar xvfI jdk-1.2.2-RC3-linux-i386.tar.bz2"
> command in linux # prompt. Anyone help me ?
> 
> JackWang
> 
> --
> 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]



RE: jdk1.2

1999-12-27 Thread Howard Lee

Yes I did download glibc2.1.1 version from blackdown.org. Do I need to
download some special library? I'm using Mandrake 6.5 btw which I believe
uses glibc 2.1.1 (I checked). Any idea why I'm still having this problem?
Thanks everyone!

Howard

-Original Message-
From: Edward W. Rouse [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 27, 1999 5:24 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: jdk1.2


I thought the readme for blackdown 1.2 specified glibc2.1.2 and specifically

said not to use 2.1.2?
Ed.

Nathan Meyers wrote:

> me wrote:
> >
> > Hi,
> >
> > I've downloaded jdk1.2, and installed it, but when I tried to run it
> > says "can't find libjava.so". I'm using Mandrake 6.5 and glibc 2.1.1.
> > Where can I get this libjava.so library? Thanks.
>
> It's in the JDK. Usually this error means a mismatch with the glibc
> version. Did you get the JDK1.2 specifically for glibc2.1? With your
> setup, you can use one of these:
>
> - Blackdown JDK1.2 for glibc2.1
> - Inprise JDK (from Sun)
>
> but you can't use either of these:
>
> - Blackdown JDK1.2 for glibc2.0
> - Blackdown JDK1.2.2 (requires glibc2.1.2)
>
> Nathan
>
> > Howard
> >
> > --
> > 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]


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



Re: Y2K readiness.

1999-12-27 Thread Dustin Lang


Hi,

> I've looked all over blackdown.org for a y2k statement, but
> I've found none. Any of you know if there are any y2k issues with
> the blackdown ports? (specifically jdk117_v1a).

I'm not a member of the porting team, but I can tell you what I think they
would tell you.  The JDK, like almost any reasonable piece of software,
relies on the system libraries for dealing with time values.  Therefore,
the JDK relies entirely on the OS to give it reasonable time values.  The
OS, in turn, likely relies on a hardware clock, at least at system startup
time.  Since Java generally deals with time values in terms of
milliseconds since Jan 1 1970, the date Jan 1 2000 is of no special
significance.  I can tell you what the value is if you really want to
know, but it's pretty much as non-interesting as any other
millisecond.  So the question really becomes, come Jan 1, what is your OS
going to tell the JDK the time is?  There should only be problems if your
hardware clock stores only 2 digits of the year.

I'm by no means a Y2K authority, this is just what common sense tells
me.  I haven't checked if my own h/w clock is going to work, and frankly I
don't much care.  If it breaks, I'll fix it.

Cheers,
dstn.


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



Re: Jar file with JDBC

1999-12-27 Thread ALPESH KOTHARI

Hi,

I am using PostgreSQL - 6.5.1 with the JDBC driver
compiled from the sources.
My machine is RH6.0 with Java-1.2 preV2.

I am attatching a portion of my source code where it
gives exception

String url = "jdbc:postgresql:postgres";
String usr = "postgres";
String pwd = "postgres";
try
{
Class.forName("postgresql.Driver");
db = DriverManager.getConnection(url, usr, pwd);
st = db.createStatement();
}
catch(ClassNotFoundException cls){
System.out.println("Classnotfound");}
catch(SQLException sl){
System.out.println("SQL");}
try
{
String crt="create table xyz(sadd int4,tadd int4,pid
int4,filen text,diff int2)";
st.executeUpdate(crt);

//While executing this statement it gives nullpointer
exception
}
catch(IOException e)
{
System.out.println("Error "+e);
}

The program works fine if I dont prepare the jar file.

Thaking You
Alpesh

=
KOTHARI ALPESH D.
STUDENT M. TECH.
CEDT
INDIAN INSTITUTE OF SCIENCE
BANGALORE-560 012
INDIA
__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://messenger.yahoo.com


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



Re: Jar file with JDBC

1999-12-27 Thread Dustin Lang


Hi,

> try
> {
>   Class.forName("postgresql.Driver");
>   db = DriverManager.getConnection(url, usr, pwd);
>   st = db.createStatement();
> }
> st.executeUpdate(crt);
> 
> //While executing this statement it gives nullpointer

It looks as though the driver can't create a statement, since
"st" is null.  Are you sure you are including absolutely all the classes
required by all parts of your application and your jdbc driver?  To test
this specifically, try putting all the classes you use in one base
directory, then set your path variables and make sure that classes are
being only loaded from there and rt.jar.  Then jar that directory and see
what happens!

Another option might be turning on verbose class loading to see what's
happening.

Both these ideas should help to detect class loading, which by your
description sounds like the base of your problem, since it works out of
the jar.

Cheers,
dstn.


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



how to extract .tar.bz2 ?

1999-12-27 Thread jack . w

I download Blackdown jdk1.2.2:

jdk-1.2.2-RC3-linux-i386.tar.bz2

I can not use "tar xvfI jdk-1.2.2-RC3-linux-i386.tar.bz2"
command in linux # prompt. Anyone help me ?

JackWang



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