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

Today's topics:

* Ant language schema - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/17576f0342c8bb93
* How to get the html output of a local JSP page from my Java code, or use a JSP as an 
HTML templates. - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/da90fb690c6f988a
* JSP Custom Tag problem - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd09a355f208f63e
* JavaMail API - 6 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c9c0c77e9d21c67
* Timeout for InputStream - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b007c3bdd51a445
* Alternative to change log4j logging level at runtime? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9bb8d27d79dac47f
* JBoss and Xalan problem ... - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fb254078872725c2
* Building an Exception Layer - 2 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a8359d1a0e5422fb
* How to find the JRE version used by the processes? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6c633c6de6952c5b
* How do you cast to array? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/884dee2def4bbb47
* How to pass parameters "-Dxxxx" in ANT? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8b8c11b1087a5129
* Unexpected error detected by HotSpot Virtual Machine - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a4915bb278c200dc
* Developing MIDlet for PDAs and cell phones - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5d0109d66581670e
* java program read serial port data unstable at linux - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d982c4f3b3de4fc1
* Can't synchronize between WSAD and CVSNT correctly - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b6cde93780849f1
* Resize border around components - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/361998bd91b9526c
* Method invocation conversion - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a84caa7322a6162d
  
==========================================================================
TOPIC: Ant language schema
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/17576f0342c8bb93
==========================================================================

== 1 of 2 ==
Date:   Tues,   Nov 2 2004 9:21 am
From: [EMAIL PROTECTED] (Arun Hallan) 

[EMAIL PROTECTED] (Arun Hallan) wrote in message news:<[EMAIL PROTECTED]>...
> I'm creating an ant GUI for a uni project.
> I've heard there is no official ant schema, i was wondering if there
> were any unofficial ones floating around on the net??
> 
> By schema, i mean rules that can tell me what tags etc can proceed
> another certain tag. From this it wud make it easier to create a gui
> where the schema can limit certain functions at certain points.
> 
> Thanks


Can anyone help???



== 2 of 2 ==
Date:   Tues,   Nov 2 2004 9:57 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Arun Hallan wrote:

> I'm creating an ant GUI for a uni project.
> I've heard there is no official ant schema, i was wondering if there
> were any unofficial ones floating around on the net??
> 
> By schema, i mean rules that can tell me what tags etc can proceed
> another certain tag. From this it wud make it easier to create a gui
> where the schema can limit certain functions at certain points.

Since ant allows for user-defined tasks, it's impossible to
have an actual fixed schema, you have to take a more dynamic approach.
You might want to take a look at how eclipse's ant editor does it.




==========================================================================
TOPIC: How to get the html output of a local JSP page from my Java code, or use a JSP 
as an HTML templates.
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/da90fb690c6f988a
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 9:22 am
From: [EMAIL PROTECTED] (DigitalUncle) 

How do I invoke a JSP page and get its output (html) within my servlet
code (I don't want to write this to the HTTP Response, I need to use
it in my code).
 
I want to use JSPs as HTML templates for emails. I have a servlet that
will send emails. This servlet needs to invoke a JSP page passing some
parameters by means of GET method. It will then get the output of the
JSP an send it via email.
 
The servlet and the JSP are on the same server!!! How can I invoke the
JSP locally without using URLConnection. Assume I have no idea what
the server name is, and if there is SSL or not.
 
Please help.




==========================================================================
TOPIC: JSP Custom Tag problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd09a355f208f63e
==========================================================================

== 1 of 2 ==
Date:   Tues,   Nov 2 2004 9:23 am
From: "Thomas Hoheneder" <[EMAIL PROTECTED]> 

Hello,

I have written a class that should calculate the n-th power of a given
number, e. g. number=2, power=3 => result=8.
I work with Eclipse 3.0, Tomcat 5.0.28, JDK 1.4.2, J2EE SDK 1.3.1 and I use
a JSP custom tag to display my calculation result.
My scenario consists of four files:
PowerTag.java (the functionality I use as described above)
powertagdemo.jsp (jsp demo page for my Java functionality)
web.xml (deployment descriptor)
mytld.tld (tag library descriptor)
The full code of these files I have summarized in the file
http://www.thomas-hoheneder.de/temp/java/customtag.txt
for better understanding.
My written class implements javax.servlet.jsp.tagext.IterationTag. There's
also a method named doAfterBody() to be implemented and as far as my book
says this function can is invoked iteratively at run time, depending on the
return value defined. With return value EVAL_BODY_AGAIN doAfterBody() is
invoked one more time and with return value SKIP_BODY it is not invoked any
more. This principle I use to calculate the n-th power of my given number.

