From tanner at real-time.com Mon Jul 8 12:41:48 2002 From: tanner at real-time.com (Bob Tanner) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] Re: [TCLUG] JDBC/OCI Error message. Urgent please help!!!! In-Reply-To: <20020708133828.6E545BFAA@xmxpita.excite.com>; from michael.arolan@excite.com on Mon, Jul 08, 2002 at 09:38:28AM -0400 References: <20020708133828.6E545BFAA@xmxpita.excite.com> Message-ID: <20020708124148.A4908@real-time.com> Quoting michael.arolan@excite.com (michael.arolan@excite.com): > > Hi Gurus > > I'm trying to connect to my Oracle9i database via a Java servlet but > got the following error message in the web browser: Should post this to tclug-devel. Should post a code snippet so we can see what your code is trying to do. From david.blevins at visi.com Tue Jul 9 11:57:49 2002 From: david.blevins at visi.com (David Blevins) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] Hidding passwords in Java? In-Reply-To: <20020116024005.A31689@real-time.com> Message-ID: <000b01c22769$c38444b0$2602a8c0@Miles> To dig up a really old thread..... This is a definite hack, but workds. public class Eraser extends Thread { PrintStream out; boolean finish=false; public Eraser (PrintStream out) { this.out = out; } public void run () { while ( !finish ) { out.print ( "\010*" ); try { sleep ( 10 ); } catch ( InterruptedException inte ) { finish = true; } } } public static String readPassword () { Eraser eraser = new Eraser ( System.out ); eraser.start (); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String password = ""; try { password = in.readLine(); } catch ( IOException ioe ) { } eraser.interrupt (); try { Thread.sleep ( 100 ); } catch ( InterruptedException inte ) { } return password; } } > -----Original Message----- > From: tclug-devel-admin@mn-linux.org > [mailto:tclug-devel-admin@mn-linux.org] On Behalf Of Bob Tanner > Sent: Wednesday, January 16, 2002 2:40 AM > To: Mike Bresnahan > Cc: tclug-devel@mn-linux.org > Subject: Re: [TCLUG-DEVEL] Hidding passwords in Java? > > > Quoting Bob Tanner (tanner@real-time.com): > > Quoting Mike Bresnahan (mbresnah@visi.com): > > > This was asked recently on the TCJUG. Noone offered a solution > > > other than using JNI to call either getpass(3) or > tcsetattr(2). Me > > > thinks the Java designers decided that terminal I/O was > not part of > > > the least common demoninator. > > > > I've been messing around with the streams and experimenting with > > replacing System.in, but I can't keep the keystrokes from > appearing on > > the console. > > > > getpass(3) or tcsetattr(2) Eeek! I don't think those will > work under > > Losedows. > > > > Well, I got this working using JNI and tcsetattr(2). It was > actually very simple. > > Read the JNI stuff, it should be just as easy for someone to > write a windows DLL that does the same thing my share lib > does. Of course, that person will not be me, since I don't > have a Windows dev environment. > > I am actually very surprised how easy JNI makes hooking into > native code. > > -- > Bob Tanner | Phone : (952)943-8700 > http://www.mn-linux.org, Minnesota, Linux | Fax : (952)943-8500 > Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 > > _______________________________________________ > tclug-devel mailing list > tclug-devel@mn-linux.org > https://mailman.mn-linux.org/mailman/listinfo/tclug-devel From mbresnah at visi.com Tue Jul 9 17:00:47 2002 From: mbresnah at visi.com (Mike Bresnahan) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] Hidding passwords in Java? In-Reply-To: <000b01c22769$c38444b0$2602a8c0@Miles> Message-ID: > To dig up a really old thread..... > > This is a definite hack, but workds. [...] Heh. That's a hack all right. Mike