comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* application Structure - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/27f54d1556bc79f5
* about resizeable problem in JFrame/JDialog!!! - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/57282d6bea924be0
* detecting browser encryption capabilities - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47ff264846ea48d4
* Quick question on StreamTokenizer - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/69165678d49ad670
* Beginner Advice Sought - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b96a0a430a102e22
* HTML tags in JTable - 4 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4682260f0cce6a3f
* Verify .java matches .class - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f0f3cde9fea4611c
* From 0 to "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2" in 1 month? - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b63d2ac9ab490fe
* struts & restarting Tomcat - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bee53f53da7265c
* DefaultTableModel - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/174bf6b71c2dc266
* what's a synchronized ArrayList good for? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/64d9087c9264b43e
* Can I implement INSERTs and DELETEs in DAOs or only in EntityBeans? - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/44068d680f903d5e
* StringReader vs. StringBufferInputStream - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8ba18c1d9929a1c
* DnD + Applet + Mozilla doesn't work on Linux - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/842ba5338caf41b8
* Java implementation of crypt() wanted! - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d4b7c65f13df2a
* java.lang.OutOfMemoryError - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/36b148a9072c44cb
* Tomcat 5 charset problem - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5d06008cd3f9833
  
==========================================================================
TOPIC: application Structure
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/27f54d1556bc79f5
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 1:35 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 10:21:15 +0200, news.skynet.be wrote:

> Hello.  I am a beginner at this Java stuff, so bear with me.

The best group for Java beginners is described here..
<http://www.physci.org/codes/javafaq.jsp#cljh>

> I have been writing an imaging application as a way of learning Java.  

You are in way over your head on this one,
I suggest you cut it back to a much smaller 
project and post code for that.  

In a cursory glance of your code, I observed
what appeared to be glaring errors, or at the 
very least, poorly written code, but I generally
compile code before I seriously examine it..

> I have got little bits working and tied them together in an application. 

Holy crap!  A 557 line code post and you call it 'little'?

> ..if someone could take a quick look and see if I have
> made any major blunders with my structure and where they would apply
> threads.  Thanks for taking the time to read.

Why read when you can compile!

> import java.awt.*;
...
(copy/paste over 500 lines to my editor)

> //**********************
> 
> There are two other objects too.

What!  You're kidding right?!  You have posted
over 500 lines of code for people to 'just peruse',
looking for your mistakes, and it is not even 
compileable?

In future, please keep code examples under 
200 lines and make them self-contained, ready
for others to compile.  Check here for tips 
on trimming code for public presentation..
<http://www.physci.org/codes/sscce.jsp>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: about resizeable problem in JFrame/JDialog!!!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/57282d6bea924be0
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 1:59 am
From: "James" <[EMAIL PROTECTED]> 

In JFrame/JDialog, at top left corner, that is one place show the
frame/dialog's icon, default is Java's cup. Then follow by Title of the
frame/dialog.
Now I set it to my icon.
ok, it show up correctly.
Then I want to set my JFrame/JDialog to resizeble to "false"
when I compile and run again
JFrame/JDialog's top left icon all gone, none of icon(include default java
cup icon)
show up at there. Only left JFrame/JDialog's title.
Is this bug? or what?

anyone of you had face this problem before?






==========================================================================
TOPIC: detecting browser encryption capabilities
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47ff264846ea48d4
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 2:05 am
From: "Linus Nikander" <[EMAIL PROTECTED]> 

Is there any way to, serverside, determine the encryption capabilities of 
the browser requesting a page ?

I need a way to determine if a particular client (browser) is capable of 
128-bit encryption. If he isn't then i need to inform him of the fact that 
128-bit encryption is a requirement to be able to continue. How should I go 
about this ?

//Linus Nikander





== 2 of 2 ==
Date:   Mon,   Sep 20 2004 2:29 am
From: "Brusque" <[EMAIL PROTECTED]> 


"Linus Nikander" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there any way to, serverside, determine the encryption capabilities of
> the browser requesting a page ?
>
> I need a way to determine if a particular client (browser) is capable of
> 128-bit encryption. If he isn't then i need to inform him of the fact that
> 128-bit encryption is a requirement to be able to continue. How should I
go
> about this ?
>
> //Linus Nikander
>
>

The Servlet 2.3 spec defines a request attribute
javax.servlet.request.key_size which should be present for all HTTPS
requests

Integer keySize = (Integer)
request.getAttribute("javax.servlet.request.key_size");

I seem to remember a problem with some Mozilla versions that reported a
keysize of 0. Probably not a problem any more but you can also check the
javax.servlet.request.cipher_suite attribute to be safe.







