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

Today's topics:

* Outlook - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/60f9b770b19d2314
* dynamically change struts' form's action - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854
* RPC from C++-Client to a Java-Server - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ac99ac85e15a47f8
* comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08) - 1 
messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a4231ec81619f9cc
* Why pay for VS.NET when JAVA is Free? - 4 messages, 4 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3375ad9fa31f8e34
* re-playing sound in J2ME - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/512d8a24ff32c019
* looking for high-level web development tools - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b726dc72d5129bda
* get Tomcat 5 to compile at startup? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/80990d518d14af33
* TCHAR in c++ to string in java - 3 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dce48222b7374509
* Using hobby source code in your job ? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4
* Java and Tablet PC - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/85968edffa9d13eb
* Problem with mssql jdbc - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bf3235eec595bc83
* an Array of ArrayLists in Java 5 - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d38a569377953bf
* file separator - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f
* Applet & IE - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2726d23c9ba56a6
* Problem wtih Java ThreadGroup.activeCount method - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/80c6f5e77859ec02
* JSP: request parameters and XML using EL tags - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/839cd0b847304b06
* Help ....API's - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43884fd5c0b83a71
* How do you write to text files WITHOUT OVERWRITING? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f3671c3a6cf1cdd

==============================================================================
TOPIC: Outlook
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/60f9b770b19d2314
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 8:35 am
From: "Ayrton"  

I would like to make a program that send email using outlook's adress.
Are there some examples of code ?

Thanks 






==============================================================================
TOPIC: dynamically change struts' form's action
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:09 am
From: Tom Arne Orthe  

ctyberg wrote:

> I'd like to dynamically change the form's action based on a request
> parameter.
> 
> For ex.
> <c:if test="${param.isNew == 'true'}>
> <html:form action="/saveNew.do" >
> </c:if>
> <c:if test="${param.isNew == 'false'}>
> <html:form action="/saveExisting.do" >
> </c:if>
> 
> However, the above would generate a nesting error since the form's end
> tag is not within the c:if tag.
> How else can I achieve the same idea?  Any ideas?

You might want to look at letting you Action classes
extend DispatchAction instead of Action. Then you can
get away with using one action and letting the parameter
decide which method to use in the action class. Take a
look at the struts documentation for DispatchAction class.


Best regards,
Tom Arne Orthe





==============================================================================
TOPIC: RPC from C++-Client to a Java-Server
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ac99ac85e15a47f8
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:26 am
From: "Tomislav Petrovic"  

If you really have so simple case (one remote method, few string
params, one return value) and if speed is not your major concern,
I'd recommend XMLRPC...
It is xml based protocol, easy to debug, easy to implement
both in c++ and Java due to publicly available client/server libraries.
It took me 1 day to have my my first method "up and running"
from the scratch (I never heard of it before).

CORBA and RMI are much complicated, require lots of work,
other elements like object broker and such which you really do
not need, etc....

There is only one drawback to xmlrpc, that is speed....
It works over HTTP post which means you build request
(few miliseconds) post request over net (at least one network
roundtrip), server does processing (again few milliseconds)
and get back response (at least one network roundtrip)....

These network roundtrips can kill your app if you need to
call your method(s) frequently and one by one.
In my case I had many methods called frequently but
they were independent (I did not need output of one to
call another) so I called them all at once (system.multiCall)
so I has only two net roundtrips instead of n (number of calls)
times two.

Tomy.


Oliver Hirschi wrote:
> Hi,
>
> I have to implement a Client-Server-Architecture. A C++ client should
> call a remote method (with a few of String parameters) on a java
> client and get back a boolean value.
> I think I am a little confused.
>
> Which architecture should I take?
> Do I have to use CORBA, or is there an alternative (RMI, ...)?
>
> Thanks.






==============================================================================
TOPIC: comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a4231ec81619f9cc
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:25 am
From: [EMAIL PROTECTED] (David Alex Lamb) 

Last-Modified: Fri Oct  8 11:38:42 2004 by David Alex Lamb
Archive-name: computer-lang/java/help/minifaq
Posting-Frequency: every 4 days

Before posting read Jon Skeet's "How to get answers on the comp.lang.java.*
newsgroups" at http://www.pobox.com/~skeet/java/newsgroups.html

