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

Today's topics:

* Help ....API's - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43884fd5c0b83a71
* JSP: request parameters and XML using EL tags - 2 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/839cd0b847304b06
* Why pay for VS.NET when JAVA is Free? - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3375ad9fa31f8e34
* jsp, containers, beans and persistence - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47085d2436bae214
* JCE: NoSuchAlgorithmException - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a75258ae6120abce
* MIDP MIDlet: which characters are supported in the phone font? - 2 messages, 
2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/73bdfdf7f36c6ea0
* javax/comm/SerialPortEventListener - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d845f15727eef628
* NIO CPU Anomaly - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/987b5a76739f16c8
* java/oracle - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a70e12f4966ca467
* Hibernate and JDK 1.5 - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d31ff97d182a4815
* Another simple problem - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3052e16ead05747
* Cannot reply message - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb70246ca8fbe9a8
* How to find file descriptor leak - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b
* re-playing sound in J2ME - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/512d8a24ff32c019
* is that ok for the java program that developed using 1.4.2 run on JRE1.5? - 2 
messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/996d43b46bbb7442
* Ant documentation in Postscript - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1654fa62142c66cb
* Casting from Map to String - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/307cc698012a7034
* Off JAVA Topic - Billing Rate - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/83b0fce5d3ff0b01
* SAAJ's DOM error - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8de339ce1d5af511

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

== 1 of 2 ==
Date: Tues, Dec 14 2004 7:31 pm
From: Michael Borgwardt 
 

stevek wrote:
> 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?

javax.servlet is part of J2EE, not J2SE. Any Server that deals with Servlets
and JSPs will come with a JAR file that contains those classes. It's often
calles servlet.jar.



== 2 of 2 ==
Date: Tues, Dec 14 2004 6:20 pm
From: Phillip Lord  

>>>>> "stevek" == stevek  <[EMAIL PROTECTED]> writes:

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

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


http://www.google.com/search?q=javax+servlet




==============================================================================
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 2 ==
Date: Tues, Dec 14 2004 11:38 am
From: Chris Smith  

James Willmore <[EMAIL PROTECTED]> wrote:
> <c:out value="${param[${current}]}" />

> The above code doesn't work because it's an invalid EL expression.

Indeed.  You should wrap entire EL expressions in ${...}, but not their 
subexpressions.  Hence:

    <c:out value="${param[current]}" />

Note that if you're using JSP 2.0, then c:out is obsolete.  You should 
migrate toward just including the EL expression with no tag.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 2 of 2 ==
Date: Tues, Dec 14 2004 9:18 pm
From: Chris Smith  

Jim <[EMAIL PROTECTED]> wrote:
> Can you give a JSP 2.0 example of the code provided -or- direct me to
> where I can find the answer myself ... please.

Sure.  Replace:

    <c:out value="${param[current]}" />

with:

    ${param[current]}

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==============================================================================
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 3 ==
Date: Tues, Dec 14 2004 11:41 am
From: Chris Smith  

AlexKay <[EMAIL PROTECTED]> wrote:
> I agree the 2.5K is neither here not there in the bigger picture.
> 

Without knowing the situation of the person speaking, it's impossible to 
reasonably agree or disagree.  It's often the case that labor is far 
more available than capital.  You may work for an established business, 
but much software is written outside of that kind of environment.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 2 of 3 ==
Date: Tues, Dec 14 2004 11:10 am
From: Steve Sobol  

Sylvain Lafontaine wrote:
> 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 won't enter into the discussion to know if doing a project with Java will 
> really double the required time or not.  

It's not something that can be answered without figuring out who will do the 
work. There are plenty of competent Java programmers out there, as well as 
plenty of competent .NET programmers, so if you're using someone who knows what 
he or she is doing, there shouldn't be that much difference in development 
time... regardless of development platform.