==========================================================================
TOPIC: Quick question on StreamTokenizer
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/69165678d49ad670
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 2:24 am
From: overbored <[EMAIL PROTECTED]> 

How do I prevent StreamTokenizer from returning any TT_NUMBER items? 
Basically all I want is to have a steady stream of plain TT_WORD items, 
even if they're all digits. I tried wordChars('0', '9') but to no avail. 
Thanks in advance.




==========================================================================
TOPIC: Beginner Advice Sought
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b96a0a430a102e22
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 2:43 am
From: TechBookReport <[EMAIL PROTECTED]> 

jbeck wrote:
> Looking for recommendations as to the top two or three books to use to begin 
> learning Java.
> 
> Also, recommendations for compilers? 
> 
> 
For books take a look at:

Objects First With BlueJ
Head First Java
Deitel and Deitel

If you are already familiar with C++ or other object oriented language 
then take a look at Bruce Eckel's Thinking In Java.

All of these are reviewed here at TechBookReport -- 
http://www.techbookreport.com/JavaIndex.html

And don't forget Sun's online tutorial - which is easily downloaded.

Pan




==========================================================================
TOPIC: HTML tags in JTable
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4682260f0cce6a3f
==========================================================================

== 1 of 4 ==
Date:   Mon,   Sep 20 2004 2:53 am
From: ivang <[EMAIL PROTECTED]> 

Hi, I am having difficulty displaying html formatted text (or simple web 
  page source) in a JTable...a row with such a source is empty while 
other rows have the appropriate values. If I add '@' at the beginning of 
HTML for instance - then there is no problem seeing the value in JTable.



== 2 of 4 ==
Date:   Mon,   Sep 20 2004 4:06 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 12:53:54 +0300, ivang wrote:

> Hi, I am having difficulty displaying html formatted text 

I have difficulty seeing the HTML formatted text
in the sample code you did not supply as well ivang..
<http://www.physci.org/codes/sscce.jsp>