Java FAQs and advice:
- Java FAQ (Andrew Thompson)  http://www.physci.org/codes/javafaq.jsp
  including his list of other FAQs http://www.physci.org/codes/javafaq.jsp#faq
- Java/Javascript/Powerbuilder HOWTO (Real Gagnon)
  http://www.rgagnon.com/howto.html
- Java Glossary (Roedy Green)  http://www.mindprod.com/jgloss.html
- jGuru jFAQs (John Zukowski)    http://www.jguru.com/jguru/faq/
- Focus on Java (John Zukowski)   http://java.about.com/
- Java Q&A (David Reilly)  http://www.davidreilly.com/jcb/faq/
- Java GUI FAQ (Thomas Weidenfeller) http://www.physci.org/guifaq.jsp

comp.lang.java.help     Set-up problems, catch-all first aid.
    According to its charter, this unmoderated group is for immediate help
    on any Java problem, especially when the source of the difficulty is
    hard to pin down in terms of topics treated on other groups.
        This is the appropriate group for end-users, programmers and
    administrators who are having difficulty installing a system capable of
    running Java applets or programs.  It is also the right group for
    people trying to check their understanding of something in the
    language, or to troubleshoot something simple.

comp.lang.java.programmer  Programming in the Java language.
    An unmoderated group for discussion of Java as a programming language.
    Specific example topics may include:
      o types, classes, interfaces, and other language concepts
      o the syntax and grammar of Java
      o threaded programming in Java - sychronisation, monitors, etc.
      o possible language extensions (as opposed to API extensions).
    The original charter said that discussion explicitly should not include
    API features that are not built into the Java language and gave examples
    like networking and the AWT.  These days AWT belongs in clj.gui, and
    networking (and many other APIs) are often discussed in clj.programmer.

Do not post binary classfiles or long source listings on any of these
groups. Instead, the post should reference a WWW or FTP site (short source
snippets to demonstrate a particular point or problem are fine).  For some
problems you might consider posting a SSCCE (Short, Self Contained, Correct
(Compilable), Example); see http://www.physci.org/codes/sscce.jsp

Don't post on topics that have their own groups, such as:
 comp.lang.java.3d        The Java 3D API
 comp.lang.java.advocacy  Arguments about X versus Y, for various Java X and Y
 comp.lang.java.beans     JavaBeans and similar component frameworks
 comp.lang.java.corba     Common Object Request Broker Architecture and Java
 comp.lang.java.databases Using databases from Java
 comp.lang.java.gui       Java graphical user interface design and construction
 comp.lang.java.machine   Java virtual machines, like JVM and KVM
 comp.lang.java.security  Using Java securely
 comp.lang.java.softwaretools Tools for developing/maintaining Java programs
Don't cross-post between these groups and c.l.j.programmer or .help -- it just
wastes the time of people reading the general groups.

Don't post about JavaScript; it's a different language.  See
comp.lang.javascript instead.
-- 
"Yo' ideas need to be thinked befo' they are say'd" - Ian Lamb, age 3.5
http://www.cs.queensu.ca/~dalamb/   qucis->cs to reply (it's a long story...)




==============================================================================
TOPIC: Why pay for VS.NET when JAVA is Free?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3375ad9fa31f8e34
==============================================================================

== 1 of 4 ==
Date: Tues, Dec 14 2004 12:34 pm
From: "AlexKay"  


"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:[EMAIL PROTECTED]
> Simply because the costs of the software is only a part of the whole
> equation.  You may say that Java is free, but if it take a programmer 6
> months with Java instead of 3 with .NET to develop a piece of code; then
the
> real cost to the company who pay him is much, much higher than 0$.

I agree the 2.5K is neither here not there in the bigger picture.

You're example of 3 months versus 6 months however, is extraordinary, a 100%
difference. I'm interested, is this a real example? If not do you have any
real examples?

OTOH, there is plenty of evidence to show Windows boxes require a lot more
support than Solaris boxes so what you may or may not gain in developer time
you certainly loose in recurrent operational costs, year in year out.

Regards
Alex






== 2 of 4 ==
Date: Tues, Dec 14 2004 11:01 am
From: "jeffc"  