-- 
JustThe.net Internet & New Media Services, http://JustThe.net/
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED]
PGP Key available from your friendly local key server (0xE3AE35ED)
Apple Valley, California     Nothing scares me anymore. I have three kids.



== 3 of 3 ==
Date: Tues, Dec 14 2004 8:32 pm
From: Tim Tyler  

In comp.lang.java.programmer Steve Sobol <[EMAIL PROTECTED]> wrote or quoted:
> Sylvain Lafontaine wrote:

> > 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 won't enter into the discussion to know if doing a project with Java will 
> > really double the required time or not.  
> 
> It's not something that can be answered without figuring out who will do the 
> work. There are plenty of competent Java programmers out there, as well as 
> plenty of competent .NET programmers, so if you're using someone who
> knows what he or she is doing, there shouldn't be that much difference 
> in development time... regardless of development platform.

The chances of the software you need to write already existing beneath
the 9-year old Java platform are of course much higher - so the chances 
are much bigger that little or no work will need to be performed in the 
first place.
-- 
__________
 |im |yler  http://timtyler.org/  [EMAIL PROTECTED]  Remove lock to reply.




==============================================================================
TOPIC: jsp, containers, beans and persistence
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47085d2436bae214
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 7:15 pm
From: "Rogier R. Spaans"  

Hi,
I don't know if I really understand your point, but I think you're 
refering to the 'scope' of a variable. A web container has three 
different scopes: request, session an application.
Request is only present during the processing of a single request. 
Session parameters are available during the lifetime and in the context 
of the session, and application parameters are valid, and shared over 
multiple sessions within the context of the application.
In your jsp you can use request.getParameter("name"), 
session.getParameter("name") and application.getParameter("name").

regards,
Rogier Spaans

milkyway wrote:
> Hello there,
> 
> I have heard that one can set a .jsp page so that the content is valid
> over an entire session. Is this true? Are there any examples where one
> may see this?
> 
> Also, if it is true, then has anyone come across any problems with the
> use of the Tomcat container to pass variables for use from one jsp page
> to another? Are there any limits to what the container can hold - for
> example, if I have 5 jsp pages:
> 
> first.jsp
> second.jsp
> third.jsp
> fourth.jsp
> fifth.jsp
> 
> and I use a setName for first.jsp, can use a getName on fifth.jsp
> (assuming that the variable is in the cloud called "the container"
> somewhere)?
> 
> I hope I am making sense ;-) 
> 
> Kindest Regards.
> 




==============================================================================
TOPIC: JCE: NoSuchAlgorithmException
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a75258ae6120abce
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 8:42 pm
From: Timo Nentwig  

Hi!

Mac.getInstance("HmacSHA1") throws an NoSuchAlgorithmException. The jce jars
ought to be in classpath (JAVA_HOME/lib/ext). JDK 1.3.1_12 and JCE 1.2.1.

What can cause this exception?

Timo




==============================================================================
TOPIC: MIDP MIDlet: which characters are supported in the phone font?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/73bdfdf7f36c6ea0
==============================================================================

== 1 of 2 ==
Date: Tues, Dec 14 2004 9:22 pm
From: Michael Borgwardt 
 

Darryl L. Pierce wrote:
>> The key word you used was "font". The font is what determines which
>> characters can be displayed on a Java system. Not a "locale".
> 
> 
> Sounds more like my answer confused *you*.

Not, it seems very much to me like you are the one who is
confusing things.

> The font used is determined 
> by the locale where the phone is meant to be used.

Not in a way that helps answering the OP's question. The phone's *maker*
determines the font that will be used. The locale is going to be his
most important consideration in that decision, but not the only one.
He'll want to choose a font that can display all the characters used in
that locale, but may not be able to - early mobile phones were too limited
in their display resolutions, memory and entry methods to display all the
characters used in Japanese, so they supported only the tiny subset of
syllabic characters. OTOH there will often be a number of characters added
that are not formally part of the "locale" but used anyway.

Therefore there *is no* direct, one-to-one mapping from "locale" to a
set of characters displayable by any or all phones meant for that
locale.


