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

Today's topics:

* Writing an applet - 5 messages, 4 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65200da724cd6649
* windows authentification - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8644c5ed18884a8c
* Socket Input-/Outputstream - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ce6e806374050fab
* Annotation of enum members (JDK 1.5) - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d424376a1ff858c
* Splitting a full-duplex socket - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299
* MIDP question - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cdf3f531fecfbd65
* midlet jar size limitation on mobile phone - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f80a702787614be
* "Concatenation list" data structure? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7121f0702947556a
* Website for J2ME-aware hardware - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97590ce422d382f9
* freetts - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1fc0fe1fcae4a130
* Mosquitos - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/23688204a3ab9eb2
* Packing JRE - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2
* 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
* database or object design first? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ff1d14124cf18dd8

==============================================================================
TOPIC: Writing an applet
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65200da724cd6649
==============================================================================

== 1 of 5 ==
Date: Thurs, Dec 23 2004 12:37 am
From: [EMAIL PROTECTED] (Mark) 

Would someone please explain to me the code required to change an
application to an applet. I have just started programming java.



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

On 23 Dec 2004 00:37:44 -0800, Mark wrote:

> Would someone please explain to me the code required to change an
> application to an applet. 

It depends on a lot of things.  Some of which are, file access, 
security access in general, file size limitations, Swing/AWT, 
necessity of other external resources/plug-ins or jars...

1) Start by assessing whether the application can successfully
run as an applet.  What does the application do?
2) Once you have determined it is practical, go to the 
application code, which is ..where?

> ..I have just started programming java.

A better group for Java beginners is ..
<http://www.physci.org/codes/javafaq.jsp#cljh>
..but it is unwise to attempt GUI'd applications 
at the beginning, let alone applets..
<http://www.physci.org/codes/javafaq.jsp#appfirst>

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



== 3 of 5 ==
Date: Thurs, Dec 23 2004 2:09 am
From: "justAstudent"  

Hi!
I think <a
href="http://forum.java.sun.com/thread.jspa?threadID=559232&tstart=225";>this
URL</a> should solve your problem.

Happy brewing!




== 4 of 5 ==
Date: Thurs, Dec 23 2004 10:19 am
From: Andrew Thompson  

On 23 Dec 2004 02:09:09 -0800, justAstudent wrote:

> I think <a
> href="http://forum.java.sun.com/thread.jspa?threadID=559232&tstart=225";>this
> URL</a> should solve your problem.

The standard for usenet posts is text only.  Please post 
links in the form..
<http://forum.java.sun.com/thread.jspa?threadID=559232&tstart=225>

Note two things.
1) The leading '<' and trailing '>' preserve long URL's
2) That thread barely scratches the surface.

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



== 5 of 5 ==
Date: Thurs, Dec 23 2004 9:48 am
From: GaryM  

Andrew Thompson <[EMAIL PROTECTED]> wrote in news:8xhq0bf2kg5
[EMAIL PROTECTED]:

> 1) The leading '<' and trailing '>' preserve long URL's

Andrew, That is only for certain readers. The only way to preserve long 
urls it to turn off word wrap (Xnews makes this easy) or use a URL 
redirection service à la tinyurl.com.

Gary




==============================================================================
TOPIC: windows authentification
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8644c5ed18884a8c
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 23 2004 10:00 am
From: "Yoann Poizeau"  

Hi,

my java program use the windows authentification to define if a user can be 
connected
i was used the "net use" command line to test if the password specified by a 
user was correct but with net use i have some times the following error

System Error 1219 has occured.
The credentials supplied conflict with an existing set of credentials .

so i tkink that "net use" is not the good command to use in ma program

Does somebody no a way (in java or with a command line) to test if a windows 
password is correct for a specific user.

Thanks,

Yoann Poizeau 





== 2 of 2 ==
Date: Thurs, Dec 23 2004 1:05 am
From: "Robert kebernet Cooper"  

You will find a much better way to do this here:
http://java.sun.com/products/jaas/





==============================================================================
TOPIC: Socket Input-/Outputstream
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ce6e806374050fab
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 9:20 am
From: Steve Horsley  

Thomas wrote:
> I have the following problem:
> 
> 
> a java application (client) should communicate with a sever, where the
> 
> communication objects are as follows:
> 
> 
> public class Comm_1
> 
> {
> 
> long lSync;
> 
> long lLength;
> 
> CData_1 oData1;
> 
> }
> 
> 
> ....
> 
> 
> public class Comm_1
> 
> {
> 
> long lSync;
> 
> long lLength; // length [byte] of the object
> 
> CData_n oDatan;
> 
> }

