NOTICE: This channel is no longer actively logged.
[00:00:15] <_W_> glad you're enjoying it[00:01:03] <rdancer> better than being hit with a blunt object[00:01:40] <joed> I guess we failed.[00:02:13] <joed> But if you don't want to download from eclipse, take it to your favourite ubuntu channel.[00:03:09] *** waz has joined ##java[00:03:15] *** giantrobot has joined ##java[00:03:47] *** epswing has joined ##java[00:05:25] *** scorchsaber_ has joined ##java[00:07:10] *** romanb has quit IRC[00:11:07] *** shadewind has joined ##java[00:13:50] <kavon> wow i'm getting really pissed off: http://pastebin.com/d4964af2b[00:13:57] <kavon> why does it print null i can't find anything wrong with that![00:14:55] *** sukuri has joined ##java[00:15:13] <rdancer> kavon: new Account[3]() // parens[00:15:17] <sukuri> ~pastebin[00:15:17] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.[00:15:23] <sukuri> ~pastebin[00:15:23] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[00:15:43] <[TartY]> val = this.val; --->> this.val = val[00:15:53] <[TartY]> this.val = object atribute[00:15:56] <kavon> [TartY]: oh crap[00:15:57] <rdancer> val = this.val;[00:15:58] <[TartY]> val = paramete[00:16:01] <[TartY]> r[00:16:03] <_W_> oh Sun, why must your code suck so? http://pastebin.stonekeep.com/5505[00:16:14] <rdancer> kavon: as [TartY] says[00:16:18] *** SpongeBob is now known as Gary[00:16:18] <sukuri> I'd read that pastebin.com isn't the best for pasting code, is there a separate, better place for pasting code that's just as easy?[00:16:20] <_W_> (like 31 to 34 is currently causing me grief)[00:16:25] <_W_> *line[00:16:34] <_W_> ~~sukuri pastebin[00:16:35] <javabot> sukuri, http://rifers.org/paste Paste the final url after you've pasted your stuff there.[00:16:46] <kavon> ugh lol 30 mins and i reversed what should be on the other side of =[00:16:53] <kavon> thanks [TartY] for noticing that[00:16:54] <sukuri> _W_: are all of those good?[00:17:19] *** Luyang has quit IRC[00:17:29] <r0bby> rdancer: ...[00:17:40] <r0bby> new Account[3];[00:17:58] <rdancer> that legal?[00:18:03] <r0bby> Account[] a = new Account[3]; a[1] = new Account();[00:18:11] <r0bby> ~~ rdancer arrays[00:18:11] <javabot> rdancer, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html[00:18:34] <r0bby> kavon: disregard rdancer[00:18:49] <rdancer> disregard me[00:19:17] <r0bby> kavon: when you instantiate your array and it's a reference type, the default value is null until you instantiate it[00:19:51] <kavon> r0bby: ya i was dumb with the assignment operator there, wrong sides[00:20:02] <_W_> anyone have any good idea why Sun isn't chaining the exceptions that occur on program launch?[00:20:46] <r0bby> s/with.*//[00:20:48] * r0bby ducks[00:21:39] *** mibocote has quit IRC[00:22:03] *** TooAngel has joined ##java[00:22:43] *** mibocote has joined ##java[00:23:24] * bearded_oneder just woke up and scanned the scroll history[00:23:37] <sukuri> _W_: thank you[00:23:43] *** sukuri has left ##java[00:23:48] * bearded_oneder chuckling @ MyName, funny n00b[00:23:55] * bearded_oneder proud of r0bby[00:24:31] <r0bby> I'm making a new years resolution to not be a tool[00:24:47] *** multi_io has joined ##java[00:25:08] <r0bby> bearded_oneder: he's something alright[00:27:16] <bearded_oneder> String.concat("funny", ", but irritating")[00:27:41] <svm_invictvs> WTF? "Exception in thread "main" java.lang.Error: Unresolved compilation problems:"[00:28:17] <svm_invictvs> This had better not be another case of eclipse breaking the build.[00:28:29] <bearded_oneder> svm_invictvs -> did you inherit some else's code?[00:28:38] <bearded_oneder> someone*[00:28:48] <svm_invictvs> bearded_oneder: inherit as in extends?[00:28:55] <svm_invictvs> or inherit as in takeover existing code?[00:29:02] <bearded_oneder> the latter[00:29:26] <svm_invictvs> It's a colaborative effort...except...he's out of the office...has been since christmas.[00:29:37] <svm_invictvs> I do a maven build[00:30:03] <svm_invictvs> then run th eresulting jar[00:30:05] <svm_invictvs> and that happens[00:30:10] *** aksn has quit IRC[00:31:25] *** amnesiac has quit IRC[00:31:45] <svm_invictvs> bearded_oneder: I just replaced a bunch of busy waiting with actual condition variables.[00:32:30] <svm_invictvs> DOUBLEU-TEE-EFF![00:33:14] *** amine has joined ##java[00:33:16] <amine> hey[00:33:22] <svm_invictvs> hey[00:33:27] <amine> what's up?[00:33:55] *** Absolute0 has joined ##java[00:34:01] <amine> svm = support vector machines?[00:34:20] <svm_invictvs> no[00:34:23] <amine> ah okay[00:36:35] <tazle> sum invictus, obviously[00:37:04] <amine> obviously[00:37:25] *** samek has joined ##java[00:37:46] <amine> I got a question - I want to create a daemon that will be running all the time on a linux machine, and it should be listening on a big amount of port (~500 for example), and it will be accepting multiple connections per port (~20), and it will generate a few short-lived connections for each of these multiple connections per port (~2/second).. there will be no file input/output, only database access, and they must not be slowed down by others (so must be[00:37:46] <amine> threaded). How would java scale on this sort of project?[00:37:55] <amine> Is it a good idea to use java for it?[00:38:43] <ilyak> amine: I guess, no[00:38:56] <bearded_oneder> amine -> http://en.wikipedia.org/wiki/Invictus[00:38:59] <ilyak> If you would, you'll wind up doing most work in native wrapper[00:39:17] *** shadewind has quit IRC[00:39:25] <ilyak> wrapper around epoll, kqueue and stuff[00:40:05] <amine> ilyak, there is no multithreading in java?[00:40:08] <ilyak> So I woudn't really use java for that kind of task[00:40:15] <ilyak> amine: There is[00:40:24] <ilyak> But you shouldn't do 10000 threads[00:40:30] <ilyak> That would be an epic fail[00:40:49] <mibocote> but does he need to spawn a new thread per connection?[00:41:17] <amine> mibocote, pretty much[00:41:21] <ilyak> Well, or spend a lot of time in the same wrapper[00:41:30] <ilyak> s/same/said[00:41:38] * ilyak would try to use erlang for that[00:41:43] <amine> So why does java have a problem with 10,000 threads?[00:41:45] <ilyak> but it's ok with C too[00:42:00] <ilyak> amine: Because it can even use the system threads[00:42:06] <amine> I was going to use C or C++ initially, but I was afraid it would cause me more problems with memory leaks than anything else[00:42:11] <ilyak> And linux wouldn't like having 10000 its threads[00:42:15] *** cactaur has joined ##java[00:42:15] <ilyak> It would grind to halt[00:42:22] <ilyak> scheduler wouldn't thank you for that[00:42:30] <ilyak> Try erlang or c with event loop[00:42:56] <mibocote> I am confused why a few worker threads with a selector wouldn't work here?[00:43:01] <mibocote> but I also like the erlang idea[00:43:08] <amine> I have not used erlang before[00:43:14] <bearded_oneder> amine -> NIO http://www.onjava.com/pub/a/onjava/2004/09/01/nio.html[00:44:01] <tazle> amine: sounds like something you could write in an hour with MINA if you're familiar with the asynchronos model and don't care about error handling too much[00:44:07] <tazle> amine: or Netty[00:44:43] <amine> tazle, haven't used those :([00:44:57] *** giantrobot has quit IRC[00:45:50] <amine> Think of the project as 500 ftp servers.. listening on 500 ip/port combinations, accepting 20-30 users on each port, and every connection spawns more connections for listing, file transfer, etc (but tehre is no file access in this case)[00:45:55] *** Razec has joined ##java[00:46:00] <tazle> amine: you seem to be saying that there would be about 10k long-lived connections, each of which would produce a few events per second leading to short-lived connections elsewhere[00:47:19] <amine> I could create 500 processes for the main listening sockets, would that be better?[00:47:59] <tazle> I don't see why it would[00:48:18] <amine> Ok[00:48:20] <bearded_oneder> amine -> NIO critique: http://technfun.wordpress.com/2008/04/21/critique-of-java-nio-frameworks/ ; Uber-brief case study: http://www.ibm.com/developerworks/java/library/j-perf03174.html[00:48:27] <amine> I'll take a look at bearded_oneder link[00:48:42] <tazle> amine: also, go write some code and see what comes out of it - pure theorizing is silly[00:49:41] <amine> tazle, I'm still planning everything[00:49:57] <tazle> amine: you obviously don't know enough to do good planning[00:50:23] <amine> which is why I'm here..[00:50:27] <svm_invictvs> ~php[00:50:27] <javabot> svm_invictvs, php is the solution of choice for relaying mysql errors to web users.[00:50:48] <tazle> amine: yes, and I'm telling you you should be checking things out yourself[00:50:54] *** prophet05 has joined ##java[00:51:03] <tazle> amine: also, establishing 20k connections per second seems unlikely, do you really need to do that?[00:51:14] <amine> tazle, look, programming before doing research is the silly idea[00:51:33] <amine> tazle, it's unlikely but I would like to be prepared for it[00:51:59] <svm_invictvs> amine: and you're asking how tod eal with that?[00:51:59] <tazle> amine: I mean "unlikely" in the sense that "you are unlikely to be able to achieve that"[00:52:15] <svm_invictvs> you'r enot talking about using thread-per-connection are you?[00:52:22] <prophet05> Is there any example/tutorial how JFace TreeViewer as a TableTree?[00:52:41] <amine> svm_invictvs, no, I would do it with a select() on the array of connections and handle it from there one reply at a time[00:52:50] <amine> I don't know java's alternative to select()[00:53:08] <tazle> amine: I can tell you that handling 10k connections and a few messages per second on each connection is no problem, go pick your framework and start reading experienting with them to see which you like the best, and try to avoid creating 20k connectiosn per second because it doesn't sound achievable[00:53:20] <svm_invictvs> amine: nio[00:53:28] <svm_invictvs> amine: SlectorChannel or something.[00:53:29] *** knuthy has quit IRC[00:53:32] <svm_invictvs> Selector[00:54:10] <svm_invictvs> ~javadoc Selector[00:54:10] <javabot> http://java.sun.com/javase/6/docs/api/java/nio/channels/Selector.html[00:54:11] <bearded_oneder> amine -> naive, but interesting tomcat benchmarks, "Tomcat Scales to 16,000 Concurrent Connections - WHOA!": http://www.javalobby.org/java/forums/t92965.html[00:54:22] <svm_invictvs> ~~amine javadoc Selector[00:54:22] <javabot> amine, http://java.sun.com/javase/6/docs/api/java/nio/channels/Selector.html[00:54:34] *** seyfarth has quit IRC[00:54:46] <svm_invictvs> amine: Yeah, it's for nonblocking IO. It's pretty badass.[00:55:07] <svm_invictvs> amine: Also, I think dmlloyd wrote a library that gives java more unix-like IO functionality.[00:55:22] <dmlloyd> ~~amine xnio[00:55:23] <javabot> amine, xnio is an NIO replacement framework, which keeps Channels but does away with Selectors, developed by ##java's very own dmlloyd. The project can be found at http://www.jboss.org/xnio - have fun![00:55:24] <dmlloyd> :)[00:56:06] <svm_invictvs> 20k connections sounds reasonable for a big time server app, no?[00:56:15] <svm_invictvs> like for an enterprise server app.[00:56:27] <svm_invictvs> I mena, we get much much more than that here.[00:56:28] <aceofspades19> its OVER 9000 connections[00:56:59] <svm_invictvs> aceofspades19: huh?[00:56:59] <tazle> svm_invictvs: 20k on-going connections certainly, but establishing 20k connections per second sounds fantastic[00:57:14] *** pirho has quit IRC[00:57:15] <amine> sorry, I'm writing down all these links.. still reading bearded_oneder's first one. I don't really know about sockets in java, or multithreading in java as I'm reading a book (thinking in java) and haven't arrived there yet, still got a couple hundred pages until I reach concurrency. Bear with me :P[00:57:34] <svm_invictvs> amine: read about Channels, selectors and xnio[00:57:36] <tazle> ~jcip[00:57:37] <javabot> tazle, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/[00:57:41] <svm_invictvs> and jcip[00:57:43] <svm_invictvs> good book[00:58:05] <bearded_oneder> amine -> the folks at resin claim to beat NIO performance with JNI calls to low level I/O, but that appraoch is a bit too masochistic to me.: http://pceye.com.cn:8080/resin-doc/performance/faq.xtp[00:58:06] <amine> The main reason I want to do it in java is because of the gc to avoid any memory leaks[00:58:32] <svm_invictvs> amine: java can leak memory.[00:58:41] <dmlloyd> if you code to XNIO then you can later plug in JNI implementations (when they're done)[00:59:07] <amine> svm_invictvs, sure, but it probably won't be as often or as bad as c or c++ do, and won't be as hard to find[00:59:24] <svm_invictvs> amine: that's a myth.[00:59:32] <amine> svm_invictvs, which part?[00:59:39] <svm_invictvs> amine: what you just said.[01:00:05] <svm_invictvs> amine: Garbage collection is not somethingyou can rely on as some magic wand for memory management.[01:00:19] <svm_invictvs> You have to think about responsible resource usage.[01:00:53] <tazle> svm_invictvs: it's just the magic wand that takes away the resources you don't use anymore[01:01:01] <amine> I know, but when push coems to shove and resource need to be cleared, I could call System.gc() (I think that's the function) or let it be done automatically instead of just keep using up memory until it starts page, and then some[01:01:03] <tazle> svm_invictvs: well, memory resources anyway[01:01:51] <amine> It's not like I'll be manually allocating memory, so gc should help clear out anything that isn't used anymore (eventually)[01:02:32] <amine> .. at least that is what I've read[01:02:36] <amine> I could be wrong[01:02:41] *** kibibyte has quit IRC[01:03:02] <svm_invictvs> tazle: and if you know the proper idoms of memory management in C++ and you dont' deviate from well established practices you can manage memory very effectively.[01:03:13] <bearded_oneder> amine -> finally, Grizzly is a NIO framework, designed "to help developers to build scalable and robust servers using NIO": https://grizzly.dev.java.net/[01:03:14] <svm_invictvs> amine: yeah[01:03:27] *** Fiberchunks has joined ##java[01:03:38] <tazle> svm_invictvs: certainly[01:03:38] *** robd has quit IRC[01:03:43] <prophet05> Is there any example/tutorial how JFace TreeViewer as a TableTree?[01:03:46] <svm_invictvs> btw, our servers get millions of concurrent connections, so 20k connectsion isn't unreasonable.[01:04:06] <tazle> svm_invictvs: which servers would those be?[01:04:11] <svm_invictvs> tazle: www.veoh.com[01:04:31] <svm_invictvs> I think we have 60 servers, tho[01:04:46] <amine> svm_invictvs, is there a shared database between these servers?[01:04:56] *** pietia has quit IRC[01:05:04] <tazle> svm_invictvs: that's some tens of thousands of concurrent connections per server[01:05:09] <svm_invictvs> amine: I think so, theres an oracle cluster.[01:05:12] <svm_invictvs> tazle: yeah[01:05:21] <tazle> svm_invictvs: which is entirely reasonable, as long as everyone doesn't connect at the same time[01:05:34] <amine> We could have multiple servers, but I've never done shared databases before so I wouldn't know where to begin[01:05:47] <svm_invictvs> amine: We have different databases for different htings[01:05:53] <tazle> svm_invictvs: even a modern desktop PC handles tens of thousands of connections with one message per second per connection[01:05:59] <svm_invictvs> we also have a shit load of data in hadoop[01:06:00] <amine> bearded_oneder, thank you lots[01:06:08] *** woogley has joined ##java[01:06:17] * bearded_oneder nods[01:06:22] *** armyriad has joined ##java[01:07:17] *** bashoh has joined ##java[01:08:41] *** multi_io has quit IRC[01:08:53] <amine> thanks everyone[01:09:03] <r0bby> hey[01:10:08] * bearded_oneder mocking Keanu Reeves, "hey".[01:10:40] <svm_invictvs> r0bby: hey[01:11:01] <amine> .. is for horses[01:11:11] <r0bby> no that's hay.[01:11:17] <r0bby> Common mistake.[01:11:59] <amine> I have text-to-speech so it sounds the same to me[01:14:00] *** shadewind has joined ##java[01:14:15] *** toytoy has joined ##java[01:16:02] *** siyb has quit IRC[01:16:37] *** Wicked has quit IRC[01:16:38] *** Imaginativeone_ has quit IRC[01:16:40] *** Haris` has joined ##java[01:17:07] <Haris`> I'm new to Java.[01:17:18] <Haris`> And I would like to express my opinion about it in one line.[01:17:20] * Haris` loves Java[01:17:22] <Haris`> :D[01:17:33] <Haris`> Java Programming[01:17:41] <chowmeined> lol[01:18:12] <Haris`> Hehe.[01:20:33] *** waz is now known as Guest34529[01:20:45] <kavon> i'm a big fan of Java too, wonderful little country[01:21:40] <Haris`> kavon: I'm glad to be a part of the community. :D[01:21:45] *** Meshezabeel has joined ##java[01:22:14] * kavon thinks Haris` missed his joke.[01:22:30] <svm_invictvs> protected void finalize() {shutdown();}[01:22:30] <svm_invictvs>[01:22:38] <svm_invictvs> DOULBE-YOU-TEE-EFF![01:23:12] <aceofspades19> I dislike how in java there are no destructors[01:23:27] <Meshezabeel> I can set the minimum and maximum size of a JFrame, When I try to resize a JFrame smaller, it won't let me, but when I try to make it larger, it lets me. How do I dissallow resize larger than the maximum size?[01:24:16] * bearded_oneder just got svm_invictvs' "DOULBE-YOU-TEE-EFF".[01:24:29] <bearded_oneder> svm_invictvs -> poking fun at the aolbonics police?[01:24:35] <kavon> Meshezabeel: JFrame.setMinimumSize(new Dimension(x, y));[01:25:00] *** ernimril has quit IRC[01:25:05] <kavon> Meshezabeel: change minimum to maximum for that option[01:25:30] <Meshezabeel> kavon: no, that does not work, I am still able to resize the frame to a larger size[01:26:13] <svm_invictvs> bearded_oneder: heh[01:26:18] <svm_invictvs> another one that's tons of fun:[01:26:22] <svm_invictvs> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d9f01d3, pid=2668, tid=1992[01:26:55] *** Yustme has quit IRC[01:27:45] <kavon> Meshezabeel: JFrame.setMaximizedBounds(new Rectangle(x, y));[01:27:48] <kavon> Meshezabeel: try that[01:28:26] <kavon> Meshezabeel: that keeps you from dragging it larger, maybe the other one keeps you from maximising with the button to fullscreen to a certian size[01:29:13] *** amine has quit IRC[01:29:25] <svm_invictvs> You know I dont' see a specific problems with this code[01:29:42] <svm_invictvs> but I seee alot of multithreaded code w/o any usage of thread-safe practices[01:29:53] <svm_invictvs> eg, synchronized, or concurrent queues[01:30:01] <svm_invictvs> er, concurrent data structures.[01:30:44] *** scorchsaber_ is now known as scorchsaber[01:31:40] <kavon> svm_invictvs: that could be dangerous to your health[01:32:39] <Meshezabeel> kavon: that more or less works, thanks. The only problem is that it seems that setMaximumSize includes the Window Decoration (title bar etc.) and setMaximizedBounds does not, so if I set both to 800x600, MaximizedBounds size is slightly larger than MaximumSize.[01:34:09] <kavon> Meshezabeel: i thought setMaximumSize didn't work earlier?[01:34:42] <svm_invictvs> I love this solution...[01:35:03] <svm_invictvs> Just use maven-shade-plugin for everything so there's 30 billion classes in your jar[01:35:20] *** prophet05 has quit IRC[01:37:30] <Meshezabeel> kavon: sorry, I mean setMinimumSize will set it to 800x600 when I issue a pack(), setMaximizedBounds is also set to 800x600, but will enlarge it slightly more than 800x600 because it does not take into account the window decoration.[01:38:13] <kavon> Meshezabeel: why are you setting the maximum and minimum size of the frame to the same value?[01:38:22] *** sin_tax has left ##java[01:39:08] *** metatheorem has joined ##java[01:39:08] <kavon> Meshezabeel: if you don't want the user changing the size, use JFrame.setSize(x, y) and JFrame.setResizable(false)[01:39:14] <Meshezabeel> kavon: Just doing some experimentation right now to see if it stopped me from resizing it, which it does not[01:39:46] *** Haris` has quit IRC[01:40:25] <Meshezabeel> I still find it strange that both setMinimumSize and setMaximizedBounds both operate on a JFrame, but one includes the window decorations in the size, and the other does not. It doesn't make sense to me.[01:40:50] *** svm_invictvs is now known as big_daddy[01:41:09] *** big_daddy is now known as svm_invictvs[01:41:19] *** vbabiy has joined ##java[01:41:32] *** ilyak has quit IRC[01:41:47] *** svm_invictvs has quit IRC[01:42:18] <Meshezabeel> thanks kavon, setResizable will work for now anyhow[01:42:21] <kavon> Meshezabeel: http://java.sun.com/javase/6/docs/api/java/awt/Component.html#setMaximumSize(java.awt.Dimension)[01:42:32] <kavon> Meshezabeel: http://java.sun.com/javase/6/docs/api/java/awt/Frame.html#setMaximizedBounds(java.awt.Rectangle)[01:43:27] *** omaru has quit IRC[01:44:15] <kavon> Meshezabeel: one is from component, which jframe inherits (i think thats the correct term)[01:44:27] <kavon> Meshezabeel: other is jframe only[01:46:08] <r0bby> inheritance++[01:46:12] <r0bby> it's the way to get rich.[01:46:43] <kavon> r0bby: easiest*[01:47:27] <kavon> man i've downed 2 diet cherry vanilla Dr Peppers already, i needs MORE[01:47:31] <Meshezabeel> okay, thanks kavon :)[01:49:22] *** zophy has quit IRC[01:49:33] <r0bby> kavon: Jolt.[01:49:36] <r0bby> red bull[01:49:42] *** zophy has joined ##java[01:49:58] <kavon> r0bby: i want something tasty, i don't need that much caffeine[01:50:12] <r0bby> ?!?!?![01:50:30] <Meshezabeel> get some miracle fruit then down an iced tea ;)[01:50:31] <kavon> r0bby: have you TRIED cherry vanilla dr pepper?[01:52:14] *** shadewind has quit IRC[01:52:18] *** niarbtfel has joined ##java[01:52:40] <Meshezabeel> is there such a thing as Cherry Vanilla Dr. Pepper, or are you mixing your drinks?[01:54:06] <kavon> Meshezabeel: oh there is[01:54:14] <kavon> Meshezabeel: http://en.wikipedia.org/wiki/Dr_Pepper[01:54:24] <kavon> Meshezabeel: check the column on the right, under Variants in the box[01:55:40] *** JGarrido has quit IRC[02:02:43] *** scorchsaber has quit IRC[02:02:55] *** taraskostiak is now known as taras[02:03:03] *** taras is now known as taraskostiak[02:03:11] *** thunderbolt has joined ##java[02:03:38] *** thunderbolt has left ##java[02:05:26] *** scorchsaber_ has joined ##java[02:05:29] *** JordanG has quit IRC[02:05:42] *** JordanG has joined ##java[02:06:02] *** skoskav has quit IRC[02:11:54] *** ejb has quit IRC[02:14:35] <Shirik> Okay, strange question. I'm not sure if I'm going crazy or what, but I'm getting a NullPointerException on the highlighted line, but the only way I see that should happen should be if "refs" is null, right? http://java.pastey.net/105347[02:15:36] <Shirik> Um, sorry... ignore me. That error was from yesterday and has already been fixed >.> I think I need to go drink some more[02:16:21] * cheeser bows.[02:16:51] *** amz has quit IRC[02:17:50] <Meshezabeel> Shirik: maybe you need some Cherry Vanilla Dr. Pepper ;)[02:21:59] *** lresende has quit IRC[02:23:27] <r0bby> cheeser! :)[02:23:31] <r0bby> I lub you[02:23:41] <r0bby> in a non sexual way I mean.[02:24:09] <zomg> How could it be sexual when "lub" isn't even a word to begin with? ;)[02:24:41] <_W_> might be an abbreviation of "lube"[02:25:16] <zomg> humbug[02:25:36] <r0bby> it is[02:25:40] <zomg> no 1 uses abbrevs on irc[02:25:41] <zomg> *cough*[02:25:58] <r0bby> zomg: don't make me get my spork out.[02:26:12] <zomg> *grabs his sporkfe* EN GARDE![02:26:36] *** LinuS has quit IRC[02:26:46] <cheeser> r0bby: what'd I do this time?[02:27:11] <r0bby> cheeser: nothing[02:27:27] <r0bby> Must you always do something to warrant my ass kissing? :P[02:30:22] *** amz has joined ##java[02:31:57] *** IceW has joined ##java[02:33:46] *** scorchsaber_ has quit IRC[02:35:19] *** kab has quit IRC[02:35:28] *** twolf has joined ##java[02:37:35] *** shadewind has joined ##java[02:39:21] *** IRAQI` has joined ##java[02:39:29] *** Meshezabeel is now known as Meshezabeel-away[02:39:57] *** aksn has joined ##java[02:40:06] *** werdan7 has quit IRC[02:40:13] *** svm_invictvs has joined ##java[02:40:56] *** schasi has joined ##java[02:42:57] *** linear` has quit IRC[02:43:08] *** flippo has joined ##java[02:43:41] *** HideousNashimoto has joined ##java[02:43:43] <HideousNashimoto> HEy[02:43:50] <HideousNashimoto> Weird, How I didn't autologin[02:44:27] *** pragma_ has joined ##java[02:49:25] *** kab has joined ##java[02:50:40] *** gyroscope has quit IRC[02:50:49] *** linear` has joined ##java[02:52:00] *** pierrep has quit IRC[02:57:56] *** HideousNashimoto has quit IRC[02:58:59] *** scorchsaber_ has joined ##java[03:00:10] *** ml- has quit IRC[03:01:18] *** Razec has quit IRC[03:02:48] *** amz has quit IRC[03:04:03] *** Goundy has joined ##java[03:04:55] *** TooAngel has quit IRC[03:08:42] *** MarkT- has joined ##java[03:08:46] *** teralaser has joined ##java[03:09:12] <MarkT-> What happens when an older compiler comes to an @Override annotation? Will it puke on it? Or ignore it?[03:10:36] *** mbroeker has quit IRC[03:10:42] <Shirik> It would have to be a very old compiler, but it will basically go "wtf is this" and spit up errors[03:11:20] <MarkT-> well, say 1.4[03:11:52] <Shirik> I consider that very old :)[03:12:06] <Shirik> but maybe I'm just optimistic about upgrades[03:12:17] <MarkT-> hmmm...[03:13:04] <MarkT-> so that makes a good argument for not using annotations... in case somebody wants to compile it with a previous version of the compiler.[03:14:52] <MarkT-> that sorta bites..[03:15:35] *** MarkT- has quit IRC[03:16:21] *** fr33m4n has quit IRC[03:17:47] *** lordmetroid has joined ##Java[03:18:09] *** Absolute0 has quit IRC[03:18:22] <lordmetroid> Is it stupid to import java.io.* rather than just the specific classes I need to use?[03:18:48] <Shirik> Most people, including myself, argue against "star imports" as being poor practice[03:18:59] <Shirik> i.e., import java.io.InputStream, etc.[03:19:06] *** ejb has joined ##java[03:19:08] <lordmetroid> why?[03:19:29] <Shirik> Using a star import is lazy and can set yourself up for trouble, e.g., when two packages have the same named class[03:20:02] *** Goundy has quit IRC[03:20:02] *** toytoy has quit IRC[03:20:02] <Shirik> And with today's IDEs that can auto-import for you, there really isn't a good argument to say that it takes too much time, imho[03:20:31] <bearded_oneder> lordmetroid -> the compiler only compiles the classes you actually use anyway. imports just tell the compiler where to look for symbols.[03:20:37] *** werdan7 has joined ##java[03:20:38] <lordmetroid> ok...[03:21:03] <Shirik> You won't see any runtime difference, but it's argued as just being sloppy[03:22:24] *** jisatsu has quit IRC[03:24:09] <bearded_oneder> lordmetroid -> aside from purist notions of good form, the only real concern is as Shirik said, anem collision, but that's easily remedied by just using the fully qualified class name in such cases (e.g. javax.swing.JPanel instead of just JPanel).[03:24:18] <bearded_oneder> name*[03:24:56] <lordmetroid> mmm[03:25:31] <Shirik> It can also help in reading code. E.g., if I have 10 import foo.*; statements, and then I do "Bar bar;" and I want to go find out what Bar is, it may be difficult to find out exactly where Bar comes from (though most of todays IDEs can figure that out for you)[03:25:56] *** Athenon has quit IRC[03:27:12] *** TooAngel has joined ##java[03:28:30] <lordmetroid> alright, I think I'll keep importing everything even though the IDE does it for me, cause I just like it better[03:28:30] <Shirik> lordmetroid, given that most IDEs have a capability like this, it is hard to argue that you're saving time by using a star import :) http://images.gammatester.com/pics/51fe337bd7774963270c38f70aba0ae4.jpg[03:29:20] *** vbabiy has quit IRC[03:29:20] *** adam-_- has quit IRC[03:32:40] <lordmetroid> Yes I am using eclipse but I just prefer *[03:33:13] <Shirik> so long as you don't have a boss that tells you not to do that, that's your perogative :)[03:33:22] <lordmetroid> I like that[03:33:58] *** macdaddy has joined ##java[03:36:29] <bearded_oneder> lordmetroid -> to further illustrate Shirik's point about IDE automation, in this example, i type, "InputS" and press [Ctrl]+[Space], [Enter]. The IDE automatically adds all of the code that i've commented with "//IDE added": http://pastebin.com/d28b3fa98[03:36:42] *** Dalila has joined ##java[03:38:56] *** schasi has quit IRC[03:40:03] *** userek has quit IRC[03:48:01] *** lordmetroid has quit IRC[03:49:18] *** nvictor has joined ##java[03:49:50] *** nvictor has left ##java[03:55:21] *** werdan7 has quit IRC[03:57:06] *** aTypical has joined ##java[04:03:32] *** CodeWar has joined ##java[04:03:45] *** mike8901 has joined ##java[04:04:22] <mike8901> javachannel.net is down :O[04:04:32] *** johannesh has joined ##java[04:04:49] <pr3d4t0r> mike8901: No, it's not.[04:05:09] <mike8901> Hmmm - not loading for me and pinging it doesn't work.[04:05:16] <pr3d4t0r> mike8901: Hrm...[04:05:23] <pr3d4t0r> mike8901: I know the server is up.[04:05:28] <pr3d4t0r> mike8901: Or I wouldn't be here :)[04:05:33] <mike8901> :P[04:05:41] <mike8901> I'm using OpenDNS[04:05:51] <mike8901> PING javachannel.net (74.0.125.28): 56 data bytes[04:06:07] <pr3d4t0r> mike8901: Ping is disabled. I don't like ICMP pings ;)[04:06:13] <mike8901> ah[04:06:27] <mike8901> working now[04:06:27] <mike8901> hmm[04:07:05] <pr3d4t0r> ~is the server up?[04:07:05] <javabot> http://istheserverup.net[04:07:11] <pr3d4t0r> mike8901: ^^^^^^^[04:07:19] <mike8901> hmm darn that page is taking a while to load too[04:07:39] *** exbio has joined ##java[04:07:43] <mike8901> the weird thing is it's not like the page is slow to load the content - it's like there's a huge amount of latency and then it finally loads[04:07:49] <pr3d4t0r> mike8901: I'd check my own connectivity.[04:08:03] <pr3d4t0r> mike8901: I know the server is up and very responsive because I'm here ;)[04:08:10] <mike8901> yep :P[04:08:10] <mike8901> well[04:08:11] <mike8901> anyway[04:08:15] <pr3d4t0r> mike8901: So are a number of other ##java denizens.[04:08:26] <pr3d4t0r> mike8901: http://istheserverup.net and check the time to respond.[04:08:45] <pr3d4t0r> mike8901: The server is up and responding to web browser (http) requests in 1.370 milliseconds.[04:08:47] <mike8901> 0.940 ms :)[04:08:56] *** daedra has joined ##java[04:08:57] <pr3d4t0r> mike8901: I'd go bitch at my ISP :*[04:09:01] <mike8901> my ISP is awesome[04:09:04] <pr3d4t0r> OKi, Happy New Year peepz.[04:09:10] <mike8901> if anything, it's my router[04:09:19] <mike8901> or my ethernet wiring[04:09:35] * CodeWar /clears his screen[04:09:38] <mike8901> anyway[04:09:57] <daedra> my method overload only needs one line changed - is there any way I can save repeating code?[04:10:08] <mike8901> sorry if this is off topic - but what framework(if any) would you guys recommend for building a scalable web application(in Java, obviously)?[04:10:19] <pr3d4t0r> mike8901: Wicket.[04:10:30] <pr3d4t0r> mike8901: Robust and fast development.[04:10:34] <mike8901> scalable?[04:10:35] <r0bby> grails *duck* ...though not sure if that scales[04:10:37] <daedra> I could make a subclass and do overriding...[04:11:05] <pr3d4t0r> mike8901: Very much so. We're slamming it with a few hundred thousand sessions/day on only 3 servers in production right now, just fine.[04:11:17] *** CodeWar has quit IRC[04:11:25] <pr3d4t0r> Anyway...[04:11:29] <pr3d4t0r> javabot: r0bby++[04:11:29] <javabot> r0bby has a karma level of -7, pr3d4t0r[04:11:34] <pr3d4t0r> r0bby: Happy New Year, Bob.[04:11:35] <pr3d4t0r> :)[04:11:45] <r0bby> don't take this the wrong way: bite me.[04:11:57] <r0bby> I hate 2008 with a passion.[04:12:01] <whaley> r0bby: go suck a turdbreath[04:12:13] <mike8901> pr3d4t0r: I take it wicket isn't particularly friendly towards AJAX.[04:12:13] <flippo> r0bby, and 2008 hated us.[04:12:15] <r0bby> whaley: bite me too :)[04:12:22] <r0bby> flippo: apparently so :)[04:12:30] *** daedra has left ##java[04:12:38] *** Angel-SL has joined ##java[04:12:46] <johannesh> r0bby is actually online[04:12:46] <whaley> mike8901: it is fine with ajax, based on what little I know about it[04:13:11] <r0bby> mike8901: wicket can use ajax...[04:13:20] <mike8901> whaley: the reason I make that comment: "refreshing lack of XML," "plain Java and HTML"[04:13:22] <r0bby> in fact javabot's admin web ui uses it.[04:13:27] <johannesh> I thought that IRC party was a joke.[04:13:36] <r0bby> johannesh: like you?[04:14:06] <flippo> IRC parties lack something I expect from most parties.[04:14:10] <johannesh> Touché[04:14:18] <r0bby> flippo: booze?[04:14:24] <r0bby> tail?[04:14:37] <r0bby> the ability to punch people in the face?[04:14:46] <r0bby> family fights (if it's a family party)[04:15:02] <johannesh> r0bby: Don't worry, I'm just drunk.[04:15:06] <r0bby> (all of the above in some cases)[04:15:14] <r0bby> johannesh: oh that's perfect, come here.)[04:15:16] <r0bby> :>[04:15:31] *** daedra has joined ##java[04:15:33] <r0bby> Okay, i seriously have to stop flirting with the regulars, it's creepy[04:15:48] *** teralaser has quit IRC[04:16:07] *** daedra has left ##java[04:16:52] <aTypical> r0bby, you've always been creepy.[04:17:11] <r0bby> so you just tell me this now?[04:17:43] <aTypical> I guess I just hoped a self-realization would come your way.[04:18:05] *** exbio has quit IRC[04:18:10] *** javahorn has joined ##java[04:18:44] <r0bby> It never does[04:19:05] <r0bby> Since cats out the bag now, come here[04:19:10] <r0bby> I have some candy[04:19:26] <flippo> I'm so glad I've never seen your picture, r0bby[04:19:41] <flippo> At least I don't have to visualize.[04:20:06] * aTypical reaches for the candy.[04:20:11] <r0bby> pr3d4t0r has[04:20:19] * johannesh is listening.[04:20:22] <flippo> In any event, a ideal party should involve dancing. Ascii dancing doesn't cut it.[04:20:30] <r0bby> he's on my facebook.[04:20:36] <r0bby> as is joed and cheeser[04:20:51] <r0bby> and i believe whaley is as well[04:20:55] <r0bby> I'm quite sexy[04:21:07] * johannesh coughs[04:21:10] <aTypical> r0bby, can I be on your facebook?[04:21:28] <r0bby> waiiit johannesh == joed[04:21:37] <johannesh> Barely.[04:21:43] <r0bby> okay[04:21:44] *** abebae has quit IRC[04:21:46] <r0bby> sure find me :P[04:22:20] <r0bby> you actually have my full name already if you're not incredibly stupid :>[04:24:21] <aTypical> I see the name, but there are so many of you. ;-)[04:25:20] <johannesh> Anonymous.[04:25:45] <r0bby> aTypical: next piece of info: Poughkeepsie,NY[04:26:07] <r0bby> my secondary network.[04:27:19] *** epswing has quit IRC[04:30:54] *** kab has quit IRC[04:31:03] *** exbio has joined ##java[04:31:34] <aTypical> Can't find anyone by that name/location. I guess I'll just have to harass you here. ;-)[04:31:57] <johannesh> He's clever, isn't he.[04:32:10] <aTypical> Which he?[04:32:33] <johannesh> The r0bbyhe.[04:32:40] <r0bby> :P[04:33:16] *** rainmann has joined ##java[04:37:49] *** exbio has quit IRC[04:42:43] <aTypical> OK, I'm tired. johannesh, sing me a song.[04:42:48] *** ovnicraft has left ##java[04:43:01] * johannesh sings a song. -.-[04:43:17] * aTypical swoons[04:43:26] *** Angel-SL has quit IRC[04:43:42] *** Angel-SL has joined ##java[04:49:18] *** Infinito- has joined ##java[04:55:08] *** scorchsaber_ has quit IRC[04:55:24] *** nmatrix9 has joined ##java[04:56:13] *** werdan7 has joined ##java[04:58:47] *** scorchsaber_ has joined ##java[04:59:17] *** aksn has quit IRC[05:00:44] *** bitcrave has quit IRC[05:02:49] *** Kwitschibo has quit IRC[05:03:28] *** javahorn has quit IRC[05:06:03] *** junmin has quit IRC[05:07:21] *** werdan7 has quit IRC[05:09:58] *** werdan7 has joined ##java[05:13:42] *** Infinito- has quit IRC[05:14:42] *** woogley has quit IRC[05:19:17] *** aTypical has quit IRC[05:23:30] *** Fiberchunks has quit IRC[05:28:06] *** pragma_ has quit IRC[05:29:52] *** pragma_ has joined ##java[05:30:51] *** giantrobot has joined ##java[05:31:57] *** IRAQI` has quit IRC[05:39:02] *** omaru has joined ##java[05:42:45] *** tokemonstah has joined ##java[05:46:59] <r0bby> I really do love IntelliJ IDEA[05:48:18] <chowmeined> whats the commonly used design strategy for tcp network clients in java[05:49:18] <chowmeined> some framework built on nio[05:50:08] *** Laurus has joined ##java[05:51:02] <Laurus> If in a method signature I put a return type of String, and then in that method I write "return null;" the code still compiles. Does this mean null is a String?[05:51:27] <FauxFaux> That causes a NPE.[05:51:48] <rainmann> no it doesn't[05:51:50] *** tokemonstah has quit IRC[05:52:11] <rainmann> Laurus, yes null is a bottom type - assignable to any reference type, including String[05:52:27] <r0bby> Laurus: why not?[05:52:33] <r0bby> a String is a reference type.[05:53:37] <Laurus> rainmann: So I could put any return type in the method signature and it would be fine if it returned null?[05:53:45] <rainmann> Laurus, any reference type, yes[05:54:02] <Laurus> Okay thank you both :)[05:54:13] *** svm_invictvs has quit IRC[05:54:17] <r0bby> public Object foobar() { return null; }[05:54:24] <r0bby> also valid :)[05:54:30] *** CardinalFang has quit IRC[05:55:08] <Laurus> r0bby: Heh, interesting ;)[05:55:46] <Laurus> Thank you very much :) Take care.[05:55:50] <Laurus> Happy New Year![05:55:58] *** svm_invictvs has joined ##java[05:56:24] *** Laurus has left ##java[05:59:01] *** Dalila has quit IRC[06:00:10] *** metatheorem has quit IRC[06:03:32] <kavon> HAPPY JANUARY 1ST EVERYONE[06:04:03] <flippo> Oh no, my bus pass expired.[06:04:16] <tazle> "everyone" in some parts of US anyway[06:04:37] <kavon> flippo: lol[06:06:17] <scorchsaber_> tazle: It is January 1st for the majority of the humans on the planet, sir.[06:06:51] <tazle> scorchsaber_: well, yes, but there's no point in wishing "Happy January 1st" at 4 PM, now is there?[06:07:23] <whaley> new years is a crock of a holiday[06:07:32] <whaley> can we please get back on topic[06:07:38] <scorchsaber_> tazle: Sure there is, if it's the first time you've seen the person you're saying it to that day.[06:07:46] <scorchsaber_> Yes, we can.[06:07:46] <scorchsaber_> My mistake.[06:09:29] <r0bby> Okay a crap year is over, time to starta new crap year[06:09:32] <r0bby> moving on[06:09:44] <pragma_> r0bby: stfu[06:09:52] *** ejb has quit IRC[06:09:55] <r0bby> Now I need to stick to my plan to not be a tool[06:09:59] <r0bby> except to pragma_[06:10:08] <r0bby> he's gonna be my new pet project to be a total tool towards[06:10:19] * pragma_ status.[06:10:39] * pragma_ has gained a level.[06:16:43] *** wywen has joined ##java[06:19:46] *** woogley has joined ##java[06:20:16] *** javawizard2539 has joined ##java[06:21:20] <kavon> how do i check my karma level[06:21:29] <kavon> and other people's karma[06:25:17] <m0> javabot: kavon[06:25:18] <javabot> m0, I have no idea what kavon is.[06:25:21] <m0> javabot: kavon++[06:25:25] <javabot> kavon has a karma level of 3, m0[06:25:39] <kavon> yearg there it is[06:27:56] *** rudenstam is now known as rudenstAm[06:28:43] <scorchsaber_> I should try that trick.[06:28:44] <javawizard2539> javabot: karma kavon[06:28:44] <javabot> kavon has a karma level of 3, javawizard2539[06:29:01] <javawizard2539> You can check karma by using "javabot: karma" without having to change it[06:29:17] <javawizard2539> m0, kavon: ^[06:29:37] <kavon> javawizard2539: thanks you good wizard sir[06:29:43] <javawizard2539> :D[06:29:45] <javawizard2539> no problem[06:30:11] <kavon> so, would the KDE guys get mad if I used their Oxygen icons in my program? how should I give them credit?[06:30:26] <javawizard2539> See what license they are under[06:30:27] <kavon> or can I not even do that? does it have to be open source if i do this?[06:30:30] <kavon> GPL[06:30:43] <javawizard2539> Then I think you can use them (without crediting them or anything)[06:30:59] <javawizard2539> You just can't change them or else you have to distribute the changed versions under the GPL as well[06:31:04] <javawizard2539> But don't take my word for it[06:31:45] <kavon> http://creativecommons.org/licenses/by-sa/3.0/[06:31:56] <kavon> there thats the 2nd lisence[06:32:06] <javawizard2539> But that's creative commons[06:32:11] <javawizard2539> Oh, is it creative commons sharealike?[06:32:16] <kavon> and GPL yes[06:32:20] <kavon> on the website[06:32:44] <kavon> seems i can do whatever i want as long as I don't claim its mine, i plan to give them credit[06:37:04] <javawizard2539> kavon: I think so[06:37:34] *** svm_invictvs has quit IRC[06:42:10] *** FireSlash has quit IRC[06:45:13] *** StaticShock has quit IRC[06:46:14] *** javawizard2539 has quit IRC[06:46:46] *** javawizard2539 has joined ##java[06:49:58] *** woogley has quit IRC[06:54:49] *** MyName has joined ##java[06:54:50] <MyName> hi[06:54:53] <MyName> happy new year[06:58:13] <r0bby> aw damn[07:01:30] <MyName> how are you tonight[07:02:02] <r0bby> good so long as you don't ask any stupid questions :)[07:02:15] <r0bby> by that i mean, tried googling :)[07:02:21] <r0bby> before asking :>[07:02:50] *** omaru has quit IRC[07:03:24] <r0bby> MyName: let's leave 2008 behind and be merry :)[07:03:31] * r0bby passes out drunk[07:03:50] <MyName> ok[07:03:56] <MyName> can i say something[07:04:39] <r0bby> So long as it's not something you've been told 5000 times sure[07:05:01] <kavon> lol[07:05:18] <r0bby> ie "How do i find out if I have a jdk installed"[07:06:49] * Shirik passes r0bby some champagne, seems like he needs it[07:07:49] *** cybereal has joined ##java[07:07:51] <r0bby> Shirik: I'm trying the approach don't be a tool[07:07:52] <MyName> Freddy Got Fingered is pure masturbation, and I'm sorry to say I mean that both literally and figuratively.[07:07:53] <r0bby> :)[07:07:57] <MyName> sorry wrong post[07:08:01] <MyName> i meant to say smething else[07:08:06] <r0bby> HAHAHA[07:08:13] <MyName> and while watching the curious case of benjamin button today in the theaters, i could not control myself, i cried. all the throughts about this past y ear, thoughts on life, on death, on love, all them gushed up and overwhelmed me, bested me....[07:08:13] <r0bby> totally irrelevent.[07:08:15] *** bindaas has joined ##java[07:08:21] <r0bby> MyName: again[07:08:27] <r0bby> how the FUCK is this java?[07:08:27] <MyName> that was what i wanted to say[07:08:33] <cybereal> ~~MyName blog[07:08:34] <javabot> MyName, Look, buddy, pal, friend: ##java is not your personal blog. Please take your inner thoughts, fears and ruminations back to the LiveJournal.[07:08:35] <MyName> wel its new year's eve[07:08:39] <r0bby> point?[07:08:43] <cybereal> so go be drunk in #perl where they can't tell[07:08:43] <MyName> i was overwhelmed with emotion/[07:09:12] <r0bby> cybereal: ouch that's an insult to perl programmers, whose programs look like they've been coded by a drunk[07:09:19] <r0bby> then again, that's any code I write[07:09:24] <cybereal> or maybe in #haskell where they get drunk by first selecting all the drinks they will drink then drinking the all at once at the end of the party[07:09:47] <r0bby> cybereal: or he could go to like...the nearest bar[07:09:54] <cybereal> or the furthest[07:10:00] <r0bby> that too.[07:10:10] <r0bby> preferably the furthest[07:10:15] <r0bby> cybereal: happy new year[07:10:20] <cybereal> hope so[07:10:25] <r0bby> Yeh me too[07:10:33] <r0bby> I hate 2008, it brought me great pain[07:10:35] <cybereal> another year of stating then completely abandoning some resolutions[07:10:47] <r0bby> I have one i can keep[07:10:51] <r0bby> Not be a tool here[07:10:55] <cybereal> 2008 wasn't that interesting for me, first year in like 6 years that I didn't get a raise, well technically I did but it was very small[07:11:05] <r0bby> I think I made a similar one last year[07:11:05] <cybereal> of course I got a huge one the year before but nevermind that :)[07:11:46] <r0bby> this time i intend on keeping it, cheesemeister is gonna kill me if I don't[07:11:51] <cybereal> heh[07:12:01] <cybereal> I need to get my bills paid, that's my only real resolution[07:12:03] <cybereal> pay off debt[07:12:15] <r0bby> pffft[07:16:55] *** nmatrix9 has quit IRC[07:21:35] *** exbio has joined ##java[07:22:04] <kavon> ok, what is the best way to refresh/update/redraw a JPanel[07:22:13] <kavon> i've run into this problem before :z[07:28:24] *** weilawei has joined ##java[07:32:43] <Fanook> panel.repaint() Unless you've added/removed components in which case you need to .revalidate() first[07:35:27] * r0bby smacks Fanook[07:35:31] <r0bby> happy new year[07:36:24] *** exbio is now known as exbio[a][07:36:26] *** johannesh has quit IRC[07:39:08] *** exbio[a] has quit IRC[07:39:22] *** exbio has joined ##java[07:40:46] *** bindaas has quit IRC[07:40:55] <Fanook> Happy Birthday![07:42:42] *** mele- has quit IRC[07:43:35] <r0bby> I'm not a new years baby[07:49:36] *** exbio has quit IRC[07:49:43] *** javawizard2539 has quit IRC[07:50:17] *** javawizard2539 has joined ##java[07:56:17] *** Guest34529 has quit IRC[08:09:56] *** svm_invictvs has joined ##java[08:10:09] *** noobraska has quit IRC[08:10:32] *** noobraska has joined ##java[08:12:01] *** noobraska has quit IRC[08:12:47] *** rainmann has left ##java[08:13:03] *** bindaas has joined ##java[08:15:13] *** Gracenotes has joined ##java[08:15:14] *** armyriad has quit IRC[08:15:29] *** antwaungomez has joined ##java[08:15:31] *** antwaungomez has left ##java[08:20:48] *** gloriaC991 has joined ##java[08:21:33] <gloriaC991> hi, i'm having trouble getting java web start to work on my computer. specifically, the arena on topcoder won't launch. i'm running OS X 10.5, and java 1.5.0_16[08:23:43] *** exbio has joined ##java[08:26:44] *** zophy has quit IRC[08:26:49] *** gloriaC991 has quit IRC[08:27:14] *** nvictor has joined ##java[08:27:28] *** TooAngel has quit IRC[08:27:44] *** nvictor has left ##java[08:38:19] *** bindaas has quit IRC[08:39:20] *** zophy has joined ##java[08:39:55] <chowmeined> bah, guice[08:40:27] *** hrehf has quit IRC[08:43:30] *** bashoh has quit IRC[08:50:35] *** bindaas has joined ##java[08:51:00] *** Wicked has joined ##java[08:51:51] <r0bby> chowmeined: ?[08:52:04] <chowmeined> r0bby, i dunno, im really tired and have gotten kind of lost[08:52:21] <chowmeined> im writing a tcp client (blocking sockets), so what i ended up with is 2 threads per socket[08:52:32] <r0bby> heh[08:52:33] *** MyName has quit IRC[08:52:39] <r0bby> and how does guice factor in?[08:52:39] <chowmeined> but when guice is doing dependency injection[08:52:49] <chowmeined> it wants to make a new instance of Socket for each stream[08:52:58] <chowmeined> instead of using input and output streams from a single socket[08:53:17] <r0bby> that's not quite how DI is used..[08:53:37] <r0bby> it's typically used to inject DAOS and Service classes[08:54:05] <chowmeined> oh[08:54:20] <chowmeined> i thought it was supposed to setup the whole graph[08:54:30] <r0bby> it COULD potentially be used that way[08:55:28] *** javawizard2539 has quit IRC[08:55:31] <chowmeined> hm[08:55:55] *** TooAngel has joined ##java[08:56:03] <chowmeined> ive seen the smaller guice samples[08:56:16] <chowmeined> but i need to look at how something with like 20 classes is put together[08:56:21] *** PRINCESS_FLUFF has quit IRC[08:56:34] *** yolkaplexus has joined ##java[08:59:18] *** PRINCESS_FLUFF has joined ##java[09:03:07] *** mbroeker has joined ##java[09:07:02] *** scorchsaber_ has quit IRC[09:11:20] *** Meshezabeel-away is now known as Meshezabeel[09:11:30] <Meshezabeel> Happy New Year!!![09:12:22] <Fanook> Happy New Beer![09:12:41] *** Xianny has quit IRC[09:12:49] <Meshezabeel> haha, I got pulled over by the cops tonight[09:14:07] <Fanook> congrats. You are officially at least as smart as the people on Cops[09:16:51] <kavon> i thought everyone got pulled over on new year's eve[09:20:31] <r0bby> only the idiots[09:20:46] <r0bby> Meshezabeel: no offense to you of course[09:21:01] <r0bby> o/[09:21:04] <r0bby> nini[09:25:33] *** kyusswren has quit IRC[09:28:13] *** bindaas has quit IRC[09:28:41] <Meshezabeel> haha, well they actually pulled everyone over that was going down a particular road, they let me go right away, but others they kept detained ;)[09:31:55] <Meshezabeel> the funny thing is they were pulling people over around 8pm asking if they had been drinking, I would have at least expected it a little later[09:33:16] <uttumuttu> mehezabeel, you must factor in the traffic density[09:34:16] <uttumuttu> perhaps there are vastly more people driving at 8pm than at 11pm (on new year's eve)[09:36:58] *** korisk has joined ##java[09:42:53] *** svm_invictvs has quit IRC[09:49:02] <Meshezabeel> uttumuttu: yeah, but most people probably would not have been drinking by 8pm, though I could be wrong[09:51:00] <Meshezabeel> I would have thought they'd be checking after midnight, I came home around 2ish, and never saw any 'road blocks'[09:51:51] <telexicon> whats the general strategy for writing tcp clients in java these days? non-blocking nio? thread for each socket? or 2 threads (one for each direction) ?[09:52:08] <telexicon> i wish i could find something online that was more than an introduction[09:53:22] <Meshezabeel> telexicon: you checked out the Java Trail on Custom Networking?[09:53:35] <telexicon> yeah thats an introduction[09:55:45] *** dmiles_afk has quit IRC[09:55:55] *** niarbtfel has quit IRC[09:56:57] <Meshezabeel> how advanced do you need it?[09:57:47] <telexicon> well the issue was, if its in one thread and im looping, it only works for a non-interactive (reactive) situation[09:57:59] <telexicon> because read() blocks, so it can only respond briefly then goes back to blocking[09:58:08] <telexicon> only when the server sends something[09:59:00] <telexicon> so whats the solution? i mean this must already be all done before[09:59:13] *** Kwitschibo has joined ##java[09:59:30] <cybereal> choosy moms choose NIO[09:59:55] <Meshezabeel> choosy moms?[10:00:28] *** dmiles_afk has joined ##java[10:00:46] <telexicon> its a joke based on a peanut butter ad[10:00:56] *** CodeWar has joined ##java[10:01:02] <Meshezabeel> ah, never saw the ad[10:01:13] <Meshezabeel> telexicon: would the bottom of http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html help you out?[10:01:49] *** bearded_oneder has quit IRC[10:02:14] <telexicon> the multithreaded server part?[10:02:21] <Meshezabeel> yes[10:02:31] <telexicon> no i understand that part[10:02:34] *** bLeniuS has joined ##java[10:02:43] <telexicon> im trying to write a client that doesnt hang[10:06:12] *** niarbtfel has joined ##java[10:06:35] *** korisk has quit IRC[10:07:20] <Meshezabeel> telexicon: and I suppose a Datagram method is not what you are after[10:07:35] <telexicon> no thats for udp[10:08:05] <telexicon> i guess my question is, am i supposed to use 2 threads on the client socket? one for the inputstream and one for the outputstream?[10:08:36] <cybereal> ~nio[10:08:37] <javabot> cybereal, nio is http://java.sun.com/javase/6/docs/technotes/guides/io/example/index.html and http://gee.cs.oswego.edu/dl/cpjslides/nio.pdf[10:09:43] <telexicon> ive heard there are some issues with nio, its complexity and difficulty with using ssl[10:09:59] <cybereal> jetty handles it fine[10:10:27] <telexicon> ok[10:12:33] <Meshezabeel> ~aot[10:12:33] <javabot> Meshezabeel, I have no idea what aot is.[10:13:33] *** scorchsaber_ has joined ##java[10:14:15] *** Copter has joined ##java[10:15:43] <CodeWar> took a stab at getting C#'s using in Java using anonymous inner classes this is the syntax using(IBalancedOp...).execute(new Predicate(){ void method(){....}});[10:15:55] <CodeWar> use case => http://eugeneciurana.com/pastebin/pastebin.php?show=38695 implementation => http://eugeneciurana.com/pastebin/pastebin.php?show=38696[10:16:28] <CodeWar> unlinke the C# version this guy can take multiple inputs and has both a before and after ( and is a lot uglier too )[10:18:38] *** scorchsaber_ is now known as scorchsaber[10:19:08] <Meshezabeel> well, have a good night all, see ya all in 2010 :)[10:19:15] <cybereal> 2010?[10:19:16] *** niarbtfel has quit IRC[10:19:52] <Meshezabeel> well, yeah, I guess 2009 for you guys[10:20:23] <cybereal> what, you live one year ahead of everyone else?[10:20:54] <Meshezabeel> well, yeah, long story, so see ya all in 2009 :)[10:21:55] <CodeWar> its a trick statement.. he knows there will be no 2010[10:22:03] *** exbio has quit IRC[10:22:22] <Meshezabeel> ah, you found me out CodeWar ;)[10:23:34] *** Meshezabeel has left ##java[10:27:07] *** pietia has joined ##java[10:30:54] *** Gracenotes has quit IRC[10:34:52] *** ruhaan_jslip has joined ##java[10:35:13] <ruhaan_jslip> hey is there a mobile java irc client?[10:48:17] *** wywen has quit IRC[10:54:13] <cybereal> yes[10:54:25] *** Yustme has joined ##java[10:54:31] <cybereal> but I fail to remember the name, so go back to google[10:54:36] *** niarbtfel has joined ##java[10:55:43] *** ruhaan_jslip has left ##java[10:59:36] *** Token- has joined ##java[11:00:32] *** Haris` has joined ##java[11:01:54] *** ruhaan_jslip has joined ##java[11:05:04] *** yolkaplexus has quit IRC[11:07:21] *** CodeWar has quit IRC[11:08:02] *** skoskav has joined ##java[11:12:46] *** Wicked has quit IRC[11:15:13] *** cactaur has quit IRC[11:19:19] *** Luno has joined ##java[11:19:26] *** adi112358 has joined ##java[11:21:48] *** toytoy has joined ##java[11:26:43] *** UUncia has joined ##java[11:31:36] *** EspenG has joined ##java[11:35:57] *** Gracenotes has joined ##java[11:42:08] *** pierrep has joined ##java[11:42:11] *** Haris` has quit IRC[11:43:39] *** ernimril has joined ##java[11:46:25] *** cratos has joined ##java[11:47:15] *** MacGyverNL_ has quit IRC[11:47:44] *** MacGyverNL_ has joined ##Java[11:49:02] *** timte has joined ##java[11:53:02] *** TooAngel has left ##java[11:55:17] *** cybereal has quit IRC[11:58:01] *** niarbtfel has quit IRC[11:59:37] <cratos> Hello, folks. Is there a preferred tool that takes in java source code and generates diagrams - class, sequence, activity ?[12:00:22] *** ruhaan_jslip has left ##java[12:00:37] <ernimril> cratos: not that I know of. Also realize that such a tool becomes unusable if your project has more than 10 classes[12:03:11] *** adi112358 has quit IRC[12:03:12] *** linear` has quit IRC[12:03:25] <ernimril> ~dia[12:03:25] <javabot> I guess the factoid 'applet diagnostics' might be appropriate:[12:03:26] <javabot> http://lakeaccess.org/classes/JavaTrouble.html[12:03:30] <ernimril> hmmm[12:03:51] <ernimril> cratos: dia/autodia could do the reverse a long time ago, not sure what it can do today[12:04:34] <cratos> ernimril: I've read about argoUML http://argouml.tigris.org/ - it supports reverse engineering from source code. looks complicated to use and there is scanty documentation.[12:04:59] <ernimril> ~argouml[12:04:59] <javabot> ernimril, argouml is a free, Java based UML editing tool. The project page exists at http://argouml.tigris.org/ and you can launch the latest version via Java Web Start with this url: http://argouml-downloads.tigris.org/jws/argouml-latest-stable.jnlp[12:05:15] <ernimril> cratos: yes, there is that one as well...[12:05:49] <ernimril> cratos: why do you not just use dia/argouml/visio and just draw the diagrams manually, but stick to the major classes/events/...[12:06:29] <cratos> ernimril: the code base is huge, i'd like if i could simply import the code and get the diagrams.[12:07:00] <ernimril> cratos: you realize that you would get like a billion pages if you get some program to work[12:07:41] <cratos> ernimril: :) yes.. argoUML has some filter support that helps us to decide which code paths need to be traced etc[12:07:47] *** M[]ssad has joined ##java[12:09:41] <ernimril> cratos: how big is "huge"? how many source files/classes?[12:11:10] *** linear` has joined ##java[12:11:14] *** Ruckus has quit IRC[12:11:52] <cratos> ernimril: its a internal project(very old codebase) and has ~1000 files including 4 components.[12:12:17] <ernimril> cratos: ok, almost small then :-)[12:12:23] <cratos> ernimril: :D[12:12:33] *** longbeach has quit IRC[12:13:13] *** Ruckus has joined ##java[12:13:18] *** pirho has joined ##java[12:13:26] *** longbeach has joined ##java[12:13:27] <ernimril> cratos: consider asking the developers that made the base to provide documentation[12:14:26] <cratos> ernimril: :) the friggin developers don't even have a proper HLD or FS![12:16:05] <ernimril> cratos: so get them to write some[12:16:42] *** whalberg has joined ##java[12:17:43] <longbeach> Happy new year to everyone ![12:19:28] *** Kwitschibo has quit IRC[12:21:40] *** skoskav has quit IRC[12:21:48] *** fr33m4n has joined ##java[12:26:25] *** hellues has joined ##java[12:26:29] <hellues> hey[12:27:02] <hellues> can you suggest any tutorial about arbitrary branching tree[12:27:15] <hellues> i cannot find any tutorial about that on google[12:31:42] *** whalberg has quit IRC[12:31:46] <cratos> ernimril: Just browsed through the AutoDia website - saw this comment "Java (some issues with version 1.4) no longer fully supported (it used to work, Java broke its API's now it doesn't, fixes welcome) "[12:31:50] *** cncfanatics has joined ##java[12:32:25] <hellues> cratos, do you know anything arbitrary branching tree[12:34:00] <cratos> hellues: did you mean a tree structure with an arbitrary branching factor?[12:34:18] <hellues> it must be[12:34:24] <hellues> yes it is[12:34:37] <hellues> can you suggest any tutorial for this subject[12:34:50] <hellues> basic tutorial[12:37:09] <cratos> hellues: there is a section on branching factor in Wikipedia. I see the page also lists a tutorial. Check it out.[12:37:54] <hellues> hmm tree branching factor[12:38:31] <cratos> hellues: if you describe a bit more on the tree structure and contraints, we might be able to help.[12:38:39] <cratos> constraints*[12:38:57] *** buntfalke has joined ##java[12:40:20] <hellues> hmm actually i dont know what is arbitrary branching.[12:40:43] <cratos> hellues: :D[12:40:57] <cratos> hellues: what is it that you wish to learn?[12:40:58] <hellues> ::D just i know it is about tree[12:41:26] <cratos> hellues: some context might help in understanding the concept.[12:41:34] <hellues> what is arbitrary branching what is it about ? i wonna learn all things about atribtrary branching :d[12:41:47] <hellues> where is such context[12:42:00] <hellues> i find an address http://www.google.com/url?sa=t&source=web&ct=res&cd=10&url=http%3A%2F%2Fmaxpedia.org%2Fcgi-bin%2Fmp%2Fm.pl%3Fla%3Den%26sw%3Dbranching%2Bfactor&ei=PatcSavZAsaC-gar8KzEDw&usg=AFQjCNGSaZGyjv_OyIZOqtk14_A7R4_hlQ&sig2=_1z5v2yvxwI-kqwWKAAJuw[12:49:15] <hellues> i need a tutorial arbitrary branching factore onn trere[12:51:01] *** richy has joined ##java[12:52:35] *** cratos has quit IRC[12:53:08] *** kakazza has joined ##java[12:53:26] <kakazza> Is this the right place to ask about Java Servlets for Apache Tomcat?[12:54:50] <cheeser> yes[12:56:27] <kakazza> Where can I read about the package naming convetions?[12:56:43] <hellues> radix sort is same with shell sort ?[12:57:10] *** positron2007 has quit IRC[12:57:11] <kakazza> Ah, nvm.[12:57:36] <kakazza> I think I fixed it (without having a clue why, go go trial-n-error developers!)[12:57:44] *** Stevko has joined ##java[12:59:54] <kakazza> I have another question. I am using ECS to format my output to proper HTML, do I still add \n and \t by puting exactly that into my servlet, or does ECS have something I can use to add tabs and newlines?[13:00:02] <kakazza> Basically, my output is now one long line[13:00:04] *** Stevko has left ##java[13:01:02] *** richy has quit IRC[13:08:32] *** defenderBG has joined ##java[13:08:40] <defenderBG> hi all[13:09:12] *** Aquanox has joined ##java[13:09:42] <defenderBG> now... i am writting a deamon (that means the System.err and System.out are taken down) and I use a self crafted logging tool to report all errors[13:10:35] <defenderBG> now... my problem is that when I want to exit the program, I need to close the report files as well, which throws an IOException[13:11:07] *** adam-_- has joined ##java[13:11:10] *** Tenac has quit IRC[13:11:17] *** aksn has joined ##java[13:11:29] <defenderBG> since I am closing the files, I cant report to them, because it is a deamon, I cant throw a message to the System.err[13:11:46] <defenderBG> and I am getting kind of confused of how to report the error[13:11:50] *** MacGyverNL_ has quit IRC[13:11:53] <defenderBG> anyone got an idea?[13:12:06] *** skoskav has joined ##java[13:14:48] *** MacGyverNL has joined ##Java[13:20:00] *** toytoy has quit IRC[13:21:06] <hellues> i cannot find anything about arbitrary braching factore on tree did you suggest one.Wikipedia doesnt have lots of thing.[13:22:53] *** Galik has joined ##java[13:23:12] *** hellues has quit IRC[13:33:13] <jottinger> morning[13:33:38] <jottinger> defenderBG: why is it throwing an exception?[13:34:13] *** taner_c has joined ##java[13:34:31] *** M[]ssad has quit IRC[13:35:23] <kakazza> ~pastebin[13:35:24] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.[13:35:57] <kakazza> Hi, does anyone know why this is failing? http://eugeneciurana.com/pastebin/pastebin.php?show=38697[13:36:02] <jottinger> what is it[13:36:08] <kakazza> Java Servlet[13:36:11] <kakazza> Using TOmcat[13:36:16] *** weilawei is now known as weilawei|awei[13:36:18] <jottinger> right, what's teh failure[13:36:21] <kakazza> I guess it's because of "Anzahl" or so.[13:36:30] <kakazza> You mean the error?[13:36:45] <jottinger> yes, no point in looking at the pastebin until there's more information[13:36:47] *** defenderBG has quit IRC[13:37:25] <kakazza> Sec[13:38:30] *** bLeniuS has quit IRC[13:38:36] <kakazza> I don[13:38:41] *** taner_c has quit IRC[13:38:46] <kakazza> 't exactly know how to get the error to show >_>[13:39:18] <jottinger> ew, that's a SQL Injection attack waiting to happen[13:39:24] <kakazza> D:[13:39:34] <kakazza> I am using ECS and all I get is my custom error message[13:39:41] <kakazza> I don't know how to get exc.printStackTrace(); to show[13:39:43] *** Razec has joined ##java[13:39:52] <jottinger> for one thing, one usually doesn't quote the column name once you've determined it[13:40:04] <jottinger> for another, use a preparedstatement[13:40:14] <jottinger> and ECS? Really? In 2009?[13:40:20] <kakazza> :x[13:40:24] <jottinger> Even the ECS developers don't use ECS any more :)[13:41:02] <kakazza> heh[13:41:37] <kakazza> So I removed all the "`" after the first declaration of "Anzahl"[13:41:51] <jottinger> not even sure you need that one[13:41:58] <kakazza> I need it in MySQL[13:42:19] <jottinger> but why aren't you testing this with a console-like DB interface like squirrel-sql or dbvisualiser?[13:43:05] <kakazza> I tested the query in MySQL console, if that's similiar[13:43:11] <jottinger> sure[13:43:22] *** CardinalFang has joined ##java[13:43:28] <jottinger> and did it work? Once it works there, translate it into a preparedstatement[13:43:40] <kakazza> It works there, yes[13:44:10] <jottinger> well, then you need to figure out what your servlet's doing wrong. Write a SIMPLE SERVLET that ignores ECS.[13:44:16] <kakazza> But I am not sure, maybe I am getting the "anzahl" parameter as a string?[13:44:37] <jottinger> It wouldn't matter, unless it wasn't a valid comparison in the SQL statement.[13:44:37] <kakazza> Ah, I am getting it as a string, bah...[13:44:40] <kakazza> String Anzahl = request.getParameter("Anzahl");[13:44:56] <jottinger> sure. but if the string is "4", the SQL is still valid.[13:45:04] <kakazza> Ah ok[13:45:07] <jottinger> oh, no it isn't - you're quoting it.[13:45:23] <kakazza> Ah[13:45:24] <jottinger> you really need to work on your exception handling. :)[13:45:44] <kakazza> So how do I get this to work before I work on my exception handling?[13:45:48] <kakazza> Get it as int?[13:45:59] <kakazza> Or don't quote it?[13:46:15] <Razec> hello all[13:46:16] <jottinger> no. 1) Convert to preparedstatement. 2) don't quote the parameter.[13:46:59] <kakazza> I have no idea what preparedstatement is, but what quoting is[13:47:03] <kakazza> gonna try 2) first :x[13:47:24] <jottinger> Sure, leave the SECURITY HOLE first.[13:47:27] * jottinger sighs[13:47:31] <kakazza> :x[13:47:42] <kakazza> Is the ' or the " the quoting which makes it fail?[13:48:08] <jottinger> which is being used to quote the parameter in the SQL?[13:49:05] <kakazza> The SQL statement is hardcoded to 3, no quoting there[13:50:23] *** Absolute0 has joined ##java[13:51:10] <kakazza> googling preparedstatements[13:57:22] *** Varox has joined ##java[13:59:57] <kakazza> jottinger - How do I split the preparedstatement into multiple lines? also like this? "pstmt += "next line of query"; ?[14:00:25] *** niarbtfel has joined ##java[14:01:00] <jottinger> you build the preparedstatement from a string[14:01:03] <Luno> you mean multiple queuries or ?[14:01:09] <jottinger> you just don't concatenate parameters into the string[14:01:24] <jottinger> PreparedStatement ps=conn.prepareStatement("select foo from bar "+[14:01:44] <jottinger> "where bar.baz>?"); ps.setInt(1, 4);[14:02:17] <jottinger> if the parameter is a string, SQL injection is impossible[14:02:42] <jottinger> so "select username from users where username=? and password=?" is a safe query, where[14:03:06] <jottinger> "select username from users where username='"+username+"' and password='"+password+"'" is not[14:03:27] <kakazza> Cool[14:03:42] <jottinger> since an attacker might try a username or password like "foo' or 'a'='a"[14:04:52] <kakazza> Like this? http://eugeneciurana.com/pastebin/pastebin.php?show=38698[14:05:14] <jottinger> yes[14:05:16] <kakazza> I just don't know whether the Statement and Result lines are not useless[14:05:29] <jottinger> although you're using tomcat, why are you using manual jdbc connections?[14:05:30] <kakazza> The Result one is useless, that I know, because query is nonexistant now[14:05:39] <kakazza> I have to ~_~[14:05:44] <jottinger> why?[14:05:48] <jottinger> Tomcat has JNDI[14:05:56] <jottinger> oh, this is homework, isn't it[14:06:20] <kakazza> Yes. But they didn't teach us Java at any point.[14:06:37] <jottinger> Well, I'm sorry that you have crappy teachers[14:06:45] <kakazza> Me too[14:07:01] <kakazza> So basically, I just changed their framework.[14:07:50] <kakazza> So I have a preparedstatement now, how do I execute it? And get it into this... result thing[14:08:38] <jottinger> have you tried the code you pasted?[14:09:00] *** johannesh has joined ##java[14:09:25] <kakazza> Nope, but I doubt it can work, ResultSet result = statement.executeQuery(query); is useless without having query now[14:09:41] <kakazza> And I have no idea what "Statement statement = connection.createStatement();" does ;([14:09:46] * kakazza tries the code[14:10:12] <jottinger> why not pstmt.executeQuery()?[14:10:25] * jottinger is busy knocking on his screen, saying "Hello? mcFly?"[14:14:10] <cheeser> how the might have fallen. terry bowden to coach div II[14:14:28] <cheeser> whoops. wrong channel. but still... 8^)=[14:14:34] <jottinger> good for him[14:14:48] <jottinger> now if only bobby will follow him![14:16:30] <skoskav> sports :x[14:16:46] <kakazza> hrm[14:18:00] <kakazza> Hrm, how do I check whether the int I am trying to read was NULL or 0?[14:18:12] <cheeser> an int will never be "NULL"[14:18:18] <kakazza> It says incomparable types: int and <nulltype> when I do if (Anzahl == null)[14:18:23] <cheeser> not least of it is that NULL isn't a java value[14:18:36] <cheeser> ints always have values[14:18:38] <kakazza> Well, the html form can be empty when submitted, what will the value be?[14:18:54] <jottinger> the string from getParameter will be null if there's no value submitted[14:19:14] <cheeser> request parameters are always strings[14:19:17] <kakazza> I set it to "int" now, becauae "setInt(int,int)[14:19:33] <kakazza> hrm, so I have to convert string to int for setInt?[14:19:56] *** bitcrave has joined ##java[14:20:34] <kakazza> I guess I can't use setString, since SQL wants an int there, no?[14:20:53] <jottinger> ~docs++[14:20:54] <javabot> docs has a karma level of 3, jottinger[14:20:58] <jottinger> ~tutorials++[14:20:59] <javabot> tutorials has a karma level of 1, jottinger[14:21:01] <jottinger> ~reading++[14:21:01] <javabot> reading has a karma level of 10, jottinger[14:21:27] <kakazza> :x[14:25:45] <kakazza> kinda hard without having error messages...[14:26:06] *** Galik has quit IRC[14:27:19] <kakazza> How do I make this part display the error message instead of "Database error!": http://eugeneciurana.com/pastebin/pastebin.php?show=38699[14:28:56] <cheeser> ~~ kakazza javadoc Exception[14:28:57] <javabot> kakazza, http://java.sun.com/javase/6/docs/api/java/lang/Exception.html, null[14:29:18] *** vix85 has joined ##java[14:30:18] *** toytoy has joined ##java[14:33:31] <kakazza> I have the exception in exc I think, I just don't know how to retrieve the text of it :x[14:33:42] <cheeser> so rtfm on Exception[14:35:48] <kakazza> Ah, inherits getmessage[14:36:48] *** UUncia has quit IRC[14:37:21] <kakazza> zomg awesome[14:38:41] <ReAn> can i re-use a Thread?[14:38:51] <ReAn> i.e. can i reset it's threadstate?[14:38:53] <cheeser> ReAn: no[14:39:57] <ReAn> i have to create a new object?[14:40:01] <Luno> but he can reuse thread, that's what threadpools are for[14:40:08] *** cvasilak has joined ##java[14:40:21] <kakazza> hrm...[14:40:32] <Luno> maybe "reuse" is not a good word[14:40:37] <cheeser> it's not[14:40:40] <kakazza> I guess I can't retrieve things like "'COUNT(slots.TrNr)"[14:40:50] <kakazza> Since that's not a column...[14:41:12] <ReAn> yea, well i basically have 4 threads, when one is done, i want it to execute again once i've selected a new file for it to work on[14:41:19] <ReAn> i guess i have to build that into my object[14:42:00] <cheeser> or just let the thread run until you tell it to stop and it just does nothing if the File ref it has is null.[14:42:15] <cheeser> if it's not null, do work, set the file ref to null, wait...[14:44:32] *** waz has joined ##java[14:47:57] *** elbeardmorez has joined ##java[14:52:04] *** whalberg has joined ##java[14:52:15] <whalberg> hi.[14:52:43] <whalberg> how can i access jTextArea in fileApp.java that is created in the fileview.java?[14:55:41] *** raboof has quit IRC[14:56:47] *** bitcrave has quit IRC[14:56:54] <mbroeker> whalberg, do you have a reference to the class fileApp in fileView?[14:57:13] *** jkriesten has joined ##java[14:59:31] <whalberg> well the fileApp runs the fileView[14:59:56] *** cvasilak has quit IRC[15:01:19] <whalberg> i feel kinda idiot myself[15:03:14] *** deepjoy has joined ##java[15:06:14] *** korisk has joined ##java[15:07:02] <korisk> hi! can i create vertical tab panel with common swing components?[15:07:40] *** longbeach has quit IRC[15:14:26] *** pirho has quit IRC[15:15:34] <korisk> ~pastebin[15:15:34] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[15:18:28] *** deepjoy has quit IRC[15:20:52] *** Razec has quit IRC[15:26:05] *** bitcrave has joined ##java[15:27:33] *** mazzachre has joined ##java[15:27:41] <mazzachre> 0x48 0x61 0x70 0x70 0x79 0x20 0x4e 0x65 0x77 0x20 0x59 0x65 0x61 0x72[15:28:00] <cheeser> ?[15:28:23] <cheeser> happy new year in ASCII?[15:28:29] <mazzachre> :)[15:28:39] *** ofl_ has joined ##java[15:29:12] <mazzachre> I would say utf-8, but the chars I use, it does not matter...[15:41:15] *** M[]ssad has joined ##java[15:41:38] *** bitcrave has quit IRC[15:48:11] *** wfq has joined ##java[15:48:14] <wfq> hi guys[15:49:23] <wfq> if I declare a const in java should I treat it via using if-else or switch {}. They all are string. I don't know, this is not recommendable in some languages? What about java?[15:50:03] <Luno> you can't use strings in switch[15:50:10] <mazzachre> You can't switch on a string in java... you should perhaps look at enums?[15:50:24] <cheeser> java doesn't have consts[15:50:42] <mazzachre> final :)[15:50:46] <mazzachre> probably[15:51:45] *** JGarrido has joined ##java[15:51:47] <wfq> cheeser, I know. I am using final. I just called consts[15:52:07] <cheeser> final doesn't mean const either[15:52:13] <wfq> static final yes[15:52:23] <cheeser> static final doesn't mean const either[15:52:33] <wfq> well, I mean, they can do what I am looking for. that is it. :)[15:52:43] <wfq> thanks[15:52:59] <mazzachre> wfq: Try look at enumerations... that is probably what you are looking for...[15:53:38] <wfq> mazzachre. Thanks. checking javadoc.[15:54:04] <cheeser> enumerations have nothing to do with if/else or switch statements[15:54:48] *** openbysource has joined ##java[15:57:06] *** robyonrails has joined ##java[15:57:14] *** javahorn has joined ##java[15:59:59] *** waz has quit IRC[16:00:00] *** javahorn has quit IRC[16:00:19] *** bitcrave has joined ##java[16:00:25] *** javahorn has joined ##java[16:01:25] *** Carnage\ has joined ##java[16:03:16] *** HideousNashimoto has joined ##java[16:05:47] <kakazza> "ORDER BY Anzahl ?;"[16:05:48] <kakazza> pstmt.setString(2, order);[16:05:55] <kakazza> You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''DESC'' at line 1[16:05:59] <kakazza> order = ASC or DESC[16:06:17] <kakazza> Does Java put the ? in ""?[16:06:20] <jottinger> no[16:06:30] <jottinger> that's not a valid parameter for preparedstatement[16:06:44] <jottinger> preparedstatements don't alter the order or source table or column names[16:06:49] <jottinger> only the parameters[16:06:57] <kakazza> Ah ok[16:07:00] *** Goundy has joined ##java[16:07:07] <kakazza> So i cannot exchange DESC with ASC and vice versa?[16:07:18] <jottinger> not that way, right[16:07:18] *** zophy has quit IRC[16:07:29] <kakazza> In which way then?[16:07:54] <kakazza> if statement which checks for ASC/DESC and replaces the last line of my SQL statement with the correct one?[16:07:55] *** javahorn has quit IRC[16:08:13] *** zophy has joined ##java[16:08:26] *** waz has joined ##java[16:08:33] *** javahorn has joined ##java[16:09:13] <kakazza> order == ASC ? "ORDER BY Anzahl ASC;"); : "ORDER BY Anzahl DESC;");[16:09:22] <kakazza> I'm gonna try that, for the fun of it[16:10:06] *** M[]ssad has quit IRC[16:10:07] *** Wilde_Sehnsucht has joined ##java[16:10:08] *** Goundy has quit IRC[16:10:21] *** userek has joined ##java[16:19:10] *** bindaas has joined ##java[16:20:00] *** waz has quit IRC[16:21:17] *** waz has joined ##java[16:21:31] <kakazza> PreparedStatement pstmt = connection.prepareStatement("SELECT TrName, COUNT(slots.TrNr) AS Anzahl "+[16:21:31] <kakazza> "FROM trainer, slots "+[16:21:31] <kakazza> "WHERE trainer.TrNr = slots.TrNr "+[16:21:31] <kakazza> "GROUP BY TrName "+[16:21:31] <kakazza> "HAVING Anzahl > ? "+[16:21:32] <kakazza> "ORDER BY Anzahl DESC;");[16:21:34] <kakazza> arg[16:21:36] <kakazza> sorry[16:21:40] <kakazza> Wrong window[16:21:42] <kakazza> Won't happen again[16:21:46] * kakazza ducks[16:22:17] *** Wilde_Sehnsucht is now known as M[]ssad[16:25:49] *** ycy has quit IRC[16:26:11] *** ycy has joined ##java[16:28:17] *** romanb has joined ##java[16:28:48] *** Angel-SL has quit IRC[16:31:03] *** Haris` has joined ##java[16:31:22] <Haris`> Hello, what is the difference between constructor and main method?[16:32:12] <Luno> main method is just the entry point for execution[16:32:31] <Luno> jvm calls public static void main(String[]) method of XX class when you run "java XX"[16:32:35] <Luno> and constructor...[16:32:42] <Luno> ~tell Haris` about constructor[16:32:42] <javabot> Haris`, constructors is http://java.sun.com/tutorial/java/javaOO/constructors.html[16:33:16] *** bindaas has quit IRC[16:35:32] *** illio has quit IRC[16:35:34] <Haris`> Constructors cannot have return value? :([16:35:44] <Luno> yep[16:36:09] <Haris`> and main can't have any argument except string?[16:36:19] <Luno> array of strings[16:36:27] <Luno> it's list of parameters you run program with[16:38:25] <Haris`> Coool :)[16:45:42] *** toytoy has quit IRC[16:46:40] *** Absolute0 has quit IRC[16:47:31] *** javahorn has quit IRC[16:48:50] *** javahorn has joined ##java[16:49:50] *** gdoko has joined ##java[16:51:57] *** Russell^^ has joined ##java[16:52:26] *** zophy has quit IRC[16:52:45] *** knuthy has joined ##java[16:52:48] *** robyonrails has quit IRC[16:52:59] <knuthy> Hello[16:53:37] *** RolandU has joined ##java[16:54:31] <dmlloyd> ~~javahorn pm[16:54:33] <javabot> javahorn, Use /msg to talk to Drone and javabot, but ask other users first. See: http://javachannel.net/wiki/pmwiki.php/FAQ/Pm[16:56:46] <RolandU> Hi all! I am gettin a strange exception from Hibernate I do not understand (while doing a SELECT-query). java.lang.RuntimeException: left and right hand sides of a binary logic operator were incompatibile ... could anyone tell me what that could mean?[16:58:10] *** odinsbane has joined ##java[16:59:41] <odinsbane> I'm trying to setup j2me, should I install Sun Java Wireless Tool Kit 2.5.2?[17:00:55] *** zophy[] has joined ##java[17:01:38] *** zophy[] has quit IRC[17:01:55] *** Absolute0 has joined ##java[17:01:59] *** alek_b has quit IRC[17:02:25] *** zophy[] has joined ##java[17:02:27] *** johannesh has quit IRC[17:02:57] *** Absolute0 has quit IRC[17:04:35] *** GodTodd_ has joined ##java[17:05:33] *** johannesh has joined ##java[17:06:57] *** BSWolf has quit IRC[17:09:10] *** adi112358 has joined ##java[17:09:11] *** arpu has joined ##java[17:10:32] *** skoskav has quit IRC[17:10:37] *** openbysource has left ##java[17:11:59] *** Haris` has quit IRC[17:12:00] <Russell^^> odinsbane, probably; it includes the emulator etc.[17:14:38] *** noobraska has joined ##java[17:15:30] *** amz has joined ##java[17:16:48] *** hanen has joined ##java[17:17:00] *** RolandU has quit IRC[17:17:10] *** noobraska has quit IRC[17:17:36] *** teralaser has joined ##java[17:17:40] *** RolandU has joined ##java[17:21:18] *** HideousNashimoto has quit IRC[17:21:21] *** noobraska has joined ##java[17:21:40] <kakazza> If I use a Java Servlet to insert, modify and delete data in a DB, how do I check referential integrity myself?[17:22:09] <ernimril> kakazza: why do you have to? the db is usually pretty good at checking such things[17:24:55] *** korisk has quit IRC[17:25:15] *** korisk has joined ##java[17:26:17] *** linxeh has joined ##java[17:26:33] <kakazza> I know, it's required in the assignment I am doing[17:26:47] <kakazza> And I am kinda lost, because I usually let MySQL handle that stuff[17:27:16] <kakazza> These servlets should illustrate updating and referential integrity of your database.[17:27:16] <kakazza> ! Please point explicitly where you check referential integrity (adding rows, modifying rows, deleting rows).[17:27:42] <ernimril> kakazza: what db?[17:27:49] <hanen> ~pastebin[17:27:50] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.[17:28:13] <kakazza> A DB I am working with[17:28:21] <ernimril> kakazza: consider talking to your teacher and tell him/her how you use foreign keys and similar[17:28:35] <kakazza> Ok[17:28:37] <ernimril> kakazza: what db? oracle/mysql/pgsql?[17:28:41] <kakazza> mysql[17:30:18] *** selckin has joined ##java[17:31:22] *** monestri has quit IRC[17:31:35] *** monestri has joined ##java[17:33:50] *** waz has quit IRC[17:36:28] <odinsbane> I installed this toolkit and I think... that I should have the libraries javax.microedition... but I can't import them, is it possible they are in one of the jars of this toolkit?[17:37:37] *** openbysource has joined ##java[17:37:51] <openbysource> wht transient variable role ?[17:38:28] <Fanook> ~~openbysource transient[17:38:30] <javabot> openbysource, Variables may be marked transient to indicate that they are not part of the persistent state of an object. While transient is intended for use by them, the JLS does not specify the details of persistence services; see the specification of java.io.Serializable for an example of such a service.[17:39:26] *** korisk has quit IRC[17:39:42] *** korisk has joined ##java[17:39:58] *** adi112358 has left ##java[17:40:32] *** RolandU has quit IRC[17:41:02] <openbysource> which kind of service, javabot[17:41:49] *** korisk has quit IRC[17:42:18] *** korisk has joined ##java[17:46:00] *** r1nu- has joined ##Java[17:46:25] * r1nu- Merry Christmas and Happy new year with more coding! :)[17:46:41] <Fanook> openbysource: the bot is just a walking dictionary. It doesn't have an intelligence behind it.[17:46:51] <Fanook> ~~openbysource persistence[17:46:51] <javabot> openbysource, JPA is the Java Persistence API. For all intents and purposes, it's meant for persisting objects into a relational database, which is usually correct but let's be real, that's sometimes stupid. Lots of implementations of this - Hibernate, cocobase, Toplink Essentials, openJPA are some. Wanna learn more? Google, or read http://java.sun.com/developer/technicalArticles/J2EE/jpa/[17:47:14] <Fanook> *sigh* ignore that. openbysource[17:47:29] *** Varox has quit IRC[17:47:47] <Fanook> persistence is the conversion to and from a state usable for storage/transmission[17:48:30] *** waz has joined ##java[17:49:01] *** johannesh has quit IRC[17:49:19] <openbysource> mean transient variable can work as a persistent variable n also store value etc[17:49:55] <Fanook> no, a transient variable is one that you don't want to include in the persisted state of the object[17:50:10] <openbysource> then wht's it work[17:50:32] <Fanook> that was not a valid sentence. try again.[17:51:51] <openbysource> how can I use non persistence variable into my code like transient[17:52:30] <openbysource> plz desc any case/example[17:52:33] <odinsbane> So I have a jar file with javax/microedition, but when I include that jar file in my class path, I still cannot import javax.microedition... to I need to put that tar file with my other javax libs?[17:53:10] <Fanook> odinsbane: no. you just need to include the .jar file in your classpath[17:53:26] <Fanook> what is your exact error?[17:53:46] <Fanook> openbysource: your questions are not making any sense[17:53:53] *** korisk has quit IRC[17:54:03] *** korisk has joined ##java[17:54:15] <openbysource> Fanook: but it's making sense for thinking about[17:54:38] *** chadj has joined ##java[17:55:08] <Fanook> you mark a variable as transient when you want the persistence API to ignore it. That's it.[17:56:41] <openbysource> yup[17:57:39] *** chadj has left ##java[17:58:56] <Fanook> ...so did you have a real question?[17:58:58] *** korisk has quit IRC[17:58:59] *** l2trace99 has joined ##java[17:59:09] *** korisk has joined ##java[18:00:27] <openbysource> not yet, only for testing[18:02:12] *** lresende has joined ##java[18:03:32] *** jottinger sets mode: +b *!*n=openby@unaffiliated/openbysource[18:03:32] *** openbysource was kicked by jottinger (fail)[18:06:11] <jottinger> well! this thing is starting to come together, but the console-based app is starting to be unwieldy :)[18:07:30] <waz> thing = ?[18:07:42] *** knuthy has left ##java[18:08:39] *** jottinger sets mode: -b *!*n=openby@unaffiliated/openbysource[18:08:51] <jottinger> waz: new article for $payingpublisher[18:09:00] <jottinger> Basically showing ci-bayes in action[18:09:07] <waz> nice[18:09:15] <jottinger> (the app in question: console-based rss reader, machine-learning preferences)[18:09:23] *** HideousNashimoto has joined ##java[18:09:51] <jottinger> I knew rss in console was going to be icky^2 but it's way simpler than weighing the thing down with a webapp going in[18:10:02] <jottinger> I'm using DB4O for datastorage, it's fun :)[18:10:23] <ernimril> jottinger: no swing gui?[18:10:44] <jottinger> ernimril: It could have one, I'm using MVC pretty aggressively[18:10:55] <jottinger> but I'm not a Swing guy, so I'm not bothering with anything that gets in the way[18:11:14] <jottinger> the end goal is to actually make it a webapp, distributed via a cloud, and customizable by user[18:12:04] <jottinger> the console app gets to ignore user management, so it's simpler and has no TX issues :)[18:13:25] *** ernimril has quit IRC[18:13:57] <jottinger> My end goal is to have a user-downloadable codebase where users can set a notification flag, such that as they train LOCALLY it trains a general-purpose system too[18:14:24] <jottinger> but that might be a little far-reaching; it might be better just to leave the simple app as what it is to encourage users to use something a little more full-featured[18:14:26] *** ernimril has joined ##java[18:14:48] *** Dalila has joined ##java[18:22:40] *** Xianny has joined ##Java[18:24:22] *** amz has quit IRC[18:24:26] *** chris_abyi has joined ##java[18:25:23] <chris_abyi> hi. I wonder if it's possible to have a JTextArea with a ScrollPane which always shows the last entry of the Text (the last Line), like in a chat window, e.g. How can I change the JScrollPane to this setting?[18:25:48] <ernimril> chris_abyi: change the caret position[18:26:13] <ernimril> chris_abyi: (on the test area, not the scroll pane)[18:26:25] <Fanook> chris_abyi: you don't add the scrollpane to the text area. You add the text area to the scrollpane[18:26:35] *** genesiss has joined ##java[18:27:17] <chris_abyi> Fanook, ernimril: thank you. Just a thing to understand it right: the caret is the position where new text is being inserted or?[18:27:27] <Fanook> yes. the caret is that blinky line[18:28:06] <chris_abyi> Fanook, fine - but I still want the new lines to be inserted at the bottom..didn't get that[18:28:44] <Fanook> *points at ernimril's comments* You can change the caret position. You probably want to do this after appending to the text[18:28:48] <ernimril> chris_abyi: you append text to it, then you set the caret to the top position[18:29:00] <ernimril> hmmm, we have some distorted echo in here :-)[18:29:51] <chris_abyi> ok. And when I want to append a new line, I have to shift the caret to the bottom again? And then up again?[18:30:03] <chris_abyi> sorry, bit slow today.[18:30:14] <ernimril> chris_abyi: yes, that is correct[18:30:41] <chris_abyi> ernimril, ok. So there's no easier method? How do these irc-windows work?[18:30:43] <chris_abyi> same way?[18:31:24] <ernimril> chris_abyi: irc-windows? I use ircii, it is an old command line client, no swing here. I think it uses curses internally[18:31:59] *** deepjoy has joined ##java[18:32:02] <chris_abyi> :) I thought there wouldn't be that much people anymore using ircii - so I hit one. :)[18:34:42] *** liggyman has quit IRC[18:35:02] <chris_abyi> hm. I just recognized that the caret position is no constant like "TOP" or "BOTTOM".. How can I determine where to set a new line at the bottom?[18:36:50] <chris_abyi> Thinking complicated: I have to get the number of lines and the height of each line..[18:37:29] <ernimril> chris_abyi: the document has a length[18:37:38] *** toytoy has joined ##java[18:38:05] <chris_abyi> ernimril, ah for sure. thank you. I use a lot of /n's that's why I was confused.[18:39:09] *** kusok_sna has quit IRC[18:41:13] *** kusok_sna has joined ##java[18:43:19] *** gocsp_ has joined ##java[18:43:20] <gocsp_> hello[18:43:25] *** [TartY] has quit IRC[18:45:54] *** Ragnor has quit IRC[18:46:04] *** Ragnor has joined ##java[18:46:56] *** robyonrails has joined ##java[18:51:44] *** knuthy has joined ##java[18:52:39] *** Kwitschibo has joined ##java[18:53:09] <chris_abyi> bye! Thanks for the advice.[18:53:16] *** fcestrada has quit IRC[18:53:29] *** kusok_sna has quit IRC[18:53:53] *** giantrobot has quit IRC[18:55:11] *** yolkaplexus has joined ##java[18:55:24] *** kusok_sna has joined ##java[19:00:16] *** korisk has quit IRC[19:00:27] *** korisk has joined ##java[19:02:35] *** FireSlash has joined ##java[19:04:50] *** redeeman has joined ##java[19:08:55] *** rudenstAm is now known as rudenstam[19:11:05] *** fcestrada has joined ##java[19:11:59] *** bitcrave has quit IRC[19:12:25] <redeeman> hello[19:12:33] <taraskostiak> hi[19:13:23] *** kakazza has quit IRC[19:13:23] <redeeman> im attempting to use another provider for jce, but it appears the implementations from sun takes precedence, how can i disable the sun implementations, and use only the ones that comes from other security providers?[19:14:25] *** seyfarth has joined ##java[19:15:39] *** bhz- has joined ##java[19:19:05] *** yolkaplexus has quit IRC[19:19:10] *** giantrobot has joined ##java[19:22:00] *** Eyvind has joined ##java[19:23:15] *** drichards has joined ##java[19:23:43] <drichards> ~pdf[19:23:44] <javabot> I guess the factoid 'pdf renderer' might be appropriate:[19:23:45] <javabot> drichards, pdf renderer is a java pdf renderer and viewer, see https://pdf-renderer.dev.java.net/[19:24:34] *** korisk has quit IRC[19:24:44] *** korisk has joined ##java[19:26:10] *** DjZemich has joined ##java[19:27:54] *** javahorn has quit IRC[19:29:17] *** fukazzz has joined ##java[19:31:08] <drichards> ~pdf generator[19:31:08] <javabot> I guess the factoid 'pdf renderer' might be appropriate:[19:31:09] <javabot> drichards, pdf renderer is a java pdf renderer and viewer, see https://pdf-renderer.dev.java.net/[19:32:14] <Shirik> Hi all, I'm going to be taking in a bunch of strings and relating them to objects as an index. I want to then perform a search, looking for those strings to find the right object. There will be a lot of searches, so it needs to be relatively fast. Am I right in choosing a Hashtable to do this?[19:32:23] <drichards> ~swing[19:32:24] <javabot> drichards, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing[19:33:29] *** woogley has joined ##java[19:34:43] <drichards> that's an age-old debate ;) My advice is start there and with proper abstraction you can implement a different storage retrievable approach if need be[19:35:17] *** chessguy has joined ##java[19:35:34] <joed> ~~ drichards pm the bot[19:35:38] <javabot> drichards, You can send me private messages, these annoy other users less. Note that in private messages, you don't need the "~".[19:35:55] <ernimril> Shirik: well, Hashtable is not used much in new code, you use Map/HashMap, but it is mostly the same thing[19:36:16] <Shirik> oh is HashMap preferred over Hashtable?[19:36:29] <ernimril> Shirik: almost always, yes[19:36:38] <Shirik> My checkstyle script (which, admittedly, someone else gave me unrelated to the project) warns against HashMap but not Hashtable[19:36:54] <Shirik> I'm guessing I should take that out then? :)[19:37:25] <ernimril> Shirik: what is the warning you get?[19:37:56] <joed> Shirik: This might be interesting http://www-igm.univ-mlv.fr/~lecroq/string/[19:38:13] <evilgeek> why does it warn against HashMap?[19:38:24] <Shirik> ...\InterfaceList.java:95:9: warning: Declaring variables, return values or parameters of type 'HashMap' is not allowed.[19:38:47] <Shirik> I assumed there was a reason for that, so I left it in[19:38:52] <Shirik> I can take it out just as easily :)[19:39:03] <ernimril> Shirik: not sure what that warning is about, but you should use Map as left hand value[19:39:26] <ernimril> Shirik: so methods look like "public Map<Foo, Bar> getSomeData(...)"[19:39:54] <Shirik> oh![19:39:57] <Shirik> I bet that's what it's warning about[19:40:02] *** whalberg has quit IRC[19:40:09] <Shirik> when I did Map<Foo, Bar> baz = new HashMap<Foo, Bar>(); the warning went away[19:40:12] <evilgeek> Shirik: your friend is bad at programming.[19:40:12] <ernimril> Shirik: when you create the map you use HashMap or TreeMap or ...[19:40:39] *** taraskostiak has quit IRC[19:40:48] <evilgeek> ernimril: i never understood why people return Map as opposed to HashMap. HashMap comes with certain guarantees about efficient retrieval.[19:41:18] <evilgeek> (and youshould never return a TreeMap from something that is supposed to return Map unless you're certain that the domain implements Comparable.)[19:41:21] <ernimril> evilgeek: most of the time you do not care about that[19:41:36] <evilgeek> you might not. but i do.[19:41:51] *** knuthy has quit IRC[19:42:49] <Shirik> ok well now that I know why this warning exists, I should go convert all my Hashtable instances back to HashMaps ^_^[19:43:02] *** chessguy has quit IRC[19:43:13] *** hrehf_ has joined ##java[19:43:28] <ernimril> Shirik: Hashtable is synchronized so if you have multi threaded your app, then you may want to be careful about that change[19:43:39] <Shirik> I made sure to externally synchronize :)[19:43:46] <ernimril> Shirik: (but use Collections.synchronizedMap instead of Hashtable in that case)[19:44:12] <ernimril> Shirik: or possibly change to a concurrent map instead[19:44:30] <evilgeek> java.uril.concurrent.ConcurrentHashMap or whatever is kinda nice.[19:45:23] *** woogley has quit IRC[19:45:38] *** woogley has joined ##java[19:45:53] <Shirik> oh wow[19:45:59] <Shirik> that's better than my solution actulaly[19:46:19] <Shirik> I was planning to add a ReaderWriterLock to grab on to while accessing the table[19:48:54] <Shirik> thanks[19:50:30] *** MyName has joined ##java[19:50:35] *** taraskostiak has joined ##java[19:51:19] *** Woflborg has joined ##java[19:51:27] *** chris_abyi has quit IRC[19:53:14] *** skoskav has joined ##java[19:55:36] *** regjava has joined ##java[19:57:16] *** exbio has joined ##java[19:58:35] *** pietia has quit IRC[19:58:50] *** pietia has joined ##java[20:00:25] *** puppy_sa has joined ##java[20:00:57] *** regjava has quit IRC[20:01:05] *** Absolute0 has joined ##java[20:01:22] *** woogley has quit IRC[20:01:35] *** hrehf has joined ##java[20:04:51] *** seyfarth has quit IRC[20:04:55] *** gdoko has quit IRC[20:05:10] *** chuck has joined ##java[20:05:16] <chuck> hello =)[20:05:41] <chuck> i'm writing a penlet for my livescribe pulse pen, and I want to make an array and then add a new member to that array every time a new word is recognized[20:05:59] <chuck> how exactly do I make an array that doesn't have a limit or at least make it so I can increase the limit[20:06:10] <waz> use a Collection[20:06:35] *** arpu has quit IRC[20:07:25] *** chase has joined ##java[20:07:32] *** hrehf_ has quit IRC[20:08:33] *** bitcrave has joined ##java[20:08:51] *** gumpish has joined ##java[20:10:07] <puppy_sa> try java.util.List[20:10:23] <puppy_sa> specifically, ArrayList[20:11:08] <gumpish> Is the method values() for enums actually documented anywhere in the API? It certrainly doesn't seem to be in http://java.sun.com/javase/6/docs/api/java/lang/Enum.html[20:11:25] <puppy_sa> it's generated by the compiler[20:11:41] *** korisk has quit IRC[20:12:10] <gumpish> i see.[20:12:19] <Fanook> gumpish: it's not in the API, but it's specified in the language spec[20:12:36] *** marvs has joined ##java[20:13:02] *** tomh has joined ##java[20:13:16] <chuck> puppy_sa, ArrayList? I'll try it[20:13:18] <chuck> thanks[20:13:48] *** HideousNashimoto has quit IRC[20:14:35] *** Dr_Link has joined ##java[20:15:33] *** Varox has joined ##java[20:17:28] *** CaptainMorgan has quit IRC[20:18:14] *** seyfarth has joined ##java[20:19:41] *** seyfarth has quit IRC[20:20:44] <ernimril> gumpish: it is a static method, how can it be in the Enum-javadoc[20:20:59] <ernimril> gumpish: it is in the javadoc you generate for your classes[20:25:20] *** Sagi22 has joined ##java[20:26:10] <Sagi22> > Hi I have question about overloading in java[20:26:28] <Sagi22> say I have method[20:26:30] <Sagi22> public int foo (int x)[20:26:32] <Sagi22> it is possible to declare[20:26:33] <Sagi22> public int foo (float x)[20:26:46] <gocsp_> hello[20:26:58] <puppy_sa> yes[20:27:08] <gocsp_> happ new year together[20:27:35] <ernimril> Sagi22: what happen when you try it?[20:27:42] <puppy_sa> Happy New Year[20:27:44] <Sagi22> I didn't try it[20:28:16] <Sagi22> I want to know if it's ambiguous to the compiler[20:28:18] <Sagi22> or it will be ok?[20:28:23] *** chase is now known as NxChase[20:28:31] <gumpish> ernimril: ah, neat. guess I should brush up on that process then.[20:28:41] <ernimril> ~~Sagi22 tias[20:28:41] <javabot> Sagi22, Try it and see. You learn much more by experimentation than by asking without having even tried.[20:29:04] *** odinsbane has quit IRC[20:29:06] <Sagi22> ernimril thanks but I want also to understand[20:29:10] *** NxChase is now known as Chase[20:29:52] <gocsp_> anyone knows about TreeModel and Arraylist?[20:32:32] <puppy_sa> a more specific question might help?[20:33:21] <gocsp_> :)[20:33:34] <gocsp_> i have a treemodel with a arraylist as model[20:34:17] <gocsp_> and the objects of the arraylist have arraylists too[20:35:41] <gocsp_> puppy_sa: http://rafb.net/p/PExqM344.html[20:36:42] <gocsp_> with this: http://rafb.net/p/XEiZRQ36.html i get the classes and courses[20:36:58] <Eyvind> Sagi22: As far as I know, the javac will choose the most specific method possible[20:37:00] <gocsp_> but then i need the pupils too[20:37:12] <Sagi22> Eyvind[20:37:25] <Sagi22> I think it doesn't work with int+double[20:37:28] *** The_Miso has joined ##java[20:37:34] <Sagi22> but with int+float it seems that it works[20:37:38] <Sagi22> so I don't know why[20:37:52] <Eyvind> What happens when you do int and double?[20:38:05] <Sagi22> compiler error[20:38:20] <Eyvind> pastebin it[20:38:28] <The_Miso> ~pastebin[20:38:28] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[20:39:02] <Sagi22> http://rifers.org/paste/show/8612[20:39:07] <Sagi22> error is[20:39:13] <Sagi22> possible loss of precision[20:39:41] <Sagi22> oops...[20:39:52] <Sagi22> The method returns int[20:39:53] <chuck> So if I want to add a class variable for an ArrayList, what would it look like?[20:39:58] <chuck> ArrayList words; << ?[20:40:16] *** nvictor has joined ##java[20:40:18] <puppy_sa> chuck - uh?[20:40:28] <The_Miso> I have two constructors in the same class - and I kind of need them both - is that possible?[20:40:28] <chuck> sorry >< i'm new to java :P[20:40:29] *** romanb has quit IRC[20:40:30] <Eyvind> chuck: static ArrayList words; could be a class variable[20:40:36] <chuck> evilgeek, okay, thanks[20:40:55] *** nvictor has left ##java[20:40:59] <The_Miso> This is why: http://rifers.org/paste/show/8613 (and it might be dumb - if so: sorry ;))[20:41:04] <chuck> Eyvind*[20:41:45] <puppy_sa> Sagi22 - it's a conversion problem (double -> int)[20:42:15] <Eyvind> The_Miso: Very possible[20:42:17] <Sagi22> puppy_sa I saw..thanks[20:42:19] <Sagi22> so it will take float if I do foo(1.1f) and int if foo(1)?[20:42:34] <Eyvind> Sagi22: As I said, it will choose the most specific method possible[20:42:40] <puppy_sa> The_Miso - you can call 'this();' in the second one[20:43:02] <The_Miso> okay, but still, how do I decide which one to use?[20:43:21] <The_Miso> I mean .. can I do something like "choose the small one if no variable is set" or so?[20:44:05] *** joquarky_ has joined ##java[20:44:08] <Eyvind> The_Miso: It works just like any method overloading, if the compiler will choose the constructor that matches the parameters the actor uses[20:44:36] <The_Miso> Oh I see[20:45:06] <The_Miso> So if no parameters are set it should use the small one, in the other case, the big one?[20:45:29] <The_Miso> set = used[20:45:32] *** ohsix has quit IRC[20:45:43] *** toytoy has quit IRC[20:46:56] <Eyvind> http://java.pastebin.com/d381f6979[20:47:11] <Eyvind> I think you can take it from there[20:47:47] *** Sagi22 has quit IRC[20:48:08] *** armyriad has joined ##java[20:49:01] *** Resistance has quit IRC[20:49:05] *** Resistance has joined ##java[20:50:04] <The_Miso> yeah it works, thank you very much[20:50:36] <The_Miso> it actually worked before, there was just some other problem which lead me to believe that it didnt.. but thank you very much nevertheless[20:50:40] *** phytopius has joined ##java[20:51:33] *** joquarky has quit IRC[20:52:47] <Eyvind> The_Miso: You're welcome[20:53:32] *** omaru has joined ##java[20:55:53] *** Copter has quit IRC[20:56:43] *** mikejet has joined ##java[20:57:00] <MyName> is java certification useful for jobs?[20:57:22] <r0bby> No it's not.[20:57:34] <MyName> ok[20:57:35] <puppy_sa> it depends on which one you get[20:57:36] *** xonceited has joined ##java[20:57:39] <r0bby> show you know your shit[20:57:43] <MyName> like an entry level java programmer ?[20:57:51] <MyName> no i mean useful for getting a job[20:57:55] <r0bby> MyName: show you know your shit.[20:58:02] <MyName> so it's useful ?[20:58:18] *** Xianny has quit IRC[20:58:24] <r0bby> MyName: I wouldn't waste my money[20:58:29] <r0bby> but that's just me.[20:58:32] <puppy_sa> MyName - it's a formal way to show your employer that you know the language[20:58:33] *** elbeardmorez has quit IRC[20:58:53] <MyName> what if i just study for it and not taek the test[20:59:01] <MyName> is it a good pool of meaning questions[20:59:04] <MyName> for java[20:59:06] <MyName> knowledge[20:59:07] <puppy_sa> mmm[20:59:11] <r0bby> that's fine but you still should show you know your shit[20:59:23] <MyName> ok[20:59:28] <MyName> and what ifi try to do a project myself[20:59:32] <MyName> like a jsp/servlet project[20:59:34] <r0bby> MyName: you're better off contributing to open source projects.[20:59:35] <puppy_sa> certification exam is the reason why you want to spend the money[20:59:40] <MyName> or a 3-Tier aplication project ?[20:59:49] <r0bby> MyName: learn the language first.[20:59:59] <r0bby> don't even BOTHER going to that level of stuff[21:00:00] <MyName> r0bby, but if i have no experience, how can i contribute ?[21:00:03] <MyName> they won't take me[21:00:10] <r0bby> by contributing patches[21:00:16] <r0bby> proving yourself.[21:00:26] <MyName> but i am not smart enough for that[21:00:31] <puppy_sa> MyName - there are many ways to learn Java language[21:00:37] <r0bby> no shit... I mean sure you are[21:00:53] <MyName> puppy_sa, what is a good way. i already know the basic stuff of the lang. and i'm reading effective java now[21:01:01] *** wng_z3r0 has joined ##java[21:01:02] <MyName> and jotting down notes as i read[21:01:12] <MyName> but i feel the better way is to do a project myself[21:01:14] <MyName> instead of reading books ?[21:01:32] <puppy_sa> MyName - a project is good for practice[21:01:35] <r0bby> MyName: do an IRC client.[21:01:43] <MyName> is it hard?[21:02:00] <puppy_sa> as for the usefulness of the certification, it wouldn't hurt your resume/CV if you have it[21:02:03] <r0bby> no it's piss easy considering irc libs exist to abstract away the irc protocol.[21:02:17] <r0bby> don't put the IRC client on there.[21:02:26] <MyName> why not[21:02:28] <r0bby> it's primarily just a starting point --= pretty much a throw away project[21:03:56] <waz> certs aren't always a help on a cv[21:03:58] <r0bby> irc clients aren't hard at all; another good place to start is an IRC bot -- DO NOT place it in ##java (or any other channel which you do not own without explicitly asking the channel owner's permission)[21:04:12] <r0bby> if you have one, back it up[21:04:17] *** xonceited is now known as MrJoePink[21:04:18] <r0bby> way I say it.[21:05:01] <puppy_sa> waz - the programmer exam is not as easy as people might assume.[21:05:10] *** hrehf_ has joined ##java[21:06:09] <chuck> Hey, I added this to my class, but Eclipse says that it can't be resolved to a type: ArrayList words;[21:06:10] <joed> That is not what he said. Some compaines may not see certifications as a great plus.[21:06:16] <chuck> I have java.util.* imported[21:06:17] <MyName> r0bby, bot sounds more interesting. what is the working theory behind it ?[21:06:53] <waz> puppy_sa: it's odd though, folks that have them on their CV are below avg[21:07:05] <puppy_sa> joed - there is only one formal Java certificate, which is offered by Sun.[21:07:21] <MyName> what about microsoft java cert ?[21:07:28] <joed> chuck: Don't do star imports and you need to import : import java.util.ArrayList;[21:07:39] *** IceW has quit IRC[21:07:41] <joed> puppy_sa: And?[21:07:42] <puppy_sa> the standard of the question is pretty high[21:07:50] <puppy_sa> I know, 'cos I have written one[21:07:57] <r0bby> so?[21:07:58] <joed> puppy_sa: Because.[21:08:05] <chuck> joed, it says the import java.util.ArrayList cannot be resolved[21:08:25] <joed> puppy_sa: You are arguing a fact. That is usually a fairly dumb thing to do.[21:08:31] <r0bby> chuck: just for shits and giggles[21:08:35] <r0bby> type javac -version[21:08:38] <waz> puppy_sa: why do holders of said certs do so poorly when faced with tough interviews?[21:08:54] <chuck> javac 1.5.0_16[21:09:04] <r0bby> java -version now?[21:09:15] <puppy_sa> waz - Java Programmer Certificate certifies one thing - the knowledge of the core language[21:09:15] <chuck> java version "1.5.0_16"[21:09:15] <chuck> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)[21:09:15] <chuck> Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)[21:09:20] <puppy_sa> uh[21:09:21] <r0bby> okay[21:09:23] <r0bby> that's odd[21:09:30] <waz> puppy_sa: it means two things[21:09:38] <chuck> r0bby, how so[21:09:41] <joed> It is probably something Eclipse is doing weird.[21:09:41] *** MrJoePink has quit IRC[21:09:56] <chuck> oh[21:10:02] <r0bby> chuck: set eclipse to use the sun compiler?[21:10:24] <MyName> will java lose popularity in the future, as Sun is going to go bankrupt?[21:10:25] <chuck> where is that option[21:10:30] <MyName> is c# takign over java?[21:10:45] <puppy_sa> I know you can set Eclipse to use other JRE, but it uses its own compiler[21:10:50] *** mbroeker has quit IRC[21:10:55] *** cvasilak has joined ##java[21:11:04] <waz> Sun's going bankrupt eh?[21:11:09] <MyName> puppy_sa, no, the JRE is the same, u mean u can set eclipse eto use a different compilerr ?[21:11:14] <MyName> r0bby, am i right?[21:11:17] <puppy_sa> MyName - the same has been said for C, C++, COBOL, Fortran, and even Smalltalk[21:11:18] <joed> ~u[21:11:35] <joed> ~~ MyName aolbonics[21:11:35] <javabot> MyName, 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![21:12:00] <r0bby> knowing your tools++[21:12:10] <MyName> r0bby, am i right?[21:12:13] <chuck> r0bby, might it be the "Compiler comliance level"? I saw a few errors relating to 1.5[21:12:19] <chuck> which is what its currently set to[21:12:28] <MyName> there's only one JRE (aka virtual machine) ,and that is by sun.[21:12:48] <waz> wrong[21:12:49] <joed> MyName: Really?[21:13:12] <MyName> joed, isnt it?[21:13:19] <MyName> which part is wrong?[21:13:28] <waz> which part?[21:13:33] <waz> the whole statement[21:13:38] *** wfq has quit IRC[21:13:40] <userek> i've got a problem with printing. I want to use LANDSCAPE page orientation. I draw a table with text in it. It works fine when the text font is Monospaced, but when i change it to Arial it will print only in a PORTRAIT orientation. Any ideas?[21:13:41] <MyName> what other jre's are there[21:13:43] <joed> MyName: All you said http://en.wikipedia.org/wiki/List_of_Java_virtual_machines[21:13:56] <MyName> joed, but i was right about jre is the virual machine[21:13:58] <joed> ~~ puppy_sa pm[21:13:58] <javabot> puppy_sa, Use /msg to talk to Drone and javabot, but ask other users first. See: http://javachannel.net/wiki/pmwiki.php/FAQ/Pm[21:14:25] <joed> puppy_sa: And it was waz that didn't finish his sentence.[21:14:34] * waz hides[21:14:46] <puppy_sa> too many people in one conversation[21:15:18] <chuck> also, i have a question about "this.", in a penlet guide i was reading, one of its methods uses "this." before its class variables, and another method doesn't use it at all, what's the difference?[21:15:19] <puppy_sa> isn't that why private message was invented?[21:15:22] <Teckla> Is Tomcat considered "production quality" (i.e., considered robust enough for professional use)?[21:15:31] <joed> MyName: Java Runtime Environment would be correct. Yes that has a virtual machine for you.[21:15:42] <MyName> joed, in that list, how come sun is nto in there???[21:16:18] <puppy_sa> MyName - you probably need to set up Eclipse to find the JRE[21:16:39] <MyName> puppy_sa, what do u mean "find"? i already have eclipse.[21:16:49] <joed> MyName: Hotspot[21:16:55] *** ChanServ sets mode: +o joed[21:17:03] <MyName> MyName, what??[21:17:05] *** MyName was kicked by joed (Stop using aolbonics)[21:17:14] *** joed sets mode: -o joed[21:17:38] <userek> ;-D[21:17:49] *** MyName has joined ##java[21:17:54] <MyName> ok HotSpot is by Sun. i See.[21:18:09] <MyName> but what is the diff between on JVm and another? why would one use one vs t he other ?[21:18:20] <userek> Just use sun's[21:18:21] *** liggyman has joined ##java[21:18:30] <MyName> and why do most people use Sun 's instead of others'?[21:18:34] <puppy_sa> someone might write a better JVM than Sun[21:18:42] *** zophy[] has quit IRC[21:18:43] <cheeser> hasn't really happend yet.[21:18:50] <userek> MyName, because its original[21:18:52] <cheeser> maybe with jrockit but..[21:19:01] <puppy_sa> it's a possibility[21:19:10] <MyName> ok[21:19:11] <puppy_sa> not a 'fact'[21:19:14] <Fanook> chuck: "this" is a reference to the object the method was invoked on. It is almost never needed. If, however, your method arguments have the same name as your object members, you need to prefix the member accesses with "this." to tell the compiler which name you mean to use[21:19:14] <scorchsaber> JVMs used to be built because they wanted an open-source implementation.[21:19:14] *** ChanServ sets mode: +o waz[21:19:20] <MyName> but what is the difference between the word "hotspot" and "jre" ?[21:19:21] <userek> isn't jrockit based on sun's vm?[21:19:28] <MyName> with regard to Sun that is.[21:19:36] <scorchsaber> I think Apache is still building theirs, since they want to use the Apache license, and not GPL.[21:19:36] <chuck> oh, okay[21:19:45] <cheeser> hotspot is a JIT. a JRE is more.[21:19:48] *** Russell^^ has quit IRC[21:19:49] <Teckla> Never mind, this page ( http://wiki.apache.org/tomcat/PoweredBy ) seems to indicate Tomcat is plenty robust for professional use. :)[21:19:56] <cheeser> scorchsaber: harmony is essentially dead[21:20:00] <Fanook> MyName: JRE is a generic term for the Java Runtime. HotSpot is Sun's implementation of the runtime[21:20:11] <scorchsaber> cheeser: Google is using it for Android-- doesn't seem dead to me.[21:20:11] <userek> scorchsaber, i tryied it several months ago and it was slow as hell :P[21:20:12] <cheeser> Fanook: nothing generic about it. 8^)=[21:20:22] <cheeser> scorchsaber: oh, are they? i hadn't heard that.[21:20:31] <cheeser> interesting.[21:20:32] <chuck> so if I want to built a "helper" method to build a string from an arraylist, I could make it like, private String buildArrayString() then in another method I can just do this? String fullText = buildArrayString(); (without the this.)[21:20:33] <MyName> so HotSpot is a type of JRE[21:20:39] <scorchsaber> I'm not sure what to think of it.[21:20:44] <cheeser> i knew they had a java-ish environment[21:20:45] <MyName> so Sun's JRE = Hotspot?[21:21:08] <puppy_sa> MyName - read Java on Wikipedia[21:21:20] <MyName> i did[21:21:23] <cheeser> i thought they were using jamvm[21:21:30] <MyName> one question: "The JVM, which is the instance of the JRE (Java Runtime Environment), comes into action when a Java program is executed. When execution is complete, this instance is garbage-collected." <--- what does it mean "one instance".[21:21:45] <cheeser> MyName: no. sun's JRE can include hotspot[21:21:57] <maxote> MyName, the older Sun's JREs have only the classic mode, not the server mode.[21:21:57] <MyName> cheeser, well if it does not include hotspot, it cannot run java programs can it >?[21:22:10] <cheeser> yes, it can.[21:22:22] <cheeser> you don't need hotspot to run java code[21:22:26] <MyName> what is the point of sun not including hotspot in jre, if hotspot is the jvm that can run java programs in th e first place?[21:22:26] <puppy_sa> it can, with the interpretter mode[21:22:29] <MyName> what do you need then ?[21:22:31] <MyName> oh[21:22:35] *** lresende has quit IRC[21:22:41] <MyName> how do i know th en if the jre i have has hotspot ?[21:22:42] <cheeser> which is what id does until the VM invokes hotspot[21:22:48] <maxote> Hotspot is related to Amhdal[21:22:57] <cheeser> MyName: stop worrying about it.[21:23:11] <MyName> i just want to know all these details, or do you think they are unimportant. ?[21:23:16] <MyName> i should focus on the java language itself?[21:23:18] <cheeser> they are irrelevant to you[21:23:20] *** hrehf has quit IRC[21:23:20] <MyName> ok[21:23:21] *** hrehf_ is now known as hrehf[21:23:24] <waz> MyName: at this point in your learning totally irrelevant[21:23:29] *** donwilliam has joined ##java[21:23:54] <cheeser> it's like really wanting one of those Dodge Hemis when you're still on a tricycle[21:24:06] *** donwilliam has quit IRC[21:24:10] <The_Miso> One more problem ... I want to search by a column in a table, and I get the columns title, but this title doesnt match the column in the database - how would you map such a thing?[21:24:35] <puppy_sa> MyName - it's better if you can find some kind of teacher in real life.[21:24:37] <cheeser> The_Miso: by the same logic you used to name that column in the JTable to begin with[21:24:43] <MyName> puppy_sa, can you be my teacher?[21:24:50] <MyName> also, what about microsoft jvm ?[21:24:50] *** Goundy has joined ##java[21:24:56] <cheeser> MyName: there isn't one.[21:25:04] <MyName> therte is[21:25:05] <Goundy> Hi[21:25:08] <puppy_sa> there was one[21:25:09] <The_Miso> Problem is - this is a community project .. and the group that it responsible for that part ... well .. didnt use any logic[21:25:10] <MyName> http://en.wikipedia.org/wiki/Microsoft_Java_Virtual_Machine[21:25:11] <cheeser> use sun's vm. learn java. stop asking stupid questions.[21:25:20] <The_Miso> So I have to do it myself somehow[21:25:27] <Goundy> Java HashTable: How to get the list of objects mapped by the same key X ?[21:25:32] <Fanook> The_Miso: your data access layer would be responsible for knowing what db name the app name is linked to[21:25:40] <Fanook> Goundy: there is only one object per key[21:25:42] <cheeser> The_Miso: they *did* "use logic" unless they generated randomized strings for names.[21:25:59] *** majyk has joined ##java[21:26:21] <Goundy> Fanook I've read that HashTable handles collisions by expanding the bucket so one bucket could hold more than 1 object[21:26:28] <The_Miso> Well they just read the columns titles, but I have to access the names given in the hibernate config[21:26:30] <chuck> is there a method like PHP's trim to get rid of whitespace at the end of a variable[21:26:33] <Fanook> yes, but buckets != keys[21:26:40] <MyName> i am readikng effective java, is that a good book[21:26:44] <cheeser> The_Miso: not for a sql query you don't.[21:26:56] <waz> ~~chuck javadoc String[21:26:57] <javabot> chuck, http://java.sun.com/javase/6/docs/api/java/lang/String.html[21:27:00] <cheeser> MyName: you should read more then ask fewer questions. write more code.[21:27:04] <The_Miso> Yeah but it's not an sql query, but an hql query[21:27:16] <MyName> ok.[21:27:28] <Goundy> Fanook a Key points to a bucket, and the bucket is a list of objects right ?[21:27:35] <cheeser> The_Miso: so look where they extracted values for that column to see how they determined the name[21:27:52] <Fanook> Goundy: no, a key points to a value. Buckets are an implementation detail[21:28:01] *** majyk has left ##java[21:28:10] *** choongii has quit IRC[21:28:11] <The_Miso> I can't access all their source - but I'll try - brb[21:28:19] <Goundy> Fanook What should I use then to be able to have a key maching several objects ?[21:28:24] *** choongii has joined ##java[21:28:35] <Fanook> Map<Key, List<Value>>[21:28:39] <chuck> waz, so the method is .trim, but I'm not sure how to use it[21:28:49] <cheeser> how community can it be if you can't access their source?[21:28:49] <chuck> fullText = fullText.trim brings up eclipse errors[21:28:59] <cheeser> methods take ()[21:29:02] <Fanook> chuck: trim is a method, not a member[21:29:02] <genesiss> .trim(); ??[21:29:04] <Goundy> Fanook ah ok thank you man[21:29:19] <DjZemich> Is it possible to catch two kind of exceptions in a single catch statement?[21:29:19] <waz> ~~chuck newbie ide[21:29:19] <javabot> chuck, 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.[21:29:25] <scorchsaber> chuck: Actually read the docs.[21:29:26] <chuck> oh, there we go, thanks (I'm too used to ruby ><)[21:29:33] <The_Miso> It's for university - I don't know if you call that a community project[21:29:34] <Fanook> Goundy: there are also third-party libraries that have multimaps[21:29:43] <cheeser> i wouldn't, no.[21:30:23] <The_Miso> well, english isn't my mother's tongue .. sorry if my information was misleading ..[21:30:37] <Goundy> Fanook hold : Map<Key, List<Value>>[21:30:41] <Goundy> it says List isn't generic[21:30:43] <Goundy> oO[21:30:45] <bobbytek> java is uncool[21:30:57] *** bobbytek was kicked by waz (waz)[21:31:19] <DjZemich> Is it possible to catch two kind of exceptions in a single catch statement?[21:31:23] <Fanook> Goundy: assuming you're using Java 5+, java.util.List is definitely generic. on the other hand, java.awt.List is definitely not[21:31:24] <cheeser> i wanted to do that![21:31:25] <cheeser> 8^)=[21:31:27] <Fanook> DjZemich: not yet[21:31:34] <DjZemich> Fanook: Okay thanks[21:31:42] *** bobbytek has joined ##java[21:31:43] <Goundy> oh damn[21:31:52] <Goundy> Fanook nevermind I took another list impl >_< sorry and thanks[21:31:55] <cheeser> unless they extend a common class[21:31:57] <cheeser> 8^)=[21:31:59] <waz> there you go cheeser[21:32:08] * cheeser licks his chops[21:32:19] <scorchsaber> Don't screw it up this time![21:32:25] <waz> fresh troll on aisle 1[21:32:29] <puppy_sa> DjZemich - catch Throwable. That catches everything[21:32:32] <cheeser> i'll do my best, coach![21:32:38] <waz> NO!!!![21:32:40] <cheeser> bad advice++[21:32:45] <scorchsaber> Ew. That's just wrong.[21:32:47] <Fanook> cheeser: if a gui widget and a data structure share a superclass other than Object, I need to hurt some people[21:32:48] <puppy_sa> he asks a question[21:32:55] <waz> hahah, typical java cert dude[21:33:07] <puppy_sa> no, I know it's not a good advice[21:33:11] <cheeser> Fanook: i was talking about catching exceptions but yes, you're probably right there.[21:33:13] <waz> then don't give it[21:33:14] <cheeser> 8^)=[21:33:29] <puppy_sa> waz - people need to ask a more specific question[21:33:40] <waz> and you need to not give crappy advice[21:33:40] <cheeser> puppy_sa: and people need to stop giving stupid advice[21:33:42] <Fanook> ah, wasn't paying attention to the other convo[21:34:06] <cheeser> Fanook: i'm jumping around a lot without much notice. it's not your fault. entirely. P^)=[21:34:13] *** zophy[] has joined ##java[21:34:27] <puppy_sa> it's only stupid if that doesn't do what he wants to do[21:34:35] <cheeser> no, it *is* stupid.[21:34:50] *** yolkaplexus has joined ##java[21:34:57] <puppy_sa> if you don't care about the exception, then you catch everything[21:35:04] <cheeser> using a battle axe to chop off the leg at the knee is good advice because it does take care of the ingrown nail.[21:35:05] <waz> NO[21:35:07] <puppy_sa> why people don't care, that is another question[21:35:08] *** puppy_sa was kicked by waz (waz)[21:35:21] *** puppy_sa has joined ##java[21:35:31] <cheeser> puppy_sa: then catch Exception and not Throwable.[21:35:49] *** gocsp_ has left ##java[21:36:03] *** androoid has joined ##java[21:36:04] <puppy_sa> see, if you kick me before I even see other people's response, then they need to repeat it[21:36:14] <androoid> harrrro![21:36:18] <scorchsaber> Throwable catches errors, too, which you don't want to catch unless you really want to catch them.[21:36:26] <cheeser> puppy_sa: i didn't repeat anything.[21:36:30] <scorchsaber> catching throwable catches*[21:36:41] <Goundy> how to initialize a List<E> ? ôO obviously I can't instanciate it[21:36:45] <androoid> anyone doing blackberry apps?[21:36:49] <waz> puppy_sa: you're right, I'm sorry, next time a ban will solve that problem[21:36:50] <cheeser> ~~ Goundy collection[21:36:50] <javabot> Goundy, collection is http://www.darksleep.com/notablog/format.cgi?article=Java_Collections_Tutorial.foo[21:37:12] <cheeser> ~info collection[21:37:12] <javabot> collection was added by: who knows?!? on 06-28-2005 at 9:53 PM, EDT and has a literal value of: http://www.darksleep.com/notablog/format.cgi?article=Java_Collections_Tutorial.foo[21:37:35] <puppy_sa> waz - there is no single answer to every question. Context is important.[21:38:01] <cheeser> puppy_sa: but there *are* stupid answers as we've seen. let's move on.[21:38:03] <Eyvind> And kicks and bans aren't tools of disagreement, at least not on this level[21:38:58] <cheeser> Eyvind: but they are good tools for silencing the illiterate[21:38:59] <cheeser> 8^)=[21:39:07] <puppy_sa> mmm[21:39:07] <scorchsaber> androoid: Somebody is, hopefully. If not, I feel sorry for the blackberry users and their stagnant platform.[21:39:56] <Eyvind> I read the javadocs on concurrent collections, but they were woefully vague as to their thread safety guarantees. Do they guarantee anything other than atomicity?[21:40:27] <cheeser> what more would you like?[21:40:42] *** jkriesten has quit IRC[21:41:09] <Eyvind> It's possible to make individual collections completely thread safe, but I don't want to assume that before I know for certain.[21:41:21] *** nofilicity has joined ##java[21:41:28] <nofilicity> Is it possible to call a function dynamically?[21:41:37] <r0bby> ~reflection[21:41:37] <puppy_sa> yes[21:41:37] <javabot> r0bby, reflection is http://java.sun.com/tutorial/reflect[21:41:40] <puppy_sa> reflection[21:41:44] <nofilicity> Thanks[21:41:57] <r0bby> nofilicity: functions don't exist, methods do tho.[21:42:12] <nofilicity> erm, right, sorry[21:42:13] <puppy_sa> you know what he meant[21:42:23] <nofilicity> Nah, I need to use proper terminology :p[21:42:30] <Eyvind> Always good to be clear[21:42:59] <puppy_sa> well, there is no formal body saying that is wrong either[21:43:07] <r0bby> there is puppy_sa.[21:43:13] * cheeser sighs.[21:43:23] <puppy_sa> between method and function?[21:43:23] <cheeser> who cares? you know what he wants.[21:43:26] <scorchsaber> puppy_sa: The spec isn't formal enough?[21:43:28] *** amz has joined ##java[21:43:45] <puppy_sa> let me see[21:43:47] <Eyvind> Let's move on, I'd rather have someone think about my question than argue about petty things like this[21:43:53] <cheeser> Eyvind: agreed[21:43:58] <r0bby> cheeser is right, I'm being a pedantic twat[21:44:11] <cheeser> s/,.*//[21:44:13] <cheeser> 8^)=[21:44:31] <Eyvind> It's good to have one pedantic twat, as long as there aren't more to be pedantic on the twat[21:44:36] <r0bby> cheeser: don't hear that often do we?[21:44:52] <cheeser> i hear it all the time![21:44:52] <cheeser> 8^)=[21:44:54] <scorchsaber> s/cheeser is/scorchsaber is/[21:45:11] <r0bby> scorchsaber: bad move![21:45:30] <scorchsaber> I'm not being serious, you know. :([21:45:46] <scorchsaber> (also, s/bad/good/)[21:45:51] <Eyvind> What are the thread safety guarantees of concurrent collections?[21:47:11] <puppy_sa> what kind of guarantees are you thinking of?[21:47:46] <r0bby> the api isn't clear enough for you?[21:48:14] <Eyvind> Any guarantees as far as concurrency is concerned. Internally syncronized collections (like Vector) guarantee (only) atomicity, for example.[21:49:37] <Eyvind> r0bby: I am still reading, but I haven't found anything definitive yet.[21:49:37] <r0bby> there are collections in java.util.concurrent[21:50:18] <Eyvind> Yes, those are the ones I am asking about.[21:50:40] <Eyvind> "A weakly consistent iterator is thread-safe, but does not necessarily freeze the collection while iterating, so it may (or may not) reflect any updates since the iterator was created."[21:50:57] *** CaptainMorgan has joined ##Java[21:50:57] <Eyvind> Wordings like that make me uncertains[21:50:57] <Eyvind> s[21:51:37] *** Chase has quit IRC[21:51:47] *** wng_z3r0 has quit IRC[21:52:00] <r0bby> so write your own[21:52:05] <r0bby> since you seem to know more[21:53:08] <cheeser> and you could answer less since you seem to know less[21:53:10] <cheeser> 8^)=[21:53:17] <Eyvind> I usually do write my own, but if there are library collections that provide the guarantees that I require, I would much rather use those.[21:53:57] <puppy_sa> Eyvind - Vector doesn't offer a stronger guarantee[21:54:13] <Eyvind> puppy_sa: I'm starting to realize that, which makes me wonder why they named them "Concurrent," and hence why I am still trying to figure it out[21:54:38] <mikejet> pr3d4t0r, you there?[21:54:54] <Shirik> Is it thread safe? Yes. It may not behave the way you want it to, but it's thread-safe.[21:55:31] *** exbio has quit IRC[21:55:46] *** exbio has joined ##java[21:55:48] <Shirik> Whether or not the iterator is consistent has no bearing on whether or not it's thread safe. It won't break, it just might not return the results you'd like. If it doesn't, write your own.[21:57:16] <Eyvind> Shirik: Consistency is often crucial to true thread-safety.[21:58:04] <Shirik> Determinism is crucial to real-time systems, not thread-safety[21:58:47] <gumpish> o_O is there such a thing as an "abstract" field? That is, I want to say in an interface or an abstract superclass that an implementing/extending class WILL have a field with such and such name, but without giving it a value in the abstract class/interface definition.[21:58:57] <Shirik> From wikipedia (which we all know is always 100% accurate) "A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads. In particular, it must satisfy the need for multiple threads to access the same shared data, and the need for a shared piece of data to be accessed by only one thread at any given time."[21:58:58] *** yolkaplexus has quit IRC[21:59:02] <Eyvind> Systems with multiple layers of threads always -- at least in my experience -- require consistency in their depending threads, otherwise race conditions pop up constantly.[21:59:05] <waz> java really isn't the best choice for real time systems[21:59:10] <cheeser> ~~ gumpish abstract[21:59:11] <javabot> gumpish, abstract is http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html[21:59:13] <Fanook> gumpish: not in Java, no. Scala has them though[21:59:27] <Shirik> I wasn't implying it was, waz, only that he's confusing thread safety with determinism[22:00:29] <gumpish> and I'[22:00:32] <gumpish> oops[22:01:03] <gumpish> and I'm guessing there's some overhead in using a getter method versus directly referring to someInstance.someField ?[22:01:22] *** Aquanox has quit IRC[22:01:25] <cheeser> very little[22:01:29] <Eyvind> Shirik: Even though I have found Wikipedia incorrect on many coutns when it comes to computer science, it does not exclude determinism as part of thread-safety.[22:02:31] <cheeser> Eyvind: http://is.gd/eniZ[22:03:22] <Eyvind> cheeser: Hah.[22:03:25] <Shirik> The comment about wikipedia being 100% correct was sarcastic. That being said, for something to be deterministic, it must be thread-safe. However, for something to be thread-safe, it does not need to be deterministic. (This is exemplified by your quote from the Java documentation)[22:03:29] <cheeser> 8^)=[22:04:18] *** mele- has joined ##java[22:04:34] <mikejet> I can write a not thread-safe program that is deterministic.[22:04:35] *** svm_invictvs has joined ##java[22:04:43] <Eyvind> Shirik: Okay, I grant that I might be throwing terms around alittle loosely, and I'm glad I'm not the only one with any idea about what I'm talking about, but this is exactly why I want clear guarantees.[22:05:08] <Shirik> well that's why the documentation specifically states that there is no guarantee, so that you know the limitations and, if you need to, allows you to write them yourself[22:05:26] <Eyvind> It doesn't specify that there is no guarantee, it just doesn't guarantee anything.[22:05:30] <Shirik> But that does not exempt itself from being justly in the "concurrent" package[22:05:48] <Shirik> it guarantees that it's thread safe![22:06:24] <Shirik> mikejet: Ok, maybe I should have been clearer, but it's pointless to correct it :P[22:06:34] <gumpish> lol[22:06:53] <Eyvind> No it doesn't. I can write code that breaks from race conditions with concurrent collections that you say are guaranteed to be thread-safe[22:07:07] <Shirik> define "breaks"[22:07:11] <Eyvind> And I was brought up in a world where race conditions were part of thread safety[22:07:27] <mikejet> define "define"[22:07:38] <r0bby> ~~ mikejet troll[22:07:38] <javabot> mikejet, Please go away.[22:07:45] <svm_invictvs> What are we talking about?[22:07:46] <svm_invictvs> Threading?[22:07:49] *** dv_ has joined ##java[22:07:55] <Shirik> He's concerned about this: "A weakly consistent iterator is thread-safe, but does not necessarily freeze the collection while iterating, so it may (or may not) reflect any updates since the iterator was created."[22:08:16] <Eyvind> No, I'm concerned about the concurrency guarantees that concurrent collections provide.[22:08:23] <Shirik> All that should ever happen is that any updates may or may not be reflected when you iterate over the list[22:08:29] <Shirik> Anything else should be safe[22:08:46] <Shirik> i.e., anything that ISN'T changed should still be found[22:08:54] <Eyvind> That quote was in explanation to someone else who was wondering about the guarantees I was asking for, it is not the core of my concern.[22:09:24] <svm_invictvs> Eyvind: That's a bit vague. Which ones specifically. Each of the concurrent safe collections have a very small set of very specific guarantees. And you should rely only on the specified guarantees[22:09:51] *** Tenac has joined ##java[22:09:52] *** M[]ssad has quit IRC[22:10:01] <mikejet> The thing that jumps out at me is if you aren't sure, the classes may be doing redundant/superfluous locks which may be messing up performance of your app.[22:11:01] <redeeman> im attempting to use another provider for jce, but it appears the implementations from sun takes precedence, how can i disable the sun implementations, and use only the ones that comes from other security providers?[22:11:13] <svm_invictvs> You can iterate a collection but the collection may change during iteration and you may not see the change in the course of hte iteration...[22:11:29] <ernimril> ~jvm options[22:11:29] <javabot> ernimril, jvm options is http://blogs.sun.com/roller/resources/watt/jvm-options-list.html[22:11:44] <svm_invictvs> SO if you have a list with a, b, c your iterator could point to b and right after you get the value for 'b', somebody else could have already erased it.[22:11:52] <svm_invictvs> So you're left with a stale element.[22:12:11] <puppy_sa> redeeman - you need to edit a file in JRE's security directory, if I recall[22:12:13] *** M[]ssad has joined ##java[22:12:21] <svm_invictvs> The guarantee is only that the behavior is well defined and your program is still in a defined state.[22:12:27] <redeeman> puppy_sa: no way i can do it with code?[22:12:36] <svm_invictvs> In other words, it won't crash. But that doesn't mean it's the behavior that's intended.l[22:12:42] <mikejet> r0bby, wtf?[22:12:47] <Eyvind> svm_invictvs: Yes yes yes, I understand that.[22:13:25] <Eyvind> And I agree that some of the (3) collections have clear guaranteees, but I can't find all of them[22:13:26] <puppy_sa> redeeman - I think so, but I just changed it in the JRE[22:13:39] <svm_invictvs> read the javadoc, carefully[22:13:58] <Eyvind> svm_invictvs: Trust me, I am[22:14:59] <Eyvind> svm_invictvs: For ConcurrentSkipListMap the closest thing to what I am looking for is: "Insertion, removal, update, and access operations safely execute concurrently by multiple threads."[22:15:17] <Eyvind> That's not specific enough.[22:15:28] <svm_invictvs> and[22:15:29] <puppy_sa> what do you want, then?[22:15:38] <svm_invictvs> So yeah, what do you want it to do?[22:15:54] <svm_invictvs> Make Julian Fries, as well?[22:15:56] <Eyvind> More specific guarantees, of course[22:16:01] <ernimril> redeeman: can you not just check the Cipher.provider?[22:16:13] <svm_invictvs> Eyvind: no, that's it. That's all you get.[22:16:14] <redeeman> ernimril: yeah i think i found way now, im trying[22:16:37] <Eyvind> svm_invictvs: Bah! I guess I'm back to writing my own for the foreseeable future[22:16:38] <ernimril> redeeman: the getCipher takes a Provider, that ought to give you the "right" version[22:16:48] <svm_invictvs> Eyvind: What do you want it to do?[22:17:18] <Eyvind> I don't really care what it does, as long as it can make specific guarantees about thread safety[22:17:27] <Eyvind> "safely execute" can mean oh so many things[22:18:09] <Eyvind> I mean, of course I care what it does, but I first need to know what it can guarantee[22:18:28] <redeeman> ernimril: thanks[22:18:31] <svm_invictvs> It means the map will be in a well-defined state if one or more threads try to insert, remove, or update elements.[22:18:49] <svm_invictvs> That the map's internal data structure will not fail.[22:19:19] <ernimril> redeeman: why do you really care? is this other crypto better than the sun one? or are you trying to benchmark them?[22:19:54] <puppy_sa> ernimril - probably need a stronger cipher[22:20:01] <redeeman> ernimril: just trying stuff out, right now im having a padding problem it seems[22:20:12] <redeeman> also that yes[22:20:24] <ernimril> puppy_sa: stronger? what does sun not provide?[22:20:38] <redeeman> you need to download an extra file for sun to support 256bit AES[22:20:47] <puppy_sa> there you go[22:20:49] <redeeman> which must be installed into the JRE[22:21:25] <Eyvind> svm_invictvs: Okay, that is a good guarantee. Doesn't help me though. Thank you, though![22:21:25] <Eyvind> ~svm_invictvs++[22:21:27] <javabot> svm_invictvs has a karma level of 29, Eyvind[22:23:02] *** ernimril has quit IRC[22:23:02] *** fukazzz has quit IRC[22:23:21] *** ernimril has joined ##java[22:25:14] *** ernimril has quit IRC[22:25:28] *** ernimril has joined ##java[22:25:35] *** amnesiac has joined ##java[22:26:00] <mikejet> Crypto padding is funny. Its amazing how many bugs that causes.[22:26:27] <puppy_sa> you can use streaming cipher/mode[22:26:29] *** cvasilak has quit IRC[22:26:37] <puppy_sa> or he can[22:27:48] <svm_invictvs> crypto padding?[22:28:06] <puppy_sa> padding a buffer to fit the block size[22:28:20] *** e319 has joined ##java[22:28:24] <puppy_sa> if block-mode/cipher is used[22:30:36] <redeeman> puppy_sa: do you have some link for examples or something?[22:30:52] <puppy_sa> redeeman - to do what?[22:30:58] <redeeman> use streaming mode[22:31:14] <redeeman> im guessing that's something that will allow me to have padding done automatically?[22:32:03] *** phytopius has quit IRC[22:32:04] <puppy_sa> streaming mode means that the size of the incoming buffer is the same as the outgoing one[22:32:27] *** alek_b has joined ##java[22:32:27] <puppy_sa> or rather, the result buffer[22:32:28] *** mele- has quit IRC[22:33:43] *** arpu has joined ##java[22:34:07] *** aksn has quit IRC[22:39:44] <genesiss> ~threads[22:39:45] <javabot> genesiss, threads is http://java.sun.com/tutorial/essential/threads[22:39:57] *** toytoy has joined ##java[22:44:05] *** mele- has joined ##java[22:44:55] <mikejet> Anyone here try running the blu-ray Java VM? What's new with that?[22:45:15] *** puppy_sa has quit IRC[22:47:16] <chuck> Does anyone have any ideas on why eclipse is failing to "resolve" java.util.ArrayList and Instance?[22:47:31] <cheeser> because you're a newbie[22:47:42] <cheeser> ~newbie ide[22:47:42] <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.[22:47:46] *** exbio has quit IRC[22:50:02] *** amnesiac has quit IRC[22:50:04] *** androoid has quit IRC[22:50:16] *** exbio has joined ##java[22:50:40] <r0bby> cheeser: does this happen outside of eclipse?[22:50:44] <r0bby> er chuck[22:50:45] *** Carnage\ has quit IRC[22:50:58] *** amz has quit IRC[22:50:59] <r0bby> hint: it shouldn't[22:51:11] *** amz has joined ##java[22:51:50] <chuck> r0bby, when I run the ant build scripts, it does, but when i do javac ICRDemo.java, I don't see any errors about the problems I was having with it[22:54:17] <chuck> Are there any alternatives to ArrayList? I've concluded that eclipse is doing this because the smartpen doesn't have ArrayList or Iterator so it won't let me compile stuff that imports them on my computer[22:54:44] <r0bby> wait, you're not doing this on a standard JDK?[22:54:49] <r0bby> (ie Java SE?)[22:55:01] <waz> haaha[22:55:11] <rudenstam> sounds like j2me[22:55:22] <rudenstam> or something similar[22:55:29] <r0bby> chuck: java ME is stripped down to the bare minimum.[22:55:30] <waz> you've concluded that Eclipse is failing to do a simple task[22:55:36] <chuck> r0bby, I'm using an SDK for this smartpen[22:55:51] <r0bby> chuck: dude you think this information would have been helpful?[22:55:59] <paulweb515_> waz: no, he's concluded that eclipse is correctly not compiling something that doesn't exist in j2me[22:56:00] <chuck> >< sorry[22:56:09] <chuck> paulweb515_, yes[22:56:35] *** rubeus80 has joined ##java[22:56:36] <r0bby> chuck: ever consider i don't know...looking at the javadocs to see if that class exists? perhaps looking for an alternative?[22:56:41] <rubeus80> hi[22:57:07] <paulweb515_> chuck: when you expanded java.util was Vector there?[22:57:14] <chuck> paulweb515_, yes[22:57:18] <chuck> Vector and VectorEnumerator[22:57:22] <r0bby> so use Vector.[22:57:42] <r0bby> (Java ME is insanely stripped since it's running in such a small space.[22:57:48] <paulweb515_> AraryList is the better option, but not available in CLDC1.0 or Foundation 1.0 ...[22:58:13] *** M[]ssad has quit IRC[22:58:58] <rubeus80> i have a problem with an application...i present to the user a html form in a jtextpane..the problem is that reading the content of the pane after the user has introduced the data in the form shows me nothing...i have the html but not the value of the inputs...how could i do to read it?[23:00:05] <rubeus80> i wouldn't like to use a web server to get the form[23:01:59] *** SystemWizard has joined ##java[23:02:19] <rubeus80> is there any listener i could use to listen to the submit button and capture the data? or another solution[23:02:29] <paulweb515_> And I was wrong about that ... Foundation 1.0 does include ArrayList, just not CLDC 1.0[23:05:24] *** hanen has quit IRC[23:06:41] <chuck> i'm sooo close[23:06:58] <chuck> is there something wrong with this code? (mainly, the fullText parts): http://pastie.org/350220[23:07:10] <chuck> eclipse says this: The local variable fullText may not have been initialized[23:07:53] *** _acid__ has joined ##java[23:08:11] <cheeser> so initialize the variable.[23:08:13] <cheeser> duh[23:08:16] *** CodeWar has joined ##java[23:08:46] <chuck> =( how[23:08:49] <CodeWar> someObject.method( stringVar = new String("this is the input string" )); // this is legal but not ..[23:08:59] <CodeWar> someObject.method( String stringVar = new String("this is the input string" ));[23:08:59] <cheeser> give it a value[23:09:11] <cheeser> ~smack CodeWar[23:09:11] * javabot smacks CodeWar in the mouth[23:09:55] <r0bby> String foo = "foo";[23:10:07] <r0bby> ~~chuck rbi[23:10:07] <javabot> chuck, reallybigindex is http://java.sun.com/docs/books/tutorial/reallybigindex.html[23:10:14] <CodeWar> r0bby, sure but I wanted to use the new to highlight a different point[23:10:29] <cheeser> i can't imaging what point that'd be[23:10:42] <r0bby> or how it's relevent.[23:11:17] <CodeWar> that a variable cannot be declared in the method invocation list but can be done so when using for ./ while[23:11:45] <cheeser> funny. it's much clearer when you just say that rather than writing that code snippet[23:11:59] <CodeWar> isnt that why somebody smacked me:)[23:12:17] <r0bby> chuck: and it's not eclipse that's saying that, it's the compiler. Quit using eclipse and start using a text editor until you realize that.[23:12:25] * r0bby spanks CodeWar[23:13:00] * CodeWar slits r0bby's wrists lets him bleed for a while[23:13:27] <cheeser> i smacked you for writing new String("foo")[23:13:46] <chuck> r0bby, yeah, I'm going to actually learn java without eclipse after this :P[23:13:52] <CodeWar> how generous[23:14:10] *** mbroeker has joined ##java[23:14:30] *** EspenG has quit IRC[23:14:37] <r0bby> chuck: do it now[23:14:45] <cheeser> "do it, doug!"[23:14:52] *** JGarrido has quit IRC[23:14:53] <r0bby> DO IT DOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO IT[23:14:54] <chuck> r0bby, well after this *is* now, I think my penlet will finally work this time[23:15:13] <r0bby> sounds funnier when it's spoken[23:16:08] *** MrJoePink has joined ##java[23:17:33] <CodeWar> something more => SomeClass a = null; method(a = new SomeClass(12)); now the compiler says SomeClass a is never used locally[23:18:00] *** robyonrails has quit IRC[23:18:26] <mikejet> Bob Eubanks is so gay.[23:18:48] * cheeser eyes mikejet[23:19:02] *** exbio has quit IRC[23:19:05] *** aksn has joined ##java[23:19:18] *** exbio has joined ##java[23:20:19] *** exbio has quit IRC[23:26:04] <r0bby> mikejet: favor: don't do that. It's incredibly immature.[23:26:59] <r0bby> and big fucking deal if he is.[23:27:15] *** Xianny has joined ##Java[23:28:59] *** exbio has joined ##java[23:29:57] *** CodeWar has quit IRC[23:30:23] *** exbio has quit IRC[23:33:01] *** rubeus80 has quit IRC[23:33:28] *** arpu has quit IRC[23:33:46] <genesiss> how can i past formated (and colored) java code to word?[23:33:55] <cheeser> ~pastebin[23:33:55] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[23:34:10] *** rudenstam is now known as rudenstAm[23:34:10] <cheeser> ~topicsmite genesiss[23:34:11] <javabot> And the wrath of /TOPIC descended with terrible fury upon genesiss. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified.[23:35:17] *** arpu has joined ##java[23:35:59] <genesiss> cheeser, how can pastebin help me there?[23:36:57] *** Dr_Link has quit IRC[23:37:16] *** Dr_Link has joined ##java[23:37:32] *** odinsbane has joined ##java[23:37:38] <r0bby> genesiss: google didn't help?[23:37:55] <genesiss> no[23:38:04] *** ilyak has joined ##java[23:38:05] <ilyak> Wiw[23:38:10] <r0bby> what format do you want?[23:38:12] <r0bby> indented?[23:38:14] <ilyak> my java've crashed[23:38:17] <ilyak> under hprof[23:38:54] <genesiss> r0bby, yes[23:39:14] <r0bby> http://www.javakb.com/Uwe/Forum.aspx/java-setup/1921/format-java-source-code-in-M-Word[23:39:19] <r0bby> found via google.[23:40:36] *** BSWolf has joined ##java[23:40:38] *** mikejet has left ##java[23:41:04] *** ernimril has quit IRC[23:42:13] *** ernimril has joined ##java[23:43:03] <genesiss> tnx r0bby[23:44:34] *** MrJoePink has quit IRC[23:46:43] *** MyName has quit IRC[23:46:59] *** NuMaStresa has joined ##java[23:48:20] *** SystemWizard has quit IRC[23:50:31] *** The_Miso has quit IRC[23:50:54] *** cerberusaeon has quit IRC[23:52:39] *** timte has quit IRC[23:53:41] *** chessguy has joined ##java[23:54:54] *** giantrobot has quit IRC[23:55:20] *** DjZemich has quit IRC[23:55:24] *** giantrobot has joined ##java[23:56:22] <Goundy> is there something I could use like that: bool result = evaluate("1>10"); ?[23:56:37] <pstickne> no.[23:56:50] <pstickne> although I am sure there are plenty of libraries out there[23:57:00] <ilyak> Goundy: There is[23:57:03] <pstickne> (to parse/do math/eval/etc.)[23:57:05] <Goundy> ah[23:57:07] <pstickne> ilyak: standard?[23:57:09] <ilyak> Read on javax.script[23:57:13] <ilyak> pstickne: sure[23:57:16] <pstickne> ilyak: crazy[23:57:19] <Goundy> ah[23:57:19] * pstickne goes to look[23:57:28] <Goundy> could Java really make coffee ? damn[23:57:29] <ilyak> ~tell Goundy about javax.script[23:57:29] <javabot> Goundy, I have no idea what javax.script is.[23:57:39] <Goundy> ^^[23:57:47] <ilyak> http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html[23:58:17] <ilyak> http://javacook.darwinsys.com/new_recipes/26callingall.jsp[23:58:34] <pstickne> ilyak: eww[23:58:45] <ilyak> pstickne: what?[23:59:03] <pstickne> ilyak: nvm.[23:59:18] <ilyak> there's an example at the second link, just replace print with 1>10 there[23:59:24] <ilyak> and you've got your engine.eval()[23:59:32] <ilyak> I guess[23:59:35] <pstickne> ilyak: I'm just thinking of all the ways Java tries to extend itself by swinging around JSRs like a mace.[23:59:44] <Goundy> thanks o