> A locale is a 
> location, and regarding a mobile it's a location where that phone is 
> meant to be used. You won't find a phone with Big5 or Traditional 
> Chinese being sold widely in the US because that would be the wrong 
> locale for using such a device....

And what have *character encodings* to do with this debate?


> Then perhaps, in future, you should devote just a *wee* bit of time to the 
 > topic of the person's question. There is *no* Locale class in the MIDP.

Can you be sure the original poster is aware of that?

> And, 
> I said nothing *about* the Locale class. I said:
> 
> "It supports whatever locale(s) are on the phone. "
 >
> In response to the original poster's question:
> 
> "Which unicode characters does a phone support? Is this defined
> somewhere? Does a phone support pi and math symbols and arrows?"
> 
> And the answer was *very* clear.

It was useless and misleading.


> Nothing about classes not available on 
> mobile phones. I said that the characters displayed on the phone are 
> going to be for what ever locale the phone was made to support.

Which is a truism and doesn't answer the question because neither
your notion of "locale" nor "be for" is defined formally in a way
that would yield the desired set of displayable characters.


>>> An example of a local supported by a phone would be those phones 
>>> manufactured in Korea which have only Korean characters displayed by 
>>> the font set on the phone.
>>
>> I rather doubt any of them do not also display latin letters.
> 
> Where did I say anything about Latin?

You said "phones [...] which have only Korean characters". Well, there
is no such beast. Because Korean phones also display non-Korean, e.g.
Latin characters.


>> Locales are not the key to answering the original poster's question.
>> Fonts are. Of course, the fonts available on a device will contain
>> some or all of the characters commonly used on the locales it supports,
> 
> 
> Oh, so now *you* are saying that the characters supported on the device 
> are based on the locale?

"based on" is a very fuzzy non-technical expression, pretty useless when
seeking answers to clear-cut technical questions. That's why I'm *not*
saying that. And that's why I'm trying to avoid the word "locale",
becuase the way you're using it, it's equally fuzzy.

> But, before you said "[t]he font is what 
> determines which characters can be displayed on a Java system. Not a 
> 'locale'" when *I* said it depends on the locale. So, which is it?

Both. The characters displayable on a phone are determined unequivocally
by the font. If a character is not in the font, the phone cannot display
it, if it is in the font, the phone can display it. The font contains
any and all of the characters displayable by the phone.

The choice of font is *influenced* by the locale, but not determined
in an unequivocal way, especially since your concept of "locale" is
also fuzzy. Whatever a locale is, not all phones made for it have the
same set of displayable characters.


>> but that's not really relevant in regard to mathematical symbols,
>> because most of them are not part of any natural language.
> 
> So?

The original poster asked specifically about mathematical symbols.


> Then you *might* want to spend a bit of time looking into the subject 
> matter before telling someone who's been in the Java mobile industry for 
> over 5 years what's what. Sound reasonable?

Argument from authority?


>> There may be
>> some that allow updating / changing the fonts.
> 
> 
> Again, so? 

A statement that's probably far more useful to the original poster than
anything else said in this thread.


> Rather than itching for a Usenet fight, why not look into the 
> subject matter or ask someone to clarify their posts rather than 
> unnecessarily posturing yourself like you've done in this thread?

I tried to be helpful and clear up things. It appeared to me that
you were doing the opposite, but obviously you had the same impression
of me.



== 2 of 2 ==
Date: Tues, Dec 14 2004 8:49 pm
From: "Darryl L. Pierce"  

Michael Borgwardt wrote:
>>> The key word you used was "font". The font is what determines which
>>> characters can be displayed on a Java system. Not a "locale".
>>
>> Sounds more like my answer confused *you*.
> 
> Not, it seems very much to me like you are the one who is
> confusing things.

Dude, you're going on about the Locale class and saying that my using 
the word locale, but then *YOU* used the word locale in *exactly* the 
same way *I* did. WTF? If you don't see your confusion, that's not my 
problem. I was quite clear.