The problem now is, that the doAfterBody() NEVER gets invoked which is very
surprising to me. My debug output into the Java console evidences this
theory. My JSP always shows 2^3=1 which means that for the result the
initial value of my result variable is token.
What's wrong here? Why does the doAfterBody() method NEVER get invoked
instead of being invoked iteratively?

Any help to this would be very appreciated. Thanks in advance.

Nice greetings from
Thomas




----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



== 2 of 2 ==
Date:   Tues,   Nov 2 2004 10:27 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Thomas Hoheneder wrote:

> Hello,
> 
> I have written a class that should calculate the n-th power of a given
> number, e. g. number=2, power=3 => result=8.
> I work with Eclipse 3.0, Tomcat 5.0.28, JDK 1.4.2, J2EE SDK 1.3.1 and I use
> a JSP custom tag to display my calculation result.

[...]

> My written class implements javax.servlet.jsp.tagext.IterationTag. There's
> also a method named doAfterBody() to be implemented and as far as my book
> says this function can is invoked iteratively at run time, depending on the
> return value defined. With return value EVAL_BODY_AGAIN doAfterBody() is
> invoked one more time and with return value SKIP_BODY it is not invoked any
> more. This principle I use to calculate the n-th power of my given number.

That's a misuse of the iteration mechanism, IMO.  There is no special 
reason why you would need to perform the calculation that way, and in 
fact it's more complicated to do so than to implement only 
javax.servlet.jsp.tagext.Tag and do the computation entirely in 
doStartTag() (or in doEndTag()).

> The problem now is, that the doAfterBody() NEVER gets invoked which is very
> surprising to me. My debug output into the Java console evidences this
> theory. My JSP always shows 2^3=1 which means that for the result the
> initial value of my result variable is token.
> What's wrong here? Why does the doAfterBody() method NEVER get invoked
> instead of being invoked iteratively?

In your test JSP, the custom tag has an empty body.  The JSP tag 
iteration mechanism is skipped in such cases.  This is part of the spec, 
although it isn't very prominent there.  Your code would be much simpler 
if your tag handler subclassed TagSupport and overrode doStartTag() to 
perform and output the computation.  You would need to implement 
setNumber(int) and setPower(int).  Your own code would only need those 
three methods, plus instance variables to hold the two attribute values. 
  Simpler, cleaner, and works.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: JavaMail API
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c9c0c77e9d21c67
==========================================================================

== 1 of 6 ==
Date:   Tues,   Nov 2 2004 9:41 am
From: "TC" <[EMAIL PROTECTED]> 

I have just started reading about this API and found something that
tells me this may not be what I need:

"...users interact with Mail User Agent (MUA) type programs to read and
write emails.  Mail Transfer Agents (MTA) are used to handle the actual
delivery."


I am going to write some code where a process can trigger the need to
send an email.  This will all be batch - no user interaction.  Is it my
understanding that the JavaMail API is pretty much for user-interface?

If this is not what I need, any suggestions?

TIA!



== 2 of 6 ==
Date:   Tues,   Nov 2 2004 10:11 am
From: Sudsy <[EMAIL PROTECTED]> 

TC wrote:
<snip>
> I am going to write some code where a process can trigger the need to
> send an email.  This will all be batch - no user interaction.  Is it my
> understanding that the JavaMail API is pretty much for user-interface?
<snip>

Not at all! JavaMail is commonly used to generate e-mails automatically,
order confirmations, etc. Viewing of mail is typically achieved using a
mail viewer app such as LookOut!, elm, etc. These apps can also create
and send mail. I've got a very simple class I can send you off-ng if
you'd like...

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.




== 3 of 6 ==
Date:   Tues,   Nov 2 2004 10:11 am
From: Eric Sosman <[EMAIL PROTECTED]> 

TC wrote:
> I have just started reading about this API and found something that
> tells me this may not be what I need:
> 
> "...users interact with Mail User Agent (MUA) type programs to read and
> write emails.  Mail Transfer Agents (MTA) are used to handle the actual
> delivery."
> 
> I am going to write some code where a process can trigger the need to
> send an email.  This will all be batch - no user interaction.  Is it my
> understanding that the JavaMail API is pretty much for user-interface?
> 
> If this is not what I need, any suggestions?

    Just because it's called a "user agent" doesn't mean
