comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Tutorial/Help on programming Genetic Algroithms in Java/C++ - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d70b46d726e33955 * Garbage collector question - 5 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/793ab88313c687f9 * JNI: vfprintf hook - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/704e912a455246e4 * Update JSP with RMI?? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/22d26dd604814934 * MathFP - atan2 - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4568ec7fc8654bd8 * Getting something on my resume - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a1e0464adf07366 * Accessing twain device from java program - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3cf52679c99867dd * CachedRowSetImpl - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ba98a234cf86995e * Can I force garbage collection? - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62be19cef0da9817 * javac for J2ME - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a92d0c7d82c93863 * Using BigInteger - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7be97102e1c754 * j2se 1.5 - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/14c9f2340716e66d * navigate to webpage and capture whole screen to a JPEG? - 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8b394e001e6cf553 * Visual Modelling Tool - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c3aab05fc2bb074a * writeObject and readObject problem - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a * Preventing multiple instance standalone desktop gui applications - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/afa857e018f3780 * overriding inner classes - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3fe8aa87a5e9b71d * map image??? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ec70f963b2ba3e79 ========================================================================== TOPIC: Tutorial/Help on programming Genetic Algroithms in Java/C++ http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d70b46d726e33955 ========================================================================== == 1 of 2 == Date: Thurs, Sep 23 2004 4:22 am From: TechBookReport <[EMAIL PROTECTED]> Ruben Hoste wrote: > Hello, I'm currently looking for more information on Genetic > Algorithms and more specifficaly on how to program them in Java or > C++. This is all concerning my thesis. > A lot of general information about GA's, what they are and how they > generally work I already found on the web, but I'm looking for some > more information on how to actually program them. > Is there a certain programming language preferably to use to program > the GA? > Has anyone help with some basic code I can use to study on? > In fact all help on programming GA's is more then welcome! > > Thx a lot! > > Ruben Take a look at Robert Ghanea-Hercock's 'Applied Evolutionary Algorithms in Java', published by Springer Verlag (see http://www.techbookreport.com/tbr0031.html for more details). The book covers a basic intro and includes plenty of source. A CD is included, with full source code. If you're at a university take a look in your library. HTH Pan =============================================== TechBookReport : http://www.techbookreport.com == 2 of 2 == Date: Thurs, Sep 23 2004 5:37 am From: Tyler Reed <[EMAIL PROTECTED]> Ruben, I think the biggest problem with implementing a GA (or any inherently parallel algorithm) is that most folks are trying to implement them on sequential processors. Technically speaking (and despite popular belief), even a large number of sequential processors all wired together does not a parallel computer make. I'm probably off topic here, but IMHO, if you want to run a parallel algorithm, run it on a parallel processor. Maybe check out hardware (and software) from Annapolis, Star Bridge Systems, Nallatech or the new Cray XD1. All of these machines have FPGAs embedded in them. With an FPGA, the electronic circuit implementation of the algorithm, in all of it's parallel glory, can be instantiated on the fly. Just my 2 cents, Tyler Reed [EMAIL PROTECTED] Ruben Hoste wrote: > Hello, I'm currently looking for more information on Genetic > Algorithms and more specifficaly on how to program them in Java or > C++. This is all concerning my thesis. > A lot of general information about GA's, what they are and how they > generally work I already found on the web, but I'm looking for some > more information on how to actually program them. > Is there a certain programming language preferably to use to program > the GA? > Has anyone help with some basic code I can use to study on? > In fact all help on programming GA's is more then welcome! > > Thx a lot! > > Ruben ========================================================================== TOPIC: Garbage collector question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/793ab88313c687f9 ========================================================================== == 1 of 5 == Date: Thurs, Sep 23 2004 4:30 am From: "Vincent Cantin" <[EMAIL PROTECTED]> If there is no references exept a WeakReference to an object and I call System.gc(), am I sure that my object has been garbage collected ? == 2 of 5 == Date: Thurs, Sep 23 2004 4:36 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Vincent Cantin wrote: > If there is no references exept a WeakReference to an object and I call > System.gc(), am I sure that my object has been garbage collected ? > If a get() call on the WeakReference returns null, the object has been GC'd. BK == 3 of 5 == Date: Thurs, Sep 23 2004 4:42 am From: "Vincent Cantin" <[EMAIL PROTECTED]> > > If there is no references exept a WeakReference to an object and I call > > System.gc(), am I sure that my object has been garbage collected ? > > If a get() call on the WeakReference returns null, the object has been GC'd. It doesn't answer my question. == 4 of 5 == Date: Thurs, Sep 23 2004 4:57 am From: Gordon Beaton <[EMAIL PROTECTED]> On Thu, 23 Sep 2004 19:42:08 +0800, Vincent Cantin wrote: >> > If there is no references exept a WeakReference to an object and I call >> > System.gc(), am I sure that my object has been garbage collected ? >> >> If a get() call on the WeakReference returns null, the object has been > GC'd. > > It doesn't answer my question. There is no guarantee that gc will collect every object that is available to be collected, so the answer to your question is no. /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 == 5 of 5 == Date: Thurs, Sep 23 2004 5:53 am From: "xarax" <[EMAIL PROTECTED]> "Gordon Beaton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 23 Sep 2004 19:42:08 +0800, Vincent Cantin wrote: > >> > If there is no references exept a WeakReference to an object and I call > >> > System.gc(), am I sure that my object has been garbage collected ? > >> > >> If a get() call on the WeakReference returns null, the object has been > > GC'd. > > > > It doesn't answer my question. > > There is no guarantee that gc will collect every object that is > available to be collected, so the answer to your question is no. System.gc() is not guaranteed to perform any collections. So, the first answer is the correct response to your original question. The only way to know that the instance was collected is when WeakReference.get() returns null (or watch for the WeakReference to be enqueued on the ReferenceQueue). ========================================================================== TOPIC: JNI: vfprintf hook http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/704e912a455246e4 ========================================================================== == 1 of 2 == Date: Thurs, Sep 23 2004 4:33 am From: anton muhin <[EMAIL PROTECTED]> Hello, gurus! Old JNI faq (http://java.sun.com/products/jdk/faq/jnifaq-old.html) says: Note that System.err and System.out are not redirected by the vfprintf hook. You may call the appropriate Java methods in the System class to redirect these two Java streams. If I read it correctly I should use System.setErr and System.setOut methods, but which object I should pass in? with the best regards, anton. == 2 of 2 == Date: Thurs, Sep 23 2004 4:53 am From: Gordon Beaton <[EMAIL PROTECTED]> On Thu, 23 Sep 2004 15:33:22 +0400, anton muhin wrote: > Old JNI faq (http://java.sun.com/products/jdk/faq/jnifaq-old.html) says: > > Note that System.err and System.out are not redirected by the > vfprintf hook. You may call the appropriate Java methods in the > System class to redirect these two Java streams. > > If I read it correctly I should use System.setErr and System.setOut > methods, but which object I should pass in? Pass any open PrintStream to those methods. If you want to do the redirection from native code instead (which your question implies), try freopen(), or replace the underlying descriptor with a combination of open() and dup2(). Or make calls to System.setOut() etc from the native code. /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: Update JSP with RMI?? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/22d26dd604814934 ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 4:51 am From: [EMAIL PROTECTED] (matdec) Hello, Is it possible to update JSP with RMI by servlet?? Or only with applet?? Thanks for all, Matthieu. ========================================================================== TOPIC: MathFP - atan2 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4568ec7fc8654bd8 ========================================================================== == 1 of 4 == Date: Thurs, Sep 23 2004 5:26 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Marek wrote: >>What you did wrong was not post the C++/Delphi code you used to acquire > > the > >>results -- those results are wrong. > > Yes, you right. I got mixed up c/Delphi with Java. Sorry > > MathFP: > atan2(toFP(1), toFP(1)) = 0.78539 > atan2(toFP(1), toFP(-2)) = -3.6054 <- difference > atan2(toFP(-1), toFP(1)) = -0.78539 > atan2(toFP(-1), toFP(-1)) = -3.9270 <- difference Are you sure that the value in test case (4) is -3.9270 and not +3.9270 ? If it is -3.9270, it is looks like a bug in the library. If positive, it is mathematically correct (Case 2 is correct mathematically also) Check the API contract of the atan2 method in the documentation and see if it guarantees the range of the output. If it doesn't, you might need to add some code to bring it to a known range (such as say -Pi to +Pi or 0 to 2*Pi) BK == 2 of 4 == Date: Thurs, Sep 23 2004 5:44 am From: "Marek" <[EMAIL PROTECTED]> > > MathFP: > > atan2(toFP(1), toFP(1)) = 0.78539 > > atan2(toFP(1), toFP(-2)) = -3.6054 <- difference > > atan2(toFP(-1), toFP(1)) = -0.78539 > > atan2(toFP(-1), toFP(-1)) = -3.9270 <- difference > > Are you sure that the value in test case (4) is -3.9270 and not +3.9270 > ? If it is -3.9270, it is looks like a bug in the library. If positive, > it is mathematically correct (Case 2 is correct mathematically also) [ 1, 1] 0.7854 [ 1, -1] -3.9270 [-1, 1] -0.7854 [-1, -1] -3.9270 [ 1, 2] 0.4638 [ 1, -2] -3.6054 [-1, 2] -0.4638 == 3 of 4 == Date: Thurs, Sep 23 2004 6:51 am From: Jacob <[EMAIL PROTECTED]> Babu Kalakrishnan wrote: > Are you sure that the value in test case (4) is -3.9270 and not +3.9270 > ? If it is -3.9270, it is looks like a bug in the library. If positive, > it is mathematically correct (Case 2 is correct mathematically also) > > Check the API contract of the atan2 method in the documentation and see > if it guarantees the range of the output. If it doesn't, you might need > to add some code to bring it to a known range (such as say -Pi to +Pi or > 0 to 2*Pi) The numbers are fine as Thomas R. points out. According to the MathFP docs, it doesn't guarantee the output interval as far as I can see: "Compute the principal value of the arc tangent of y/x, using the signs of both parameters to determine the quadrant of the return value or inother words computes elementwise the angle in radian between the positive part of the x-axis and the line with origin in (0,0) which contains the point (x, y)." It is most probably a mistake from their side, but not a critical one. Depending what the result will be used for, you might need to rescale them, but typically this is not necessary. == 4 of 4 == Date: Thurs, Sep 23 2004 7:53 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Marek wrote: >>>MathFP: >>>atan2(toFP(1), toFP(1)) = 0.78539 >>>atan2(toFP(1), toFP(-2)) = -3.6054 <- difference >>>atan2(toFP(-1), toFP(1)) = -0.78539 >>>atan2(toFP(-1), toFP(-1)) = -3.9270 <- difference >> >>Are you sure that the value in test case (4) is -3.9270 and not +3.9270 >>? If it is -3.9270, it is looks like a bug in the library. If positive, >>it is mathematically correct (Case 2 is correct mathematically also) > > > [ 1, 1] 0.7854 > [ 1, -1] -3.9270 > [-1, 1] -0.7854 > [-1, -1] -3.9270 > [ 1, 2] 0.4638 > [ 1, -2] -3.6054 > [-1, 2] -0.4638 > > I'd file a bug report if I find atan2(1,-1) returning the same value as atan2(-1,-1). BK ========================================================================== TOPIC: Getting something on my resume http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4a1e0464adf07366 ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 5:41 am From: Tyler Reed <[EMAIL PROTECTED]> Kevin, What are you wanting to do for work? And, how would you like to build your portfolio? Thanks, Tyler Reed [EMAIL PROTECTED] kboris wrote: > I stumble across very depressing websites with incredible displays > of programming prowess. They're depressing because they belong to > other people. > > Examples include: a 3-D rendition of Rubik's cube, various games, > scientific analysis etc etc. Just to completely go over the top, > a lot of these sites share the source code. > > 1) Am I sunk in the job market without a portfolio? > 2) If you interview candidates, what was the best display you've seen? > > I have some assembler and preprocessing utilities to show off. Maybe > a simple language compiler. > > But it's no rubik's cube! > > Thanks > /kevin ========================================================================== TOPIC: Accessing twain device from java program http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3cf52679c99867dd ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 6:22 am From: [EMAIL PROTECTED] (Gary) Hi i need to know if it is possible to access a twain device from a java program and if so are there any simple examples which will show me how to encorporate it into my project. Thanks, GM ========================================================================== TOPIC: CachedRowSetImpl http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ba98a234cf86995e ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 6:30 am From: "Maurizio Penna" <[EMAIL PROTECTED]> Hy, I'm beeing to use the jdbc RowSet Implementation 1.0.1, but I get an exceptionan exception when an CachedRowSet object are costructed: // create CachedRowSet and populate CachedRowSetImpl crs = new CachedRowSetImpl(); // This the line that launch the exception ResultSet rs = stmt.getResultSet(); crs.populate(rs); rs.close(); stmt.close(); java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:80) at java.util.Properties.load(Properties.java:266) at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96) at com.sun.rowset.JdbcRowSetResourceBundle.<init>(Unknown Source) at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(Unknown Source) at com.sun.rowset.CachedRowSetImpl.<init>(Unknown Source) at com.arpapiemonte.dati.DatiManager.getCachedScrollResultSet(DatiManager.java: 209) at com.arpapiemonte.swingui.view.AnnaliFrame$1.run(AnnaliFrame.java:181) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja va:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Can anyone help me? Regards. Maurizio ========================================================================== TOPIC: Can I force garbage collection? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62be19cef0da9817 ========================================================================== == 1 of 3 == Date: Thurs, Sep 23 2004 6:30 am From: [EMAIL PROTECTED] (D. Alvarado) I have read on this newsgroup that despite the "gc" method, one cannot actually force garbage collection. I am using Java 1.3. and I was wondering Iif I can induce it more quicly by setting certain objects to "null" in my code? Does anyone else have any suggestions for "forcing" garbage collection? Thanks, - Dave == 2 of 3 == Date: Thurs, Sep 23 2004 7:25 am From: bugbear <[EMAIL PROTECTED]> D. Alvarado wrote: > I have read on this newsgroup that despite the "gc" method, one cannot > actually force garbage collection. I am using Java 1.3. and I was > wondering Iif I can induce it more quicly by setting certain objects > to "null" in my code? Does anyone else have any suggestions for > "forcing" garbage collection? Why do you want to force garbage collection? The whole point of a (decent, working ;-) garbage collector is that it does the right thing without intervention. Your only responsibility as a programmer is then to make sure sure stuff you've finished with *IS* garbage (i.e. no references remain) BugBear == 3 of 3 == Date: Thurs, Sep 23 2004 7:33 am From: Chris Smith <[EMAIL PROTECTED]> D. Alvarado wrote: > I have read on this newsgroup that despite the "gc" method, one cannot > actually force garbage collection. I am using Java 1.3. and I was > wondering Iif I can induce it more quicly by setting certain objects > to "null" in my code? Does anyone else have any suggestions for > "forcing" garbage collection? It's often said that using System.gc() does not force garbage collection. However, the truth is more complicated. Certainly System.gc() is the best shot you have at inducing a garbage collection to occur, and you can be almost sure that one will happen if you call that method. The API documentation for System.gc() says that "When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects." It's important to realize that that's not the same as saying that a garbage collection will occur. For example, if there are some concurrency constraints on garbage collection, then it may not be possible to do any work at this time; in that case, a "best effort" is no effort at all. It's also possible that the garbage collector is not deferred; in other words, objects are garbage collected immediately, so there may not be any work to be done. What's more often meant by saying that you can't force garbage collection is that there is no guarantee that an unreferenced object will be freed by a call to System.gc(). There is, in fact, never a guarantee that any unreferenced object will be freed, ever. For one thing, conservative collectors will tend to retain a very small percentage of objects accidentally, and the specification is designed to allow them. === As for "setting certain objects to null": You may have your terminology confused, or you may be confused about concepts. You can never set an object to null. The null value is a possible value for a reference, and indicates that it does not point to an object. When you set a reference to null, the object it points to is still there but just isn't pointed to by that reference any longer. You should never set a reference to null just to encourage garbage collection to happen sooner; it doesn't work, and it clutters your code. There are a few rare instances where you may need to set a reference to null to permit garbage collection to collect an object graph in the first place, though. These situations, and a few other tips, are mentioned at the bottom of http://jinx.swiki.net/59, which I wrote a couple years ago to address this topic. -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: javac for J2ME http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a92d0c7d82c93863 ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 6:38 am From: Tor Iver Wilhelmsen <[EMAIL PROTECTED]> Jacob <[EMAIL PROTECTED]> writes: > But I need to make sure rt.jar is *not* in my classpath, > shouldn't I? I think it is by default? It's in the bootclasspath; you can exclude it by using -bootclasspath, e.g. javac -g:none -bootclasspath midp20.jar;cdlc10.jar -classpath . com/foo/MyMIDP.java and then run the .class files through a preverifier. More hints here: http://www.kevinboone.com/j2me.html ========================================================================== TOPIC: Using BigInteger http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7be97102e1c754 ========================================================================== == 1 of 2 == Date: Thurs, Sep 23 2004 6:27 am From: Tim Slattery <[EMAIL PROTECTED]> "Jeremy Watts" <[EMAIL PROTECTED]> wrote: >I've been trying to use the 'BigInteger' feature with no success - cant seem >to find any examples of code that for instance adds or subtracts two big >integer numbers. > >How do you actually use BigInteger to do arithmetic on large integer >numbers?? Could someone give me some code examples please BigInteger bi1 = new BigInteger(5); BigInteger bi2 = new BigInteger(10); BigInteger bi3 = bi1.add(bi2); /* bi3 now contains the value 15 */ BigInteger bi4 = bi3.divide(bi1); /* bi4 contains the value 3 */ -- Tim Slattery [EMAIL PROTECTED] == 2 of 2 == Date: Thurs, Sep 23 2004 8:03 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Babu Kalakrishnan wrote: > Jeremy Watts wrote: > >> I've been trying to use the 'BigInteger' feature with no success - >> cant seem to find any examples of code that for instance adds or >> subtracts two big integer numbers. > > All operations on BigInteger numbers must be performed using the methods > provided (such as add, subtract, multiply etc) - You cannot write them > as expressions. e.g. If you want to add a and b which are BigIntegers, > you have to do > > BigInteger c = a.add(b); > > Look at the API docs for the methods available. > Another thing to keep in mind is that BigInteger objects are immutable. So even though you might naively think that a.add(b) would add the value of b to a and hold the result in a, it does not work that way - you must use the BigInteger object returned for the result. BK ========================================================================== TOPIC: j2se 1.5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/14c9f2340716e66d ========================================================================== == 1 of 3 == Date: Thurs, Sep 23 2004 6:56 am From: Stik <[EMAIL PROTECTED]> Hello everyone! Looking for a book or documentation covering all new features that comes with j2se 1.5. Any hints? Does anyone know when the final relase of j2se 1.5 is coming? Cheers! == 2 of 3 == Date: Thurs, Sep 23 2004 7:03 am From: IchBin <[EMAIL PROTECTED]> Stik wrote: > Hello everyone! > > Looking for a book or documentation covering all new features > that comes with j2se 1.5. Any hints? > > Does anyone know when the final relase of j2se 1.5 is > coming? > > Cheers! Sun's J2SE 5.0 RC Documentation http://java.sun.com/j2se/1.5.0/docs/index.html or New Features and Enhancements J2SE 5.0 http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html -- Thanks in Advance... IchBin __________________________________________________________________________ 'Laughter is inner jogging' - Norman Cousins, editor and author (1915-1990) == 3 of 3 == Date: Thurs, Sep 23 2004 7:18 am From: IchBin <[EMAIL PROTECTED]> Stik wrote: > Hello everyone! > > Looking for a book or documentation covering all new features > that comes with j2se 1.5. Any hints? > > Does anyone know when the final relase of j2se 1.5 is > coming? > > Cheers! Sun's J2SE 5.0 RC Documentation http://java.sun.com/j2se/1.5.0/docs/index.html or New Features and Enhancements J2SE 5.0 http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html -- Thanks in Advance... IchBin __________________________________________________________________________ 'Laughter is inner jogging' - Norman Cousins, editor and author (1915-1990) ========================================================================== TOPIC: navigate to webpage and capture whole screen to a JPEG? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8b394e001e6cf553 ========================================================================== == 1 of 4 == Date: Thurs, Sep 23 2004 7:28 am From: John Davison <[EMAIL PROTECTED]> Flip wrote: > Is it possible to navigate to a URL, take a "screenshot" of the webpage and > save it to a JPEG? I would like to create a dynamic screensaver which would > show me the latest CSI webpage on my monitor. Is something like this > possible? I figure I can create the URL, goto the webpage, and I can learn > how to steam a JPEG to a file, and even draw it to a panel, but I don't know > how to screen scrape the webpage's screen. > > Thanks. > > http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Robot.html#createScreenCapture(java.awt.Rectangle) Then you could use ImageIO to save it to a JPEG, although you wouldn't need to do that if you're just going to paint it to a panel. However, it seems like javascript would be better suited for this task. - john == 2 of 4 == Date: Thurs, Sep 23 2004 7:28 am From: Shanmuhanathan T <[EMAIL PROTECTED]> on 9/23/2004 7:48 PM Flip Wrote: > Is it possible to navigate to a URL, take a "screenshot" of the webpage and > save it to a JPEG? I would like to create a dynamic screensaver which would > show me the latest CSI webpage on my monitor. Is something like this > possible? I figure I can create the URL, goto the webpage, and I can learn > how to steam a JPEG to a file, and even draw it to a panel, but I don't know > how to screen scrape the webpage's screen. > > Thanks. > > <OT> If you are using a windows PC, you can try setting a url as a webpage on you active desktop and refresh it periodically. </OT> Regards -- Shanmu. == 3 of 4 == Date: Thurs, Sep 23 2004 8:12 am From: Thomas Fritsch <[EMAIL PROTECTED]> Flip wrote: > Is it possible to navigate to a URL, take a "screenshot" of the webpage and > save it to a JPEG? I would like to create a dynamic screensaver which would > show me the latest CSI webpage on my monitor. Is something like this > possible? I figure I can create the URL, goto the webpage, and I can learn > how to steam a JPEG to a file, and even draw it to a panel, but I don't know > how to screen scrape the webpage's screen. > > Thanks. Have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Robot.html#createScreenCapture(java.awt.Rectangle) http://java.sun.com/j2se/1.3/docs/guide/2d/api-jpeg/com/sun/image/codec/jpeg/package-summary.html May be these things will suffice. -- Thomas<dot>Fritsch<squiggle>ops<dot>de == 4 of 4 == Date: Thurs, Sep 23 2004 7:50 am From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 23 Sep 2004 10:18:07 -0400, Flip wrote: > Is it possible to navigate to a URL, take a "screenshot" of the webpage and > save it to a JPEG? I would like to create a dynamic screensaver If you want to make screensavers, you should look into the SaverBeans API at JDIC <https://screensavers.dev.java.net/> Examples of some of the savers here*, including my two thus far, StarZoom and HumanRights. * <http://www.physci.org/saver/> A (perhaps) relevant URL ..Robot.createScreenCapture() <https://screensavers.dev.java.net/servlets/ProjectForumMessageView?messageID=3136&forumID=698> >...which would > show me the latest CSI webpage on my monitor. (chuckles) How's it go in a JEditorPane? 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: Visual Modelling Tool http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c3aab05fc2bb074a ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 7:31 am From: Bryce <[EMAIL PROTECTED]> On Wed, 22 Sep 2004 13:36:30 -0700, "Edward H. Fabrega" <[EMAIL PROTECTED]> wrote: > >"Rizwan" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >>I am looking for a modelling tool to use with my java project. Which >> modelling tool is popular in the java community. What do you guys >> recommend? >> >> Also what do you guys think about Rational Rose? >> >> Thanks >> >> > >Check out Visual Paradigm if you're just learning UML. The Community Edition >is free, and if you like the program you can upgrade to more feature rich >editions (the most exensive being $699): > >http://www.visual-paradigm.com/vpuml.php > Or try poseidon, commercial version much cheaper, and has a free version too. There's also argouml that's opensource (poseidon is built from that). I personally use MagicDraw. They have a free version as well. -- now with more cowbell ========================================================================== TOPIC: writeObject and readObject problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a ========================================================================== == 1 of 2 == Date: Thurs, Sep 23 2004 7:33 am From: "juicy" <[EMAIL PROTECTED]> To gordon, Yes, you are right. I finally know the main problem is because i try to send a button event to server. I don't know why the server can read the event which is sent by client but when it resend it on the SocketOutputStream, the client can't read it back. I try to change the object as string instead of a button event, it works well. Is that i can't send event like this way? or.. Does anyone can help me?? == 2 of 2 == Date: Thurs, Sep 23 2004 8:01 am From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 23 Sep 2004 10:33:56 -0400, juicy wrote: > Yes, you are right. I finally know the main problem is because i try to > send a button event to server. I don't know why the server can read the > event which is sent by client No, it cannot! Look at the stacktrace closely.. java.lang.ClassNotFoundException at java/io/ObjectInputStream.loadClass0 .... at java/io/ObjectInputStream.readObject It throws the exception when it tries to *read* the object it is given. Your server cannot even read the object, Gordon has suggested one anser, but I will suggest another. In your server code, top line.. import java.awt.Event; Your server does not need it till run time, that is why your code compiles, but to recognize an Event you are reading, the java.awt.Event must be imported to the server code. 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: Preventing multiple instance standalone desktop gui applications http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/afa857e018f3780 ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 7:39 am From: [EMAIL PROTECTED] (Kent Yang) I need to have only one instance of a Desktop GUI application running. What is the best way to do this? The only answer I can find searching throught the archives was to use a socket. Is this the best way? I thought about using rmi (registry) and binding a unique name however the problem is if the appliction start the registry, when it exits, it takes the registry down with it. Is there a cleaner way to do this. I've seen this in several IDE(s) Eclipse and JBuilder. How is it done in those apps? Thanks in advance, Kent ========================================================================== TOPIC: overriding inner classes http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3fe8aa87a5e9b71d ========================================================================== == 1 of 2 == Date: Thurs, Sep 23 2004 7:40 am From: [EMAIL PROTECTED] (Tom) Doesn't java support overriding inner classes? // BEGIN EXAMPLE // class code ------------------------------------------ public class ClassA{ LocalClass instance; // inner class private class LocalClass{ public void doit(){ System.out.println("Hello"); } } ClassA(){ instance = new LocalClass(); } public void doit(){ instance.doit(); } } public class ClassB extends ClassA{ LocalClass instance; // inner class private class LocalClass{ public void doit(){ System.out.println("Goodbye"); } } } public class Main { public static void main(String[] args){ ClassA ca; ClassB cb; ca = new ClassA(); cb = new ClassB(); ca.doit(); cb.doit(); } } // output ------------------------------------- $ java Main Hello Hello // END EXAMPLE Me is confused! Tom == 2 of 2 == Date: Thurs, Sep 23 2004 7:48 am From: "VisionSet" <[EMAIL PROTECTED]> doit in the top level classes only appears in class A so that will always be executed for class B or class A instances if that is executed then it calls class A's innerclass method not class B's As to overriding by CLASS, you have ClassA.LocalClass & ClassB.LocalClass how can they override the names are different. So basically no you can't. -- Mike W "Tom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Doesn't java support overriding inner classes? > > // BEGIN EXAMPLE > // class code ------------------------------------------ > > public class ClassA{ > LocalClass instance; > > // inner class > private class LocalClass{ > public void doit(){ > System.out.println("Hello"); > } > } > > ClassA(){ > instance = new LocalClass(); > } > > public void doit(){ > instance.doit(); > } > } > > public class ClassB extends ClassA{ > LocalClass instance; > > // inner class > private class LocalClass{ > public void doit(){ > System.out.println("Goodbye"); > } > } > } > > public class Main > { > public static void main(String[] args){ > ClassA ca; > ClassB cb; > > ca = new ClassA(); > cb = new ClassB(); > > ca.doit(); > cb.doit(); > } > } > > // output ------------------------------------- > > $ java Main > Hello > Hello > > // END EXAMPLE > > Me is confused! > > Tom ========================================================================== TOPIC: map image??? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ec70f963b2ba3e79 ========================================================================== == 1 of 1 == Date: Thurs, Sep 23 2004 7:55 am From: [EMAIL PROTECTED] (Michael Borgwardt) [EMAIL PROTECTED] (nuria) wrote in message news:<[EMAIL PROTECTED]>... > Ok thanks, but this is the problem I don“t know how do this... I just *told* you how to do it. As for the details: http://java.sun.com/docs/books/tutorial/uiswing/learn/index.html If you just want prewritten code, this is in face one of the code examples that come with the Java SDK: http://java.sun.com/applets/jdk/1.4/demo/applets/ImageMap/example1.html ======================================================================= 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