You seem to have two different definitions for the same class here, which 
worries
me a bit. I strongly recommend that both ends of the connection use the same
class definition.

> 
> 
> 1) How can I determine the length of an object in order to assign that value
> 
> to o.lLength (I know how to do this by hand);
> 
> 
> 2) Is the ObjectOutputStream ( linked to the socket.getOutputStream() ) the
> 
> stream which I should use for sending the objects?
> 
> 
Don't worry about the length of objects - ObjectInputStream and 
ObjectOutputStream do all of that stuff for you. Just write objects at one end,
and read them at the other end. It all happens as if by magic.

Steve




==============================================================================
TOPIC: Annotation of enum members (JDK 1.5)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d424376a1ff858c
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 10:26 am
From: Emmeran Seehuber  

Tony Morris wrote:

[...]

> You are attempting to get the annotation from the class when it appears on
> the fields (not the class).
> This is perhaps your intention:
> 
>   for (Field f : ByteCode.class.getFields()) {
>    Annotation[] annotations = f.getAnnotations();
>    System.out.println(annotations.length);
>    BCComment comment = f.getAnnotation(BCComment.class);
>    System.out.println(comment);
>   }
> 
> Also, take a look at java.lang.annotation.Target to restrict the
> constructs that a particular annotation can appear on.
> 

Thank you! That works.

cu,
  Emmy




==============================================================================
TOPIC: Splitting a full-duplex socket
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 23 2004 2:22 am
From: "cyberco"  

Hi Steve and Gordon,

Sorry for not being more specific. A full-duplex socket means that you
can simultaneously read and write over the socket. In my case the
client is a mobile phone running J2ME and not all implementations of
the J2ME Virtual Machine (JVM) support full-duplex sockets. For
instance the Nokia 6600 does while the SonyEricsson P900 doesn't. This
is a 'feature' not well documented by phone manufacturers which can
lead to a lot of problems. In my case I'm porting a J2SE application to
J2ME that relies on full-duplex sockets. To make it work on a
SonyEricsson P900 I have change the code to use seperate sockets for
reading and writing to the server. Unfortunately the serverside
application does not support seperate sockets for reading and writing,
so I'm building a proxy that talks to my phoneclient using 2 sockets
and to the server using one socket. In other words the proxy splits a
full-duplex socket. My question is what the easiest (and best) way is
to do this.

Thanks in advance for your time and effort.
Cyberco




== 2 of 2 ==
Date: Thurs, Dec 23 2004 12:47 pm
From: ByteCoder  

cyberco wrote:
> Hi Steve and Gordon,
> 
> Sorry for not being more specific. A full-duplex socket means that you
> can simultaneously read and write over the socket. In my case the
> client is a mobile phone running J2ME and not all implementations of
> the J2ME Virtual Machine (JVM) support full-duplex sockets. For
> instance the Nokia 6600 does while the SonyEricsson P900 doesn't. This
> is a 'feature' not well documented by phone manufacturers which can
> lead to a lot of problems. In my case I'm porting a J2SE application to
> J2ME that relies on full-duplex sockets. To make it work on a
> SonyEricsson P900 I have change the code to use seperate sockets for
> reading and writing to the server. Unfortunately the serverside
> application does not support seperate sockets for reading and writing,
> so I'm building a proxy that talks to my phoneclient using 2 sockets
> and to the server using one socket. In other words the proxy splits a
> full-duplex socket. My question is what the easiest (and best) way is
> to do this.

Just a guess, but is it possible to run a non-blocking serversocket on 
the server and set it te readable and writeable. That way the input and 
output socket (if possible?) on the phone could connect to that NIO 
serversocket?

-- 
-------------
- ByteCoder -           ...I see stupid people
-------------
                    Curiosity *Skilled* the cat




==============================================================================
TOPIC: MIDP question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cdf3f531fecfbd65
==============================================================================

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

You need to roll your own.




== 2 of 2 ==
Date: Thurs, Dec 23 2004 7:19 am
From: "Darryl L. Pierce"  

Darshan Patil wrote:
> How do I accomodate different screen sizes in my midlet. I want to write 
> a game. There is no image scaling routine. Do I need to roll my own or 
> is there another way ?

You would have to create your own code to scale images. And you would 
have to manually load the images from the JAR or persistent storage as 
byte arrays, since the Image class does not give you a method to access 
the raw image data. Finally, you would have to create a new Image object 
each time, or if it's a mutable Image you can render *onto* it.

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




