comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Ant's not figuring out the order of compilation - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62037e3151fa62ee * Drawing images over a JPanel - 4 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fd5a3f6990520065 * JDK minimum *comfortable* requirements (x86) - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4dda4bf62ef0fd2d * A good IDE?? - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fbb4408bff9b23fd * Looking for HTML Renderer - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b1a8bdcce8b1d66f * emacs Vs Eclipse? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1 * Resize JSplitPane Contanier - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c419d333b537fe9 * Checksum java - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2 * Very newbie question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87fc20cd28efb6ab * Brauche dringend JDK1.1.4 ... - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d6161080ed58911 * multiple process notification - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ead7d3a529a768d8 * java DOM vs. xsl - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/866821cec752827d * efficient HTTP upload to servlet from applet? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3e9acccf3d24f349 * Help Please - JBuilder 9 + JDK 1.5 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87f2065d90119021 * Problem accessing Serialport - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1ef3a7f1093efed0 * help with arrays - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f42ab64bb45658e2 * Advice needed on OS Independent directory listing via Servlet - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/632d36e67ae07996 * Struts and Form-Based Authentication - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a514949703e2c9b4 * _scripting engines for java applications_ - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39a65441a241e46a * sax find and replace - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd9eea1f167c8d65 * How to do select() (from C library) in Java ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c76805e0b79df87 * Fetching all the objects of a class - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/46b0b7d9659e2618 * the confusion BEFORE writing my first Application. - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31a600e33c73ac42 ========================================================================== TOPIC: Ant's not figuring out the order of compilation http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62037e3151fa62ee ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 5:08 am From: bugbear <[EMAIL PROTECTED]> Roshan Pai wrote: > Hi, > > I am using Ant1.5 for my application build. > However this file is not getting compiled before the other files, and > hence all the files give errors that GlobalErrors.ERROR_CODES is not > resolved. Using the -debug option I have found that Ant is actually > listing the GlobalErrors.java file to be compiled. Only it does not > seem to understand that this file is used by others, and hence has to > be compiled first. > > This was not happenning before, as Ant was somehow sorting out which > files to compile first. Strange. Javac doesn't compile one file first. AFAIK all the files (it wants to compile...) are compiled as a set. This is important, since Java supports mutual references without forward declaration. BugBear ========================================================================== TOPIC: Drawing images over a JPanel http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fd5a3f6990520065 ========================================================================== == 1 of 4 == Date: Thurs, Oct 7 2004 5:06 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Abs wrote: > I'm developing a fullscreen slideshow app, Ah, that was the information that was missing in your original post. If the slides change only at a slow rate, e.g. once a second, I would use a timer. In the timer run method I would replace the reference to the image, and then call repaint(). In the paintComponent() method I would just use drawImage() to draw the image. Or you could have look at the Java media Framework (JMF). I never used it, but maybe it already supports such applications. Or you might borrow some ideas from the following: > I don't think Java 2D games use passive rendering at all. I am not a Java game expert, but all the action game's code I have seen roughly do the following: - No own threads, because timing of threads is not predicable. - A big main loop, the game loop. It checks for user input, runs through all necessary calculations, prepares the next frame and displays it, and controls the frame rate (by timing each loop iteration and doing a sleep on the difference of the loop time and the desired frame rate). - Usage of an AWT top-level component (Frame or Window), and not Swing for displaying the screens. Depending on the game, and if supported by the particular JRE, set to full screen mode (including setting of color depth, etc.). No other component is used, just the top-level component. - Usage of the rather interesting BufferStrategy mechanism to either page-flip or bitblt a new frame on the screen. You can use that with Swing, too. But it doesn't seem to be popular among game programmers. /Thomas == 2 of 4 == Date: Thurs, Oct 7 2004 7:10 am From: Alex Hunsley <[EMAIL PROTECTED]> Abs wrote: > Hi people, > > I'm using active rendering over a JPanel implementing Runnable and I > have some doubts I want share with you. Which of the following codes is > better (performace, etc...): > > > 1st one: > ----------- > > > BufferedImage im=loadImage(file); > Graphics2D g = (Graphics2D) getGraphics(); > > while (threadSuspended) { > g.drawImage(im, 0, 0, this); > } > g.dispose(); > > > > > 2nd one: > ------------ > > > BufferedImage im=loadImage(file); > > while (threadSuspended) { > Graphics2D g = (Graphics2D) getGraphics(); > g.drawImage(im, 0, 0, this); > g.dispose(); > } > > > > > Do I have to flush the BufferedImage too ? when ? Btw, where is the above code actually written in the program? Can you send the full listing? alex == 3 of 4 == Date: Thurs, Oct 7 2004 7:12 am From: Alex Hunsley <[EMAIL PROTECTED]> Abs wrote: > Thomas Weidenfeller wrote: > >> Abs wrote: >> >>> I'm using active rendering over a JPanel implementing Runnable and I >>> have some doubts I want share with you. Which of the following codes >>> is better (performace, etc...): >> >> >> >> Unless you have some very special requirements (which you didn't tell >> us), both methods are equally bad, because you are not following the >> Swing/AWT painting model. > > > I'm developing a fullscreen slideshow app, so I thought the Swing > passive rendering method wasn't suitable for it. Which alternatives do I > have ? I don't think Java 2D games use passive rendering at all. Swing's rendering is semi-passive: if you call repaint() (which can be done from any thread), Swing will repaint the component by calling paintGraphics sometime soon (but not within any guaranteed time). alex == 4 of 4 == Date: Thurs, Oct 7 2004 9:02 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Thomas Weidenfeller wrote: > - Usage of the rather interesting BufferStrategy mechanism to either > page-flip or bitblt a new frame on the screen. You can use that with > Swing, too. But it doesn't seem to be popular among game programmers. That should mean: Swing doesn't seem to be popular among game programmers. BTW: All this was of course for J2SE. /Thomas ========================================================================== TOPIC: JDK minimum *comfortable* requirements (x86) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4dda4bf62ef0fd2d ========================================================================== == 1 of 2 == Date: Thurs, Oct 7 2004 5:28 am From: "andreas" <[EMAIL PROTECTED]> > Is the 1Ghz to do with > keeping the various apps responsive, a particular IDE or perhaps even > the JDK tools themselves? since programming involves a lot of idle time (there just is some keyboard-input from time to time), the IDE won't consume much CPU time. in fact, less than 4% of the CPU is used in my case. you need power if you want compiling and running your application to be fast. especially running your app, since IDE's like eclipse compile "on-line" while your CPU is idle. andreas == 2 of 2 == Date: Thurs, Oct 7 2004 5:56 am From: Andrew Thompson <[EMAIL PROTECTED]> On 7 Oct 2004 00:48:05 -0700, gswork wrote: >>>the minimum you would feel comfortable developing java applications >>>with, anyway. The 486, as it was stated. 100MHz CPU - 64 Meg RAM is plenty. * >> 1 Ghz, 256 Mb RAM. >> no matter what jdk version, since IMHO, this is of lesser importance... > > Thanks. RAM is always a factor when developing, simply because of > the 'stuff' you have open at any one time. Is the 1Ghz to do with > keeping the various apps responsive, a particular IDE NetBeans, Eclipse, and most other editors of that general class would require the specs specified by andreas, preferably better, my main box at the moment is a 1.8GHz CPU w/512Meg RAM, but it stills seems sluggish running the two IDE's listed. But if you need to be asking such questions, it is probably a good indicator you should not be using either of them. <http://www.xdweb.net/~dibblego/java/faq/answers.html#Q34> * with Textpad, DOS the JDK you can develop Swing applications. >..or perhaps even the JDK tools themselves? No, they can be run from the command line. -- 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: A good IDE?? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fbb4408bff9b23fd ========================================================================== == 1 of 4 == Date: Thurs, Oct 7 2004 5:42 am From: "Virgil Green" <[EMAIL PROTECTED]> "javabulet" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Virgil, you have to upgrade to IE 5.5 - this site was apparently > developed using IAB Studio, which supports IE5.5+ and NN6.2+. I guess > the reason is that IE5.0 does not support some of the API, which is > used in IAB Studio. I use IE6.0 and it works fine for me. BTW they > also have a demo at www.iabstudio.com, some sample application; I > tried it with FireFox, it seems to be working; although it looks > better with IE; No... I don't have to upgrade to 5.5. They just don't get my attention for their product. I keep 5.0 on my machine because I have to ensure that things I develop are backwards compatible to at least that release. Apparently that product won't make the cut. - Virgil == 2 of 4 == Date: Thurs, Oct 7 2004 6:52 am From: [EMAIL PROTECTED] (Worcsnet Team) Thomas Schodt <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > javabulet wrote: > > > ... I maybe wrong but I have an impression that it works > > best with IE; > > > > I would recommend to look at this tool - al least it's something new > > in the J2EE world; > > I have no incentive to start looking at a tool that does not make a > serious attempt at making the positive aspects of the user experience > independent of the browser used. > > Even if I wanted to, http://www.worcsnet.com/ does not seem to work with > Firefox... Hi, Thank you for your valuable comments. We are continuously improving our products and appreciate any suggestions or comments. Currently we are in process of adding Firefox and Opera browsers support. It will be released officially in the next version of IAB Studio 3.2 next month. Regards, WorcsNet Team == 3 of 4 == Date: Thurs, Oct 7 2004 7:18 am From: [EMAIL PROTECTED] (RIA Builder) Thomas, the web site/application www.worcsnet.com was written using the old version of IAB Studio 1.6.XX-1.8.XX The current release 3.1.XX. The demo application www.iabstudio.com is compatible with Firefox. Take a look... I am a big fan of IAB Studio and using it since summer 2003; actually, it wasn't a Studio yet, at that time WorcsNet had only application builder. Try it, now you can download IAB Studio 3.1 for free... cheers, riabuilder Thomas Schodt <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > javabulet wrote: > > > ... I maybe wrong but I have an impression that it works > > best with IE; > > > > I would recommend to look at this tool - al least it's something new > > in the J2EE world; > > I have no incentive to start looking at a tool that does not make a > serious attempt at making the positive aspects of the user experience > independent of the browser used. > > Even if I wanted to, http://www.worcsnet.com/ does not seem to work with > Firefox... == 4 of 4 == Date: Thurs, Oct 7 2004 7:52 am From: "Virgil Green" <[EMAIL PROTECTED]> "RIA Builder" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas, the web site/application www.worcsnet.com was written using > the old version of IAB Studio 1.6.XX-1.8.XX > The current release 3.1.XX. The demo application www.iabstudio.com is > compatible with Firefox. Take a look... > > I am a big fan of IAB Studio and using it since summer 2003; actually, > it wasn't a Studio yet, at that time WorcsNet had only application > builder. > > Try it, now you can download IAB Studio 3.1 for free... Gaack! that site is even worse with IE 5.0! Oh well. - Virgil ========================================================================== TOPIC: Looking for HTML Renderer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b1a8bdcce8b1d66f ========================================================================== == 1 of 3 == Date: Thurs, Oct 7 2004 5:45 am From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 07 Oct 2004 13:04:05 +0100, bugbear wrote: > Xiaolei Li wrote: .. >> anyway, i think the slight differences between browsers won't matter too >> much. any competent renderer will do. .. > IIRC Sun had a native .. 'native' to what? >..java Browser. This one? <http://java.sun.com/products/archive/hotjava/index.html> > If this is open source, you may be able > to exploit the renderer. As I understand it is based upon JEditorPane(/JEditorPain). Can anyone confirm? -- 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 == 2 of 3 == Date: Thurs, Oct 7 2004 9:48 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> Andrew Thompson wrote: > As I understand it is based upon JEditorPane(/JEditorPain). > Can anyone confirm? It's the other way around. The HotJava remains were recycled in Swing. This is the reason why you suddenly see "documents" for this components, instead of "models". /Thomas == 3 of 3 == Date: Thurs, Oct 7 2004 9:46 am From: Thomas Weidenfeller <[EMAIL PROTECTED]> bugbear wrote: > IIRC Sun had a native java Browser. Yes, it was called HotJava. > If this is open source, you may be able > to exploit the renderer. Parts of it became the HTML parser in Swing. This parser-related comp.lang.java.gui FAQ (v1.13) questions: 6.3 Styled Text / JEditorPane / JTextPane Q6.3.1 Can I use RTFEditorKit to read RTF documents created by Word? Q6.3.2 I have problems using the Swing HTML parser to parse all kinds of HTML. Is this normal? Q6.3.3 Some of my CSS styles don't work out. Is this normal? Q6.3.4 Can I use Swing's HTML support to write a web browser? Q6.3.5 Can I use Swing's HTML support to build an on-line help system or e-book? Q6.3.6 If HTML support is really so broken in Java, what is it good for? /Thomas ========================================================================== TOPIC: emacs Vs Eclipse? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/58b6f53b3e1b91e1 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 6:24 am From: Per Abrahamsen <[EMAIL PROTECTED]> "Darryl L. Pierce" <[EMAIL PROTECTED]> writes: > Per Abrahamsen wrote: > >>> Given that eclipse has plugins for C/Java/Latex and runs on Linux/Win, >>> I don't see a reason why I should stick with emacs. >> >> You are aware that there exist text formats other than C, Java and >> LaTeX, and platforms other than Linux and MS-Windows? > > Perhaps there are, but if the person to which you're replying doesn't use > them then their existence is meaningless to him. Given that he posted a news message, he uses at least one other text format. But my point wasn't that he should have chosen differently, my question was mostly meant as an implicit reply to his question: >>> I would like to know why emacs-users (who have also tried eclipse) are >>> still sticking with emacs ? Even if his experience is restricted to three text formats on two platforms, that is not a universal condition. So a solution that fits his needs may not fit everybody else. ========================================================================== TOPIC: Resize JSplitPane Contanier http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c419d333b537fe9 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 6:37 am From: Babu Kalakrishnan <[EMAIL PROTECTED]> Naveen Bandhu wrote: > > Thanks for msg, by "buttons" im refering to "arrows" on JSplitPane and > "container" the window in which JSplitPane is displayed. > OK - the onetouch expansion buttons you mean. It is virtually impossible to write an event handler for them without writing your own UI delegate for the JSplitpane. Also if you read the API docs, you'll notice that it says that even the availability of one touch expansion buttons is Look and Feel dependant - so you may not even have these buttons present in certain look and feels. > anyway let me rephrase.. I want to accomplish a "docking window" > effect. I want to be able to click on a JSplitPane and have it resize > the Window. For eg: I want to have a window which contains 2 panels. > The left panel should always be displayed. When the user clicks on the > JSplitPane arrow the right panel is displayed and the window increases > in size to display a right panel. When the user clicks on the > JSplitpane arrow again the right panel disappears and the window > resizes to its original size. > If all you want is the button actions (and not the user draggability of the splitpane divider), i'd say it would be a lot simpler to not use the JSplitPane at all and write your own custom panels / custom buttons which will do exactly what you want. If you want the user to be able to drag the divider as well, the task is a a little more difficult. Look at the source code of javax.swing.plaf.basic.BasicSplitPaneUI and BasicSplitPaneDividerUI classes to see what is involved. By the way, it is easier for other users to understand your problem if you stick to standard terminologies. The bar in the middle of a JSplitPane is the "divider" (and the buttons are termed one-touch-expansion buttons). "JSplitpane" means the whole container including the left/right panels (where your left/right or top/bottom components are places) and the divider. BK ========================================================================== TOPIC: Checksum java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dd1da7c2f5dfafc2 ========================================================================== == 1 of 2 == Date: Thurs, Oct 7 2004 6:51 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Andrew Thompson coughed up: > On Thu, 07 Oct 2004 04:30:29 GMT, Thomas G. Marshall wrote: > >> Andrew Thompson coughed up: > >>> On 6 Oct 2004 02:00:12 -0700, Alessio wrote: > ... >>>> thanks please if have any kind of notice notify it at my mail >>>> [EMAIL PROTECTED] >>> >>> Please pay may wads of cash for consultancy, then I'd >>> be happy to email, mail, or sky-write the answer for you. >> >> Heck, for the right price, the right weather, and enough diet coke, >> I'll write it for you in the snow..... > > Well, that may *last* longer than the sky-writing, but it's > not as pretty. ..Depending on your idea of 'pretty', of course. I don't know. I remember a couple girls in my past that had GREAT handwriting..... LOLOLOLOL -- "So I just, uh... I just cut them up like regular chickens?" "Sure, just cut them up like regular chickens." == 2 of 2 == Date: Thurs, Oct 7 2004 6:53 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> hilz coughed up: >> if you pay me i'd suck you dick cause u need it for sure > > wooooww....take it easy buddy > The dude was just trying to help > > and just for the record, i don't see your point! you might have meant > it the other way around! unless you enjoy doing that....then good for > you <puke/> Wow, and I thought my post in this thread descended too far. Phew. I guess I'm off the hook. -- "So I just, uh... I just cut them up like regular chickens?" "Sure, just cut them up like regular chickens." ========================================================================== TOPIC: Very newbie question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87fc20cd28efb6ab ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 6:58 am From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Stefan Schulz coughed up: > On Wed, 06 Oct 2004 19:04:02 GMT, Thomas G. Marshall > <[EMAIL PROTECTED]> wrote: > >> Stefan Schulz coughed up: >>> On Wed, 06 Oct 2004 04:16:23 GMT, Thomas G. Marshall >>> <[EMAIL PROTECTED]> wrote: >>> >>>> Stefan Schulz coughed up: >>>> >>>>> It definitly belongs to cljh, but that is not the main point. :) >>>> >>>> Based upon what? >>>> >>>> Like I pointed out, the group description for c.l.j.help is: >>>> >>>> *Set-up problems, catch-all first aid.* >>>> >>>> http://groups.google.com/groups?selm=list-20040915150002%2415cb%40isc.org >>> >>> Well, in that case, the taglines should really be updated. >> >> >> To what? Determined by whom? And where is the consensus? > > My suggestion would be to make it clear that most "how do i do" > questions belong to cljh. *shrug* Just my fiftieth of a dollar, > though. If anyone is willing to push that trough the administrative > process... i'd be thankful, but i do not have that much free time on > my hands. Well, if I ever get off my ass and figure out the details of formally proposing: 1. Create: comp.lang.java.beginners 2. Retire: comp.lang.java.help which seems desperately needed, since "help" just doesn't cut it for explaining to anyone that it is for noobs. -- "So I just, uh... I just cut them up like regular chickens?" "Sure, just cut them up like regular chickens." ========================================================================== TOPIC: Brauche dringend JDK1.1.4 ... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8d6161080ed58911 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 7:11 am From: Manfred Rosenboom <[EMAIL PROTECTED]> You have several choices: First of all you can use the option -target 1.1 in compiling your code. Second you can switch of the Java Plugin Third (and last favorable) you can download a JDK 1.1 from http://java.sun.com/products/archive/ Best, Manfred ========================================================================== TOPIC: multiple process notification http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ead7d3a529a768d8 ========================================================================== == 1 of 2 == Date: Thurs, Oct 7 2004 7:23 am From: [EMAIL PROTECTED] (lukasz) Hi I'm a java newbie trying to find a solution to the following problem. I need to send a broadcast or a signal to multiple cliens running on the same machine. The clients would then connect to the server to confirm the receipt of such broadcast/signal/event/whatever. This is supposed to be a basic control mechanism between worker processes and a process monitor. I guess the receipt from a client can be done with sockets, but how do I broadcast to processes on the same machine? Thanks, Lukasz == 2 of 2 == Date: Thurs, Oct 7 2004 9:25 am From: Paul Lutus <[EMAIL PROTECTED]> lukasz wrote: > Hi > > I'm a java newbie trying to find a solution to the following problem. > I need to send a broadcast or a signal to multiple cliens running on > the same machine. The clients would then connect to the server to > confirm the receipt of such broadcast/signal/event/whatever. This is > supposed to be a basic control mechanism between worker processes and > a process monitor. I guess the receipt from a client can be done with > sockets, but how do I broadcast to processes on the same machine? All the processes must agree on the signaling protocol. It could be a flag file in a particular prearranged location, or it could be a socket-based signal, or a number of other approaches. If the method is based on a flag file, the client processes could store a time for the flag file. When the modified time on the file changes, the process detects this, updates its local idea of the most recent flag time, and carries out whatever task you have in mind. This assures that each process responds exactly once for each update of the flag file. The socket approach is similar -- the server can create a unique value or timestamp for a socket reply, and when the client processes poll the socket, they will see that their timestamp is out of date. Basically the same idea as the flag file. BTW the flag file (or the socket content) can contain the information about whatever change you are trying to carry out as well as having a new modified time. This wraps the signal up with the information. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: java DOM vs. xsl http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/866821cec752827d ========================================================================== == 1 of 2 == Date: Thurs, Oct 7 2004 7:26 am From: [EMAIL PROTECTED] (Ryan Gaffuri) I have been skimming through xsl. why would you want to use it? It seems extremely difficult to maintain and archaic. does it have functionality that you can't do with a java DOM object or something like xerxes? == 2 of 2 == Date: Thurs, Oct 7 2004 9:49 am From: "Will Hartung" <[EMAIL PROTECTED]> "Ryan Gaffuri" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have been skimming through xsl. why would you want to use it? It > seems extremely difficult to maintain and archaic. does it have > functionality that you can't do with a java DOM object or something > like xerxes? While XSL can be difficult to grasp at first, it's a very powerful transformation tool. You can do a lot of stuff with little code compared to crawling the DOM tree yourself. XSL makes it very practical to essentially not have to worry about the specific XML that comes into your site. When you're trying to work with customer data, you both need to agree on a specific format for that data. In our case, our team is pretty savvy with things like XML and XSL etc., where as many of our customers (who's specialty is their domain, rather than computers and data processing) don't have as much expertise. So, they are able to export data using high level tools provided by their vendor, but which may not exactly meet our import specifications. So, we simply write an XSL script that converts from their XML format to our XML, and then our XML loader does the rest. This kind of filtering is reasonably easy to write save for the most obscene of circustances (and we never see those as we can direct the customers to create an XML document that is Close Enough for our purposes). But the XSL is more compact and mostly easier to use than walking the DOM ourselves, AND as XSL processing gets better and "smarter", so do our scripts. XSL is just Yet Another high level abstraction over a specific domain, and it's almost always better to work at that high level than not. And with the Java XSL processors where we can add in our own processing using Java Classes, it makes it even more powerful. For example, our XSL scripts not only convert the custom XSL to our internal XML format, but post messages to JMS queues to move the processing forward. It's not a Silver Bullet, but it's a great tool worth learning if you work with XML a lot. Regards, Will Hartung ([EMAIL PROTECTED]) ========================================================================== TOPIC: efficient HTTP upload to servlet from applet? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3e9acccf3d24f349 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 8:27 am From: bugbear <[EMAIL PROTECTED]> For reasons that my company deems good, we need to upload data (quite a lot of data, upto 100 Mb at a time) from a client web browser to a server. In order to prevent the user from having to do lots of file browsing, we're using an applet to select and transmit the data, to a corresponding servlet on the (tomcat) server. But... it appears that the applet sending data via java.net.HttpURLConnection is rather slow. Further, these people (albeit with a clear axe to grind) state that: >> The Sun implemention records both the request data and response data into a byte >> array http://www.nogoop.com/product_16.html Which ain't good. Reading between the lines, it appears that Sun's implementation was intended to be fairly good at downloading resources for the Applet to use (e.g. Gifs) and the rest of the functionality is quite basic. Just to make joy complete, we need the Applet to work on MacOs9, which means JDK1.1.8 (AKA MRJ2.2.6) Does anyone have any magic for me, that will allow uploads at decent (i.e. close to connection speed) rates? BugBear ========================================================================== TOPIC: Help Please - JBuilder 9 + JDK 1.5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/87f2065d90119021 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:08 am From: [EMAIL PROTECTED] (Gerbrand van Dieijen) On Wed, 6 Oct 2004 11:41:48 -0500, Newbie wrote: >I have been using Jbuilder 9 for only a short period of time and still >trying to learn Java overall. > >I downloaded the new JDK 1.5 and when I set the project properties to use >that JDK version it gives me the folllowing error : > Hello, you'll need JBuilder 2005 to use the new JDK 1.5. You can download a the Enterprise Trial at http://www.borland.com However, if you want to learn Java, you can better stick to Java 1.4 for the moment, it doesn't have an advantage to use JDK 1.5 then. -- Gerbrand van Dieijen ========================================================================== TOPIC: Problem accessing Serialport http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1ef3a7f1093efed0 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:34 am From: Paul Lutus <[EMAIL PROTECTED]> Ny Het wrote: > Hi, > > Im trying to access a GSM modem via the serial port using 1.4.2_05 on > under > Debian Linux. I have installed RXTX and are member of goup uupc. > (im not sure if this is a java configuration issue, or relates to debian > security. > > The application works if I run it as root. However I would like to avoid > that. Explain what happens when you are not root, and be specific. BTW this is virtually certain not to be Java-related. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: help with arrays http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f42ab64bb45658e2 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:36 am From: "Mike Schilling" <[EMAIL PROTECTED]> "TWG" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "hilz" <[EMAIL PROTECTED]> wrote in message > news:<[EMAIL PROTECTED]>... >> "TWG" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > I'm making a assignment function for arrays. The function has to be a >> > void function and i need to make the "this" array larger. I know i >> > need to make a new array of the require size. just how do i modify the >> > "this" array to be the new array. so i return an array of the right >> > size. >> >> >> You're probably not thinking in Java terms. >> can you post some code? and make your question clearer? > > The problem is I have an array i'm trying to set it equal to another > one. The other array is larger than the first. I know i have to make a > new array. > > public void assign (Polynomial p){ > PolynomialAsArray arg = (PolynomialAsArray) p; > for (int i = 0; i < arg.poly.length-1; i++){ > this.poly[i]=arg.poly[i]; > } > } > the arg array is large than the this array so whats above dosen't work > because there is no place to put the last values. My problem is > getting the new array that i have to make to take the place of the > this array. I won't do your homework for you, but I will give you a few hints: Do you know how to create an array? If not, look up "array creation" in your textbook. Do you know how to copy data from one array to another efficiently? If not, look at java.lang.System. Having created and populated the new array, what to you have to do with it? Ot if you really want to impress your teacher, think about this: What is the java method that makes a copy of "this"? Does it work on arrays? ========================================================================== TOPIC: Advice needed on OS Independent directory listing via Servlet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/632d36e67ae07996 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:40 am From: Paul Lutus <[EMAIL PROTECTED]> Lord0 wrote: > Hi there, > > I've got a servlet (running on Tomcat) which contains a method for listing > the contents of a given directory on the machine on which it is running: > > // snip > > File allFiles = new File(myPath); // Absolute path > String files[]=allFiles.list(); > > // snip > > So we get an array containing Strings corresponding to all the files in a > named directory. > > This works fine and does what I need it to do. However when I move the > servlet from my Windoze machine (dev environment) to my linux machine > (live environment) I run into difficulties because the file paths are > obviously different. What difficulties? You are obviously encountering a portability issue, but it would be better if you didn't make us guess. > I would like to do it in such a way that the servlet > *does not need to be edited*. I had thought of a couple of possible > solutions Solutions to what problem? You can always use File.listRoots() to get a portable filesystem root list. Please be specific when you post a request for help. If you have a Windows machine with one drive, the solution cam be very simple: "/". If there is more than one Windows drive and if you need to choose the drive, this scheme is not portable across platforms, period, because not all operating systems have multiple roots. I think a solution based on File.listRoots() will be able to cope with the problem. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: Struts and Form-Based Authentication http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a514949703e2c9b4 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:42 am From: [EMAIL PROTECTED] (Dom) Hi, I am using Form-Based Authentication with Struts and Tomcat. When I log in I want to first process the form through struts and then force the container security framework to authenticate the user through a sendRedirect. The reason why I want to do this is because if the user checks the remember me option I can then set up a cookie to store their typed in username and password. My login.jsp is: <html:form action="login.do"> Username:<html:text name="loginForm" property="j_username"/><br> Password:<html:text name="loginForm" property="j_password"/><br> <html:submit property="whichAction" title="Submit">Submit</html:submit> </html:form> My code that processes this form in LoginAction: LoginForm loginForm = ((LoginForm)form); String auth = "j_security_check?j_username=" + loginForm.getJ_username() + "&j_password=" + loginForm.getJ_password(); response.sendRedirect(auth); The sendRedirect does not work. How do I make struts understand that I want it to process the container "j_security_check"? Can someone help please? Dom ========================================================================== TOPIC: _scripting engines for java applications_ http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39a65441a241e46a ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:52 am From: "Will Hartung" <[EMAIL PROTECTED]> "Chris Uppal" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Andrey Romanenko wrote: > > > Is there any scripting languages implemented in java? > > Several, some are: > > Groovy: http://groovy.codehaus.org/ > Jython: http://www.jython.org/ > Kawa: http://www.gnu.org/software/kawa/ > > And then there are interpreters that use a flavour of Java; these don't > particularly interest me, but two are: > > BeanShell: http://www.beanshell.org/ > DynamicJava: http://koala.ilog.fr/djava/ Also JavaScript: http://www.mozilla.org/rhino/ Regards, Will Hartung ([EMAIL PROTECTED]) ========================================================================== TOPIC: sax find and replace http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd9eea1f167c8d65 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:52 am From: "joe" <[EMAIL PROTECTED]> Here is what I want to do go through an xhtml look for my custom tags and call methods based on the tag names and take the output from the tag and put it into the xhtml. Take the following xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace"> <head> <title>simple document</title> </head> <body> <p>some paragraph <nx:test name="joe"/> </p> </body> </html> and turn it into this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmls:nx="my.test.namespace"> <head> <title>simple document</title> </head> <body> <p>some paragraph Hello my name is joe </p> </body> </html> Now I know that I can use SAX and a ContentHandler to find my custom tags and call the methods that is the easy part. I guess my question is with a ContentHandler how would re-write the rest of the document ? ========================================================================== TOPIC: How to do select() (from C library) in Java ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c76805e0b79df87 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:58 am From: [EMAIL PROTECTED] (ctt) Hi, I'd like to do something similar to select() from C where I have lots of open file descriptors (actually sockets in my case) that I'd like to listen for read ready condition. >From looking at Java's docs & examples, the easy way to do this is to have a thread service each socket. But I cannot have a thread wait on each of my socket connections since I'm expecting 1000 (or maybe more) sockets needing my attention. I thought about decreasing threads' stack size to give me more threads, but (1) that complicates my design unnecessarily where my threads don't have too much stack and have to ask another thread just to make a few function calls (these functions allocates lots of stack storage); (2) I'm working with JDK 1.3 and can't seem to set Thread stacks individually on my threads; (3) if there's something like the select(), then all my problems is gone. Thanks, Ching Tai ========================================================================== TOPIC: Fetching all the objects of a class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/46b0b7d9659e2618 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 9:58 am From: Mark Haase <[EMAIL PROTECTED]> In article <[EMAIL PROTECTED]>, "Vincent Courcelle" <[EMAIL PROTECTED]> wrote: > to see each objects to view if they are in this room or not Why not just keep track of which objects are in each room? > wouldn't like to do that (my project must be with the less class as > possible) Hmm, because its homework? -- |\/| /| |2 |< mehaase(at)sas(dot)upenn(dot)edu ========================================================================== TOPIC: the confusion BEFORE writing my first Application. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31a600e33c73ac42 ========================================================================== == 1 of 1 == Date: Thurs, Oct 7 2004 10:06 am From: "Will Hartung" <[EMAIL PROTECTED]> "joel s" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I read in the sun jms doc that jms is the java interface to > Middleware, like MQ series. > > Does this mean I actually need MQ series? ITs to expensive. Im > already in the programming world, so this is not a school project. My > boss came to me and told me that he would like to connect to a remote > MQ series machine. With it. Yes, you'd use JMS to talk to something like MQ. > Now I have taken the channel and decided to write something at my desk > with out connecting to the remote mq. I mean, even if i didnt have to > do this project, i would still like to learn it. > > I really thought that j2ee already had a queing facility built in so I > didnt need to buy mq series. A compliant J2EE system has a JMS supported middleware as part of the system. JBoss, Suns, Weblogic, etc. all have one. > If i do need a middle where queue piece, then are there any free ones. You can download any of the above for free and use them. There are also projects like OpenJMS which is simply the JMS part of the system (I think Apache Geronimo uses OpenJMS in their J2EE suite). For example, if you wanted JMS capabilities in a servlet based app, you could just use OpenJMS and Tomcat rather than going full J2EE. > I thought i could go into the j2ee command line tool and just set up > the queues the way they have it in the example Yea, they all are configured differently. It's server specific on how to setup and talk to the JMS queues. > Can you straighten out my confusion? Any of the above should get you started, and if your needs are basic, you shouldn't have any real problems talking to MQ later on. But you will eventually need to get a JMS provider for MQ (I assume you can get this from their website, who knows), as each Middleware server has their own interface wrapped with JMS. There are differences between implementations, but if you only need the most basic of functionality (such as publishing a TEXT message), that's will pretty much always work. As you look towards the more advanced capabilties, you'll see differences. Regards, Will Hartung ([EMAIL PROTECTED]) ======================================================================= 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