>> The font used is determined by the locale where the phone is meant to 
>> be used.
> 
> Not in a way that helps answering the OP's question.

That's why I didn't say *anything* about the font, and only mentioned 
the *locale*. Jaysus, what's your problem?

> The phone's *maker*
> determines the font that will be used. 

What an unnecessary hair to split. Are you just itching for an argument? 
The OEM determines what locale is going to be supported by a handset 
model, and provides the appropriate font to support that locale.

<snip>
> Therefore there *is no* direct, one-to-one mapping from "locale" to a
> set of characters displayable by any or all phones meant for that
> locale.

When did I say there was a "one-to-one mapping from 'locale' to a set of 
characters"? Seems I said, quite clearly and simply, the characters that 
will be displayed will depend on what locale(s) the phone was meant to 
support. A phone manufactured for Korea is not going to support Big5.

You really are sounding like someone who said something foolish, 
realized it and is now just going to keep arguing nonsense like the 
above "it's the phone manufacturer" bit. Move on, get over your mistake.

>> A locale is a location, and regarding a mobile it's a location where 
>> that phone is meant to be used. You won't find a phone with Big5 or 
>> Traditional Chinese being sold widely in the US because that would be 
>> the wrong locale for using such a device....
> 
> And what have *character encodings* to do with this debate?

They're referred to as *fonts*, the thing which you previously said was 
important and not the locale (when I mentioned the locale), right before 
you turned around and said that the locale was what determined the font 
(which was what I said originally).

>> Then perhaps, in future, you should devote just a *wee* bit of time to 
>> the 
> 
>  > topic of the person's question. There is *no* Locale class in the MIDP.
> 
> Can you be sure the original poster is aware of that?

Since I never brought up the Locale class, nor mentioned it, there was 
no need to do so. That was *you* who made that mistake, but now refuse 
to own up to it.

>> And, I said nothing *about* the Locale class. I said:
>>
>> "It supports whatever locale(s) are on the phone. "
 >>
>> In response to the original poster's question:
>>
>> "Which unicode characters does a phone support? Is this defined
>> somewhere? Does a phone support pi and math symbols and arrows?"
>>
>> And the answer was *very* clear.
> 
> It was useless and misleading.

How? It answered specifically what the OP asked. It said that the 
characters supported on the phone are going to be determined by what 
locale(s) the phone supports; i.e., what region the phone was programmed 
to support. As I've said twice now, an example is a Korean phone that 
will definitely not display Big5 of Simplified Chinese characters 
because that's a different *locale*.

Now, you'll want to take special care and notice that I used a lower 
case /l/ when I said "locale" *each time*. I said nothing about a Locale 
class, since the Locale class is not related to the subject at hand. Do 
*you* understand? 'Cause it seems to me the OP isn't asking questions 
about the Locale class so I'm going to guess here that s/he didn't see 
my single sentence with the lower case /l/ as saying what *you* 
mistakenly read into it.

>> Nothing about classes not available on mobile phones. I said that the 
>> characters displayed on the phone are going to be for what ever locale 
>> the phone was made to support.
> 
> Which is a truism and doesn't answer the question because neither
> your notion of "locale" nor "be for" is defined formally in a way
> that would yield the desired set of displayable characters.

Oh, jaysus but you're just drooling for a fight aren't you?

>>>> An example of a local supported by a phone would be those phones 
>>>> manufactured in Korea which have only Korean characters displayed by 
>>>> the font set on the phone.
>>>
>>> I rather doubt any of them do not also display latin letters.
>>
>> Where did I say anything about Latin?
> 
> You said "phones [...] which have only Korean characters". Well, there
> is no such beast. Because Korean phones also display non-Korean, e.g.
> Latin characters.

Do they? Is that a "truism"? Do all Korean phones display non-Korean 
characters? Can you name some of those phones, please? Which ones 
specifically display Korean *and* Latin characters?