"Mike Cox" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>If Sun Solaris 10 is
> free robust and virus free, why pay through the nose for Windows then?
> Microsoft made its fortune on being the high volume low cost provider, but
> now it is more expensive than SUN.  How ironic!

Not really - standard business :-)  Anyway, just wanted to point out that the
reason Sun is relatively virus free is specifically because hardly anyone uses
it compared to Windows.  Hackers will always target the biggest base they can
get.





== 3 of 4 ==
Date: Tues, Dec 14 2004 5:28 pm
From: Rich Teer  

On Tue, 14 Dec 2004, jeffc wrote:

> Not really - standard business :-)  Anyway, just wanted to point out that the
> reason Sun is relatively virus free is specifically because hardly anyone uses

Absolute nonesense.  Solaris (or any other UNIX or UNIX-like OS) is
"relatively virus free" because of its more secure design.  There's
no way I, as a normal, unprovileged user, can affect other people's
or system files.  Other things, like the system's philosophy, and the
general "clueness" of the users, also help.

But I guess this explains your lack of knowledge:

        X-Newsreader: Microsoft Outlook Express 6.00.2800.1409

Congratulations: you're using one of the biggest virus spreaders
known to man.

> it compared to Windows.  Hackers will always target the biggest base they can
> get.

ITYM "crackers".

-- 
Rich Teer, SCNA, SCSA, author of "Solaris Systems Programming"

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich



== 4 of 4 ==
Date: Tues, Dec 14 2004 6:49 pm
From: Michael Borgwardt 
 

Rich Teer wrote:
>>it compared to Windows.  Hackers will always target the biggest base they can
>>get.
> 
> ITYM "crackers".

ITYM "script kiddies". A real malicious hacker will target whatever he *wants*
to target.




==============================================================================
TOPIC: re-playing sound in J2ME
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/512d8a24ff32c019
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 1:41 pm
From: marko  

Hi,
I'm working on a game in MIDP 2 J2ME and have problems with playing sound.
I used this method to start playing sound:

public void playsnd() {
     try {
        InputStream is = getClass().getResourceAsStream("/res/test.wav");
        Player p = Manager.createPlayer(is, "audio/x-wav");
        p.prefetch();
        p.start();
}
catch (IOException ex) {}
catch (MediaException ex) {}

}

This method works fine except it has a long delay before sound actually 
starts playing.
Is it possible to initialize and create player in class constructor and 
then call start() method on player when needed?
I tried this but it gives me null pointer exception when I call 
startplaying() method:


import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.util.Random;
import javax.microedition.media.*;
import javax.microedition.media.control.*;
import java.io.*;

public class ExampleGameCanvas extends GameCanvas implements Runnable {

        private Player p;
        
public ExampleGameCanvas() throws Exception {
        
        InputStream is = getClass().getResourceAsStream("/res/test.wav");
        Player p = Manager.createPlayer(is, "audio/x-wav");
        p.prefetch();

}

public void startplaying() {

     try {
        p.start();
        }
        catch (MediaException ex) {}

}

}


Thank You!




==============================================================================
TOPIC: looking for high-level web development tools
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b726dc72d5129bda
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 12:49 pm
From: Tim Tyler  

[EMAIL PROTECTED] wrote or quoted:

> Try NitroX for JSP and Struts.  It's based on Eclipse and is available
> on Linux and Windows.  A pix is worth 1k words.  Checkout these images:
> 
> http://www.m7.com/tiles.htm
> http://www.m7.com/Struts_Validation_Framework.htm
> http://www.m7.com/debug_JSP.htm
> http://www.m7.com/topten.do

Um - it looks like you "forgot" to mention that you are also
[EMAIL PROTECTED] - and work for M7 :-|
-- 
__________
 |im |yler  http://timtyler.org/  [EMAIL PROTECTED]  Remove lock to reply.




==============================================================================
TOPIC: get Tomcat 5 to compile at startup?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/80990d518d14af33
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 1:54 pm
From: "Heiner Kücker"  

Mads Kristiansen:
> Hi!
>
> Is it possible to make Tomcat 5 compile all *.jsp's on startup? - Or
> do something similar that will make the server compile all pages at
> once?
>
> Right now it's compiling a page the first time you make the request
> from a browser  - and it takes forever to load the page. It's really a
> pain.
>
> Best regards
> Mads (DK)