==============================================================================
TOPIC: midlet jar size limitation on mobile phone
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f80a702787614be
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 23 2004 2:31 am
From: "cyberco"  

Limitations are set by both the phone manufacturer and the network
operator. So you'll have to figure out what you're targeting... I
realize how annoying this can be :)  A rule of thumb would be to keep
jars below 100Kb. (NTT Docomo used to have a limit of 30Kb, btw. You
would be amazed what types of games people can create within 30Kb. All
of the NAMCO games for instance). One trick you could pull is download
the media files (images, sound) after the MIDlet is installed and store
them on the scratchpad.




== 2 of 2 ==
Date: Thurs, Dec 23 2004 7:16 am
From: "Darryl L. Pierce"  

John wrote:
> Is there any file size limit on the j2me midlet jar size? 

Not a consistent one, no. Some phones could only handle up to 64k. 
Recently (about a year ago) Sprint upped their size limitation from 64k 
to 100k. My Motorola V400 can handle larger-than-100k JARs when 
installed via datacable but now downloading OTA.

 > It seems that
> some Nokia phones have 100k jar size limit. I have made a program which 
> contains many graphics in it, and it is over 100k. It is not mentioned 
> on Motorola or Samsung phones.

If you're using graphics that *don't* require transparency then you'll 
be better served to convert them to JPG and use that (assuming you're 
now using PNGs which are huge).

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




==============================================================================
TOPIC: "Concatenation list" data structure?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7121f0702947556a
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 2:38 am
From: [EMAIL PROTECTED] 

Hello,

I am interested in a List implementation where an instance is based on
several distinct lists. Operations on the single concatenation list
should be reflected on the base lists.

This would save time when we want to operate on the union of several
lists as a single list, because we would not need to copy elements in
advance.

Does anyone know of such an implementation?

Cheers,

Rodrigo





==============================================================================
TOPIC: Website for J2ME-aware hardware
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97590ce422d382f9
==============================================================================

== 1 of 3 ==
Date: Thurs, Dec 23 2004 2:39 am
From: "cyberco"  

http://www.benhui.net/
(down at the moment, but back up in a short while. Great site)




== 2 of 3 ==
Date: Thurs, Dec 23 2004 12:06 pm
From: Jan Peter Stotz  

Eli schrieb:

> I've been thinking lately in buying a J2ME aware mobile phone. After a
> basic search, I failed to find a website that shows some sort of
> listing of all J2ME-aware hardware (mobile phones, PDAs, ...).
> Do you know of such a website?

Sun has a list of J2ME capable devices including the supported profile.
http://developers.sun.com/techtopics/mobility/device

Jan



== 3 of 3 ==
Date: Thurs, Dec 23 2004 7:14 am
From: "Darryl L. Pierce"  

Eli wrote:
> I've been thinking lately in buying a J2ME aware mobile phone. After a
> basic search, I failed to find a website that shows some sort of
> listing of all J2ME-aware hardware (mobile phones, PDAs, ...).
> Do you know of such a website?

There's a link to one from the J2ME FAQ: 
http://mcpierce.mypage.org/j2mefaq.html

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




==============================================================================
TOPIC: freetts
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1fc0fe1fcae4a130
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 2:49 pm
From: "Ike"  

I was looking at freetts and wondering if anyone is familiar with a
mechanism available in the public domain to go in reverse, from voice to
text? -Ike






==============================================================================
TOPIC: Mosquitos
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/23688204a3ab9eb2
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 9:54 am
From: Darshan Patil  

JScoobyCed wrote:
> Darshan Patil wrote:
> 
>> Anyone play the game mosquitos on the phone ? I really liked the game. D
>> Does anyone know how they manage to track movement using the camera ?
> 
> 
> Hi,
> 
>     I don't know what is Mosquitos, but reading your post let me think 
> it might be a game that you use with the camera.
> The image taken from the camera is read as an array of RGB values (or 
> maybe an optimised version of it to process easierly). Then at a time 
> basis, there is a differential operation performed.
> This is abusively sometimes called "motion detection" or "move detection".
> BTW, I am interested in that game if you could provide some URL :)
> 
> -- 
> JSC
That much I had figured out. What I was looking for is a specific 
algorithm/paper which describes motion detection using images from a 
camera. I know there is image processing involved and have tried a few 
things out but they are either too expensive to do in real time and if 
not arent too good at detecting motion.

The link for the game is
http://www.ojom.com/games/augmentedreality/mosquitos.htm




==============================================================================
TOPIC: Packing JRE
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 23 2004 3:02 pm
From: [EMAIL PROTECTED] 