>>> Locales are not the key to answering the original poster's question.
>>> Fonts are. Of course, the fonts available on a device will contain
>>> some or all of the characters commonly used on the locales it supports,
>>
>> Oh, so now *you* are saying that the characters supported on the 
>> device are based on the locale?
> 
> "based on" is a very fuzzy non-technical expression, pretty useless when
> seeking answers to clear-cut technical questions. 

So, now the OP asked a "clear-cut technical question"? Oh, this is RICH!

> That's why I'm *not*
> saying that. And that's why I'm trying to avoid the word "locale",
> becuase the way you're using it, it's equally fuzzy.

The way I'm using it, since I've also *defined* it, is quite clear. You 
seem to be the *only one* who latched onto the Locale class and are 
confused.

>> But, before you said "[t]he font is what determines which characters 
>> can be displayed on a Java system. Not a 'locale'" when *I* said it 
>> depends on the locale. So, which is it?
> 
> Both. 

So, what I said original was correct? Then what's your problem?

> The characters displayable on a phone are determined unequivocally
> by the font. 

Which is determined by the locale(s) the phone is meant to support. QED.

> If a character is not in the font, the phone cannot display
> it, if it is in the font, the phone can display it. The font contains
> any and all of the characters displayable by the phone.

And the font selected is based on what locale the OEM intends for the 
phone to be used.

> The choice of font is *influenced* by the locale, but not determined
> in an unequivocal way, especially since your concept of "locale" is
> also fuzzy.

What part are you having a problem with? Maybe you were too busy looking 
for something to argue about to read where I posted that a locale is 
"[a] geopolitical place or area, especially in the
context of configuring an operating system or application
program with its character sets, date and time formats,
currency formats etc."

Notice the "character sets" part of the definition, which I posted *last 
week*. But, you go right ahead and continue to call my usage "fuzzy" if 
that makes you feel like you're not bickering about nothing...

> Whatever a locale is, not all phones made for it have the
> same set of displayable characters.

And is that another OEM truism? Just like the above bit where you said 
that Korean phones will also have Latin characters?

>>> but that's not really relevant in regard to mathematical symbols,
>>> because most of them are not part of any natural language.
>>
>> So?
> 
> The original poster asked specifically about mathematical symbols.

Which are not necessarily going to be available on the phone. But, if 
the character set (also called a font) on the phone (as determined by 
the locale(s) supported) has them, then they'll be there.

You've really got nothing better to do with your time than to waste it 
in this useless debate of yours?

>> Then you *might* want to spend a bit of time looking into the subject 
>> matter before telling someone who's been in the Java mobile industry 
>> for over 5 years what's what. Sound reasonable?
> 
> Argument from authority?

Argument from experience. Arguments from false authority are when one 
invokes a PhD in philosophy's opinion on the subject of evolution.

>>> There may be
>>> some that allow updating / changing the fonts.
>>
>> Again, so? 
> 
> A statement that's probably far more useful to the original poster than
> anything else said in this thread.

Except that there are very, very few (if *any*) phones that allow you to 
update the font on the phone, and that telling someone such a thing 
would be beyond misleading since 99.9% (or more) mobiles don't have this 
ability. Can you name even *one*? Oh, and let's not forget that even if 
the phone *did* allow you to upgrade the font, the MIDP *doesn't let you 
specify the font* so it would still be a pointless thing to say.

Tell me, do you actually have any experience with the MIDP? Because this 
is at least the second thing you've said that indicates to me that 
you're not very well versed in the subject...

>> Rather than itching for a Usenet fight, why not look into the subject 
>> matter or ask someone to clarify their posts rather than unnecessarily 
>> posturing yourself like you've done in this thread?
> 
> I tried to be helpful and clear up things. 

And you ended up confusing yourself and making things worse, at least 
from your perspective. Perhaps it's time you just bowed out before you 
say anything else. I don't know what your problem is, but you should 
just save us all the trouble.

 > It appeared to me that