se topics below:

http://groups-beta.google.com/groups?as_q=tomcat+jsp&num=10&scoring=d&hl=en&ie=UTF-8&as_epq=web+xml&as_oq=precompile+pr%C3%A9compil%C3%A9&as_eq=&as_ugroup=*java*&as_usubject=&as_uauthors=&as_drrb=q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=14&as_maxm=12&as_maxy=2004&safe=off

http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8726278df10b53d/1061d116784d2244?q=tomcat+jsp+%22web+xml%22+(precompile+OR+pr%C3%A9compil%C3%A9)+group:*java*&_done=%2Fgroups%3Fas_q%3Dtomcat+jsp%26num%3D10%26scoring%3Dd%26hl%3Den%26ie%3DUTF-8%26as_epq%3Dweb+xml%26as_oq%3Dprecompile+pr%C3%A9compil%C3%A9%26as_eq%3D%26as_ugroup%3D*java*%26as_usubject%3D%26as_uauthors%3D%26as_drrb%3Dq%26as_qdr%3D%26as_mind%3D1%26as_minm%3D1%26as_miny%3D1981%26as_maxd%3D14%26as_maxm%3D12%26as_maxy%3D2004%26safe%3Doff%26&_doneTitle=Back+to+Search&&d#1061d116784d2244


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
Java Expression Formula Parser: http://www.heinerkuecker.de/Expression.html
CnC Template Technology http://www.heinerkuecker.de/Expression.html#templ






==============================================================================
TOPIC: TCHAR in c++ to string in java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dce48222b7374509
==============================================================================

== 1 of 3 ==
Date: Tues, Dec 14 2004 2:17 pm
From: Michael Borgwardt 
 

[EMAIL PROTECTED] wrote:
> The client will reads all the specified information, but i am getting
> some blocks in the middle, I hope the problem will be at the reading
> side. The host will sends the data in form of win32_find_data format,
> and here i am reading the information, so i want how to process the
> fileName which is the field of the structure win32_find_data, at the
> client side (java side), should i use the charsetdecoder to convert the
> type TCHAR(fileName) data to string at java???

No, you should define a portable communications protocol. C structs are
not portable. When the protocol is clearly defined (that includes
specifying the charset of Strings) then implementing it on the Java side
will be straightforward.

As it is, your host is fundamentally broken.



== 2 of 3 ==
Date: Tues, Dec 14 2004 3:03 pm
From: Michael Borgwardt 
 

Bobby wrote:

> No, i verified the host with another client which was writtened in c++
> and its working great with out any problems,

That does not, in any way, constitute a "verification".

> the problem occured only
> with the java client! 
> 
> what is the problem???

The problem is still that you do NOT have a clearly defined, portable
communication protocol. Using C structs is an amateurish mistake, because
they differ between compilers and architectures. Your C++ client may
not work anymore when compiled with a different compiler or on a different
machine.

Define *exactly* what the host sends over the network, byte by byte, what
fields of what length and with what content (including endianness and
character encoding). Then implement that in Java.

And stop those multiple reposts!



== 3 of 3 ==
Date: Tues, Dec 14 2004 5:49 pm
From: "MaSTeR"  


"Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Bobby wrote:
>
> And stop those multiple reposts!

Maybe is posting with though his host ;)






==============================================================================
TOPIC: Using hobby source code in your job ?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60dfe865a7807c4
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 9:54 am
From: Bruce Lewis 
 


(Crossposted to misc.int-property; followups set).

Bob Hairgrove <[EMAIL PROTECTED]> writes:

> IANAL, but some things simply aren't patentable or subject to
> copyright.

Patent, trademark and copyright are different in important ways.  It's
generally a good idea to talk about only one at a time.

> Who has the patent on white flour? Salt? Butter? Put them
> together in the right proportions, throw in a little yeast and some
> "secret ingredient", then maybe you come up with a recipe for bread
> which *is* patentable.

You have to be careful making this point.  Even though it makes perfect
sense, people can wildly misinterpret it.  Yes, non-patentable parts can
be combined to make a patentable whole.  However, the way these parts
are combined needs to be novel and nonobvious.

