NOTICE: This channel is no longer actively logged.
[00:00:06] *** aknm has joined ##java[00:00:24] <mySQLnoob> good point[00:00:30] *** Vicfred has joined ##java[00:00:32] *** Varox has joined ##java[00:00:40] <cybereal> mySQLnoob: no[00:00:59] <cybereal> mySQLnoob: the "jstl" kit comes with several taglibs, each one has to be associated with a prefix directly[00:01:21] <cybereal> if you were too look in the jar you'd see several TLD files[00:01:24] <pantcho> Hey guys don't forget you were noobs also...[00:01:46] <cybereal> each of those tld files will be "top level" and require a unique namespace/prefix[00:02:35] <cheeser> pantcho: i still am. just not with java. 8^)=[00:03:17] <mySQLnoob> cybereal: thanks so much for your help, it works fine now[00:03:37] <pantcho> damn i am so fucked up[00:03:46] <mySQLnoob> i figured they might actually work like imports to a java file, but thanks for the explanation[00:04:05] <peyman_t> pantcho: what's your problem?[00:04:24] *** ishino_ has joined ##java[00:04:43] <cheeser> mySQLnoob: java imports aren't recursive either[00:05:37] *** lenni_-_ has quit IRC[00:05:43] *** Daniel_G has quit IRC[00:05:49] <pantcho> i am trying to to some networking with simple string sending i have a game i need to create, i created a protocol and decided to use to send and receive string so i use sockets inputStream and outPutStream and the use of socket with string is IN.readLine() and OUT.writeChars("HELLO\n") - adding \n or \r\n to say its a new line But in the readLine() i always get a double buffer of the string size because its unicode[00:05:56] *** mySQLnoob has quit IRC[00:06:16] <cheeser> pantcho: did you ever pastebin your code?[00:06:19] <pantcho> all i need is a simple string to receive thats it and their must be a way to convert a unicode string to plain simple String object with no unicode stop[00:06:34] <pantcho> yes i can send you my send and receive code[00:06:38] <ernimril> pantcho: if you use writeChars you may want to read with readChars[00:06:52] <pantcho> ernimril:readChars is not available[00:06:55] <ernimril> pantcho: if you want to use readLine you may want to use println[00:06:59] <pantcho> not a valid function[00:07:10] <pantcho> hmm how can i do that?[00:07:42] <pantcho> i will check it out while i will paste my code to paste bin[00:08:30] <ernimril> pantcho: what "writeChars" method are you trying to say you are using? there is writeChar in the api, no writeChars[00:08:33] *** geaaru has quit IRC[00:08:45] <ernimril> pantcho: hmmm, skip that there is in DataOutput[00:08:50] <pantcho> http://rafb.net/p/b3Js6q73.html[00:09:18] <pantcho> in sockets - m_Input = new DataInputStream(m_Socket.getInputStream());[00:09:19] <pantcho> m_Output = new DataOutputStream(m_Socket.getOutputStream());[00:09:22] *** bhz- has quit IRC[00:09:33] <ernimril> pantcho: oh, great you are mixing streams with readers...[00:09:43] <pantcho> where m_Output.writeChars("string here");[00:10:01] <ernimril> pantcho: either you use 1) streams on both sides or 2) reader/writer[00:10:09] *** kab has quit IRC[00:10:19] *** kab has joined ##java[00:10:19] <pantcho> ernimril: the mix is to try to read the line without the unicode i used IN.readline() before that[00:10:20] *** TheCastor has quit IRC[00:10:27] <ernimril> pantcho: and when you use an InputStreamReader you should _always_ specify the character set[00:10:46] <pantcho> i dont even know it so i guess it uses the default..?[00:10:51] <ernimril> pantcho: I do not care why you are trying, your code is very obviously broken[00:11:00] <ernimril> pantcho: there is no default[00:11:12] *** lenni_-_ has joined ##java[00:11:17] *** FireSlash has joined ##java[00:11:17] <pantcho> hey i first got to use java 2 monthes ago.. sorry :/[00:11:18] <ernimril> pantcho: your computer have one setting, my computer has some other setting[00:11:40] <ernimril> pantcho: still, either streams on both ends or a reader/writer combo[00:11:48] <pantcho> ok so how can i set on both receive/send the char set AND do it to receive reguler strings not unicode[00:11:56] <ernimril> pantcho: do you plan on sending _only_ text or do you plan on sending binary data?[00:11:56] *** Greyhound- has quit IRC[00:12:02] <pantcho> ONLY text[00:12:15] <ernimril> pantcho: so set up a Writer on the send side then[00:12:15] <pantcho> sending char by char is far by complicated to me[00:12:41] <marvi> pantcho: For Java Unicode IS a regular String.[00:12:59] <cheeser> ~java++[00:12:59] <javabot> java has a karma level of 8, cheeser[00:13:02] <ernimril> pantcho:a PrintWriter will probably work nicely for what you want to do[00:13:13] <pantcho> ok i got it now but when i use in java programming writing normal chars it looks like its a reguler ASCII charset[00:13:48] <marvi> Oh, these US people and their ASCII... :)[00:14:04] *** shadewind has quit IRC[00:14:08] <pantcho> http://rafb.net/p/DKVgRb28.html[00:14:26] <ernimril> marvi: many US people do not use ASCII, they speak spannish and you need more than ascii for that...[00:14:33] <pantcho> i tried to do a BuffredWriter and it gives me the error as mentioned in the comment[00:14:52] <ernimril> pantcho: how do you get a reader from the socket inputstream?[00:14:56] *** ramdam has joined ##java[00:15:00] <marvi> ernimril: so you mean there is hope? Go Spanish speaking people! :)[00:15:18] <pantcho> m_Input = new DataInputStream(m_Socket.getInputStream());[00:15:18] <pantcho> m_Output = new DataOutputStream(m_Socket.getOutputStream());[00:15:29] <ernimril> marvi: no, I have no big hopes that people in general will start to understand character set issues[00:15:37] <pantcho> where m_Socket is the socket[00:15:38] <ernimril> pantcho: do not paste in the channel[00:15:48] <pantcho> ok no problem[00:16:06] <dude7064> Need to find strings with 8 characters or more matching the pattern in Pattern.compile("^[\\d\\. ]{8}"); I think a plus sign should be added somewhere,, but couldn't remember where,, any hints ?[00:16:11] <ernimril> pantcho: that is a DataInputStream you had a BufferedReader in the paste you showed me?[00:16:36] <ernimril> ~~dude7064 javadoc Pattern[00:16:37] <javabot> dude7064: http://is.gd/izkz [java.util.regex.Pattern][00:17:01] <ernimril> dude7064: look at "Greedy quantifiers"[00:17:15] <pantcho> erinmril: what do you mean sorry i dont understand your question[00:17:19] <dude7064> I know how to use pattern,, my quetion is really bout the regex format[00:17:21] <whaley> pantcho: a OutputStream is not a Writer...use an OutputStreamWriter that gets wrapped in your BufferedWriter[00:17:29] *** alek_b has quit IRC[00:17:41] *** lenni_-_ has quit IRC[00:17:42] <peyman_t> dude7064: put a , after 8![00:17:46] <ernimril> pantcho: ok, you are totally confused, consider pasting your program[00:18:05] <ernimril> pantcho: now, lets try again: you want only text, correct?[00:18:11] <pantcho> yes i am sorry late hour and i am under stress[00:18:14] <pantcho> yes erinmril[00:18:29] <ernimril> pantcho: so you want to use a Reader on the read side and a Writer on the write side[00:18:50] <pantcho> true[00:19:00] <ernimril> pantcho: is a DataOutputStream a Writer?[00:19:15] <pantcho> sounds like yes[00:19:27] <ernimril> ~~pantcho javadoc Writer[00:19:28] <pantcho> OutPut...[00:19:28] <javabot> pantcho: http://is.gd/k1Yj [java.io.Writer][00:19:28] <whaley> pantcho: you didn't write your javadocs/class hierarchies very well, then.[00:19:33] <whaley> s/write/read[00:19:35] <ernimril> ~~pantcho javadoc DataOutputStream[00:19:35] <javabot> pantcho: http://is.gd/k1Yn [org.omg.CORBA.DataOutputStream]; http://is.gd/k1Yo [java.io.DataOutputStream][00:19:40] <r0bby> ,e sohjs[00:19:40] <r0bby> er sorry[00:19:48] <whaley> r0bby: stop.[00:19:49] <pantcho> its our lecturer example...[00:19:53] <ernimril> pantcho: look in the javadoc for DataOutputStream[00:20:08] <whaley> i had a feeling this was homework :/[00:20:22] <ernimril> pantcho: does it extend or implement anything that looks like "Writer"?[00:20:45] *** shingoki has quit IRC[00:21:22] <ernimril> it is amazing how damn long time it takes for most people to look at the javadoc...[00:22:11] <pantcho> ernimril: i apperciate your educational way of showing how things works but i am just using examples from our lecturer i am not depth into java and how calsses works with each other so i may say it does not implements[00:22:41] <pantcho> yes it takes so long since we learn mostly from examples and not as a hobby or end of year project[00:22:47] <r0bby> whaley: i mistyped[00:22:51] <r0bby> relax[00:23:00] *** pschriner has quit IRC[00:23:03] <ernimril> pantcho: DataOutputStream does not extend or implement Writer, ok[00:23:27] *** ishino has quit IRC[00:23:28] <ernimril> pantcho: so using a DataOutputStream to write text data is not what you want, *Stream is for writing binary content[00:23:28] <pantcho> ok[00:23:30] <pantcho> sorry[00:23:55] <pantcho> can i use then with PrintWriter?[00:24:07] <ernimril> pantcho: yes, a PrintWriter will work fine[00:24:20] <ernimril> pantcho: (togheter with the BufferedReader on the read-side)[00:24:43] <pantcho> ok will try that now.[00:24:48] <ernimril> pantcho: how do you hook up a PrintWriter that goes to the socket?[00:25:04] *** codethief has quit IRC[00:25:13] <pantcho> i will show you in a second[00:25:31] *** lockd has joined ##java[00:25:35] *** alek_b has joined ##java[00:25:36] *** Poken_Gabriel has quit IRC[00:25:48] <lockd> got a problem with a java app (that's not my own) audio support[00:26:23] <lockd> absolutely no devices are detected.[00:26:39] *** Meshezabeel has quit IRC[00:26:46] *** langenberg has quit IRC[00:26:51] *** solano_ has joined ##java[00:27:10] *** Greyhound- has joined ##java[00:27:28] <pantcho> i am trying PrintWriter r = new PrintWriter(m_Output); r.write(i_text + "\r\n");[00:27:44] <solano_> My applet depends of javamail on a jar (mail.jar) package, but when I place the code on a html code with OBJECT, it doesnt appears on page say me that class javamail doesnt was found.[00:28:06] <solano_> what param I have to insert?[00:28:17] <ernimril> pantcho: you do not really want to use that constructor...[00:28:26] <solano_> what param have I to insert/[00:28:29] <pantcho> ernimril: its part of the send function/procedure[00:28:31] <lockd> does anyone know how to configure Java audio devices, or is that something horribly nonstandard?[00:28:49] <ernimril> pantcho: what do the constructor say about character encoding?[00:28:57] <solano_> [solano@talita sosmail]$ appletviewer contato.html[00:28:57] <solano_> Xlib: extension "Generic Event Extension" missing on display ":0.0".[00:28:57] <solano_> Xlib: extension "Generic Event Extension" missing on display ":0.0".[00:28:57] <solano_> java.lang.NoClassDefFoundError: javax/mail/internet/AddressException[00:29:02] *** cheeser sets mode: +b *!*=archutfp@189.115.80.*[00:29:02] *** solano_ was kicked by cheeser (for flooding you get a 2 minute ban to give you time to read the topic (/topic ##java))[00:29:26] <ravv> is http://www.rifers.org/paste/show/8806 a very inefficient of doing it or the "only" way ? trying to represent https://www.mibbit.com/url/IOYmMA[00:29:30] <ernimril> pantcho: what do the PrintWriter constructor javadoc say about character encoding?[00:29:34] <pantcho> it compiles and all but i dont get the string in the other side[00:29:36] *** Levia has quit IRC[00:30:05] <pantcho> ~~javdoc pantcho PrintWriter[00:30:05] <javabot> The user javdoc is not on ##java[00:30:05] *** Levia has joined ##java[00:30:35] *** Greyhound_ has joined ##java[00:30:45] <pantcho> ~~Pantcho javadoc PrintWiter[00:30:45] <javabot> I don't know of any documentation for PrintWiter[00:30:46] <ravv> ~javdoc pantcho PrintWriter[00:30:47] <javabot> ravv, I have no idea what javdoc pantcho PrintWriter is.[00:30:54] <ernimril> pantcho: if you want it for yourself "~javadoc PrintWriter" or preferrably "/msg javabot javadoc PrintWriter" (since a pm to the bot will not spam the channel[00:31:00] *** vyoman has quit IRC[00:31:09] *** cheeser sets mode: -b *!*=archutfp@189.115.80.*[00:31:28] <pantcho> ahh no docs on PrintWriter[00:31:35] <ernimril> ~javadoc PrintWriter[00:31:35] <javabot> ernimril: http://is.gd/k23S [java.io.PrintWriter][00:31:35] *** Tenac has quit IRC[00:31:46] <ernimril> pantcho: yes there is, you are just using the bot wrongly[00:31:49] *** illbeatu has quit IRC[00:31:55] <pantcho> sorry then[00:32:00] *** Vantaa has quit IRC[00:32:30] *** Carnage\ has quit IRC[00:33:05] <pantcho> well i dont understand javadoc exactly regarding PrintWriter[00:33:06] *** solano_ has joined ##java[00:33:43] <ernimril> pantcho: what part do you not understand?[00:34:04] <pantcho> why the hell it does not work[00:34:14] <pantcho> it seems on of the Reader/Write is not working well[00:34:15] <solano_> How can I put a key on a applet? to execute my applet i need to do "java -cp .:mail.jar SOSMail" ..and in an applet??[00:34:25] *** eduardoboss has quit IRC[00:34:30] <ernimril> ~~solano_ applets[00:34:30] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog[00:34:40] *** Carnage\ has joined ##java[00:35:02] <ernimril> solano_: consider reading the channel topic when you enter any channel on irc[00:35:31] <ernimril> pantcho: you have not showed us what you have right now, so how can we say why it does not work[00:35:38] <solano_> ernimril, thanks[00:35:51] <ernimril> pantcho: you can of course keep repeating "it does not work", but that will probably not help[00:36:20] <pantcho> i will show you the code[00:36:27] *** solano_ has quit IRC[00:37:48] *** The_Birdman has joined ##java[00:38:14] <pantcho> http://rafb.net/p/xkuwLd70.html[00:39:06] <ernimril> pantcho: what am I supposed to do with that?[00:39:10] <ernimril> ~~pantcho snippets[00:39:10] <javabot> Snippets too often lack vital information. Create a test case instead.[00:39:12] *** waz has quit IRC[00:39:17] <ernimril> ~~pantcho test case[00:39:17] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)[00:40:16] *** trancenrg has joined ##java[00:40:34] <pantcho> ernimril: after viewing this snippet does it look it should work okay? you told me its ok to use PrintWriter and it is ok to use BuffredReader in the other side. these both functions are being used in the server and the java client which is tons of code for you to paste and run.[00:40:37] <ernimril> pantcho: and also, you do not want to use that constructor of PrintWriter, nor do you want to use InputStreamReader without specifying the charset[00:41:09] <lockd> anyone at all know how to configure/wrap/stub java sound for use with OSS?[00:41:30] <repnop> lockd: wrap oss with alsa :p[00:41:30] <pantcho> if i set the charset of InputStreamReader(m_Input,"UTF8") how can i set it on the send function?[00:42:07] <lockd> repnop: so java's sound API is native oss?[00:42:09] <ernimril> pantcho: I asked you to read the javadoc for the PrintWriter constructor, it has @see tags that may help you[00:42:19] <The_Birdman> ~~pancho firstcup[00:42:19] <javabot> The user pancho is not on ##java[00:42:27] <lockd> repnop: apparently sip-communicator has written their own sound implementation[00:42:28] <The_Birdman> ~~pantcho firstcup[00:42:29] <javabot> pantcho, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava[00:42:50] <trancenrg> Also check out "Headfirst Java" www.headfirstlabs.com[00:42:52] <The_Birdman> sip-communicator is using native libs for that[00:42:54] *** Fanook has joined ##java[00:43:02] *** G0-T0 has joined ##java[00:43:05] <lockd> The_Birdman: what native libs?[00:43:15] <ernimril> pantcho: and in your snippet it still looks like you use Data(Input|Output)Stream, did we not agree that you do not want them?[00:43:17] <The_Birdman> native libraries[00:43:25] <lockd> The_Birdman: -what- native libraries[00:43:26] <The_Birdman> such as dll and .so files[00:43:38] <lockd> The_Birdman: not 'what are native libraries', but which one[00:44:02] <The_Birdman> I don't remember, you could grab their code, it is free if I recall[00:44:14] *** Gracenotes has joined ##java[00:44:28] <The_Birdman> Gracenotes is in the house![00:44:29] <pantcho> ernimril: you are correct i will try to change it now and see![00:44:36] <lockd> The_Birdman: yeah, but just doing a cursory strace makes it look like it's digging in to libasound[00:45:23] <lockd> The_Birdman: now, that could be a higher level library that's doing that... but if so, shouldn't it have found my device?[00:45:33] <Gracenotes> -.-[00:45:35] <Gracenotes> -.-[00:45:39] <elad`> I set a JPanel's MaximumSize to something, but it's always bigger. Why?[00:45:58] <ernimril> elad`: depends on what layout manager you use[00:45:59] *** AqD has left ##java[00:46:07] *** tomisina has joined ##java[00:46:10] <ernimril> elad`: not all layout manager respect your wishes[00:46:32] <elad`> The panel itself is GridBagLayout.[00:46:37] <The_Birdman> elad`: try setting both preferred and maximum size[00:46:40] <elad`> Or do you need the container's layout manager?[00:47:18] <elad`> I set the size, the maximum size and the preferred size. Still nothing.[00:47:25] <Fanook> a component's size is always determined by the layout manager of the container that it is in.[00:47:35] *** nater has left ##java[00:47:47] *** Bonix has joined ##java[00:47:59] <lockd> The_Birdman: any ideas? isn't java supposed to -default- to oss? why would it even be trying alsa?[00:48:01] <pantcho> ernimril: about the 2 lines of my snippet it does not let me get m_Socket.getInputStream() as BuffredReader[00:48:01] <elad`> private static final Dimension = new Dimension(200,200); - Why is that illegal, btw?[00:48:14] <cheeser> elad`: what does the compiler tell you?[00:48:16] <pantcho> also m_Socket.getOutputStream as PrintWrite[00:48:18] <Fanook> elad`: why does the compiler claim it's illega?[00:48:38] <ernimril> pantcho: why would the compiler like it?[00:48:48] <The_Birdman> ~~pantcho firstcup[00:48:49] <javabot> pantcho, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava[00:49:06] *** waz has joined ##java[00:49:22] <ernimril> pantcho: with sockets you get raw streams, you wrap them in reader/writer as fast as you can, you do not need to wrap the socket stream in data(input|output)stream or any other streams[00:49:25] <pantcho> you told me not to use DataOutputStream/DataInputStream[00:50:22] <pantcho> ernimril: thank you for your help to try to educate me and use the javadoc it sees i will flunk with this work for now. maybe next time.[00:50:23] <ernimril> pantcho: yes and you should not use them[00:50:39] <elad`> Can't non-primitive types be final?[00:50:39] *** finalbeta has joined ##java[00:50:51] <Fanook> of course they can[00:50:52] <elad`> Or is it only when all of their members are final?[00:50:55] <r0bby> elad`: what is the error?[00:51:05] <r0bby> read the error closely[00:51:17] <trancenrg> however the object referenced can still be mutable[00:51:17] <pantcho> so how can i get the socket input and output to use with BuffredReader/PrintWrite i tried to see the commands of socket object and these are the only types he give which are DataInputStream/DataOutputStream[00:51:18] <elad`> Syntax error on token final; illegal type[00:51:20] <r0bby> hint: something is missing[00:51:29] <r0bby> read that line VERY closely[00:51:31] <elad`> SHIT[00:51:32] <elad`> Thanks.[00:51:36] <elad`> The name is missing.[00:51:39] <elad`> I'm so stupid.[00:51:41] <r0bby> yup[00:51:48] <r0bby> and nah[00:51:53] <lockd> What is this java thing about write once, run everywhere, with so many issues regarding native libs[00:51:53] <ernimril> pantcho: what do you get from the socket?[00:51:58] *** Woflborg has quit IRC[00:52:02] <balor> Does the JavaSound API require hardware mixing for Line synchronisation?[00:52:03] <Fanook> elad`: final foo only means you are binding foo[00:52:12] <Fanook> er, wrong key[00:52:14] *** G0-T0 has left ##java[00:52:18] <The_Birdman> ~~lockd java[00:52:19] <pantcho> DataInputStream/DataOutputStream ONLY[00:52:19] <javabot> java is either coffee or a programming language. Since you came to ##java, you probably want the language.[00:52:20] <ernimril> pantcho: what does socket.getInputStream() return?[00:52:23] *** sombriks has quit IRC[00:52:34] *** viperhr has quit IRC[00:52:39] <ernimril> ~~pantcho javadoc Socket[00:52:39] <javabot> pantcho: http://is.gd/k2bk [java.net.Socket][00:52:54] <pantcho> InputStream[00:52:58] *** lockd has quit IRC[00:53:07] <ernimril> pantcho: so why are you not using that?[00:53:11] <The_Birdman> ~~pantcho javadoc inputstream[00:53:12] <javabot> pantcho: http://is.gd/jZ06 [java.io.InputStream]; http://is.gd/jZ04 [org.omg.CORBA.portable.InputStream]; http://is.gd/jZ05 [org.omg.CORBA_2_3.portable.InputStream][00:53:32] <elad`> Anyhow, with either container layout manager, I can't set my containee (not a typo) to the right size.[00:54:10] <elad`> I set the preferred size, the max size and the size itself. I set the container's size, and put it itside a container of its own. Nada.[00:54:37] <Fanook> ~~ elad` show us[00:54:37] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.[00:54:38] <The_Birdman> ~~elad` GridBagConstraints[00:54:38] <javabot> elad`, I have no idea what GridBagConstraints is.[00:54:40] <ernimril> elad`: as I said, it depends on the layout manager, this far you have told us "it does not work", not much to go on[00:54:45] *** rapidology has joined ##java[00:54:50] *** Greyhound- has quit IRC[00:55:02] <The_Birdman> ~~elad` javadoc GridBagConstraints[00:55:03] <javabot> elad`: http://is.gd/k2c4 [java.awt.GridBagConstraints][00:55:13] <elad`> In a minute.[00:55:44] <pantcho> in the OutPutStrea i dont have the option to write a string only byte by byte (which i want not to get into) in InputStream i have WriteString[00:56:08] <The_Birdman> ~io[00:56:08] <javabot> The_Birdman, io is http://java.sun.com/tutorial/essential/io[00:56:13] <ernimril> pantcho: you are not using the streams you are using the reader/writer that wrap the stream[00:56:15] <ernimril> s[00:56:20] *** cyth has quit IRC[00:57:26] <ernimril> pantcho: one problem with network or file io is that when you write you typically write to a memory buffer, you can try flushing out your data[00:57:52] <ernimril> pantcho: println will flush for you, but write* will not[00:57:56] <elad`> http://pastebin.com/d765b2e12[00:58:00] *** rapidology has quit IRC[00:58:08] *** delskorch has joined ##java[00:58:24] <ernimril> ~~elad` test case[00:58:24] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)[00:58:28] <ernimril> ~~elad` edt[00:58:28] <javabot> elad`, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1[00:58:30] *** rapidology has joined ##java[00:58:32] <The_Birdman> ~~elad`javadoc GridBagConstraints.NONE[00:58:32] <javabot> The user elad`javadoc is not on ##java[00:58:47] <rapidology> wrong room to ask the question[00:58:48] <Ven]n> when resizing a JFrame.. is it possible to keep proportions?[00:58:55] <elad`> It's compilable. Not a single class, but they can all go in the same .class file.[00:58:58] <The_Birdman> ~javadoc GridBagConstraints.NONE[00:58:59] <javabot> I don't know of any documentation for GridBagConstraints.NONE[00:59:01] <rapidology> but is there anyone who worked with c# strings here?[00:59:15] <pantcho> ernimril:it get complicated and complicated i give up damn it[00:59:15] <cybereal> Ven]n: respond to the resize event and fix the proportions yourself, that's how you can do it[00:59:18] <ernimril> Ven]n: no, but you can listen for it and change the size again, but it will _annoy_ the user[00:59:38] <The_Birdman> rapidology:what are they compared to String?[00:59:45] <Ven]n> im making a media player and wanna keep proportions when resizing the window[01:00:01] *** dude7064 has quit IRC[01:00:02] <cybereal> don't bind your window and video dimensions[01:00:15] <cybereal> then if they resize out of proportion they'll have black bars[01:00:16] *** skypce has quit IRC[01:00:17] <ernimril> pantcho: it is not complicated, but feel free to give up[01:00:18] <rapidology> i'm running into some issues with strings in c#[01:00:21] <The_Birdman> well he's using GridBagConstraints.both too![01:00:22] <cybereal> then, give them a menu item to fix the size[01:00:26] <elad`> The_Birdman: I want the items in the GridBag to be resized. It's the entire panel that I want to have a maximum size.[01:00:28] <Ven]n> cybereal, thats a good idea[01:00:31] <cybereal> that's how the more friendly media players go about it[01:00:46] <The_Birdman> elad`: you're not reading documentation at all[01:00:56] <kane77> Is UIManager.get("Label.foreground") supposed to return what color will JLabel use in current look and feel?[01:01:00] <ernimril> cybereal: my _very_ friendly media players have no menues[01:01:01] <cybereal> Ven]n: the other common thing to have is a shortcut to go "1x size" 2x size, 4x size[01:01:14] <cybereal> in which case you can definitely adjust for aspect yourself[01:01:23] <Ven]n> yeah.. hmm.. what to do :p[01:01:39] <elad`> The_Birdman: I tried switching to NONE, and that didn't help me.[01:01:45] <pantcho> ernimril: i apperciate your help but your attidude its too much educational, i ask for a simple help, you could try to help me more then just sending me to references, its like those lecturer where you ask a question and they tell me go RTFM. so thanks a lot for nothing.[01:01:51] <Fanook> rapidology: there IS a C# channel around here somewhere, bu if you feel like asking your question here, I might provide an answer[01:01:56] *** mknix has quit IRC[01:02:02] <ernimril> Ven]n: why are you writing your own media player? whats wrong with either mplayer or vlc?[01:02:07] *** viperhr has joined ##java[01:02:18] <Ven]n> practise[01:02:19] <r0bby> ##csharp[01:02:28] <Ven]n> ernimril, also, kmplayer beats those :)[01:02:46] <Ven]n> im messing around with JMF[01:02:48] <ernimril> pantcho: yes, I could write your code for you, but then you come back tomorrow and expect someone else to write your next task[01:03:18] <pantcho> not at all i have written all my tasks myself and got an A in all of them[01:03:32] <rapidology> Fanook, in what cases would two identical strings not pass the Equals check, but pass the Compare check?[01:03:36] <pantcho> and yes i read references i endorse ppl to go and read and understand[01:03:40] <Sou|cutter> JMF kinda sucks, though I could not name a better solution[01:03:48] <ernimril> pantcho: then none of the other tasks involved java[01:03:50] <pantcho> but your attitude is more comlex and annoying[01:03:59] <pantcho> yes they did.[01:04:04] <Ven]n> another thing.. my setToolTipText comes behind my video playing.. any ideas how to fix that? my movie is in a JPanel and the buttons I use toolTipText on is in another panel.[01:04:11] <Sou|cutter> rapidology: new String("foo") == "foo" <-- false (probably)[01:04:11] <pantcho> its the 4th project of java we need to do.[01:04:23] <marvi> Sou|cutter: there are new media stuff coming in JavaFX. Should be usable from Swing too.[01:04:30] <cybereal> Ven]n: tooltips are drawn with the ui tookit, but the video's being hardware accelerated, you probably can't do anything about that[01:04:32] <ernimril> pantcho: if you want to do java you _need_ to learn to read the api and follow the tutorials[01:04:33] <pantcho> your over confidence of knowing things makes you blind to the real truth[01:04:34] <Sou|cutter> marvi: mebbe that's the ticket[01:04:52] <marvi> Sou|cutter: Still early days.[01:04:57] <Ven]n> cybereal, can I force the location for where the tooltips should be shown?[01:05:07] <cybereal> Ven]n: I don't know for sure, but I doubt it[01:05:15] <ernimril> pantcho: fine, Im off to sleep[01:05:17] <cybereal> you might show that info in a status bar instead of a tooltip[01:05:23] <pantcho> good night[01:05:29] <Ven]n> cybereal, good idea[01:05:41] <Ven]n> a status bar is also updated more often[01:05:46] <Ven]n> like.. instantly when hovering a button[01:05:56] <cybereal> yep, I kinda hate tooltips personally[01:06:16] *** marvi has quit IRC[01:06:42] *** rapidology has quit IRC[01:08:22] <cybereal> ~pastebin[01:08:23] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[01:08:25] <elad`> Odd that there's no Color.BROWN.[01:08:35] <cybereal> what's brown?[01:08:39] *** marvs has quit IRC[01:09:28] <cybereal> the verbatim text of a carl's jr. advertisement I got in email: http://rifers.org/paste/show/8807[01:09:31] * cybereal chortles[01:09:37] <cybereal> ~javadoc Color[01:09:38] <javabot> cybereal: http://is.gd/k2h0 [java.awt.Color][01:09:57] *** Daniel_H has quit IRC[01:10:11] <cybereal> elad`: see, you think it's strange because you're probably not familiar with the old 8 color + high/low intensity mode terminal color set[01:10:18] <cybereal> popular in the 90's[01:10:47] <cybereal> but basically the colors in Color are those that you'd see in 16 color ansi graphics, and such[01:10:47] *** Copter has quit IRC[01:11:02] <pantcho> erinmirl: instead of m_Output.writeChars() - m_Output.writeBytes() WORKED. a simple change. thank you thank you.. for wasting y time in learning javadoc and commands i do not need.[01:11:12] <cybereal> there's really no brown in that case though dark orange would often look brown[01:11:16] <Ven]n> but.. when I user BorderLayout.SOUTH on two JPanels.. only one of them are shown.. how to get around that? :)[01:11:33] *** deathy has joined ##java[01:12:13] <deathy> anybody around interested in a weird profiling problem/question ?[01:12:17] <Ven]n> I would think that the last one added would show underneath the other one[01:12:31] <Ven]n> ~anyone[01:12:31] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[01:12:36] <Ven]n> ;D[01:12:39] *** NiallC has quit IRC[01:12:51] <cybereal> Ven]n: put them in a container panel and put that container on the south slot[01:13:29] <Ven]n> like a JPanel that has both the other two JPanels?[01:13:39] <cybereal> yeah and use an appropriate layout manager for that one, like flow or whatever[01:13:50] <Ven]n> slap me[01:13:56] <Ven]n> im too tired to work with java[01:14:01] <deathy> so, a java/seam application rendering a page. Without profiling: 1.5 seconds. With profiling: 11 seconds (using JProfiler). After some changes: without profiling: 1.4 seconds, with profiling: 5 seconds.[01:14:10] <Ven]n> good night, and thanks again, cybereal[01:14:19] <cybereal> no problem[01:14:22] <Sou|cutter> profiling definitely has overhead[01:14:23] <deathy> I'm stunned by the difference in improvement..[01:14:46] *** Ven]n has quit IRC[01:14:48] <deathy> one is like 10% improvement, the other is just cutting half the time like 100% improvement[01:15:03] *** camilojd has joined ##java[01:15:21] *** BSWolf has quit IRC[01:16:22] <deathy> note: most of the time was in xsl transformations using saxon. Before: build a DOMSource and pass it to Saxon. After: Just pass a StreamSource and let Saxon handle it with its TinyTree NodeInfo implementation.[01:17:07] <deathy> problem: If a 100% improvement when running with profiler active means just a 10% improvement in normal runs, how/why should I trust the profiler?[01:17:30] *** mele- has quit IRC[01:18:01] *** marvs has joined ##java[01:18:11] *** mele- has joined ##java[01:19:17] *** wyvern` has quit IRC[01:20:41] <deathy> anyone? :P[01:21:37] *** eduardoboss has joined ##java[01:21:53] <svm_invictvs> ~~ deathy anyone[01:21:53] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[01:22:02] <svm_invictvs> ~~deathy anyone[01:22:03] <javabot> svm_invictvs, Slow down, Speedy Gonzalez![01:23:24] <deathy> I'm thinking of one possible answer: When using DOMSource a lot of objects were created (one for each node) compared to the TinyTree implementation. And that made the profiler's work a lot harder in tracking objects and method calls. Anyone have similar experiences?[01:23:26] <mele-> re[01:23:26] *** asap18 has joined ##java[01:25:09] <svm_invictvs> deathy: Profiling slowed down your process?[01:26:21] <deathy> svm_invictvs the code change performance improvement (in percentage) was much greater when running with profiling active than with profiling deactivated.[01:26:33] *** tilerendering has quit IRC[01:26:49] <svm_invictvs> Oh, so the opposite?[01:26:51] * svm_invictvs is interested now[01:28:28] <deathy> svm_invictvs code_version_1 => with profiling disabled: 1.5 seconds; with profiling active: 11 seconds[01:28:29] *** eidolon has joined ##java[01:28:35] <cybereal> deathy: yes object creation and removal and such is highly impactful to the information state monitored by a profiler[01:28:41] <cybereal> but in normal runtime it's rather cheap[01:28:47] <deathy> svm_invictvs code_version_2 => with profiling disabled: 1.4 seconds; with profiling active: 5 seconds[01:29:03] <cybereal> which is a problem with people who don't know what the profiler's doing and how to read the results[01:29:16] <svm_invictvs> I see.[01:29:24] <svm_invictvs> Yeah, profiling will slow down your code considerably.[01:29:27] <svm_invictvs> *may[01:29:44] <svm_invictvs> Because you're doing things like hooking calls to the allocator and what not.[01:29:58] <svm_invictvs> It's the age old paradox of being unable to observe without changing ;)[01:30:09] <cybereal> yeah[01:30:21] <cybereal> especially bad here because behaviors change when observed in the vm[01:30:30] *** kane77 has quit IRC[01:30:31] <svm_invictvs> Wasn't there a line in Jurassic Park about that?[01:30:42] <deathy> cybereal I'm thinking that's the answer since saxon TinyTree uses 4 arrays for a whole document, rather than 1 object per node.[01:30:44] <cybereal> if you'r eprofiling performance you gotta, first, use a profiler that's specific to performance, not memory etc.[01:31:06] <cybereal> then you have to pay attention to time spent percentages, not "real" time[01:31:27] <deathy> but the results seemed so weird I had to know if anyone else had similar experiences.[01:31:33] *** finalbeta has quit IRC[01:32:40] *** The_Birdman is now known as jwomy[01:33:54] *** jwomy is now known as The_Birdman[01:34:13] <tieTYT> flow charts are cool[01:34:24] *** Greyhound_ has quit IRC[01:34:31] <tieTYT> it's a really good way to spec out logic if you can use them[01:34:35] *** Greyhound- has joined ##java[01:34:51] <cybereal> you know what's even cooler? being able to use a flowchart as the actual executed instructions[01:36:23] <deathy> or programming in a language that is a lot closer to flowcharts or natural language ...[01:36:48] *** cactaur has joined ##java[01:36:58] *** cactaur has quit IRC[01:37:02] <cybereal> http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/index.html[01:37:26] <Sou|cutter> I doubt that would be so helpful in non-trivial programs[01:37:40] <cybereal> actually it's the non-trivial programs that benefit the most[01:37:55] <Sou|cutter> cybereal: oh, I misread[01:38:17] <Sou|cutter> and that's *kinda* true[01:38:43] <cybereal> as the myriad possible workflows grow and expand it's easier to read and maintain a graphical representation of the rules, especially when you are working in a group, than to read and maintain lots of codes nippets meant to work together[01:39:01] <cybereal> it'd be nice to be able to write parts of a system that way[01:39:30] <cybereal> drools gets you kinda halfsies, you can define rules in tables, or in the debugger in eclipse you can see a graphical representation of the rule system[01:39:41] <cybereal> of course that's only for the business rules part of the system :)[01:41:44] *** android6011 has joined ##java[01:42:17] *** popcornPanic has quit IRC[01:42:55] <android6011> I'm trying out guis, how can I have 1 panel go under the other one instead of next to it[01:42:55] *** werdan7 has quit IRC[01:43:07] <cybereal> ~javadoc CardLayout[01:43:08] <javabot> cybereal: http://is.gd/k2rN [java.awt.CardLayout][01:43:45] <android6011> is that for me?[01:43:55] <cybereal> yes[01:43:57] <cybereal> obviously[01:44:11] <cybereal> if you didn't want it you'll need to ask a better question[01:45:02] <android6011> ok, by under i meant below[01:45:22] <cybereal> yeah, did you even bother reading the linked document?[01:45:26] <android6011> yes[01:45:27] *** trancenrg has quit IRC[01:45:58] <android6011> I mean like window panes below[01:45:59] <cybereal> then you need to ask a better question[01:46:16] <cybereal> yeah I'm still pointing at cardlayout to satisfy your request[01:47:45] <cybereal> Maybe you mean to ask for a way to make overlapping panels?[01:48:18] <android6011> no, not over lapping, basically I have 4 right next to eachother, and i want 2 of them to jump down to the next "line"[01:48:40] <cybereal> ~javadoc FlowLayout[01:48:40] <javabot> cybereal: http://is.gd/k2tg [java.awt.FlowLayout][01:48:51] *** Blaay has quit IRC[01:49:12] <cybereal> I think if you use that and constrain the width of the container it'll overflow to the next "line"[01:49:17] *** Greyhound- has quit IRC[01:49:31] <aleksei> android6011: GridLayout[01:49:33] <camilojd> How you'd run a simple each-x-minutes poller process? Does the java.util.Timer is an appropiate class for this?[01:49:40] *** ces200 has quit IRC[01:49:50] <android6011> ok thanks ill check that out[01:50:09] <cybereal> android6011: basically you owe it to yourself to go read the description of all the layout managers[01:50:25] *** Greyhound- has joined ##java[01:50:27] *** BSWolf has joined ##java[01:50:32] <cybereal> because they are integral to success in any swing endeavor, may as well know what tools are available[01:50:41] *** popcornPanic has joined ##java[01:50:57] *** Greyhound- has quit IRC[01:51:31] <tieTYT> cybereal: wouldn't you say that a rules engine != flow chart?[01:51:49] <cybereal> tieTYT: it's not equal, no, but it takes you down that road[01:51:58] <tieTYT> a rules engine can get very confusing when it comes to the order of the rules[01:52:00] *** Greyhound- has joined ##java[01:52:13] <tieTYT> and how sometimes certain rules trigger other ones from firing[01:52:15] <cybereal> only if you try to think of too much at once[01:52:25] <tieTYT> i see[01:52:29] <cybereal> that's where that visual debugger becomes awesome[01:52:32] <tieTYT> well i haven't given a rules engine the old college try yet[01:52:38] <tieTYT> ah[01:52:39] <cybereal> you get to see the graph of the rules in something like a flow chart[01:53:15] *** tomisina has quit IRC[01:53:26] *** teralaser has quit IRC[01:53:36] <cybereal> I'm pushing hard for a concurrent fbp approach to the message processing engine in my server and I might end up having to implement rete for matching infopackets to processors, and possibly could get drools to do it[01:53:47] <cybereal> so I'll probably be going back into "interested in drools" mode again soon[01:54:43] <tieTYT> what's fbp?[01:54:49] <cybereal> flow-based programming[01:54:50] *** td123 has joined ##java[01:54:50] <sproingie> i'm stuck in "interested in drools mode". but the codebase i need to port is perl[01:55:13] <tieTYT> drools seemed kinda like a hassle to me[01:55:21] <sproingie> making perl write facts to a db then having drools pull them out seems about right[01:55:22] <tieTYT> i felt like you'd end up writing permutations of rules[01:55:38] <cybereal> tieTYT: imagine that, instead of writing a bunch of if/then/else statements you had a pile of methods, a list of them basically, and then you had some piece of data to be processed, and the system picked the right method based on what was known about that data, executed that method against the data, and repeated until the data was completely processed[01:55:41] <sproingie> rules need refactoring like any other code does[01:55:42] <td123> hello, I haven't programmed with java for a while now. What is the better java ide? eclipse or netbeans, or are they pretty much the same?[01:55:42] <tieTYT> in procedural code, you can nest ifs[01:55:57] <sproingie> in procedural code, you HAVE to nest ifs[01:56:06] <cybereal> yeah that's exactly what makes procedural code suck ass[01:56:07] <tieTYT> sproingie: and?[01:56:20] <waz> td123: Idea[01:56:20] <cybereal> that becomes nightmarish to maintain as soon as your scenarios get more complex[01:56:21] <tieTYT> i donno, i thought that at first[01:56:37] <tieTYT> but when you nest an if, everything inside that block assumes that if passed[01:56:40] <td123> waz: is that the name of an ide?[01:56:46] <tieTYT> whereas in a rule engine, you'd have to write it in your "when" yet another time[01:57:04] <sproingie> no you don't[01:57:11] <tieTYT> sproingie: why not?[01:57:17] <cybereal> tieTYT: it's better if you can look at the model of what's being processed and decide what to do, totally separate from the rest of the processing[01:57:17] <sproingie> in drools you can activate a whole block of rules[01:57:19] *** Frostix has joined ##java[01:57:23] <sproingie> other rule engines have other means[01:57:34] <sproingie> sometimes you just pass it to a different rulebase[01:57:53] <tieTYT> sproingie: i see. That's good if you do it well but it seems like an easy road to complexity that is hard to wrap your head around[01:57:56] <sproingie> any decent rule engine has modules[01:58:19] <sproingie> by the time you're using a rule system, you're usually already dealing with head-asploding complexity[01:58:25] <tieTYT> i don't have personal experience but it's good to know it exists[01:58:27] <cybereal> indeed[01:58:44] <sproingie> badly written rules are worse than procedural code, sure. well-written ones are really clear.[01:58:45] <tieTYT> the module enabling concept, i mean[01:59:01] *** deathy has quit IRC[01:59:19] <cybereal> tieTYT: anyway with fbp I can add a processor that handles very specific cases without having to alter any existing code, which is ideal for my task. On top of that, processing units become very small and stateless between executions so it's trivial to make a clustered processor[02:00:13] <sproingie> my main reason for a rule engine is i'm tired of having to hand-hack a lot of fragile procedural code every time they ask for a new scenario[02:00:23] <cybereal> tieTYT: a simple example might be... one processor handles cases where nothing is known about the data beyond its bytes, so it processes them and figures out if it's valid, sets that it's valid on the Infopacket, and resubmits it to the system for the next processor. Then the system will invoke a processor that handles infopackets that are just valid and nothing else is known, etc.[02:00:30] <tieTYT> sproingie: why'd you make it procedural?[02:00:35] <sproingie> i didn't make it at all[02:00:56] *** ldam has joined ##java[02:00:58] <cybereal> tieTYT: wash rinse repeat until you know that the message was valid, what type it was, where it was going, you made some trasnformations, and it was ready for delivery, and the last processor delivers it instead of resubmitting it[02:01:10] <cybereal> sproingie: that's the same reason I'm looking at FBP[02:01:11] <tieTYT> cybereal: sounds kinda like pipes and filters[02:01:14] <waz> td123: yep[02:01:20] <waz> ~idea[02:01:21] <javabot> waz, idea is a non-free (as in beer, as in speech) IDE held in high regard by ##java - and by most professional programmers. See http://www.intellij.com/idea . It's worth every penny - and it's also free for participating open source projects.[02:01:21] <sproingie> my own code that does something similar is done with SP's in postgres that just query over all the facts i store[02:01:22] <cybereal> tieTYT: pipes and filters would be in this class[02:01:28] *** FireFly has quit IRC[02:01:33] <waz> but netbeans and eclipse aren't bad[02:01:35] <waz> and[02:01:39] <waz> ~newbie ide[02:01:39] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.[02:02:06] <tieTYT> waz: someone taught me about ctrl+shift+f12[02:02:07] <cybereal> tieTYT: the main difference is idiomatic, and situational, things like whether you try to match against all processors every time or you only do one run through the potential processors, etc.[02:02:10] <tieTYT> i've needed that for months[02:02:11] <td123> waz: as I said, I'm not a newbie, I just haven't been in the java scene for a while[02:02:13] <cybereal> tieTYT: or if one processor leads to another[02:02:25] <td123> waz: thanks for responding though[02:02:38] <tieTYT> td123: can you explain how the classpath works?[02:02:39] <camilojd> is there anything wrong with using a Timer as the application main loop?[02:02:46] <sproingie> right now the whole mess stores all its state in a single perl hash written out with Storable. so i have to convert it all to creating a stream of facts[02:02:52] *** dvayanu has quit IRC[02:03:01] <sproingie> gigaspaces would be awesome for this but sadly no one will spend money on it[02:03:15] <td123> tieTYT I don't remember all the vocab, but I know how it works[02:03:29] <waz> sproingie: terracotta work for it?[02:03:32] <tieTYT> you don't need special vocab to explain that[02:03:55] <sproingie> gigaspaces not for the distributed data but for the tuplespace thing[02:04:12] <sproingie> there's no TC thing that does tuplespaces really. i found one a while back, but it's a toy.[02:04:28] *** tissue has joined ##java[02:04:40] *** Hink has quit IRC[02:04:41] <td123> tieTYT since you want to get into arguments, here's my response http://www.google.com/url?sa=U&start=3&q=http://en.wikipedia.org/wiki/Classpath_(Java)&ei=TrCcSf7LCpSaNcSGiJAF&sig2=yCQfRUwA5ygpbfSi7ceohw&usg=AFQjCNHi3xuied9G4hvPeyMZWuS6srh81Q[02:04:52] <tieTYT> td123: yeah i'm such a total asshole[02:05:22] <sproingie> TC is something i'm using for a master/worker executor thing[02:05:31] <td123> tieTYT hmm, what are you trying to prove?[02:05:33] <sproingie> but i need work stealing, so that project's on hold til i get enough tuits to implement it[02:05:34] <cybereal> I can link to a document about quantum entanglement but I don't really understand it...[02:05:45] *** Greyhound- has quit IRC[02:05:54] <td123> tieTYT cause you're failing at proving whatever you were trying to prove.[02:06:00] <tieTYT> td123: if you know how the classpath works, you're probably ready to use an IDE[02:06:20] <td123> tieTYT The Classpath is an argument set on the command-line, or through an environment variable, that tells the Java Virtual Machine where to look for user-defined classes and packages in Java programs.[02:06:21] <tieTYT> but if you don't, you'll achieve some productivity then get stuck worse than if you started with something else[02:06:45] <sproingie> actually now that i'm here, anyone know of a free distributed job thing that deals with slow nodes with timeouts/work stealing?[02:06:45] <td123> tieTYT like I said, I'm not new to java[02:06:52] <sproingie> i could write it myself but that's not a lot of fun[02:07:14] <cybereal> sproingie: limited to java?[02:07:22] <sproingie> cybereal: not really[02:07:28] <tieTYT> td123: i can see you're a little touchy about getting help. I'll keep that in mind in the future[02:07:49] <tieTYT> advice, rather[02:07:53] <The_Birdman> then a great love started between td123 and tieTYT[02:07:56] <sproingie> i've seen a lot of grid things, all of them assume my nodes are never slow[02:08:04] <td123> tieTYT wtf are you talking about, I was asking for opinions, not help... lol, nice try[02:08:11] <sproingie> i have to be able to tell a node "you took too long, your job's gone somewhere else"[02:08:22] <cybereal> sproingie: what about something like BOINC or whatever FAH is built on?[02:08:23] <sproingie> and preferably blacklist it[02:08:26] <cybereal> pretty sure those deal with this[02:08:30] <cybereal> at least, FAH deals with it[02:08:36] *** andrewkasper has quit IRC[02:08:43] <cybereal> might be the wrong scale for you of course...[02:08:44] *** ishino_ has quit IRC[02:08:47] <cybereal> and definitely aren't java[02:08:53] <sproingie> yeah i'm thinking a dozen nodes, not a million[02:08:58] *** ishino has joined ##java[02:08:59] <td123> tieTYT unless you define help as an opinion :D[02:09:30] <cybereal> td123: you're free to leave you know[02:09:31] <sproingie> i think BOINC just sends redundant work out[02:09:47] <td123> cybereal: I'm also free to stay and troll :P[02:09:55] <td123> you know[02:10:13] <cheeser> no, you're not.[02:10:18] <eidolon> another fine day on #java[02:10:19] <tieTYT> hah[02:10:26] <svm_invictvs> ~javadoc System[02:10:27] <javabot> svm_invictvs: http://is.gd/iN33 [java.lang.System][02:10:35] <svm_invictvs> Trolly McTrollerson[02:10:36] <cheeser> you're free to stay. but i ban trolls.[02:10:55] <td123> cheeser: that's right, cause if we all knew better, we would act like you and feed trolls[02:11:05] *** cheeser sets mode: +b *!*n=tom@*.urh.uiuc.edu[02:11:05] *** td123 was kicked by cheeser (see?)[02:11:07] * eidolon waits for it[02:11:10] <tieTYT> haha[02:11:11] * eidolon loses.[02:11:16] <svm_invictvs> cheeser: Would you kindly fuck off?[02:11:16] <eidolon> didn't have long to wait![02:11:16] <svm_invictvs> heh[02:11:23] <sproingie> i was hoping "no you're not" would have been the kick message[02:11:28] <cheeser> /kb svm_invictvs sure![02:11:30] <cybereal> svm_invictvs: damnit, for the last... almost a year I've been doing that little wordplay with almost everything anyone talks about that doesn't warrant intelligent thought. SOmething McSOmethingson ... wtf is up with that? now that you did it it's going to get me all started up again grr[02:11:31] <cheeser> dammit![02:11:33] <svm_invictvs> bioshock[02:11:43] *** tilerendering has joined ##java[02:12:06] <svm_invictvs> heh[02:12:15] *** dv_ has quit IRC[02:12:15] <cybereal> ah bioshock[02:12:28] <cybereal> that was a fun one[02:12:31] <svm_invictvs> If I were ops that'd be whatI'd do...[02:12:36] <cybereal> crappy actual gameplay but fun story and awesome environment[02:12:53] <svm_invictvs> cybereal: A friend of mine on college would say, "What are you...fat? Too fat? Fatty McAteTooMuchFooderson."[02:13:07] <cybereal> heh[02:15:00] *** ldamwork has quit IRC[02:15:33] *** examancer has joined ##java[02:15:34] *** squiddle has quit IRC[02:15:42] <cybereal> hm... I wonder what would be faster between parsing xml into a dom, then later reparsing that xml into a dom for further processing, or, parsing it into a dom, serializing that dom, then deseralizing the dom itself (as in java serialization) when it was needed later[02:16:05] <sproingie> serializing's faster than parsing for sure[02:16:38] <sproingie> long as you're not serializing it in xml ;)[02:16:41] <cheeser> heh[02:16:42] <cybereal> haha[02:16:44] <cybereal> yeah no[02:17:00] <sproingie> i could see some enterprisey app doing exactly that[02:17:17] <cybereal> thinking of fbp against xml messages in a distributed environment it would be a shame if, to achieve high concurrency I had to reparse xml every time something was processed.[02:17:24] <cybereal> gawd no joke[02:18:02] <cheeser> sproingie: you seem to think that "enterprisey" apps are somehow more dainbramaged than other kinds of apps. so i'll fill you in: you're all idiots and all your code sucks.[02:18:05] <cheeser> ~next[02:18:05] <javabot> Another satisfied customer. Next![02:18:06] <cheeser> 8^)=[02:18:09] <cybereal> though sometimes a processor would actually be transforming the xml so it would happen again in some cases anyway, unless the transformer could work agains a dom hm...[02:18:10] <sproingie> most xml messages in such systems tend to either be big blob docs that are just being sent around, or very simple messages that a sax parser can handle[02:18:16] <sproingie> not a lot inbetween[02:18:21] *** amz has joined ##java[02:18:44] <cybereal> sproingie: in this case the range varies wildly and the purpose of the processing system itself is to deal with the minor differences in customizable ways[02:18:59] <sproingie> most of your ESB's use small xml messages. i'm not a big fan of it, but i guess it does let you glue damn near anything into it[02:19:02] <cybereal> so I can't take a very specific approach either way and still keep things dynamic[02:19:53] <sproingie> i looked at using an ESB, but i'm going with camel and maybe spring integration[02:19:55] <cybereal> I think I'll have to do some benchmarking to satisfy this curiosity[02:20:34] <svm_invictvs> does File.delete() delete a a directory recursively?[02:20:36] *** werdan7 has joined ##java[02:20:41] <sproingie> so i'll feed camel events with xml messages, but it stops being xml from there[02:21:11] *** balor has quit IRC[02:21:20] *** RealKillaz has joined ##java[02:21:48] <cybereal> yeah my app has to pass the original xml on (or, the modified xml, whatever) it's both a consumer of the data in the xml and the middleware to pass it on[02:22:23] <Apocalisp> Naming contest[02:22:29] *** b3nn3tt has quit IRC[02:22:30] <Apocalisp> What is the name of this class? http://rafb.net/p/dyrZij64.html[02:22:31] <sproingie> the xml rewriting certainly does chew up CPU[02:22:32] *** deathy has joined ##java[02:22:45] <sproingie> but it's a pretty constant overhead, once you can keep up you're not likely to get behind[02:23:06] *** amnesiac has quit IRC[02:23:09] <cybereal> sproingie: yeah but fortunately that's not part of the baseline operations, normally you don't have to change the original document at all so you can just send out the original actual bytes[02:23:17] *** armyriad has joined ##java[02:23:26] <eidolon> so i have a style question. Lets say i have a method called "makePerson()" in a utility class (could be a DAO, whatever). I'd like to have multiple signatures for that class. "makePerson("bob")". "makePerson("bob","president"); these are shortcuts to makePerson();, mp.setName("bob"); etc. [more][02:23:27] <r0bby> Apocalisp FuckingUglyClass[02:23:27] <cybereal> but it still has to be read and evaluated in stages[02:23:42] <r0bby> do I get a prize for the most vulger name?[02:23:43] <r0bby> :)[02:23:57] <cybereal> Apocalisp: $ ?[02:23:58] <sproingie> i made a class called FuckTheSkullOf<MaintainerName>[02:24:02] <sproingie> and no it was not a generic[02:24:06] <cybereal> Apocalisp: are you trying to come up with a new name?[02:24:09] <Apocalisp> tentatively called $[02:24:22] <Apocalisp> If I can't find a better name, it stays.[02:24:35] <r0bby> evil[02:24:41] <Apocalisp> you can ignore the extends bit[02:24:41] <eidolon> in the utility class, how should those methods be written? should i have one method that has all the parameters in it, and then the public methods call it? like makePerson("a","b","c"); would just do makePerson(); then this.setName("bob"), etc etc?[02:25:19] <eidolon> or do i pass in magic params of some sort to the makePerson(), saying "do this in certain circumstances" ?[02:25:19] <r0bby> eidolon: I tend to always forget order of parameters[02:25:34] <r0bby> so I'd do a Person p[02:25:40] <r0bby> then makePerson(p);[02:25:44] <sproingie> you might like the builder pattern[02:25:46] <eidolon> well, fortuantely signatures in eclipse are representedby name. :)[02:25:53] *** felipe_ has quit IRC[02:26:01] <r0bby> eidolon: yeh doesn't matter.[02:26:04] <r0bby> order matters[02:26:07] * eidolon googles builder pattern.[02:26:08] <Apocalisp> The purpose of $ should be pretty easy to see. But what is this kind of thing called? [racks brain][02:26:08] <cybereal> Apocalisp: hard to pick a name for something that has no apparent value or usage :)[02:26:13] <r0bby> ~builder pattern[02:26:14] <javabot> r0bby, I have no idea what builder pattern is.[02:26:17] <r0bby> ~builder[02:26:18] <javabot> r0bby, I have no idea what builder is.[02:26:20] <r0bby> wtf[02:26:21] <sproingie> personBuilder().name("joe").address("123 main").phone("8675309").build()[02:26:22] <eidolon> i'm good :)[02:26:29] <sproingie> looks nice when split over multiple lines[02:26:29] <Apocalisp> cybereal: All it does is decorate B with A.[02:26:33] <eidolon> ~builder is http://en.wikipedia.org/wiki/Builder_pattern[02:26:34] <javabot> Okay, eidolon.[02:26:37] <r0bby> that's more a DSL[02:26:43] <sproingie> it is a DSL yes[02:26:47] <cybereal> Apocalisp: and what value is that?[02:26:56] <sproingie> the name comes before every last thing was called a DSL[02:27:06] *** ml`_ has quit IRC[02:27:23] <r0bby> true[02:27:33] <sproingie> i first heard of it as a C++ pattern actually[02:27:43] <Apocalisp> cybereal: To tag a type with a name. Example: $<Email, String>, $<BirthDate, Date>[02:27:43] <eidolon> ummm.[02:27:51] <r0bby> it's a GoF pattern[02:27:53] * eidolon doesn't understand the DSL example[02:28:06] <r0bby> eidolon: it's simple[02:28:11] <r0bby> it creates a Person[02:28:14] <Apocalisp> cybereal, ... where ... public interface Email {}[02:28:18] <cybereal> Apocalisp: just for fun? what with that being erased at runtime and all...[02:28:18] <sproingie> i must have glossed over it in DP[02:28:27] <r0bby> calling the setters then builds a Person with that state[02:28:29] <sproingie> or my memory of it was jogged by the C++ book[02:28:45] <r0bby> each setter returns the instance of Person you're currently working with making chaining possible[02:28:50] <eidolon> oh..[02:28:52] <eidolon> weird.[02:29:02] <sproingie> it is pretty weird, but it's convenient[02:29:11] <sproingie> easy to extend[02:29:14] <cybereal> Apocalisp: if you required a parameter be <? extends Email, String> why wouldn't you just use Email ?[02:29:35] * eidolon hms[02:29:36] *** deathy has quit IRC[02:29:39] <eidolon> yah, i see.[02:29:49] * eidolon is reading examples of builder patterns using abstract.[02:30:03] <Apocalisp> cybereal: In that context, Email is an empty interface.[02:30:17] <Apocalisp> cybereal: just a type-level name[02:30:18] <sproingie> builder pattern is especially handy in languages that lack named args[02:30:24] <sproingie> but useful in other ways[02:30:24] <cybereal> Apocalisp: yes, but there's no reason it couldn't be more useful :)[02:30:50] <Apocalisp> cybereal: Yes there is :) In order to be completely general.[02:31:02] <cybereal> not a goal I admire[02:31:07] <Apocalisp> Tough[02:31:37] <Apocalisp> Maybe... Tag[02:31:43] <Apocalisp> Tag<A, B>[02:31:51] <Apocalisp> ergo, Tag<Email, String>[02:31:54] <cybereal> Decor[02:32:09] <Apocalisp> Too long! :)[02:32:11] <cybereal> heh[02:32:26] <Apocalisp> These things would show up in very long lists[02:33:42] <Apocalisp> I'm constructing types like this: Cons<$<Name, String>, $<Email, String>, $<DOB, Date>, ...> etc.[02:33:45] *** matsebc has joined ##java[02:33:53] <Apocalisp> sorry, worse...[02:34:21] <Apocalisp> Cons<$<Name, String>, Cons<$<Email, String>, Cons<$<DOB, Date>, ...>>>[02:35:04] <sproingie> someone worships at the altar of alexandrescu i see[02:35:06] <Apocalisp> $ doesn't look so bad :)[02:35:32] <popcornPanic> hi i am writing a program showing a ball bounce with gravity similar to earth's[02:35:42] <matsebc> Hello, I have a question for anyone that's familiar with developing j2me applicatoins on netbeans, I am trying to consume a WS but when I call it, I get a "permission to use airtime" screen and the program gets stucked there, any idea why might that be?[02:35:43] *** viperhr has quit IRC[02:36:07] <sproingie> that's totally a feature of your phone[02:36:15] <popcornPanic> i am add the velocity by 9.8 every second and then multiplying by .6[02:36:37] <popcornPanic> but when the velocity gets to one the ball keeps bouncing at .6 velocity[02:36:40] * eidolon smells homework.[02:36:43] <popcornPanic> can anyone think up a fix?[02:36:53] <matsebc> no one with xp on j2me and netbeas?[02:36:56] *** tilerendering has quit IRC[02:37:12] <r0bby> matsebc: nobody is gonna run a strangers code.[02:37:21] * sproingie .oO( why would i run j2me on XP? )[02:37:23] <The_Birdman> hehe[02:37:35] <matsebc> whatcha mean?[02:37:41] *** staykov has quit IRC[02:37:45] <matsebc> why would I want someone to run my code on their phone?[02:37:47] <r0bby> matsebc: j2me is for cell phones.[02:37:47] <The_Birdman> matsebc: what if your code destroy my computuer?[02:38:02] <matsebc> xp = experience, not windows xp[02:38:02] <The_Birdman> computer*[02:38:10] <r0bby> ~~ matsebc aolbonics[02:38:10] <javabot> matsebc, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day![02:38:13] <sproingie> so say the word "experience" then[02:38:14] <r0bby> Stop doing that[02:38:32] *** eidolon has quit IRC[02:38:36] <tieTYT> one of the object mentor guys replied to a SRP question I have in the comments of this blog article: http://blog.objectmentor.com/articles/2009/02/17/the-bloat-at-the-edge-of-duplication-removal-the-orange-model[02:38:39] <sproingie> oh the permission popup is indeed part of javame. shows what i know.[02:38:40] <tieTYT> you guys may find it interesting[02:38:46] *** tilerendering has joined ##java[02:39:04] <r0bby> matsebc: #j2me will be able to help you better[02:39:19] <matsebc> r0bby: thanks, didn't know that existed,[02:39:39] *** osmosis has joined ##java[02:41:18] *** cambazz has quit IRC[02:42:34] *** Meshezabeel has joined ##java[02:43:20] *** Meshezabeel has left ##java[02:43:23] *** cybereal has quit IRC[02:44:42] *** LordMetroid has quit IRC[02:46:07] *** giantrobot has joined ##java[02:46:51] *** fridim_ has joined ##java[02:48:02] *** isr` has quit IRC[02:49:06] *** Carnage\ has quit IRC[02:49:29] *** Carnage\ has joined ##java[02:51:25] <giantrobot> im needing to dyamically generate objects, im using iText to generate pdfs, and im stepping through an object array and am needing to create multiple tables to load into the pdf document, i.e. right now i've got a single table working/formatted the way i want it, but i need to iterate through my array and create multiple tables/table objects, any advice[02:52:17] *** Fanook is now known as Fanook|WoW[02:53:14] <giantrobot> i've tried moving the table creation to a method and basically let the method add the table to the document, but the compiler complains about not being inside the try { catch[02:53:57] <giantrobot> is there a best practice way to call a method from a try { catch? or do i establish a new try { catch?[02:56:08] * giantrobot is learning java, so if this is a dumb question, my feelings wont be hurt, just point me to some documenation[03:00:46] *** [pwgr] has joined ##java[03:02:39] *** popcornPanic has quit IRC[03:03:28] <giantrobot> nm, there's nothing more rewarding then fixing it yourself :)[03:04:39] *** tilerendering has quit IRC[03:05:31] <phix> hey[03:05:59] *** Vicfred has quit IRC[03:07:01] <phix> I am trying to add a KeyListener to a JList, so when the down arrow is pressed while the selected index is the last index then it wraps around to the top, and vice versa. The issue is that the JList has a listener although which chanages the highlighted value when pressing the arrow keys and it seems to eat the event (it does not call keyTyped in my code)[03:10:39] *** ldamwork has joined ##java[03:13:06] <phix> hi[03:14:07] *** rlubke has quit IRC[03:14:41] *** rlubke has joined ##java[03:14:52] *** meanburrito920_ has joined ##java[03:17:16] *** eidolon has joined ##java[03:18:07] *** linxuz3r has joined ##java[03:19:25] *** govinda has joined ##java[03:19:46] *** rlubke has quit IRC[03:22:54] *** govinda has quit IRC[03:24:33] *** matsebc has quit IRC[03:25:19] *** Bonix has quit IRC[03:27:45] *** staykov has joined ##java[03:28:36] *** ldam has quit IRC[03:29:07] <IceD^> question - I'm building alot of java libs (through ant, maven, makefiles and other sh*t) and I'd like to ENFORCE target jdk to 1.5[03:29:10] <IceD^> any ideas?[03:29:52] <eidolon> what do you m ean 'target jdk'?[03:29:58] <eidolon> meaning the jdk that will run the libs? or the one that builds them?[03:30:04] *** _acid__ has quit IRC[03:30:50] <IceD^> -target <release> Generate class files for specific VM version[03:30:58] <IceD^> this one[03:31:55] <IceD^> actually, I need all libs built to 1.4, 1.5 and 1.6 (three version of each)[03:31:57] <eidolon> so... enforce that the .class files being built by your build tools are generating vm 1.5 versions?[03:32:07] <IceD^> eidolon: yes[03:32:13] <razel> if i have an array double[][] array, can i use array[].length and array.length ? or whats the right way to do it[03:32:18] <eidolon> wouldn't that be an option to the javac command in your ant build.xml?[03:32:29] <IceD^> it's not MY build.xml[03:32:37] <IceD^> I'm building 3rd party libs[03:33:04] <IceD^> all of them have different way to setting target jdk (and some even doesn't have such way)[03:33:07] *** ferret_ has quit IRC[03:33:36] <r0bby> IceD^: that is an option in the javac task for ant[03:33:39] <r0bby> go read the manual[03:33:43] <eidolon> r0bby: he's said that already[03:33:45] <r0bby> same goes for maven[03:33:46] <eidolon> pay attention.[03:33:50] <eidolon> it's not his build file.[03:33:52] <r0bby> ah[03:33:56] <IceD^> r0bby: yeah, yeah[03:33:57] <r0bby> fuck i can't read[03:34:03] <IceD^> :)[03:34:14] *** kab has quit IRC[03:34:15] <r0bby> yeh.. eidolon wanna chip in for hooked on phonics?[03:34:16] <eidolon> i -think- there may be JDK environment properties you can set to fiddle it's behaviour[03:34:22] <IceD^> alias javac=javac -target 1.5 doesn't help either[03:34:28] <eidolon> right, that won't work[03:34:30] <eidolon> that's a shell expansion.[03:34:37] <IceD^> because some of libs ovverides this[03:34:46] <IceD^> eidolon: works for most of them ;)[03:34:50] <IceD^> but not for all[03:34:55] <razel> IceD^: why dont u create a softlink[03:35:00] <eidolon> if a script shells out to run the javac, it'll work[03:35:30] <razel> create a softlink of the java lib to java 1.5[03:35:30] <r0bby> razel: why don't YOU say "you".[03:35:35] *** bimbo has joined ##java[03:35:37] <razel> sorry[03:36:21] <IceD^> `custom` javac wrapper doesn't help either[03:36:24] <IceD^> hmmm[03:36:47] <IceD^> but probably I can filter other -target options... ;)[03:36:54] <IceD^> thanks guys :)))[03:37:27] *** Varox has quit IRC[03:38:03] <bimbo> hello, I would like to provide a link to a synamic jnlp file in a web application using the servlet api, what I need is somehow to get the url where the needed resources (jars) reside at deployment time of the webapp so I can dynamically create the jnlp file, any ideas on how to accomplish this?[03:40:07] *** felipe_ has joined ##java[03:41:11] *** Kernel has joined ##java[03:47:33] <aleksei> bimbo: This might be what you need http://lopica.sourceforge.net/faq.html#relcodebase[03:47:45] *** riotz has joined ##java[03:53:58] *** _acid__ has joined ##java[03:55:30] *** ScottG489 has quit IRC[03:57:12] *** Wicked has quit IRC[03:59:12] <razel> can i create an array array[][10] for example ?[03:59:15] <razel> dynamic[03:59:56] *** UK-sHaDoW has quit IRC[04:00:52] *** zed_DX has joined ##java[04:01:44] <Fanook|WoW> razel: no. you can only leave the size off of the last dimension[04:02:06] <razel> interesting[04:02:32] <Fanook|WoW> just out of curiosity, is that second dimension holding inter-related data?[04:02:44] <razel> then can i have array[0][10] and array[1][30][04:02:47] *** amz has quit IRC[04:03:02] <razel> Fanook|WoW: im trying to represent vectors and coordinates[04:03:35] <Fanook|WoW> bad razel! write a class to hold a coordinate. a vector is just a list of coords then[04:04:11] <Fanook|WoW> better yet, just use the standard Point classes in java.awt.geom and java3d[04:04:30] <razel> hmm ure saying like a structure type thing[04:04:46] <bimbo> aleksei: thank you, that is the idea, but still I wouldn't know how to include the resources needed, since they are to be packaged in the war file too[04:05:10] <razel> like class Vector { int x, int y } and then have a Vector[] array ?[04:05:17] <Fanook|WoW> yes[04:05:33] <razel> so what if i want x,y,z,w.... and so on[04:05:34] <Fanook|WoW> although, that's more of a Point than a Vector[04:05:50] <razel> its a vector starting from 0,0[04:06:00] <razel> or 0,0,0,0,0... etc.[04:06:16] <razel> kind of like a unit vector[04:06:18] <Fanook|WoW> wrap an array in your Vector and specify the size when you create the Vector[04:06:38] *** ScottG489 has joined ##java[04:06:55] <Fanook|WoW> i.e something along the lines of class Vector{int[] values; Vector(int size){values = new int[size];}}[04:07:17] <razel> class Vector { int coords; /* coords[0] = x, coords[1] = y, etc. */ }[04:07:35] <razel> k[04:07:41] <razel> i gotcha[04:07:42] <razel> thx[04:07:48] <razel> bbl[04:07:55] <aleksei> bimbo: well, what I did once was create the jnlp as part of the deployment process through an ant script[04:08:05] <Fanook|WoW> razel: int is not indexable. stop trying to treat it like it is[04:08:48] *** Kernel has quit IRC[04:09:18] *** ShadowHntr has quit IRC[04:09:19] <aleksei> defined my own ant task to create/manipulate the jnlp file, signed the jars, automatically added the dependencies, create a war file etc[04:09:37] <aleksei> i think ant has tasks for everything except jnlp manipulation[04:10:22] <cheeser> http://ant-jnlp-war.sourceforge.net/[04:10:58] *** andrewkasper has joined ##java[04:12:27] <aleksei> cheeser: yes I used that first, but when I wanted to inlude cvs changelogs in my app for each redeployed version.. I resorted to my own solution[04:15:49] *** fridim_ has quit IRC[04:16:19] <cheeser> ah[04:16:32] *** woogley has joined ##java[04:21:21] *** dk_schrute is now known as svm_invictvs1[04:21:27] *** svm_invictvs1 is now known as svm_invictvs-[04:21:38] *** svm_invictvs has quit IRC[04:21:57] <svm_invictvs-> ugh[04:22:02] *** svm_invictvs- is now known as svm_invictvs[04:23:06] *** alarm has quit IRC[04:24:41] <svm_invictvs> What's up party people![04:24:54] *** Kernel has joined ##java[04:29:24] *** resmo_ has joined ##java[04:32:06] *** Kernel is now known as Wicked[04:34:21] *** ries has quit IRC[04:35:34] <lowki> what if I want to make an array out of the first element of each dimension?[04:36:21] <phix> lowki: do it[04:36:22] *** ries has joined ##java[04:36:48] <phix> lowki: iterate[04:36:56] *** convivial has quit IRC[04:37:30] <lowki> blah[04:37:32] <lowki> nah[04:37:36] *** Kwitschibo has quit IRC[04:38:10] <phix> T[] result = new T[a.length]; for(int i = 0; i < a.length; i++) results[i] = a[i][0];[04:38:35] <phix> lowki: well how else would you do it?[04:38:39] <lowki> wow I didnt think it could be so easy :D[04:39:18] <lowki> well I was thinking of using what I learned before String[] starters = this.wordQuotes[0];[04:39:40] <phix> of corse my code is wrong :)[04:39:48] *** ries has quit IRC[04:39:57] <lowki> phix: it doesn't work?[04:40:01] <lowki> did you test it?[04:40:16] <phix> lowki: I declare it is result but refer to it as results[04:40:27] <phix> is = as[04:40:52] <phix> lowki: this for school or college / uni?[04:41:04] *** spiderbyte has joined ##java[04:41:10] *** aTypical has joined ##java[04:41:13] <aTypical> Howdy[04:41:19] <lowki> I'm making a language compiler, and am storing dictionary definitions as a String[][][04:41:24] <lowki> personal project[04:41:26] <razel> bbl/whois lowki[04:41:56] <waz> lowki: use antlr[04:42:09] <phix> ok, how do I eat / consume a key event that ocurred on a JOptionPane ?[04:42:18] <lowki> eww[04:42:36] <phix> I press enter in the JOptionPane and it propogates to my JList and executes the optiin again[04:42:48] <waz> eww?[04:42:49] <lowki> waz: lol, you're a funny guy[04:42:52] <phix> razel: lol[04:43:00] *** monkeycid has quit IRC[04:43:32] *** aleksei has left ##java[04:43:36] <lowki> waz: I already finished the parser, phonetics, morphology and syntax[04:44:15] <waz> yeah, reinventing the wheel is wise[04:44:47] <waz> phonetics?[04:45:38] *** resmo has quit IRC[04:46:06] *** webPragmatist has joined ##java[04:46:55] <webPragmatist> Okay... I'm trying to add a graphic to a label and I'm not having any luck[04:46:58] <lowki> phix: thanks it worked :D[04:47:04] <webPragmatist> I tried lblSplashGraphic.setIcon(new javax.swing.ImageIcon("C:\\icon.jpg"));[04:47:13] <lowki> waz: well it's a human speakable language parser[04:47:16] <webPragmatist> and set the width and stuff too and it still doesn't show[04:47:38] <waz> and phonetics are done eh?[04:47:50] <lowki> yep[04:47:57] <lowki> it's a class Phonetics[04:48:08] <waz> how many words can it recognize?[04:48:11] <lowki> allows one to set vowels, consonants, vowelModifiers and pauseIndicators[04:48:44] <lowki> waz: all words of the conlang including foreign words of non-native morphology by ending with pause[04:48:58] <waz> conlang?[04:49:03] <Fanook|WoW> webPragmatist: new JLabel(anIcon)[04:49:04] <lowki> constructed language[04:49:22] <lowki> it's to be a programming language as well[04:49:39] <waz> so you can construct a sample language and just speak it and the recognizer works[04:49:40] <waz> ?[04:49:57] <webPragmatist> Fanook|WoW: will that work if i'm using netbeaners[04:50:07] <webPragmatist> to make my dialogs[04:50:27] <lowki> well currently I want to be able to write a program in Rpoku and translate/compile it to Java[04:50:59] <lowki> or any other language[04:51:02] <waz> do you realize just how hard speech rec is?[04:51:09] <Fanook|WoW> dunno. I write my guis by hand[04:51:11] *** Lunis has joined ##java[04:51:49] <Lunis> how can i cause the equivalent of netbeans's Build function to happen on the CLI in linux?[04:52:00] *** mlester has joined ##java[04:52:01] <cheeser> ~~ Lunis ant[04:52:01] <javabot> Lunis, ant is a tool for building Java programs, found at http://ant.apache.org[04:52:05] <cheeser> ~~ Lunis newbie ide[04:52:05] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.[04:52:29] <Lunis> heh[04:52:40] <Lunis> thanks for the ant link[04:52:46] <lowki> currently it's just text recognition, and Rpoku has morphology that allows for lack of pauses between most words[04:52:49] <mlester> hey is anyone in here fluent in concurrent programming[04:53:07] <mlester> I have question about volatile variables[04:53:42] <lowki> waz: so later transitioning to speech recognition should be relatively easy, as long as there is a speech to phoneme converter.[04:53:58] <waz> yeah[04:53:58] <Fanook|WoW> ~~ mlester ask to ask[04:53:59] <javabot> mlester, ask to ask is asking a useless question before your main question. For example, "Anyone use eclipse?". If I answer "Yes" and can't answer your followup question, we just wasted each others time. If I answer "No", I wasted your time and annoyed everyone else in the channel a little bit by adding pointless noise. So just ask the question you were going to ask as if someone already said yes.[04:54:00] <waz> easy[04:54:15] <webPragmatist> Fanook|WoW: ah dir theres an icon param in the properties of netbeaners[04:54:22] <webPragmatist> >.<[04:54:39] <Fanook|WoW> it's only called Netbeaner in Mexico[04:55:03] <svm_invictvs> wow[04:55:44] <waz> speech rec is downright trivial![04:57:07] *** RealKillaz has quit IRC[04:58:01] *** taxon has quit IRC[04:58:03] * pr3d4t0r eyes Fanook|WoW.[04:58:06] <mlester> ok well I have set an arraylist with mutatiing it being protected by a lock. I was wondering if I set the arraylist to volatile then can I read the the elements in the arraylist without locking the method that allows for the read without worrying about an inconsistant state of the arraylist[04:58:10] *** taxon has joined ##java[04:58:24] <mlester> I know that confusing so ask me if need to clarify[04:58:46] *** ChanServ sets mode: +o waz[04:58:48] <Fanook|WoW> no. all you can guarantee is that the arraylist you're looking at has not been modified by anything behind your back[04:58:56] <pr3d4t0r> mlester: volatile will affect the reference, not the elements in the array.[04:59:01] *** ChanServ sets mode: +o waz[04:59:02] <Fanook|WoW> s/arraylist/arraylist reference[04:59:27] *** phyburn has joined ##java[04:59:29] * pr3d4t0r eyes Fanook|WoW again.[04:59:36] * r0bby winks at pr3d4t0r[04:59:37] <mlester> so I should synchronize the method then correct?[04:59:39] * Fanook|WoW eyes pr3d4t0r back[04:59:41] <pr3d4t0r> r0bby![04:59:46] <pr3d4t0r> r0bby: My best friend![04:59:51] <r0bby> Fanook|WoW: rub his leg he likes that[05:00:19] <Fanook|WoW> O_o[05:00:22] <r0bby> mlester: either thator use something in java.util.concurrent[05:00:31] <pr3d4t0r> r0bby: So. When do I get to meet your cousins?[05:00:33] <r0bby> or Collections.synchronized*[05:00:42] <r0bby> which cousins?[05:00:52] <mlester> yeah this is for an assignment so I can't use that stuff yet[05:01:00] <r0bby> oh[05:01:08] <r0bby> pr3d4t0r: never :)[05:01:27] <r0bby> I don't even talk to them like ever[05:02:03] <pr3d4t0r> r0bby: :\[05:02:18] <r0bby> I kind of like it this way[05:02:21] <pr3d4t0r> r0bby: Just suggest them as friends on Facebook. I'll take it from there.[05:02:30] <r0bby> how about no[05:02:57] <r0bby> you're welcome to stalk them on your own though![05:03:00] <pr3d4t0r> javabot: r0bby--[05:03:00] <javabot> r0bby has a karma level of -12, pr3d4t0r[05:03:14] <aTypical> pr3d4t0r, quit molesting the r0bby[05:03:26] <pr3d4t0r> aTypical: I don't want to molest the r0bby.[05:03:33] <r0bby> he wants to molest my cousins[05:03:41] <pr3d4t0r> aTypical: I want to invite one of his cousins for a long weekend in Paris with me.[05:03:44] <r0bby> whom I don't think highly of to begin with :)[05:03:46] <aTypical> pr3d4t0r, leave r0bby's underage male cousins alone too.[05:03:48] <pr3d4t0r> aTypical: Maybe both, if they're into that.[05:03:56] <r0bby> oh i'm sure my aunt would just LOVE that[05:03:58] <whaley> nothing good can come of this conversation.[05:03:59] <r0bby> oh and my uncle![05:04:06] <waz> ~interesting[05:04:07] <javabot> this is all very interesting (not really) but please take it somewhere else.[05:04:07] <pr3d4t0r> aTypical: It's the female ones. Very nice looking. Hard to believe after looking at r0bby.[05:04:12] <aTypical> whaley, have you seen r0bby's cousins?[05:04:21] <pr3d4t0r> whaley: You'd like 'em.[05:04:27] <r0bby> one of them looks like a street walker[05:04:29] <whaley> i'll pass. thanks :-/[05:04:36] <pr3d4t0r> whaley: r0bby must be adopted.[05:04:42] <aTypical> whaley, do you want pictures of his male cousines?[05:04:43] <r0bby> whaley: their xmas card, my one cousin was falling out of her dress.[05:04:48] <cheeser> pr3d4t0r: fine. *you* adopt him.[05:04:49] <cheeser> 8^)=[05:04:53] <pr3d4t0r> cheeser: N0000000000000000000![05:04:58] <aTypical> cheesey!!![05:04:58] <r0bby> pr3d4t0r: come on![05:04:59] <pr3d4t0r> cheeser: Kaaaaaaaaaaaaaaaahn![05:05:02] <r0bby> I'm cheap![05:05:11] <aTypical> r0bby, we've all heard that about you.[05:05:13] <r0bby> for the low low low price of infinity.[05:05:54] *** gdoko has joined ##java[05:07:30] <r0bby> aTypical: none of the cousins on my facebook are underage except for one[05:07:35] <r0bby> wait no not true.[05:07:41] <cheeser> ~interesting[05:07:41] <javabot> this is all very interesting (not really) but please take it somewhere else.[05:07:50] <r0bby> blame pr3d4t0r![05:07:55] * r0bby ends it though :)[05:08:06] *** christo_m has joined ##java[05:09:21] *** The_Birdman has quit IRC[05:12:22] *** zed_DX has quit IRC[05:13:46] *** bimbo has left ##java[05:14:31] *** ishino has quit IRC[05:15:56] *** andrewkasper has quit IRC[05:16:10] *** beol has joined ##java[05:16:25] *** beol has quit IRC[05:17:17] <webPragmatist> are you supposed to put directories in your package?[05:17:58] <razel> whats the End of file signal as a String[05:18:03] <razel> like int is -1[05:19:07] <cheeser> there is no EOF char/value[05:19:17] <razel> there is a char value[05:19:21] <razel> (char) -1[05:19:28] <razel> but i dunno if i can use it for string[05:19:39] <cheeser> are you talking about getting -1 back from read(byte[]) ?[05:19:51] <razel> yes but i want to use readLine()[05:19:55] <razel> not read()[05:20:08] <cheeser> that -1 doesn't come from the file. it's the number of bytes read[05:20:09] *** aTypical has quit IRC[05:20:22] <razel> oh[05:20:35] <cheeser> the javadoc actually discusses all this[05:20:39] <Fanook|WoW> razel: the EOS marker depends on the method you're using to read. The docs for each method tell you what to look for[05:22:03] <dmlloyd> ~be api barbie[05:22:03] <javabot> <barbie>Javadoc is *hard*</barbie>[05:22:08] *** ferret_ has joined ##Java[05:22:28] *** Darkclaw66 has joined ##java[05:22:29] <Darkclaw66> anyone have a easy solution to do a CAPTCHA on a contact form?[05:22:54] <cheeser> Darkclaw66: do you have a java question?[05:23:02] <Darkclaw66> I asked my question[05:23:31] <cheeser> using struts? wicket? jsf?[05:23:41] <cheeser> the question doesn't really scream "java" to me[05:23:42] <Darkclaw66> I dont have anything yet[05:23:50] <Darkclaw66> im looking for a solution[05:24:39] <cheeser> ~google java captcha[05:24:39] <javabot> http://letmegooglethatforyou.com/?q=java+captcha[05:25:00] <Darkclaw66> ~google no shit[05:25:01] <javabot> http://letmegooglethatforyou.com/?q=no+shit[05:25:25] *** monkeycid has joined ##java[05:25:50] <cheeser> Darkclaw66: you're gonna have to exert some effort to solve your own problems.[05:27:19] <Darkclaw66> how do you know I haven't exerted any effort[05:27:32] <Darkclaw66> it is possible I have spent my entire life for this solution[05:27:47] <cheeser> "i don't have anything yet"[05:28:02] <cheeser> you haven't even picked a web framework yet.[05:28:04] <Darkclaw66> you never know :)[05:28:16] <cheeser> hell, even saying you're building using not but pure jsp would be a start.[05:28:25] <cheeser> Darkclaw66: but you haven't, have you?[05:28:45] <Darkclaw66> I actually have. I used this stupid recaptcha thing and it was too complex[05:28:59] <cheeser> see? some context.[05:29:06] <cheeser> what'd you build your app with?[05:29:19] <cheeser> some frameworks have facilities built-in[05:29:21] <Darkclaw66> nothing, I just put it in html[05:29:33] <cheeser> is this even a java web app?[05:29:40] <Darkclaw66> it could be[05:29:46] <Darkclaw66> im open to it[05:29:57] <cheeser> maybe you should try #web then.[05:33:03] *** waz has quit IRC[05:34:57] *** amnesiac has joined ##java[05:36:37] *** weedle has joined ##java[05:36:52] *** ScottG489 has quit IRC[05:37:48] *** gdoko has quit IRC[05:37:56] <Infinito> lol...[05:38:11] *** aceofspades19 has joined ##java[05:38:28] *** weedle has left ##java[05:40:00] *** ScottG489 has joined ##java[05:43:15] *** marvs has quit IRC[05:43:27] *** Lunis has left ##java[05:44:34] *** eduardoboss has quit IRC[05:44:35] *** delirium- has joined ##java[05:45:56] *** ravv has quit IRC[05:46:19] *** ravv has joined ##java[05:47:49] *** josemoreira has joined ##java[05:51:22] *** Fanook|WoW has quit IRC[05:52:44] *** casmo has quit IRC[05:55:12] *** Darkclaw66 has quit IRC[05:56:09] *** smackdab has joined ##java[05:56:31] *** casmo has joined ##java[05:57:37] <nor3> argh, why doesn't java.security.MessageDigest have a hexDigest function?[05:58:33] <joed> http://www.jguru.com/faq/view.jsp?EID=4316[05:59:16] <nor3> that's not a hexstring digest[05:59:37] <joed> No it is a digest.[05:59:42] <nor3> yeah, well[05:59:49] <nor3> i want the hexstring digest[05:59:56] <nor3> apparently org.apache.soap.encoding.Hex does that[06:00:04] <nor3> i wonder if i have that package[06:00:26] <joed> You can't do hex encoding?[06:02:24] <nor3> i could write my own function, but its the kind of thing the messagedigest class itself should provide[06:02:42] <joed> Hexencoding? Why?[06:02:43] <smackdab> I have 10 http requests that come in, and my app can only service one at a time. Currently, I service the first, and as new ones come in, I queue them up and service only the most recent one. Now, I want to change it to service them in LIFO order.[06:03:17] *** TheiPirate has joined ##java[06:03:20] <nor3> because the message digest lib of every other language i deal with has it[06:03:24] <smackdab> It seems there are a number of ways to do this in FIFO order in java.util.concurrent, but I'm lost as to how to do this LIFO.[06:03:35] <smackdab> btw, this is a Servlet Filter.[06:04:13] <joed> smackdab: You'd reverse the order, how to deal with that in a servlet is more interestinf.[06:04:23] <joed> interesting.[06:04:41] <joed> nor3: Awesome.[06:04:41] <smackdab> certainly the order would be reversed. But I'm trying to figure out how :)[06:05:07] <joed> smackdab: you'd need to keep customers waiting.[06:05:24] <smackdab> Well, these are per-session.[06:06:05] *** asap18 has quit IRC[06:06:13] *** Greyhound- has joined ##java[06:06:28] <TheiPirate> how can i search a hashmap and find out if a current object is already in the hashmap[06:06:36] <smackdab> .contains[06:06:45] *** aceofspades19 has quit IRC[06:06:52] *** woogley_ has joined ##java[06:06:57] <smackdab> TheiPirate if you know the key, use contains.[06:07:06] *** woogley has quit IRC[06:07:06] <TheiPirate> I dont know the key[06:07:08] *** woogley_ is now known as woogley[06:07:38] <smackdab> you can iterate over the values array, or use a different data structure, e.g., HashSet[06:08:01] <TheiPirate> ok thanks[06:08:29] *** asap18 has joined ##java[06:08:41] <smackdab> try map.values().contains(...)[06:10:56] *** delskorch has quit IRC[06:13:01] *** gdoko has joined ##java[06:13:42] *** phyburn has quit IRC[06:15:38] *** pattwo has joined ##java[06:16:30] <mlester> how do you spin threads so that they either complete or a certain time limit occured[06:16:43] *** fryderyk has quit IRC[06:17:20] <smackdab> mlester: Thread.join(milliseconds)[06:17:48] <mlester> ok I'll try that[06:20:18] <mlester> hmm well this has to be done in the main method I pretty much want it to go run x threads to completion or a certain time period occurs[06:21:55] *** Junior has joined ##java[06:22:21] *** amnesiac has quit IRC[06:22:50] *** initialzero has joined ##java[06:23:09] *** camilojd has quit IRC[06:23:11] <Junior> good morning[06:24:01] <smackdab> mlester, at the beginning of the program, you can calculate your desired end date (System.currentTimeMillis()), then after spinning up the threads you can do a Thread.sleep(millis), passing in the amount of time left for the program to run. When it comes back from that sleep, System.exit....[06:24:32] <smackdab> that will guarantee it will never run longer than a certain time.[06:24:49] * cheeser blinks[06:25:02] <mlester> ok cool[06:25:03] <smackdab> or after kicking of the threads, have a loop that monitors & sleeps till they are done or the time passes[06:26:32] <cheeser> ~javadoc ExecutorService.awaitTermination(*)[06:26:34] <javabot> cheeser: http://is.gd/k43a [java.util.concurrent.ExecutorService.awaitTermination(long,TimeUnit)][06:26:49] *** staykov has quit IRC[06:27:04] *** npm has quit IRC[06:28:10] *** delirium- has quit IRC[06:28:11] <smackdab> If I have several threads that are all doing a wait() on the same object, and notifyAll() gets called, and then some individually all call wait() again, do they have a chance of getting notified accidentally? in other words, does notifyall determine who's waiting before notifying anyone?[06:29:25] *** mgenov has quit IRC[06:29:40] <smackdab> meh, nevermind[06:31:07] *** smackdab has quit IRC[06:32:10] <Apocalisp> Brave man. I wouldn't touch wait() and notifyAll(). There be dragons.[06:32:28] *** pstickne has joined ##java[06:32:40] *** Frostix has quit IRC[06:32:49] <pstickne> so I've been doing some profiling and optimizing ...[06:32:59] <Apocalisp> why the long face?[06:33:08] <cheeser> why so serious?[06:33:38] <pstickne> I've reduced some huge bottle necks, but I am being ultimately thwarted by just the IO portion ... it takes about as long to /get/ the data into the decoder for the decoder to actually decode...[06:33:44] <pstickne> =([06:33:49] <pstickne> (there you go)[06:34:17] *** staykov has joined ##java[06:34:53] <pstickne> (picking off the bits sequences is brutal)[06:35:25] <Apocalisp> What can you do about that, beyond buffering?[06:36:05] <pstickne> Apocalisp: I do buffer. This is just pulling it from an array :p[06:37:24] <pstickne> Apocalisp: that is, read in variable amounts of bits...[06:37:29] <cheeser> pstickne: then maybe you're running about of memory...[06:37:37] <cheeser> so you spend more time thrashing[06:38:06] <pstickne> cheeser: no, it's fine, I think I'm just hitting limits of not being able to do really sneaky things with memory :-)[06:38:13] <cheeser> 8^)=[06:38:38] <pstickne> cheeser: but it's down to about 60% execution time of when I started so -- a good couple of hours :)[06:41:06] <pstickne> One thing I /might/ be able to do is shift from a byte array to a long/int array ... but that sounds like a lot of work for potentially very negative payout. I don't feel like writing any performance tests at the moment :p[06:43:05] <cheeser> ByteBuffer maybe?[06:44:38] *** monestri has quit IRC[06:44:50] *** monestri has joined ##java[06:45:10] *** FireSlash has quit IRC[06:45:33] <tazle> pstickne: what are you doing?[06:45:37] <pstickne> cheeser: I guess I should throw it into the performance-analysis mix[06:45:51] *** Ringtailed-Fox has quit IRC[06:45:57] <pstickne> tazle: 100% java mpeg4 video playback :)[06:47:18] *** knight[rage] has joined ##java[06:47:27] <pstickne> tazle: from a 320x200 mpeg4 (simple, l2, 12fps) I can run < 10% CPU @ 800Mhz (the Java 2D scaling kinda sucks), but still < 40% CPU when scaled to 800x? isn't too bad -- nevermind that VLC plays this < 5% CPU fullscreen :-/[06:47:56] <knight[rage]> if im using a HashMap with a class as the key, does it use .equals() or == to test for key equality when doing hashmap.get(key)?[06:48:38] <tazle> pstickne: scaling in software sounds like a bad idea[06:48:41] <pstickne> tazle: I really need to hit this with larger input files though (my final target 480x300-ish upscaled to 960x600ish on a "relatively modern computer")[06:49:19] <pstickne> tazle: no, no, I use the Java2D to scale -- but it doesn't quite seem to be doing it all super-cool in OpenGL atm :([06:49:31] *** mosno has quit IRC[06:49:36] <tazle> pstickne: yes, but how do you use it?[06:49:40] <pstickne> (when I enable the OpenGL flags explicitly it actually /runs worse/ when scaled)[06:49:44] <pstickne> tazle: hmm?[06:50:05] <tazle> pstickne: I guess you have some sort of BufferedImage - how do you blit that on screen?[06:51:56] <pstickne> tazle: Raster.setDataElements <- BufferedImage -> Graphics2D.drawImage (with RenderingHints.?_BILINEAR)[06:52:23] <tazle> pstickne: hmm[06:52:33] *** _acid__ has quit IRC[06:52:45] <pstickne> it runs a good bit faster when scaled with just NEAREST.[06:52:48] <tazle> pstickne: and what is the Graphics2D actually tied to?[06:52:58] <pstickne> tazle: it comes from a Frame[06:53:07] <pstickne> and that gets attached to X somehow :p[06:53:13] *** meanburrito920_ has quit IRC[06:53:36] <pstickne> (gl is working correctly for other X programs)[06:54:04] <knight[rage]> nm, found the issue[06:55:12] <tazle> pstickne: http://today.java.net/cs/user/print/a/147 seems to say there is -Dsun.java2d.trace=log which should tlel you which operations are actually peformed via OpenGL[06:55:37] <pstickne> tazle: awesome, I'll check it out[06:56:31] *** webPragmatist has quit IRC[06:57:02] <pstickne> all I get is sun.java2d.loops.TransformHelper::TransformHelper(IntRgb, SrcNoEa, IntArgbPre) :-/[06:58:19] <pstickne> Hmm... I wonder what I create the BufferedImage with...[06:58:23] *** euvitudo has quit IRC[06:58:23] *** foenichs has joined ##java[07:00:02] <pstickne> hmm, I wonder if there would be any reason directly using INT_ARGB_PRE[07:02:06] *** casmo has quit IRC[07:02:55] *** Bevin has joined ##java[07:04:22] *** foenichs has quit IRC[07:05:24] <pstickne> Doesn't seem like it :p[07:06:53] <pstickne> tazle: but ... when I enable the logging the CPU usages /drops/ from 50% to about 25% :p[07:07:27] <tazle> ...[07:07:31] <pstickne> heh[07:07:32] <pstickne> I know[07:08:05] <pstickne> I was like "wow, my changes really worked!" (and then I disabled the logging and then it was back to what I expected)[07:08:32] *** ttmrichter has quit IRC[07:09:39] <pstickne> that is odd. with logging enabled X jumps to about 60% CPU, but java is 25%ish, with no logging Xorg is 30% and java is 50%...[07:09:59] <pstickne> so I guess it's about a neutral net :p[07:10:12] *** vix85 has joined ##java[07:11:04] *** matiu has joined ##java[07:11:31] <matiu> Which is the the most efficient jdk for 64 bit arch ? ibm/sun/ etc ..[07:11:44] <matiu> efficient as in memory usage and speed ..[07:11:52] <pstickne> test test test.[07:12:02] <ernimril> matiu: not easy to say...[07:12:17] *** ttmrichter has joined ##java[07:12:32] <matiu> Are these ones I've heard of like diablo and rocket stable do you think ?[07:12:39] <matiu> jrockit[07:12:46] <ernimril> matiu: I think both jrockit and ibm use compressed pointers ifyou use less than 4 GB heap (hotspot/sun will do it wiht java/7)[07:12:47] <pstickne> test test test.[07:13:03] *** spacepup has joined ##java[07:13:09] <matiu> cool, thanks ernimril :)[07:13:09] <ernimril> matiu: the only way to find out is to try the different ones[07:13:24] <matiu> I think i'll just go with sun for now .. :)[07:13:36] <matiu> Thanks for your help guys :)[07:14:34] *** mele- has quit IRC[07:14:56] <ernimril> matiu: if you have memory problems it is most typically your own fault and then you should just get a profiler and fix your memory usage[07:15:09] *** squi has joined ##java[07:15:44] *** mlester has left ##java[07:16:02] <matiu> ernimril, yeah, I just want to choose a low mem one to run on a 256 Mb VPS for running opentts and that JS shrinker thing ..[07:16:06] <matiu> not really for programming :)[07:16:27] <ernimril> matiu: why do you run a 64 bit env in a vps?[07:16:38] <matiu> That's what it comes as :)[07:16:52] <pstickne> ernimril: dunno about that, Java [serve] is kinda a hog memory-wise :p[07:16:55] <pstickne> *server[07:17:26] <matiu> maybe I'll go with IBM, I remember from years ago it was a bit ahead of the game then ..[07:18:47] <pstickne> and years ago jikes was actually a viable compiler..[07:18:56] *** blankthemuffin has joined ##java[07:19:00] <pstickne> ..try the different options. then choose.[07:20:02] *** baklava has quit IRC[07:24:09] *** boka has joined ##java[07:24:09] *** deepjoy has joined ##java[07:24:10] *** skoskav has quit IRC[07:24:42] <matiu> thanks guys[07:24:43] *** matiu has left ##java[07:25:22] <boka> are there any good books for j2ee?[07:25:40] <boka> i am evaluating a book for my friend here. he's in all this java stuffs..[07:25:47] <boka> s/in/into/g[07:26:16] <boka> javabot: j2ee[07:26:17] <javabot> for a tutorial on java ee see http://java.sun.com/javaee/5/docs/tutorial/doc/[07:26:25] <boka> javabot: j2ee books[07:26:25] <javabot> boka, I have no idea what j2ee books is.[07:26:30] <boka> javabot: die[07:26:30] <javabot> I'm not alive anyway.[07:26:32] <boka> :p[07:26:51] <boka> he wants a book though javabot[07:26:51] *** sebr has quit IRC[07:26:59] <boka> a hard book?[07:27:33] <boka> gosh everyone's forgotten about books in this internet age[07:28:40] <boka> javabot: book[07:28:40] <javabot> Download these two beginners' bibles free of charge: 1) Sun Java Tutorial at http://java.sun.com/docs/books/tutorial 2) Bruce Eckel's "Thinking in Java" at http://www.mindview.net/Books/TIJ[07:28:45] *** ahughes has quit IRC[07:29:55] <boka> yada yada.. i am looking man.[07:29:59] <boka> anyone?[07:32:25] *** Kwitschibo has joined ##java[07:33:38] <boka> damn i'll just tell him to read it off web[07:33:48] *** resmo_ has quit IRC[07:34:39] *** Copter has joined ##java[07:35:31] *** vix85 has quit IRC[07:36:48] *** sebr has joined ##java[07:36:50] *** mikecc has joined ##java[07:36:53] *** bas-i has joined ##java[07:37:38] <boka> need a j2ee hard cover book (one you can recommend). if you know please let me know. recommending to a friend. thanks![07:39:53] <boka> need a j2ee hard cover book (one you can recommend). if you know please let me know. recommending to a friend. thanks![07:40:28] <dangertools> ~repeat[07:40:28] <javabot> Please don't repeat yourself, it annoys people and rarely produces results. Try rephrasing or, failing that, come back in a good while when there are different people here. Meanwhile, google is your friend.[07:40:28] *** boka has quit IRC[07:41:12] *** boka has joined ##java[07:41:19] *** gverig has joined ##java[07:41:24] <gverig> morning[07:41:25] <boka> hrm?[07:41:33] <boka> hi gverig[07:41:38] <boka> need a j2ee hard cover book (one you can recommend). if you know please let me know. recommending to a friend. thanks![07:41:49] <gverig> am I going instane or was there a class that provided hash generation for different types?[07:42:19] <boka> gverig: sha1sum("i don't know java"); done[07:42:27] <boka> that's python btw :D[07:42:28] <gverig> boka: what for? who's the friend? level of expertise?[07:42:38] <boka> gverig: it's for beginner level i reckon[07:42:53] <boka> gverig: he knows java if thats what you ask[07:43:13] <mikecc> hey guys for the Polygon class there is an array that contains every x point and every ypoint of a particular polygon. i am trying to write something that sees if two Ellipse2D.Double's collide (like balls or something) and was wondering if this class also had a similar array[07:43:23] <boka> but mostly j2ee-centric stuffs. he says its getting hard to get a job using only java[07:43:25] <dangertools> boka: just wondering why you are searching a book for him. doesn't seem that you have a clue yourself[07:43:36] <boka> dangertools: he's my friend and like a brother[07:43:39] <boka> small brother[07:43:43] <gverig> boka: basically (and this is just my opinion), J2EE is not widely used beyond servlets (I will be crucified for this...)[07:43:49] <dangertools> boka: so?[07:43:58] <boka> gverig: right.[07:44:13] <boka> dangertools: quit the schumk off your face. wouldn't you help your friends stupid?[07:44:33] <gverig> boka: so do him a favor and find something useful :) Like effective java, or GOF or something like that[07:44:44] *** pa has quit IRC[07:44:58] <dangertools> boka: i would, for topics i know myself[07:45:05] <boka> gverig: i found the http://java.sun.com/javaee/5/docs/tutorial/doc/ from javabot but i wanted something intro hard cover[07:45:13] <boka> gverig: like intro to j2ee or sth[07:45:47] <boka> so he can read in bus and class room at university[07:46:04] <gverig> boka: Again, a) I would *not* recommend a book on J2EE, unless he is doing something enterprise level (with messaging, hardcore transactions and stuff)[07:46:18] <boka> gverig: right. so tell him best to read unless he is doing something enterprise level (with messaging, hardcore transactions and stuff)[07:46:23] <boka> http://java.sun.com/javaee/5/docs/tutorial/doc/[07:46:23] <gverig> b)... lost train of thought, sorry :)[07:46:30] <boka> gverig: sorry i meant http://java.sun.com/javaee/5/docs/tutorial/doc/[07:46:53] *** riotz has quit IRC[07:47:20] <r0bby> boka: manning.com[07:47:23] <r0bby> apress.com[07:47:41] <r0bby> those publishers have decent books on java enterprise development.[07:47:44] <gverig> boka: find a tutorial online for servlets (few million of so available). And as he starts getting into stuff he needs he will pick up other books[07:47:54] <boka> r0bby: is it good? can you recommend it? thanks.[07:47:59] <gverig> boka: pick up a book for him on Spring or Maven meanwhile[07:48:09] <r0bby> recommend? meh[07:48:10] <boka> gverig: thanks i'll give him that as well.[07:48:24] <boka> r0bby: you are recommending ;)[07:48:25] <r0bby> but I can vouce for the quality of manning and apress i like em.[07:48:30] <boka> right[07:48:34] <r0bby> vouch*[07:48:40] *** doc`` has quit IRC[07:48:50] <gverig> r0bby: any idea how to generate a hash based on an integer without creating Integer object? I thought there was a class somewhere that provided this method...[07:48:54] <gverig> ~hash[07:48:54] <javabot> gverig, I have no idea what hash is.[07:49:01] <gverig> ~hashCode[07:49:01] <javabot> gverig, hashCode is something you must override if you override equals. See http://developer.java.sun.com/developer/Books/effectivejava/Chapter3.pdf[07:49:04] <boka> r0bby: any specific ones from manning/apress? or just search generic "j2ee" ?[07:49:19] <r0bby> there is one[07:49:34] <r0bby> Java EE From Novice to Expert or some shit from apress[07:49:42] *** pattwo has quit IRC[07:49:43] <boka> right[07:49:44] <r0bby> i dont know the title offhand[07:49:51] * boka searches[07:49:52] <r0bby> i think that's it.[07:50:01] <r0bby> boka: but Spring is something he should learn[07:50:25] <boka> r0bby: is it some sort of library or what?[07:50:38] <r0bby> no, it's a framework[07:50:40] <r0bby> ~~ boka spring[07:50:41] <javabot> boka, spring is a Java/JEE Application Framework - http://www.springframework.org/[07:50:50] <boka> r0bby: right. thanks :)[07:51:40] <boka> r0bby: Beginning J2EE 1.4: From Novice to Professional is what i found closest to your definition[07:52:25] <boka> r0bby: so would you recommend learning Spring using hard cover or from web?[07:53:46] *** rotzak has joined ##java[07:53:48] <r0bby> Not what you want[07:53:55] <r0bby> boka: hold on[07:54:15] <boka> r0bby: sure[07:54:44] <rotzak> Is there a way to tell if two objects are of the same type when you can't guarantee the type of the objects you're testing?[07:54:57] <rotzak> in other words, instanceof won't work in my situation[07:55:15] <rotzak> without doing an instanceof for each possible type[07:55:24] *** reisi has quit IRC[07:55:33] <r0bby> http://www.apress.com/book/view/1590594703[07:55:42] *** squi has quit IRC[07:55:59] <r0bby> http://www.apress.com/book/search?searchterm=java+ee&act=search&submit.x=0&submit.y=0[07:56:04] <boka> r0bby: thanks a lot.[07:56:14] <dangertools> rotzak: compare classes[07:56:20] <rotzak> er...[07:56:46] <rotzak> oh[07:56:48] <rotzak> duh[07:57:13] <rotzak> can I just do a.getClass().equals(b.getClass())?[07:58:04] <dangertools> sure[07:58:16] <r0bby> http://www.apress.com/book/view/1590599217[07:59:06] <rotzak> doesn't seem to work quite right :-\ my debugger is telling me that my objects are indeed of the same type but a.getClass().equals(b.getClass()) is failing...hmmm[07:59:08] *** NiSoOo has quit IRC[08:00:33] *** tomvolek has joined ##java[08:00:37] <dangertools> rotzak: really if the same type or of a common supertype?[08:00:38] <gverig> crap... any idea why Set.remove even for version with generics takes Object and not T (or ? extends T or ? super T)?[08:00:44] <boka> r0bby: yup gotcha[08:00:53] <rotzak> arg, I'm an idiot, sorry, there was a level of indirection that I didn't see[08:01:08] <rotzak> my debugger tricked me a little :)[08:01:37] <r0bby> adios[08:01:40] *** deca has joined ##java[08:01:42] *** casmo has joined ##java[08:02:11] <boka> r0bby: see ya[08:03:10] *** gdoko has quit IRC[08:04:32] <Ragnor> gverig: I think it is for compatibility with non-generic (legacy) code. Cannot remember details or exmaples, though.[08:07:40] *** Ububegin has joined ##java[08:07:45] *** Ububegin has left ##java[08:07:48] *** Ububegin has joined ##java[08:08:24] <Ububegin> I intend to go for this course.. http://www.sun.com/training/catalog/courses/FJ-310-EE5.xml ... what the *Familiar with component technology* mean..[08:08:24] *** Dr_Link has quit IRC[08:08:39] *** Dr_Link has joined ##java[08:09:43] *** boka has left ##java[08:11:37] *** xabbuh has joined ##java[08:18:24] *** J0bk has quit IRC[08:19:08] *** cybereal has joined ##java[08:19:35] *** TooAngel has joined ##java[08:19:46] *** gverig has quit IRC[08:20:20] *** TooAngel has left ##java[08:25:01] *** deepjoy has left ##java[08:28:50] *** Greyhound_ has joined ##java[08:36:35] *** mmc has joined ##java[08:37:50] *** dpy has joined ##java[08:41:16] <pstickne> is tptp known to leak like sieve in a monsoon?[08:46:00] *** bindaas has joined ##java[08:46:32] *** Greyhound- has quit IRC[08:53:57] <deebo> anyone know what 'read timed out' actually means?[08:54:14] <deebo> pstickne: the profiling tool for eclipse? worked fine for me[08:54:32] <deebo> tho getting it to run without core dumping was hit/miss[08:54:33] *** shadewind has joined ##java[08:54:38] <pstickne> deebo: I can profile about 3 times. then I need to restart eclipse. :)[08:54:48] <deebo> i had no problems in eclipse[08:54:54] <cybereal> deebo: it means the system defined tcp recv timeout was breached when waiting on a read[08:55:06] <cybereal> though I've seen the same error used for higher level timeouts[08:55:09] <pstickne> (ptpt makes eclipse eat upwards of 2GB before it gets too unresponsive...)[08:55:13] <deebo> i had to constantly restart the profilign server thing[08:55:15] <cybereal> coming from a socket it's what I said though[08:55:28] <deebo> cybereal: yeah but what happens, that was my question really :)[08:55:42] <deebo> does it take too long to receive the data or too long waiting for no data at all[08:55:52] <cybereal> too long to receive an ack[08:56:12] <cybereal> depending on the tcp/ip implementation it can happen for the no data case too[08:56:21] <cybereal> that's usually determined by the KEEPALIVE setting[08:56:33] <deebo> this is gonna be a tricky one then[08:56:47] <deebo> querying a SAP server for massive amounts of data and it read time outs from time to time[08:56:47] <cybereal> keepalive is off by default I think so if you're hitting that, first thing to do is enable keepalive[08:56:53] <deebo> i guess the server is busy calculating an answer[08:57:09] <cybereal> that or the network's unstable so the intermediate acknowledgements (the ones without data associated) aren't returned[08:57:27] <deebo> nah it works perfectly for smaller data sets[08:57:36] <cybereal> still I'd check on the keepalive setting first that might be all you need[09:01:42] <deebo> using httpclient, not sockets directly[09:02:18] *** dvayanu has joined ##java[09:02:19] <cybereal> haven't worked with it, it's a socket setting but it might be something you can pass on to httpclient. http client might also be reusing that same text for its own timeout btw[09:02:26] *** dvayanu has quit IRC[09:02:27] <cybereal> you'll have to rule that out too[09:02:33] <cybereal> (easy enough, just grep the source of httpclient)[09:03:59] *** neshaug has joined ##java[09:06:16] *** Levia has quit IRC[09:10:27] *** pierrep has joined ##java[09:14:33] *** foo-nix has joined ##java[09:15:01] *** deepjoy has joined ##java[09:15:13] *** linxuz3r has quit IRC[09:18:46] *** bas-i has quit IRC[09:20:30] *** agnul has joined ##java[09:21:03] *** gdoko has joined ##java[09:21:41] *** AdrienC has joined ##java[09:22:02] <AdrienC> hi[09:24:16] *** monkeycid has quit IRC[09:26:15] *** bas-i has joined ##java[09:26:57] *** mengu has quit IRC[09:27:51] *** geaaru has joined ##java[09:27:58] *** Resistance has quit IRC[09:29:39] *** btb996 has joined ##java[09:30:00] <geaaru> hi, i try to create a mail sender application with javamail (sun) but i don't understand how can i send an email[09:30:04] <geaaru> to a smtp server[09:30:22] <geaaru> that listen to a SSL port and need user and password[09:30:34] <geaaru> and use both to and cc address?[09:30:43] *** gregor_k has joined ##java[09:30:45] <mikecc> hey guys whats the easiest way to detect collision of 2 Ellipse2D.Double's?[09:30:52] <mikecc> 2 or more i should say[09:31:00] *** ankylose has joined ##java[09:31:10] <ankylose> hi[09:31:19] <geaaru> to manage authentication i need recover transport object from session and then[09:31:38] <geaaru> call transport.connect and for send email transport.sendMessage(message, address)[09:31:55] <geaaru> but address are only relative to "to" destination[09:32:05] *** tilerendering has joined ##java[09:32:13] <geaaru> how can i send an email with both to and cc ... then?[09:32:17] <geaaru> thanks in advance[09:32:28] *** monkeycid has joined ##java[09:33:08] <deufrai> geaaru: check Message's API. You can privde TO, CC, and BCC adresses[09:33:12] <ankylose> how can i do transfert an entity and there linked entities through rmi or ejb method without use of eager fetching ?[09:33:19] <ankylose> what is the best way[09:33:36] *** ttmrichter has quit IRC[09:34:09] *** kungen has joined ##java[09:34:17] <deufrai> geaaru: by using Message.RecipientType[09:35:34] *** Spike1506 has joined ##java[09:37:01] <deufrai> geaaru: and using Transport.send(Message msg)[09:37:20] *** Resistance has joined ##java[09:37:25] *** ldamwork has quit IRC[09:37:31] <geaaru> yes but works only for port 25[09:39:27] *** examancer has quit IRC[09:40:13] <deufrai> never did SSL, can just answer on CCs[09:40:25] *** dvayanu has joined ##java[09:40:37] <TheiPirate> Oooo[09:42:00] *** ttmrichter has joined ##java[09:42:09] <geaaru> but for send email with user e pwd authentication use transport.connect[09:42:22] *** kane77 has joined ##java[09:44:05] *** monkeycid has quit IRC[09:44:05] *** armyriad has quit IRC[09:44:12] <deufrai> geaaru: to use another port number, have you tried to set the "mail.smtp.port" property in theProperties object used to create your session ?[09:44:47] <geaaru> and then for send email i need use transport.sendMessage that get only Address for to or yet for cc or bcc?[09:45:54] <deufrai> geaaru: set your recipients with Message.addRecipients(...)[09:46:14] <deufrai> as for SSL use, googling for 3' pointed me to a visibly useable example[09:46:15] *** ldamwork has joined ##java[09:48:01] <deufrai> geaaru: http://java.sun.com/products/javamail/javadocs/javax/mail/Message.html#addRecipients(javax.mail.Message.RecipientType,%20javax.mail.Address[])[09:48:13] <geaaru> yes, maybe i found problems for sendMessage i need to pass (message, message.getAllRecipients())[09:48:50] <geaaru> while before i have used sendMessage(message, message.getRecipients(Message.RecipientType.TO))[09:49:06] *** AdrienC has quit IRC[09:49:28] <geaaru> and so to cc message aren't sent correctly ... only visible to "to" email destination[09:50:38] <kane77> I try to change default color for JLabel, so I tried modifying the color for "Label.foreground" key in UIManager, but that does not have any effect. Should changing the key change the default JLabel color?[09:50:40] <deufrai> geaaru: can't you just use this method ? --> http://java.sun.com/products/javamail/javadocs/javax/mail/Transport.html#send(javax.mail.Message)[09:52:03] *** christo_m has quit IRC[09:52:06] <tieTYT3> is it me or is it really hard to install plugins in intellij 8.1 now[09:52:11] *** deSilva has joined ##java[09:52:12] <tieTYT3> i'm trying to install this emma code coverage plugin[09:52:19] <geaaru> not for connection where it is needed user and password because is needed use Transport t = session.getTransport(); t.connect(...), etc.[09:52:53] *** monkeycid has joined ##java[09:52:53] <deufrai> geaaru: I can't help further[09:53:15] <geaaru> deufrai: thank you very much for support and reply[09:53:20] <geaaru> i have only another question[09:53:39] <geaaru> smtp session is closed when i call transport.close() ?[09:53:52] <geaaru> or how can i close an smtp session?[09:54:54] *** KikiJiki has joined ##java[09:58:37] *** Woflborg has joined ##java[09:59:54] *** jerware has joined ##java[09:59:55] <jerware> hi[10:00:03] <jerware> i downloaded a java project my teacher wants us to complete. running gmake clean testttyui works on the college's unix box, but when i run it on my gentoo box i get 8 errors[10:00:11] <jerware> GameMain.java:53: cannot find symbol[10:00:20] <jerware> i have compiled small java programs before, so i know it's not my java set up.[10:01:19] <jerware> small java programs that even span multiple classes/packages.[10:01:39] <jerware> how is it that java programs work on one machine but not an other. i thought java is portable[10:01:56] <gregor_k> its likely a classpath problem[10:02:11] *** pstickne has quit IRC[10:02:33] <kane77> I created this little test and when I don't specify to use System look and feel (UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());) then when I use UIManager.getLookAndFeelDefaults().put("Label.foreground", new ColorUIResource(255,0,0)); it changes color of label, but when using system look and feel (GTK) then it does not have effect whatsoever, can anyone help me?[10:03:59] <gregor_k> not all look and feels use the same keys... afaik GTK laf uses the system colors and not self defined colors[10:04:36] *** dnmo has joined ##java[10:05:11] <jerware> gregor_k: how do i resolve this classpath problem ?[10:06:58] <kane77> gregor_k, is it possible to override the system color somehow?[10:07:08] *** Thorn has joined ##java[10:07:21] <jerware> gregor_k: hey i reassigned my $CLASSPATH variable. thanx a bunch pal.[10:07:30] <gregor_k> jerware: not sure depends how your build script works make sure when calling javac that your sourcepath points to the dir your sources are and your classpath to where your classes are[10:07:37] <gregor_k> ok[10:08:16] <gregor_k> kane77 do you like to change the color of all label or just of one[10:08:32] <kane77> gregor_k, all of the labels[10:09:00] *** Angel-SL has joined ##java[10:09:14] *** gfather has joined ##java[10:09:18] <gfather> hello guys[10:09:31] <gfather> any one read the book , java how to program ?[10:10:06] *** skoskav has joined ##java[10:10:13] <gregor_k> kane77 hmm.. i'm not very sure how GTK LAF works.. generally what you tried is the right way.. but I think GTK handles colors through OS configuration so it might ignore this value[10:10:44] *** vigge_sWe has joined ##java[10:11:21] *** monkeycid has quit IRC[10:11:46] *** elmomalmo has joined ##java[10:12:07] <kane77> it seems to me like it does..[10:13:20] <tieTYT3> anyone here using intellij 8.1?[10:13:25] <tieTYT3> i'd like you to test something for me[10:13:26] *** vigge_sWe has quit IRC[10:13:30] <tieTYT3> see if you can install the emma plugin[10:13:37] <tieTYT3> for me it says it's uninstalled after it restarts[10:14:43] *** thpar has joined ##java[10:15:03] *** kane77 has quit IRC[10:16:50] *** IceD^ has quit IRC[10:18:40] *** kercyr has quit IRC[10:19:09] *** Levia has joined ##java[10:19:14] <jerware> so just to recap, gmake looks under the list of directories in $CLASSPATH, and thier sub dirs as well. correct ?[10:19:47] *** monkeycid has joined ##java[10:19:50] *** doc`` has joined ##java[10:21:07] *** monkeycid has quit IRC[10:24:39] *** mocas has quit IRC[10:26:43] *** TheCastor has joined ##java[10:26:49] *** monestri has quit IRC[10:27:49] *** narff has joined ##java[10:28:16] *** mocas has joined ##java[10:29:35] *** monkeycid has joined ##java[10:31:03] *** systat has joined ##java[10:32:06] *** teralaser has joined ##java[10:32:14] *** Resistance has quit IRC[10:32:50] *** shadewind has quit IRC[10:36:03] *** dos000 has quit IRC[10:43:48] *** valcker has joined ##java[10:44:27] *** woogley has quit IRC[10:45:03] *** staykov is now known as buttlord[10:45:18] *** AhtiK has joined ##java[10:45:29] *** btb996 has quit IRC[10:47:56] *** lenni_-_ has joined ##java[10:49:57] *** narff has quit IRC[10:52:46] *** tilerendering has quit IRC[10:53:21] *** shervin_a has quit IRC[10:54:53] *** monkeycid has quit IRC[10:55:59] *** Levia has quit IRC[10:56:59] *** cybereal has quit IRC[10:57:22] *** squiddle has joined ##java[10:57:29] *** Levia has joined ##java[10:59:00] *** shervin_a has joined ##java[11:00:54] *** hzsp has joined ##java[11:03:05] <hzsp> hi. if I want to access a variable from an outer scope, how do I do it? example: http://rafb.net/p/OwWAMo11.html[11:03:24] *** juc0 has quit IRC[11:03:41] *** monkeycid has joined ##java[11:05:04] *** marvi has joined ##java[11:05:15] *** Resistance has joined ##java[11:05:31] *** tieTYT3 has quit IRC[11:05:32] <marvi> What's up with Javablogs?[11:06:04] *** indeterminatus has quit IRC[11:06:12] <AMcBain> hzsp: you really can't in that case, unless "foo" is a class, in which case you can do foo.hello[11:06:17] *** SinnerG has quit IRC[11:07:43] <hzsp> AMcBain: pity. I know I could get at hello if it was shadowed from an outer field using ParentClass.this.hello[11:07:43] *** gdoko has quit IRC[11:08:08] <hzsp> thanks anyway[11:08:11] <AMcBain> okay[11:12:46] *** monkeycid has quit IRC[11:14:40] *** lenni_-_ has quit IRC[11:16:24] *** foo-nix has quit IRC[11:16:31] *** juc0 has joined ##java[11:16:56] *** KermitTheFragger has joined ##java[11:17:14] *** betim has quit IRC[11:18:12] *** betim has joined ##java[11:19:33] *** betim has quit IRC[11:20:01] *** foo-nix has joined ##java[11:20:47] <ilyak> hi *[11:21:12] *** foo-nix has quit IRC[11:21:19] *** monkeycid has joined ##java[11:21:35] *** foo-nix has joined ##java[11:23:12] *** surial has joined ##java[11:23:23] <W_work> hzsp: I can see no reasonable argument for doing it this way[11:23:49] *** buttlord is now known as staykov[11:23:51] <W_work> hzsp: but if there is one, one way is to make a new method of the inner class where that local variable is not in scope, and use hello there[11:26:29] *** pschriner has joined ##java[11:27:18] *** pschriner has quit IRC[11:27:56] *** mikecc has quit IRC[11:29:22] *** ricky_clarkson has joined ##java[11:29:40] *** foo-nix has quit IRC[11:29:41] <ricky_clarkson> Hi. maven tells me that: uk.org.netvu:mylib:jar:windows-x86:1.0.0-SNAPSHOT is missing.[11:29:51] <ricky_clarkson> .m2/repository/uk/org/netvu/mylib/1.0.0-SNAPSHOT/mylib-1.0.0-SNAPSHOT-windows-x86.jar exists[11:29:54] *** foo-nix has joined ##java[11:29:54] <ricky_clarkson> Any suggestions?[11:30:38] *** foo-nix has quit IRC[11:31:05] *** foo-nix has joined ##java[11:32:08] *** doc`` has quit IRC[11:32:41] *** monkeycid has quit IRC[11:32:48] *** blankthemuffin has quit IRC[11:33:43] *** ycy has quit IRC[11:35:39] *** musically_ut has joined ##java[11:36:14] *** asap18 has quit IRC[11:37:07] *** blankthemuffin has joined ##java[11:37:20] *** prgrmr has quit IRC[11:38:03] *** bhz- has joined ##java[11:39:40] *** morkar- has joined ##java[11:40:57] *** monkeycid has joined ##java[11:42:27] *** josemoreira has quit IRC[11:42:46] *** monkeycid has quit IRC[11:43:06] *** nor3 has quit IRC[11:43:32] *** EspenG has joined ##java[11:44:47] *** pschriner has joined ##java[11:48:45] *** ml`_ has joined ##java[11:51:14] *** monkeycid has joined ##java[11:54:28] <musically_ut> What is the way of initializing a Vector<String>() object anonymously?[11:54:49] <musically_ut> I can 'return new String[]{"Something"};'[11:55:00] <deebo> static block[11:55:13] <musically_ut> What will be the equivalent, if there exists one, to return a Vector<String> ?[11:55:49] <deebo> unles there is some wrapper for it, you have to properly intitialize it[11:56:57] <musically_ut> deebo: Sigh, so {v = new Vector<String>(); /* add all strings one by one */; return v;} is the only way?[11:56:59] <ricky_clarkson> new ArrayList<String>() { { add("I"); add("no"); add("longer"); add("use"); add("Vector"); } };[11:57:22] <surial> musically_ut: new ArrayList<String>(Arrays.asList("a", "b", "c", "d", "e"));[11:57:25] <ricky_clarkson> Or new ArrayList<String>(Arrays.asList(..[11:57:36] <musically_ut> Excellent.[11:57:39] <surial> musically_ut: Or if it needs to be immutable, Collections.unmodifiableList(Arrays.asList("a", "b", "c", "d", "e"););[11:57:45] <surial> er, with just one semicolon.[11:57:58] <ricky_clarkson> Though the latter fails if you're doing generics.[11:58:06] <surial> ricky_clarkson: ?[11:58:26] <musically_ut> Arrays.asList is just what I needed, and so far I see myself as only using them for Strings.[11:58:33] <ricky_clarkson> surial: public <T> void form(T one, T two) { Arrays.asList(one, two); }[11:58:35] <ricky_clarkson> compile error.[11:58:36] *** squi has joined ##java[11:59:03] *** arpu has quit IRC[11:59:06] <musically_ut> So thanks surial, and ricky_clarkson ![11:59:23] <ricky_clarkson> You're very welcome, now answer my maven question.[11:59:25] *** marvi has quit IRC[11:59:35] <musically_ut> ricky_clarkson, I'll keep the first form in mind then for Generics.[11:59:35] *** monkeycid has quit IRC[11:59:42] <musically_ut> Maven question?[11:59:56] <ricky_clarkson> "Hi. maven tells me that: uk.org.netvu:mylib:jar:windows-x86:1.0.0-SNAPSHOT is missing."[12:00:05] <ricky_clarkson> ".m2/repository/uk/org/netvu/mylib/1.0.0-SNAPSHOT/mylib-1.0.0-SNAPSHOT-windows-x86.jar exists. Any suggestions?"[12:00:08] *** Archon has joined ##java[12:00:42] <surial> ricky_clarkson: Well, not a compile error. The varargs generics bug.[12:00:44] <surial> which is a warning.[12:01:02] <Archon> What event is fired when a user types something into a JTable cell? Is it handled by the JTable or the TableModel?[12:02:04] <surial> ricky_clarkson: I've stayed away from maven so far.[12:02:10] *** ycy has joined ##java[12:02:30] <ricky_clarkson> surial: Right, it's a warning. Is there a similar case that gives an error?[12:04:17] *** ankylose has quit IRC[12:04:19] <surial> ricky_clarkson: similar?[12:04:28] <ricky_clarkson> Not the same as, but not hugely different.[12:04:41] *** steve-e has joined ##java[12:04:47] <surial> uh.. involving varargs and generics resulting in an error? Not that I can think of.[12:04:57] <ricky_clarkson> Ok.[12:05:55] <ricky_clarkson> fwiw, I only use maven because my workplace uses it, just like Java.[12:05:55] *** ilyak has quit IRC[12:06:27] <surial> Yes, yes, of course. By all means, explain yourself to ##java. Imagine if we thought you did this voluntarily.[12:06:59] *** indeterminatus has joined ##java[12:07:03] <ricky_clarkson> I was responding to your comment about maven.[12:07:48] *** vigge_sWe has joined ##java[12:08:01] <vigge_sWe> hai[12:08:31] *** monkeycid has joined ##java[12:08:38] *** ricky_clarkson has left ##java[12:09:27] *** exbio has quit IRC[12:09:38] *** vigge_sWe has quit IRC[12:09:44] *** vigge_sWe has joined ##java[12:10:25] *** vigge_sWe has quit IRC[12:10:30] *** vigge_sWe has joined ##java[12:11:28] *** orgy` has joined ##java[12:11:28] *** vigge_sWe has quit IRC[12:11:57] *** vigge_sWe has joined ##java[12:12:04] <vigge_sWe> hai[12:12:40] <AMcBain> ~~vigge_sWe hi[12:12:40] <javabot> http://i38.tinypic.com/25aopzn.jpg[12:12:56] <vigge_sWe> is it possible to make a java XML-RPC client to contact a PHP XML-RPC script?[12:14:32] <vigge_sWe> because I just get:[12:14:35] <vigge_sWe> "Exception in thread "main" org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: White spaces are required between publicId and systemId."[12:14:41] *** ilyak has joined ##java[12:15:55] <letfunbegin> I'm getting a ClassCastException "java.lang.ClassCastException: bank.BankImpl cannot be cast to bank.BankImpl" - it's a bit complicated and I can't quite reproduce the error in an example (dynamic class loading involved etc.) -- but any idea why this may be? I know it's not a lot to go on, but I havn't a clue as of now[12:16:01] *** Junior has quit IRC[12:16:33] *** monkeycid has quit IRC[12:17:28] *** sombriks has joined ##java[12:19:47] *** vigge_sWe has quit IRC[12:20:54] *** NiSoOo has joined ##java[12:22:59] *** Archon has left ##java[12:24:16] *** verto has joined ##java[12:24:59] *** monkeycid has joined ##java[12:27:37] *** Varox has joined ##java[12:28:28] *** foo-nix has quit IRC[12:29:12] *** monkeycid has quit IRC[12:30:07] <Stephmw> letfunbegin: different classloaders?[12:30:58] <W_work> obviously[12:31:29] <letfunbegin> ah, that's it I'm sure. do'h :)[12:31:29] <surial> letfunbegin: Yes, differenet classloaders. The BankImpl instance you have was loaded by classloader 1, and the class that is trying to cast it to its concept of BankImpl is a BankImpl loaded by classloader 2.[12:31:38] <surial> oh, good, you know how this works. It can be complicated to explain.[12:31:56] <letfunbegin> thanks for the hint guys[12:32:08] <surial> letfunbegin: The error message could do with more detail.[12:32:14] <surial> letfunbegin: But it's a sufficiently rare case, I guess.[12:33:11] *** lem has joined ##java[12:33:16] *** android6011 has quit IRC[12:33:22] <lem> how come class Frame does not exist in javafx anymore?[12:34:10] <surial> You mean, compared to awt, or you mean: Compared to an earllier version of javafx?[12:34:35] *** ramdam has quit IRC[12:35:06] <W_work> ~why[12:35:07] <javabot> why is a silly question[12:35:08] *** AskHL has quit IRC[12:35:12] <lem> surial, to an earlier version. I can't find it anymore in javafx.application[12:35:18] <W_work> (and so is "how come")[12:35:30] <lem> yeah that's right[12:35:35] <surial> lem: Because javafx's API isn't set in stone yet.[12:35:35] <lem> ~right[12:35:35] <javabot> Practice does not make perfect, perfect practice makes perfect. Practicing bad habits will only reinforce their usage in the future. Just because your project is a prototype or temporary test does not mean it's a good idea to forego the good habits.[12:35:53] <lem> surial, but it must be somewhere or something similar[12:36:11] <surial> If you know a little about java's APIs, you should be happy that so far sun is not grabbing onto the concept of 'backwards compatibility' for dear life.[12:37:01] <lem> but there is no place to look at where the classes are in the actual release[12:37:16] <lem> the api does not tell about a frame class. but that can't be possible. there must be something like that[12:37:22] *** monkeycid has joined ##java[12:37:57] <surial> ~javafx[12:37:57] <javabot> JavaFX (http://sun.com/javafx) is a scripting language from Sun, designed to use declarative syntax to create GUIs, primarily. You can find a tutorial at http://java.sun.com/javafx/1/tutorials/ui/[12:38:05] <surial> ~javafx api[12:38:05] <javabot> surial, I have no idea what javafx api is.[12:38:07] <surial> hm..[12:38:23] <W_work> ~javadoc[12:38:23] <javabot> W_work, I have no idea what javadoc is.[12:38:41] <lem> ~girls[12:38:41] <javabot> lem, girls is http://www.xkcd.com/322/[12:38:47] *** spacepup has quit IRC[12:39:26] <W_work> Hmm, what's the command to list javabot's indexed APIs, then?[12:39:27] *** monkeycid has quit IRC[12:39:47] <surial> Huh. I can't find any api for it.[12:40:01] <surial> W_work: I don't think there is one.[12:40:13] <W_work> if there isn't one, there is a factoid[12:41:30] <surial> What's a class unique to javafx?[12:41:37] <surial> ~alljavadoc Frame[12:41:37] <javabot> http://myjavadoc.net/search/search-java.php/Frame[12:43:08] *** neshaug has quit IRC[12:44:27] <lem> ok, I found the reason: http://forums.sun.com/thread.jspa?threadID=5357617&tstart=1[12:45:03] <surial> Stage. Damnit. I was about to suggest that, then thought: Neh, that's probably stupid, I don't know enough about javafx.[12:45:12] <surial> still, a place with javadoc for javafx stuff would be nice.[12:45:41] <surial> found it.[12:45:42] <surial> http://openjfx.java.sun.com/current-build/doc/api/index.html[12:45:45] <surial> ~javafx api is http://openjfx.java.sun.com/current-build/doc/api/index.html[12:45:45] <javabot> Okay, surial.[12:46:02] <surial> though, that's not the complete docs.[12:46:03] <surial> :/[12:46:41] <surial> ~no, javafx api is http://java.sun.com/javafx/1.1/docs/api/[12:46:41] <javabot> I forgot about javafx api, surial.[12:46:42] <javabot> Okay, surial.[12:47:01] <surial> that IS complete. win.[12:48:01] *** steve-e has quit IRC[12:48:36] *** monkeycid has joined ##java[12:54:58] *** Junior has joined ##java[12:58:17] *** Resistance has quit IRC[13:00:28] *** andrewkasper has joined ##java[13:02:19] *** tomvolek has quit IRC[13:03:10] *** dnmo has quit IRC[13:05:00] *** fridim_ has joined ##java[13:06:25] *** monkeycid has quit IRC[13:06:58] *** EnderMB has joined ##java[13:07:36] *** sebrock has joined ##java[13:07:56] <EnderMB> Hey all. As far as OO principles are concerned is there any better way of passing private variables then creating getters and setters for all of them?[13:08:10] *** OsAC has joined ##java[13:08:15] *** gdoko has joined ##java[13:08:20] <sebrock> Hey, I need some help to pad a string with \0 - I cant get that to work... this is using MIDP[13:08:34] *** marvi has joined ##java[13:08:44] *** OsAC has left ##java[13:08:52] *** ries has joined ##java[13:09:45] <jottinger> morning[13:10:46] <surial> EnderMB: Yes, but without more context, you won't get an answer out of any of us.[13:10:56] <W_work> sebrock: so what do you really need? Padding a string with \0? or padding a string using MIDP?[13:11:07] * W_work doesn't know what MIDP is, but do know how to pad a string[13:11:14] <Junior> good morning jottinger[13:12:12] <W_work> EnderMB: yes - your statement implies all objects are mutable, while I prefer immutable objects when possible, and limiting what is mutable when I can't[13:13:19] <EnderMB> I'll try to be brief. I've created a game with several settings, where all settings extend the main Game class. I've got several variables to control certain aspects of the game, but as they're all private I've created getters and setters. It works, but 70% of my code is getters and setters.[13:13:29] <EnderMB> If you want I could put the main Game class up for you to look at.[13:13:36] <surial> 'settings extends the main game class'? Stop. That sounds like seriously bad design.[13:14:52] *** monkeycid has joined ##java[13:15:41] *** Logi has joined ##java[13:16:25] *** monkeycid has quit IRC[13:17:22] <Logi> I've got an application using JAI for image manipulation. I need to map certain "magic" colours in an image which is already being re-scaled, to avoid transparent pixels when the image is shown on the client. JAI is not very approachable - what class should I be reading about?[13:17:31] <sebrock> W_work, using MIDP libs I need to pad a string with \0 if its less than 8 chars[13:17:58] <W_work> sebrock: ok, sorry, can't help then. If you'd be happy with just padding a string, I could help you with that.[13:18:30] *** DragonLord- has joined ##java[13:18:52] <sebrock> W_work, well your method might help me too so go on...[13:19:24] <sebrock> However, StringBuilder is not an option :D[13:20:00] <sebrock> I'm thinking of concatenating \0 to my initial string[13:20:49] <W_work> Why is StringBuilder not an option? It is used for pretty much all String concatenation you do[13:21:34] *** Thorn has quit IRC[13:22:28] *** yclian has joined ##java[13:22:48] <bhz-> I don't see why stringBuilder.Append('\0') wouldn't work[13:22:57] <sebrock> not available in MIDP[13:22:59] *** gfather has quit IRC[13:23:36] <jottinger> sebrock FTW :[13:23:38] <jottinger> :)[13:23:50] <jottinger> Once you say MIDP, most of the normal mechanisms you'd use in Java disappear[13:23:52] *** dnmo has joined ##java[13:24:04] <bhz-> sebrock, then just create char[] and pad it yourself[13:24:05] *** monk-san has quit IRC[13:24:18] *** jacks- has joined ##java[13:24:23] <W_work> sebrock: StringBuffer, however, /is/ available[13:25:11] *** Resistance has joined ##java[13:25:18] *** monkeycid has joined ##java[13:25:23] <jacks-> how do you return more than one value from a function? does java have something like pythons tuples[13:25:48] <W_work> jacks-: Java has a type system where you can create your own classes[13:26:05] <jottinger> W_work: so does python[13:26:18] <jacks-> W_work that's an overkill for this[13:26:19] <W_work> jottinger: oh, really? I had no idea[13:26:31] <W_work> jacks-: I respectfully disagree[13:26:33] <jottinger> jacks-: nope, it isn't :)[13:26:56] <jottinger> Java has a proliferation of classes. You could, of course, create a tuple class...[13:27:10] <W_work> ew[13:27:14] <jacks-> I doubt you could one that's usable[13:27:21] *** EnderMB has quit IRC[13:27:22] <jacks-> i may be wrong though[13:27:53] <jacks-> and i believe that it's an overkill to create a new class used just to return multiple values. is that the only way in java[13:27:57] <W_work> jacks-: but what is "overkill" (there's no such thing as overkill!) in the context of creating a class for values that arguably have to belong together?[13:28:20] <jacks-> W_work, the fact that it'll be used only once[13:28:36] <W_work> do you normally not class values that belong together into classes?[13:28:40] <jottinger> jacks-: twice[13:28:58] <jottinger> and yes, it's the only way in Java. Of course, you could use Jython and get Python running in the JVM...[13:29:00] <W_work> yes, at least twice, and since you do not see the future clearly, possibly more[13:29:59] * Logi has a Pair<T,U> and Triple<T,U,V> with f.ex public static <T,U> Pair<T,U> of(T t, U u) { ... } but usually uses get turned into real classes pretty quickly[13:29:59] *** monkeycid has quit IRC[13:30:03] <jacks-> how is that clear? you have no idea what I'm returning[13:30:32] *** bigjocker has joined ##java[13:30:34] <jacks-> Logi, without a way to easily unpack those values like in python the usefulness of such a class is questionable[13:30:38] <jottinger> jacks-: if you have a method def foo\n\treturn [1,2,3]\nend in python, you use it TWICE[13:30:47] <jottinger> once to return the value, once to use the value returned[13:30:53] <jacks-> jottinger no i don't[13:30:57] <jacks-> a, b, c = foo()[13:30:59] <Logi> jacks-: it's less useful, yes[13:31:00] <jottinger> jacks-: then why do you have the method at all?[13:31:07] <jottinger> that's twice :[13:31:08] <jottinger> :)[13:31:25] <Logi> jacks-: but that was my point, really[13:31:27] <jottinger> anyway, in java you create a new class to do this. Sorry.[13:31:30] <W_work> jacks-: you lose some semantics, your code becomes less clear, doing it that way[13:31:46] <jottinger> You can argue all you like, but Java isn't python and doesn't support multiple retrn values like that.[13:31:54] <jottinger> unless, of course, you use jython.[13:31:59] <W_work> if you think verbosity in aid of clarity is "overkill" I don't see why you are using Java at all[13:32:16] <jottinger> W_work: no point in arguing against idiomatic python though[13:32:19] <jacks-> I'm not arguing, I simply asked a question. you started arguing[13:32:48] <jacks-> or rather, I didn't start the argument[13:33:20] *** genesiss has quit IRC[13:33:32] * W_work wonders how you detect who starts an argument[13:33:43] <W_work> and why it matters[13:33:46] <jacks-> you use your brain[13:33:54] <jottinger> chill out, both of you[13:33:56] <Logi> W_work: I generally just reflexively blame Bill Gates[13:34:02] <jottinger> this is ridiculous[13:34:05] <Logi> I find that works pretty well[13:34:16] <jottinger> jacks-: in Java, you create a class. In python, you can return a tuple.[13:34:38] <jottinger> If this makes you decide Java is retarded... *shrug* use Python. I've mentioned that possibility three times now.[13:35:24] <jottinger> ~jython[13:35:25] <javabot> jottinger, jython is at http://www.jython.org[13:35:46] *** harpal has joined ##java[13:35:48] <jottinger> I've used jython; it's faster than CPython and is generally quite good.[13:35:56] *** harpal has left ##java[13:36:49] <bhz-> that's surprising it's faster[13:37:18] <jottinger> bhz-: why? MRI is pig-slow, too[13:37:30] *** foo-nix has joined ##java[13:37:43] *** Ven]n has joined ##java[13:38:39] <Ven]n> how do I set what action to perform if a user presses exit (X) on a JFrame?[13:38:51] <Ven]n> wait a sec[13:38:55] *** monkeycid has joined ##java[13:38:55] <Ven]n> nevermind I think[13:38:56] <jottinger> JFrame.setDefaultActionOnClose() IIRC[13:38:56] <Ven]n> :)[13:40:19] <jottinger> bhz-: i mean, really: the JVM is quite fast, and Python and Ruby aren't; why would it surprise you that Jython outspeeds CPython? JRuby hasn't caught up to MRI yet, but it's catching up.[13:40:27] *** Bevin has quit IRC[13:41:51] *** marvi has quit IRC[13:42:00] <bhz-> jottinger, jython is interpreted by JVM, python is interpreted by native code. or maybe I'm misunderstanding how jython works[13:42:45] *** monkeycid has quit IRC[13:42:54] <Ven]n> jottinger, did you mean setDefaultCloseOperation( ?[13:43:05] <jottinger> Ven]n: sure[13:43:16] <jottinger> bhz-: I think you're misunderstanding how the JVM works :)[13:43:20] *** sebrock has left ##java[13:43:58] *** Gracenotes has quit IRC[13:44:15] *** whaley has quit IRC[13:44:41] <Ven]n> but that only takes an integer really.. I want to do more than just HIDE_ON_CLOSE etc. I want to hide the JFrame and set a boolean to false when pressing the X..[13:44:55] <jottinger> Jython generates bytecode, so you get the full benefit of JIT[13:44:55] *** Vantaa has joined ##java[13:45:03] <jottinger> Ven]n: well, I'm far from a Swing expert, so...[13:45:08] <Ven]n> :)[13:45:11] <jottinger> I'd probably look it up in the API[13:45:17] <jottinger> or the tutorial. Hint, hint, hint.[13:45:18] <Ven]n> on it :p .. thanks[13:45:29] <ilyak> jottinger: jruby has[13:45:36] <ilyak> it's the fastest ruby[13:47:07] <jottinger> ilyak: *nod* cool[13:47:12] <jottinger> was unaware it'd caught up[13:48:01] *** mmc has quit IRC[13:48:32] *** whaley has joined ##java[13:48:55] *** Aseq has joined ##java[13:48:59] *** bitshuffler has joined ##java[13:51:23] *** monkeycid has joined ##java[13:55:10] *** fridim_ has quit IRC[13:57:20] *** elmomalmo has quit IRC[13:59:22] <reverend> ilyak: i don't think that holds true anymore[13:59:31] <reverend> it was the case for a while though[13:59:48] *** monkeycid has quit IRC[14:00:56] <Ven]n> is there a way to attach a JFrame to another JFrame?[14:00:58] <reverend> faster than ruby 1.8.6, not generally faster than 1.9 but still comparable[14:01:00] <Ven]n> like theyre stuck together[14:02:04] <jottinger> "All right: I'm ready to go... as soon as you are." "okay, let's go." "Wait."[14:03:01] <ilyak> reverend: Well, 1.9 is unstable, isn't it?[14:03:27] *** Aseq has quit IRC[14:04:22] <reverend> doesn't seem to be[14:04:33] <reverend> As of 30 January 2009, the latest stable version of the reference implementation is 1.9.1.[14:04:40] *** duhec has joined ##java[14:04:51] *** duhec is now known as Aseq[14:05:56] <reverend> ruby was always dirt slow anyway, so i'm sure performance improvements are to be expected in leaps and bounds as time passes[14:06:38] *** LostMonarch has joined ##java[14:08:10] *** monkeycid has joined ##java[14:08:38] *** Aseq has quit IRC[14:11:10] *** ridoo has joined ##java[14:11:17] <ilyak> Sure[14:13:06] *** asap18 has joined ##java[14:13:34] *** derjohn has quit IRC[14:13:43] *** arpu has joined ##java[14:13:44] *** Greeny_ has joined ##java[14:14:19] *** prgrmr has joined ##java[14:16:19] *** monkeycid has quit IRC[14:16:59] *** prgrmr has quit IRC[14:17:43] *** ankylose has joined ##java[14:20:21] *** FireSlash has joined ##java[14:23:25] *** EnderMB has joined ##java[14:24:40] <EnderMB> Can anyone here give me a good explanation of what a value object is in Java? I'm struggling to find a recent resource to explain it.[14:24:45] *** monkeycid has joined ##java[14:26:03] <EnderMB> As far as I understand from what I've read so far I'll need to create a separate Settings class and use it to hold all my settings variables, along with their getters and setters, then call them from within my main classes when needed. Does that sound sane?[14:27:54] *** derjohn has joined ##java[14:28:12] *** genesiss has joined ##java[14:28:38] *** Daniel_H has joined ##java[14:28:59] *** monkeycid has quit IRC[14:30:07] *** pa has joined ##java[14:31:14] *** arpu has quit IRC[14:32:28] <ldamwork> EnderMB, sort of. In an enterprise context VO's are used as data structures to carry data between client and server for specific business operations: http://java.sun.com/j2ee/patterns/ValueObject.html[14:33:19] *** agnul has quit IRC[14:36:03] *** andrewkasper has quit IRC[14:36:17] *** shadewind has joined ##java[14:37:12] *** monkeycid has joined ##java[14:37:22] *** marvi has joined ##java[14:37:26] *** NiallC has joined ##java[14:37:55] *** paulweb515 has joined ##java[14:37:58] <EnderMB> I think I'm getting it now. So if I have a Game class that is extended to loads of different sister classes I should take all setting variables and their getters/setters out of the Game class and move them into the Settings class. Once it's set up I should then call my getters using something along the lines of "Setting s = new Setting()", then s.setTimeLimit(8000);". Does that sound about right?[14:38:27] <W_work> EnderMB: I would prefer to use a meaningful constructor rather than setters[14:42:40] *** Spike1506 has quit IRC[14:42:43] *** FireSlash has quit IRC[14:43:53] *** yclian has quit IRC[14:45:25] *** fr0ggler has joined ##java[14:48:22] *** f3ew has quit IRC[14:49:55] *** prgrmr has joined ##java[14:50:47] <siyb> if i want to display an image and update the image in a specified interval (50fps for instance) what widget should i use (i presume that label will do the trick but might have a poor performance)[14:51:49] <paulweb515> at 50fps wouldn't you want something designed to handle media (I'm not so sure that labels or Images would cut it)[14:52:28] *** jeremy_c has quit IRC[14:52:30] *** hoerup has joined ##java[14:53:05] <siyb> well i am getting images from an imageserver, label is too slow i presume, but i have no idea what i should use[14:54:02] <fr0ggler> yeah refreshing an actual image from a remote source 50 times a second would never give you great performance[14:56:16] <siyb> the server sends the images in a given interval, i can adjust the interval but i _need_ some sort of realtime reaction[14:56:33] <siyb> so what would be the fastest was to display the images[14:59:11] *** arpu has joined ##java[14:59:13] *** Alpounet has joined ##java[15:00:03] <Alpounet> Hi all[15:00:04] <Alpounet> does Java have a sqrt method for floats ?[15:01:02] <fr0ggler> siyb: is it a swing app?[15:01:34] *** monkeycid has quit IRC[15:01:42] <siyb> fr0ggler: yes[15:01:45] <jottinger> Alpounet: nope. If it did, it'd be named something like java.lang.Math.sqrt()[15:02:01] *** catmando has joined ##java[15:02:12] <Alpounet> jottinger, I know, as there is one of that name for doubles[15:02:14] *** Levia has quit IRC[15:02:23] <Alpounet> no way to define it in a painless way ?[15:02:49] <Alpounet> even pow works only on doubles[15:03:29] <W_work> both works with floats as well[15:03:52] <W_work> perhaps you should actually try it?[15:05:49] *** LordMetroid has joined ##Java[15:05:50] <jottinger> trying it would be so passe[15:05:56] <fr0ggler> siyb: have you tried any openGL pipeline solutions? e.g. sun.java2d.opengl[15:06:45] *** riotz has joined ##java[15:06:48] <siyb> i haven't tried anything yet. i wanted to consult somebody before writing useless code[15:07:12] <Alpounet> W_work, there are no "both" in fact, there's only one with double[15:07:28] <Alpounet> and I get an error when giving it a float[15:07:32] <fr0ggler> siyb: well using swing to update an element 50 times a second is probably a bad idea ;)[15:07:49] <siyb> hehe, that was my guess too[15:07:51] <siyb> :)[15:08:01] <reverend> Alpounet: the 'both' he refered to was 'pow()' and 'sqrt()'[15:08:07] <Alpounet> oh, ok[15:08:31] <Alpounet> BTW, I get an error when passing floats to sqrt[15:08:45] <W_work> Alpounet: a good idea when you get an error when trying something is to show the code and the error to people who might be willing to help, such as the ##java channel on freenode :)[15:09:03] <jottinger> Alpounet: example?[15:09:12] <jottinger> which error?[15:09:16] <siyb> fr0ggler: thx i will try out using opengl[15:09:35] *** TranceControl has joined ##java[15:10:00] *** monkeycid has joined ##java[15:10:58] *** morkar- has quit IRC[15:11:13] <Alpounet> jottinger, I get an error telling that there is a possible loss of precision, with "found : double - required : float"[15:11:22] <jottinger> right, on the assignment[15:11:29] <jottinger> and there is a possible loss of precision.[15:11:43] <Alpounet> where the corresponding code is : Math.sqr(x*x + y*y), where x and y are floats[15:11:57] <jottinger> it's autoconvert up.[15:11:57] <gambler> I want to put some images in a JList ... I have found example code to do this.[15:11:59] <gambler> I was wondering if there was something more robust, gui-commons perhaps[15:12:08] <gambler> that could reduce things to 1 liners[15:13:20] *** L-----D has joined ##java[15:13:26] <Alpounet> jottinger, hmm ? I doesn't pass the compilation.[15:13:30] *** AlanasAnikonis has quit IRC[15:14:23] *** lem has quit IRC[15:15:25] <reverend> Alpounet: look at the line it's pointing to.[15:17:19] *** monkeycid has quit IRC[15:17:27] *** arthur_kalm has joined ##java[15:18:14] <fr0ggler> gambler: you're using a ListCellRenderer at the moment right? why not just write your own convenience class?[15:18:29] <Alpounet> reverend, already done... : "return Math.sqrt(x*x + y*y);"[15:18:36] <arthur_kalm> hello everyone, does anyone know of/use a Java library that can tell you the differences between two objects (same class) and preferably map the changes from one object to another?[15:19:02] <arthur_kalm> basically I'm thinking of something like Dozer except that works between two objects of the same class[15:19:14] <fr0ggler> arthur_kalm: you could implement your own Comparator[15:20:14] <arthur_kalm> fr0ggler: yeah, but I'm looking for something automatic[15:21:09] <arthur_kalm> fr0ggler: these classes are a rather complex object graph and doing the comparator will be rather cumbersome[15:22:02] <jottinger> arthur_kalm: not a lot to do besides the cumbersome bits[15:22:05] *** monestri has joined ##java[15:22:06] <arthur_kalm> it can't be too hard to do with reflections, but if something already exists I'd prefer to not reinvent the wheel[15:22:13] <jottinger> although you COULD make the elements in the graph implement comparator themselves[15:22:27] <fr0ggler> arthur_kalm: if you've got cumbersome bespoke classes, then it's unlikely something will do exactly what you want out-of-the-box[15:22:51] <Alpounet> so there is *no way* to compute a square root passing it floats and getting a float back from it ??[15:22:55] <arthur_kalm> jottinger: yes, but in the end it doesn't really give me the differences ;)[15:23:16] <arthur_kalm> fr0ggler: Dozer works remarkably well out-of-the-box[15:23:16] <gambler> fr0ggler, im not too knowledgable about swing. im coding a monstrosity around matisse[15:23:26] <jottinger> ah, you want the actual differences[15:23:39] <arthur_kalm> it's alright, we can write our own stuff[15:23:40] *** Remowylliams has joined ##java[15:23:42] <arthur_kalm> it's not too big a deal[15:23:46] <csgeek> does ant or javac take a number of core available when it compiles to take advantage of all the cores?[15:24:11] <marvi> arthur_kalm: ezmorph lists a few projects: http://ezmorph.sourceforge.net/[15:24:13] <arthur_kalm> jottinger: yeah. Well I don't really care about displaying the differences, just map them from one object to another of the same class[15:25:15] <marvi> There is also Transmorph.[15:25:38] *** gdoko has quit IRC[15:25:55] *** EnderMB has quit IRC[15:26:14] *** donavan has joined ##java[15:26:26] *** monkeycid has joined ##java[15:26:32] <arthur_kalm> marvi: someone mentioned using beanutils for this.... Thanks for the info[15:27:20] <arthur_kalm> marvi: hrm, looks kind of like Dozer[15:28:05] *** EnderMB has joined ##java[15:28:15] <Alpounet> nobody for the float stuffs with sqrt ?[15:28:29] <reverend> Alpounet: fuck, no, there's no way, you have to live with the loss of precision[15:28:36] <reverend> or use doubles in the first place[15:28:53] <surial> Alpounet: you mean, use floats instead of doubles?[15:28:56] <surial> ~javadoc Math[15:28:59] <javabot> surial: http://is.gd/jqfG [java.lang.Math][15:29:59] <surial> Alpounet: Uh, double is MORE precise than float. I'm fairly sure that the operation float->double->float is guaranteed lossless.[15:30:05] *** [TechGuy] has joined ##java[15:30:06] <surial> just like int->double->int is guaranteed lossless.[15:30:28] *** The_Birdman has joined ##java[15:30:31] <Alpounet> reverend, I'm doing a benchmark so it wouldn't be fair for Java[15:30:32] <reverend> he wants to return the result of Math.sqrt() from a method that returns float.[15:30:43] *** Frostix has joined ##java[15:30:45] <surial> Alpounet: Benchmarks in general aren't fair to java.[15:30:49] <surial> Alpounet: you can't micro-benchmark java.[15:31:16] <reverend> yes.. pointless.[15:31:19] <surial> Alpounet: Also, java's sqrt and other floating point options are notoriously suboptimal. There's a willingness by sun to fix this, but so far not enough manpower.[15:31:30] *** J0bk has joined ##java[15:31:32] <surial> reverend: You crazy pun master you.[15:32:21] <surial> Alpounet: (the background: java specifies exactly how floating point ops are supposed to work. Because most hardware accelerated operations aren't that precise, java can't use them. The idea is to create a second Math.* library that merely promises 'more or less accurate results' without specifics, so that those COULD use hardware accelerated functions).[15:33:14] <surial> Alpounet: And for micro-benchmarking: Java's design is: I'll run everything slow as molasses and instrument the crap out of it, because on a modern processor, doing anything = doing it instantly. Only when I notice that a certain loop gets run all the time, will I stop the entire VM, use very smart algorithms to recompile this to whatever will run the fastest on this architecture, and then resume.[15:34:16] <surial> this is called hotspot/just in time. To do benchmarking on java, therefore, you need to use increasing loops and make a graph. The graph should be linear with a slope M, then have a peak (that's the recompile), then be linear again, but this time with a MUCH smaller slope Q. (M >lots> Q). Then you've got a more or less valid micro-benchmark.[15:35:02] <surial> the end result is that java can beat C in certain circumstances. In theory, it'll beat C all the time, but those smart algorithms I mentioned aren't quite there yet.[15:35:44] *** ttmrichter has quit IRC[15:36:38] <Alpounet> that's not just about C, C++ and Java[15:36:45] *** cemerick has joined ##java[15:36:45] <Alpounet> but thanks for those informations :)[15:36:53] *** durre has joined ##java[15:38:10] <cemerick> OT, but here goes -- any recommendations for a project management environment that is somewhere between JIRA/FogBugz and MS Project? I need to recommend a solution that can span granular development tasks as well as provide high-level scheduling/progress reports.[15:38:39] <surial> unfuddle.[15:39:18] <surial> Alpounet: No, seriously. If you're going to do a speed comparison on the performance of e.g. square root between any languages, which includes java, please tell me when you post results, so I can obliterate your faulty work swiftly.[15:39:25] <surial> Alpounet: It's utterly useless information.[15:39:37] <surial> unless you do it 'right' ,which is very very difficult. And involves that graphing strategy I mentioned.[15:39:42] *** hoerup has quit IRC[15:40:09] *** EnderMB has quit IRC[15:40:17] <cemerick> surial: I'll take a look -- but I guess I should have said I need to install it in-house :-)[15:41:27] <Alpounet> surial, the benchmark is not about just computing square root[15:41:39] <Alpounet> it'll be on a larger set of operations, square roots included[15:42:30] <Alpounet> and that's not for publishing, I'm actually wondering which language better fits my needs[15:42:39] *** Bevin has joined ##java[15:42:45] <reverend> well, surial explained why your approach is invalid[15:42:53] <reverend> and provided a legitimate approach[15:42:58] <reverend> so what more do you need?[15:43:09] *** rollins has joined ##java[15:43:42] *** giaco has joined ##java[15:43:47] <reverend> (and the validity issues he discussed really had nothing to do with sqrt())[15:43:50] *** yclian has joined ##java[15:43:55] <giaco> hello![15:44:48] <Alpounet> Ok, but do you think people really will just play with graphing strategies etc ?[15:44:55] <surial> Alpounet: What reverend said: ANY BENCHMARKING FOR JAVA IS BAD.[15:45:13] <surial> Alpounet: So all the work you are doing now to pick the right tool for the job? Useless. Throw a dart at a dart board. Result is just as valid.[15:45:33] <surial> Alpounet: It's tough, sure. But what you're doing now is useless, so....[15:45:43] <surial> Alpounet: What languages are you comparing? Let's start with that.[15:46:15] <surial> cemerick: ufuddle is strictly SaaS, so, no help there.[15:46:35] <surial> cemerick: Does atlassian have anything? The things they make are damn good.[15:46:53] <surial> Oh, JIRA *IS* atlassian. nevermind.[15:47:28] <Alpounet> suiside, C++, Java, OCaml, Haskell and maybe Python[15:47:34] <Alpounet> surial*[15:48:05] *** npm has joined ##java[15:48:07] *** Angel-SL has quit IRC[15:48:08] <cemerick> surial: not really; JIRA is OK, but IMO, it doesn't have much that we're interested in that isn't already provided by FogBugz (which we use now).[15:48:22] *** lem has joined ##java[15:48:26] <arthur_kalm> surial: lol[15:48:38] <surial> suiside? You mean seaside?[15:48:40] <arthur_kalm> surial: indeed, there's also a nice project management plugin[15:49:01] *** f3ew has joined ##java[15:49:05] <lem> if a class exists in a jar that is in the classpath, but I still get a NoClassDefFoundError. what could be the reason?[15:49:08] <arthur_kalm> surial: ah, there we go: http://blogs.atlassian.com/developer/2007/09/new_jira_plugin_greenhopper_fo_1.html[15:49:18] <surial> okay, let's see.. unless you will interface with C libraries, python will definitely lose from java. In fact, if python is the way to go, consider running Jython instead (python on the JVM), it's faster than c-python for most serious things (but NOT when micro-benchmarking, then c-python wins, usually).[15:49:38] <arthur_kalm> cemerick: unfuddle seems to be using Trac[15:49:42] <arthur_kalm> which you can set up yourself[15:50:20] <surial> unfuddle has git repositories and a web-based ticket tracking system. It offers an API so you can do some stuff, and ther's git integration, so if you push a commit with "Fixes #1234" in the message to the unfuddle server, that ticket gets marked as fixed, automatically.[15:50:38] <surial> and it's quite spiffy. Whereas most Trac installs i've seen are very VERY shite.[15:50:41] <Alpounet> surial, what's your definition of micro-benchmarking ?[15:51:01] <cemerick> arthur_kalm: Oh, is that all it is? Sheesh. Redmine is way better than Trac, and already has git.[15:51:12] <reverend> Alpounet: what you're doing[15:51:13] <cemerick> regardless, the greenhopper plugin look intriguing[15:51:16] <surial> Alpounet: trying to benchmark a specific chain of operations, where the operations are designed to test performance only.[15:51:30] <surial> Alpounet: normal benchmarking would involve running a real life scenario and timing that.[15:51:46] <Alpounet> that's what I'm doing[15:52:02] <arthur_kalm> surial: Trac does that out of the box when you link it to your SVN repo[15:52:17] <surial> this is microbenchmarking: long start = System.currentTimeMillis(); while ( int x = 1 ; x < 1000000 ; x++ ) { float y = Math.sqrt(x); } System.out.println(System.currentTimeMillis()-start);[15:52:18] *** Thorn has joined ##java[15:52:28] <Alpounet> Except if for you mathematical computations are not real life stuffs[15:52:38] <reverend> Alpounet: huge, international, fortune 500 companies use java for near real time processing of data on a daily basis and they use it in lieu of C, C++ or other alternatives. 'speed' is typically not the driving issue when choosing a language. (but it can be, depending on your requirements, in which case your benchmarking should model your requirements)[15:52:40] *** marvi has quit IRC[15:52:58] <surial> The above code would perform as follows: For all X loop smaller than FOO (probably around the million mark or so, I'd have to test it), time is linear. Then after that, time is constant. Even if X is a gazilloin billion, it wouldn't take any longer, because the hotspot compiler sees you do nothing with y and eliminates the entire loop.[15:53:03] <arthur_kalm> cemerick: indeed, I looking for a nice agile project management suite, that one looks good[15:53:06] *** gdoko has joined ##java[15:53:09] <reverend> protip: your benchmarks don't model anybody's requirements[15:53:20] <surial> ~reverend++[15:53:20] <javabot> reverend has a karma level of 35, surial[15:53:21] <arthur_kalm> although Trac with the Agilo For Trac plugin works OK, and it's free[15:54:45] <cemerick> arthur_kalm: yeah, it's a possibility. As much as they're ridiculed though, we have often found a gantt chart of a particular project helpful in big-picture planning, especially when development has to work in concert with operations, procurement, and other areas that are schedule-bound and not as purely task oriented as software deve[15:55:09] *** eduardopl has joined ##java[15:55:52] <arthur_kalm> cemerick: eek, deadlines :([15:56:19] <arthur_kalm> cemerick: suffering through that now[15:56:31] <arthur_kalm> cemerick: but a product backlog usually gives you a good idea of where things are[15:56:42] <arthur_kalm> we had gantt charts for one project before[15:56:49] <arthur_kalm> they were, of course, utterly wrong[15:56:54] <Alpounet> My choice will depend on expressivity, performance, typing issues, modularity[15:57:20] <arthur_kalm> Alpounet: it really depends on what your doing[15:57:53] <reverend> great, then go to it and stop being concerned with the fact that you can't test square root on a float (which is flawed to begin with)[15:58:19] <reverend> it's easy to do things extremely fast that give wrong answers[15:58:37] <Alpounet> Moreover, being on ##java or being on ##C++ or any other isn't _really_ a way to get objective opinions :p[15:58:53] <reverend> Alpounet: why not? i'm not telling you to use java.[15:58:58] <cemerick> arthur_kalm: the absolute dates are always wrong, but the relative dependencies and durations are generally pretty good, especially if you have processes that need to track development -- e.g. once the feature set is fixed, then marketing can do A-F, once the UI is fixed, then screenshots and documentation can be pushed through steps G-M, etc.[15:59:06] <arthur_kalm> I wouldn't use Haskell or OCaml (never heard of it) for anything serious[15:59:20] <reverend> your benchmarking is not relevant, that has nothing to do with whether i want to sell you on java[15:59:52] <arthur_kalm> Alpounet: C++, Java and Python are all fine[16:00:10] <Alpounet> OCaml and Haskell too ;)[16:00:34] *** thepeon has joined ##java[16:00:45] <arthur_kalm> but if you're going to work on a large project that's going to have some long life time (years) and going to have to be maintained by many different people, I'd say Java (but then again, this is #java)[16:01:00] *** waz has joined ##java[16:01:08] <arthur_kalm> Alpounet: reason being is the vast number of tools and libraries available[16:01:24] <arthur_kalm> with a number of them being very high quality[16:01:47] <thepeon> Anyone every use the iText pdf library?[16:01:53] <arthur_kalm> include Eclipse/NetBeans, Maven, Hudson, TestNG, Spring, Hibernate, etc[16:02:14] *** riotz has quit IRC[16:02:26] <arthur_kalm> cemerick: ah, fair enough[16:02:37] <Alpounet> <reverend> your benchmarking is not relevant, that has nothing to do with whether i want to sell you on java <<< the sample I've written in Java is an illustration of the kind of stuffs I'm going to do, so this may not be relevant for you, but it is for me[16:03:17] <Alpounet> I want to see how Java behaves with this kind of computations, that's all[16:03:59] <Alpounet> arthur_kalm, OCaml and Haskell are used for real world stuffs, don't worry for it.[16:04:17] *** jdolan_ has joined ##java[16:04:30] *** netoman has joined ##java[16:04:31] *** cemerick has left ##java[16:04:43] <arthur_kalm> Alpounet: they are? by who?[16:04:54] *** sombriks has quit IRC[16:04:55] <arthur_kalm> I mean aside from research (which isn't really real world)[16:05:08] <Alpounet> Haha, research is not real world ?[16:05:24] *** Seldon75 has joined ##java[16:05:53] <Alpounet> http://haskell.org/haskellwiki/Haskell_in_industry[16:05:56] <surial> haskell is an academic toy language. Haskell's own designers say this. They won't sacrifice ideology for utility. And I love haskell for it, but it makes a poor choice for real world work. If you are looking at s tuff like haskell, I can recommend scala.[16:06:02] <surial> which is somewhere in between haskell and java.[16:06:37] <Alpounet> http://homepages.inf.ed.ac.uk/wadler/realworld/[16:06:41] <Alpounet> etc..;[16:06:48] <arthur_kalm> Alpounet: that's not really a long list at all[16:07:16] <Alpounet> Did I tell that the list was as long as Java's one ?[16:07:26] <Alpounet> Java is far more used, but for quite different uses[16:07:26] <arthur_kalm> LMAO[16:07:31] <surial> Alpounet: Yes, of course, haskell is used in roughly as many places as java. Sure. Whatever you say.[16:07:37] <surial> Alpounet: Have a look at scala.[16:07:43] <arthur_kalm> Alpounet: ah, yes, true[16:07:44] <surial> ~~alpounet scala[16:07:45] <javabot> alpounet, scala is a programming language on the JVM (and the .NET thing) that combines object-oriented and functional features. It has very good interoperability with Java, except that Scala generics cannot currently be seen from Java.[16:07:45] <arthur_kalm> sorry[16:07:47] *** Hink has joined ##java[16:07:55] <arthur_kalm> thought you said Java's list was as long as Haskell's ;)[16:07:57] <Alpounet> suiside, I've read some articles about it, and it seems interesting yep[16:08:04] <arthur_kalm> Alpounet: which is why I said it depends on what your doing[16:08:17] <Alpounet> arthur_kalm, scientific computing ;)[16:08:21] *** Fox_1_ has joined ##java[16:08:29] *** marvi has joined ##java[16:08:38] <arthur_kalm> Alpounet: hehe, in that case you can probably go with an academic language ;)[16:08:39] <Fox_1_> hi all[16:09:17] <Alpounet> However, I hate when people just put "labels" on languages[16:09:35] <Fox_1_> people is there any json view for spring?[16:09:52] *** hoerup has joined ##java[16:09:58] <Alpounet> If I did the same, I would never have written some Java for my stuffs[16:10:42] <arthur_kalm> Alpounet: I think the label of academic language was valid ;)[16:11:01] <Alpounet> it depends on your definition of academic language[16:11:47] <fr0ggler> Fox_1_: how do you mean "view"? Like a ViewResolver?[16:11:50] <marvi> Fox_1_: go to #spring[16:13:26] *** TryNiX has joined ##java[16:13:29] *** TryNiX has left ##java[16:13:48] <arthur_kalm> Alpounet: one that's used primarily in the academic world and not in industry ;)[16:14:03] *** eidolon has quit IRC[16:14:14] <Fox_1_> ModelAndView(View view)[16:14:45] *** andrewkasper has joined ##java[16:16:33] <Seldon75> would you guys stop winking at eachother[16:17:03] * arthur_kalm noticed that his last three posts included a wink...[16:17:05] <arthur_kalm> oops[16:17:42] *** chrismaster1 has joined ##java[16:22:07] <Seldon75> I love the "it depends on your definition" argument[16:22:15] *** Absolute0 has joined ##java[16:22:34] <Seldon75> like, tell me of an example when that's not true[16:23:15] <Absolute0> How do I not draw window borders in swing?[16:24:39] *** alvin_3 has quit IRC[16:25:02] <Seldon75> Absolute0: how about http://www.java2s.com/Tutorial/Java/0240__Swing/SpecifyingWindowDecorations.htm[16:25:55] *** geaaru has quit IRC[16:27:22] *** adi112358 has joined ##java[16:27:25] *** thpar has quit IRC[16:27:27] *** durre has quit IRC[16:29:35] *** eduardopl has quit IRC[16:29:47] *** adi112358 has quit IRC[16:30:09] *** bitcrave has joined ##java[16:30:56] *** ankylose has quit IRC[16:31:09] *** Goundy has joined ##java[16:32:20] *** thepeon has left ##java[16:32:58] <lowki> how do i convert a string[][] toString ?[16:33:31] <dangertools> lowki: there is not string in java, only String. you can print every entry via a loop or use Arrays.toString()[16:33:44] <dangertools> with some parameter naturally[16:34:14] *** waz has quit IRC[16:34:23] *** Absolute0 has left ##java[16:34:52] *** dnmo has quit IRC[16:35:22] <lowki> kk[16:36:10] <lowki> what parameters? my output is [[Ljava.lang.String;@c17164][16:36:41] <lowki> Arrays.toString(this.dictionary[16:36:43] <lowki> )[16:37:07] <dmlloyd> that's because it's an array of arrays....[16:37:10] *** bob234 has joined ##java[16:37:15] <dmlloyd> man, you were working on this when I went to bed[16:37:20] <lowki> yes and so my question was about an array of arrays[16:37:36] <lowki> or is[16:37:51] <lowki> dmlloyd: well yes, I work on it whenever i get the chance[16:38:02] <dmlloyd> in that amount of time, you could have read a good book like tij, done all the examples, and learned the whole language, and then sat down to write your program without all the insane questions :)[16:38:25] *** isr` has joined ##java[16:38:27] <lowki> well it's not insane, just not easily searchable on google[16:38:39] <dmlloyd> ~~ lowki tij[16:38:39] <javabot> lowki, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/ for the 3rd edition (free download, published in 2002) or see http://www.mindview.net/Books/TIJ4 for the current edition which covers Java 5 features.[16:38:40] <lowki> but i guess I could just iterate through the whole thing manually[16:38:47] <dmlloyd> if someone hasn't linked you that already[16:38:58] *** sombriks has joined ##java[16:39:00] <isr`> ~pbv[16:39:00] <javabot> Java only supports pass by value, *NOT* pass by reference. (References to objects are passed by value). For more information please see the following link: http://javachannel.net/wiki/pmwiki.php/FAQ/PassingVariables[16:40:08] *** Daniel_G has joined ##java[16:41:03] *** Techdeck has joined ##java[16:41:29] <Techdeck> hey fellas, anyone knows a way to make log4j limit a certain log file to 1000 lines and then roll?[16:41:30] <Seldon75> it's a pity in some ways[16:41:45] <Seldon75> Techdeck: check out simplelog[16:42:27] <Seldon75> https://simple-log.dev.java.net/[16:42:51] <Techdeck> I need to use log4j.. this sounds like an alternative[16:42:55] <dmlloyd> Techdeck, the standard appenders have some support for that I thought - look at (I think) RollingFileAppender[16:43:07] *** Levia_ has joined ##java[16:43:17] <dmlloyd> should just be a question of finding the right param[16:43:27] <Techdeck> yeah, I didn't find such param[16:43:32] <Techdeck> maybe I'm blind, lemme check again[16:43:44] <dmlloyd> otherwise maybe you could extend it[16:44:09] <Techdeck> yeah thats what I'm thinking about, but I still can't find a good way to do it[16:44:18] <Techdeck> I guess I'm not that good with this crap :P[16:44:25] *** isr` has left ##java[16:44:52] <dmlloyd> hm, I guess it supports max file size but not max line count...[16:45:04] *** Levia_ is now known as Levia[16:45:11] <dmlloyd> here's what you do[16:45:13] <lowki> turns out it was much easier than expected :)[16:46:08] <dmlloyd> extend RollingFileAppender, add a maximumLineCount property, then wrap the supAppend method[16:46:34] <dmlloyd> keep a count (using e.g. AtomicInteger) of the messages processed, and when it exceeds the max, call rollover()[16:46:37] *** Sonderblade has joined ##java[16:47:30] *** Varox has quit IRC[16:47:35] <dmlloyd> or better yet, when atomicInt.incrementAndGet() % count == 0, call rollover, then call atomicInt.getAndAdd(-count);[16:48:02] <dmlloyd> it should be that easy...[16:48:19] *** LordMetroid has quit IRC[16:48:31] <Sonderblade> does java have some functions/methods for stuff like building the query part of url strings?[16:48:38] <dmlloyd> nope[16:48:51] <dmlloyd> you should be using bind parameters, not that php crap[16:48:58] *** Resistance has quit IRC[16:49:47] *** dev-bin has joined ##java[16:49:56] <dmlloyd> if you want to know why, google for "php sql injection" and then "java sql injection" :)[16:50:13] <Seldon75> dmlloyd: what does it have to do with sql?[16:50:27] <dmlloyd> isn't that what he's asking about?[16:50:30] <Seldon75> noi[16:50:36] <dmlloyd> hm, look at that[16:50:36] *** BlindHunter has joined ##java[16:50:38] <Seldon75> not unless I completely misunderstand[16:50:42] <dmlloyd> I guess I misread it[16:50:53] <Sonderblade> are you talking about me or something?[16:50:55] <dmlloyd> the answer is still "no" though :)[16:50:56] <Seldon75> yes[16:51:01] <dmlloyd> though there is URLEncoder[16:51:19] <dmlloyd> ~~ Sonderblade javadoc URLEncoder[16:51:20] <Seldon75> Sonderblade: use httpclient[16:51:21] <javabot> Sonderblade: http://is.gd/k77V [java.net.URLEncoder][16:51:27] <dmlloyd> that might help[16:51:32] *** omaru has joined ##java[16:51:50] *** kane77 has joined ##java[16:51:50] <dev-bin> if I have an element(component) on my form and I want to get all its children and some of their children, how do I this? I guess I'm looking for syntax as Component.getComponents() isn't valid.[16:52:25] *** deSilva has quit IRC[16:52:48] <Sonderblade> dmlloyd: no it wont :)[16:52:50] *** Alpounet has quit IRC[16:54:33] <Seldon75> ~~ Sonderblade httpclient[16:54:33] <javabot> Sonderblade, httpclient is a deprecated http client package for Java by Jakarta. It can be found at http://hc.apache.org/httpclient-3.x/index.html - note that it has dependencies like commons-codec, commons-logging, and possibly the other 18,000 jakarta dependencies that tend to accompany any single jakarta lib. Otherwise, great stuff. See ~httpcomponents for more current stuff.[16:54:46] <Seldon75> haha[16:55:00] <Seldon75> who wrote that[16:55:16] <Sonderblade> ~~ Seldon75 bad advice[16:55:16] <javabot> Seldon75, I have no idea what bad advice is.[16:55:30] <Seldon75> it should simply refer to httpclient inside httpcomponents[16:55:50] <Seldon75> Sonderblade: what's bad advice? using httpclient?[16:56:00] <Seldon75> good luck[16:57:56] *** sombriks has quit IRC[16:59:05] *** blahjake has joined ##java[17:02:27] *** L-----D has quit IRC[17:03:36] *** JingleBells has joined ##java[17:03:49] <JingleBells> i'm having a little trouble with an ant script[17:04:03] *** Daniel_G has quit IRC[17:04:16] <JingleBells> what i want is to run ant from a *.bat file, then copy some files and things using batch commands, then run another ant script[17:04:26] <JingleBells> what it actually does is quit my cmd window after the first ant script[17:05:04] *** sombriks has joined ##java[17:05:07] *** rlubke has joined ##java[17:05:26] *** amitev has joined ##java[17:05:57] *** musically_ut has quit IRC[17:06:11] *** shaya has joined ##java[17:06:33] <Seldon75> JingleBells: try putting the word 'call' or 'start' at the start of the line that invokes ant[17:06:33] <shaya> is there a good reason why the .length() of a String will be less than what I count the length to be?[17:06:51] *** waz has joined ##java[17:06:53] <vol> how are you counting the length?[17:07:17] <JingleBells> ah, call appears to have fixed it[17:07:30] <shaya> byte[] text = new byte[len]; String tmp = new String(text); tmp.length()[17:07:36] <vol> if you're reading bytes and you're converting UTF8 to strings, that might be it[17:07:38] <vol> yeah[17:07:48] <JingleBells> i tried start, that either ran and then didn't block, and with /wait added it just stopped with a new cmd window :\[17:07:48] <Seldon75> JingleBells: you're welcome[17:07:53] *** gdoko has quit IRC[17:07:54] <dmlloyd> when using new String(), you should always specify an encoding[17:08:01] <dmlloyd> explicitly[17:08:10] <shaya> ok[17:08:20] <vol> shaya: remember, chars use 16 bits. So, your string length might be up to half of the size of your byte array length.[17:08:36] <shaya> its off by 2[17:08:45] <shaya> I count 316 characters[17:08:48] *** GodTodd has joined ##java[17:08:49] <vol> close then. Is there an umlaut or a cyrillic character or what[17:08:50] <shaya> .length() gives 314[17:09:13] <dmlloyd> or more or less, depending. A lot of asian language characters will push the length up even more.[17:09:20] <shaya> not that I can tell[17:09:22] <dmlloyd> all us-ascii will make it very short[17:09:31] <shaya> how do I specify an encoding[17:09:34] <shaya> "UTF-8"[17:09:35] <shaya> ?[17:09:41] <dmlloyd> yeah[17:10:15] <giaco> how can I replace the reference of one object with the reference of another object of the same type?[17:10:20] <dmlloyd> a string's length is what you get from str.length() - this is the number of UTF-16 characters in the string (some code points use two UTF-16 characters though)[17:11:09] <dmlloyd> giaco: Object oldRef = new Object(); Object newObj = new Object(); oldRef = newObj; // I just replaced the oldRef reference with a new value[17:11:16] <shaya> ok, then different Q[17:11:23] <shaya> is it possible to get the byte length of a string[17:11:48] <shaya> for network communication[17:12:06] <shaya> getBytes()[17:12:15] <dmlloyd> if you're using UTF-8 encoding for the network transmission, sure - getBytes() will do that[17:12:27] <dmlloyd> I should say, as long as you know your network encoding[17:12:37] <JingleBells> yup, cheers Seldon75, does exactly what i need[17:12:38] <dev-bin> how do I get teh child components of a component[17:12:39] *** Odin79 has joined ##java[17:12:40] *** spathi has quit IRC[17:12:46] <Seldon75> no worries[17:13:15] <shaya> this is metavnc[17:13:17] *** Resistance has joined ##java[17:13:21] <Techdeck> thank you dmlloyd[17:13:23] <shaya> fixing its copy/paste routines[17:13:25] *** genesiss has quit IRC[17:13:32] <shaya> it transfers clipboards between different vnc sessions[17:14:03] <dmlloyd> using UTF-8?[17:14:05] *** teralaser has quit IRC[17:14:22] <giaco> dmlloyd, take a look here please http://pastie.org/394080[17:14:30] *** omaru has quit IRC[17:15:05] <dmlloyd> giaco: yeah, that is as expected. Java doesn't have references like C++ does. A Java reference is more like a C++ pointer.[17:15:15] *** whaley has quit IRC[17:15:22] *** fr0ggler has quit IRC[17:15:24] <shaya> yes, that seems to work[17:15:26] <shaya> thanks[17:15:33] <Seldon75> dev-bin: good q.[17:15:57] <giaco> dmlloyd, is there a way to change the content of vettore through objone and objtwo?[17:16:09] *** dpy has quit IRC[17:16:29] <dev-bin> does that mean its a valid question to which the answer is unknown? :)[17:16:44] *** tomvolek has joined ##java[17:17:21] <dmlloyd> giaco: nope[17:17:40] *** reisi has joined ##java[17:17:43] *** Resistance has quit IRC[17:17:57] *** casmo has joined ##java[17:17:59] <Seldon75> dev-bin: are you talking awt?[17:18:01] *** Resistance has joined ##java[17:18:10] *** TheiPirate has quit IRC[17:19:02] <Seldon75> you should look at Container which extends Component[17:19:05] <reisi> does anyone know if a priorityqueue exists that would provide FIFO ordering on same prioritized items?[17:19:06] <ravv> Im getting a ConcurrentModificationException and I dont know why. Im trying to sort an arraylist what am I doing wrong? https://www.mibbit.com/pb/I3RAYm[17:19:08] *** spathi has joined ##java[17:19:09] *** waz has quit IRC[17:19:26] <giaco> dmlloyd, really? whoa![17:19:31] <Seldon75> raav: are you using a synchronized array list?[17:19:35] <surial> giaco: if you run objone.setString("FOO"); then vettore[0].toString() will return "FOO" as well.[17:19:50] <surial> but if you run: objone = new TestObject("FOO"); then vettor[0].toString() will still return "one".[17:20:13] <surial> Seldon75: synchronized, and concurrentmodificationexception, have absolutely no relation to each other.[17:20:28] <ravv> Seldon75: Its declared as private static ArrayList<Box> boxList; what you mean by sychronized I do not know yet :)[17:20:58] <giaco> surial, so I have to to something like vettore[0] = objtwo.clone()?[17:21:04] <giaco> *to do[17:21:04] <dev-bin> Seldon75: yes, awt, swing JFrame, JPanel etc[17:21:09] <surial> giaco: To do what?[17:21:16] <Seldon75> dev-bin: you should look at Container which extends Component[17:21:28] *** pschriner has quit IRC[17:21:28] <ravv> Is there any special way of swapping places on two objects in an ArrayList?[17:21:43] <giaco> to have vettore[0] that contains what's inside vettore[1], but separately modifiable[17:21:50] <reisi> ravv: sorry, can't really figure it out from your paste.. on what line does the exception go off?[17:21:50] <Seldon75> ravv: http://www.velocityreviews.com/forums/t137010-whats-a-synchronized-arraylist-good-for.html[17:21:56] *** eduardoboss has joined ##java[17:22:20] <surial> ravv: ConcurrentModificationException is normally thrown by itereators. I don't see any iterators in your code snippet.[17:22:32] <Seldon75> surial: i think you're on crack[17:22:36] *** JingleBells has quit IRC[17:22:39] <surial> ravv: paste again with a complete test case and the exception. Note that any useage of for ( String obj : list ) uses iterators.[17:23:09] <surial> Seldon75: That entire article doesn't contain the text 'ConcurrentModificationException' anywhere.[17:23:21] <Seldon75> so what[17:23:40] <surial> Seldon75: I stand by what I said. ConcurrentModificationException has absolutely zippety squat to do with synchronized(), or synchronizedList, or Vector.[17:23:57] <surial> Seldon75: the synchonirzed() keyword (And list and vector) will WAIT when another thread is doing the modification. It won't throw an exception.[17:24:10] <surial> this will trigger a concurrentmodex, no need for the list to be synchronized:[17:24:11] <dev-bin> Seldon75: I have to be honest, I'm not exactly a seasoned java programmer...yet... can you give me a clue as to how I would implement it that way[17:24:22] <Seldon75> surial: that's exactly right - it will _prevent_ the comodex[17:24:41] *** ldamwork has quit IRC[17:24:42] <surial> Seldon75: no, comodex isn't thrown when a NON-synchronized list is accessed concurrently. Then shit just silently fails badly.[17:25:14] <surial> comodex is thrown in this scenario: Iterator<String> it = list.iterator(); list.add("foobar"); it.next(); //the next call will throw a comodex. Doesn't matter if 'list' is synchronized, or not.[17:25:20] *** Archon has joined ##java[17:25:21] <surial> And that's also the ONLY situation that throws comodex.[17:25:38] <Seldon75> by synchronizing the thread will block, rather than modifying concurrently...?[17:25:49] <surial> Seldon75: So, please stop talking out your ass. And whatever you do, when somebody points out you are wrong, try not to insinuate they smoke crack cocaine.[17:26:03] <Archon> What method must I listen for/override to catch the input for JTable cells when the user enters text and then deselects?[17:26:13] <surial> Seldon75: That's correct. Where you're mistaken is that concurrent modifications will lead to a ConcurrentModificationException. The name is confusing.[17:26:35] <Seldon75> so... synchronizing is the solution[17:26:36] <surial> Seldon75: The point is, concurrent modifications DO NOT lead to a comodex. That only works for iterators, and only if the modifications aren't concurrent. Nice, huh?[17:26:52] *** xabbuh has quit IRC[17:26:56] *** codethief has joined ##java[17:26:59] <Techdeck> I have a Date saved up in a variable, how can I check if that date is more than 5 minutes old?[17:27:41] <surial> And there's no need for more than 1 thread to modify anything. Comodex means: "I get thrown when, since the creation of me (I am an iterator), something else has modified my backing object.". That's all it means.[17:27:47] <surial> Techdeck: Use jodatime.[17:27:50] <surial> ~~Techdeck jodatime[17:27:51] <javabot> Techdeck, joda time is an excellent date/time implementation for Java - http://joda-time.sourceforge.net - and also the basis for the new date/time system in Java 7 - http://jcp.org/en/jsr/detail?id=310[17:27:58] *** omaru has joined ##java[17:28:01] <surial> though, wait.[17:28:04] <surial> In your case it's easier, Techdeck.[17:28:14] <Seldon75> you can use a Calendar instance[17:28:19] <surial> Just go: System.currentTimeMillis() - myDate.millis() and check if its smaller than 1000L * 60 * 5;[17:28:22] <Seldon75> and increment it using cal.add()..[17:28:32] *** pschriner has joined ##java[17:28:33] <Seldon75> and then do cal.after()[17:28:40] *** Nebulam has joined ##java[17:28:59] <surial> Seldon75: Another piece of spectacularly bad advice. Calendar blows chunks. In java7 it will be replaced by jsr310. a.k.a. jodatime.[17:29:01] <Techdeck> thank you surial[17:29:22] *** _acid__ has joined ##java[17:29:38] *** systat has quit IRC[17:29:39] *** HideousNashimoto has joined ##java[17:29:41] <Seldon75> surial: uh,i dont see the need to incorporate another whole dependency to check if 5 seconds have expired...[17:30:12] <surial> Seldon75: Hence my suggestion to just go System.currentTimeMillis() - my Date.millis().[17:30:20] <Seldon75> Calendar might blow chunks, but for that simple purpose it's totally fine[17:30:45] <surial> Also, it is certainly worth it to 'incorporate another whole dependency' if whatever you want to do can't easily be done with Date and millis math. Calendar is fundamentally broken and should never, ever, ever, be used.[17:31:02] <surial> Seldon75: no. Never use calendar when simple millis math works just as well / better.[17:31:07] <surial> which in this case, is true.[17:31:48] <Seldon75> so, are you saying that synchronizing the block won't solve raav's comodex?[17:31:53] <surial> Seldon75: Yes.[17:32:02] <surial> It won't make one iota of difference. You can create comodexes with only a single thread.[17:32:03] <surial> Here, run this:[17:32:18] <Seldon75> wont synchronizing cause the thread to block until it can access the object being modified[17:32:37] <surial> import java.util.*; public static class Foo { public static void main(String[] args) { List<String> l = new ArrayList<String>(); Iterator<String> it = l.iterator(); l.add("foo"); System.out.println(it.next()); }}[17:32:47] <surial> that whole thing. dump it in a text file called Foo.java, and then run javac Foo.java && java Foo[17:32:50] <surial> et voila, a comodex.[17:32:59] <surial> Seldon75: no, because that has nothing to do with why the comodex is being thrown.[17:33:19] <surial> Seldon75: The comodex is thrown because, and read this carefully: *THE LIST WAS MODIFIED AFTER AN ITERATOR WAS CREATED, AND THEN YOU ACCESS THE ITERATOR*.[17:33:21] *** shaya has quit IRC[17:33:49] <Seldon75> the javadoc says This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.[17:33:55] <surial> If there's no iterator, then there won't be a comodex. If there is one, and someone messes with the list after creating the iterator, regardless of synchronized or not, you get a comodex. As you can see, a list being synchronized, or not, makes no difference whatsoever.[17:33:58] <cheeser> ah. i thought comodex wasa new way to track contacts for a bit there...[17:34:02] <surial> Seldon75: RUN THE FUCKING CODE AND SHUT THE FUCK UP.[17:34:08] <surial> christ.[17:34:11] <dev-bin> now now[17:34:17] *** popcornPanic has joined ##java[17:34:22] <Seldon75> surial: chill dude[17:34:27] <cheeser> surial: calm down. Seldon75: run the code and stfu![17:34:27] <cheeser> 8^)=[17:34:52] *** foo-nix has quit IRC[17:34:59] *** ravv has quit IRC[17:35:05] <Seldon75> the code may throw a comodex but it doesnt answer my question[17:35:19] <surial> Seldon75: If you'd like, use Vector (which is synchronized). Won't make a difference, same comodex.[17:35:23] <surial> Seldon75: Yes it does.[17:35:30] <cheeser> what *is* the question?[17:36:00] <Seldon75> if you can't get a comodex without an iterator, how is Raav's code throwing one[17:36:06] <surial> Seldon75: your question, "wont synchronizing cause the thread to block until it can access the object being modified" is answered by: Yes, but that has no impact on comodexes, because accessing an object being modified does not result in a comodex. As I've said, the name is badly chosen.[17:36:31] <surial> Seldon75: That's why I asked Ravv to post a complete self-contained use-case including the exception, because I know for sure that the problem wasn't in the snippet he posted.[17:36:35] <cheeser> the name is fine. Seldon75's brain is the problem.[17:36:37] *** foo-nix has joined ##java[17:37:37] *** foo-nix has quit IRC[17:37:38] <Seldon75> if _MY_ brain is the problem, why is it surial who insists the name is bad[17:37:56] <cheeser> well, his is too.[17:38:02] *** foo-nix has joined ##java[17:38:13] <kane77> any swing experts here?[17:38:25] *** amitev has quit IRC[17:38:31] *** ravv has joined ##java[17:38:45] <cheeser> ~anyone[17:38:45] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[17:39:09] *** amitev has joined ##java[17:39:57] *** cheeser sets mode: -b *!*n=tom@*.urh.uiuc.edu[17:40:00] *** amitev has quit IRC[17:40:16] <kane77> I created this little test and when I don't specify to use System look and feel (UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());) then when I use UIManager.getLookAndFeelDefaults().put("Label.foreground", new ColorUIResource(255,0,0)); it changes color of label, but when using system look and feel (GTK) then it does not have effect whatsoever.. What am I doing wrong?[17:40:42] *** genesiss has joined ##java[17:41:01] <Nebulam> windows?[17:41:03] <surial> cheeser: If you take one (mutable) object, and you modify it from two different times at the same time (concurrently), and the modification is of a nature that is likely to cause bad things to happen (e.g. adding objects to a list, which is going to blow up if two threads do it at the same time), then you don't get a CoMoDex. Hence: The name is stupid.[17:41:24] <Nebulam> kane77 are you on windows?[17:41:30] <surial> also, for the situations where it DOES happen, you don't need to modify anything concurrently. You can create the iterator, wait a day, fuck with the list, wait another day, and try to use the iterator, and set off a comodex. Nothing happen concurrently.[17:41:44] <kane77> Nebulam, nope, linux (gnome)[17:41:48] <surial> A better name would be 'SourceModifiedException'.[17:41:51] *** Remowylliams has left ##java[17:42:19] <cheeser> you're modifying the list at the same time that an iterator is .... wait for it ... concurrently open against the list. hence concurrent.[17:42:45] <surial> I understand the t hinking behind the name, but as is evident from Seldon75 and many other people who get confused about this, the name is confusing.[17:43:00] <surial> also, the notion that iterators are 'open' is not immediately obvious.[17:43:00] <Nebulam> don't know it probably overrides all settings when you set it to use the GTK look and feeel[17:43:04] <cheeser> lots of things are confusing. it's not necessarily the fault of the tool.[17:43:14] *** teralaser has joined ##java[17:43:33] <kane77> Nebulam, no, I set it after I set it to GTK laf[17:43:35] <surial> The name is confusing (check) and there is a clearly superior name available (check). Therefore, there is some blame to the tool. I'm not saying the tool made a spectacular error either. Just that it -could- have been better named.[17:43:44] *** npm has quit IRC[17:44:01] <cheeser> the docs all explain it.[17:44:10] <surial> ~javadoc ConcurrentModificationException[17:44:11] <javabot> surial: http://is.gd/k7yb [java.util.ConcurrentModificationException][17:44:21] <surial> no, it doesn't.[17:44:23] <cheeser> confusing and superior are subjective terms. again, you confuse your own preferences for reality.[17:44:27] <Seldon75> well I'll be! synchronizing doesnt prevent a comodex[17:44:39] <Seldon75> who knew?[17:44:50] <cheeser> "Note that this exception does not always indicate that an object has been concurrently modified by a different thread. "[17:44:54] <cheeser> Seldon75: we did.[17:45:06] <surial> Text "or example, it is not generally permissible for one thread to modify a Collection while another thread is iterating over it." this is true, but very confusing. The whole mention of threads here is just stupid; those have nothing to do with it and make a strong insinuation that comodex is related to concurrent (in the sense of threads) access.[17:45:29] <cheeser> fine[17:45:31] <surial> it is generally not permissible for anyone, anywhere, to modify a collection while anyone, anywhere, is iterating over it, unless you use iterator.remove().[17:45:32] <cheeser> ~ surial rant[17:45:32] <javabot> cheeser, I have no idea what surial rant is.[17:45:37] <cheeser> ~~ surial rant[17:45:37] <javabot> If you've blown off enough steam already, you could get to the point. Oh, you don't have a point? Well, here's one: This is not a blog.[17:45:39] <cheeser> there[17:45:58] <surial> hey, you started on 'the name is fine'.[17:46:02] <surial> But, you're in luck. I'm off.[17:46:03] <Seldon75> I think it's natural from the naming for a programmer to believe that synchronizing can circumvent the 'concurrency' part of a ConcurrentModificationException[17:46:15] <cheeser> i responded to your tirade.[17:46:21] *** Fox_1_ has quit IRC[17:46:29] <cheeser> which, i know, raises serious questions about my intellect but there you have it.[17:47:10] <vol> Is there a method call I don't know about that gracefully turns a primitive array into a string? Something that would output [123,456,789] for an array of those values, for example.[17:47:12] *** MigoMipo has joined ##java[17:47:48] <kane77> On places in app image backgrounds are used and they are mostly white, which then makes all the labels displayed on it unreadable if you have some gtk theme with white text color and I cannot find a way to change it :/[17:48:11] <lowki> is there an alternative to binarySearch that doesn't require presorted arrays?[17:48:21] <blahjake> ~~ vol javadoc Arrays.toString(*)[17:48:23] <javabot> vol, too many results found. Please see your private messages for results[17:48:38] <lowki> my guess is that i have to write one myself[17:48:51] <Seldon75> dev-bin: did Container help?[17:48:54] <vol> blahjake: doh, that would do it, thanks[17:49:18] <Seldon75> vol: for the record; that was pointed out last time you asked[17:49:27] <vol> when did I last ask?[17:50:00] <blahjake> lowki: you can search it linearly but your order of magnitude will not be as good as binary search[17:50:23] *** arthur_kalm has left ##java[17:50:27] *** ppl has joined ##java[17:50:40] *** IceMuppet has joined ##java[17:50:52] *** monkeycid has quit IRC[17:51:32] <ppl> hello.. I have a question regarding instance initializers. Why were they invented? Why not use the default constructor instead?[17:51:35] <Seldon75> vol: sorry, it was lowki. what a coincidence[17:51:36] *** jcapinc has joined ##java[17:51:38] <vol> Seldon75: lowki asked[17:51:40] <vol> ^^[17:51:57] *** z4chh has joined ##java[17:51:59] <blahjake> ppl: other constructors don't necessarily chain the default constructor[17:52:02] *** spideryummy has joined ##java[17:52:07] <spideryummy> i got this "org.xml.sax.SaxParserException: Premature end of file" everytime I launch my Netbeans 6.5 in linux. This used to be working, but then suddenly, i am having this error. Nevertheless, netbeans can still launch ok. How do i remove this error messagebox???[17:52:37] <Seldon75> ~~ spideryummy techsupport[17:52:37] <javabot> Hello, ##java is not a technical support channel for your Java apps or virtual machines, it is a development enthusiast channel which prefers to receive questions and discussion on the topic of programming with the Java language. Please consider seeking help with the vendor of your software if you can't figure out how to use it.[17:52:50] <ppl> blahjake: so it is mostly for the benefit of not having to write an init method that every constructor has to call?[17:52:54] <jcapinc> spideryummy: what distro? did you try re-installing netbeans and/or Java?[17:53:00] <blahjake> ppl: also, you can use an instance initializer in an anonymous inner class[17:53:24] *** surial has quit IRC[17:53:38] <ppl> blahjake: Right, I was thinking that was the main argument. And then I reflected... why not simply say that an anonymous class may have a default constructor but not any other constructor.[17:54:07] <ppl> blahjake: Can you think of any other reasons or benefits of a class initializer? (I'm curious :))[17:54:11] <z4chh> if i have an image in a jpanel with layout BorderLayout..and i position it in say BorderLayout.EAST...how can i position the image that is in the .EAST at the bottom instead of the center of the .EAST region?[17:54:18] <jcapinc> blahjake. lol im a java noob, ive programmed with a couple other languages but I have never written a class inside of a class, its sounds very interesting[17:54:19] *** spideryummy has left ##java[17:54:19] <blahjake> ppl: and you would use its name to declare the constructor how?[17:54:35] <ppl> blahjake: oh, haha. Good point. :)[17:55:27] <ppl> Thanks for your insight blahjake![17:55:40] * ppl returns to the JLS[17:55:51] <cheeser> people actually read that?[17:55:52] <cheeser> 8^)=[17:55:58] <Nebulam> Jcapinc one way is to create another panel and nest them[17:56:34] <ppl> I think it's a good way of learning the language. cheeser, which other book/reference you would recommend?[17:56:38] <giaco> Can you help me? http://pastie.org/394121 I need to avoid the ClassCastException there[17:56:58] *** morkar- has joined ##java[17:57:02] <jcapinc> ? another panel? Nebulam i just picked out that java can write classes in class and that interesting, i dont know what you mean by nesting in another panel[17:57:30] *** buntfalke has joined ##java[17:57:39] *** srcerer_ is now known as srcerer[17:58:04] <Nebulam> OK, look up JPanel's. They are containers for other components[17:58:26] *** ldamwork has joined ##java[17:58:37] <Nebulam> You can set the Layout Manager of a Jpanel and the create another JPanel with a different layout and it it to the parent panel[17:58:45] <Nebulam> s/the/then[17:59:12] <blahjake> giaco: does Piece implement Comparable?[17:59:28] *** omaru has quit IRC[17:59:35] <giaco> blahjake, no[17:59:40] <jcapinc> oh interesting thanks Nebulam[17:59:46] *** monkeycid has joined ##java[17:59:48] <blahjake> giaco: it needs to[18:00:09] *** plazmatek has joined ##java[18:01:00] <giaco> blahjake, thanks[18:02:10] *** lem has left ##java[18:02:39] *** Towny has joined ##java[18:02:41] *** kushal_12_27_200 has joined ##java[18:03:22] *** dunderbao has joined ##java[18:03:37] <plazmatek> how would i compare if an input is a number[18:03:51] <cheeser> try to convert it[18:04:01] <cheeser> or use regex[18:04:18] <cheeser> and by thinking through the problem[18:04:20] <plazmatek> boolean matches(String regex) <- this?[18:04:27] <cheeser> sure[18:04:32] <pr3d4t0r> cheeser: You're evil.[18:04:38] <dunderbao> try matches("\\d")[18:04:39] <cheeser> i do what I can[18:04:43] <pr3d4t0r> cheeser: Indeed.[18:05:05] <pr3d4t0r> OKi, have a nice day peeps.[18:05:06] * pr3d4t0r left.[18:05:15] <plazmatek> so i could just say if((scan.next).equals("\\d"))?[18:05:24] <cheeser> ~tias[18:05:24] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[18:06:12] <marvi> If you want to see if it only contains one number try ^\\d{1,}$[18:06:32] *** npm has joined ##java[18:06:34] *** Seldon75 has quit IRC[18:06:40] <marvi> \\d will match a1b[18:07:01] *** Elvanor has joined ##java[18:07:10] <delYsid> I have an algorithm that basically does work on the first item of a list, and recurse on the tail of the list. A very lispy thing... I use ArrayList and clone() right now, is there some better class for this type of list operation?[18:07:12] <Elvanor> Is there something as a static variable in a Java method?[18:07:12] *** yclian has quit IRC[18:07:24] *** josemoreira has joined ##java[18:07:52] <plazmatek> Elvanor, i believe so[18:08:00] <Elvanor> What does this mean?[18:08:22] <cheeser> Elvanor: no[18:08:39] <plazmatek> guess i was wrong[18:08:56] <plazmatek> my bad[18:08:58] <jcapinc> plazmatek you can require an input be a number using the scanner object[18:09:09] <plazmatek> really?[18:09:15] <plazmatek> ill have to look that up[18:09:29] *** njan is now known as Njan[18:09:46] <jcapinc> Scanner sc = new Scanner(System.in); int input = sc.nextInt();[18:09:52] <jcapinc> plazmatek there you go[18:09:59] <plazmatek> thanks mate[18:10:04] *** Njan is now known as njan[18:10:15] <jcapinc> make sure to import the scanner object[18:10:26] <jcapinc> import java.util.Scanner;[18:10:31] <plazmatek> yeah i got that haha[18:10:37] *** kushal_12_27_200 has quit IRC[18:10:56] *** catmando has quit IRC[18:11:43] *** HelloMeow has joined ##java[18:12:16] *** bitcrave has quit IRC[18:12:46] <HelloMeow> Can someone help me figure out how to bypass a ClassCastException, or at least how to produce a dialog instead of an error or something?[18:12:58] <cheeser> uh...[18:13:07] <cheeser> well, stop trying to cast something to something it's not[18:13:10] <cheeser> ~next[18:13:11] <javabot> Another satisfied customer. Next![18:13:34] <HelloMeow> The problem is that it depends on user input.[18:13:47] <plazmatek> well them not to input the wrong thing[18:13:49] <cheeser> user input is always a String[18:14:21] <HelloMeow> Yes, but I'm trying to parse it as a double. Isn't there a way I can just check if it can't be casted, and then produce a dialog if that happens?[18:14:56] <jcapinc> lol![18:14:57] <cheeser> yes. convert, catch the exception, show dialog[18:15:17] <HelloMeow> OK, I don't know how to catch an exception though[18:15:21] <Techdeck> I am using Axis2 and I have a message receiver, wherever I have an exception, it goes through that message receiver, problem is, it always produces HTTP code 500, I need to make it produce the 200 HTTP code instead... any thoughts?[18:15:26] <cheeser> ~~ HelloMeow exceptions[18:15:26] <javabot> HelloMeow, exceptions is http://java.sun.com/tutorial/essential/exceptions[18:15:53] * Techdeck humps cheeser[18:15:54] <HelloMeow> cheeser: thanks[18:17:53] <dunderbao> i neeed some help with cuncurrent programming in java. the task is at http://rafb.net/p/AoqH2040.html . I don't want someone to do the task for me, i just need to ask some questions to get started[18:18:23] <selckin> ~~dunderbao concurrent[18:18:23] <javabot> dunderbao, I have no idea what concurrent is.[18:18:26] <selckin> :([18:18:47] <plazmatek> ask the questions[18:19:15] *** squi has quit IRC[18:19:34] <dunderbao> i tried to do it with just one condition variable, but the only solution i can come up with is to use notifyall, which doesnt seem so nice[18:19:57] <dunderbao> im considering adding some more condition variables, but as i understand it, it doesnt work well with synchronized methods[18:20:16] *** whaley has joined ##java[18:20:18] *** bindaas has quit IRC[18:20:53] *** mitchnull has joined ##java[18:21:12] *** Bevin has quit IRC[18:21:23] *** foo-nix has quit IRC[18:21:46] <dunderbao> http://rafb.net/p/EX4sGw87.html this pseudocode works, but i dont like the idea of waking all threads up when only one of them is gonna stay awake[18:22:12] <Elvanor> Is property a keyword in Java?[18:22:14] <Elvanor> For what?[18:22:28] <cheeser> ~keywords[18:22:28] <javabot> cheeser, keywords is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html[18:22:35] <cheeser> the bot knows all[18:23:31] *** b3nn3tt has joined ##java[18:23:41] *** shervin_a has quit IRC[18:24:00] *** ppl has quit IRC[18:24:06] <dunderbao> does it know how to point me in the right direction? :/[18:24:50] <cheeser> ~concurrency[18:24:51] <javabot> Java has a sophisticated concurrency package that you can view at http://java.sun.com/javase/6/docs/technotes/guides/concurrency/index.html[18:24:53] <cheeser> ~jcip[18:24:53] <javabot> cheeser, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/[18:24:55] <cheeser> yes[18:24:56] <cheeser> 8^)=[18:25:04] *** squi has joined ##java[18:26:24] <dunderbao> hehe yeah but, i think i have decent knowledge of the theory, im just too stupid to practise it :)[18:26:37] *** Frostix has quit IRC[18:26:42] <cheeser> then i question your knowledge of the theory[18:26:43] <cheeser> 8^)=[18:26:43] *** HideousNashimoto has quit IRC[18:27:07] *** spideryummy has joined ##java[18:27:09] <dunderbao> based on what? :)[18:27:38] <cheeser> if you understood it, you could do it.[18:27:40] *** pschriner has quit IRC[18:27:57] *** mitchnull has left ##java[18:27:58] *** bindaas has joined ##java[18:28:12] *** plazmatek is now known as untouchable[18:28:18] *** KikiJiki has quit IRC[18:28:26] <spideryummy> my JDialog in Linux has intermittent behavior of blowing up really large, filling-up the entire desktop..and it is empty. This is intermittent i see happening in Ubuntu8.10, and CentOS...i have no idea where to start to fixing this intermittent prob..any ideas?[18:28:39] *** Archon has quit IRC[18:28:53] <spideryummy> is my JRE corrupted or something?[18:29:03] <spideryummy> i am using 1.6_07[18:29:22] *** amnesiac has joined ##java[18:29:32] *** untouchable is now known as theAlchemist[18:29:34] <cheeser> doubtful[18:29:42] <cheeser> when in doubt, blame your code[18:29:47] <cheeser> i sure do.[18:29:47] <cheeser> 8^)=[18:30:09] <spideryummy> what are the consequences if I pass NULL in the frame param in a JDialog?[18:30:12] <marvi> spideryummy: Have you tried a small sample app? Still happens? If not, it is probably your code.[18:30:23] <[TechGuy]> tias[18:30:29] <cheeser> ~~ spideryummy tias[18:30:29] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[18:30:53] <spideryummy> ive tried it..and it works normally..so i wondered what is the difference..[18:31:02] <cheeser> rtfm[18:31:50] *** theAlchemist has left ##java[18:32:17] <spideryummy> the JDialog issue does not happen in suse..but it occurs intermittently in ubuntu..so i think its just more than in code..the code is really simple.[18:32:23] <dunderbao> cheeser: well, thats not entirely true. sometimes you need to think for quite a while even though you understand all the theory. i just recently thought for several seconds wether to use ++a or a++. you see what i mean?[18:32:31] <Techdeck> Anyone has any idea about my axis2 question?[18:32:56] <cheeser> dunderbao: because that thinking leads to understanding. once you understand it, you can do it. kapiche?[18:32:59] <cheeser> 8^)=[18:33:09] <cheeser> dunderbao: you're only "proving" my point[18:33:18] *** dvayanu has quit IRC[18:33:40] <dunderbao> cheeser: well, i understand very well the difference between a++ and ++a, but somethings i takes time for the barin to put things into context[18:35:08] *** spideryummy has left ##java[18:40:23] *** mirari has joined ##java[18:41:08] <jottinger> re[18:41:08] *** Sonderblade has quit IRC[18:41:20] *** svm_invictvs has quit IRC[18:41:20] *** Resistance has quit IRC[18:41:20] *** phenom9600 has quit IRC[18:41:40] *** Resistance has joined ##java[18:41:59] *** dk_schrute has joined ##java[18:42:01] *** phenom9600 has joined ##java[18:43:19] *** svm_invictvs- has joined ##java[18:43:44] <svm_invictvs-> What's up javaites?[18:44:26] *** Dr_Link has quit IRC[18:44:44] *** Dr_Link has joined ##java[18:44:50] <svm_invictvs-> Does File.delete also delete directories recursively?[18:44:54] <svm_invictvs-> Or do I have to do that myself?[18:45:00] <selckin> ~tias[18:45:03] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[18:45:12] <jottinger> svm_invictvs-: it does not[18:45:16] <svm_invictvs-> Thanks jottinger[18:45:22] <AMcBain> my guess is that it probably tries to just delete the folder and fails if it is full[18:45:30] *** lem has joined ##java[18:45:30] <AMcBain> oh, listen to jottinger :P[18:45:43] *** dev-bin has quit IRC[18:46:04] <cheeser> the irony of dev-bin's quit message++[18:47:25] *** AhtiK has quit IRC[18:48:55] <Ven]n> I have an awkward question.. Im trying to mainPanel.add(p.getVisualComponent(), BorderLayout.CENTER);[18:49:42] <Ven]n> where mainPanel is a JPanel in another class, but Im not sure how to set that up (sorry for multiple lines, accidentally hit enter)[18:49:42] *** svm_invictvs- has left ##java[18:50:10] *** svm_invictvs- has joined ##java[18:50:30] <Ven]n> I tried doing public JPanel mainPanel, but didnt help[18:51:33] *** The_Birdman has quit IRC[18:51:33] *** bigjocker has quit IRC[18:51:33] *** jacks- has quit IRC[18:51:33] *** Elvanor has quit IRC[18:51:33] *** lowki has quit IRC[18:51:34] *** cmccormick has quit IRC[18:51:34] *** gantrixx has quit IRC[18:51:34] *** r0bby has quit IRC[18:51:48] *** untouchable has joined ##java[18:53:26] *** Elvanor has joined ##java[18:53:26] *** bigjocker has joined ##java[18:53:26] *** jacks- has joined ##java[18:53:26] *** lowki has joined ##java[18:53:26] *** cmccormick has joined ##java[18:53:29] *** marvi has quit IRC[18:55:05] *** KermitTheFragger has quit IRC[18:55:54] *** christo_m has joined ##java[18:55:55] *** flb has quit IRC[18:57:28] <z4chh> anyone know how i can place images (top, bottom, etc..) within a BorderLayout?[18:57:36] <z4chh> instead of just the default center..[18:57:38] *** jacks- has quit IRC[18:58:01] <lem> even though I install a jar manually with maven and it is indeed existing afterwards in my local repository, maven keeps on thinking it does not have it. any idea?[18:58:24] <Stephmw> z4chh: by... using the various constraints for BorderLayout such as NORTH, SOUTH, EAST or WEST?[18:58:38] <Ven]n> z4chh, BorderLayout.SOUTH[18:58:44] <csgeek> i have an odd bug.... when I do jframeobj.setVisible("true"); that doesn't work.. but jframeobj.show() does... and javadoc claims the .show() is depreciated and to use setVisible();[18:58:50] <z4chh> yes but i already placed it[18:59:01] <Stephmw> csgeek: ... "true"? huh?[18:59:06] <AMcBain> you have to set those when using the add(...)[18:59:13] <Stephmw> csgeek: setVisible expects a boolean[18:59:16] *** mohax has joined ##java[18:59:24] <Stephmw> not a String - read your api docs[18:59:48] <jottinger> z4chh: ....[18:59:50] <ffgeek200> how can i run my java program so i can debug it remotely w/ eclipse?[18:59:54] <jottinger> oh my god[18:59:59] <jottinger> I came back during moron hour[19:00:02] * jottinger leaves[19:00:02] * Stephmw comforts jottinger[19:00:12] <z4chh> i added an image to BorderLayout.East...it shows up in the east region..but in the center of the east region..how i can i put it at the bottom the east region?[19:00:21] <z4chh> to a panel with*[19:00:25] <cheeser> ~~ ffgeek200 remote debug[19:00:25] <javabot> ffgeek200, remote debugging is -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n[19:00:25] *** deepjoy has quit IRC[19:00:32] <ffgeek200> ty ty[19:00:32] *** jamil_1 has joined ##java[19:00:41] <AMcBain> jottinger: a bit harsh? :P[19:00:41] * jottinger hums something about moron hour and nested panels, each with its own layout manager...[19:00:51] <jottinger> ~be jottinger[19:00:51] <javabot> There are no stupid questions, only stupid people.[19:00:54] <jottinger> ~be jottinger[19:00:55] <javabot> Love is a a lie.[19:00:56] <AMcBain> haha[19:01:00] <AMcBain> yeah, I've seen those[19:01:05] <jottinger> "a bit harsh" from me is something like "DIE DIE DIE YOU ASSHAT"[19:01:15] <AMcBain> hehe[19:01:27] <z4chh> i want to place the content that is in BorderLayout.EAST to the bottom of that region.[19:01:52] <jottinger> z4chh: way to catch my hint[19:02:25] *** The_Birdman has joined ##java[19:03:40] <z4chh> jottinger, ive already tried that >.<[19:03:44] <z4chh> it works of course[19:03:59] <AMcBain> nesting panels is not evil.[19:04:09] <z4chh> but places another panel right on top of the panel that i need full use of[19:04:58] *** tilerendering has joined ##java[19:05:09] <AMcBain> ??? that makes no sense ... of course adding stuff onto another panel covers up stuff below it .. common sense.[19:05:39] <ffgeek200> between condtl breakpoints & remote debug, eclipse fucking rocks, excuse the language but it fucking rocks[19:06:00] * AMcBain leaves to go /outside/[19:08:50] <z4chh> jottinger, and i believe you are the moron for assuming that i have not thought of a simple idea as nested panels..although my question wasn't the best..this is a little more complex than your obviously simple solution, moron.[19:09:21] *** staykov has quit IRC[19:09:29] *** Junior has quit IRC[19:09:32] <lem> ~moron[19:09:33] <javabot> You are moron number 43, moron[19:09:38] <lem> lol[19:09:44] <lem> I wanted to be 42[19:09:46] <lem> damn it[19:09:58] <delYsid> Ahh, subList is a great vehicle for recursion on lists.[19:10:33] <jottinger> z4chh: hotay![19:10:38] <PuffTheMagic> <lem> ~moron[19:10:38] <PuffTheMagic> <javabot> You are moron number 43, moron[19:10:40] <PuffTheMagic> oops[19:10:41] <jottinger> then you shoudl have indicated the extra complexity. Go figure.[19:11:50] <lem> oops?[19:11:56] <lem> yeah, I call that OOPS[19:12:04] <lem> I wanted to be moron numero 42[19:12:16] <csgeek> I was passing it a bool[19:12:20] <csgeek> and setting it to true[19:12:30] *** Yustme has joined ##java[19:14:55] *** ankylose has joined ##java[19:15:12] *** thecarlhall has joined ##java[19:15:25] *** giaco has quit IRC[19:17:00] *** mohax has quit IRC[19:17:14] *** mohax has joined ##java[19:17:42] *** adaro has joined ##java[19:18:01] <jottinger> ~be lem is <reply>I am moron number 42![19:18:02] <javabot> Okay, jottinger.[19:18:23] <lem> ~moron[19:18:23] <javabot> You are moron number 50, moron[19:18:31] <lem> duh[19:18:40] *** valcker has quit IRC[19:19:00] <adaro> 3[19:19:12] <adaro> moron[19:19:23] *** mohax has quit IRC[19:19:52] *** joev has joined ##java[19:21:34] <lem> 3[19:21:36] <lem> amigos[19:21:41] *** ende has joined ##java[19:21:59] <ende> Hello party people![19:22:54] *** ramdam has joined ##java[19:23:06] <The_Birdman> ~~ende welcome[19:23:06] <javabot> http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=welcome[19:23:08] <adaro> the 3 amigos where morons too[19:23:58] <ende> ~pastebin[19:23:58] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[19:24:24] *** fridim_ has joined ##java[19:27:11] *** skypce has joined ##java[19:27:31] <skypce> hi guys, helpme with this please http://www.pastie.org/394204[19:31:46] <Techdeck> what is 1000L when used in math expressions?[19:31:52] *** ScottG489 has quit IRC[19:33:04] <adaro> 1000 is 1000 duh[19:33:29] <skypce> L = Litros[19:33:46] <dmlloyd> the L means it's a "long" constant, as opposed to an "int" constant[19:33:50] <dmlloyd> if that's what you're getting at[19:34:48] *** xxxxshame has joined ##java[19:35:14] <xxxxshame> hallo where i find java ee platform ? beceause I want add it . I want add javadoc for java ee[19:36:32] <adaro> you can downloAd it at tubgirl.com[19:36:54] *** HelloMeow has quit IRC[19:36:56] <skypce> http://docs.huihoo.com/javadoc/javaee/[19:38:33] *** leor has joined ##java[19:39:04] <leor> ~pastebin[19:39:04] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[19:39:35] *** rotzak has quit IRC[19:40:08] <skypce> hi guys, helpme with this please http://www.pastie.org/394204[19:40:32] *** adaro has quit IRC[19:41:27] *** staykov has joined ##java[19:41:57] *** adam-_- has joined ##java[19:42:05] *** ramdam has quit IRC[19:42:05] *** HexKey has joined ##java[19:42:42] <adam-_-> with object streams. if the object im sending is in one package on the server and a *different* package on the client should that cause it to break? im getting classNotFound exceptions[19:43:22] *** Ivellina has joined ##java[19:43:44] <ldamwork> adam-_-, if two classes are in different packages, then they are not the same class[19:43:45] *** pgib has joined ##java[19:44:00] <adam-_-> i see i see[19:44:02] *** pilkarn has joined ##java[19:44:04] <ende> So I'm returning to java from a little hiatus and I believe certain things are blurring into c/c++ for my old tired mind ;) Anyway, I've got an issue with testing some String input using java.import.Scanner; I''m trying to input two different Strings and then compare them, but after throwing in some test prints, it appears that *both* strings share the same value... which obviously makes me suspicious that something is going on with returning by reference, etc[19:44:08] <ende> code is at http://pastebin.stonekeep.com/5668[19:44:11] <ende> (it's short)[19:44:17] *** adaro has joined ##java[19:44:19] <adam-_-> so i need to put them in the same package for it to work ldamwork ?[19:44:48] <adaro>[19:44:50] <ldamwork> adam-_-, ........[19:44:53] *** thecarlhall has quit IRC[19:45:37] *** pilkarn has quit IRC[19:45:56] <pgib> ende, looks like a copy'n'paste error[19:46:13] <pgib> line 8 equals line 6[19:46:36] *** dipnlik has joined ##java[19:46:42] <svm_invictvs-> ugh[19:46:43] <ende> wow[19:46:49] <ende> ok I will never post here again ;)[19:46:54] <ende> thanks[19:47:02] <svm_invictvs-> Why is maven complaining about a missing dependency that's right there installed in my fucking local repository?[19:47:06] *** J0bk has quit IRC[19:47:41] <pgib> ende, no prob, copy'n'paste attacks me every now and then. Hard to notice after you've been staring at your own code for hours[19:48:08] <ende> pgib: they're sneaky little bastards i'll give them that[19:48:12] *** marvs has joined ##java[19:48:28] <dipnlik> hi, i installed jdk 1.5 on /user/local/java on my Ubuntu machine, now I'm trying to install JAI but it says "This is not a proper JDK directory. Exiting install.". any ideas?[19:48:47] <svm_invictvs-> ~maven--[19:48:47] <javabot> maven has a karma level of -160, svm_invictvs-[19:49:20] *** pilkarn has joined ##java[19:49:24] <untouchable> ~untouchable[19:49:24] <javabot> untouchable, I have no idea what untouchable is.[19:49:29] *** dmlloyd_ has joined ##java[19:50:12] <untouchable> ~untouchable++[19:50:12] <javabot> Changing one's own karma is not permitted.[19:50:13] <javabot> untouchable, you have a karma level of -1[19:50:14] <pilkarn> how do I get a dir from JFileChooser? like I want to choose a dir fro which to do something to all files instead of just choosing one. how can I dot hat?[19:50:29] <untouchable> haha[19:50:44] *** scorchsaber has left ##java[19:50:53] *** dmlloyd has quit IRC[19:50:55] *** dmlloyd_ is now known as dmlloyd[19:50:57] *** mitch0 has quit IRC[19:51:18] <tieTYT> pilkarn: i think that's a different type of chooser[19:51:23] *** joev has left ##java[19:51:30] <ende> ~pgib ++[19:51:30] <javabot> ende, I have no idea what pgib ++ is.[19:51:39] <tieTYT> i'm sure if you look at the visual guide you'll find something[19:51:46] <ende> Works now, surprise surprise :D[19:52:02] <HexKey> Why would the condition: if(lineElements[0].matches("[a-zA-Z]{2}")){ not return true for the string "Hs.111111"[19:52:31] <tieTYT> HexKey: maybe you need a .* at the end?[19:52:50] <HexKey> i thought the {2} means for the first 2 charcters of the string[19:53:27] <pilkarn> ah ye[19:53:30] <pilkarn> JDirChooser[19:54:12] *** GodTodd_ has joined ##java[19:54:16] <adaro> it doest match but you can find the pattern in that string[19:54:33] *** leor has quit IRC[19:54:37] <HexKey> i want a regex that matches a string with charcter as the first two chars[19:54:48] <HexKey> letters as the first 2 chars[19:54:59] <HexKey> why is my current regex wrong?[19:55:18] <adaro> now your searching for a string of 2 letters[19:55:24] *** GodTodd has quit IRC[19:55:26] <HexKey> ah[19:55:51] *** leor has joined ##java[19:56:01] *** feydr has joined ##java[19:56:04] <HexKey> so what should my regex be to test string that its first two chars are letters?[19:56:39] <feydr> I see there is a lib for acessing tokyocabinet from java but anyone know of one for tokyotyrant?[19:56:50] <adaro> so start your regexp with a start of line char and end it with an eager match on anything[19:56:55] *** pilkarn has left ##java[19:57:15] <HexKey> im new to regex can you write it for me[19:57:27] <dunderbao> HexKey: "^[a-zA-Z]{2}.*"[19:57:35] <HexKey> thankyou dunderbao[19:57:46] <adaro> see it as an oppertunity to learn[19:57:51] <cheeser> ~regex[19:57:51] <javabot> Please see the tutorial at http://java.sun.com/docs/books/tutorial/essential/regex/ -- If you know what you're doing, go to http://javachannel.net/wiki/pmwiki.php/FAQ/Regexp ; otherwise ask me about javadoc Pattern or javadoc String.split(*)[19:58:05] <adaro> bah you spoiled it[19:58:51] *** ridoo has quit IRC[19:59:04] <HexKey> no he didnt[19:59:14] <HexKey> he tought me alot very quickly and save me alot of time[19:59:41] *** ende has quit IRC[19:59:56] <adaro> he spoonfed you[20:00:12] <cheeser> and you'll be back next time you have a regex question[20:00:16] <HexKey> which is what i needed right now[20:00:20] <HexKey> probably[20:00:23] <dunderbao> but he is right, next time youll run in to another regex you're just gonna ask again, and again. eventually you wasted equally much time from other ppl as it would have taken you to learn it in the first place :)[20:00:31] <dipnlik> anyone here using JAI?[20:00:50] <HexKey> nah i just forgot about.*[20:01:06] <HexKey> ive learnt my lesson and all my regex knowledge is coming back to me[20:01:36] <adaro> jjai is a hiddeous api[20:02:18] <HexKey> if a string is "" can i test against it with "" or must i use null[20:03:04] <dipnlik> adaro: i need this for work :-| and when I try to intall it, it fails saying "This is not a proper JDK directory. Exiting install."[20:03:08] *** foo-nix has joined ##java[20:05:23] <cheeser> ~~ HexKey tias[20:05:24] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[20:05:27] <dunderbao> though i think its weird to actually use "^[a-zA-Z]{2}.*". If you need .* and the end you wouldnt need ^ in the beginning, right?[20:06:19] <dunderbao> guess java appends ^ and $ by default[20:07:23] <joed> No....[20:07:29] <lem> ~javafx[20:07:29] <joed> ~guessing--[20:07:29] <javabot> JavaFX (http://sun.com/javafx) is a scripting language from Sun, designed to use declarative syntax to create GUIs, primarily. You can find a tutorial at http://java.sun.com/javafx/1/tutorials/ui/[20:07:30] <javabot> guessing has a karma level of 0, joed[20:07:52] <lem> ~gambling[20:07:52] <javabot> lem, I have no idea what gambling is.[20:07:56] <lem> good[20:07:59] <lem> my son[20:08:14] <dunderbao> if you dont gamble you will die alone[20:08:19] *** tilerendering has quit IRC[20:08:46] *** vigge_sWe has joined ##java[20:08:56] <vigge_sWe> hai[20:09:03] *** feydr has left ##java[20:09:13] *** bitshuffler has quit IRC[20:09:17] *** JohnAds has joined ##java[20:09:26] <vigge_sWe> can anyone help me on XML-RPC in java?[20:09:35] <vigge_sWe> I'm getting some weird error[20:09:42] <pgib> kewl[20:09:42] <vigge_sWe> I'll pastebin in a min[20:10:18] <dmlloyd> hm, I can't find maven-javadoc-plugin. Are the docs wrong - is it not in org.apache.maven.plugins?[20:10:48] <vigge_sWe> http://pastebin.com/m34134a6e[20:11:05] *** hoerup has quit IRC[20:11:32] <Techdeck> I am using Axis2 and I have a message receiver, wherever I have an exception, it goes through that message receiver, problem is, it always produces HTTP code 500, I need to make it produce the 200 HTTP code instead... any thoughts?[20:12:46] *** lem has left ##java[20:13:59] <pgib> hm, anyone know this one off-hand: I'm trying to use tab for indentation but spaces for alignment in IDEA. Has anyone found a cool plugin or trick for this?[20:14:04] <JohnAds> hello I'm using JavaWebStart for my application .jar ( which works like a bootstrap, having a jetty embedded server which export from my jar a .war archive to tmp to run), in one of my jsp pages the user can Upload a file, but doing it the follow problem occur: access denied (java.util.PropertyPermission java.io.tmpdir read), my jar and my war are signed[20:14:46] <JohnAds> what is wrong?[20:17:31] <Techdeck> pgib, what do you mean?[20:17:47] <Ven]n> I need some help, hehe.. openFile() opens a file and starts a Player() in JMF: http://rafb.net/p/Z4aifN53.html . I have in addition a class with a playlist, JList: http://rafb.net/p/MfU2AK47.html , where I want to double click the list item and have video shown in the usual spot. Line 68 and 73 in the last paste. I need to use line 217 and 224 in the first paste, but Im not sure how to do it. Any ideas? :)[20:17:48] <Techdeck> I forgot how to indent when I learned about ctrl-alt-L :P[20:18:36] <untouchable> Ven]n, have you just been spamming your homework here?[20:18:47] *** cybereal has joined ##java[20:19:11] <Ven]n> huh?[20:19:31] <untouchable> ive been idling and earlier i saw you paste a different problem and ask how to do it[20:19:42] <Techdeck> using intellij to code java is like using an aimbot in gaming[20:19:48] *** Elvanor has left ##java[20:20:08] <Ven]n> untouchable, of course when Im having issues I ask how to do it :p[20:20:08] <Techdeck> it's so damn smart :P[20:20:11] <Stephmw> ~emacs[20:20:12] <javabot> Stephmw, emacs is escape-meta-alt-control-shift, or Eighty Megabytes And Constantly Swapping, or an operating system without a text editor, or more seriously, an extensible text editor. Emacs is often linked to atrocious key-command sequences, http://xkcd.com/378/[20:20:14] <letfunbegin> Techdeck, epic :D[20:20:25] <Stephmw> Techdeck: ^^ the xkcd link[20:20:37] *** aksn has joined ##java[20:21:22] <dunderbao> JohnAds: maybe http://cwiki.apache.org/WICKET/java-security-permissions.html can help[20:21:25] <Techdeck> haha[20:21:26] <Techdeck> nice one[20:21:28] <pgib> Techdeck, I mean, our project uses hard-tab for indents (so that people can choose their favorite indent-size) However, there are times where you want to align something with the previous line, but tabs wouldn't be appropriate since the size differs. Consider this: http://pastebin.stonekeep.com/5669[20:21:41] *** arpu has quit IRC[20:22:02] <JohnAds> dunderbao: tnks[20:22:30] <Techdeck> oh I understand pgib, no idea :([20:22:45] <pgib> Techdeck, yeah Ctrl-Alt-L is nice, but it collapses my spaces to tabs[20:22:51] <Techdeck> :([20:23:05] <Techdeck> pgib, they probably have some trick for it, I'd look in the "code style" options[20:23:05] *** dvayanu has joined ##java[20:23:24] <pgib> Yeah, I've been digging there. Maybe I need to look harder or maybe there is a plugin[20:23:39] *** Johnny_vd_Laar has joined ##java[20:23:50] * Stephmw dropkicks $IDE into the bin[20:24:24] *** timte has joined ##java[20:24:27] <AMcBain> ~~Stephmw ide war[20:24:30] <AMcBain> ~~Stephmw ide war[20:24:30] <javabot> jbuilder is shit, see http://xkcd.com/378/ for further details.[20:24:30] <pgib> Also, there is an option to add spaces to the inside of function-call parens, but there is no way to remove this option for an empty argument list[20:24:36] <AMcBain> aww ... someone changed that one.[20:24:57] *** Taggnostr has joined ##java[20:25:00] <pgib> anyways... fun stuff. Sorry I brought up editor stuff here, this is the only IRC channel around where people would know[20:25:12] <Techdeck> hah[20:25:24] *** Frostix has joined ##java[20:25:39] *** Goundy has quit IRC[20:25:47] *** jkriesten has quit IRC[20:26:12] <Taggnostr> hello, I installed java from www.java.com/getjava/ but I can't find javac.exe (I'm on windows) do I need to download something else if I want to compile the programs I write?[20:26:56] *** giaco has joined ##java[20:27:03] <vigge_sWe> can anyone help me with an XML-RPC issue here: http://forums.x10hosting.com/programming-help/95228-xml-rpc.html#post523114 ?[20:28:03] *** adam-_- has quit IRC[20:28:03] <vigge_sWe> it's the java part that gives errors[20:28:08] <pgib> tag, did you download the JRE or the JDK?[20:28:27] <JohnAds> dunderbao: weird, jetty hasn't *.policy[20:28:33] <pgib> Techdeck, "Smart Tab" looks like it does it[20:28:42] <letfunbegin> Taggnostr, you need the JDK - http://java.sun.com/javase/downloads/index.jsp[20:28:44] <Taggnostr> the dir is named jre, do I need the jdk?[20:28:49] *** UK-sHaDoW has joined ##java[20:28:51] <Taggnostr> ok, thanks[20:28:58] *** durre has joined ##java[20:29:04] *** kaje has joined ##java[20:29:32] <Techdeck> great pgib[20:30:04] <kaje> Is anyone else getting some null pointer exceptions when awt is validating a window's layout with 1.6.0_12? It works fine with update 10, but update 12 is causing the error....[20:30:42] *** jnjackins has joined ##java[20:31:19] <durre> I'm doing request.setAttribute("message", "åäö") and in the jsp print the message. the chars become corrupt. I'm doing request.setCharacterEncoding("UTF-8") and put <%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> in the header. what am I missing?[20:31:29] *** krad has joined ##java[20:32:09] <durre> also, I'm on OSX. I've set eclipse to use UTF-8 for textfiles[20:32:52] <jnjackins> System.out.println(myChar.toString()); is giving me the compiler error 'char cannot be dereferenced' -- what?[20:33:34] <durre> been working on windows, linux and osx the past few days. char encoding problems everywhere I turn. so very tired of it[20:33:42] <popcornPanic> is there a way to get a value back from a scrollbar or pane (maybe, bottom is 10 and top is 0)[20:34:15] <Stephmw> ~~jnjackins pastebin[20:34:15] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[20:34:45] <jnjackins> ~pastebin[20:34:45] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[20:35:43] <Taggnostr> do I have to register the jdk?[20:35:46] *** abruptus has joined ##java[20:36:59] <Nebulam> just use String.valueOf(myChar);[20:37:27] <ffgeek200> if i do a blockingqueue.take() i don't need to wrap that in a synchronized block right?[20:37:29] <Stephmw> Nebulam: I'm personally wondering why he's getting a C compiler error from compiling Java source...[20:37:32] <svm_invictvs-> ~easy[20:37:32] <javabot> The Easy Rule is this: if you say that something is easy, you just volunteered to do it.[20:37:34] *** D3vDiL has joined ##java[20:37:36] <svm_invictvs-> ~easy button[20:37:36] <javabot> svm_invictvs-, I have no idea what easy button is.[20:38:05] <Nebulam> I get that error all the time using toString()[20:38:15] <Nebulam> I just use String.valueOf() :)[20:38:20] *** dipnlik has quit IRC[20:39:18] <cybereal> ~~ svm_invictvs- easy button[20:39:19] <javabot> staples a big red plastic button to svm_invictvs-'s face[20:39:33] * cybereal wonders if <action> is b0rked[20:40:03] <jnjackins> http://rifers.org/paste/content/paste/8810/body[20:40:05] <D3vDiL> how can i add many objects to a collection with a loop : my objects have names like : p1 , p2, p3 .. ?[20:40:14] *** delirium- has joined ##java[20:40:38] *** verto has quit IRC[20:40:47] <svm_invictvs-> ~~easy button[20:40:48] <javabot> The user easy is not on ##java[20:40:50] <svm_invictvs-> ~easy button[20:40:51] <javabot> staples a big red plastic button to svm_invictvs-'s face[20:40:53] <svm_invictvs-> lol[20:42:16] <cybereal> cheeser: <action> is broken[20:42:34] <vigge_sWe> can anyone tell me why I am getting the errors when I am using XML-RPC in java?[20:42:36] <blahjake> D3vDiL: if you have variables named that way, chances are you're doing it wrong, probably should have started with an array[20:42:48] *** le_biloute has quit IRC[20:43:07] <cheeser> ~~ cybereal bugs[20:43:07] <javabot> you can find all the bugs and feature requests for javabot at http://kenai.com/jira/browse/JAVABOT . Please make a note there if you've found a bug rather than asking here. If you only do it here, it'll like be forgotten.[20:43:53] *** vix85 has joined ##java[20:44:07] <D3vDiL> blahjake, p1 it's an object created with a class named : Professeur[20:44:42] <cybereal> eh I don't care enough about the bug to take all the time required to fill out a bug report on yet another new bug reporting site[20:44:43] <D3vDiL> i want to use a loop to add these objects to my collection[20:45:19] <blahjake> D3vDiL: if you have a fixed number of objects of the same type that are not distinguished beyond a numbering like that, you should be using an array instead of individual variables[20:45:42] *** jnjackins has left ##java[20:46:07] <blahjake> D3vDiL: Professeur[] profs = new Professeur[3]; // profs[0] instead of p1, profs[1] instead of p2[20:46:37] *** cybereal has quit IRC[20:46:44] <blahjake> then it will also be very easy to Collection-ize them[20:47:15] <D3vDiL> thanks a lot :)[20:47:16] <D3vDiL> good idea[20:47:29] <vigge_sWe> "Exception in thread "main" org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: Expected methodResponse element, got br"[20:47:35] <vigge_sWe> what does that mean?[20:48:14] <D3vDiL> blahjake, after that how can i Collection-ize them :)[20:49:02] <ffgeek200> let's say you want 4 queues because one queue is too slow, you want to avoid synchronized(this) {notify()} since that's too slow,I guess nonblocking queues is the best approach?[20:49:25] *** supersako has joined ##java[20:49:42] <vigge_sWe> anyone?[20:50:18] <cheeser> it got something it didn't except obviously[20:50:34] <cheeser> expect[20:50:43] <blahjake> D3vDiL: for one you can loop on arrays, for two check Arrays, Collections, etc for helper API[20:50:53] <vigge_sWe> well, lol, I get that, but I don't get why it happens[20:51:33] <cheeser> vigge_sWe: well, if you expect *us* to know, then you're nuts.[20:51:37] <vigge_sWe> oh I see[20:51:49] <vigge_sWe> my php installation is missing xml-rpc[20:52:09] <cheeser> sounds very not-java to me[20:52:22] <vigge_sWe> the server is PHP, the client is XML-RPC[20:52:27] <vigge_sWe> um[20:52:30] *** vix85 has quit IRC[20:52:30] <vigge_sWe> Java*[20:52:54] <D3vDiL> blahjake, thank you so much[20:53:05] <durre> nobody wanna give me a clue? :)[20:53:10] *** BigAllan has joined ##java[20:53:20] <vigge_sWe> I forgot to check what whatt happens when I surf to the server, and just saw it said undefined function[20:53:24] *** jamil_1 has quit IRC[20:53:25] *** Frostix has quit IRC[20:53:36] *** flb has joined ##java[20:53:37] *** whaley has quit IRC[20:53:40] *** flb has left ##java[20:53:46] *** flb has joined ##java[20:54:17] *** martianlobster has joined ##java[20:54:47] *** heyqule has joined ##java[20:54:59] *** Windlord has joined ##java[20:55:58] <Ven]n> ~repeat[20:55:58] <javabot> Please don't repeat yourself, it annoys people and rarely produces results. Try rephrasing or, failing that, come back in a good while when there are different people here. Meanwhile, google is your friend.[20:57:28] *** hzsp has left ##java[20:58:05] *** vix85 has joined ##java[20:58:06] *** Frostix has joined ##java[20:58:23] <martianlobster> I am running archlinux, and I just searched for the different versions of Java that I can use. I found the Sun jdk, the GNU gcc-gcj environment, and also jikes. Does anyone have an opinion on which I should use?[20:58:45] *** whaley has joined ##java[20:58:49] <martianlobster> I just lost my Internet connection for about 60 seconds. If someone answered my questions, could you repeat the answer?[20:58:51] <ernimril> martianlobster: sun[20:58:53] <ernimril> ~gcj[20:58:53] <javabot> ernimril, gcj is not Java; don't be surprised if we refuse to help you. You can find information about gcj at http://gcc.gnu.org/java/, join #gcc, or join #gcj on irc.oftc.net[20:59:04] *** flb has quit IRC[20:59:09] <martianlobster> ernimril: thanks[20:59:55] *** EspenG has quit IRC[21:00:21] *** Windlord has quit IRC[21:01:54] *** monkeycid has quit IRC[21:01:54] *** flb has joined ##java[21:02:55] *** casmo has quit IRC[21:05:44] *** razel has quit IRC[21:06:44] *** rafaek has joined ##java[21:07:02] *** monkeycid has joined ##java[21:08:07] *** delirium- has quit IRC[21:08:40] *** marvi has joined ##java[21:09:15] *** vigge_sWe has left ##java[21:09:18] *** JayStorm has joined ##java[21:09:42] <JayStorm> hello[21:09:48] *** Towny has left ##java[21:10:08] <JayStorm> someone know how works the piespy diagram program?[21:10:46] *** bas-i has quit IRC[21:10:54] <ernimril> ~~JayStorm tech support[21:10:54] <javabot> Hello, ##java is not a technical support channel for your Java apps or virtual machines, it is a development enthusiast channel which prefers to receive questions and discussion on the topic of programming with the Java language. Please consider seeking help with the vendor of your software if you can't figure out how to use it.[21:11:33] <JayStorm> oh[21:11:55] *** _stijn_ has joined ##java[21:11:56] <JayStorm> sorry i dont know[21:13:58] *** EspenG has joined ##java[21:14:46] *** mitchnull has joined ##java[21:15:55] *** schasi has joined ##java[21:16:12] *** gfather has joined ##java[21:16:34] *** strategy has joined ##java[21:17:11] <gfather> any books recommendation for beginners other than java head first and java how to program[21:17:19] <ernimril> ~book[21:17:20] <javabot> Download these two beginners' bibles free of charge: 1) Sun Java Tutorial at http://java.sun.com/docs/books/tutorial 2) Bruce Eckel's "Thinking in Java" at http://www.mindview.net/Books/TIJ[21:19:06] *** _stijn_ has quit IRC[21:19:49] <gfather> thanks , i know the sun docs , but i want something to explain the relations and stuff ,[21:20:15] <gfather> but ill be looking at thinking java now , i hope its what im looking for :)[21:20:23] *** JayStorm has left ##java[21:21:45] *** abruptus has quit IRC[21:22:03] <Stephmw> gfather: it's a goot book[21:22:07] <Stephmw> and good too[21:22:26] <vol> gfather: what kind of relations[21:22:34] *** pilkarn has joined ##java[21:23:33] <ffgeek200> i am getting an illegal monitor exception with this code: http://pastebin.com/m10edee79 .. i thought you could call sync(obj) { obj.notify();} for all objects not just this[21:23:39] <pilkarn> how do I create an event-function? Like I play an mp3 in a separate thread and when it finishes I want to do something. Right now I'm using polling which works fine but isn't very elegant. Can I use an event-based action somehow?[21:23:42] <Stephmw> vol: mummy Class and daddy ClassLoader ones[21:24:30] <ernimril> ffgeek200: what is p_on?[21:24:38] <ffgeek200> ernimril, Boolean[21:24:43] <gfather> vol i mean between java components and such[21:24:50] <ernimril> ffgeek200: you realize that assigning to it will change it?[21:24:52] <gfather> Stephmw seems so[21:25:04] <ffgeek200> ernimril, ohh duh that's it thx[21:25:07] <vol> pilkarn: have your mp3 player thread have a reference to the thread you want to call an event for. When the mp3 finishes playing, have it call that refernce.callback();[21:25:08] <ernimril> ffgeek200: so you will not "notify" the same object as you synchronize on[21:25:21] <vol> s/the thread/the object/[21:25:25] <ffgeek200> i'll just do synchronized(this)[21:25:44] <ffgeek200> or maybe some immutable object but i shouldnt assign what i'm synchronizing on[21:25:47] <ffgeek200> thx[21:25:52] <vol> gfather: the sun java docs seem like they do a good job explaining the major componants and such.[21:25:57] <gfather> is the newer versions of the books also very good ?[21:26:17] <vol> http://java.sun.com/docs/books/tutorial/essential/index.html[21:26:26] <vol> http://java.sun.com/docs/books/tutorial/collections/index.html[21:26:44] <vol> then there are the specialized trails and such.[21:26:50] *** Techdeck has quit IRC[21:27:11] <vol> the tutorials were updated for java 5 or 6, so they're reasonably up to date, and I think they're pretty good[21:27:23] <gfather> vol still its a little harder for a total programming beginner and English as a second language[21:27:37] *** NiSoOo has quit IRC[21:28:08] <vol> gfather: well, I'm sure you can always ask specific questions here[21:28:27] <gfather> ya sure ill do , but they will be specific :)[21:28:46] *** boringwall has joined ##java[21:29:06] <gfather> but thinking java latest edition also good ?[21:30:28] <vol> you mean the jdk? it's generally good to have the latest edition.[21:30:56] <jottinger> esp with 1.6.0_12[21:31:31] *** neshaug has joined ##java[21:32:03] *** chris_abyi has joined ##java[21:32:05] <gfather> vol i ment the book , i got jdk latest edition with netbeans[21:33:36] <chris_abyi> hi.. I'm manipulating a text within a JEditablePane. Unfortunately, after some operations, I've got a lot of '\r' within my string. Does anyone know what they are made for and how they can be created?[21:33:41] *** werdan7 has quit IRC[21:33:43] <vol> Oh, I haven't read the other books, just the sun java tuts[21:34:08] <gfather> i see[21:34:40] *** tomvolek has quit IRC[21:34:53] *** werdan7 has joined ##java[21:35:18] *** blankthemuffin_ has joined ##java[21:36:25] *** bindaas has quit IRC[21:36:46] *** giaco has quit IRC[21:37:01] *** xxxxshame has left ##java[21:38:01] <Taggnostr> is there an easy way to repeat the same char N times? e.g. 'x' * 3 -> "xxx"[21:38:39] <jottinger> sure, a for loop![21:38:49] <jottinger> (i.e., no; java doesn't have syntax like that as ruby and python do)[21:38:54] <JohnAds> hello I'm using JavaWebStart for my application .jar ( which works like a bootstrap, having a jetty embedded server which export from my jar a .war archive to tmp to run), in one of my jsp pages the user can Upload a file, but doing it the follow problem occur: access denied (java.util.PropertyPermission java.io.tmpdir read), my jar and my war are signed[21:39:02] <JohnAds> reading JAVA API at public final class AccessController[21:39:20] <JohnAds> a found it: **to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,[21:39:52] <Taggnostr> jottinger, ok...[21:39:53] <JohnAds> the security policy currently in effect is the javaws_policy ?[21:40:06] <JohnAds> javaws.policy *[21:40:57] <Apocalisp> Taggnostr: asString(replicate(3, 'x'));[21:41:22] <Taggnostr> Apocalisp, do I need to import something for that?[21:41:35] <Apocalisp> Where... import static fj.data.List.asString; import static fj.data.List.replicate;[21:41:58] <Apocalisp> or, you know, write your own.[21:42:55] <Taggnostr> maybe I'll use a for loop, this is my second "program"[21:43:31] <Apocalisp> You'll need that again, so put it in a function that you can re-use.[21:43:38] <Apocalisp> or, you know, use somebody else's :)[21:45:38] *** bas-i has joined ##java[21:47:27] <Apocalisp> also, repeat('x').take(3);[21:47:49] <Apocalisp> where... import static fj.data.Stream.repeat;[21:47:59] *** AhtiK has joined ##java[21:48:06] *** bindaas has joined ##java[21:48:23] *** bas-i has quit IRC[21:48:50] <Taggnostr> that seems lispish[21:49:05] *** dos000 has joined ##java[21:49:20] *** andrewkasper has quit IRC[21:49:26] <Apocalisp> (take 3 (repeat x))[21:49:28] <Apocalisp> ;)[21:49:30] <dos000> what would you recommed for an nio pckg ?[21:49:56] *** Frostix has quit IRC[21:50:18] <Apocalisp> Taggnostr: Good insight. fj.data.Stream is actually the same data structure as a LISP list.[21:56:15] *** DjZemich has joined ##java[21:56:26] *** martianlobster has quit IRC[21:56:37] *** marvs has quit IRC[21:56:43] *** rlubke has quit IRC[21:57:45] *** netoman has quit IRC[21:57:49] <Taggnostr> this is the program: http://www.rafb.net/p/hbLrO153.html[21:58:24] *** monkeycid has quit IRC[21:59:38] *** harurenu has joined ##java[22:00:26] *** fatbrain has joined ##java[22:00:48] <Taggnostr> is there anything that can be improved? (considering that is my second program and probably I'm not even supposed to use for loops and arrays)[22:00:49] <fatbrain> Hello! What MVC framework would you guys recommend?[22:02:39] *** HelloMeow has joined ##java[22:03:22] *** JohnAds has quit IRC[22:03:23] *** dirtyd has joined ##java[22:03:37] *** durre has quit IRC[22:04:12] <Apocalisp> Taggnostr: not bad.[22:04:39] <Taggnostr> ok[22:04:44] <AMcBain> Taggnostr: for the next program, why not try a "guess my number" program? (you can wrap System.in in a Scanner, and assume all inputs will be ints :P)[22:05:10] <Taggnostr> I still have 3 more exercises to do :P[22:05:20] <AMcBain> oh ... this isn't just for personal learning?[22:05:40] <Apocalisp> Taggnostr: Think about how you can eliminate the starNum array[22:05:50] <dos000> i need a way in java to fake/generate a tons of tcp requests coming from different source ips .. how would you do that ?[22:06:12] <AMcBain> Apocalisp: the programd doesn't even use it currently.[22:06:13] <Taggnostr> no, I'm studying it in the "basics of programming" course at the university[22:06:18] <ernimril> dos000: I would use some non-java tool that can generate that[22:06:40] <dos000> ernimril: i cant find one out there. and hesitating to write this danting task[22:06:41] *** squi has quit IRC[22:06:57] <dos000> ernimril: nothing in sw. its all hw and $$$[22:07:10] *** untouchable has quit IRC[22:07:29] <AMcBain> haha ... that nick is ironic.[22:07:30] <ernimril> dos000: what type of network traffic are you trying to simulate?[22:07:33] <Apocalisp> Taggnostr: There's no variable shortage in the universe. Don't feel compelled to declare k outside the loop.[22:08:15] *** staykov has quit IRC[22:08:16] <Taggnostr> you mean "for (int k=...)" ?[22:08:21] <Apocalisp> right[22:08:32] <Apocalisp> char star can be final and static[22:08:33] <dos000> ernimril: just plane xml/http/tcp ip. but i need a way of mimiccking multiple sources[22:08:54] <Taggnostr> what are final and static?[22:09:27] <AMcBain> final on a class means it cannot be subclassed, final on a variable means it's reference cannot change one it is assigned.[22:09:45] <vol> static means that it is not tied to an instance of that class[22:09:57] <dos000> ernimril: also i need to do it in an asynchronuous fashion[22:10:24] <dos000> so 1) asynchronous sockets 2) multiple tcp sources[22:11:08] <blahjake> static has different meanings in different contexts[22:11:11] <Apocalisp> Taggnostr: "static final" is Java's way of declaring a constant (sort of).[22:11:17] <Taggnostr> so, final static star == it's equal for all the instances and the it cannot be changed, right?[22:11:30] *** adam-_- has joined ##java[22:11:32] <Apocalisp> Right, it's then tied to the class[22:11:44] *** staykov has joined ##java[22:11:59] <AMcBain> well ... for primatives. final doesn't ensure that the contents of item stored in that variable haven't changed.[22:12:40] <vol> it does ensure that the reference doesn't change, though.[22:12:41] <Taggnostr> and if I don't put final I can change it in an instance and all the other instances will see the change, right?[22:12:57] <AMcBain> (final List<String> map = new ArrayList<String>(); ... I can later do map.add("foo") ...)[22:12:59] <AMcBain> vol: yes[22:13:09] <Apocalisp> Taggnostr, yes that's right, more or less.[22:13:23] <Taggnostr> ok, makes sense[22:13:33] <vol> So, you could have a static final StringBuilder for example. you might change the string inside by calling append, but the StringBuilder reference will always be the same.[22:13:35] <AMcBain> oops ... I saw the question after Taggnostr's post and weirdly saw if after vol's post ...[22:13:50] *** rlubke has joined ##java[22:14:08] <AMcBain> it*[22:16:33] *** bhz- has quit IRC[22:16:36] *** pierrep has quit IRC[22:16:58] *** morkar- has quit IRC[22:17:41] <Taggnostr> the next exercise is really difficult: "Write a program that stores the integers 62, and 99 in a variables, and stores their sum in a variable named total."[22:18:18] <pgib> that is rough[22:18:19] <Ven]n> whats wrong when I try to run playerWindowController.createPlayer(); in PlayList() I get the following error: http://rafb.net/p/adQjUf67.html ?[22:18:21] <AMcBain> I hope you're joking.[22:18:24] <pgib> I can't even imagine what the sum is[22:18:28] *** DjZemich has quit IRC[22:18:32] *** skypce has quit IRC[22:18:55] <vol> int sixtytwo = 62; int ninetynine = 99; int sum = 161; did I do it right?[22:19:21] <AMcBain> haha, though I think they want you to add those variables, not store the physical (precalculated) sum :P[22:19:32] <AMcBain> (but that's subject to interpretation)[22:19:47] *** marvi has quit IRC[22:22:35] <pilkarn> vol: so the play-mp3-thread neads the main-thread ref? bu there is no special callbac function in the Thread-class.[22:27:40] *** axod has joined ##java[22:29:03] *** dirtyd has quit IRC[22:30:12] *** LouisJB has joined ##java[22:30:13] <axod> hi is anyone familiar with ssl here?[22:30:22] *** artz22 has joined ##java[22:30:24] <artz22> hi everyone[22:30:27] <vol> it only needs an object to call back into[22:30:40] <LouisJB> hi[22:30:44] <vol> you could have some class implement FooInterface, and then pass that class to your mp3 player as a callback[22:31:00] <LouisJB> out of interest, anyone using functionajava on here?[22:31:01] <vol> then, when the mp3 player finishes playing, it calls that FooInterface method[22:31:36] <artz22> i'm trying to know, inside an event handler, if the one who did the action was the user or it was generated by other code in my application.. for instance, if there is a list and I have a listener to know when the item selected changed, i want to know if the item changed because of the user or if it was because I sent setSelectedIndex() manually. is it possible?[22:32:41] *** FMJaguar has joined ##java[22:33:12] <vol> probably not. You could always pass an argument, like bool wasManual[22:33:13] *** t3mp3st has joined ##java[22:33:32] <t3mp3st> is it standard practice to write boolean equals(Object other) to handle the case where other == null?[22:33:58] <cheeser> yes[22:34:03] <cheeser> unless you like NPEs[22:34:12] <[TechGuy]> NPE FTW[22:34:24] <vol> yes[22:34:34] *** HelloMeow has quit IRC[22:34:39] <t3mp3st> haha, I have made a grave error... FTS :([22:34:41] *** doc`` has joined ##java[22:34:51] <letfunbegin> it's nice to have NPEs. tells you when you're doing something very wrong[22:34:52] <vol> usually you'll start with something like { if(other == null || other != instanceof this.class) return false; ... }[22:35:07] <cheeser> letfunbegin: better yet to not do stupid things[22:35:07] <cheeser> 8^)=[22:35:15] *** Niike has joined ##java[22:35:30] <cheeser> s/this.class/getClass()/[22:36:06] *** tomvolek has joined ##java[22:36:52] <dunderbao> ~NPE[22:36:52] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A[22:37:52] <krad> should I be checking at the beginning of a method if any of its parameters are null?[22:38:00] <krad> before using them that is[22:38:05] <t3mp3st> vol: thanks for the snippet -- my code needs a bit of patching[22:38:17] *** axod has left ##java[22:38:20] <Taggnostr> can I iterate on two lists at the same time in parallel? (like in python: for x,y in zip(l1,l2))[22:38:29] <[TechGuy]> no[22:39:07] *** MigoMipo has left ##java[22:39:46] <cheeser> sure, you could.[22:39:55] <letfunbegin> try iterators[22:39:59] *** garotosopa has joined ##java[22:40:21] <cheeser> well, you couldn't "zip" the lists together, but ...[22:40:58] *** ravv has quit IRC[22:41:08] <Taggnostr> well, I could use a normal for[22:41:22] <cheeser> even a while would work.[22:41:46] *** ravv has joined ##java[22:42:03] <Taggnostr> but I wanted to do it "on the fly", since I don't have the lists but the elements, so I was searching something like zip({e1, e2, e3}, {f1, f2, f 3})[22:42:38] <pgib> true.. while(it1.hasNext() && it2.hasNext() && it3.hasNext() { ... }[22:42:56] <vol> krad: if there's any doubt that they might be.[22:42:58] <cheeser> Arrays.asList()[22:42:58] *** chris_abyi has quit IRC[22:43:13] *** Carnage\ has quit IRC[22:43:38] *** Ivellina has quit IRC[22:44:47] *** omaru has joined ##java[22:47:53] *** adi112358 has joined ##java[22:48:16] *** ahughes has joined ##java[22:48:34] *** adi112358 has quit IRC[22:48:39] *** krad has quit IRC[22:50:44] *** Odin79 has quit IRC[22:51:21] <benJIman> Taggnostr: Well you can always implement zip.[22:52:03] *** bas-i has joined ##java[22:52:29] *** EspenG has quit IRC[22:53:17] <Taggnostr> now I'm trying another thing, but apparently I can't do for (String s: {s1, s2, s3})[22:53:31] *** bas-i has quit IRC[22:53:41] *** Thorn has quit IRC[22:53:42] <Nebulam> this isn't perl[22:53:50] <benJIman> Taggnostr: You can do for (String s : Arrays.asList(s1,s2,s3))[22:53:56] <cheeser> Taggnostr: for(String s: new String[] {a,b,c})[22:53:56] *** ravv has quit IRC[22:54:06] <Taggnostr> let's see[22:56:14] <Taggnostr> it can't find Arrays, do I need to import something?[22:56:21] <cheeser> ~javadoc Arrays[22:56:22] <vol> yes, Arrays.[22:56:23] <javabot> cheeser: http://is.gd/iqF5 [java.util.Arrays][22:57:10] <svm_invictvs-> Weird[22:57:19] <svm_invictvs-> I can't seem to get my junit tests to execute the @BeforeClass methods.[22:57:24] <svm_invictvs-> **method[22:57:33] <svm_invictvs-> @BeforeClass and @AfterClass aren't getting called.[22:58:18] *** D3vDiL has quit IRC[22:58:47] *** vix85 has quit IRC[22:59:20] *** Goks has joined ##java[22:59:20] <Ven]n> why is line 141 in http://rafb.net/p/jztoJn13.html giving me java.lang.NullPointerException ?[22:59:37] <Goks> hi all[22:59:43] <svm_invictvs-> heh[22:59:59] <ernimril> Ven]n: because playerWindowController is null[23:00:15] <Ven]n> but why is it null? hehe[23:00:24] <svm_invictvs-> I have a method "rmrf(File f)"[23:00:33] <ernimril> Ven]n: where do you set it to a non-null value?[23:00:34] <svm_invictvs-> Somebody asked me, "What does that do?"[23:00:48] <vol> did you tell them "try it and find out on /" ?[23:01:04] <vol> ~tias[23:01:05] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[23:01:05] <benJIman> Taggnostr: You can always do something like http://java.pastebin.com/m614f0bdd[23:01:35] *** The_Birdman has quit IRC[23:01:45] <Ven]n> ernimril, its supposed to do stuff in http://rafb.net/p/e9VJd689.html[23:02:12] *** timte has quit IRC[23:02:16] <ernimril> Ven]n: that is not even close to answering my question[23:02:17] *** cher has joined ##java[23:02:53] <Taggnostr> can I do System.out.println(s + " - " + s[0]); where s is a string?[23:02:54] <Ven]n> hmm, I instantiate playerWindowController in my main() class.. is that a better answer? hehe[23:03:08] <ernimril> Ven]n: no[23:03:19] <Ven]n> hrmf[23:03:27] <letfunbegin> Taggnostr, no[23:03:28] <Nebulam> impossible[23:03:34] <Nebulam> wrong channel[23:03:46] <Taggnostr> is there something like .charAt(0) then?[23:03:48] <ernimril> Ven]n: you have a "private PlayerWindowController playerWindowController" in your PlayList[23:03:56] <Ven]n> yeah[23:04:01] <ernimril> Ven]n: where do you set that variable to a non-null value?[23:04:06] <letfunbegin> Taggnostr, yes :)[23:04:09] <[TechGuy]> ~~Taggnostr javadoc String[23:04:10] <javabot> Taggnostr: http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING][23:04:23] <Ven]n> ernimril, I guess nowhere..[23:04:25] *** tranceNRG has joined ##java[23:04:30] *** Odin79 has joined ##java[23:04:34] <Taggnostr> thanks [TechGuy][23:04:48] <Taggnostr> (benJIman, I'll try to parse that later)[23:04:56] <[TechGuy]> Ven]n: Congratulations. Fix it.[23:05:05] *** Dandre has joined ##java[23:05:13] <Dandre> hello,[23:05:38] <Ven]n> [TechGuy], im not sure how :)[23:05:39] <benJIman> Taggnostr: It'll compile on its own (if you remove the "package scratchpad;" from the top.[23:06:04] <[TechGuy]> Ven]n: If you supposedly instantiate it elsewhere, find a way to pass it in or otherwise set it[23:06:38] <Ven]n> my main() instantiate it with: new PlayerWindowController(playerWindow);[23:07:15] <vol> is playerWindow null?[23:07:28] <Dandre> I want to test a string for the presence of some words (like "FOO","BAR") Can I use a regular expression like .*FOO|BAR.*[23:07:40] <cheeser> ~tias[23:07:40] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[23:07:45] <Ven]n> vol, no, playerWindow is my main window and shows up, so it cant be null :)[23:07:48] <vol> Dandre: yes, look at the regex classes[23:08:00] <Dandre> ok[23:08:04] <vol> you don't need .* either. Just enjoy the \\\\ fest and poor documentation[23:08:15] <vol> s/poor/inaccurate/[23:09:06] *** AskHL has joined ##java[23:09:42] *** Gracenotes has joined ##java[23:09:51] <letfunbegin> I don't agree the documentation is poor. it is actually rather rich on examples and details.[23:10:15] <vol> I found a mistake somewhere, I think it was telling me to do \0 when that would do nothing, or \1. I forget offhand.[23:10:27] <vol> it culminated in an hour of hair pulling and asking "WHY WON'T THIS GIVE ME MY EFFING BACKREFERENCE"[23:10:47] <cheeser> ~download[23:10:47] <javabot> Find current releases for Java at http://java.sun.com/javase/downloads/index.jsp and a comprehensive archive of current and older releases of various Java related products at http://java.sun.com/products/archive/[23:10:58] *** dos000 has quit IRC[23:11:01] *** Ivellina has joined ##java[23:11:06] <letfunbegin> I do agree however that the regex library can be quite counter-intuitive to work with sometimes. I've also had my "turns"[23:13:06] *** [TechGuy] has quit IRC[23:13:39] *** Dandre has left ##java[23:14:10] <Taggnostr> isn't there any simple function like strpos or .isSubString to test if foo or bar are in the string?[23:14:42] <AMcBain> String.contains(otherString)[23:14:49] <AMcBain> String.indexOf(otherString)[23:15:03] <Taggnostr> I think it's better than use regex, isn't it?[23:15:14] *** bhz- has joined ##java[23:15:24] * Stephmw mourns the poor apidocs, so infrequently referred to by ##java joiners...[23:15:36] <letfunbegin> depends on the purpose right :)?[23:15:39] <AMcBain> ^.- for a simple test of one string in another?[23:15:49] <AMcBain> I wouldn't use regex for that.[23:16:53] *** bbq^ has joined ##java[23:17:16] *** aleksei has joined ##java[23:17:22] *** Ivellina has quit IRC[23:18:33] *** ramdam has joined ##java[23:20:38] *** jabalsad has quit IRC[23:22:07] *** Yustme has quit IRC[23:24:42] *** garotosopa has quit IRC[23:25:44] *** bindaas has quit IRC[23:26:18] *** Daniel_G has joined ##java[23:26:43] *** lem has joined ##java[23:26:50] *** dv_ has joined ##java[23:26:52] <lem> ~pastebin[23:26:52] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[23:28:06] *** ravv has joined ##java[23:29:37] <lem> http://rifers.org/paste/show/8811[23:29:54] <lem> any ideas to that kind of stack?[23:30:00] *** Copter has quit IRC[23:30:03] *** bas-i has joined ##java[23:30:22] <cheeser> looks like something is null[23:30:26] <vol> Something Bad happened in your event queue[23:30:35] *** Dandre has joined ##java[23:30:52] <Dandre> I have tried this:[23:30:52] <Dandre> ^\d DEAT|BIRT(.*)[23:31:02] *** bbq^ has quit IRC[23:31:07] <Dandre> to find lines like[23:31:14] <Dandre> 1 DEAT[23:31:15] <Dandre> or[23:31:20] <Dandre> 1 BIRT[23:31:38] <Dandre> bur the matcher finds only DEAT[23:31:46] <Taggnostr> ^\d (?:DEAT|BIRT)(.*)[23:31:49] <Dandre> what's wrong?[23:32:00] *** LostMonarch has quit IRC[23:32:13] <lem> cheeser, it happens when I start a javafx class with maven like this: mvn exec:java -Dexec.mainClass=MyExample.TestClass[23:32:37] <cheeser> ok.[23:33:48] <Dandre> ok thanks[23:33:48] <whaley> lem: pretty sure you need to use javafx's executable and not java's[23:34:30] *** jcapinc has quit IRC[23:34:37] <lem> whaley, do you know its name?[23:34:50] <whaley> lem: javafx[23:34:57] <cheeser> fancy that[23:35:01] <whaley> amazing. huh.[23:35:04] <lem> whaley, I tried that already[23:35:18] <lem> it's not known[23:35:39] <whaley> lem: so make it known... go install the javafx runtime[23:36:14] *** caverdude has joined ##java[23:36:27] <pgib> guys: I love Java[23:37:02] <lem> whaley, I've added javafxrt already in my dependencies[23:37:27] <lem> whaley, and mvn installed a lot of packages[23:38:27] <Goks> hi, i must use throws IOException { .. } to avoid exception like "Stream Closed" in readLine()?[23:38:42] <whaley> lem: is there an actualy javafx on your $PATH? if not, you need one. the maven exec plugin want have it automagically[23:38:49] <whaley> *won't[23:39:07] <cheeser> ~~ Goks exceptions[23:39:07] <javabot> Goks, exceptions is http://java.sun.com/tutorial/essential/exceptions[23:39:20] <whaley> ~be r0bby[23:39:20] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.[23:39:26] <lem> whaley, I have included JFX_HOME/bin to PATH[23:39:39] <whaley> lem: that doesn't answer my question[23:39:43] *** troop has joined ##java[23:40:06] <lem> whaley, there is javafx in my PATH[23:40:08] <troop> hi, is there any light and code complement java editor?[23:40:23] <cheeser> ~jedit[23:40:24] <javabot> cheeser, jedit is a programmer's editor written in Java/Swing: http://www.jedit.org/[23:40:55] <troop> thank you[23:41:16] <cheeser> ~google java editor[23:41:16] <javabot> http://letmegooglethatforyou.com/?q=java+editor[23:41:20] <Goks> cheeser: in this code http://rafb.net/p/bYwBVV56.html why i get Exceptions like "Stream Closed" ?? please help me...[23:41:29] <troop> i'm just seeking like notepad but increase code complete.[23:42:50] *** troop has quit IRC[23:43:50] <vol> Goks: do you get that error immediately? That should work.[23:44:04] <Goks> vol: nop, in the second time[23:44:13] <whaley> lem: so mvn exec:exec -Dexec.executable=javafx -Dexec.arguments=whatever[23:44:21] <Goks> vol: if you choose option 2, test it[23:44:24] <whaley> lem: should probably get you what you want[23:44:36] *** Daniel_G has quit IRC[23:44:36] <Goks> vol: when you back of this options, the exception appear.[23:44:58] <whaley> lem: or just declare that stuff directly in your pom, perhaps[23:45:26] *** shafi_ has joined ##java[23:46:56] *** UK-sHaDoW has quit IRC[23:47:00] <vol> Goks: Sorry, not enough time, and I don't have the code for Contactos.[23:47:11] <Goks> vol: i give you right now[23:47:46] <lem> whaley, I get an output that tells me how to use the command java[23:48:27] *** HexKey has quit IRC[23:48:36] <Goks> vol: http://rafb.net/p/F26DmN60.html[23:48:49] *** UK-sHaDoW has joined ##java[23:49:00] <lem> whaley, I entered: mvn exec:exec -Dexec.executable=javafx MyExample.TestClass[23:49:34] *** _stijn_ has joined ##java[23:49:41] <lem> whaley, I also tried to specify the class name as argument[23:49:47] <lem> the output stays the same: the usage of the command java[23:49:55] *** bigjocker has quit IRC[23:50:19] <shafi_> do you guys use the spring or Seam frame work? is it good to use frame works?[23:50:35] <whaley> lem: errr, I told you wrong. According to http://mojo.codehaus.org/exec-maven-plugin/exec-mojo.html it is exec.args=whatever when specified on the cli[23:50:44] *** dunderbao has quit IRC[23:50:49] <Taggnostr> how can I convert a string like "123" to double?[23:51:15] <pgib> Double.valueOf[23:51:24] <whaley> ~~ Taggnostr javadoc Double[23:51:26] *** codethief has quit IRC[23:51:28] <javabot> Taggnostr, too many results found. Please see your private messages for results[23:51:35] <whaley> ...[23:51:35] *** exbio has joined ##java[23:51:42] <lem> I'll try, mompls[23:51:56] *** mosno has joined ##java[23:52:06] *** ShadowHntr has joined ##java[23:52:15] <vol> Goks: Aha.[23:52:31] <vol> You're opening System.in inside the methods of Contactos[23:52:36] *** tilerendering has joined ##java[23:52:38] <vol> You've already opened it elsewhere.[23:52:49] <vol> Eventually, you close it.[23:52:57] <vol> So, when you try and read it elsewhere, you end up closing it there.[23:52:59] <vol> er[23:53:06] <vol> when you try and read it elsewhere, it's already closed.[23:53:06] *** sombriks has quit IRC[23:53:06] <Goks> vol: so, i must close System.in in Contactos class no?[23:53:11] <vol> no, you must NOT.[23:53:21] <Goks> vol: ahh ok[23:53:35] <vol> You should probably pass in the BufferedReader as an argument to the methods in Contactos that require an input stream[23:53:38] <cheeser> closing System.in is almost always a bad idea[23:53:44] <Goks> vol: y try that, and i advice you.[23:53:53] <Goks> cheeser: System.in is like stdin?[23:54:01] <vol> pretty much[23:54:14] <cheeser> yes[23:54:26] <Goks> cheeser: Ohhh i am so dump :'S[23:54:27] <Goks> sorry![23:54:30] <Goks> i get it now[23:54:45] <lowki> vol is progressing on a spiritual path in service to others[23:54:47] <lem> whaley, I put the class name as as argument, is that correct? I can recall that I had to do that too when I work with javafx in combination with eclipse[23:54:55] <lowki> though perhaps cheeser is also[23:55:05] *** Nebulam has quit IRC[23:55:14] <cheeser> lowki: nah. just working off my community service sentence[23:55:16] <cheeser> 8^)=[23:55:51] <lowki> :)[23:56:08] *** rdancer has quit IRC[23:56:10] *** deathy has joined ##java[23:56:27] *** TheCastor has quit IRC[23:56:45] *** jdolan_ has quit IRC[23:56:50] *** Angel-SL has joined ##java[23:56:58] <lem> damn[23:57:06] <vol> lowki: wut?[23:57:21] <lem> whaley, now I get: Initial SessionFactory creation failed: java.lang.AbstractMethodError: org.slf4j.impl.NOPLogger.trace(Ljava/lang/String;)V[23:57:32] <Goks> vol: you rock man, i will dream with you this night ;)[23:57:47] <Goks> vol: now works :'D[23:57:47] <pgib> that is just slightly scary[23:58:13] <lowki> I was just a book channeled from Ra, and it speaks of the path to ascension to higher density as either "service to others" or "service to self"[23:58:47] *** JC_Denton_ has joined ##java[23:58:58] <lowki> though really there is an encapsulation of both at any one time, as all is one, hence the book is also entitles "law of one"[23:59:04] <vol> Goks: mildly disturbing.[23:59:18] *** untouchable has joined ##java[23:59:28] *** ankylose has quit IRC[23:59:29] <lowki> vol: you could be nicer[23:59:38] <lowki> :)[23:59:43] <vol> lowki: you are correct[23:59:53] <pgib> but "why"?[23:59:58] <Goks> vol: :P ;)