It must be something going around, my 
telepathy is all clogged up.   :-(

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 4 ==
Date:   Mon,   Sep 20 2004 5:41 am
From: ivang <[EMAIL PROTECTED]> 

Andrew Thompson wrote:
> On Mon, 20 Sep 2004 12:53:54 +0300, ivang wrote:
> 
> 
>>Hi, I am having difficulty displaying html formatted text 
> 
> 
> I have difficulty seeing the HTML formatted text
> in the sample code you did not supply as well ivang..
> <http://www.physci.org/codes/sscce.jsp>
> 
> It must be something going around, my 
> telepathy is all clogged up.   :-(
> 

Andrew Thompson wrote:
 > On Mon, 20 Sep 2004 12:53:54 +0300, ivang wrote:
 >
 >
 >>Hi, I am having difficulty displaying html formatted text
 >
 >
 > I have difficulty seeing the HTML formatted text
 > in the sample code you did not supply as well ivang..
 > <http://www.physci.org/codes/sscce.jsp>
 >
 > It must be something going around, my
 > telepathy is all clogged up.   :-(
 >

my apologies!

the code is pretty straight forward:


public class MyDialog extends JDIalog {


private JTable tbl;
private MyTableModel tblModel;

***


tblModel = new MyTableModel();          
tbl = new JTable(tblModel);      
tbl.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

***


private class MyTableModel extends AbstractTableModel {

         private List items;

         public ApplicationTemplatesTableModel() {
             items = new ArrayList();
        
            // test objects
            Item i1 = new Item("name1", "value1");
            Item i2 = new Item("name2", "<html>value1</html>");
            items.add(i1);
            items.add(i2);      
         }

         /* (non-Javadoc)
          * @see javax.swing.table.TableModel#getColumnCount()
          */
         public int getColumnCount() {
             return 2;
         }

         /* (non-Javadoc)
          * @see javax.swing.table.TableModel#getRowCount()
          */
         public int getRowCount() {
                if(items == null) {
                        return 0;
                }
             return items.size();
         }

         /* (non-Javadoc)
          * @see javax.swing.table.TableModel#getValueAt(int, int)
          */
         public Object getValueAt(int rowIndex, int columnIndex) {
             Items item = (Item)aitems.get(rowIndex);
             switch(columnIndex) {
                case (0) : {
                    return item.getName();
                }
                case (1) : {
                    return item.getValue();
                }               
             }
             return null;
         }

         /* (non-Javadoc)
         * @see javax.swing.table.TableModel#getColumnName(int)
        */
                public String getColumnName(int col) {
                        switch(col) {
                                case 0: {
                                        return "name";                                 
                         }
                                case 1: {
                                        return "value";
                                }                                                      
         
                        }
                        return null;
                }
                
     }

}



so if in the test object i2 i put value not '<html>value1</html>' but 
'@<html>value1</html>' then this string is displayed in the table. 
otherwise the column 'value' for this row is empty.



== 4 of 4 ==
Date:   Mon,   Sep 20 2004 5:52 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 15:41:14 +0300, ivang wrote:
> Andrew Thompson wrote:
>> On Mon, 20 Sep 2004 12:53:54 +0300, ivang wrote:
>> 
>>>Hi, I am having difficulty displaying html formatted text 
..
>> <http://www.physci.org/codes/sscce.jsp>
..
> the code is pretty straight forward:

The URL is pretty straight forward as well ivang,
please try *reading* it before you next post code.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Verify .java matches .class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f0f3cde9fea4611c
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 2:58 am
From: [EMAIL PROTECTED] (David Davidson) 

I have to maintain some java code that I have inherited, problem is I
can't be sure that I have the correct version of source that matches
the class files that have been deployed on a production server.

Are there any tools, or techniques that can be used to verify that the
.class file that I can compile from my .java is the same as the .class
file that is deployed on the server?

Thanks

David



== 2 of 2 ==
Date:   Mon,   Sep 20 2004 3:25 am
From: Joona I Palaste <[EMAIL PROTECTED]> 

David Davidson <[EMAIL PROTECTED]> scribbled the following:
> I have to maintain some java code that I have inherited, problem is I
> can't be sure that I have the correct version of source that matches
> the class files that have been deployed on a production server.

> Are there any tools, or techniques that can be used to verify that the
> .class file that I can compile from my .java is the same as the .class
> file that is deployed on the server?

Compile your .java file and see if the produced .class file is the same
as the one on your server.

-- 
/-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"It sure is cool having money and chicks."
   - Beavis and Butt-head




==========================================================================
TOPIC: From 0 to "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2" in 1 month?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b63d2ac9ab490fe
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 3:26 am
From: [EMAIL PROTECTED] (Yakov) 

Yes, this is possible. The other question is why would you need it? I
doubt that you'll be able to pass a Java job interview in a month
unless it's a very junior position.

This sertification will just prove that you know the syntax of the
language, but how about some real experience?

Regards,
Yakov




==========================================================================
TOPIC: struts & restarting Tomcat
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bee53f53da7265c
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 3:31 am
From: "Sebastian Millies" <[EMAIL PROTECTED]> 

It's marginally more convenient. For me, the big pain point is having
to restart the application at all when only struts-config.xml changes.
There must be some good reason why a Struts-based app can't
reconfigure itself, but I haven't found it documented.

-- Sebastian

"William Brogden" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> On Sat, 18 Sep 2004 16:40:23 GMT, Mike <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > I'm developing a struts application and the only way I've found for a
> > change in the action class to be recognized is to restart Tomcat.
> >
> > Is there an easier way?
> >
>
> Using the Management Application to restart the application
> is pretty convenient. Documentation was installed with your
> copy of Tomcat.
>
> Bill
>
>
>
> -- 
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/






==========================================================================
TOPIC: DefaultTableModel
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/174bf6b71c2dc266
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 3:33 am
From: [EMAIL PROTECTED] (Cyril Dex) 

Hi all

I have a JTable which uses a customised DefaultTableModel called
TableModel. TableModel extends DefaultTableModel.

Now the ResultViewer.java class that I have is supposed to display the
names of files and their properties in 3 columns. The ResultViewer is
supposed to update after every 20 secs. The problem is that when an
update occurs, an ArrayIndexOutOfBoundsException occurs. I think that
the array references a null pointer in the vector when its updating.
The update occurs by 1st clearing the existing table then updating it.
I think when the update occrus here it references null. Its more of a
logical error.

public void clearTable () {
    for (int row = (table.getRowCount() -1) ; row >= 0; row--) {
        ((DefaultTableModel) table.getModel()).removeRow(row);       
      } 
  }

I've already tried the fireTableRowsUpdated method and it doesn't seem
to work.

Thanks in advance.

Cheers!



== 2 of 2 ==
Date:   Mon,   Sep 20 2004 4:04 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 20 Sep 2004 03:33:32 -0700, Cyril Dex wrote:

> Hi all

Hi Cyril!

> I have a JTable 

Good for you..  Do you have an example of this broken code?
<http://www.physci.org/codes/sscce.jsp>

> ...The problem is that when an
> update occurs, an ArrayIndexOutOfBoundsException occurs. I think that
> the array references a null pointer in the vector when its updating.

Stop guessing and find out.

<http://www.physci.org/codes/javafaq.jsp#exact>
Check especially the links to Exception explanations.

<http://www.physci.org/codes/javafaq.jsp#stacktrace>

> I think when the update occrus here it references null. 

That should throw a NullPointerException, look these errors 
up in the JavaDocs, and the links at the Java Glossary.

>..Its more of a logical error.

..hmmm.

> public void clearTable () {
>     for (int row = (table.getRowCount() -1) ; row >= 0; row--) {
>         ((DefaultTableModel) table.getModel()).removeRow(row);       
>       } 
>   }

Yes, that tells me you have some lines of Java in your
files, now what does the stack trace say, does it refer
to one of those lines?  Which one?

> Thanks in advance.

And in future, it might pay to ask an actual question Cyril.

Your level of experience at Java and posting 
suggests to me you might get better value from
a group further described here..
<http://www.physci.org/codes/javafaq.jsp#cljh>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: what's a synchronized ArrayList good for?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/64d9087c9264b43e
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 3:47 am
From: Sebastian Kerekes <[EMAIL PROTECTED]> 

Hi,

ArrayList is not synchronized. But there's a way the get a synchronized 
one as mentioned in java.util.ArrayList's JavaDoc:

List list = Collections.synchronizedList(new ArrayList(...));

In java.util.Collections' JavaDoc you can read that "It is imperative 
that the user manually synchronize on the returned list when iterating 
over it:"

synchronized(list) {
   Iterator i = list.iterator(); // Must be in synchronized block
   while (i.hasNext())
     foo(i.next());
}

Using a synchronized ArrayList results in additional work, why not use a 
java.util.Vector instead? Is there an advantage in using this approach?

Greetings,

Sebastian




==========================================================================
TOPIC: Can I implement INSERTs and DELETEs in DAOs or only in EntityBeans?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/44068d680f903d5e
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 3:59 am
From: John Fereira <[EMAIL PROTECTED]> 

[EMAIL PROTECTED] (Tobias Merler) wrote in
news:[EMAIL PROTECTED]: 

> Ok, when I access SQL databases I could use DAOs and EntityBeans in
> general. 
> 
> SELECT queries can be implemented in DAOs as well as in EntityBeans.
> But what about INSERTs, DELETEs and UPDATEs ?
> From what I have heard so far these non-select statement MUST be
> implemented by EntityBeans. Is this true?
>
Generally DAO's are an interface and you provide an implementation for them.   
If you don't have method signatures defined in the interface for non-select 
operation you don't need to provide an implementation.  Take a look at the 
JPetstore example in the SpringFramework to see a good example of how DAO's, 
DTOs, an object relational system (iBatis) and dependency injection all work 
together.




==========================================================================
TOPIC: StringReader vs. StringBufferInputStream
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8ba18c1d9929a1c
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 4:18 am
From: John English <[EMAIL PROTECTED]> 

I want to use a method that takes an InputStream parameter and supply
it with data that's stored in a String. I can easily do this using a
StringBufferInputStream, but the compiler moans at me that this class
is deprecated and the API spec says I should use StringReader instead.

However, I can't find any way of turning a StringReader into an
InputStream so that I can use it as a parameter for the method I
need to use. I'm still using the deprecated StringBufferInputStream
since I can't find any other way to do it.

Surely there must be a way to do this using a StringReader, or what's
the point of deprecating StringBufferInputStream? Aaargh!

Any help much appreciated,

-----------------------------------------------------------------
  John English              | mailto:[EMAIL PROTECTED]
  Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
  School of Computing & MIS | ** NON-PROFIT CD FOR CS STUDENTS **
  University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------



== 2 of 2 ==
Date:   Mon,   Sep 20 2004 4:43 am
From: Gordon Beaton <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 12:18:58 +0100, John English wrote:
> I want to use a method that takes an InputStream parameter and supply
> it with data that's stored in a String. I can easily do this using a
> StringBufferInputStream, but the compiler moans at me that this class
> is deprecated and the API spec says I should use StringReader instead.
> 
> However, I can't find any way of turning a StringReader into an
> InputStream so that I can use it as a parameter for the method I
> need to use. I'm still using the deprecated StringBufferInputStream
> since I can't find any other way to do it.

  byte[] byteArray = myString.getBytes("ISO-8859-1"); // choose a charset
  ByteArrayInputStream baos = new ByteArrayInputStream(byteArray);

/gordon

-- 
[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e




==========================================================================
TOPIC: DnD + Applet + Mozilla doesn't work on Linux
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/842ba5338caf41b8
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 4:40 am
From: [EMAIL PROTECTED] (Tomer) 

I have a Java Applet which use DnD.
When i run it in Internet Explorer or Mozilla on a windows machine it
runs fine....
But when i try it in Mozilla on a linux machine, the DnD refuse to
work, throwing the following exception, only the second time:
"InvalidDnDOperationException: Drag and Drop in progress" (once again,
the same code works perfectly in windows).

system info:
OS: RedHat LInux ver. 9.0
WM: Gnome 2.2.0
Mozilla: 1.7.2
java version 1.4.1 blackdown-linux

thanks for all the repliers.



== 2 of 2 ==
Date:   Mon,   Sep 20 2004 4:45 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 20 Sep 2004 04:40:28 -0700, Tomer wrote:

> I have a Java Applet...

URL?

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Java implementation of crypt() wanted!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d4b7c65f13df2a
==========================================================================

== 1 of 3 ==
Date:   Mon,   Sep 20 2004 4:48 am
From: "Zsolt" <[EMAIL PROTECTED]> 

Hi,

I need the java implementation of the Unix crypt function. Can somebody help
me?

Zsolt





== 2 of 3 ==
Date:   Mon,   Sep 20 2004 4:58 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 13:48:14 +0200, Zsolt wrote:

> I need the java implementation of the Unix crypt function. 

Do you mean this?
<http://www.opengroup.org/onlinepubs/007908799/xsh/crypt.html>

>..Can somebody help me?

I dunno.  Can you help yourself?  Do you Google?

Ten minutes ago I had not heard of crypt, but I figure 
some of these 8,130 hits might assist your solution..
<http://google.com/search?q=unix+crypt+java+%22source+code%22>

HTH

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 3 ==
Date:   Mon,   Sep 20 2004 5:44 am
From: Jonck <[EMAIL PROTECTED]> 

In <[EMAIL PROTECTED]> Zsolt wrote:
> Hi,
> 
> I need the java implementation of the Unix crypt function. Can 
> somebody help me?
>
> Zsolt
> 

Not sure precisely what you want, but perhaps this method will help you 
along:

public static String hash(String user, String password) {
        // Make dictionary attacks less likely to succeed by adding the 
userName and a character (:) not allowed in the password
        String plainText = user + ":" + password;

        MessageDigest md = null;
        try {
            md = MessageDigest.getInstance("SHA-256");
            md.update(plainText.getBytes("UTF-8"));
            byte raw[] = md.digest();
            String hash = (new BASE64Encoder()).encode(raw);
            return hash;
}         } catch(NoSuchAlgorithmException e) {
            System.out.println(e.getMessage());
            return null;
}         } catch(UnsupportedEncodingException e) {
            System.out.println(e.getMessage());
            return null;
}        }
}    }




