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

Today's topics:

* Generics: how to avoid overloaded methods? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/11b478096ef7c41f
* [REPOST] java.awt.Image problem - 4 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f984034b7d7f294
* Finding Date Difference - 5 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
* New String - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/480ebe0f50a46c11
* JOption Pane/ How to check string - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b94c7b6218a6dd3
* bugs in client\server program - can't connect to remote server - 2 messages, 
2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94faae88c5ac7f6f
* Searching for (and remove) unreferenced methods - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6cf6cff59129ad70
* JSP and dynamic XML: Isn't there a better way :-( - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/807e8c6435d45801
* Maximum size of MappedByteBuffer in Java 5.0 64 bit - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ee93ad14e4aa12c
* Runtime.getRuntime().exec() doesn't return (?) - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97faf78b55ba4d7f
* opinion on coding standard - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
* Java and xmlrpc? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4304527fb69e181
* Running programs in (networked) DOS window - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f76fd24178be761c

==============================================================================
TOPIC: Generics: how to avoid overloaded methods?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/11b478096ef7c41f
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 6:54 am
From: Michael Borgwardt 
 

I'm currently using generics quite intensively and have run into a problem with
the following configuration:

class DataBase{}
class DataSub extends DataBase{}

class ControllerBase<D extends DataBase>{
        void method(D d);
}

class ControllerSub<D extends DataSub> extends ControllerBase<D>{
        void method(D d);
}

My Problem is I think that, due to type erasure, method() in ControllerSub
does not override method() in ControllerBase, it overloads it, i.e.:

class ControllerBase{
        void method(DataBase d);
}

class ControllerSub extends ControllerBase{
        void method(DataSub d);
}

The result is that client classes that know only about ControllerBase end up
calling method(DataBase) even when doing it with an instance of DataSub
through an instance of ControllerSub.

Any idea how to avoid this and still keep the type safety Generics provide as
much as possible?




==============================================================================
TOPIC: [REPOST] java.awt.Image problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f984034b7d7f294
==============================================================================

== 1 of 4 ==
Date: Thurs, Dec 2 2004 7:23 am
From: "MaSTeR"  


"Andrew Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 2 Dec 2004 12:17:10 -0000, MaSTeR wrote:
>
> > Have a look if you want:
> > http://217.158.134.37/MobileJava/ticker.jar
>
> I suggest you prepare an SSCCE[1] rather than point people
> toward a 467 Kb Jar with no source.
>
It is not feasible to make an SSCCE, it is a big amount of code and besides
I am building it on top of those two libraries.

>
> As an aside, I am not prepared to run a .jar that comes from
> 'some dude on usenet', but I should warn you that the 387Kb
> JClients.jar will not be read correctly from within another
> .jar file.  Are you extracting it to disk first?

I replied to my post with two other links to Jclient and JAPI, that's all
you need. What I should have them is remove them from Ticker.jar because
they're unuseful there. I did it now.


> [ FWIW, thank you for not repeating the posting mistake you made
> on your first crack at this problem. ]