> you were doing the opposite, but obviously you had the same impression
> of me.

Yes, I did, because you seemed to bark based on your misunderstandings 
rather than asking me questions about what I said. You would have 
cleared up a whole lot of your own misconceptions early on if, rather 
than jumping to your conclusions, you had just asked for clarification.

-- 
Darryl L. Pierce <[EMAIL PROTECTED]>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
     - Peter Abelard




==============================================================================
TOPIC: javax/comm/SerialPortEventListener
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d845f15727eef628
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 9:18 pm
From: "Rogier R. Spaans"  

If neW is the class containing the mainn method you are trying to run 
you should use 'java -cp c:/comm.jar neW'. In your example you passed 
-classpath and comm.jar as arguments to your app.

Abhishek wrote:
> When i try to run a file using comm package it is giving me an error.
> please can any body tell me how to resolve this one
> 
> C:\Progra~1\Java\j2sdk1.5.0\bin\java neW -classpath "C:\comm.jar"
> 
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/comm/SerialPortEventListener
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:604)
>         at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access+100(URLClassLoader.java:56)
>         at java.net.URLClassLoader+1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)





==============================================================================
TOPIC: NIO CPU Anomaly
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/987b5a76739f16c8
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:41 pm
From: Gordon Beaton  

On 14 Dec 2004 03:35:29 -0800, [EMAIL PROTECTED] wrote:
> I have recently run into an anomaly using the NIO packages in a
> multithread thick client.  Can anybody help?
>
> The app opens a few of IP connection (about 20) for two way
> communication. It was recently migrated across to use the NIO API
> and this has caused the client CPU to hit 100% even when idle. On
> the old IO packages this was <1% CPU.
>
> (This is my first newsgroup posting so please let me know if I should
> include more/less info).

Well, generally you should post a relevant section of code, ideally
something short that compiles and has the problem you describe.

However I suspect that you need to remove the SelectionKey from the
selection Set, or select() will immediately return the same key again
(even though it might not be ready). Something like this:

  SelectionKey sk;

  Set ready = s.selectedKeys();
  Iterator i = ready.iterator();

  while (i.hasNext()) {
    sk = (SelectionKey)i.next();
    i.remove(); // do this!

    if (sk.isAcceptable()) {
      // accept incoming connection
    }
    else if (sk.isReadable()) {
      // read from SocketChannel
    } 
    // etc
  }

/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: java/oracle
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a70e12f4966ca467
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 11:01 pm
From: "Wojtek D."  


I looking  for a  finished  programs  writed in java by someone(kind
ofproject).I interest programs as  : "LENDING LIBRARY"  or  "CAR  HIRE",
etc....  This program shoulds be work witch  some
database(preferableoracle).
Somebody maybe have writed somethink like that.Such program will be
veryhelpfull for me.

Thank you for every info.
Sorry for my not well English.
Wojtek D.


> Thank you  for any info.
> Wojtek D.
>
>








==============================================================================
TOPIC: Hibernate and JDK 1.5
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d31ff97d182a4815
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 4:22 pm
From: john martin  

Does the current release of Hibernate support JDK 1.5 at all?  The 
documentation I can find seems to imply that only 1.4 is supported, but 
it doesn't explicitly say so.  It'd be nice to be able to use generics.

Has anyone tried the Hibernate 3 alpha?  How stable is it?  Does it have 
JDK 1.5 support yet (the roadmap lists that as one of the planned features)?

   -john




==============================================================================
TOPIC: Another simple problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3052e16ead05747
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 11:25 pm
From: "Virgil Green"  