the "user" must be a person who clicks mice, clacks keys,
or drags and drops dragon droppings.  The "user" can just
as well be an autonomous program, and JavaMail is fine for
what you describe.

-- 
[EMAIL PROTECTED]




== 4 of 6 ==
Date:   Tues,   Nov 2 2004 10:29 am
From: "TC" <[EMAIL PROTECTED]> 

Sudsy wrote:

> TC wrote:
> <snip>
> > I am going to write some code where a process can trigger the need
> > to send an email.  This will all be batch - no user interaction.
> > Is it my understanding that the JavaMail API is pretty much for
> > user-interface?
> <snip>
> 
> Not at all! JavaMail is commonly used to generate e-mails
> automatically, order confirmations, etc. Viewing of mail is typically
> achieved using a mail viewer app such as LookOut!, elm, etc. These
> apps can also create and send mail. I've got a very simple class I
> can send you off-ng if you'd like...

Thanks!  I would like to see the class.



== 5 of 6 ==
Date:   Tues,   Nov 2 2004 10:36 am
From: "TC" <[EMAIL PROTECTED]> 

TC wrote:

> Sudsy wrote:
> 
> > TC wrote:
> > <snip>
> > > I am going to write some code where a process can trigger the need
> > > to send an email.  This will all be batch - no user interaction.
> > > Is it my understanding that the JavaMail API is pretty much for
> > > user-interface?
> > <snip>
> > 
> > Not at all! JavaMail is commonly used to generate e-mails
> > automatically, order confirmations, etc. Viewing of mail is
> > typically achieved using a mail viewer app such as LookOut!, elm,
> > etc. These apps can also create and send mail. I've got a very
> > simple class I can send you off-ng if you'd like...
> 
> Thanks!  I would like to see the class.

metrotex30 at yahoo dot com



== 6 of 6 ==
Date:   Tues,   Nov 2 2004 2:02 pm
From: Sudsy <[EMAIL PROTECTED]> 

TC wrote:
<snip>
> 
> Thanks!  I would like to see the class.

So send me an e-mail so I can send it in the reply.

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.





==========================================================================
TOPIC: Timeout for InputStream
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b007c3bdd51a445
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 10:01 am
From: Knute Johnson <[EMAIL PROTECTED]> 

Manish Hatwalne wrote:

> Is it possible somehow to get an input stream from an HttpURLConnection
> object to timeout on a read() operation?
> How can I do it?
> 
> TIA,
> - Manish
> 
> 

URLConnection.setReadTimeout() if you are using 1.5.

-- 

Knute Johnson
email s/nospam/knute/




==========================================================================
TOPIC: Alternative to change log4j logging level at runtime?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9bb8d27d79dac47f
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 9:36 am
From: Oscar kind <[EMAIL PROTECTED]> 

Earth <[EMAIL PROTECTED]> wrote:
<cut: quote on why automatic configuration reloading in Log4J is unsafe>
> 
> I would to understand the reason and thus, I could try to design a
> solution to this. What does it mean by 'J2EE envrironments where
> applications are recycled'?

In a J2EE application server, servlets may be unloaded at any time. You
know that before that happens, the destroy() method is called, so you can
clean up any background threads.

The Log4J thread that does that however, is not cleaned up. Or at least
there is no guarantee of that. Thus it is unsafe.

However, you can use the configuration methods of Log4J also to
REconfigure: start that background thread to signal changes in the logging
configuration yourself. You can then make sure that background thread is
stopped the the servlet initiating it is destroyed.


-- 
Oscar Kind                                    http://home.hccnet.nl/okind/
Software Developer                    for contact information, see website

PGP Key fingerprint:    91F3 6C72 F465 5E98 C246  61D9 2C32 8E24 097B B4E2




==========================================================================
TOPIC: JBoss and Xalan problem ...
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fb254078872725c2
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 10:15 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Elpecek wrote:

> Hello,
> I'm developping web application with reporting capability. A report is
> generated from XML through XSLT stylesheet. The XSLT file, which I
> prepared, is correct and works fine in XML Spy and under JBoss on JDK
> 1.4.1.
> 
> But a few weeks ago we decided to change JDK to 1.4.2_06 and
> everything collapsed.
> I collected "prefix must resolve to a namespace:" exception.
> After my personal investigation it appeared that Xalan included in
> this version of JDK has a problem with xsl:number element (to be more
> specific: it crashes when it finds xsl:number in the stylesheet).
> 
> I tried to replace Xalan through $JDK$/jre/lib/endorsed directory
> mechanism, and it helped to my report, but JBOSS (3.1.5) started to
> crash (it can't read it's own configuration files). I also tried to
> put there (endorsed dir) older versions of Xalan, but it didn't bring
> any positive effect.
> 
> Is there any other way to cope with this problem?

