comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * How to set unicode for JTree's Content - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/624f59fb5506480a * Hibernate and JDK 1.5 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d31ff97d182a4815 * Classes in jar can't load - why? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dc2f55bd4b5e0165 * Java Game Development SDK (Shadowed Horizons) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e39c25c54f64d4c2 * learning Java - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618f7cdb06ff4e63 * JAXB : how to get the list of allowed values from an enumeration facet ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a09f533eb9f4a4e0 * tell JVM to give back memory to OS - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9ea4c623347af45d * Captcha - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1d31089265724c7f * what is a design pattern and a framework - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94501b11b82cdbb2 * NIO CPU Anomaly - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/987b5a76739f16c8 * How to find file descriptor leak - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b * Setting Java Virtual Memory - 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/991635c2a770e75c * JSP and XSSI Logic - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/576bc82c8c60ad25 * conversion of text into image - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4062be83ef24b8e2 * jsp populate a listbox without blocking the user (iframe?) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2d8ffd33a7c1a5fa * Aw Ma - Do I *have* to use tags? ;-( - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9fcfc4eec9ac055f * how to use binary tree - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5300aab5d4e1846e ============================================================================== TOPIC: How to set unicode for JTree's Content http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/624f59fb5506480a ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 12:46 am From: "J2EEStar" Hi, i am doing downloadable web publisher for "thai" language books. In this i have to change the content of JTree Leaf in Thai look. but is look like กขฃคฅฆง instead of "กขฃคฅฆง " this result. Could u help me? J2EEStar. ============================================================================== TOPIC: Hibernate and JDK 1.5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d31ff97d182a4815 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 3:05 am From: john martin Michael Borgwardt wrote: > john martin wrote: > >> Does the current release of Hibernate support JDK 1.5 at all? The >> documentation I can find seems to imply that only 1.4 is supported, >> but it doesn't explicitly say so. It'd be nice to be able to use >> generics. > > > Hibernate certainly *runs* on 1.5, and generics are no problem either > for the persistence mechanism itself. What's not going to work is > specifying > parametrized types in the mapping files, and the tool that generates > mapping > files from Java classes probably won't work either. ok, thanks for the info. ============================================================================== TOPIC: Classes in jar can't load - why? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dc2f55bd4b5e0165 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 10:08 am From: "Jack Andersson" > > ...I'm using the AntBuild so I > > woudn't be able to post the jar command. > > Unless you learn how to do these things from the command line, > your next ten(+) questions will have you blaming this tool or that, > for errors that are your own. > I haven't said that the errors aren't mine. Believe me, I tried using the command line version of jar. What happened? The jar crashes and spits out 7589342573489 strange characters including the bell one, which made my computer sound like a fire alarm. That in turn made my collegues rather upset. I won't use the command line jar again unless I'm completely alone. ============================================================================== TOPIC: Java Game Development SDK (Shadowed Horizons) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e39c25c54f64d4c2 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 1:23 am From: [EMAIL PROTECTED] Hello, I have just released my first Java version of my Gaming SDK on Sourceforge, I am actively seeking assistance with this project, and apologize for the mass USENET posting, but please check out the link if you are interested, and feel free to contact me, or post your thoughts in response to this. http://sourceforge.net/projects/shadowed ============================================================================== TOPIC: learning Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/618f7cdb06ff4e63 ============================================================================== == 1 of 2 == Date: Thurs, Dec 16 2004 10:41 am From: Michael Borgwardt [EMAIL PROTECTED] wrote: > Hey peeps, wats up. > I am a CS student from Chicago. The thing is, I am in MS now, but didnt > have Java in my undergrad. So now have to learn it from scratch. I know > C, C++. So people told me it should not be hard for me. Lets see. > Can I have some guidelines on how should I approach the learning? I > have a 'Complete Reference: Java 2'. Does anyone know have any e-books > or something that is better than a Book? This one is often recommended: http://www.mindview.net/Books/TIJ/ == 2 of 2 == Date: Thurs, Dec 16 2004 8:15 am From: "Tom Dyess" There is a decent Java section on OraclePower.com that I've been adding too. It's all the articles I've found useful (I just came over from Delphi) http://www.oraclepower.com/WebPortal/webportal?aid=sc&cat_id=1187 <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey peeps, wats up. > I am a CS student from Chicago. The thing is, I am in MS now, but didnt > have Java in my undergrad. So now have to learn it from scratch. I know > C, C++. So people told me it should not be hard for me. Lets see. > Can I have some guidelines on how should I approach the learning? I > have a 'Complete Reference: Java 2'. Does anyone know have any e-books > or something that is better than a Book? > OKay Frienz... See You, keep in touch. > -raj. > ============================================================================== TOPIC: JAXB : how to get the list of allowed values from an enumeration facet ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a09f533eb9f4a4e0 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 1:48 am From: [EMAIL PROTECTED] (Jean-Marie Condom) hello I specified in my xml schema a restriction on values for attribute typeArea <xsd:attribute name="typeArea" type="typeArea"/> <xsd:simpleType name="typeArea"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="CIRCLE"/> <xsd:enumeration value="POLYLINE"/> <xsd:enumeration value="POLYGONE"/> <xsd:enumeration value="RING"/> <xsd:enumeration value="COMPOUND"/> </xsd:restriction> </xsd:simpleType> is there a way from the generated java code (using jaxb) to get the list of allowed values for typeArea that is ("CIRCLE","POLYLINE","POLYGONE","RING","COMPOUND") thanks in advance Jean-Marie ============================================================================== TOPIC: tell JVM to give back memory to OS http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9ea4c623347af45d ============================================================================== == 1 of 4 == Date: Thurs, Dec 16 2004 1:53 am From: "HK" >From Runtime.freeMemory() and Runtime.totalMemory() I see that my main data structure uses 250MB of memory. Setting up the data structure is quite costly and the JVM allocated 1000MB to get it done. Now the 750MB are reported as free by the above mentioned method. I also tried to serialize the data structure and read it in again, but the result is only marginally better, i.e. 600MB free after the data structure is in memory. Is there any way to tell the JVMs memory management system to eventually give back large chunks of free memory to the OS? I know that malloc() does that if possible. I am using 1.4.2, but having a solution on with 1.5 (5.0?) would make me switch. Harald. == 2 of 4 == Date: Thurs, Dec 16 2004 10:56 am From: Michael Borgwardt HK wrote: > Is there any way to tell the JVMs memory > management system to eventually give back > large chunks of free memory to the OS? I know > that malloc() does that if possible. You probably can achieve that with HotSpot#s MaxHeapFreeRatio command line option: http://java.sun.com/docs/hotspot/VMOptions.html == 3 of 4 == Date: Thurs, Dec 16 2004 11:30 am From: "Chris Uppal" HK wrote: > > From Runtime.freeMemory() and Runtime.totalMemory() I > see that my main data structure uses 250MB of > memory. Setting up the data structure is quite > costly and the JVM allocated 1000MB to get > it done. Now the 750MB are reported as free by > the above mentioned method. > > I also tried to serialize the data structure If you're happy with serialising it, then maybe you could consider breaking your application into two programs. One that builds the datastructure and serialises it to disk (then exits) and the other that reads it from disk and then goes ahead and does useful things with the data. If the initial structure is expensive to compute, then that might even help your app start-up faster if you can re-use the result of one "building" pass in several subsequent runs of your app. -- chris == 4 of 4 == Date: Thurs, Dec 16 2004 3:33 am From: "HK" Michael Borgwardt wrote: > HK wrote: > > Is there any way to tell the JVMs memory > > management system to eventually give back > > large chunks of free memory to the OS? I know > > that malloc() does that if possible. > > You probably can achieve that with HotSpot#s MaxHeapFreeRatio > command line option: http://java.sun.com/docs/hotspot/VMOptions.html Thanks for the hint. Last time I tried, this did not work. Now I tried again and it kind of works. I have to call Runtime.gc() a few times "by hand" even after freeMemory and totalMemory show a high FreeRatio. I can only guess that the reason is that a very small number of objects is created and destroyed after the big data structure is up and running. Any ideas when/how to call GC or is there still another of the many options of the VM which may help? Harald Kirsch ============================================================================== TOPIC: Captcha http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1d31089265724c7f ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 11:58 am From: Peter Morn Hi, i'm looking for a small and easy to use Captcha-Generator. I know the JCaptcha project. But it's a bit to complicated and too large for my purposes. Is there anywhere a easy to use free class to use on a server, preferable as a Servlet? (I know various PHP-Script, but I need Java) TIA Pete ============================================================================== TOPIC: what is a design pattern and a framework http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94501b11b82cdbb2 ============================================================================== == 1 of 2 == Date: Thurs, Dec 16 2004 7:16 pm From: "IINET" re: You know, there's this really great thing called a "search engine". http://www.google.com/ Don't be such a dick - its a perfectly reasonable question. I use search engines AND newsgroups, as do many people. "Michael Borgwardt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Shriram wrote: > >> hi.. >> could any one explain what a design pattern means ... > > An abstract, reusable and named description of a solution to a common > design problem. > > >> also what si COTS, > > Commercial off-the-shelf. Software you buy and customize yourself (or not > at all) > as opposed to having ir programmed or customized for you by the maker. > > >> frameworks, > > A collection of software components and design conventions on how to use > them > which are supposed to save a lot of time when developing applications - > usually > frameworks are specialized on a particular kind of application. > > >> etc > > You know, there's this really great thing called a "search engine". > http://www.google.com/ == 2 of 2 == Date: Thurs, Dec 16 2004 1:20 pm From: Michael Borgwardt IINET wrote: > You know, there's this really great thing called a "search engine". > http://www.google.com/ > > Don't be such a dick - its a perfectly reasonable question. No, it is not, because it's trivial to find the answer yourself, leaving more time on the NG for answering more difficult questions. > I use search > engines AND newsgroups, as do many people. That's fine, as long as you use search engines *first* and ask on newsgroups only if the search engine did not provide an adequate answer. ============================================================================== TOPIC: NIO CPU Anomaly http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/987b5a76739f16c8 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 10:03 am From: "Stefan Schulz" On 14 Dec 2004 22:41:28 +0100, Gordon Beaton <[EMAIL PROTECTED]> wrote: > Well, generally you should post a relevant section of code, ideally > something short that compiles and has the problem you describe. > > However I suspect that you need to remove the SelectionKey from the > selection Set, or select() will immediately return the same key again > (even though it might not be ready). Something like this: > /gordon Another thing that comes to mind is that you might have switched some Channel to non-blocking IO, and read it as if it was blocking, which results in hundreds of read-calls all returning no new data. -- Whom the gods wish to destroy they first call promising. ============================================================================== TOPIC: How to find file descriptor leak http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c324f3cfb9bae16b ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 11:32 am From: "Tim Ward" "albright" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 15 Dec 2004 18:48:18 +0100, Gordon Beaton wrote: > > > > On Linux you can look in the process' fd directory in the process file > > system (e.g. /proc/pid/fd/) to see what the open descriptors refer to. > > Other platforms with a process file system most likely offer a similar > > facility. > > Now why didn't I think of that? It's a windows app but I have a Linux > development environment at home. It's a pretty sad statement when your > home is better equipped to do your job then your office. Uh?? Well, if you want to know what files are open on Windows you use Windows tools ... duh!! -- Tim Ward Brett Ward Limited - www.brettward.co.uk ============================================================================== TOPIC: Setting Java Virtual Memory http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/991635c2a770e75c ============================================================================== == 1 of 4 == Date: Thurs, Dec 16 2004 3:35 am From: [EMAIL PROTECTED] (Sandesh Pai) Hi, Often I get 'out of memory exception'. So I want to increase the memory. Please any one tell me how to set the java virtual memory settings. Thanx Sandesh Pai == 2 of 4 == Date: Thurs, Dec 16 2004 12:49 pm From: "Skip" > Hi, > Often I get 'out of memory exception'. So I want to increase the memory. > Please any one tell me how to set the java virtual memory settings. > Thanx > Sandesh Pai java -msXXm -mxXXm <normal arguments> ms is initial heap-size mx is maximum heap-size == 3 of 4 == Date: Thurs, Dec 16 2004 3:49 am From: "HK" Sandesh Pai wrote: > Hi, > Often I get 'out of memory exception'. So I want to increase the memory. > Please any one tell me how to set the java virtual memory settings. See the -Xmx option of the JVM. Either run 'java -X' or see the manual page. Example to allocate 900m java -Xmx900m your.class.Here Harald. == 4 of 4 == Date: Thurs, Dec 16 2004 4:03 am From: [EMAIL PROTECTED] Sandesh Pai wrote: > Hi, > Often I get 'out of memory exception'. So I want to increase the memory. > Please any one tell me how to set the java virtual memory settings. > Thanx > Sandesh Pai You are probably instantiating too many objects. Review your code. A common cause of this is using the '+=' construct to concatenate strings. Every time this is used, a StringBuffer is instantiated. ============================================================================== TOPIC: JSP and XSSI Logic http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/576bc82c8c60ad25 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 11:48 am From: "Stuart Palmer" Hi everyone, I am using a JSP bean to pull in values from a form. For technical reason I cannot use any other JSP code to do anything else on the page, but I can use XSSI code. getAdditionalFieldValue is the bean function. ---------------------- My plan was this: <[EMAIL PROTECTED] var="option_1" value="<%=getAdditionalFieldValue("option_1")%>"%> <[EMAIL PROTECTED] var="option_2" value="<%=getAdditionalFieldValue("option_1")%>"%> <br /> <[EMAIL PROTECTED] var="option_1"%><br /> <[EMAIL PROTECTED] var="option_2"%><br /> <br /> <[EMAIL PROTECTED] expr="($option_1 = Yes) && ($$option_1 != null)"%> Option 1 selected<br /> <[EMAIL PROTECTED]> <[EMAIL PROTECTED] expr="($option_2 = Yes) && ($$option_2 != null)"%> Option 2 selected<br /> <[EMAIL PROTECTED]> ---------------- However, this doens't seem to work, I can't also use standard ssi inclue code. How can I achieve this same solution? Perhaps I have a code error that I am having trouble spotting? If I do something similar with perl, this solution works fine. However, on this server I can only use JSP to pull values from the form via the bean. Many thx for any help. Stu ============================================================================== TOPIC: conversion of text into image http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4062be83ef24b8e2 ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 4:11 am From: [EMAIL PROTECTED] Have you tried netpbm? ============================================================================== TOPIC: jsp populate a listbox without blocking the user (iframe?) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2d8ffd33a7c1a5fa ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 4:13 am From: [EMAIL PROTECTED] (vulkanino) Hi all, I have a problem with my project. I have a JSP page that must do some background database processing, let's say some lengthy operation. The database operations are done using a java bean. I don't want to show the user a "wait please" message that could stay there for a long time. I'd rather like to show a list box on the page, that is populated with strings coming from the bean, to inform the user what is going on. I have done that using an IFRAME, which uses the java bean to do the row-by-row operations and populates the list in the "father" page. That works fine, but if an execption is thrown in the iframe, the error is shown in the iframe itself, which has a size of zero. I can even make the iframe bigger but the error doesn't come in the whole page. Is there a clean way to do that? I've also used javascript to populate the list box, which I don't like (browsers compatibility problems?). How can I have the container page show and update its listbox, without blocking? Is the IFRAME the only method? If I use the IFRAME, how can I "redirect" the errorpage to the caller and not in the IFRAME? Please help, I'm having headaches! Thank you. Here is the code: [...] -- controller.jsp <%@ page errorPage="ErrorPage.jsp" %> [...] <FORM name="container" id="container" method="post" > <SELECT size="15" name="output" id="output"> <OPTION value="0">messages</OPTION> </SELECT> </FORM> <IFRAME id="controller" name="controller" src="iframe.jsp" align="top" scrolling="no" width="0px" height="0px" frameborder="0"> </IFRAME> [...] then in the iframe.jsp: -- iframe.jsp <%@ page errorPage="ErrorPage.jsp" %> <jsp:useBean id="lsf" scope="page" class="com.siae.corrispettivi.LoadSingleFile" /> [...] <SCRIPT type="text/javascript"> var list = parent.document.getElementById("container").output; var i = 0; list[i] = new Option("loading starts", i++, false, true); <% String out_string; while ( lsf.hasElements() ) { out_string = lsf.ReadLine(); %> list[i] = new Option("<%= out_string %>", i++, false, true); <% } </SCRIPT> ============================================================================== TOPIC: Aw Ma - Do I *have* to use tags? ;-( http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9fcfc4eec9ac055f ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 5:22 am From: "milkyway" Hello all, I am a newbie to struts and was in the process of putting something together. From what I can see, one would turn an HTML page to a .jsp page and use the tag libraries to convert what is written in HTML to something "strut-like"? I have a lot of HTML code with me. Do I *have* to use the tag libs for the HTML controls or can I just use them for the ones that will be going back to the server (i.e. going to the container with request.setXXX, session.setXXX, application.setXXX, etc.)? I was using struts because it seems (at least it is advertised) that validation can happen if it is used. For example, if I have an entry field whose value will be sent to a javascript function and then sent to a second field on the screen. The second field (with the correct data) is the one that should go back to the server. Given that that is the case, should I just use a taglib on the second field and not the first - since the second one is the one that will go to the server? The rest of the page can be just regular, old, plane, jane HTML. Can someone provide some insight? Kindest Regards. ============================================================================== TOPIC: how to use binary tree http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5300aab5d4e1846e ============================================================================== == 1 of 1 == Date: Thurs, Dec 16 2004 5:33 am From: Andrew Thompson On 15 Dec 2004 20:01:47 -0800, Beginner wrote: > I don't know how to use the binary group > could you please help me A better group for the moment might be.. <http://www.physci.org/codes/javafaq.jsp#cljh> But please read the entire FAQ first. -- 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 ============================================================================== 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