Tilman Bohn wrote:
> On Sat, 11 Dec 2004 16:55:59 +0000, Joona I Palaste wrote:
>
> [...]
>> public class Car {
>>   public new() {
>>     /* ... */
>>   }
>>   public new(String model, int year) {
>>     /* ... */
>>   }
>> }
>>
>> you would still call it with:
>> Car c1 = new Car();
>> Car c2 = new Car("Toyota", 1996);
>
> That's even more confusing. If you declare it like a static factory,
> use it like one.
>
> Car c1 = Car.new();
>
> Cheers, Tilman

Where is it being "declared like a static factory"? The two examples of
new() are constructors, not methods.

 - Virgil






==============================================================================
TOPIC: Cannot reply message
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb70246ca8fbe9a8
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 4:50 pm
From: Chris Smith  

vizlab <[EMAIL PROTECTED]> wrote:
> Dear all:
>      Each time I want to reply the message posted by others, 
> it always says:
>      "Unable to retrieve message [EMAIL PROTECTED]".
>      And I have to post a new message.
>      Why?
> 
> Thanks a lot for your help.

I don't know, but this is a problem that can probably be better 
addressed by the folks over at Google.  It's not a general problem with 
USENET or with this group.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==============================================================================
TOPIC: How to find file descriptor leak
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 6:22 pm
From: albright  

I have a rather large program that talks over the network with another
program. Changes in the behavior of the other program have revealed a file
descriptor leak in my program. What are some ideas and/or techniques I can
use to track down the leak?




==============================================================================
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 8:53 pm
From: "Darryl L. Pierce"  

marko wrote:
> 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();

You don't need to prefetch the sound file. When you call start() it 
fetches it then and it takes just as long as if you called prefetch().

> }
> catch (IOException ex) {}
> catch (MediaException ex) {}
> 
> }
> 
> This method works fine except it has a long delay before sound actually 
> starts playing.

That's the time the system has to spend actually loading the data from 
the input stream. Believe it or not, it can be quite slow reading data 
from the JAR.

> Is it possible to initialize and create player in class constructor and 
> then call start() method on player when needed?

Yes, you can instantiate the player without calling start().

> I tried this but it gives me null pointer exception when I call 
> startplaying() method:

That's because you've declared an instance variable:

>     private Player p;

But then in your constructor you created a local variable with the same 
name:

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

Here you should instead be doing:

       p = Manager.createPlayer(is,"audio/x-wav");

And that will fix *this* problem.

-- 
Darryl L. Pierce <[EMAIL PROTECTED]>
Visit my webpage: <http://mcpierce.multiply.com>
"By doubting we come to inquiry, through inquiry truth."
     - Peter Abelard




==============================================================================
TOPIC: is that ok for the java program that developed using 1.4.2 run on JRE1.5?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/996d43b46bbb7442
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 15 2004 10:04 am
From: "James"  

how do you all keep the old version of java program running while using
latest JRE?
no problem on that?





== 2 of 2 ==
Date: Tues, Dec 14 2004 9:39 pm
From: Chris Smith  

James <[EMAIL PROTECTED]> wrote:
> how do you all keep the old version of java program running while using
> latest JRE?
> no problem on that?

I'm not aware of any problems with this arrangement.  However, you 
should obviously run through all of your regression testing before 
deploying.

-- 
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==============================================================================
TOPIC: Ant documentation in Postscript
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1654fa62142c66cb
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 10:13 pm
From: "JohnP"  

Can anyone point me to a postscript version of the online ant documentation.

Thanks for the help

john






==============================================================================
TOPIC: Casting from Map to String
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/307cc698012a7034
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 11:21 pm
From: Sudsy  


> urlSurveyIdInt = ((Integer) session.getAttribute("surveyid")
> ).intValue();
> 
> The intended behavior is to capture the URL parameter surveyid value
> from a URL such as this:
> 
> http://myDomain.com/survey.jsp?surveyid=1
> Can someone help?
> 
> Thanks in advance

You can't just cast one object type to another. In this case, you
could try something like this:

urlSurveyIdInt = new Integer( session.getAttribute( "surveyid" ) 
).intValue();