For example, say you baked bread and glazed a poem onto the top.  The
main bread ingredients, the glaze, and the way the glaze goes on to the
bread are not novel.  The poem is not statutory (i.e. not material that
is subject to patent; you copyright poems).  Is the bread as a whole
patentable?  What does the law say?

Depends what you mean by "law".  If you take it as what is written, the
bread is not patentable.  The Supreme Court in Diamond v. Diehr wrote
that you couldn't make non-patentable subject matter (in this case a
poem) patentable just by adding non-novel elements to it.

However, if you take "law" as what might happen to you in court, the
bread is patentable.  The USPTO and some lower court have taken
"statutory and novel as a whole" to mean "statutory as a whole and novel
in any part".  That's why we have software patents.

-- 

http://ourdoings.com/         Let your digital photos organize themselves.
                              Sign up today for a 7-day free trial.




==============================================================================
TOPIC: Java and Tablet PC
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/85968edffa9d13eb
==============================================================================

== 1 of 2 ==
Date: Tues, Dec 14 2004 3:59 pm
From: "andreas kinell"  

Has anyone ever written a Java-application
for a tablet-pc?

Any suggestions and examples would be very
helpful.

Thanks in advance,
Andreas Kinell 





== 2 of 2 ==
Date: Tues, Dec 14 2004 10:16 am
From: "Mickey Segal"  

Hyperlinks to five issues related to Java and Tablet PCs are at 
www.segal.org/java/.

"andreas kinell" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Has anyone ever written a Java-application
> for a tablet-pc?
>
> Any suggestions and examples would be very
> helpful. 






==============================================================================
TOPIC: Problem with mssql jdbc
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bf3235eec595bc83
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:08 am
From: "Rizwan"  

so its a SQL Server problem. Go post it to SQL Server forum.

"sp" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> No I use windows 2003.
> I've try to execute netstat -an, but no process listen on port 1433. But I
> 've configured with Server Network Utility and client server utility to
use
> tcp protocol listen on port 1433.
>
>
> "Mark Thornton" <[EMAIL PROTECTED]> ha scritto nel messaggio
> news:[EMAIL PROTECTED]
> > sp wrote:
> >
> > > I can't connect with jdbc for mssql.
> > >
> > > This is the code:
> > >
> > >  try {
> > >    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
> > >   } catch (ClassNotFoundException e) {
> > >    e.printStackTrace();
> > >   }
> > >   try {
> > >   conn =
> > >     DriverManager.getConnection(
> > >      "jdbc:microsoft:sqlserver://localhost:1433","username","pwd");
> > >       dmd = conn.getMetaData();
> > >   } catch (SQLException e1) {
> > >     e1.printStackTrace();
> > >   }
> > >
> > >
> > >
> > >
> > > This is the error :
> > > java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error
> > > establishing socket.
> >
> > Are you running XP SP2 and haven't made the server an exception to the
> > firewall (or simply turned it off)?
> >
> > Mark Thornton
>
>






==============================================================================
TOPIC: an Array of ArrayLists in Java 5
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d38a569377953bf
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 8:32 am
From: "Gary Newell"  

Ryan -

Both of these generate compile time errors:
  ArrayList<Double>[] arrayListDoubles = new ArrayList<Double> [ 5 ];
                                       and
  ArrayList<Double> arrayListDoubles[] = new ArrayList<Double> [ 5 ];

Errors (respectively):
C:\temp>javac arrayOfArrayLists.java
arrayOfArrayLists.java:7: generic array creation
                ArrayList<Double>[] arrayListDoubles = new ArrayList<Double>
[ 5 ];
                                                       ^
1 error

C:\temp>javac arrayOfArrayLists.java
arrayOfArrayLists.java:7: generic array creation
                ArrayList<Double> arrayListDoubles[] = new ArrayList<Double>
[ 5 ];
                                                       ^
1 error


Any ideas?

Gary