Have you considered fixing your broken stylesheet?  It apparently does 
not declare the "xsl" namespace prefix before using it.  The fact that 
some XML / XSLT systems may handle it without reporting an error does 
not necessarily mean that it isn't, in fact, in error.

See section 2.1 of the XSLT 1.0 spec for more detail:

        http://www.w3.org/TR/xslt#xslt-namespace

In particular, note that use of XML namespaces to recognize XSLT 
elements is *mandatory*, and that use of "xsl" as a namespace prefix for 
XSLT elements is only a common convention, not a part of the specification.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Building an Exception Layer
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a8359d1a0e5422fb
==========================================================================

== 1 of 2 ==
Date:   Tues,   Nov 2 2004 9:59 am
From: "Rizwan" <[EMAIL PROTECTED]> 

I am trying to build an Exception Layer for a new system. The exceptions I
want to catch are :
* system/configuration failures e.g., Hibernate configuration file missing
etc. (StructureException)
* system access voilation e.g. wrong user id etc. (PermissionException)
* business rules voilation (BusinessRulesException)
* data access voilation (DAOException)

My question is should these above Exception sub-classes be inherited from
Exception or RuntimeException? Please explain why?

In this system I am planning to use Hibernate and Struts. StructureException
will be used in Hibernate and Struts initialization. I was thinking about
creating 2 classes HibernateStructureException and StrutsStructureException
inherited from StructureException and using them in respective code. What do
you guys think?

Thanks

Thanks





== 2 of 2 ==
Date:   Tues,   Nov 2 2004 1:30 pm
From: "Rizwan" <[EMAIL PROTECTED]> 

what i can think of is that PermissionException and BusinessRulesException
inherites from Exception while StructureException and DAOException inherites
from RuntimeException.

"Rizwan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to build an Exception Layer for a new system. The exceptions I
> want to catch are :
> * system/configuration failures e.g., Hibernate configuration file missing
> etc. (StructureException)
> * system access voilation e.g. wrong user id etc. (PermissionException)
> * business rules voilation (BusinessRulesException)
> * data access voilation (DAOException)
>
> My question is should these above Exception sub-classes be inherited from
> Exception or RuntimeException? Please explain why?
>
> In this system I am planning to use Hibernate and Struts.
StructureException
> will be used in Hibernate and Struts initialization. I was thinking about
> creating 2 classes HibernateStructureException and
StrutsStructureException
> inherited from StructureException and using them in respective code. What
do
> you guys think?
>
> Thanks
>
> Thanks
>
>






==========================================================================
TOPIC: How to find the JRE version used by the processes?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6c633c6de6952c5b
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 10:59 am
From: "Larry Barowski" <MElarrybar-AT-eng_DOT_auburnANOTHERDOTeduEND> 


"qazmlp" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My application which is running on a Solaris machine, constitutes of
> lot of Java processes. I know that some of that processes run within
> Java 1.2 environment and other processes run within JRE1.4.
>
> Is there a way to find out what processes use JRE1.2/JRE1.4 (without
> changing the code)?

Starting with Java 1.4.0 or so, this information is at the top of the
thread dump. Send each process a kill -QUIT . The ones with no
version number in the output will be 1.2. You could easily write
a Perl script or something to automate that.






==========================================================================
TOPIC: How do you cast to array?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/884dee2def4bbb47
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 10:59 am
From: "xarax" <[EMAIL PROTECTED]> 

"Joona I Palaste" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> xarax <[EMAIL PROTECTED]> scribbled the following:
> > "Daniel Chirillo" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> I don't know enough about the internals to give you a complete answer.
> >> I'll let someone else provide more details.
> >>
> >> Here's what I've noticed:  Although the compiler will allow you to
> >> downcast arrays, you will always get a ClassCassException if you
> >> downcast an array.
> > /snip/
>
> > Wrong.
>
> > {
> >     String[] sa;
> >     Object[] oa;
>
> >     sa = new String[1];
> >     sa[0] = "Fubar";
> >     oa = (Object[]) sa;    /* upcast OK */
> >     sa = (String[]) oa;    /* downcast OK */
> > }
>
> > That's an example that won't get ClassCastException.
> > The actual component type of the array when the array
> > was created determines how far down you can cast an
> > Object[].
>
> I figure trying to do
> oa[0] = new Integer(1);
> will then throw an ArrayStoreException.