==========================================================================
TOPIC: java.lang.OutOfMemoryError
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/36b148a9072c44cb
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 5:10 am
From: "mamin" <[EMAIL PROTECTED]> 

Help!!!
I create two threads.
wysylka w1 = new wysylka();
new Thread(w1).start();

wysylka w2 = new wysylka();
new Thread(w2).start();

In every one I'm executing a query to database.As a result of that query a
have 700000 rows in ResultSet. While executing a query the
java.lang.OutOfMemoryError
appears.Anyone have idea what to do with it?





== 2 of 2 ==
Date:   Mon,   Sep 20 2004 5:48 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Mon, 20 Sep 2004 14:10:11 +0200, mamin wrote:

> Help!!!

Two people have offered Help!!! on the best group already..
<http://www.physci.org/codes/javafaq.jsp#xpost>

Please do not multi-post mamin.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Tomcat 5 charset problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5d06008cd3f9833
==========================================================================

== 1 of 1 ==
Date:   Mon,   Sep 20 2004 5:30 am
From: [EMAIL PROTECTED] (Leonidas) 

Hi, we are running Tomcat 5 with IBM DB2 v 8.1 and have a web site
running only for developing purposes.
Internet explorer and Netscape are showing all of the pages that are
passing from tomcat and have Greek with wildcards quetionmarks etc.
When data is received from the database it is being displayed
correctly (Only static data is not displayed normally). Well the setup
is allright (web.xml, in every file of the site). The encoding is
Greek allright but something is happening with HTML.
Can anyone help me because this situation has been very annoying at
least!

Thanks,



=======================================================================

You received this message because you are subscribed to the
Google Groups "comp.lang.java.programmer".  

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to