Andrew Thompson <[EMAIL PROTECTED]> wrote:
> http://www.physci.org/codes/javafaq.jsp#exe

I'm not sure I entirely agree with all the points made in the section
you linked.  For example:

> You lose 'free' upgrades to your program. Anytime your user
> downloads a new faster virtual machine, your app gets a speed boost.
> If you are using an exe, you will not get this benefit.

This could be considered undesirable, as well.  Consider if the user
either actively or passively downloads a newer JVM that has subtle
bugs in the libraries or JIT compiler that did not exist before.

And later:

> Validate the latest versions of the compilation product from the
> vendor. If critical bugs are found, it can't be used to build a
> shipping product until those are addressed. Work that needs to be
> done each time a revision comes out from the vendor.

This could potentially be an even larger problem for Java developers.

A developer that uses a static compiler can continue to use the same
well known static compiler for years.  A Java developer can't be sure
their application will work on JDK 1.5.1 as well or reliably as it did
on JDK 1.5.0, and may have little control over whether or not the user
installs newer versions of the JVM.

Another minor point:

> Then one needs to get all customers to upgrade to the proper
> version. Either have free updates (in which case the business needs
> to absorb the cost of producing updates) or alternatively needs to
> handle clients not all updating.

It's additional work, but not extremely difficult to write an
application that's capable of updating itself to newer versions.  I do
however realize Java Web Start gives you this for free.

This paragraph struck me as very wrong:

> Jon notes futher: When you ship standard Java bytecodes, VM problems
> are the responsibility of the platform or VM vendor. However, when
> you ship compiled binaries, they become your responsibility (even if
> they're actually bugs in the vendor's compilation product).

My personal opinion is that it's dangerously misleading to suggest
that Java developers can pass the blame onto the JVM when their
application fails.  It may be the fault of the JVM, but in my opinion,
the developer needs to take responsibility for what set of tools they
use to make their application available.

There are, in fact, quite a few good reasons for wanting to deliver to
a customer a native .exe with everything statically compiled into it.



== 2 of 2 ==
Date: Thurs, Dec 23 2004 8:16 am
From: Steve Sobol  

IINET wrote:

> Eclipse and JBuilder both, from my personal experience, support "D'n'D"
> GUI designers using a full range of java layouts.
> 
> Not sure what personal expereinces you've had here, but DnD gui development 
> is most definitely not a strength of eclipse - in fact, it is infamous for 
> its poor support here. Are you sure thats what you meant to say? Netbeans is 
> the one with the support here, not eclipse - not by a long shot!

Eclipse is a more stripped-down framework than Netbeans is, which is a good 
thing because Netbeans is a memory hog. I use the Jigloo GUI builder from 
Cloudgarden.com - yes, it's a third-party package but it works very well.

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




==============================================================================
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: Thurs, Dec 23 2004 8:00 am
From: "Adam Maass"  


"Juha Laiho" <[EMAIL PROTECTED]> wrote:
> "Mads" <[EMAIL PROTECTED]> said:
>>Thanks for the quick reply, but what I'm looking for is some kind of
>>setting in Tomcat 5.
>
> AFAIK, no such thing exists -- but you can explicitly compile your
> JSPs before deployment with the Jasper tool included in Tomcat
> distribution. THere are even ready ant tasks to handle the
> compilation.

My employer has standardized on Tomcat as the web engine of choice. The 
modified distribution we're supposed to use does exactly as you suggest --  
compile all previously uncompiled JSPs on webapp startup. I don't know 
exactly how it does what it does, but it does.









==============================================================================
TOPIC: database or object design first?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ff1d14124cf18dd8
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 23 2004 8:13 am
From: The Abrasive Sponge  

fishfry wrote:
> I'm building a relatively small database-driven app. I'm accustomed to 
> first developing the schema and e/r (entity-relationship) model, then 
> writing the code against the db.
> 
> I'm relatively new to the OO way of doing things. Am I really supposed 
> to ignore db design and do my object design first, then use an 
> object-relational mapping layer and never actually do any db design?
> 
> Or is this more theory than practice, and real-world developers still do 
> their db schema design first?
> 
> Any and all viewpoints and suggestions for further reading are welcome.


Not me, objects first! This is particularly useful in knowing what will 
be associations and what will be many-many relationships.  In my 
opinion, you will be working with objects more that the database as a 
programmer.  In addition to what I wrote, mapping tools like Hibernate 
can do the work of building the database schema (with referential 
integrity) automatically, so as a developer, you are moving more and 
more from the database side to the object oriented side.




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

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