Yes, the assignment must be compatible with the
underlying array element type. The JavaDoc for
ArrayStoreException has your example.






==========================================================================
TOPIC: How to pass parameters "-Dxxxx" in ANT?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8b8c11b1087a5129
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 11:26 am
From: [EMAIL PROTECTED] (Lars Willich) 

Normally (from the command line) I call a certain java class by a line like

java -Dxxxxxx -Dyyyyyy MyMainClass

How do I code the parameters in ANT?

<arg value="-Dxxxxxxx" />
<arc value="-Dyyyyyyy" /> 

does not work

Lars





==========================================================================
TOPIC: Unexpected error detected by HotSpot Virtual Machine
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a4915bb278c200dc
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 11:31 am
From: "Mickey Segal" <[EMAIL PROTECTED]> 

Internet Explorer 6 on Windows XP running Java 1.5 crashed and left a log 
file on the desktop beginning:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c9010f3, pid=1312, 
tid=3304

Is there something one can do with these files?  This crash occurred with a 
very large Java applet and it is unlikely that Sun will want to look through 
tens of thousands of lines of code.






==========================================================================
TOPIC: Developing MIDlet for PDAs and cell phones
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5d0109d66581670e
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 11:57 am
From: "Rhino" <[EMAIL PROTECTED]> 


"Darryl L. Pierce" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Rhino wrote:
>
> >> There's no MIDP 3 expert group. Such matters as the color of
> >> UI widgets is just not important enough to warrant a new specification
> >> and would really just bload the API without providing any real benefit.
> >>
> > I agree that colour alone is probably not a sufficient justification to
> > develop a major new version of the API. However, I imagine other more
> > important expansions of the capabilities of the MIDPs will come along
> > before very long. Or is it more likely that these enhancements will be
> > added to the Personal Basis for specific groups of devices? I'm still
not
> > clear on exactly how these different profiles fit together and how each
> > evolves to meet new requirements.
>
> Personal Basis is a minimal set of the Personal Profile for headless
devices
> and minimal display devices. But, again, there's no MIDP 3 TMK. The EG
just
> released MIDP 2 last year and to start on a third specification now would
> make for an unsteady market and do more harm than good to Java adoption.
>
I get it; no MIDP 3 in the near future ;-) But what *is* the method by which
new functionality will be made possible in PDAs? Surely no one seriously
imagines that no new requirements or facilities will ever be wanted.

For example, if the hardware that could support voice-activated applications
became sufficiently inexpensive that they could be added to PDAs at a
reasonably small cost, how would the software to support voice-activated
components be provided for in PDA software development? Would we get a new
CLDC, new Personal Profiles, or what? Somehow the existing APIs would need
to get enhanced to provide the new methods that would be needed to do
voice-activated code.

By the way, I don't really care about voice-activated in particular, I'm
just using it as an example of something new needing to be supported by
PDAs, cell phones, and other like devices. I'm trying to understand where
the vendors would put the new APIs that would be needed to support new
hardware, regardless of the nature of that hardware.

Rhino






==========================================================================
TOPIC: java program read serial port data unstable at linux
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d982c4f3b3de4fc1
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 1:01 pm
From: [EMAIL PROTECTED] (Raine Wang) 

Hi,