"Ryan Stewart" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Gary Newell" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> [...]
> >  ArrayList arrayListDoubles[] = new ArrayList [ 5 ];
> [...]
> >  arrayListDoubles[0].add( new Double( "100" ) );
> [...]
> > - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > C:\temp>javac -d . -Xlint:unchecked *.java
> > arrayOfArrayLists.java:13: warning: [unchecked] unchecked call to add(E)
> > as
> > a member of the raw type java.util.ArrayList
> >                arrayListDoubles[0].add( new Double( "100" ) );
> > - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >
> Specify a type for the ArrayList:
> ArrayList<Double>[] arrayListDoubles = new ArrayList<Double>[5];
>
>






==============================================================================
TOPIC: file separator
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 12:17 pm
From: "juicy"  

thanks all...





==============================================================================
TOPIC: Applet & IE
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2726d23c9ba56a6
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 5:40 pm
From: Andrew Thompson  

On 13 Dec 2004 06:36:48 -0800, Damien wrote:

> I would like to know how to write a java applet able to access to a
> dll with the default IE JRE (1.1).

The MSVM is no longer default.  IE now arrives with no Java 
Plug-In at all, just as it should.  

The end user gets to choose whether they want Java, just as they do at 
the sites of Mozilla and Opera which offer 'No Java' browser downloads.

-- 
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: Problem wtih Java ThreadGroup.activeCount method
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/80c6f5e77859ec02
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 5:54 pm
From: Andrew Thompson  

On Sun, 12 Dec 2004 07:35:43 GMT, Esmond Pitt wrote:

> ..This should consist of the simplest possible test which exhibits 
> the problem. You could either start with my code, elaborating it 
> successively so it more resembles your code until the point at which the 
> problem occurs, or you could start with your own code, progressively 
> simplifying it until the problem disappears. Then review the last change 
> you made - this will either demonstrate the bug's existence or show you 
> what's wrong with your code.

Or, to put that another way..
<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: JSP: request parameters and XML using EL tags
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/839cd0b847304b06
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 1:09 pm
From: James Willmore  

If this isn't the right newsgroup, please be kind when letting me know :-)

I have the following in an XML file:

...
  <section name="1">
    <question name="1" required="true">
      Describe what the Nominee did to be considered for an award
    </question>
  </section>
...

And have tried the following in a JSP page

<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"; %>
...
<!-- Section 1 Questions (/form/[EMAIL PROTECTED]'1']) -->
<table border="0" summary="Section 1">
<x:forEach select="$doc//*/[EMAIL PROTECTED]'1']/question">
<x:set var="currentXML" select="string(@name)" />
<c:set var="current" value="Section ${currentXML}" />
<tr>
<td class="onlyCell"><x:out select="@name" />. (<c:out value="${current}" />)
<x:out select="." />
</td>
</tr>
<tr>
<td class="onlyCell">
<textarea cols="78" rows="10" name="<c:out value="${current}" />"><c:out 
value="${param[${current}]}" /></textarea>
</td>
</tr>
</x:forEach>
</table>
...

The above code doesn't work because it's an invalid EL expression.  I want
to be able to give the value entered back to the user if this required
section isn't filled in. The idea is this ... if the XML file changes, I
don't want to go and recode the JSP based upon the changes.

Is this possible using taglibs or do I need to examine a different way of
doing this?

Hopefully, this post makes sense :-)

Jim




==============================================================================
TOPIC: Help ....API's
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43884fd5c0b83a71
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 6:10 pm
From: stevek  

Looking at a program that has the following.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

java.io is ok but I can not find info on javax.servlet.*. Any help?




==============================================================================
TOPIC: How do you write to text files WITHOUT OVERWRITING?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f3671c3a6cf1cdd
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:28 am
From: Michael Borgwardt 
 

Storm wrote:
> Actually yes you can insert data at random places by utilizing the
> RandomFile class. 

What "RandomFile" class? Do you mean java.io.RandomAccessFile? Then
you're wrong.

> By supplying the length of each record, and the end
> record number, you can reset the file size to the oldsize + newRec
> length and boom you have an append.  

Nobody said anything about appending. That can be done.

> Also, you can write data into the
> middle of a file without overwriting. 

No, you cannot.

> All you have to do is create a
> class that represents each row, read each record into the created
> class, insert the new record at the appropriate point in the vector
> during a For/While loop, and re-write the file using the data present
> in the vector.

Please tell us that was a joke.



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

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