comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Displaying blank JLabel Icon. - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8787f391c42b6a42 * What means? How to use : transient keyword! - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbd275113f7f5af * Search for byte pattern in a binary file. - 8 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc671002cbe38f70 * How to construct a MimeMessage when receiving a email containing binary attachment - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/68a91feb0f01a3e0 * I wrote my own Java in BASIC ! ! ! - 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29ec22b23b7d5d6d * Return jbyte to a C function (JNI) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dff0a986d461c81 * explanations about the Decorator design pattern - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cdc793ab3b8e63d7 * How secure is Java? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3 * Environment variable - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962 * poblem with Java ( XP SP2) - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9671bb3935502091 * Garbage from resourceBundle.getObject() for Japanese - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f206e906199c9ae * How to use javamail with Lotus Server? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e30cbaaebd76bf67 * CORBA or some other methodology? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7b217bf697c503b * Java 1.5 Enums - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8cd26ba0bb283203 * HTTPUnit not working against an https (SSL) site - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d793f5e72fb7839 * The tiger sieves prime numbers - fast! - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/284b01d916553957 * efficient network transfer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 ========================================================================== TOPIC: Displaying blank JLabel Icon. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8787f391c42b6a42 ========================================================================== == 1 of 4 == Date: Wed, Nov 17 2004 10:10 pm From: "Ken Adams" <[EMAIL PROTECTED]> "Chris Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ken Adams <[EMAIL PROTECTED]> wrote: >> How do you go about displaying a blank(invisible) JLabel Icon. Basically >> I >> have a JLabel that represents a playing card, and when the player isin't >> playing I want to set his Icon to be clear, I need to actually set an >> Icon >> because I don't want the panel it's in to be resized. Any suggestions. I >> suppose I got probably just setVisible(false) then true when I need it >> again >> but I would prefer another way. Thanks > > If you want to use an image that just doesn't appear, you can create a > new transparent BufferedImage, and construct an ImageIcon from that. > Or, a little more work but less resource-hungry, you could define a > simple Icon implementation that knows its width and height but does > nothing when asked to paint itself. > > -- > www.designacourse.com > The Easiest Way To Train Anyone... Anywhere. > > Chris Smith - Lead Software Developer/Technical Trainer > MindIQ Corporation How exactly do you go about making this transparent BufferedImage? == 2 of 4 == Date: Wed, Nov 17 2004 10:29 pm From: Chris Smith <[EMAIL PROTECTED]> Ken Adams <[EMAIL PROTECTED]> wrote: > How exactly do you go about making this transparent BufferedImage? > IIRC, if you create a BufferedImage with any color model that includes transparency, it will be transparent to begin with. On further reflection, though, my second suggestion was the better one. This useless image data could get fairly large. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation == 3 of 4 == Date: Wed, Nov 17 2004 11:49 pm From: "Ken Adams" <[EMAIL PROTECTED]> "Chris Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ken Adams <[EMAIL PROTECTED]> wrote: >> How exactly do you go about making this transparent BufferedImage? >> > > IIRC, if you create a BufferedImage with any color model that includes > transparency, it will be transparent to begin with. > > On further reflection, though, my second suggestion was the better one. > This useless image data could get fairly large. > > -- > www.designacourse.com > The Easiest Way To Train Anyone... Anywhere. > > Chris Smith - Lead Software Developer/Technical Trainer > MindIQ Corporation So to do the second suggestion, Should I create a class the implements Icon? If so, How do I override paint to do nothing yet the size of the image takes up any panel it is in? Thanks == 4 of 4 == Date: Thurs, Nov 18 2004 12:48 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Ken Adams wrote: > "Chris Smith" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Ken Adams <[EMAIL PROTECTED]> wrote: >> >>>How exactly do you go about making this transparent BufferedImage? >>> >> >>IIRC, if you create a BufferedImage with any color model that includes >>transparency, it will be transparent to begin with. >> >>On further reflection, though, my second suggestion was the better one. >>This useless image data could get fairly large. >> > > So to do the second suggestion, Should I create a class the implements Icon? > If so, How do I override paint to do nothing yet the size of the image takes > up any panel it is in? > Once you start writing the class that implements the Icon interface, it should be self-evident. Hint : you would need to provide implementations for two methods getIconWidth() and getIconHeight() to get the compiler to compile the class successfully. BK ========================================================================== TOPIC: What means? How to use : transient keyword! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbd275113f7f5af ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 10:24 pm From: [EMAIL PROTECTED] (Se-Jin Park) Hi, there. I'm studing java package, encounted "transient" keyword in its source. what's the mean? and how do I use it? thanks! == 2 of 2 == Date: Wed, Nov 17 2004 10:32 pm From: Chris Smith <[EMAIL PROTECTED]> Se-Jin Park <[EMAIL PROTECTED]> wrote: > I'm studing java package, encounted "transient" keyword in its source. > what's the mean? and how do I use it? The transient keyword is somewhat odd. It's completely non-functional from a language standpoint. However, libraries may inspect a class by reflection and determine which of its fields are declared transient. The intent is that persistence mechanisms, such as serialization, will use transient to ignore certain data that should not be persistently stored. Serialization does, in fact, do this. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: Search for byte pattern in a binary file. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc671002cbe38f70 ========================================================================== == 1 of 8 == Date: Wed, Nov 17 2004 10:35 pm From: "Ryan Tan via JavaKB.com" <[EMAIL PROTECTED]> Hi there, does anyone have a quick way to search for a byte pattern in a binary file? Ie. I have a byte[] with a series of byte values and I want to locate the occurances of this pattern in a binary file. The only way I figure so far is to read the binary file with a reasonable sized byte[] (buffer) and manually comparing it byte by byte. This will take a long time and there is complication in data that crosses two buffers (two reads). Thank you in advance. I'm so glad I discovered this forum today. _____________________ Message posted via http://www.javakb.com == 2 of 8 == Date: Wed, Nov 17 2004 11:05 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 18 Nov 2004 06:35:12 GMT, a new poster via JavaKB.com wrote: *I thought it better to mark this one as specifically off-topic.* > Thank you in advance. I'm so glad I discovered this forum today. Speaking of which, Mike. <http://groups.google.com/groups?threadm=T_idnRm2Yv6czQ_cRVn-gQ%40giganews.com> Thank you for implementing some of the changes suggested. I feel the text on the main page is now much more accurate. Some other matters still require further attention. > _____________________ > Message posted via http://www.javakb.com Note that '_____________________' is *not* a valid sig. delimiter, whereas Thomas suggested '-- ', which is the accepted sig. delimiter. The lack of links to resources on Usenet etiquette is of continued concern. A basic understanding of netiquette will ultimately assist your clients greatly by helping them to get answers, rather then being harangued for - not doing proper research, or - posting to a number of groups (do you offer the ability to post to multiple groups at a time?), or - treating the other posters of the group as if they were a 'help-desk'. -- 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 8 == Date: Wed, Nov 17 2004 11:25 pm From: "Ryan Tan via JavaKB.com" <[EMAIL PROTECTED]> Thank you for your swift reply m Thompson, but what does your post mean? Sorry, I'm a new kid on the block :P _____________________ Message posted via http://www.javakb.com == 4 of 8 == Date: Wed, Nov 17 2004 11:53 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 18 Nov 2004 07:25:42 GMT, Ryan Tan via JavaKB.com wrote: > Thank you for your swift reply m Thompson, but what does your post mean? > Sorry, I'm a new kid on the block :P My apologies Ryan, I was not even sure you would see my post.* I was having a discussion with one of the people who speak for the (new) forum that you are using to post to usenet. Many people who post from forums get confused about what they are actually posting *to*. In this case, you are posting to an usenet news group, and if your ISP carries 'groups' you can access them in your email/news client. One Usenet archive is Google itself, you can find this group here.. <http://groups.google.com/groups?group=comp.lang.java.programmer> But whereas Google have big, friendly help pages like this.. <http://groups.google.com/googlegroups/help.html> that explain (some of) how to get the best of news-groups, other web-interfaces to usenet can be ..less attentive. * Some posts that appear in the group (and on Google) will not appear on the site from which you are posting. In any case. a) Check out the slew of helpful resources in the Java FAQ available at my site. <http://www.physci.org/codes/javafaq.jsp> b) I hope you get the answer you are after. c) Welcome to the group. :-) HTH (..Hope that helps) -- 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 8 == Date: Thurs, Nov 18 2004 12:35 am From: "Ryan Tan via JavaKB.com" <[EMAIL PROTECTED]> Thanks for the explanation Mr Thompson, I'll go have a peek at your website :). I've already searched through comp.lang.java.* at Googlegroup. Thanks for the help :) _____________________ Message posted via http://www.javakb.com == 6 of 8 == Date: Thurs, Nov 18 2004 12:39 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Ryan Tan via JavaKB.com wrote: > Hi there, does anyone have a quick way to search for a byte pattern in a > binary file? Look at (Google for) algorithms like Boyer-Moore, Knuth-Morris-Pratt or Rabin-Karp. /Thomas == 7 of 8 == Date: Thurs, Nov 18 2004 12:52 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Ryan Tan via JavaKB.com wrote: > Thank you for your swift reply m Thompson, but what does your post mean? > Sorry, I'm a new kid on the block :P Andrew's posting was directed at Mike/Michael from javakb. The Usenet postings generated by javakb were initially not very "Usenet compliant". Mike fixed this (thanks Mike!), but apparently missed one change, the change to use a proper sig (sig = signature) delimiter to separate stuff like > _____________________ > Message posted via http://www.javakb.com from the main message. The correct sig delimiter is '-- ' (dash, dash space) as the only contents of a line, and not the '________'. This is AFAIR defined in RFC 1855. The second thing, also directed at javakb was that they apparently forward some of the messages on the board to Usenet, but don't properly educate the users about the customs and expected behavior on Usenet (aka netiquette). If this is all greek to you, just forward Andrews and/or mine posting to Mike or whoever is currently in charge at javakb. /Thomas == 8 of 8 == Date: Thurs, Nov 18 2004 1:17 am From: Frank <[EMAIL PROTECTED]> Andrew Thompson wrote: > Note that '_____________________' is *not* a valid sig. delimiter, > whereas Thomas suggested '-- ', which is the accepted sig. delimiter. > > The lack of links to resources on Usenet etiquette is of continued concern. > > A basic understanding of netiquette While we're on that subject. Perhaps some of us should make an effort to trim their sig to 4 lines or less..? ;) ========================================================================== TOPIC: How to construct a MimeMessage when receiving a email containing binary attachment http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/68a91feb0f01a3e0 ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 11:01 pm From: [EMAIL PROTECTED] (stephan) Hi, We're trying to contruct a MimeMessage with content coming from an email. The email has two parts. One text 8bit encoded ( content-transfer-encoding: 8bit) One binary (gif file) ( content-transfer-encoding: binary). Everything is fine for the text part but the binary part got corrupted: all the LF bytes (0A) are changed to CRLF (0D 0A) which corrupts the picture. Is there something that needs to be done to prevent this conversion ? We also tried 8bit as content-transfer-encoding for the binary attachment without any more success. TIA --stephan == 2 of 2 == Date: Thurs, Nov 18 2004 12:55 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> stephan wrote: > Everything is fine for the text part but the binary part got > corrupted: all the LF bytes (0A) are changed to CRLF (0D 0A) which > corrupts the picture. You can't transport binary as-is in e-mail. Use an encoding, e.g. base64. base64 is commonly understood by mime MUAs, so there shouldn't be a problem at the receiver site to decode and display the image. In general, I would suggest that you familiarize yourself with the relevant e-mail and MIME RFCs. /Thomas ========================================================================== TOPIC: I wrote my own Java in BASIC ! ! ! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29ec22b23b7d5d6d ========================================================================== == 1 of 4 == Date: Wed, Nov 17 2004 11:20 pm From: [EMAIL PROTECTED] (Hans-Marc Olsen) Java was too expensive for me, so I wrote my own Java in BASIC. == 2 of 4 == Date: Wed, Nov 17 2004 11:34 pm From: "KiLVaiDeN" <[EMAIL PROTECTED]> "Hans-Marc Olsen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Java was too expensive for me, so I wrote my own Java in BASIC. I wrote my own BASIC in a HEX editor. So you are nothing to me. K == 3 of 4 == Date: Thurs, Nov 18 2004 12:16 am From: Lothar Kimmeringer <[EMAIL PROTECTED]> On 17 Nov 2004 23:20:31 -0800, Hans-Marc Olsen wrote: > Java was too expensive for me, so I wrote my own Java in BASIC. So Java is now available for C=64? Cool. Regards, Lothar -- Lothar Kimmeringer E-Mail: [EMAIL PROTECTED] PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81) Always remember: The answer is forty-two, there can only be wrong questions! == 4 of 4 == Date: Thurs, Nov 18 2004 1:18 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Hans-Marc Olsen wrote: > Java was too expensive for me, so I wrote my own Java in BASIC. I have written that already in c.l.j.help: This is a prank to flood can.* (no idea what that hierarchy is about) newsgroups with angry responses - see the newsgroup line in the original posting. This is going on for some time now, in many newsgroups. It is best to ignore these posting. If you feel the need to respond, at least remove the other newsgroups from your posting. If you feel the need to "discuss" the "contents", set a follow up to a .advocacy group. /Thomas ========================================================================== TOPIC: Return jbyte to a C function (JNI) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dff0a986d461c81 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 11:39 pm From: Gordon Beaton <[EMAIL PROTECTED]> On 17 Nov 2004 15:42:59 -0800, Ann wrote: > const jbyte *jnistr; > testBuffer(*jnistr,strsize); > When I try to return the jnistr, and accept it as a char parameter > in the C function testBuffer(), I can only read the first letter of > the string and nothing beyond that. That's because you've passed the wrong type to testBuffer(). If jnistr is declared as jbyte*, then *jnistr is a single jbyte, not an array of them. Pass it like this instead: testBuffer(jnistr, strsize); I suspect that testBuffer() is declared incorrectly as well, or that you've ignored warnings from your compiler. /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: explanations about the Decorator design pattern http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cdc793ab3b8e63d7 ========================================================================== == 1 of 2 == Date: Thurs, Nov 18 2004 12:00 am From: [EMAIL PROTECTED] (Jean Lutrin) (snip) > I suppose if I were discussing this design with a collegue, I might say > something like "OK, we'll hack it by wrapping each Inefficient in a new > SomeClass object which delegates everthing /except/ doSomeTask() to that". I've changed the docs in the class to use your sentence (almost), makes sense. :) > ([*] "wrapping" is not a standard Pattern Name, but is just the word that most > people use for when one object is "hidden" inside another which controls or > modifies its behaviour -- there's some overlap with the Decorator pattern) Yup, I noticed about the name "Wrapper" being often mentionned when people talk about the Decorator pattern. Thanks a lot for the detailed explanations about the Decorator pattern, which I find much cleaner and in-depth than most I've found about this pattern. (I need examples, I "understand" code when I see examples, so your post was very helpful!). See you soon on cljp, Jean == 2 of 2 == Date: Thurs, Nov 18 2004 12:27 am From: [EMAIL PROTECTED] (Jean Lutrin) I'm on my way to understanding how the Decorator works (well, at least I hope so)... (snip) > Instead of having /one/ object, of class CountingBufferedStream, > which is also a BufferedStream, and also a Stream, it would > have /three/ objects. A "CountingStream" which wraps a second > object that is a "BufferedStream" which in turn wraps a "Stream". And of course, if we wanted, there could be only two objects. Say, if we don't need the buffering option (in this example), the "CountingStream" could wrap directly the "Stream" !? Which in, in some way, is what makes this pattern really great ? Thanks a lot, Jean ========================================================================== TOPIC: How secure is Java? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 11:59 pm From: Thomas Weidenfeller <[EMAIL PROTECTED]> steve wrote: > looks like the students are upto page 2 in their "how to learn java" > course work. Hiwa is not one of "these" students. He (I assume Hiwa is a male name :-)) is a c.l.j.g regular, and translator of the c.l.j.g FAQ to Japanese. /Thomas ========================================================================== TOPIC: Environment variable http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 11:55 pm From: Thomas Weidenfeller <[EMAIL PROTECTED]> Stefan Poehn wrote: > I can explain in simple words why we want to have an environment variable: > every developer has another folder structure on his harddisk. If you need > the absolute path to the project, you have to store this path outside your > program. This can be done with environment vars or registry entries, and I > really do not want to use the registry. (We are working on Windows only and > do not need to support other platforms). As I wrote, using environment variables for such cases is bad. /Thomas ========================================================================== TOPIC: poblem with Java ( XP SP2) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9671bb3935502091 ========================================================================== == 1 of 2 == Date: Thurs, Nov 18 2004 12:08 am From: [EMAIL PROTECTED] (Ruvim Pinka) Collin <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > > > [...] > > (405)Method not allowed > > > > at > > org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630) > > > > at > > org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128) > > > > at > > org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71) > > [...] > > > > ===== > > > > Does anybody solve such problem ? > > > > Try temporarily turning off the firewall that is included with XP SP2 > and see if that helps. thanks, Certainly, it is first what i done.. - unsuccessful. -- ruv == 2 of 2 == Date: Thurs, Nov 18 2004 12:19 am From: Andrew Thompson <[EMAIL PROTECTED]> On 18 Nov 2004 00:08:49 -0800, Ruvim Pinka wrote: >> Try temporarily turning off the firewall that is included with XP SP2 >> and see if that helps. .. > Certainly, it is first what i done.. If that was before you posted, it might have been useful to mention that. > - unsuccessful. No good. :-( What else did you try? One thing that occured to me vaguely was that it might be a manifestafion of the 'unmsvm.exe' bug, but AFAIU that is not caused or triggered by SP2. Is your URL open to us visiting? If so, what is it? What form of applet element does it use in the HTML.. <APPLET>? <OBJECT>? Paste the applet call (especially if you cannot post the URL). -- 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: Garbage from resourceBundle.getObject() for Japanese http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f206e906199c9ae ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 12:09 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Delia wrote: > I tried saving the .properties file in UTF-8, 16 bit unicode (big and > little endian), but I just get varrying strings of characters that I can't > figure out where they come from. In general, I would suggest you read the documentation for Properties. There you will find out the following: A properties file is supposed to be in ISO Latin-1, and nothing else. If you need characters in a properties file outside the Latin-1 range you need to use the \u.... notation to enter the codes for the characters. If you don't want to type all that by hand, use the native2ascii tool (comes with the JDK) to convert some non Latin-1 file (e.g. UTF-8) to Latin-1 with \u escapes. I suggest you add the conversion via native2ascii to your build system, so the conversion is automated whenever you change the input file. /Thomas ========================================================================== TOPIC: How to use javamail with Lotus Server? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e30cbaaebd76bf67 ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 12:15 am From: "Zsolt" <[EMAIL PROTECTED]> Hi, my application uses javamail to send emails via a SMTP server. Unfortunately in the current case no SMTP server is available (I think because of security), all emails must be sent via a Lotus server. Any idea what I could do? Zsolt ========================================================================== TOPIC: CORBA or some other methodology? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7b217bf697c503b ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 12:25 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Ted Holden wrote: > I've got a situation in which a java applet has to retrieve Applet? Well, consider an application, deployed via JavaWebStart. > information from a server and the process which generates the > information is complex and performance-critical enough that it pretty > much has to be written in C++ asnd not Java. Java performance is in general on par with that of C or C++. It always depends a little bit on who fabricated the benchmarks, if C/C++ or Java comes out better. If you want to have a conservative estimate, than assume that Java is maybe 10% slower than C/C++. > The one thing I know of which does that sort of thing is CORBA. You talk about performance, and then you talk about CORBA? With its huge marshaling/unmarshalling overhead? Well, yes, CORBA can be used to exchange data, but any other TCP or UDP based protocol would do, too. You could build your own, customized protocol (which you can fine-tune to your needs, but which is probably the most work). You could use HTTP + HTML to transport the data, you could (not recommended) use SOAP. Or whatever suits your needs. If you go for an applet, you would have to take care that the Java security mechanisms don't come in your way. E.g. unless the applet is signed, it can't communicate with any other server than the server from which it was loaded. Oh, and if you go for CORBA be prepared that a lot of corporate firewalls have the necessary ports closed, so you need to be prepared to tunnel, or convince people to open the ports. > But then, my knowledge of Java is pretty miniscule. Does anybody have > any reason to believe that there might be any other methodology for > doing that sort of thing, i.e. for allowing a Java applet to access a > server object written in C++ which for any reason might be preferable > to CORBA? Sounds like you already made up your mind and that you want to go for CORBA. CORBA would almost be my last choice, not my first. /Thomas ========================================================================== TOPIC: Java 1.5 Enums http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8cd26ba0bb283203 ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 12:40 am From: [EMAIL PROTECTED] (Jesper Nordenberg) "Tony Morris" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > "Jesper Nordenberg" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > You can skip the map and the int by using the ordinal() method, for > > example: > > > > MyEnum getEnumFor(int value) { > > for (MyEnum v : MyEnum.values()) > > if (v.ordinal() == value) > > return v; > > } > > > > Just remember to store value.ordinal() in the database and don't > > change the order of the enum constant declarations. > > > > /Jesper Nordenberg > > Which incurs a performance overhead (O(n) search time instead of O(1)) and > the other disadvantages that you mention for what advantage? You don't have to keep track of an additional int. If search time is important you could combine ordinal() with a static map like the one you used in your example. /Jesper Nordenberg ========================================================================== TOPIC: HTTPUnit not working against an https (SSL) site http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d793f5e72fb7839 ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 1:06 am From: Bruno Grieder <[EMAIL PROTECTED]> Sam wrote: > I am trying to test a request/response from a https address and > getting the error > > java.lang.RuntimeException: https support requires the Java Secure > Sockets Extension. See http://java.sun.com/products/jsse > > I have the jdk version 1.4.2_05 which says the JSSE is now part of the > jdk. > > I also have > > security.provider.2=com.sun.net.ssl.internal.ssl.Provider > > in my java.security file. > > What am I doing wrong? > > Thanks in advance > > Sam Mhh... Strange. I am using the same version without any issue (on Linux) and I confirm that (contrarily to 1.3) there is no set-up to do at all to use the default Sun libraries. I have tried with the Apache httpclient librairies with similar success. Are you sure you are actually using HTTPSUrlConnections or opening SSLSockets when connecting? bruno ========================================================================== TOPIC: The tiger sieves prime numbers - fast! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/284b01d916553957 ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 1:16 am From: "Peter Luschny" <[EMAIL PROTECTED]> http://www.javajungle.de/math/primes/PrimeNumberSieve.html My intention was to show that the famous algorithm of Eratosthenes (276 - 194 BC) is not a silly hack to teach C-programmers how to flip bits and shift masks, but is a wonderful tool to explore the prime numbers. And to give an up-to-date implementation which makes use of the new features of Java 5. Enjoy! bye, peter ========================================================================== TOPIC: efficient network transfer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 ========================================================================== == 1 of 1 == Date: Thurs, Nov 18 2004 1:36 am From: Esmond Pitt <[EMAIL PROTECTED]> Knute Johnson wrote: > I'm curious how you would set your socket's buffer to 48k. Could you > explain that and what it just what it would do for you? At least 48k. on xDSL it should be nearly 64k. The buffer size should at least equal the bandwidth-delay product. Otherwise you don't have the maximum amount of data in flight so you aren't using the maximum available network capacity. EJP ======================================================================= 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