My application needs to communicate with one external device at
windows and linux. At windows, I use the package sun provided and run
stably. But when the same program( of course, there is different with
the device's name :) ) runs at linux(Redhat) using RxTx package, it
always can't get data from port. My program need to send a lot of
times quest to the device and read the response(data) from the serial
port after each request. This process will repeat hundred times. But
the program always can't fully executed. It sometimes will just stay
at the read sentence and wait for data( I am sure the data should be
arrived). When will the program blocked at the read sentence is not
fixed.
program sometimes is blocked at the first time, sometimes after read
several times, sometimes no block at all. But my program running at
windows don't have this kind of problem.  :(

Please give me some ideas. Thanks in advance.

Raine




==========================================================================
TOPIC: Can't synchronize between WSAD and CVSNT correctly
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b6cde93780849f1
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 1:50 pm
From: [EMAIL PROTECTED] (John) 

Hi,
I have the following problem: 

We have HTML templates that we have to develop and in another project
we use WSAD for portlets development. So I thought I could put the
HTMLs under version Control to CVSNT and use WSAD as CVS client.

These templates are on a test-environment on an AS/400, we develop
directly there, and we see immediately the result of the changes (I
know, it's not a good practice to develope onthe server, but at the
moment it is so.)

Resumee: 
- The tHTML tremplates are on a test-environment on the AS/400
- The CVSNT Server is on a Windows XP Server. 
- WSAD is on a Windows XP Workstation. Now the idea: 

I made a "linking import" in WSAD to these templates of the AS/400, so
now I see the HTMLs that resides on the AS/400 in my CVS client in
WSAD (Note: The files resides not on my local workspace C:\). Then I
shared the project containing these HTMLs on the CVSNT Server. The
idea is that when I work on a file, and click on "save", the file is
saved directly on the AS400 and I can see immediately the change the
effect in the browser. What I expected however is that when I
synchronize the folder containing the HTML templates, the CVSNT should
show me the differences, and the I should be able to commit or merge
the files in the CVSNT repository. Instead however, I get the message
that the Workspace on the AS400 is identical with the repository of
the CVS Server. So I cannot see any version history and I con't load
an older version from the CVS repository. The files on the AS400
corresponds always to the files on the CVS repository and this happens
without making a commit, but simply making a "Save".

Do I make something wrong or is it however possible to realize my
idea? In practice I don't want to have a local workspace on my C:\ ,
instead I want to use the server on the AS400 as "locale workspace".

Any suggestion to this procedure/idea? 

Thanks for your answers.

John




==========================================================================
TOPIC: Resize border around components
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/361998bd91b9526c
==========================================================================

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 1:54 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 2 Nov 2004 07:47:54 -0800, Asra wrote:

> I'm making a GUI ..

Best group for GUI questions.
<http://www.physci.org/codes/javafaq.jsp#cljg>

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

== 1 of 1 ==
Date:   Tues,   Nov 2 2004 2:00 pm
From: "Mark Bottomley" <[EMAIL PROTECTED]> 


"Daniel Sjöblom" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Mark Bottomley wrote:
> >
> > iload (local variable containing a)
> > iload (local variable containing c)
> > iadd
> > i2b
> > istore (local variable containing b)
> >
> > this guarantees that the range of the addition result is trimmed to be
> > in the -128..127 range of a valid byte. The bytecodes that generated
> > the parameter for the the method call would compile to something
> > that guaranteed the value was in a range for the appropriate integer
> > subtype before it got to the method call
>
> But it is not enforced by the VM. There is no guarantee that a byte
> passed to a method really is in the byte range, which was the source of
> confusion, since it is (depending on how the text is to be interpreted)
> mentioned as a structural constraint in the spec. It is ok to pass any
> int value to a method taking a byte as argument (in the Sun VMs).
>
> Here is an example demonstrating what I mean (it will happily print any
> int value you pass to it):
>
> public class test.ByteTest extends java.lang.Object
> {
>      public void <init>()
>      {
>         max stack: 1
>         max locals: 1
>
>         0: aload_0
>         1: invokespecial    java.lang.Object.<init>()
>         4: return
>      }
>
>      public static void main(java.lang.String[])
>      {
>         max stack: 2
>         max locals: 1
>
>         0: aload_0
>         1: iconst_0
>         2: aaload
>         3: invokestatic     java.lang.Integer.parseInt(java.lang.String)
>         6: invokestatic     test.ByteTest.method(byte)
>         9: getstatic        java.lang.System.out (java.io.PrintStream)
>        12: ldc              "ok"
>        14: invokevirtual    java.io.PrintStream.println(java.lang.String)
>        17: return
>      }
>
>      public static void method(byte)
>      {
>         max stack: 2
>         max locals: 1
>
>         0: getstatic        java.lang.System.out (java.io.PrintStream)
>         3: iload_0
>         4: invokevirtual    java.io.PrintStream.println(int)
>         7: return
>      }
> }
>
> -- 
> Daniel Sjöblom
> Remove _NOSPAM to reply by mail

Daniel:

    I agree - the difference is that althought a method can take any integer
or subtype as a parameter, the bytecodes provide ways for the compiler to
trim the integers to the requested range. The spec. only states that this is
not the VM's problem. The VM only manipulates 32/64 bit values. It can
logically trim or expand them for further internal use with x2y instructions
and it only really trims or extends them when reading/writing an array.

    The VM was designed to support Java, however it also can and does
support other languages that compile to .class files.

Mark...





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

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

comp.lang.java.programmer
[EMAIL PROTECTED]

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

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

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


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

Reply via email to