comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Struts validator question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/efe2e9a9cb00c24 * SQL Exception: Too few parameters..... - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3b62748864f8b0a7 * newbie - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ca1e2e741e203cc6 * Is JDK5.0 stable enough? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/db7b3d1aa35d24fb * Eclipse and Sysdeo plugin - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2bf0f1e35fa1efe5 * Image Resizing - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f6023931da0327a * EJB find methods. Why do they return only the primary key? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f78cddca61b64ba * Compiling java code from within Java - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dccb8de6fe57263 * efficient network transfer - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 * tomcat css mime-type - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4f0bba1ea74e6ae5 * UnsupportedEncodingException - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f05a57f2fc1fbd14 * Reading huge text files one line at a time.... - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5297862f47d197a6 * SableVM 1.1.7 (Free Java Virtual Machine) released - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84eb7938c199e506 * request.getHeader - referer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/810ddbb36c621b1f * Telling the truth at interviews for Java positions - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b3bba249c109316a * What does this mean? (The type xxxx.yyyy cannot be resolved. It is indirectly referenced from required .class files) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/da4ccc03f5890f02 * Whiner Alert ! - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b0f39eca4dd2fc5 * Split with regular expressions - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c7dcc86f463c843 * Configuring log4j - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31362c50e1527224 * Problems declaring a function in JSP with Tomcat 5 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d6e1163df177328d * image, upload, resize - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cfc9df2f8f4df252 * Query about compression and decompression in Java using java.util.zip package - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94b99410cf502ba8 ========================================================================== TOPIC: Struts validator question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/efe2e9a9cb00c24 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 9:17 pm From: "nooobody" <[EMAIL PROTECTED]> I am just learning the Struts Validator and have been asked to use it in a new application I am working on. I have it working fine for a simple form but the next form is not so easy. The form is set up as so: 4 radio buttons, each with a textbox beside it. Validation errors are to be displayed just below the textbox that is in error. The logic is: whichever radio button is clicked, the content of the corresponding textbox must be at least one character, and must exist in the database.( requires a database call). The message displayed when the textbox is empty is different from the one displayed when the item is not found in the database. The other textboxes are ignored ( likely they'll be disabled). I wanted to use the validwhen validator but I have not found a way to save an error under a unique key such that it may be identified and displayed under the correct textbox. I have already written the validation code and tested it in the action class. I've now moved it to a class that contains only validation methods. I need to know if there is a way to duplicate something like this: errors.add("uniqueNameToSaveErrorUnder", new ActionError("errors.whatever.rmessage")); by specifying the correct value for an attribute, either in the validator configuration or in the form/field configuration. Thanks Tim ========================================================================== TOPIC: SQL Exception: Too few parameters..... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3b62748864f8b0a7 ========================================================================== == 1 of 2 == Date: Mon, Nov 22 2004 9:20 pm From: [EMAIL PROTECTED] (Aaron B.) I am experienceing a problem that was already brought up on this group five years ago, see http://groups.google.com/groups?hl=en&lr=&threadm=22E71DAEC504D111B78100805FFE9DC71C96B88B%40PFS21&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26q%3Dauthor:pranubha%2540comp.nus.edu.sg%2B To repeat, the problem is as follows. As I'm trying to execute a perfect SQL query thru my java program, I get an SQLException, saying: "Too few parameters. Expected 2", or sometimes "Expected 1". Someone back then suggests to use PreparedStatements instead of normal queries. What is that? I need someone to explain it to me. Thanks a lot! Aaron B. == 2 of 2 == Date: Mon, Nov 22 2004 10:02 pm From: thirdrock <[EMAIL PROTECTED]> Aaron B. wrote: > As I'm trying to execute a > perfect SQL query thru my java program, I get an SQLException, saying: > "Too few parameters. Expected 2", or sometimes "Expected 1". What is happening is that the SQL server is expecting some parameters for your query, and you are not providing them. > Someone > back then suggests to use PreparedStatements instead of normal > queries. What is that? I need someone to explain it to me. Thanks a > lot! You don't have a help file? If you were using the mySQL odbc driver, you would find some sample code in the documentation that would answer your question, but as you haven't even provided information on which sql server you are using, you might find help not forthcoming. Ian ========================================================================== TOPIC: newbie http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ca1e2e741e203cc6 ========================================================================== == 1 of 2 == Date: Mon, Nov 22 2004 9:47 pm From: "Hal Rosser" <[EMAIL PROTECTED]> "Fahd Shariff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > int num = 932; > int sum = 0; > String s = Integer.toString(num); > for (int i = 0; i < s.length(); i++) { > char c = s.charAt(i); > int digit = Integer.parseInt(Character.toString(c)); > sum += digit; > } > System.out.println(sum); > So - now he can cut-n-paste the code - and learn nothing --but the OP's probably not reading this, since he got some code that works. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 11/19/2004 == 2 of 2 == Date: Tues, Nov 23 2004 12:59 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Hal Rosser wrote: > So - now he can cut-n-paste the code - and learn nothing > --but the OP's probably not reading this, since he got some code that works. But the good thing is that the code, which Fahd posted so kindly to three or four newsgroups again and again :-( is a rather bad solution for the problem, and will earn the OP some bad marks <snicker> /Thomas -- ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq ========================================================================== TOPIC: Is JDK5.0 stable enough? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/db7b3d1aa35d24fb ========================================================================== == 1 of 2 == Date: Mon, Nov 22 2004 10:02 pm From: metfan <[EMAIL PROTECTED]> Could it be used for production environment now? Thanks. == 2 of 2 == Date: Mon, Nov 22 2004 11:31 pm From: Peter Ashford <[EMAIL PROTECTED]> metfan wrote: > > Could it be used for production environment now? Thanks. No. It will eat your computer. ========================================================================== TOPIC: Eclipse and Sysdeo plugin http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2bf0f1e35fa1efe5 ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 10:30 pm From: JScoobyCed <[EMAIL PROTECTED]> Hi, I am using Eclipse 3.0 and the Tomcat plugin from Sysdeo. When I have a Tomcat project and I select the option to authorize the update of server.xml, I have an error to "remove context". I can sometimes update the context, and sometimes it failes. When I look at the .log file, it looks it can't find the file: (Note: I cut the classpath "com.sysdeo.eclipse.tomcat" to "c.s.e.t" for readability) On remove context: !ENTRY com.sysdeo.eclipse.tomcat 4 4 Nov 23, 2004 13:23:13.390 !MESSAGE java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:444) at c.s.e.t.TomcatProject.getContextFileName(TomcatProject.java:685) at c.s.e.t.TomcatProject.getContextFile(TomcatProject.java:679) at c.s.e.t.TomcatProject.removeContextFile(TomcatProject.java:706) at c.s.e.t.TomcatProject.removeContext(TomcatProject.java:698) On update context: !ENTRY com.sysdeo.eclipse.tomcat 4 4 Nov 23, 2004 13:07:02.453 !MESSAGE java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:444) at c.s.e.t.TomcatProject.getContextFileName(TomcatProject.java:685) at c.s.e.t.TomcatProject.getContextFile(TomcatProject.java:679) at c.s.e.t.TomcatProject.updateContextFile(TomcatProject.java:666) at c.s.e.t.TomcatProject.updateContext(TomcatProject.java:640) I have checked the path to server.xml is correct in my Tomcat preferences of Eclipse, and the file is read/write. Tomcat version: Version 4.1.x My tomcat home: D:\java\tomcat4.1.30.1 Context declaration mode: server.xml Configuration file: D:\java\tomcat4.1.30.1\conf\server.xml In advanced Tab: Tomcat base: D:\java\tomcat4.1.30.1 I use "tomcat4.1.30.1" because I have also "tomcat4.1.30.2" for other projects. Thank you. JScoobyCed ========================================================================== TOPIC: Image Resizing http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f6023931da0327a ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 11:22 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 22 Nov 2004 19:04:39 -0600, SamMan wrote: > For example, if I have an image 20 pixels by 20 pixels, 40k in size, is > there a way to programmatically make it a 10 x 10, ... Check the examples here.. <http://www.geocities.com/marcoschmidt.geo/java-image-file-code-examples.html> HTH -- 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: EJB find methods. Why do they return only the primary key? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f78cddca61b64ba ========================================================================== == 1 of 1 == Date: Mon, Nov 22 2004 11:24 pm From: "Doug Pardee" <[EMAIL PROTECTED]> > Well-designed implementations draw on the experience gained > through many years and iterations and access methods > which provide the best performance with minimal contention. That is just wishful thinking. The specification for Entity Beans in both EJB1 and EJB2 is such that it is simply not possible to handle entity beans in a performant manner, no matter how clever the container. That is why Marc Fleury chose to extend the EJB specification for JBoss, with the motto of "Real tech not spec". The easiest way to end up with a poorly performing EJB application is to ignore the effect of entity beans involved in transactions. Client access to entity beans is single-threaded, with transactions acting as the locks. As long as each bean is only needed by one client thread, this is no problem. But if you have a popular bean that many or all clients need to access, you can end up with single-threaded behavior (and performance) if you're not careful. Furthermore, during the course of a transaction, each entity bean that is accessed is locked up to that client until the transaction terminates. If you're not paying attention, it's awfully easy to end up locking up a lot of entity beans that you didn't mean to. We've already talked about the "n+1" problem. As noted, this may be able to be circumvented (in some containers) if you know about it. Finders that return multiple beans can be a problem if they return too many. The container may not be able to create that many bean instances. The more rows you lock into your transaction, the more likely that you'll have a conflict. Worse, the database may go into lock escalation. For beans that are essentially read-only data, Commit Option A can help by allowing the bean to cache the data between transactions. However, you need to be wary of triggering lock escalation in the database, because the container is required to lock all data rows being held by Commit Option A beans. For OLAP applications, transactioning is something that you want to avoid. There's no reason to cause any data in an OLAP application to be locked. CMP beans are useless here, but carefully crafted BMP beans can work. One of Marc Fleury's pet peeves about the EJB specification is the requirement that all argument and result data must be serialized and deserialized. That can significantly add to the overhead, which is why JBoss provides an extension to skip that and just pass reference pointers. WebLogic has added a similar extension for Local EJBs. If the application is deployed onto clustered servers, it becomes even more imperative to carefully consider the transaction architecture. And if you're using entity beans, clustered servers make it even harder to create a transaction architecture that doesn't bog down performance. The bottom line is that with entity beans it's easy to make a poorly performing EJB application. You can avoid some of the performance problems by knowing your application well and making adjustments, particularly in the transaction architecture. You can reduce some other performance problems by knowing what extensions your particular container provides: n+1 reduction, serialization elimination, special commit options, etc., while bearing in mind that each of these extensions bypasses some safety feature of the EJB specification. You also need to know if your database uses lock escalation, and if so, how to avoid it. As I said, "Entity Beans... should be approached carefully in any system that is expected to be under heavy load." There are a lot of things that need to be taken into consideration. ========================================================================== TOPIC: Compiling java code from within Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dccb8de6fe57263 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 12:02 am From: Gordon Beaton <[EMAIL PROTECTED]> On Mon, 22 Nov 2004 17:04:06 -0000, Chris Uppal wrote: > Oddly, there does seem to be /something/... > > http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#proginterface > > But there's no equivalent section in the documentation for the > Windows version of the same tool. It's also described in a TechTip from 2003: http://java.sun.com/developer/JDCTechTips/2003/tt0722.html#2 A comment in the article indicates that the technique depends on the Sun JDK, but also refers to the upcoming portable interface. /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: efficient network transfer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 ========================================================================== == 1 of 2 == Date: Tues, Nov 23 2004 12:08 am From: Esmond Pitt <[EMAIL PROTECTED]> Thomas Schodt wrote: > uzon wrote: > >> notice others didn't have a problem understanding my question. > > > Maybe many others either > - did not bother reading your post because it was hard to read, or > - did not bother telling you your post was hard to read since Andrew had > beat them to it. > > OFC you are free to continue to throttle the responses you get > by making your posts hard to read. o_O I really must jump in here. The original post wasn't hard to read at all. It only had two things wrong with it: a missing declaration for 'int i;' and an absence of capitalization. The declaration was obvious and IMHO didn't need to be spelt out. I don't like miscapitalization myself, but this was not the first posting with this these problems and it won't be the last. I had no trouble understanding it whatsoever and it's a shame that so much bandwidth has been wasted on all this nitpicking. It is notable that none of the nitpickers had any idea of a solution. It's also notable that the nitpicking has continued long after the solution was provided. Get over it. EJP == 2 of 2 == Date: Tues, Nov 23 2004 1:28 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Esmond Pitt wrote: > I really must jump in here. The original post wasn't hard to read at > all. It was, at least for me as a non-native speaker. That's why I ignored it. Well, I didn't ignore it immediately, I had a few unfriendly thoughts and then ignored it. But what in general gets worse is the attitude of posters like "uzon", or someone going by the name of "Mike Crabs ([EMAIL PROTECTED])" Message-ID: <[EMAIL PROTECTED]>, Message-ID: <[EMAIL PROTECTED]>. They post anonymously, via google-groups, often posting homework, and simply can't behave at all. They don't take any advice, treat us as there servants and demand to be spoon-feed. This year is the worst I have seen here. There was usually a peek of such people at the start of the US university term each year, which quickly came and quickly went away. But this year it just doesn't stop. And it is not just in .programmer, it happens in all the c.l.j.* groups which I read. Is there a new cheating contest going on at US universities? > It's also notable that the nitpicking has continued long after > the solution was provided. It was bad to provide a solution. This way you encourage the behavior of people like "uzon" or "Mike Crabs". They just learned that all it takes to get their problems fixed it to insult us and treat us like scum, that they just have to push a little bit harder and unfriendlier to get an answer. IMHO, the harder they push, the less useful answers they should get, and the more ridicule they should get. Either they learn and behave, or they go away. /Thomas -- ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq ========================================================================== TOPIC: tomcat css mime-type http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4f0bba1ea74e6ae5 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 12:27 am From: [EMAIL PROTECTED] (jt) > Did you set the mime type in Apache? Yes, when requesting a "css" file through Apache port, the mime type is OK. It appears that putting the directives in a global web.xml file in $TOMCAT_HOME/conf/ solves the problem. It sounds obvious to me to have a global config but no global web.xml (even empty) came with the distribution (, and overloading the global one with a "WEB-INF/web.xml" doesn't work). -- jt ========================================================================== TOPIC: UnsupportedEncodingException http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f05a57f2fc1fbd14 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 12:49 am From: "Boudewijn Dijkstra" <[EMAIL PROTECTED]> "Bill Lattery via JavaKB.com" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Thanks Andrew! > > You method works. > > Now, I have another problem. > > I am working with a Java-based program that performs SNMP. One of the MIB > variables is a 6 byte octet message stream. The program retrieves the > information and saves it on a table as a String. My part of the code must > get the info as a String. I need to convert the String to a byte buffer. > > The problem I have is that not all of the data is encoded properly. > > For example: The MIB variable message is (in decimal): 00 04 -127 12 > -115 -114 If you interpret these as characters (which they are obviously *not*), you get: 0000 <control> NULL 0004 <control> END OF TEXT FF81 HALFWIDTH KATAKANA LETTER TI 000C <control> FORM FEED (FF) FF8D HALFWIDTH KATAKANA LETTER HE FF8E HALFWIDTH KATAKANA LETTER HO Don't expect any encoding to live up to this. Either create the byte array yourself, or do &0xFF on every char and then use getBytes with ISO-8859-1. ========================================================================== TOPIC: Reading huge text files one line at a time.... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5297862f47d197a6 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 12:53 am From: "Boudewijn Dijkstra" <[EMAIL PROTECTED]> "Brock Heinz" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Hello All, > > I've done quite a bit of research on this one and I'm still stumped. > I have an application that reads a text file (up to 100MB in size) one > line at at time, converts the line to XML using Castor (each line is a > specific record) and then sends a JMS message for that line. After > validating the file one line at a time (never reading the entire > contents into memory), I am then confident I can perform the Castor > transformation / send operation. I'm doing something like the > following: > > BufferedReader reader = new BufferedReader(new FileReader(validFile)); > //for each line in the file > for (String line; (line = reader.readLine()) != null;) { > //perform transformation and send > IMessage message = transformer.createMessage(line, msgSelector); > sendMessage(message); > messageSentCount++; > //perform cleanup / logging every 500th message > if (messageSentCount % 500 == 0) { > log.debug("sent message: "+messageSentCount); > log.debug(" - Garbage collecting."); > try { > this.finalize(); > } catch (Throwable t) { > log.warn("Could not finalize - keep on reading anyhow"); > } > } > } > reader.close(); What happens with the IMessage object after it is sent? ========================================================================== TOPIC: SableVM 1.1.7 (Free Java Virtual Machine) released http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84eb7938c199e506 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 12:50 am From: "Grzegorz B. Prokopski" <[EMAIL PROTECTED]> The developers of the SableVM Project are proud to announce the official release of SableVM 1.1.7. SableVM is a liberally licensed Free Java Virtual Machine. See the "About SableVM" section below for more informations about SableVM. Here is a list of the most important changes and new features. In this version, we: - Added a new generational garbage collector (experimental, available on request, by passing --with-gc=gencopy to configure). - Imported a new GNU Classpath CVS snapshot as of Sun Oct 10 18:00:00 UTC 2004. - Added handling of Jar/Zip files on boot classpath. - Made SableVM provide user-friendly failure messages for bootstrap problems. This should get rid of the hated "sablevm: cannot create vm". - Modified class loader to allow for multiple elements and prepending/appending to boot class path. - Added the --with-profiling configure switch to make most internal functions non-"static". - Made sablevm-classpath install its files in standard locations. - Explicitely disallowed compilation of sablevm-classpath with gcj or kjc (as it has never worked reliably). - Made jikes and gcc less verbose by default (to reduce user confusion). - Removed some obsolete code from various places. - Made several bugfixes of: - JNI methods not returning NULL on errors (closes BUG:12). - IsInstanceOf always returning JNI_FALSE (closes BUG:63). - A copy&paste mistake in PopLocalFrame (closes BUG:62). - Several JNI methods not returning NULL on errors (closes BUG:12). - IsInstanceOf always returning JNI_FALSE (closes BUG:63). - "New array" memory allocation size overflow (closes BUG:8). - Out-of-source builds (closes BUG:55). - Handling of 'double' values on ARM. - FPU in 64-bit precision mode on Linux / Intel x86 (closes BUG:1). - F2L, F2I, D2L, D2I not checking for overflows (closes BUG:54). - SIGPIPE killing the VM (closes BUG:51). - GNU make detection on non-GNU/Linux platforms. - Case-insensitive grepping for "Main-Class:" string in MANIFEST.MF. === ABOUT SABLEVM === SableVM is a robust, extremely portable, efficient, and specifications-compliant Java Virtual Machine that aims to be easy to maintain and to extend. It features a state-of-the-art and efficient interpreter engine. Its source code is very accessible and easy to understand. It also has many robustness features that have been the object of careful design. SableVM is a clean-room implementation of the publicly available specifications. SableVM is licensed under the terms of the GNU Lesser General Public License (LGPL). It also uses a modified version of GNU Classpath called sablevm-classpath which is licensed under the terms of the GNU General Public License (GPL) with a linking exception. The license of SableVM (LGPL) was specifically chosen as to maximize your ability to legally link and run popular applications, such as Eclipse (http://eclipse.org) and Ant (http://ant.apache.org), which are licensed in ways which might conflict with the terms of the GNU General Public License (GPL). See the the following link for more information: http://sablevm.org/wiki/License_FAQ The SableVM web site is located at: http://sablevm.org === INSTALLATION === SableVM is available to download from the following locations: - http://sablevm.org/download/release/ - http://sourceforge.net/project/showfiles.php?group_id=5523 You must download both: - sablevm-1.1.7.tar.gz - sablevm-classpath-1.1.7.tar.gz. See the INSTALL file included in the sablevm-1.1.7.tar.gz archive for build environment requirements and installation procedures. We make frequent releases, but we also provide daily snapshots of our "staging" development branch at: http://sablevm.org/download/snapshot/ Note that the code of the staging branch is more robust than the code usually found in the CVS trunk of many other free software projects. The staging branch only contains code that has been first tested by developers within their own sandbox. A detailed explanation of the different development branches is available at: http://sablevm.org/wiki/Development_Branches It is now also possible to run daily snapshots of SableVM with the latest CVS snapshots of GNU Classpath. For details please see: http://sablevm.org/lists/sablevm-devel/2004-November/000223.html === NOTES === We appreciate your feedback. Please feel invited to contact us. See: http://sablevm.org/support.html You can also join us in real-time on the #sablevm IRC channel on irc.sablevm.org (alias: irc.freenode.net, irc.debian.org). === BINARY PACKAGES === Binary packages of new SableVM versions are usually available in the GNU/Linux Debian "unstable" distribution shortly after the official release. These packages normally migrate to the "testing" distribution a few weeks later. Some other GNU/Linux distributions (Gentoo, etc.) and other operating systems (*BSD, etc.) also provide binary packages or a convenient build environment to compile and install sablevm. === Additional Information === You will find a wealth of additional information in SableVM's wiki pages at: http://sablevm.org/wiki/ === CONCLUSION === We wish you great fun using SableVM. Enjoy! The SableVM Project developers -- Grzegorz B. Prokopski <[EMAIL PROTECTED]> SableVM - Free, LGPL'ed Java VM http://sablevm.org Why SableVM ?!? http://sablevm.org/wiki/Features Debian GNU/Linux - the Free OS http://www.debian.org ========================================================================== TOPIC: request.getHeader - referer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/810ddbb36c621b1f ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 1:01 am From: [EMAIL PROTECTED] (hiwa) Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On 22 Nov 2004 11:00:41 -0800, Mark Fitz wrote: > > > request.getHeader("referer"); > ... > > I've tried all these ... > > Stop guessing. Find out what the headers are, using.. > HttpServletRequest.getHeaderNames() And referer can be null. If you don't find it in the getHeaderNames() return value, it is null. HTTP header name is case insensitive. ========================================================================== TOPIC: Telling the truth at interviews for Java positions http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b3bba249c109316a ========================================================================== == 1 of 2 == Date: Tues, Nov 23 2004 1:19 am From: lyallex <[EMAIL PROTECTED]> Hi I know this is not about Java development but I couldn't think of a better place to post it. It certainly affects professional Java personel. I have just escaped from a rather unpleasent organization here in the UK. At both the interviews I attended I made it quite plain that I was after a senior Java developers position. I even made my position clear to the MD. At all times I was assured that the position I was applying for WAS a senior position and the salary appeared to reflect this. In the four and a half months I endured this nightmare I did not recieve a single project that was anywhere near what I would call senior. In fact such projects did not appear to exist in the organization full stop. I spent my time writing documentation and solving networking problems that the IT department appeared unable to fix themselves. I did make a few minor changes to a couple of applications but I guess this amounted to no more that 5% of my working time there. Fortunately I managed to get another job that will start in January. Now I do of course realise that in an organisation of whatever size it is often a requirement that everyone chip in in times of need. BUT that is a whole lot different to the situation I found myself in. Actually this is not the first time that this has happened to me. We are always told that we should never lie on our CVs. I have certainly never lied on mine. It appears however that employers can say whatever they like in interviews with no comeback at all. I have now wasted 4 and a half months of my life in a pointless exercise that has done nothing to advance my understanding of the language. I'd be most interested to hear if others have had similar experiences. Many thanks lyallex == 2 of 2 == Date: Tues, Nov 23 2004 2:40 am From: "dingo" <[EMAIL PROTECTED]> at least you get payed well, if you got that senior salary !! "lyallex" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > I know this is not about Java development but I couldn't think of a > better place to post it. It certainly affects professional Java > personel. > > I have just escaped from a rather unpleasent organization here in the > UK. At both the interviews I attended I made it quite plain that I was > after a senior Java developers position. I even made my position clear > to the MD. At all times I was assured that the position I was applying > for WAS a senior position and the salary appeared to reflect this. > > In the four and a half months I endured this nightmare I did not > recieve a single project that was anywhere near what I would call > senior. In fact such projects did not appear to exist in the > organization full stop. I spent my time writing documentation and > solving networking problems that the IT department appeared unable to > fix themselves. I did make a few minor changes to a couple of > applications but I guess this amounted to no more that 5% of my > working time there. > > Fortunately I managed to get another job that will start in January. > > Now I do of course realise that in an organisation of whatever size it > is often a requirement that everyone chip in in times of need. BUT > that is a whole lot different to the situation I found myself in. > > Actually this is not the first time that this has happened to me. > > We are always told that we should never lie on our CVs. > I have certainly never lied on mine. > It appears however that employers can say whatever they like in > interviews with no comeback at all. I have now wasted 4 and a half > months of my life in a pointless exercise that has done nothing to > advance my understanding of the language. > > I'd be most interested to hear if others have had similar experiences. > > Many thanks > lyallex > > ========================================================================== TOPIC: What does this mean? (The type xxxx.yyyy cannot be resolved. It is indirectly referenced from required .class files) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/da4ccc03f5890f02 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 1:24 am From: Michael Borgwardt <[EMAIL PROTECTED]> Joseph Kelch wrote: > The class in question is being used just fine a few lines above where > this error is being generated. The only difference is that the > reference generating the error is on a static member function. > Non-static references are working just fine. The problem is not in the code you're looking at, or the classes referenced there, but those reference other classes, possibly through several levels of indirection, and somewhere there's a class referenced that can't be found in the classpath. ========================================================================== TOPIC: Whiner Alert ! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b0f39eca4dd2fc5 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 1:05 am From: "ColoNel polyPs" <Extermination of the christian jew cop government is inevitable. Resistance i @futile> "John Doe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Exterminate the christian government I'm still trying to get this goddamned microchip out of my back that George Bush, George Bush, Richard Nixon and the secret service stuck there in 1982. ========================================================================== TOPIC: Split with regular expressions http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c7dcc86f463c843 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 2:18 am From: [EMAIL PROTECTED] (patrik) thanks everybody for the great help :o) -> it works fine ! best regards, patrik ========================================================================== TOPIC: Configuring log4j http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31362c50e1527224 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 2:35 am From: "Manish Hatwalne" <[EMAIL PROTECTED]> How can I configure my og4j properties such that it will put the log in the file where tomcat puts it's log by default. i.e. log/localhost_log.DATE_HERE.txt TIA, - Manish ========================================================================== TOPIC: Problems declaring a function in JSP with Tomcat 5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d6e1163df177328d ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 2:37 am From: [EMAIL PROTECTED] (Neil) I have previosuly written a jsp page that used the syntax <%! to declare some functions and it has worked fine in the past. I have got a new computer and put Tomcat 5.0.29 on and now the pages don't work, it gives the error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 108 in the jsp file: /index.jsp Generated servlet error: C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\index_jsp.java:132: ')' expected { ^ The corresponding line in the code is: <%! public TreeNode buildTree(ResultSet results, TreeNode root, String root) { I have removed the <%! blocks but then it gives me more errors about unexpected declaration, it wants to see a ; Has something changed in the spec about these kinds of declarations? Thanks in advance. ========================================================================== TOPIC: image, upload, resize http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cfc9df2f8f4df252 ========================================================================== == 1 of 2 == Date: Tues, Nov 23 2004 2:39 am From: Lam <[EMAIL PROTECTED]> hi, i use the FileUpload package from Jakarta to upload file some files could be images, and in this case, i must resize these i must use J1.3, so i create an Image object (from awt), i can have width, and heigth, and i can make a scale operation but after this, how can i create a stream from Image object to upload it to database, or something else thanks for any help -- Lam == 2 of 2 == Date: Tues, Nov 23 2004 2:59 am From: Andrew Thompson <[EMAIL PROTECTED]> On Tue, 23 Nov 2004 11:39:35 +0100, Lam wrote: > hi, Hello again. The best group for image related matters is probably c.l.j.gui[1], since images are (often) closely associated with them. [1] <http://www.physci.org/codes/javafaq.jsp#cljg> It would be better to make a single post there, rather than multi-post[2] to c.l.j.p and help. [2] <http://www.physci.org/codes/javafaq.jsp#xpost> -- 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: Query about compression and decompression in Java using java.util.zip package http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94b99410cf502ba8 ========================================================================== == 1 of 1 == Date: Tues, Nov 23 2004 3:05 am From: [EMAIL PROTECTED] (yogesh) I am compressing/decompressing objects and sending them over http as per the article mentioned in the URL below:- http://java.sun.com/developer/technicalArticles/Programming/compression/ However I have a query regarding some code in which the following sequence is depicted. import java.io.*; import java.util.zip.*; public class SaveEmployee { public static void main(String argv[]) throws Exception { // create some objects Employee sarah = new Employee("S. Jordan", 28, 56000); Employee sam = new Employee("S. McDonald", 29, 58000); // serialize the objects sarah and sam FileOutputStream fos = new FileOutputStream("db"); GZIPOutputStream gz = new GZIPOutputStream(fos); ObjectOutputStream oos = new ObjectOutputStream(gz); oos.writeObject(sarah); oos.writeObject(sam); oos.flush(); oos.close(); fos.close(); } } I wanted to know what is the logical explanation of the sequence of the statements marked below GZIPOutputStream gz = new GZIPOutputStream(fos); ObjectOutputStream oos = new ObjectOutputStream(gz); oos.writeObject(sarah); It seems to me that at the time the GZIPOutputStream is created, it is empty and the then the empty stream is passed on to ObjectOutputStream and then objects are written into the stream. It seems to me that the logical sequence should be ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(sarah); oos.writeObject(sam); GZIPOutputStream gz = new GZIPOutputStream(oos); gz.flush (); gz.close(); oos.close(); i.e first the ObjectOutputStream is created,then objects are written onto the stream and afterwards the stream is zipped using GZIPOutputStream. In my code if I try to reverse the order(the second case) I get the error java.io.EOFException at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:200) at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:190) at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:130) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) Why doesnt this work ?. Any help would be greatly appreciated ======================================================================= 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