[FWIW You're welcome.]





== 2 of 4 ==
Date: Thurs, Dec 2 2004 4:17 am
From: "MaSTeR"  

Have a look if you want:
http://217.158.134.37/MobileJava/ticker.jar





== 3 of 4 ==
Date: Thurs, Dec 2 2004 4:30 am
From: Andrew Thompson  

On Thu, 2 Dec 2004 12:17:10 -0000, MaSTeR wrote:

> Have a look if you want:
> http://217.158.134.37/MobileJava/ticker.jar

I suggest you prepare an SSCCE[1] rather than point people 
toward a 467 Kb Jar with no source.

[1] <http://www.physci.org/codes/sscce.jsp>

As an aside, I am not prepared to run a .jar that comes from
'some dude on usenet', but I should warn you that the 387Kb 
JClients.jar will not be read correctly from within another 
.jar file.  Are you extracting it to disk first?

[ FWIW, thank you for not repeating the posting mistake you made 
on your first crack at this problem. ]

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



== 4 of 4 ==
Date: Thurs, Dec 2 2004 4:19 am
From: "MaSTeR"  

"MaSTeR" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Have a look if you want:
> http://217.158.134.37/MobileJava/ticker.jar
>
>

Oh you need also:

http://217.158.134.37/MobileJava/JAPI.jar

http://217.158.134.37/MobileJava/JClients.jar






==============================================================================
TOPIC: Finding Date Difference
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
==============================================================================

== 1 of 5 ==
Date: Thurs, Dec 2 2004 8:21 am
From: "Mick"  

There must be an 'easy' way to find the difference between 2 dates

ie.

thisDate_1 = new java.util.Date(strStartDate);
thisDate_2 = new java.util.Date(strEndDate);

thisDateDiff = thisDate_2 - thisDate_1 ????



-- 
Mick





== 2 of 5 ==
Date: Thurs, Dec 2 2004 11:23 am
From: Andrew Thompson  

On Thu, 02 Dec 2004 18:31:26 GMT, Mick wrote:

Please refrain form top-posting Mick, I find it nost confusing..
<http://www.physci.org/codes/javafaq.jsp#netiquette>

> Why does this not compile??
> 
> Calendar thisCal_1 = Calendar.getInstance();
> thisDate_1 = new java.util.Date(strStartDate);
> thisCal_1.setTime(thisDate_1);

That would depend on the compilation errors, which are a lot more
specific than 'not compile' amd actually reference line numbers.
<http://www.physci.org/codes/javafaq.jsp#exact>

Check especially the links to 'compile time' error messages at
the end of that section.

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 5 ==
Date: Thurs, Dec 2 2004 11:31 am
From: Thomas Fritsch  

Mick wrote:

> Thanks...but
> 
> Why does this not compile??
> 
> Calendar thisCal_1 = Calendar.getInstance();
> thisDate_1 = new java.util.Date(strStartDate);
thisDate_1 is assigned a Date object ...
> thisCal_1.setTime(thisDate_1);
... but setTime(...) expects a long.
I could set a link to the javadoc of Date#setTime here, but I don't ;-)
> 
> Mick

Thomas
-- 
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')




== 4 of 5 ==
Date: Thurs, Dec 2 2004 8:32 am
From: Thomas Fritsch  

Mick wrote:
> There must be an 'easy' way to find the difference between 2 dates
> 
> ie.
> 
> thisDate_1 = new java.util.Date(strStartDate);
> thisDate_2 = new java.util.Date(strEndDate);
> 
> thisDateDiff = thisDate_2 - thisDate_1 ????
> 
long thisDateDiff = thisDate_2.getTime() - thisDate_1.getTime();
...as always javadoc is your friend: 
<http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#getTime()>

-- 
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')




== 5 of 5 ==
Date: Thurs, Dec 2 2004 10:31 am
From: "Mick"  

Thanks...but

Why does this not compile??

Calendar thisCal_1 = Calendar.getInstance();
thisDate_1 = new java.util.Date(strStartDate);
thisCal_1.setTime(thisDate_1);

Mick

"Thomas Fritsch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Mick wrote:
> > There must be an 'easy' way to find the difference between 2 dates
> >
> > ie.
> >
> > thisDate_1 = new java.util.Date(strStartDate);
> > thisDate_2 = new java.util.Date(strEndDate);
> >
> > thisDateDiff = thisDate_2 - thisDate_1 ????
> >
> long thisDateDiff = thisDate_2.getTime() - thisDate_1.getTime();
> ...as always javadoc is your friend:
> <http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#getTime()>
>
> -- 
> "Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')
>






==============================================================================
TOPIC: New String
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/480ebe0f50a46c11
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 7:36 am
From: Daniel Sjöblom  

Michael Borgwardt wrote:
> Daniel Sjöblom wrote:
> 
>> Is there ever a reason to create a new String by using the 
>> java.lang.String(String) constructor on a String literal? It seems 
>> like a totally useless thing to do.
> 
> 
> On a literal, I agree. The only purpose it serves is in examples that
> show why you shouldn't compare Strings with ==

Thanks for reminding me. Not only is it useless, but it can also not be 
safely removed, in case there is some insane code that relies on the 
fact that new String("string") != "string".

-- 
Daniel Sjöblom
Remove _NOSPAM to reply by mail




==============================================================================
TOPIC: JOption Pane/ How to check string
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b94c7b6218a6dd3
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 11:18 am
From: "Miller_Man"  

I just want to thank all who posted a reply.
I figured I might get laughed at because I knew it was 
a simple question.  You all were very polite and informative.
Thanks so much. 




== 2 of 2 ==
Date: Thurs, Dec 2 2004 7:54 am
From: [EMAIL PROTECTED] (Brock Heinz) 

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Thu, 02 Dec 2004 04:06:39 -0500, Miller_Man wrote:
> 
> > I am new to Java 
> 
> c.l.j.help is thisaway..
> <http://www.physci.org/codes/javafaq.jsp#cljh>
> 
> >..and my teacher wants us to use the JOptionPane to input
> > data.  It appears to only return a string.  
> 
> You can provide JOptionPane any arbitrary Object
> <http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JOptionPane.html#showMessageDialog(java.awt.Component,%20java.lang.Object)>
> 
> "You can supply a JPanel with JTextField, JTextArea, JComboBox 
> etcetera and simply query the state of the fields when the JOP returns.
> 
> >..When I try to check in if
> > statement I get errors.  I figured out how to change a (string)number to
> > an integer with parseInt but I can't convert string to a char to check in
> > if statement.
> > ie: if (answer == 'Y') gives me error string/ char mismatch
> 
> 'Y' is the way to represent a char, to represent a String, use..
> "Y".  However, the way that you are comparing strings need fixing as well.
> 
> When comparing Strings, always use..
> 
> if ( answer.equals("Y") ) {
>  ....

This is a bit 'nit picky', but I'd actually advise checking to see if
'Y' equals 'answer'.  Doing this:

if ("Y".equals(answer)) {
.....

protects you from a null pointer exception.

Brock



> HTH




==============================================================================
TOPIC: bugs in client\server program - can't connect to remote server
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94faae88c5ac7f6f
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 9:40 am
From: [EMAIL PROTECTED] (Siddharth Jain) 

hello!

I have a client/server program in which client lets user input two
numbers and the server adds the numbers and returns the sum to client.

the problems I am having are:

1. client is not able to connect to remote server. it is only
connecting to local host.

2. if a string seperated by "non-numeric" characters (e.g. 34a2dd) is
sent, both client and server throw an uncaught exception. i need to
fix the client or server or both and give useful feedback to the user.
i need to do the error checking of user i/p so that user enters only
integers seperated by whitespace.

I am attaching my code.
I am new to java and probably don't know much.
'shall greatly appreciate your help.

thanks in advance,
sanjul

    code:


// usage: java TCPAdditionServer3 <port number>
// default port is 7777
// connection to be closed by client
// this server handles only one connection
 
import java.io.*;
import java.net.*;
import java.lang.*;
import java.util.*;
 
class TCPAdditionServer3{
    public static void main(String[] args)throws Exception{
        String clientSentence,capitalizedSentence;
        int sum=0;
        String sumString = "";
        InetAddress serverAddress;
        int portNumber = 7777;
        Socket connectionSocket = null;
                
        try {
                portNumber = Integer.parseInt(args[0]);
                }
        catch (Exception e) {
                System.out.println(" port = 7777 (default)");
                portNumber = 7777;      
    }     
        
    // create welcoming socket at port number specified by user or
7777 if no choice is specified by user
        ServerSocket welcomeSocket=new ServerSocket(portNumber);
        
        //server infinite loop  
        while(true){
                try {
                        // wait, on welcoming socket for contact by client 
                        connectionSocket=welcomeSocket.accept();
                     } catch (IOException e) {
               System.out.println("Accept failed:");
               System.exit(-1);     
         }
                
        // create input stream, attached to socket 
            BufferedReader inFromClient=new BufferedReader(new
InputStreamReader(connectionSocket.getInputStream()));
            // create output stream, attached to socket
            DataOutputStream outToClient=new
DataOutputStream(connectionSocket.getOutputStream());
            
            // read in line from socket
            clientSentence=inFromClient.readLine();
                
            StringTokenizer st= new StringTokenizer(clientSentence);
            while(st.hasMoreTokens()) {
                  sum += Integer.parseInt(st.nextToken());  
                    }
           
           System.out.println("Waiting for connections on port " + 
connectionSocket.getLocalPort() + " ... ");
           System.out.println("Received connection from " +
connectionSocket.getInetAddress() + ":" +
connectionSocket.getLocalPort());
                          
        sumString = Integer.toString(sum);
        clientSentence = " ";
        capitalizedSentence = clientSentence  + sumString + "\n";
        
        //write out line to socket
        outToClient.writeBytes(capitalizedSentence);
    
        //connection closed by client
        try {
              connectionSocket.close();
              System.out.println("Connection closed by client");
        }
        catch (IOException e) {
              System.out.println(e);
        }
           
}
}
 
}
 



    code:


 
 // usage: java TCPAdditionClient3 <server> <port>
// default port is 7777 
 
/**
 * TCPAdditionClient1.java
 *
 *  @author Siddharth Jain 
  * @version 3.0
 */
 
/** Client Code */
 

import java.io.*;
import java.net.*;
  
/** this is the main class */
class TCPAdditionClient3{
    public static void main(String[] args)throws Exception{
        
        String sentence,sentc,portNumberString;
        int portNumber= 7777;
        String hostName = "localhost";
        String modifiedSentence;
        InetAddress clientAddress;
        /** create input stream */
        BufferedReader inFromUser1=new BufferedReader(new
InputStreamReader(System.in));
        
        /** read arguments */
        if(args.length == 2) {
          hostName = args[0];
             try {
                     portNumber = Integer.parseInt(args[1]);
                     System.out.println("client user i/p port number " +
portNumber);
             }  
             catch (Exception e) {
                 System.out.println(" server port = 7777 (default)");
                 portNumber = 7777;
                     }
         }  
        
         /** connect to server */
        try{ 
           /** create client socket, connect to server */
                Socket clientSocket=new Socket(hostName,portNumber);
        
         if (clientSocket.isConnected()== true);
         {
             System.out.println("Connecting to Server " +
clientSocket.getInetAddress() + ":" + clientSocket.getPort() + "..." +
"Connected");
          }
        
        /** create output stream attached to socket */       
    DataOutputStream outToServer=new
DataOutputStream(clientSocket.getOutputStream());
        /** create input stream attached to socket */
    BufferedReader inFromServer=new BufferedReader(new
InputStreamReader(clientSocket.getInputStream()));
                
        System.out.println();
        System.out.println("Enter a string of integers seperated by
non-numeric characters:");
        
        sentence = inFromUser1.readLine();
        /**send line to server */
        outToServer.writeBytes(sentence+"\n");
        /** read line from server */
        modifiedSentence=inFromServer.readLine();
        System.out.println("From Server-----> The Sum is:"+modifiedSentence);
                 
        try {
        clientSocket.close();
    }
    catch(IOException e) {
          System.out.println(e);   
    } 
        
        } catch(UnknownHostException e) {
            System.err.println(" Don't know about host: ");
            System.exit(1);
    } catch(IOException e) {
            System.err.println(" Couldn't get I/O for the connection");
            System.exit(1);
    } 
        
    }
}



== 2 of 2 ==
Date: Thurs, Dec 2 2004 11:16 am
From: Thomas Fritsch  

Siddharth Jain wrote:
> hello!
Hello!

> 
> I have a client/server program in which client lets user input two
> numbers and the server adds the numbers and returns the sum to client.
> 
> the problems I am having are:
> 
> 1. client is not able to connect to remote server. it is only
> connecting to local host.
> 
> 2. if a string seperated by "non-numeric" characters (e.g. 34a2dd) is
> sent, both client and server throw an uncaught exception. i need to
> fix the client or server or both and give useful feedback to the user.
> i need to do the error checking of user i/p so that user enters only
> integers seperated by whitespace.
> 
> I am attaching my code.
> I am new to java and probably don't know much.
As you have said this: the group comp.lang.java.help is especially 
well-suited for java beginners.

> 'shall greatly appreciate your help.
> 
> thanks in advance,
> sanjul
> 
Without having the complete exception information, we can hardly find 
out where and why the error occurs. To get this information you should add
        e.printStackTrace();
to the catch-clauses of your code.
After that you will get an exception stack trace with a rich amount of 
information.
Some hints how to proceed:
(1)  Read the javadoc of the exception class and of the
      method(s) reported on the very top of the stack trace.
(2)  Analyze the method of *your* code reported most near
      to the top of the stack trace.
      (source file-names and line-numbers are reported, too)
(3)  Understand and fix the bug.
      This is the most difficult part, of course ;-)
If you still don't find a solution, post your complete stack trace here, 
and mark the line of your code where the exception occured.

>     code:
> 
<code snipped>

Regards
        Thomas
-- 
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')





==============================================================================
TOPIC: Searching for (and remove) unreferenced methods
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6cf6cff59129ad70
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 10:49 am
From: "Rogue Chameleon"  

Hi all

FYI: We are using WSAD 5.0 as our IDE.

Is there a simple (perhaps automated) way to find all methods in a
project that are not referenced by any other methods/classes?  I'm sure
that there are some in our project, but short of checking each method
individually, I don't know how to get at them.

rogue chameleon




== 2 of 2 ==
Date: Thurs, Dec 2 2004 11:07 am
From: "Heiner Kücker"  

Rogue Chameleon wrote
> FYI: We are using WSAD 5.0 as our IDE.
>
> Is there a simple (perhaps automated) way to find all methods in a
> project that are not referenced by any other methods/classes?  I'm sure
> that there are some in our project, but short of checking each method
> individually, I don't know how to get at them.
>
> rogue chameleon
>

In Menu Window -> Preferences -> Java -> Compiler -> Problems
is possible to set:
unused private types, methods or fields:
    Warning

This works only for private methods, but for other scopes.

It's possible to using public methods per reflection.
This is the reason for no checking this methods.

Heiner Kuecker
Internet: http://www.heinerkuecker.de  http://www.heiner-kuecker.de
JSP WorkFlow PageFlow Page Flow FlowControl Navigation: 
http://www.control-and-command.de
Expression Language Parser: http://www.heinerkuecker.de/Expression.html






==============================================================================
TOPIC: JSP and dynamic XML: Isn't there a better way :-(
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/807e8c6435d45801
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 6:02 am
From: Collin VanDyck  

milkyway wrote:
> Hello,
> 
> I am considering the following in order to accomplish my task. An
> application has to be created that runs from a regular computer as well
> as from a WAP-enabled device.
> 
> When the user is presented with information to enter on a screen and
> then presses the "Continue" button, it would then call a .jsp.
> 
> The .jsp would create a .xml on the fly that would be passed to an XSLT
> converter to convert to something that can be seen from WAP or from a
> regular web browser.
> 
> The thing is, to create the .XML file "on the fly", one would have to
> use the out.print statements to create something like this. To me, it
> seems as though this is very painful :-(
> Is there a better way to do this?
> 
> Kindest Regards.
> 


I think that you'll probably have better success doing this with a 
servlet.  I'm not that familiar with JSPs, but I've experienced this 
pain using XSPs (The Cocoon equivalent of the JSPs) and have found that 
simply using a servlet, and setting the mime type to text/xml is the 
better solution.




== 2 of 2 ==
Date: Thurs, Dec 2 2004 5:11 am
From: "milkyway"  

Hello,

I am considering the following in order to accomplish my task. An
application has to be created that runs from a regular computer as well
as from a WAP-enabled device.

When the user is presented with information to enter on a screen and
then presses the "Continue" button, it would then call a .jsp.

The .jsp would create a .xml on the fly that would be passed to an XSLT
converter to convert to something that can be seen from WAP or from a
regular web browser.

The thing is, to create the .XML file "on the fly", one would have to
use the out.print statements to create something like this. To me, it
seems as though this is very painful :-(
Is there a better way to do this?

Kindest Regards.





==============================================================================
TOPIC: Maximum size of MappedByteBuffer in Java 5.0 64 bit
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6ee93ad14e4aa12c
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 5:23 am
From: "xarax"  

"Boudewijn Dijkstra" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "The POWER of 2WO" <[EMAIL PROTECTED]> schreef in bericht
> news:[EMAIL PROTECTED]
>
> > If Java 5.0 can allocate only 2G ByteBuffers, can it allocate a pool
> > of ByteBuffers, whose sum is 512G ?
>
> Probably.  But note that a ByteBuffer may be larger than 2G, but the standard
> ones are implemented as a single array.  Arrays are limited to 31-bit indices.

You can use scattering and gathering buffers to
exceed the 2GB limit.






==============================================================================
TOPIC: Runtime.getRuntime().exec() doesn't return (?)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97faf78b55ba4d7f
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 5:20 am
From: "John C. Bollinger"  

Timo Nentwig wrote:

> John C. Bollinger wrote:
> 
> 
>>I'd bet that the for loop is blocking in BufferedReader.readLine(),
>>presumably because the external process never terminates.  Things to try:

>>(1) proc.getOutputStrteam().close();

> 
> 
> When?

As soon as you're done writing to it, which may be immediately after 
starting the process.  If you do need to write to it then you probably 
ought to do it in a separate thread from the ones in which you read the 
process' two other streams.  Processes that read their standard input 
often will not terminate while that stream is open.


John Bollinger
[EMAIL PROTECTED]




==============================================================================
TOPIC: opinion on coding standard
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 11:11 am
From: "Ann"  



> > much harder to read.  I'm wondering what opinions others might have.
> >
> <snip>
>
> Good example of good use of spaces. I think it is defensible.

You can always use a preprocessing program (you can write
something you like) then you can relive your youth when you
used things like:

BEGIN     {
END       }
LOOP      for(;;)
:=        =





== 2 of 2 ==
Date: Thurs, Dec 2 2004 3:53 am
From: "Tim Ward"  

"Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Ward wrote:
> >>What in god's grace is a *VP* doing micromanaging stuff like coding
> >>standards?
> >
> >
> > A company might decide that it wants uniform coding standards across all
its
> > operations, to make it cheaper to move staff about. To achieve this it
might
> > want or need the decision to be made by someone senior to all the techie
> > groups who are each proposing that their own standard become the
corporate
> > one. This could be a VP.
>
> Should be the head of the development department, if there is a separate
> development department (it sounded like that).

No no, I'm talking about the scenario where there are many independent
development departments in different divisions of the company on different
sites.

Whether getting a consistent coding standard is a sensible thing to do can
be argued about, but if such a company decides it wants to do it the
decision is almost certainly going to have to be taken at non-technical
level.

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk






==============================================================================
TOPIC: Java and xmlrpc?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4304527fb69e181
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 9:26 am
From: "shakah"  

I'm using xmlrpc-1.2-b1.jar without difficuly, both client- and
server-side. Not using it with Eclipse, though.





==============================================================================
TOPIC: Running programs in (networked) DOS window
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f76fd24178be761c
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 8:14 am
From: "TC"  

I'm new to Java and working on some examples so I hope this comes out
correct.

Win2K
J2EE 1.3

I have a networked drive (f:) where I want to run a java program.  This
is another physical machine.  I'm using the DOS window to access this
drive.

Then, I want to use a local drive (c:) to run another java program.
These two programs will "talk" with each other via "topic" (JMS).

My question:  Will the program on f: be actually running on the other
machine or is the code and memory pulled over to the local machine that
is mapping the drive?

I hope that makes sense.

TIA!



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

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

To post to this group, send email to [EMAIL PROTECTED] or
visit http://groups-beta.google.com/group/comp.lang.java.programmer

To unsubscribe from this group, send email to
[EMAIL PROTECTED]

To change the way you get mail from this group, visit:
http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

To report abuse, send email explaining the problem to [EMAIL PROTECTED]

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

Reply via email to