comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Is this correct? - 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a53fa92b22178b7e * When the upgrade to Tiger - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5a609be6c073dce * XML XPath support in J2SE 1.4.2? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/928ede936a8e81fb * Tomcat won't start on Windows 2000 server - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5fe68aedd8dff513 * Java and good OO practices question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5af9b2617cafb4f * Java equivalent to these 5 lines of Perl - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d5fbdcdd2a1fedd2 * JDBC and threads - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/32fb485eb74c071 * What is Embedded Java? - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bacf063e98ecf899 * Is Java good for writing simple, yet sleek GUI apps? - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/597623eb2cda9cc3 * Open a windows application in a frame - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/adec14a0c49b8929 * Deep comparison of two objects' graphs - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d32842190daecb83 * Qwiz Online Java/C++ Testing - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/433b20ea1cbf7653 * How to setup a Directory Structure - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/14207bd8aa4d8a79 * JVM Memory Leak - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d9e28f3aa99bb937 * Testing to which extent method calls affect processig speed - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/420f78baefc47a0 * JBuilder applet, adding class to jar - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2929fe5a95b27044 * i18n'ed Character Set in DBMS and tables - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e379b42b2be85e8e * BEA is looking to hire a Customer-centric J2EE Engineer in San Jose: - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d01a2cc15dfadd2d * BufferOverflow exception on SocketChannel.read() - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2d6f1b5b1f73b757 ========================================================================== TOPIC: Is this correct? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a53fa92b22178b7e ========================================================================== == 1 of 4 == Date: Thurs, Sep 9 2004 6:44 am From: "sks" <[EMAIL PROTECTED]> "Andrew Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 09 Sep 2004 11:29:42 GMT, ZOCOR wrote: > > > public class Apple > > { > // you are using the spelling of colour common > // to Australia, Britain and pther obscure places.. It's not our fault you can't spell correctly. == 2 of 4 == Date: Thurs, Sep 9 2004 6:45 am From: Stefan Siegl <[EMAIL PROTECTED]> ZOCOR wrote: > Hi > > public class Apple > { > String colour; > String weight; > > public void method1() > {} > > public String toString() > { > String result = null; > return result = "something"; > } > } //end An additional hint: Strings are immutable, meaning that if you change a String, internally a new String is created! Keep that in mind. If you do a lot of operations on a String, use the StringBuffer class to represent the String Stefan == 3 of 4 == Date: Thurs, Sep 9 2004 7:37 am From: Thomas Schodt <[EMAIL PROTECTED]> sks wrote: > "Andrew Thompson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>On Thu, 09 Sep 2004 11:29:42 GMT, ZOCOR wrote: >> >> >>>public class Apple >>>{ >> >> // you are using the spelling of colour common >> // to Australia, Britain and pther obscure places.. > > > It's not our fault you can't spell correctly. > But he can Color colour; the spelling of the Java class is not his doing... == 4 of 4 == Date: Thurs, Sep 9 2004 8:50 am From: Bryce <[EMAIL PROTECTED]> On Thu, 09 Sep 2004 11:29:42 GMT, "ZOCOR" <[EMAIL PROTECTED]> wrote: >Hi > >public class Apple >{ > String colour; > String weight; > > public void method1() > {} > > public String toString() > { > String result = null; > return result = "something"; > } >} //end > >Question: > >Should the declaration of result be at the instance level or local? Your preference. But its generally good practice to declare your variables only when you need them. for instance, in your toString method, you would want to declare it in the method. Now, given that its a toString() method, it will probably be printing out variables that are class level, such as the colour and weight variables you have. -- now with more cowbell ========================================================================== TOPIC: When the upgrade to Tiger http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5a609be6c073dce ========================================================================== == 1 of 3 == Date: Thurs, Sep 9 2004 6:45 am From: "Ike" <[EMAIL PROTECTED]> NEVER. The language embellishments make it too Java-centric. I want the code I write these days to be as syntactically lowest common denominator as possible. That is, when I write my code in Java, I want to be able to port it to c++, php, .net with as minimal a fuss as necessary if I have to port it. The embellishments in 1.5 strike me as just java-fying up my code evermore. I've learned the hard way over the decades the keep things syntactically as lowest common denominator as possible. Change comes over and over, and we, as programmers always have to adapt. THis should be a major tenet taught in CS classes! -Ike "Berlin Brown" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When are you upgrading your stuff to Tiger. I know a lot of you will > probably play around with, but are you planning to rewrite a majority > of your apps and server installs to work with the new java version > immediately, year, never? I see in terms of the bytecode, a majority > of it will work with 1.4 runtime and the compile time checks and code > dont look that much different. > == 2 of 3 == Date: Thurs, Sep 9 2004 6:49 am From: "xarax" <[EMAIL PROTECTED]> "Berlin Brown" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When are you upgrading your stuff to Tiger. I know a lot of you will > probably play around with, but are you planning to rewrite a majority > of your apps and server installs to work with the new java version > immediately, year, never? I see in terms of the bytecode, a majority > of it will work with 1.4 runtime and the compile time checks and code > dont look that much different. My stuff is delivered in a ZIP containing "jar" files. Can't get much simpler than that. I will likely upgrade to 1.5 when it becomes 1.5.0_01 (meaning the first bug fix is released). I am using NetBeans 3.6; I don't know how much it knows about the J2SE 1.5 stuff, so I'll also wait until NetBeans has full support for 1.5. The features of 1.5 that I want to use immediately are enums and generic types. 2 cents worth. Your mileage may vary. -- ---------------------------- Jeffrey D. Smith Farsight Systems Corporation 24 BURLINGTON DRIVE LONGMONT, CO 80501-6906 http://www.farsight-systems.com z/Debug debugs your Systems/C programs running on IBM z/OS for FREE! == 3 of 3 == Date: Thurs, Sep 9 2004 8:26 am From: [EMAIL PROTECTED] (Jesper Nordenberg) "Berlin Brown" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > When are you upgrading your stuff to Tiger. I know a lot of you will > probably play around with, but are you planning to rewrite a majority > of your apps and server installs to work with the new java version > immediately, year, never? I see in terms of the bytecode, a majority > of it will work with 1.4 runtime and the compile time checks and code > dont look that much different. See: http://groups.google.se/groups?hl=sv&lr=&ie=UTF-8&threadm=41332B70.50206%40yahoo.com&rnum=1&prev=/groups%3Fhl%3Dsv%26lr%3D%26ie%3DUTF-8%26selm%3D41332B70.50206%2540yahoo.com /Jesper Nordenberg ========================================================================== TOPIC: XML XPath support in J2SE 1.4.2? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/928ede936a8e81fb ========================================================================== == 1 of 2 == Date: Thurs, Sep 9 2004 6:54 am From: "xarax" <[EMAIL PROTECTED]> I've tried reading the JavaDocs until my eyes glaze over. I cannot figure out how to do the XPath stuff after building an XML DOM tree. There is a default parser provided (I think it's the apache crimson thing). I need to generate a NodeList of nodes that match an XPath expression, but there's no documentation on how to do that with the standard J2SE 1.4.2 stuff. All of the references in the JavaDoc just provide a link to the w3c.org XML website (just the specifications documentation). I have some other jar files provided by fujitsu and jclark that handle the XPath stuff, but they are non-standard and unsupported. So, I can distribute those with my application. I want to convert to the "standard" supported XPath, but what is it? -- ---------------------------- Jeffrey D. Smith Farsight Systems Corporation 24 BURLINGTON DRIVE LONGMONT, CO 80501-6906 http://www.farsight-systems.com z/Debug debugs your Systems/C programs running on IBM z/OS for FREE! == 2 of 2 == Date: Thurs, Sep 9 2004 7:11 am From: Martin Honnen <[EMAIL PROTECTED]> xarax wrote: > I've tried reading the JavaDocs until my > eyes glaze over. I cannot figure out how > to do the XPath stuff after building an > XML DOM tree. There is a default parser > provided (I think it's the apache crimson > thing). > > I need to generate a NodeList of nodes > that match an XPath expression, but there's > no documentation on how to do that with > the standard J2SE 1.4.2 stuff. All of the > references in the JavaDoc just provide a > link to the w3c.org XML website (just the > specifications documentation). You can do XSLT 1.0 with Java 1.4 using the JAXP interfaces e.g. javax.xml.transform with TransformerFactory An XSLT 1.0 stylesheet can contain XPath 1.0 expressions so that way you can apply XPath expressions but besides that I don't think there is a way to apply XPath expressions in Java 1.4 using the included classes. -- Martin Honnen http://JavaScript.FAQTs.com/ ========================================================================== TOPIC: Tomcat won't start on Windows 2000 server http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5fe68aedd8dff513 ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 7:22 am From: [EMAIL PROTECTED] (Mike Ward) The distro (tomcat 5.5) does not have a startup.bat or shutdown.bat. As stated earlier, there is no info in the logs. Also, I'm runing Java 1.4.2_05. "Liz" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > "Mike Ward" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Downloaded and installed version 5.5 of Tomcat. Go to the bin > > directory and type Tomcat5. It runs for a momment (like 3 seconds) and > > then just exits. No error messages, and nothing in the logs to > > indicate a problem. If I run Apache in a console window (using port > > 8080 like Tomcat), Apache works fine. So why won't Tomcat run? (I'm > > not running Apache when I run Tomcat, IIS is not monitoring port > > 8080). > > > > -- mike > > My distro has startup.bat and shutdown.bat, did you try these? ========================================================================== TOPIC: Java and good OO practices question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b5af9b2617cafb4f ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 7:36 am From: "Richard Molyneux" <[EMAIL PROTECTED]> Hey, I have a question which has been nagging me for quite some time, regarding OO programming (in particular Java). I've written code which passes the instance of a class (called A) as a parameter in the creation of an instance of (another) class (called B). The instance of class A maintains a long term state of the program, while the instances of B merely provide updates to the state of A. Basically, I'm wondering if the use of such practices is wise in regard to OO (despite being technically allowed within Java)? Thanks, Richard. ========================================================================== TOPIC: Java equivalent to these 5 lines of Perl http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d5fbdcdd2a1fedd2 ========================================================================== == 1 of 2 == Date: Thurs, Sep 9 2004 8:13 am From: [EMAIL PROTECTED] (Page) This has got to be the easiest question ever asked on this forum, but since I have very little Java experience and can not seem to find anything about this, I would appreciate if someone could take two minutes and tell me what Java code I would need to get a servlet to perform the following Perl code: open (MYFILE, "filename.pdf") || die; binmode STDOUT; # this line needed for win32 machines but not needed on Unix binmode MYFILE; # this line needed for win32 machines but not needed on Unix print <MYFILE>; close (MYFILE); == 2 of 2 == Date: Thurs, Sep 9 2004 8:25 am From: Michael Borgwardt <[EMAIL PROTECTED]> Page wrote: > This has got to be the easiest question ever asked on this forum, but > since I have very little Java experience and can not seem to find > anything about this, I would appreciate if someone could take two > minutes and tell me what Java code I would need to get a servlet to > perform the following Perl code: > > open (MYFILE, "filename.pdf") || die; > binmode STDOUT; # this line needed for win32 machines but not needed > on Unix > binmode MYFILE; # this line needed for win32 machines but not needed > on Unix > print <MYFILE>; > close (MYFILE); untested: InputStream in = new FileInputStream("filename.pdf"); byte[] buffer = new byte[4096]; int index; while((index = in.read(buffer)) != -1){ response.getOutputStream().write(buffer, 0, index); } in.close(); Has the added benefit that the servlet container will probably give you a nice error page (or at least a detailed log entry) if something goes wrong, e.g. the file doesn't exist. ========================================================================== TOPIC: JDBC and threads http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/32fb485eb74c071 ========================================================================== == 1 of 3 == Date: Thurs, Sep 9 2004 8:34 am From: [EMAIL PROTECTED] (Jonck van der Kogel) Hi, I have a question on threads, probably very basic but I'm having a hard time figuring it out. I've created a little test app for experimentation on this subject. The app shows a JTable that is filled with data from a database. The user can change the data in the JTable wherupon the JTable passes this data to the database. Now this part I would like to do in a different thread, so that the UI is not slowed when communication with the database is taking place. To do this I've created a class has a private class that extends Thread. The run() method of this class is then supposed to do the JDBC stuff like creating a statement and executing the update. However, here I have a problem. The run() method cannot throw an SQLException. I would like the exception to be thrown rather than caught in the run() method, so that I can deal with the exception in my main thread and have the UI respond accordingly (meaning: do not update the tableModel with the newly entered value). Does anyone have any suggestions for me how I could implement this in a different fashion? The aim is to get the JDBC stuff to run in a different thread than the UI does. Thanks very much, Jonck == 2 of 3 == Date: Thurs, Sep 9 2004 9:37 am From: [EMAIL PROTECTED] (Jonck van der Kogel) Hi again, I just realized why the run() method is never going to be able to throw anything: because the code that launched the thread will possibly be beyond the catch block by the time an exception is thrown. So I guess this means that I will have to encapsulate the entire transaction with the database as well as updating the tableModel (or not if an SQLException is thrown) in the run() method? Thanks, Jonck == 3 of 3 == Date: Thurs, Sep 9 2004 9:46 am From: "Matt Humphrey" <[EMAIL PROTECTED]> "Jonck van der Kogel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I have a question on threads, probably very basic but I'm having a > hard time figuring it out. I've created a little test app for > experimentation on this subject. > The app shows a JTable that is filled with data from a database. The > user can change the data in the JTable wherupon the JTable passes this > data to the database. Now this part I would like to do in a different > thread, so that the UI is not slowed when communication with the > database is taking place. To do this I've created a class has a > private class that extends Thread. The run() method of this class is > then supposed to do the JDBC stuff like creating a statement and > executing the update. > However, here I have a problem. The run() method cannot throw an > SQLException. I would like the exception to be thrown rather than > caught in the run() method, so that I can deal with the exception in > my main thread and have the UI respond accordingly (meaning: do not > update the tableModel with the newly entered value). Working with threads requires thinking about things a little differently. If the Thread.run method did throw any kind of exception who would catch it? The UI thread that started the thread is off doing something else and cannot deal with it. If you don't catch that exception your thread will simply die on the spot and you won't have any chance to take useful action. You have to catch the exceptions (all of them, really) within your run method and send the information into the UI thread. Except for a handful of cases, this is ultimately done with the "invokeLater" method (or a variation) which allows you to perform a Runnable (void run()) in the UI thread. The UI thread executes the runnable when it gets around to it. This runnable would then update the JTable, popup dialog boxes, change UI state, whatever you like. There are lots of ways to design this depending on what you're trying to achieve. Having worked on many collaborative / distributed systems I prefer to let the thread task object communicate with my main app via an interface so that it knows nothing about the UI. There are quite a number of important design issues here, including updating the UI, multiple tasks, task thread synchonrization, etc, so it may take you some time to work out what you need. Cheers, Matt Humphrey [EMAIL PROTECTED] http://www.iviz.com/ ========================================================================== TOPIC: What is Embedded Java? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bacf063e98ecf899 ========================================================================== == 1 of 4 == Date: Thurs, Sep 9 2004 9:04 am From: Jacob <[EMAIL PROTECTED]> Franz Bayer wrote: > Try to google, > these are questions which are not answered with a simple statement. I know embedded/real time programming is complex. That's why searching is difficult, as I don't know where to start. Searching for "embedded java" just gives too much noise. Much of the Sun stuff seems to be outdated btw. I'd be grateful for links to where I can start off, and I'll go from there. == 2 of 4 == Date: Thurs, Sep 9 2004 9:21 am From: "Adam" <[EMAIL PROTECTED]> "Jacob" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How is Java made embedded? To which devices > and on what OS platform? > > How are applications developed? How are they > tested and how are they deployed? > > What are the alternative/competing technologies? > Which one is better? Embedded Java is the ancestor of Personal Java VM, which in turn is the ancestor of CDC JVM. Find them on sun's webpage. Devices: for example - set top boxes. Google for Multimedia Home Platform. Applications: with MHP come 'xlets'. Competing technologies: microsoft has something, I'm sure you can easily google it out or find on MS website. Adam == 3 of 4 == Date: Thurs, Sep 9 2004 9:40 am From: Paul Lutus <[EMAIL PROTECTED]> Jacob wrote: >> Try to google, / ... > That's why searching is difficult, as I don't know > where to start. / ... > I'd be grateful for links to where I can start off, > and I'll go from there. Well, you certainly solved the problem that people think you should do your own research using Google. Now the inquiry will be "which Google links shall I use in my independent, original research that will get me a good, undeserved grade?" -- Paul Lutus http://www.arachnoid.com == 4 of 4 == Date: Thurs, Sep 9 2004 10:40 am From: Jacob <[EMAIL PROTECTED]> Paul Lutus wrote: > Well, you certainly solved the problem that people think you should do your > own research using Google. Now the inquiry will be "which Google links > shall I use in my independent, original research that will get me a good, > undeserved grade?" Actually I am considering a concultancy contract on embedded Java, and I am sure there are individuals that work within this field that could give me some advices (i.e. links). As I experienced information overload when Googling I thought it could be of public interest to nail down some quality starting points regarding this topic. And as always: If a posting is outside your interest or liking, just go on to the next one. Please reply only if you have valuable information to share. That will keep the general quality of the NG high. ========================================================================== TOPIC: Is Java good for writing simple, yet sleek GUI apps? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/597623eb2cda9cc3 ========================================================================== == 1 of 3 == Date: Thurs, Sep 9 2004 8:50 am From: [EMAIL PROTECTED] (michael) Tor Iver Wilhelmsen <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Laurens <[EMAIL PROTECTED]> writes: > > > Swing is simply more sluggish because it's layered on top of the > > native UI. It does not hook into the OS event queue the way a native > > UI does. > > Swing components are _painted_ on top of native components. But the > system event model is the same in Swing as in AWT. What Swing has > extra are model events. > > And since 98% of Java code is compiled into native code at runtime > anyway, it's not the "written in Java" aspect of Swing that slows it > down, but rather the amount of events created and sent back and forth. > Experienced Swing programmers reduce this by e.g. unregistering > components with the ToolTipManager. > > > Windows-only > > That's the reason I avoid SWT: It only runs on whatever platform SWT > has been ported to, while the AWT underlying Swing will simply be > there in J2SE. how about an HTML GUI interface ? its fast , easy and reliable. thanks Michael == 2 of 3 == Date: Thurs, Sep 9 2004 9:09 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Laurens coughed up: > Thomas G. Marshall wrote: > >> My [wrong?] understanding is that it sets up a peer relationship and >> uses native windowing components much like the AWT does. > > You are correct. SWT creates native peers and in that respect it > resembles AWT more than Swing. Discussions always revolve around Swing > vs. SWT, while in fact SWT is really an alternative to AWT. > >> This means that it oughta work just fine on all platforms, no? Isn't >> eclipse running on linux, for example? > > Well, I badly worded this in my previous post. What I meant to say is > that SWT works best on Windows. The Linux/GTK implementation, for > instance, has no printing support(or at least not last time I > checked). The Windows implementation obviously gets the highest > priority from the Eclipse team. Arguably, Swing behaves more > consistently across platforms than SWT. > >> Furthermore, I have a question concerning SWT z-order. Z-order was >> one of the great undoings of the AWT, since, for example, the mac >> and the PC layer their components in opposite order. IIRC, the mac >> uses last on top, and the PC uses last underneath, or I may have >> that backwards. >> >> How does the SWT handle that issue? > > Well, if you mean 3D layers then I don't know the answer. (go fixed width font) No, if you have widget1 and then "place" widget2 (in that order), are you guaranteed the following on all platforms? +----------------+ | | | 1 | | | | +-------+------+ | | | | | | | | | +--------+ | | 2 | | | | | +--------------+ Or do you get the following on some, like the mac: +----------------+ | | | 1 | | | | +------+ | | | | | | | | | +--------+-------+ | | 2 | | | | | +--------------+ > SWT does > have a "z-order" concept but that refers to the order in which > controls are laid out in a GridLayout. > > > Regards > -Laurens -- http://www.allexperts.com is a nifty way to get an answer to just about /anything/. == 3 of 3 == Date: Thurs, Sep 9 2004 9:41 am From: Chris Smith <[EMAIL PROTECTED]> michael wrote: > how about an HTML GUI interface ? its fast , easy and reliable. > Depends on what you want to do. There are very serious limitations to what can be done without JavaScript; along with somewhat serious limitations to what can be done with JavaScript. Once JavaScript is added, the "reliable" part goes out the window; there are all sorts of platform-specific, browser-specific, and version-specific behaviors of JavaScript, which are frequently encountered and difficult to avoid. -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: Open a windows application in a frame http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/adec14a0c49b8929 ========================================================================== == 1 of 2 == Date: Thurs, Sep 9 2004 8:53 am From: [EMAIL PROTECTED] (Rod) I am looking to open a windows application in a frame or modal in a web page. In a nutshell we want to create an interface to our AS-400 to show up on one frame in order to navigate in the as-400 and enter notes in another frame, is this even posible? == 2 of 2 == Date: Thurs, Sep 9 2004 9:29 am From: Paul Lutus <[EMAIL PROTECTED]> Rod wrote: > I am looking to open a windows application in a frame or modal in a > web page. In a nutshell we want to create an interface to our AS-400 > to show up on one frame in order to navigate in the as-400 and enter > notes in another frame, is this even posible? Is what even possible? Define your terms. Does "windows application" mean an application that uses windows, an application designed for MS Windows, or something else? Does "in a Web page" mean server-side, client-side, in the Web page or launched from the Web page, or what? What does AS-400 refer to? What does "frame" refer to? HTML frames? As this term is used in Java programming (e.g. JFrame)? What? In summary, there are almost no words in your post on which there is unambiguous agreement as to meaning. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: Deep comparison of two objects' graphs http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d32842190daecb83 ========================================================================== == 1 of 2 == Date: Thurs, Sep 9 2004 9:23 am From: [EMAIL PROTECTED] (Albretch) Michael Borgwardt <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > > > AM: Well, actually this is what I am trying to avoid/work around of. > > Do you know of any libraries to do it? > > Why? Out of lazyness? It could be done via reflection, but would probably > be pretty slow, and it could cause all sorts of problems by not taking into > account class specific things. . . . class specific things . . . Like? == 2 of 2 == Date: Thurs, Sep 9 2004 10:27 am From: Michael Borgwardt <[EMAIL PROTECTED]> Albretch wrote: >>Why? Out of lazyness? It could be done via reflection, but would probably >>be pretty slow, and it could cause all sorts of problems by not taking into >>account class specific things. > > > . . . class specific things . . . > Like? e.g. when a class has fields for internal computations or caching that are not really a part of its state (as far as equality is concerned). Or if there are fields whose values form an equivalence class. ========================================================================== TOPIC: Qwiz Online Java/C++ Testing http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/433b20ea1cbf7653 ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 9:26 am From: [EMAIL PROTECTED] (mind) I am looking for jobs now and the company ask me take online java and c++ testing from Qwiz. I want to prepare for the testing a little bit. Is there any such java/c++ testing questions with answers in the web? If you know, can you please point the website to me? Thanks a lot! ========================================================================== TOPIC: How to setup a Directory Structure http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/14207bd8aa4d8a79 ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 9:51 am From: [EMAIL PROTECTED] (z24) Hello I was wondering if someone could please help me out with a java applet. I was wondering if anyone would know where I can find a applet or script that can display the contents of a directory (ie C:\Windows) in a file structure like Windows Explorer and post that on a website. Thank You in advanced ========================================================================== TOPIC: JVM Memory Leak http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d9e28f3aa99bb937 ========================================================================== == 1 of 2 == Date: Thurs, Sep 9 2004 9:54 am From: [EMAIL PROTECTED] (mon Gars) Hi, Using System.gc(),I manage to have a stabil Memory use for my Java application. Nevertheless is the Memory Use displayed in the Windows Task Manager increasing. Is there any global parameter limiting the JVM OS Resources ? == 2 of 2 == Date: Thurs, Sep 9 2004 10:36 am From: Michael Borgwardt <[EMAIL PROTECTED]> mon Gars wrote: > Using System.gc(),I manage to have a stabil Memory use for my Java application. You should never call System.gc() directly. The JVm does it automatically when necessary. > Nevertheless is the Memory Use displayed in the Windows Task Manager increasing. Then perhaps your application contains a memory leak, i.e. somehow holds on to objects that are not useful anymore. Or the JVM is postponing garbage collection because it thinks that there's still enough free memory. > Is there any global parameter limiting the JVM OS Resources ? Sun's java command has the -Xmx option which sets the maximum heap size the JVM is allowed to use. I think the default is 64 MB. ========================================================================== TOPIC: Testing to which extent method calls affect processig speed http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/420f78baefc47a0 ========================================================================== == 1 of 4 == Date: Thurs, Sep 9 2004 9:55 am From: "P.Hill" <[EMAIL PROTECTED]> Albretch wrote: > Would you differ? What is it I am missing here? Let's continue on this original question. What you are missing is: The ability to write code such that it tells me what it is doing. There is little comments of intent and your report of the results explains nothing. Only your post said 3x better times for set/get vs direct access. Otherwise what statistics you gathered and what you want to do with them is defined no where. Sharing a cryptic chart with 1000s of people without more verbage about the chart is silly. All it tells me is that there is an "avg.(ms)" of something, but we can guess it is the runs mentioned above, something called a dev (but is usually called STD, AKA standard deviation), and something called "times faster". Apparently we're supposed to take the time to figure out why the second line of the table is the 100% value we are comparing to the others. And what's with all the output to a file, but you don't show us that? Do you really think code such as > }// [0, iTmsTest) is useful for somebody looking at it? Your hungarian notation is sick, just plain sick. i2DAr vs. aA2DAr etc. is supposed to communicate something? Even if I decode your hungarian notation all I get is that we are working with the second array of each. Now why would that be the most useful information to know? And these: JK00, JK02, JK04, JK04 have got to be the poorest named classes I've seen in a long time. If you want to write like that try some assembler from the early 70's. > return(d2DAr); FWIW, the parenthesis around a return value are not needed in either C or Java, despite its idiomatic appearance in K&R I and K&R II and hence many other books. Suggestion 1: Learn to communicate to other humans, now that you know how to communicate to the computer. Suggestion 2: Figure out where optimization is needed before you attempt to optimize. -Paul == 2 of 4 == Date: Thurs, Sep 9 2004 10:15 am From: "P.Hill" <[EMAIL PROTECTED]> Michael Borgwardt was kind enough to bother with the cryptic code and tried it on an optimizing VM. I have tiddied up the results and noted what JK00, JK02, JK04 and JK08 seem to be. > Test run 4 times. > - - - - - - - - - - - - - - - - - - - - - - - - - - > |__class__|__ave. (ms)|__dev. (ms)__ |_times faster_ | > | JK00 | 2763.75 | 276.7554576396522 | 1.0 | c-tor set, 4 > getters > - - - - - - - - - - - - - - - - - - - - - - - - - - > | JK02 | 836.5 | 611.654314135035 | 3.3039450089659295 | 4 setters, 4 > getters > - - - - - - - - - - - - - - - - - - - - - - - - - - > | JK04 | 558.25 | 88.63925014724948 | 4.9507389162561575 | 1 4-arg set, 4 > getters > - - - - - - - - - - - - - - - - - - - - - - - - - - > | JK08 | 533.25 | 32.25290684574028 | 5.182841068917019 | 4 public members > - - - - - - - - - - - - - - - - - - - - - - - - - - If Michael ran the same objects as Albretch, which is what he claimed, Michaels results have the 4 public member variation at 57% overhead as compared with 4 setters and 4 getters. So if time spent calling setters and getters was 10% of the total of time spent in a program, I'd actually increase by another 5-6% the runtime of the program! That's curious results, I wonder if the VM as dropped a few sets/gets just because the didn't result in anything. Whatever, -Paul == 3 of 4 == Date: Thurs, Sep 9 2004 10:36 am From: Joona I Palaste <[EMAIL PROTECTED]> Albretch <[EMAIL PROTECTED]> scribbled the following: > Maybe I wasn't clear enough, but I used maximal score proratings. > Meaning, I took the slowest\highest value and divided the rest ones by > all other ones. Look at the code. That's "slowest/highest". "Slowest - frigging / - highest". Just because Microsoft insists on non-standard typography doesn't mean the whole world has to. Nothing against you personally, Albretch. This has been bugging me for years and I have to let it out occasionally. -- /-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\ \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/ "When a man talks dirty to a woman, that's sexual harassment. When a woman talks dirty to a man, that's 14.99 per minute + local telephone charges!" - Ruben Stiller == 4 of 4 == Date: Thurs, Sep 9 2004 11:10 am From: "Chris Uppal" <[EMAIL PROTECTED]> P.Hill wrote: > That's curious results, I wonder if the VM as dropped a few sets/gets just > because the didn't result in anything. I haven't looked at this specific case, but Sun's "server" JVM is /definitely/ capable of destroying simple benchmarks by optimising away code that has no detectable effect. -- chris ========================================================================== TOPIC: JBuilder applet, adding class to jar http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2929fe5a95b27044 ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 10:15 am From: [EMAIL PROTECTED] (Marcin Siewiera) [EMAIL PROTECTED] (Martin) wrote in message news:<[EMAIL PROTECTED]>... > I have applet which uses classes like java.util.AbstractList, > java.awt.Point. Unfortunately MS VM doesnt support above(i got IO > exception, above classes not found) So i guess i have to add those > classes to my jar. No idea how to do it... Any help appreciated... im a java applet beginner. sorry for this banal questions. I made my applet and tested it on JRE 1.2, now as i want it to be compatible with most of browsers i tested it on MS VM(lots of people still use :( ) and it crashed. So now im changing all functions using i.e. AbstractList to Object[] and so on. I just want to ask if its worth it or should leave it in jre1.2 version cause MS VM is automatically in most of people browsers. Is there a way to detect VM version and if there is a need automatically install sun JRE1.2? I would really apreciate further opinions. ========================================================================== TOPIC: i18n'ed Character Set in DBMS and tables http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e379b42b2be85e8e ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 10:22 am From: "P.Hill" <[EMAIL PROTECTED]> Mark Yudkin wrote: > And I'm speaking as somebody who develops software that > supports 4 languages (simultaneously) for a living (the three main national > languages of this country: German, French and Italian, plus English), What no Rumantsch? -Paul ========================================================================== TOPIC: BEA is looking to hire a Customer-centric J2EE Engineer in San Jose: http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d01a2cc15dfadd2d ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 10:29 am From: [EMAIL PROTECTED] ([EMAIL PROTECTED]) CUSTOMER CENTRIC ENGINEER - WebLogic Integration (CCE) Location: San Jose, CA Major Duties and Responsibilities: Design and develop the features and fixes to the existing product lines as a result of customer escalations and internal product improvement requirements. Provide the engineering interface to customers and BEA technical support teams. Verify customer reported product Defect escalations. Ability of distill complex application implementation to simplified model for defect replication. Understand and scope out customer Enhancement requests. Write design and functional specifications for the required product features and enhancements. Write and review technical documents. Build releases that are GA Quality. Qualifications/Necessary Skills: 5 years work experience. Intimate Knowledge of Application Server Technology such as WebLogic Server. Must know java, J2EE, databases, XML based technologies. Good understanding of application integration space such as business process management, b2b protocols and adapter technology. Good communication skills both verbal and written. Requires periodic on-call availability and occasional travel to customer sites. If this is you, please send me your resume. thanks, Joe Weinstein ([EMAIL PROTECTED]) ========================================================================== TOPIC: BufferOverflow exception on SocketChannel.read() http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2d6f1b5b1f73b757 ========================================================================== == 1 of 1 == Date: Thurs, Sep 9 2004 10:31 am From: [EMAIL PROTECTED] (ATC) Folks, I have a situation that I can't explain and maybe it is due to some lack of understanding of NIO. I have allocated a non-direct ByteBuffer and passed it as an argument to SocketChannel.read(). The channel is blocking. I am (intermittantly) getting a java.nio.BufferOverflowException and I don't understand how that is possible. The partial stacktrace below shows where it occurs. at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:190) at sun.nio.ch.IOUtil.read(IOUtil.java:209) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207) I have access to the HeapByteBuffer.java file and can see that the exception appears to be thrown because something in the sun.nio.ch package is copying data from what appears to be an internal ByteBuffer into what I'm assuming is my ByteBuffer. Since the internal ByteBuffer has more data than my ByteBuffer can hold, the exception gets thrown. I don't have access to the sun.nio.ch source files, so I can't look at them to see what is happening. What I don't understand is why this is possible. I thought that if I passed a ByteBuffer to SocketChannel.read(), it would only read as much data into the ByteBuffer as the ByteBuffer could hold. Why is this exception thrown? Is my understanding incorrect? Thanks to anyone who can help me make sense of this. ATC ======================================================================= 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BCfwlB/TM --------------------------------------------------------------------~-> <a href=http://English-12948197573.SpamPoison.com>Fight Spam! Click Here!</a> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/kumpulan/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