This is very basic Java, BTW. Questions like this might be better
directed to comp.lang.java.help in future.

ps. Be sure to catch the NumberFormatException...




==============================================================================
TOPIC: Off JAVA Topic - Billing Rate
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/83b0fce5d3ff0b01
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 12:13 am
From: "Hal Rosser"  


"Nagu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sorry Guys to bring up this questions here.
>
> How can I find out what's the current billing rate for JAVA programmers
> experienced in JSP/ Servlets and EJB in and around New England area (
> USA).
>
> I tried to search through salary.com reports but they were generic.
> Thanks for all your time and patience.
>
> Nagendra

Hire one, and see what the bill is :-)
seriously though - try monster.com - they sometimes list the $$



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.807 / Virus Database: 549 - Release Date: 12/8/2004






==============================================================================
TOPIC: SAAJ's DOM error
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8de339ce1d5af511
==============================================================================

== 1 of 1 ==
Date: Tues, Dec 14 2004 9:21 pm
From: Son KwonNam  

I have the following java SAAJ source code.
----------------------------------------------------------------------
import javax.xml.soap.*;

public class SoapBodyTest {
   /// Field
   /// Constructor
   /// Method
   public static void main(String args[]) throws Exception {
     //SOAPMessage
     MessageFactory messageFactory = MessageFactory.newInstance();
     SOAPMessage requestMessage = messageFactory.createMessage();
     //SOAPPart
     SOAPPart soapPart = requestMessage.getSOAPPart();
     //SOAPEnvelope
     SOAPEnvelope envelope = soapPart.getEnvelope();

     //SOAPFactory
     SOAPFactory soapFactory = SOAPFactory.newInstance();

     //SOAPBody
     SOAPBody body = envelope.getBody();

     //Body Entry
     Name bodyName = soapFactory.createName("sayHello", "ns0", null);
     SOAPBodyElement bodyElement = body.addBodyElement(bodyName);

     // Body Entry's children
     Name childName = soapFactory.createName("String_1");
     SOAPElement childElement = bodyElement.addChildElement(childName);
     Name typeName = soapFactory.createName("xsi:type");
     childElement.addAttribute(typeName, "xsd:string"); // ## LINE 30 ##
     childElement.addTextNode("mincheol");

     //SOAPConnection
     SOAPConnectionFactory soapConnectionFactory = 
SOAPConnectionFactory.newInstance();
     SOAPConnection connection = soapConnectionFactory.createConnection();

     // send message
     SOAPMessage responseMessage = connection.call(requestMessage, 
"http://localhost:9000/hello/webservice";);
   }
}

----------------------------------------------------------------------

This program works nicely with JWSDP 1.1's jar libraries.
But with JWSDP 1.5's jar libraries, This program does not work and shows 
  the following Exception.
----------------------------------------------------------------------
Exception in thread "main" org.w3c.dom.DOMException: NAMESPACE_ERR: An 
attempt is made to create or change an object in a way which is 
incorrect with regard to namespaces.
         at 
com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.checkDOMNSErr(CoreDocumentImpl.java:2327)
         at 
com.sun.org.apache.xerces.internal.dom.AttrNSImpl.setName(AttrNSImpl.java:151)
         at 
com.sun.org.apache.xerces.internal.dom.AttrNSImpl.<init>(AttrNSImpl.java:112)
         at 
com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.java:1959)
         at 
com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.createAttributeNS(SOAPDocumentImpl.java:142)
         at 
com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttributeNS(ElementImpl.java:680)
         at 
com.sun.xml.messaging.saaj.soap.impl.ElementImpl.addAttributeBare(ElementImpl.java:298)
         at 
com.sun.xml.messaging.saaj.soap.impl.ElementImpl.addAttribute(ElementImpl.java:282)
         at SoapBodyTest.main(SoapBodyTest.java:30)
----------------------------------------------------------------------

How to get this program work with JWSDP 1.5??


Thank you in advance.
KwonNam.



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

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