NOTICE: This channel is no longer actively logged.
[00:01:31] *** OsAC has quit IRC[00:02:06] *** biozit has joined ##java[00:03:34] *** OsAC has joined ##java[00:04:10] <poseidon> ~thread[00:04:10] <javabot> poseidon, threads is http://java.sun.com/tutorial/essential/threads[00:04:46] *** waz has quit IRC[00:05:18] *** Drizzt321 has joined ##java[00:06:03] *** delskorch has joined ##java[00:06:18] *** squiddle has quit IRC[00:06:27] *** donavan has quit IRC[00:06:29] *** vix85 has joined ##java[00:06:57] *** tansaku has joined ##java[00:08:23] <Drizzt321> so, I'm running my application on our test system (a virtualized linux machine), and I keep getting out of memory exceptions when I try and load the test data. The java VM has 256megs of memory allocated to it, and I've tried up to 512meg and it keeps running out of memory On my local dev machine (WinXP, Netbeans6.5) I do the exact same thing with the exact same code, and it only takes up...[00:08:25] <Drizzt321> ...about 140megs of memory. Anyone have any possible clues why the exact same code and the exact same data would have such drastically different results?[00:08:56] *** blahjake has quit IRC[00:09:38] *** _graham_ has quit IRC[00:09:50] <lorbrito> what is the size of you ram?[00:09:55] <lorbrito> in hardware[00:10:28] <BobSapp> my ram, big.[00:10:35] <Drizzt321> on my local machine? 2 GB, on the server, 371MB[00:10:41] <OsAC> filesystem prob[00:10:45] *** BobSapp has quit IRC[00:10:55] *** dv_ has quit IRC[00:11:07] *** donavan has joined ##java[00:12:56] *** waz has joined ##java[00:13:04] *** meanburrito920_ has joined ##java[00:13:35] *** sombriks has quit IRC[00:14:08] *** sombriks has joined ##java[00:14:19] *** donavan has quit IRC[00:14:33] <Drizzt321> erm...anyone have any ideas? thoughts? random paranoid delusions that might apply to my problem?[00:14:47] <lorbrito> are you diposing the application?[00:14:55] <Drizzt321> diposing?[00:15:34] *** sombriks has quit IRC[00:15:49] <Drizzt321> what do you mean by diposing?[00:16:00] <gionny> Drizzt321: I guess you should try it on a "real" linux box, not a virtualized one... who knows? maybe it is a virtualization problem[00:16:09] *** pgib has quit IRC[00:16:25] <Drizzt321> gionny: I've run similar things through just this morning, although the data set wasn't quite so big and it has no problems with running out of memory[00:16:39] <OsAC> you get memory exception sometimes also for filesystem stuff, if your app is trying to open too many files[00:16:50] <Drizzt321> hrm...unlikely[00:16:54] <Drizzt321> its a single file[00:17:08] <Drizzt321> I do have a couple of output's through log4j to log files, but I think its a total of 5 files[00:17:10] <gionny> Drizzt321: and, besides, you said that your virtualized linux has got only 371, if I understood right?[00:17:23] <gionny> I mean... 371 MB[00:17:24] <OsAC> :-D[00:17:28] <Drizzt321> gionny: of RAM, yes, but it has another 767megs swap[00:17:52] <Drizzt321> so something like a 1GB total virtual memory[00:18:06] <gionny> Drizzt321: if I remember right, the jvm options to set the heap size depends on your phisical memory size[00:18:21] <dmlloyd> what is it doing when it runs out of RAM?[00:18:23] *** marvs has quit IRC[00:18:34] *** odinsbane has quit IRC[00:18:38] <Drizzt321> starting to make the system crawl as it starts filling up the swap[00:18:48] <dmlloyd> what does the OOM say? permgen?[00:19:37] <dmlloyd> remember that a 64-bit VM may need substantially more RAM[00:19:42] <Drizzt321> its 32-bit[00:20:01] <Drizzt321> oh, hrm...no, the java on the linux box is 64-bit[00:20:08] <dmlloyd> other than that you should use a profiler or something to see what's using up all your RAM[00:20:08] *** lorbrito has quit IRC[00:20:27] <gionny> Drizzt321: you should try that on a real linux box, I guess, if this is for a 'serious' test[00:20:29] <Drizzt321> on my local machine I did, and what I expected to eat up my memory was[00:20:44] <Drizzt321> I'll try cutting the filesize in half and see if that does anything[00:20:46] *** vezzoni has quit IRC[00:21:16] <gionny> Drizzt321: and, anyways, you should not experiencing problem... if it runs on windows, it should run the same way (or even better! :P) on linux, if it is all native java[00:21:23] <Drizzt321> exactly[00:21:31] <dmlloyd> if you're dealing with a large file, it's usually advisable to stream the data if possible (rather than keep it all in RAM at one time)[00:21:33] <gionny> Drizzt321: so why do you need this test?[00:21:51] <Drizzt321> gionny: to test the system and make sure it gives correct entries in the DB[00:22:04] <gionny> Drizzt321: my point is... test it in a 'real' linux box if you really need that[00:22:09] <Drizzt321> dmlloyd: for local files (I also deal with files fetched over FTP), I do[00:22:25] <dmlloyd> either way[00:22:52] *** buntfalke has quit IRC[00:23:37] *** yakman_ has joined ##java[00:24:10] <gionny> Drizzt321: so you have a dbms running, a java application... and what else? with 375 MB ram... I guess that's not so much[00:24:30] <Drizzt321> I have activemq running[00:24:46] *** T^DNDCode has joined ##java[00:24:47] <T^DNDCode> how do i send emails with java[00:24:48] <Drizzt321> DMBS is on the host system, so not affected by this linux VM's total available ram[00:25:22] <T^DNDCode> !tell T^DNDCode javax.mail[00:25:33] <dmlloyd> ~~ T^DNDCode igb[00:25:34] <javabot> Is google broken?[00:26:07] <T^DNDCode> lolz I'm jk[00:26:09] *** T^DNDCode has left ##java[00:26:19] <gionny> Drizzt321: uhm... I really don't know. I guess you should find someone that knows more about virtualization and jvm memory handling, I'm sorry, I can't help more here[00:26:31] *** Therx has quit IRC[00:26:33] <gionny> Drizzt321: good luck anyways[00:26:34] <Drizzt321> gionny: thanks for trying[00:26:38] <gionny> no problem![00:26:54] <gionny> bye, time for bed, see ya[00:27:06] *** gionny has quit IRC[00:28:34] *** donavan has joined ##java[00:29:04] *** yakman_ has quit IRC[00:29:57] *** jonaslund has joined ##java[00:31:08] *** DragonLord- has quit IRC[00:31:32] *** thepointer-work has joined ##java[00:33:15] *** ahughes has joined ##java[00:33:33] *** Akuma has joined ##java[00:34:21] *** Akuma has quit IRC[00:34:45] *** The_Birdman has joined ##java[00:34:48] <Drizzt321> oh, very interesting[00:34:52] <Drizzt321> the data was slightly bad[00:35:07] <Drizzt321> I was expecting \r\n line endings, I had \n line endings[00:35:35] <Drizzt321> which made it think that the _entire_ file was one record, instead of only reading through one line at a time which is each record[00:35:45] <Drizzt321> no wonder I ran out of memory when it was trying to do some of those copies[00:36:46] *** Malformation has quit IRC[00:40:14] *** vix85 has quit IRC[00:40:19] *** MatheusNg has joined ##java[00:40:27] <cybereal> ~javadoc AccessController[00:40:28] <javabot> cybereal: http://is.gd/iYjk [java.security.AccessController][00:41:13] *** poseidon has quit IRC[00:41:18] *** Tenac has joined ##java[00:42:39] *** MatheusNg has quit IRC[00:44:03] *** Drizzt321 has quit IRC[00:46:09] *** ankylose has quit IRC[00:46:44] <tieTYT2> so is java 100% open source or not?[00:46:49] *** hrehf has quit IRC[00:46:53] *** TryNiX has left ##java[00:46:56] <dmlloyd> openJDK is 100% open source afaik[00:47:05] <tieTYT2> yeah but when you go to sun.com, you don't get that one[00:47:07] <dmlloyd> Java is a registered trademark[00:47:19] <dmlloyd> sun's is called HotSpot, and that is not open source[00:47:20] <tieTYT2> so what?[00:47:34] <dmlloyd> so "is java 100% open source" makes no sense[00:47:39] <cybereal> so.... dmlloyd being a registered mark has nothing to do with oss[00:47:55] <tieTYT2> sun can let the open source project use the TM if they wan't[00:47:56] <tieTYT2> want[00:48:02] <dmlloyd> Java is a language. OpenJDK is an impl, HotSpot is an impl, IBM has an impl, Apple has an impl etc[00:48:13] <cybereal> tieTYT2: openjdk is complete and oss but it's not an optimal version compared to hotspot[00:48:15] <dmlloyd> the OpenJDK impl is open source, others are not[00:48:19] <cheeser> openjdk has a JIT...[00:48:20] <cybereal> tieTYT2: so it's still going by the wayside at the moment[00:48:27] <cheeser> i'm pretty sure hotspot is in there.[00:48:29] *** Akuma0n3 has quit IRC[00:48:38] <tieTYT2> will the default sun.com download ever be openjdk?[00:48:43] <cybereal> tieTYT2: I imagine it won't be long before the two versions are the same one though[00:48:52] <cheeser> tieTYT2: yes. that's the plan for java7[00:48:54] <surial> and the JLS is freely readable and is not encumbered with non-disclosure-agreements or anything. In this sense, java the language is open source. There are also widely used and up to date open source implementations. Add thes two up and I think its perfectly fine to say: Java is Open Source.[00:48:56] *** OsAC has quit IRC[00:48:57] <dmlloyd> my guess is that Java 7 will be OpenJDK or at least based on it[00:48:57] <tieTYT2> great[00:49:20] *** funktor has quit IRC[00:49:27] <cheeser> you can, in fact, run java6 using openjdk if you choose, though that's an unofficial "release"[00:49:30] <surial> dmlloyd: I believe (but don't quote me) that Danny Coward and company hack on java7 by way of working on a branch of openjdk.[00:49:33] <tieTYT2> i'm assuming if sun goes under after that point, java can still survive[00:49:43] *** nihilis7 has quit IRC[00:49:44] <cheeser> it'll survive regardless.[00:49:47] <dmlloyd> sun could go under now[00:50:04] <tieTYT2> would it survive because of openjdk?[00:50:09] <cheeser> oracle/ibm/google/redhat would likely buy the java property[00:50:14] * surial continues to marvel at the notion that the term 'open source' is not registered and has no legal meaning.[00:50:15] <dmlloyd> openJDK is already distributed with lots of linuxes[00:50:16] <tieTYT2> i see[00:51:19] <surial> tieTYT2: both are sufficient - IBM, google, oracle, and a few other companies can probably justify paying for everything sun is currently putting into java for their own bottom line, *AND* the community would continue off of the openjdk, which is at this point more complete than sun's own non-foss version and is (AFAIK) the version that sun is working off of now.[00:51:33] <surial> so that's two failsafes in the unlikely event that sun as a whole jettisons java and washes their hands off it.[00:51:46] <cheeser> surial: java 6 is not based on openjdk[00:51:51] <dmlloyd> considering that they changed their stock symbol to "JAVA"...[00:51:57] <cheeser> so the recent u12 release did not come from openjdk[00:52:01] <surial> no, but sun's internal java7 dev tree is, or so I've been told.[00:52:11] <cheeser> yes, that's my understanding, too.[00:52:13] <tieTYT2> surial: what do any of those companies gain from owning java?[00:52:31] *** OsAC has joined ##java[00:52:31] <surial> tieTYT2: from 'owning'? I have no idea. Ask a marketing type. But for maintaining and ensuring a stable community? Many things.[00:52:51] <cheeser> sun makes a shitload of money off of "owning" java.[00:52:56] <tieTYT2> cheeser: how?[00:53:06] <cheeser> licensing, etc.[00:53:13] <tieTYT2> how does that make money?[00:53:17] *** morkar- has quit IRC[00:53:19] <cheeser> read the sun financial reports. it's all there.[00:53:20] <tieTYT2> what's the scenario[00:53:21] <surial> tieTYT2: For example, google's adsense backend is 100% java. And it's the source of, what, 90% of their yearly earnings?[00:53:36] <surial> tieTYT2: I believe they get money for shipping j2me on phones.[00:53:42] *** Greeny_ has quit IRC[00:53:49] <cheeser> but now that this meeting is *finally* over, i'm going to have some dinner with my kids before they go to bed.[00:54:01] *** KarlsBerg87 has joined ##java[00:54:11] <surial> tieTYT2: but, yeah, read the sun financial reports for more info. Because java is utterly safe in two ways, I really don't give a shit if sun can or cannot make money off of java. I do know that sun's java branch, whatever they do, booked solid gains and makes money.[00:54:30] <tieTYT2> i see[00:55:06] <KarlsBerg87> someone can explainme a little bit why i get this message log when open eclipse? http://dpaste.com/118739/ yesterday this open fine.[00:55:22] <surial> they also have this business plan where you have to pay if you still want sun to support java 1.4. And partly because a few people are utter retards and still believe IBM's consultancy branch is worth more than punching shit in a bag, there's a market for that. Though, I don't think sun is relying on that one.[00:55:42] <surial> KarlsBerg87: nice. I have no idea. did you try googling for "NULL: java.lang.Object" eclipse[00:55:53] <tieTYT2> i see[00:55:55] *** Vicfred has quit IRC[00:56:27] *** skypce has joined ##java[00:56:36] <tieTYT2> anyway, back to my game: i decided to make abilities generally responsible for their own logic[00:56:38] *** odinsbane has joined ##java[00:56:48] <surial> sounds sensible.[00:56:59] <tieTYT2> the hp damage status effect checks if the player has protect on them and reacts accordingly[00:57:00] *** schasi has quit IRC[00:57:14] <tieTYT2> but the protect ability is the one that has the logic of its duration and things like that[00:57:26] <skypce> hi i need save a id from a jcombobox , and show the names, how can i do please?[00:57:27] <skypce> ResultSet resultados = instruccion.executeQuery("select * from familias");[00:57:27] <skypce> while (resultados.next()){[00:57:27] <skypce> String txt = resultados.getString("nomfam");[00:57:27] <skypce> Integer id = resultados.getInt("idfam");[00:57:27] <skypce>[00:57:29] <skypce> select_familia.addItem(txt);[00:57:32] <skypce>[00:57:35] <skypce> }[00:57:36] *** picca has quit IRC[00:57:46] <tieTYT2> skypce: way to read the topic[00:57:48] <surial> ~~skypce pastebin[00:57:48] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.[00:57:56] <surial> but don't bother now, you've pissed off the entire channel.[00:58:00] <odinsbane> Is there a better way to change a Double[][] to a double[][] than iterating through and using doubleValue()?[00:58:17] <surial> odinsbane: nope.[00:58:24] <skypce> ok thanks i will paste in pastebin[00:58:31] <tieTYT2> odinsbane: why do you need to?[00:58:33] <surial> odinsbane: You're also changing pointers to direct values so there's no hypothetical way to do it faster either.[00:59:07] *** FireSlash has joined ##java[00:59:11] <odinsbane> Well I want a copy of the values.[00:59:12] <skypce> now , http://www.pastie.org/384525 can you helpme please[00:59:22] <KarlsBerg87> surial: of course without successfull[01:00:02] <KarlsBerg87> http://www.google.es/search?q=NULL%3A+java.lang.Object+&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:es-ES:unofficial&client=firefox-a[01:00:08] <KarlsBerg87> dont return too..[01:01:21] <tieTYT2> surial: have you read clean code, the book?[01:01:47] *** popcornPanic has joined ##java[01:02:12] <surial> tieTYT2: no.[01:02:38] <tieTYT2> he gives advice that most methods should be no longer than 3 lines[01:02:54] <surial> odinsbane: Doubles are immutable. Not too much sense in copying just because you need a coopy of the values. and making copies of arrays can be done with System.arraycopy or Arrays.copyOf[01:03:00] <surial> tieTYT2: That's a bit extreme.[01:03:02] <tieTYT2> which I find interesting and kinda explodes the # of lines in your classes[01:03:38] *** gregor_k has quit IRC[01:03:46] *** metaperl has quit IRC[01:03:57] *** brady_k has joined ##java[01:03:59] <tieTYT2> it is, but maybe it'd make things better[01:04:04] <brady_k> hey everyone[01:04:11] *** r0bby has joined ##java[01:04:30] <surial> tieTYT2: Takes those kinds of rules too seriously is never a good thing. There's good wisdom in splitting a method into two (or three, or four...) earlier rather than later, but there is a limit.[01:04:43] *** axod has joined ##java[01:04:56] <axod> hi is there an easy way to do async dns lookups in java?[01:05:12] <tieTYT2> surial: have you tried to split your methods up that small before?[01:05:34] <svm_invictvs> public abstract final class![01:05:35] <svm_invictvs> wee[01:05:46] *** pressingonalways has quit IRC[01:07:33] <surial> tieTYT2: I don't split up methods just because they exceed a certain line number.[01:07:44] <surial> I split up methods because they are trying to do too much at once or are too complicated.[01:07:56] <surial> axod: Spin up a thread.[01:08:12] <axod> *sigh*[01:08:13] <svm_invictvs> surial: howabout when they just don't make any fucking sense.[01:08:17] <axod> threads are horrible[01:08:32] <axod> so that's awful advice[01:08:48] <svm_invictvs> axod: why are threads awful?[01:08:51] *** cactaur has joined ##java[01:08:54] <surial> axod: 'threads are horrible'? Who the fuck are you to be so mean to them? What did threads ever do to you?[01:09:06] <axod> threads are for people who can't program properly[01:09:11] <brady_k> ok so i'm having an issue handling hex inputs as mock assembly commands[01:09:12] <tieTYT2> hah[01:09:13] <brady_k> full info: http://pastebin.com/d345dbd65[01:09:35] <axod> especially to do dns lookups :/[01:10:06] <surial> axod: You're clearly full of shit.[01:10:18] <svm_invictvs> axod: Perhaps you should look at nio.[01:10:25] <surial> svm_invictvs: which doesn't do DNS lookups.[01:10:42] <axod> svm_invictvs: sure... I may write a simple dns client with nio, just wondered if there was something existing[01:10:58] <axod> surial: you like threads eh...[01:11:01] <svm_invictvs> axod: Write a JSR[01:11:09] <axod> JSR?[01:11:10] <surial> brady_k: to parse hex stuff, use Integer.parseInt(String, int);[01:11:13] <surial> and supply 0x10 for the int.[01:11:39] <dmlloyd> ~~axod xnio[01:11:39] <javabot> axod, 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![01:11:49] <surial> axod: No, I just think you're a fucking idiot if you paint threads as some great evil. 1) They just aren't, and 2) Something as simple as spinning off a DNS lookup is done with threads, of course. Use java.util.concurrent.Future.[01:11:56] <brady_k> surial: thanks[01:12:10] <axod> surial: I typically have around 4,000 dns lookups to do at a time[01:12:17] <brady_k> surial: you're a genius![01:12:17] <dmlloyd> I don't get why people think that "NIO" is the opposite of "threads"[01:12:32] * brady_k be back later... phone[01:12:34] <axod> and yes, I think threads are usually a bad idea unless you *HAVE* to wait for something external[01:12:41] <svm_invictvs> surial: to be fair, you don't know his perticular use case so just saying, "just use threads" isn't necessairly the right suggestion either.[01:12:56] <svm_invictvs> dmlloyd: he asked how to asynchronously do dns lookups, I said "nio"[01:12:59] <surial> svm_invictvs: You CANNOT make async DNS requests in the current JVM.[01:13:05] <tieTYT2> this folder is going to take 47 minutes to delete...[01:13:05] <surial> svm_invictvs: nio can't do it.[01:13:09] <axod> surial: yes you can[01:13:14] <axod> you write a dns client.[01:13:17] <dmlloyd> I'd use XNIO and a future[01:13:17] <surial> axod: fucking look at Future already.[01:13:19] <axod> nio *can* do it[01:13:33] <dmlloyd> in *fact*, XNIO has a special future type called IoFuture which is *even better* suited to this kind of thing[01:13:34] <surial> It used threads internally, so assuming you can swallow your bigotry for a moment, that would probably be the nicest design.[01:13:59] <svm_invictvs> axod: Part of JCP. If you feel there is a deficiency in the language you write a JSR (Java Specificion Request) which is like a standardization process for java libraries and enhancements.[01:14:05] <axod> surial: do you think threads are optimal, when #threads > #cores ?[01:14:10] <axod> or suboptimal?[01:14:15] <dmlloyd> axod: it's never that simple[01:14:16] <surial> axod: Optimal.[01:14:22] <dmlloyd> that said, surial does like to troll[01:14:25] <axod> surial: explain[01:14:33] <axod> it's obviously suboptimal[01:14:39] <surial> axod: You're obviously full of shit.[01:14:40] <svm_invictvs> axod: threads per core?[01:14:45] <axod> it can never be as optimal as #threads = #cores[01:14:45] <surial> Go spin up, say, 1000 threads on linux 2.6 with openjdk6.[01:14:49] <dmlloyd> it's not inherently suboptial, it depends on your use case[01:15:10] <surial> do a bunch of mostly independent calculations. Or not. whatever. Then do the same job in an async way. I'll guarantee you that the difference, if any, is within statistical error.[01:15:15] <axod> dmlloyd: how can introducing context switching be optimal :/[01:15:18] <dmlloyd> if your tasks block, even a little, you can't efficiently use #threads == #cores[01:15:19] <svm_invictvs> I agree with dmlloyd on this one.[01:15:28] <surial> The correct answer therefore is: Do whatever results in the cleanest, most flexible code. Which in java usually involves threads becuase java lacks continuations.[01:15:33] <axod> dmlloyd: most tasks never need block[01:15:37] <axod> if you can prgram[01:15:49] <svm_invictvs> axod: Tha'ts just asinine. Sometimes threads are an effective way of releasing a bottleneck in your code despite the fact that they number of threads may outnumber processors.[01:15:50] <dmlloyd> axod: "most"? I didn't realize you've written every task possible[01:16:05] <dmlloyd> axod: file I/O, for example, cannot normally be made non-blocking in Java[01:16:07] <surial> dmlloyd: You're calling me a troll? What the fuck is wrong with you? I demand an apoloigy. I'm in discussion with someone who is claiming that anything blocking is just a sign that you're a moron programmer for chrissakes.[01:16:15] <axod> svm_invictvs: why can't you release the bottleneck yourself?[01:16:16] <sproingie> meee-YOW, let's tone it down[01:16:35] <axod> dmlloyd: I believe an NIO mem mapped FileChannel is pretty close?[01:16:41] <tieTYT2> axod: cause you need to read a file that's 500mb?[01:16:49] <dmlloyd> surial: yeah, and your counter-argument was "threads are optimal" (implying that lots of threads are always optimal)[01:17:01] *** Gracenotes has joined ##java[01:17:04] <svm_invictvs> axod: Well, working with a limited API would be one reason.[01:17:14] <axod> surial: time of the month or something?[01:17:26] <dmlloyd> axod: it's probably as close as you can get, but if you need to wait for a flush (e.g. force(), which you DO need to do in some cases), it can't be made non-blocking - you NEED a thread for it[01:17:28] <axod> svm_invictvs: sure... if you *have* to work with a blocking API[01:17:31] <surial> sproingie, dmlloyd: axod likes masturbating his code by introducing extreme complexity in a vaunted quest to eliminate all blocking, eventhough he apparently hasn't figured out yet that as long as you don't go overboard with threads, most modern OS'es thread schedulers are generally far better at the job than you ever could. This is roughly analogous to a C troll claiming that come high or hellwather, you should always clean up your own objects,[01:17:45] <sproingie> surial: i recommend the decaf. really.[01:18:03] <axod> surial: does the OS thread scheduler know what my code does?[01:18:03] <axod> no[01:18:04] <svm_invictvs> axod: Sometimes yeah...even OS apis can be written poorly...[01:18:08] <axod> so it's suboptimal[01:18:15] <sproingie> threads suck except when they don't[01:18:18] <axod> *anyway* *rolleyes*[01:18:23] <surial> ... and that anybody that can't do the garbage collection themselves is clearly an idiot who should never be allowed near a computer. I'm done with this argument. I feel I've done my good samaritan share of giving the intelligent folks here who don't know enough about threads more than enough to figure out axod is talking horsepuckey.[01:18:39] <sproingie> NPTL is pretty nice but i suspect there's a smidgen more overhead in the jvm than just that[01:18:45] <surial> axod: Does the JVM know what your code is doing? No. And yet we let it do the garbage collection. Amazing.[01:18:53] <axod> surial: FWIW, I've writte highly scalable network servers using threads, and using NIO[01:18:54] <tieTYT2> axod: who cares if it's suboptimal?[01:18:56] <svm_invictvs> surial: and DNS requests are just UDP packets how could you not do that asynchronously in Java code.[01:19:19] <dmlloyd> axod: in any case, even if you believe that no task can or should ever block, you'll still like XNIO[01:19:27] <axod> indeed... as I said, if I need to, I'll write a simple dns client using nio[01:19:28] <surial> svm_invictvs: If you want to roll your own DNS server, sure. But taking the OS'es DNS server setting? I don't think you can ask the java.net libraries for the list of DNS servers used to resolve lookups.[01:19:34] <dmlloyd> it's perfect for your use case. You just register an async handler for when a packet arrives.[01:19:39] <axod> dmlloyd: why is it better than NIO?[01:19:54] <dmlloyd> axod: because it manages selectors for you, which is otherwise a big pain in the ass.[01:19:55] <surial> so, here oyu have it: Somebody wants to write their own DNS client because he is fundamentally opposed to using a 1-liner Future to take care of it.[01:20:03] <surial> I rest my case. Who, by the way, isn't convinced by my line of reasoning?[01:20:09] <axod> dmlloyd: it's not really :/[01:20:15] *** eidolon has joined ##java[01:20:19] <axod> I have all the IOCore stuff written anyway[01:20:20] <svm_invictvs> surial: you said not with the current VM. You could do it with the current VM if you wanted to.[01:20:28] <dmlloyd> axod: and once the native implementations are mainline, you'll be able to take advantage of platform resources like serial ports and UNIX domain sockets[01:20:39] <surial> svm_invictvs: I consider 'doing a DNS lookup' as meaning: Look it up via the host OS. Because, you know. I'm sane.[01:20:41] <axod> dmlloyd: interesting,[01:20:57] <svm_invictvs> surial: I said it was possible, neither sane nor practical.[01:21:00] <axod> surial: for some values of sane[01:21:14] <surial> svm_invictvs: Do you take everything literally? Sex in the City must have been a big disappointment![01:21:21] <axod> surial: so how would you do 4,000 reverse dns lookups? launch 4,000 threads?[01:21:22] <sproingie> i thought it was Sex and the City[01:21:37] * The_Birdman feels some tension[01:21:51] *** amz has joined ##java[01:21:54] <The_Birdman> Let me have the pills[01:21:54] <sproingie> which to me always sounded like a damn quilting bee or canasta game with more "orgasm" thrown in[01:21:56] <svm_invictvs> surial: Different than say writing a ping program...whic hisn't possible w/o native libs.[01:21:57] <surial> axod: No, use the appropriate thread pool stuff in java.util.concurrent. Or, because the OS will serialize them anyway, spin off 1 thread that'll do them all in series, and reports each successfull lookup, so that you don't have to wait for all 4000 to go through.[01:21:58] <dmlloyd> paint that bikeshed![01:22:02] <dmlloyd> paint it gooood[01:22:19] <surial> axod: Whatever the fuck I do, the last thing I'd ever try is spend a day or 2 rolling my own DNS client and writing a test suite for it. That's ridiculous.[01:22:20] <axod> surial: even with a pool of a few hundred threads that's gonna take a while[01:22:28] <axod> plus, it's an ugly way to do it[01:22:30] <svm_invictvs> surial: And, axod was considering writing a DNS client in pure java with nio if you scroll up.[01:22:45] <surial> svm_invictvs: And I'm calling him on the bullshit of that.[01:22:55] <axod> surial: it's DNS. It's not rocket science[01:23:02] <axod> udp send, udp receive answer...[01:23:12] <svm_invictvs> surial: It's possible, maybe. And if it's a legitimate use case it may be worth making a JSR out of it.[01:23:15] <waz> it's a waste of time[01:23:15] <svm_invictvs> :P[01:23:15] <surial> axod: Yes, sure. You're right. You can't trust anything. If I were you, I'd write up your own implementation of ArrayList just to be sure.[01:23:15] <axod> I'm not going to support zone transfers ;)[01:23:23] <tieTYT2> axod: the wheel isn't rocket science either[01:23:41] <sproingie> wheels are reinvented all the time. bullet trains ain't using wagon wheels.[01:23:46] <axod> ok, so point me at something that exists, that can do large volumes of dns lookups quickly :)[01:23:56] <tieTYT2> sproingie: a bullet train isn't a wheel[01:23:58] *** l3ns has quit IRC[01:24:02] <sproingie> tieTYT2: neither is a wagon[01:24:11] <sproingie> most people don't want just a wheel[01:24:14] <KarlsBerg87> surial: i try unninstall all my java stuff and reinstall it without success[01:24:20] <tieTYT2> sproingie: i see you've played this game before. Perhaps in preschool[01:24:20] *** mr_ank has joined ##java[01:24:21] <dmlloyd> axod: I'd look up "unbound" if I were you - it's a good resolver (written in C) that might have some useful ideas[01:24:26] <sproingie> maybe the aphorism just sucks[01:24:28] <surial> KarlsBerg87: OS?[01:24:30] *** peepsalot has quit IRC[01:24:34] <axod> dmlloyd: thx, will check that one out[01:24:41] <tieTYT2> let's name some more things that aren't a wheel[01:24:55] <KarlsBerg87> surial: ubuntu linux[01:25:05] <surial> axod: "Large volumes" is an entirely different game. The first thing I'd do if I were you, is to spin off 4000 threads and make 4000 lookups and see if your OS serializes them, or not.[01:25:07] <waz> ~ubuntu[01:25:07] <javabot> See https://help.ubuntu.com/community/Java and try #ubuntu-java. Also Ubuntu is an ancient African word meaning 'I can't configure Debian'. If you want to install java on ubuntu, ask me about ~debian (same instructions apply to ubuntu).[01:25:35] <axod> surial: "spinning up 4000 threads" is a bad sign. It's what a beginner would do[01:25:43] <KarlsBerg87> lol ?[01:25:51] <axod> the OS isn't there to make up for your bad programming[01:25:51] <waz> it's for a valid test axod[01:25:52] <surial> If it does serialize them, then any kind of attempt to use java's standard DNS lookup mechanism (which always uses the OSes) will fail regardless of nio, threading, futures, or anything else you try. You'd HAVE to google for a DNS implementation in java and use that.[01:26:10] <sproingie> i wonder how much memory overhead 4000 threads is[01:26:12] <surial> axod: It's for testing. Fuck it. I'm done with this.[01:26:22] <surial> sproingie: TIAS[01:26:31] <odinsbane> depends on the os I think the smallest is 128k per thread[01:26:56] <axod> "will fail regardless of nio" ? we just established a simple dns client in nio would work fine...[01:27:08] <dmlloyd> directly dispatching a thread per task is retarded by any standard in any case. That's what Executors are for :)[01:27:19] <svm_invictvs> Honestly, if a large program is already written with async io *and* perhaps dropping in a thread may mess with the logic of hte whole program.[01:27:24] <svm_invictvs> *shrug*[01:27:39] <svm_invictvs> axod: you're doing 4000 dns lookups?[01:27:41] <axod> threads should cost $10 to create[01:27:45] <KarlsBerg87> i ever use java without problem and yesterday i close eclipse without problem[01:27:51] <axod> fork(my_bank_account)[01:27:58] <axod> svm_invictvs: at peak times yup[01:28:20] <sproingie> ten dolla i fork you long time[01:28:20] <svm_invictvs> axod: why don't you just cache them. are you looking up 4000 unique entries a second?[01:28:25] *** GarrettSF has joined ##java[01:28:27] *** b3nn3tt has quit IRC[01:28:35] <sproingie> i look up rdns entries by the thousands[01:28:40] <axod> not per second... on a restart, that's the queue size[01:28:41] <sproingie> usually about 100 at a time[01:28:55] <tieTYT2> axod: what's the name of your company?[01:28:58] <svm_invictvs> axod: and how long does it take?[01:29:01] *** _stack has quit IRC[01:29:06] <surial> KarlsBerg87: which java did you install and how did you do it?[01:29:12] <axod> 10 minutes or so :([01:29:21] <KarlsBerg87> java6[01:29:28] <surial> axod: ... then any kind of attempt to use java's standard DNS lookup mechanism... <- you idiot.[01:29:29] <KarlsBerg87> jre and jdk[01:29:37] <surial> KarlsBerg87: try openjdk6-jdk[01:29:39] <KarlsBerg87> sun-java6[01:29:41] <tieTYT2> axod: what's the name of your company?[01:29:49] <KarlsBerg87> i need the sun vm[01:29:50] <axod> surial: did you get out the wrong side of bed or something? ;)[01:29:56] <axod> tieTYT2: Mibbit[01:30:00] <surial> axod: No, it's just you.[01:30:08] <tieTYT2> oh ok[01:30:09] <dmlloyd> there's always /ignore[01:30:13] <axod> well, fun to meet a thread lover :)[01:30:23] <The_Birdman> hehe, it's fun to read[01:30:49] <svm_invictvs> axod: As it stands now you'll have to write your own DNS client to do the lookups asynchronously.[01:31:10] <dmlloyd> I think that's the whole point[01:31:14] * sproingie o/~ there's a peeerfect lover, running through my thread...[01:31:29] <axod> svm_invictvs: sure... shame there isn't any built in, but I guess I'll get round to it[01:31:35] *** bas-i has joined ##java[01:31:55] <svm_invictvs> axod: Which takes me back to my other point. If you feel that strongly about it, propose to fix it with a JSR.[01:32:01] <dmlloyd> why?[01:32:11] <dmlloyd> why make a JSR for every API that is not in the JDK[01:32:22] <axod> svm_invictvs: ah ok, sure sorry I missed that point,[01:32:39] <dmlloyd> if everything was in the JDK, what would we write :)[01:32:41] <mr_ank> I think java is nice cause i get to write "interface" a lot and then employers call me senior.[01:32:44] <pfn> dns in java sucks anyway[01:32:44] <svm_invictvs> dmlloyd: because, if I'm not mistaken, he feels it's a defficiency in the language and standard functionality.[01:32:51] <surial> KarlsBerg87: Why do you need the sun VM?[01:32:52] <axod> not sure where it would fit in java.nio ,[01:32:56] <pfn> dns in java does not honor ttl properly...[01:33:14] <surial> KarlsBerg87: also, eclipse doesn't need the sun VM, and eclipse doesn't require you to use or run anything on the VM it was started with. So install both, and boot eclipse with openjdk6-jdk.[01:33:17] *** M[]ssad has joined ##java[01:33:19] <surial> if that works, problem solved.[01:33:22] <dmlloyd> axod: in any case if you end up making a cool resolver based on XNIO, let me know :)[01:33:33] <axod> the worst thing IMHO is that new InetSocketAddress() etc may *block* doing a dns lookup... inexcusable IMHO[01:33:42] <KarlsBerg87> eclipse run on java no?[01:33:43] <axod> dmlloyd: sure will do :)[01:33:51] <svm_invictvs> axod: not if you specify it with an ip address.[01:34:08] *** durka42 has quit IRC[01:34:11] <axod> svm_invictvs: sure :) just been bitten with that a couple of times where it wasn't always an IP[01:34:46] <svm_invictvs> axod: but, if you write your resolver you could make one which is an IP[01:34:59] <axod> yup[01:35:04] <KarlsBerg87> i just download again eclipse ganymede and get the same error[01:35:17] <waz> ganymede?[01:35:45] <KarlsBerg87> yep..[01:35:49] <KarlsBerg87> is the version name[01:35:52] <waz> oh[01:35:57] <svm_invictvs> waz: 3.4[01:35:58] <waz> lovely name :)[01:36:00] <KarlsBerg87> java -version return fine[01:36:00] <KarlsBerg87> java version "1.6.0_0"[01:36:00] <surial> KarlsBerg87: openjdk == java[01:36:07] <waz> I don't muck with eclipse[01:36:18] <svm_invictvs> waz: Each release is named after a moon.[01:36:22] <KarlsBerg87> go try to run a applet[01:36:39] *** mouseclone has joined ##java[01:36:44] <KarlsBerg87> what is the significant of 'ganymede' in native english ?[01:36:48] <waz> ahh[01:36:56] *** ScottG489 has joined ##java[01:37:25] <svm_invictvs> KarlsBerg87: IT's not. It's a greek word.[01:37:35] <KarlsBerg87> ah![01:37:37] <sproingie> KarlsBerg87: it's one of Jupiter's moons.[01:37:45] <svm_invictvs> KarlsBerg87: Jupiter has 4 moons. Ganymede is one of them.[01:37:52] <sproingie> Jupiter has an assload of moons[01:37:52] <svm_invictvs> Europa, IO Ganymede, I forget the other one.[01:37:55] <sproingie> more than 4[01:38:03] *** GarrettSF has left ##java[01:38:06] <KarlsBerg87> oh, really dont know where you gets too knowledge xDD[01:38:07] <mouseclone> I'm really trying to learn java. I have gotten a good grip of OOP, but having trouble find tutorials on GUI, any ideas? I don't know what is latest because java.awt.* people talk about 2.1[01:38:20] *** amnesiac has quit IRC[01:38:22] <sproingie> it has 63 moons[01:38:31] <svm_invictvs> sproingie: Only 4 of them are significant, iirc.[01:38:43] <waz> ~~ mouseclone tij[01:38:43] <javabot> mouseclone, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/ for the 3rd edition (free download, published in 2002) or see http://www.mindview.net/Books/TIJ4 for the current edition which covers Java 5 features.[01:38:53] <sproingie> right io, europa, ganymede, callisto[01:39:20] <svm_invictvs> callisto, yeah[01:39:26] <mouseclone> many thanks[01:39:29] *** cyth has quit IRC[01:39:30] <KarlsBerg87> mamona is other[01:39:35] <sproingie> so next is Io and then they're out of famous moons[01:39:55] <svm_invictvs> The moons of uranus.[01:39:58] <sproingie> they haven't picked Luna yet[01:40:03] <KarlsBerg87> dont know mamona?[01:40:04] <svm_invictvs> ugh, Luna[01:40:20] *** mouseclone has left ##java[01:40:23] <surial> mouseclone: the latest for guis is javafx.[01:40:26] <surial> ~~mouseclone javafx[01:40:26] <javabot> The user mouseclone is not on ##java[01:40:33] <surial> d'oh[01:40:40] *** lolsuper_ has joined ##java[01:41:00] <svm_invictvs> ~javaFX[01:41:00] <javabot> JavaFX (http://sun.com/javafx) is a scripting language from Sun, designed to use declarative syntax to create GUIs, primarily. You can find a tutorial at http://java.sun.com/javafx/1/tutorials/ui/[01:41:21] <KarlsBerg87> Luna is a spanish translation, or have other dark way ?[01:41:51] <sproingie> it's also the common name of earth's moon[01:41:58] *** scorchsaber has joined ##java[01:42:19] *** bas-i has quit IRC[01:42:27] *** lvh has quit IRC[01:42:47] <sproingie> well "The Moon" being more common. traditional western name perhaps.[01:43:32] <KarlsBerg87> http://www.google.com/trends?q=flex%2C+javaFX[01:44:04] <KarlsBerg87> and... India is the winner city ![01:44:14] <KarlsBerg87> well.. Mumbai[01:44:22] <sproingie> three of the six headlines don't even mention adobe's product[01:48:34] <svm_invictvs> good, they need to.[01:49:04] <svm_invictvs> OH snam[01:49:05] <svm_invictvs> Snap[01:49:09] <cybereal> snam![01:49:16] <svm_invictvs> So whats' with Mumbai?[01:49:39] *** toytoy has joined ##java[01:49:45] <svm_invictvs> Mumbai...bombay?[01:49:46] *** Sirisian has joined ##java[01:49:54] *** teralaser has quit IRC[01:50:01] <Sirisian> this might seem odd, but where do I download javac?[01:50:09] <svm_invictvs> uh..[01:50:11] <cybereal> it's part of a JDK[01:50:13] <cybereal> ~download[01:50:13] <javabot> Find current releases for Java at http://java.sun.com/javase/downloads/index.jsp and a comprehensive archive of current and older releases of various Java related products at http://java.sun.com/products/archive/[01:50:13] <svm_invictvs> java.sun.com[01:50:31] <svm_invictvs> Oh wow[01:50:35] <svm_invictvs> So this is interesting.[01:50:43] <svm_invictvs> Evidently I may be buying a house.[01:50:49] <Sirisian> ah okay so it isn't a separate download. That makes sense[01:50:53] <Sirisian> Thank you[01:51:55] *** orgy` has quit IRC[01:52:18] *** reval has joined ##java[01:52:23] *** rlubke has quit IRC[01:52:56] <svm_invictvs> ~sax[01:52:56] <javabot> svm_invictvs, sax is Simple API for XML and some info is at http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/[01:52:57] <reval> can someone show me how to correctly throw exceptions, getting this error: http://www.pastie.org/384567[01:53:37] <skypce> hi guys. i have a problem , i have this paste http://www.pastie.org/384566, mi problem is i dont know that variable type is Persona, i try it as integer but is incorrect.[01:53:37] <svm_invictvs> reval: You need to speify the throws clause on the method throwing it.[01:53:53] *** popcornPanic has quit IRC[01:54:08] *** OsAC is now known as OsAC|AFK[01:54:31] <surial> Sirisian: OS?[01:55:07] <svm_invictvs> paint it black...[01:55:10] <svm_invictvs> awesome song.[01:55:18] <surial> Sirisian: if Mac Os X, just type 'javac', if deb/ubuntu, type apt-get install openjdk-6-jdk. If anything else, probably download at that link or if its a flavour of unix, delve into their package system.[01:55:37] <svm_invictvs> emerge sun-jdk in Gentoo, iirc.[01:55:55] <svm_invictvs> Just so long as you don't wind up with gcj.[01:56:36] *** Sirisian has quit IRC[01:58:42] <axod> apt-get sun-java5-jdk[01:59:06] <axod> or 6 :/[01:59:10] *** BSWolf has quit IRC[01:59:11] *** BSWolf2 has joined ##java[01:59:36] *** convivial has joined ##java[01:59:43] <reval> svm_invictvs: i spedified the clause, but now i get this error: http://www.pastie.org/384567[02:00:10] *** BSWolf2 is now known as BSWolf[02:00:46] *** nmx has joined ##java[02:01:00] <svm_invictvs> reval: then you need to do a try/catch[02:01:30] *** OsAC|AFK has quit IRC[02:01:31] <reval> do i put that in the else statement that i have?[02:01:52] <KarlsBerg87> ah! someone can recommend me a fantastic java 2D engine ?[02:02:04] <odinsbane> reval who is going to handle the exception finally?[02:02:25] <reval> the exception class[02:02:46] <reval> Throwable class[02:03:24] <svm_invictvs> KarlsBerg87: for what?[02:03:30] <KarlsBerg87> game development[02:03:44] <svm_invictvs> I wrote one...not that hard.[02:04:13] <KarlsBerg87> what?[02:04:23] <KarlsBerg87> why you say this?[02:04:26] <odinsbane> When you call a function that throws an exception you have to either try/catch, or you have to say that you might throw one.[02:04:29] <svm_invictvs> Simple 2D game engine...[02:04:57] *** Varox has quit IRC[02:05:04] <KarlsBerg87> really, today i search a engine, not only a api, and repeat engine because this implement hard effects and other[02:05:29] <svm_invictvs> KarlsBerg87: *shrug*[02:05:37] <svm_invictvs> KarlsBerg87: I used to be an xbox dev[02:05:45] <svm_invictvs> xb and Wii[02:05:48] <odinsbane> reval Right now you've said enqueue raises an exception, so anything that uses enqueue has to also say it will throw an exception.[02:06:34] <KarlsBerg87> svm_invictvs: official wii dev kit?[02:06:47] <KarlsBerg87> or homebrew hacks[02:07:11] <svm_invictvs> KarlsBerg87: I used to work for a game studio. So yes, all official stuff.[02:08:21] *** Sirisian has joined ##java[02:08:54] <Sirisian> I installed the JDK, but the javac program didn't show up in the command line? Should it? Or is that something I have to do manually?[02:08:57] <KarlsBerg87> svm_invictvs: then you are a game developer[02:09:16] <KarlsBerg87> really im too new in Java, i ever write with python my games, in 2D using pygame[02:09:35] <svm_invictvs> KarlsBerg87: Used to be. They fired me.[02:09:37] <KarlsBerg87> im learning 2 weeks back jmonkey 3d engine[02:09:42] <lolsuper_> <Sirisian> I installed the JDK, but the javac program didn't show up in the command line? Should it? Or is that something I have to do manually?[02:10:08] <svm_invictvs> Why can't you use java monkey engine for 2d?[02:10:11] <lolsuper_> if you are on windows (appears you are, hence 'command line'), make sure you added the JDK binary directory to the PATH environment var[02:10:27] *** L-----D has joined ##java[02:11:03] *** Sirisian has quit IRC[02:11:09] *** brady_k has left ##java[02:11:14] <odinsbane> alright 700% cpu.[02:11:36] *** axod has quit IRC[02:11:48] <KarlsBerg87> svm_invictvs: really... i can, but dont like how jmonkey use the gamestates[02:11:52] <reval> odinsbane: the part thats making me confused about this is that i want it to throw an exception when the if statement fails, but how to put the try/catch in there? i tried this http://www.pastie.org/384567 but its wrong :([02:11:57] *** Sirisian has joined ##java[02:12:20] *** biozit has quit IRC[02:12:33] <odinsbane> reval, what do you want to happen?[02:12:46] <KarlsBerg87> for my vision is foo, from one class, launch a gl thread (aka gamestate) and outside need create ALL stuff of the gamestate, attaching to it, and not into-class[02:12:54] <surial> Sirisian: OS?[02:13:02] <Sirisian> windows XP SP3[02:13:10] <surial> Sirisian: and you installed the JDK, not the JRE?[02:13:14] <KarlsBerg87> and some sentences must be executed into the thread etc.. really is toooo foo[02:13:15] <surial> then it is indeed probably a path issue.[02:13:22] *** tissue has joined ##java[02:13:58] <reval> odinsbane: i want it to throw an QueueFullException when the isFull method returns true[02:14:04] <odinsbane> reval: ditch the try in enqueue, and put a try/catch around enque when you call it.[02:14:20] <Sirisian> surial, Java SE Development Kit 6u12 ?[02:14:28] *** christo_m has joined ##java[02:15:01] <christo_m> if i have a BufferedReader object, what method can i use to check how many chars it is or something?[02:15:10] <christo_m> say its a text file[02:15:21] <Sirisian> surial, I went here: http://java.sun.com/javase/downloads/index.jsp then I clicked Get the JDK :)[02:16:43] <lolsuper_> <christo_m> if i have a BufferedReader object, what method can i use to check how many chars it is or something?[02:17:20] *** Sirisian has quit IRC[02:17:24] <reval> odinsbane: http://www.pastie.org/384567 something wrong...[02:17:25] <surial> christo_m: can't.[02:17:30] <lolsuper_> unfortunately you can't as far as i know.. ;( well, without doing some reflection hackity stuff[02:17:32] <surial> christo_m: Readers don't have a length.[02:17:36] <surial> christo_m: java.io.File objects do, though.[02:17:49] <lolsuper_> and with that reflection hackery stuff, its not safe at all[02:17:52] *** Sirisian has joined ##java[02:17:58] <odinsbane> ditch the catch too.[02:18:04] <surial> lolsuper_: YOu can't use 'reflection hackery stuff' either.[02:18:08] <lolsuper_> in the sense that it might not work in other versions :\[02:18:17] <christo_m> surial: so i have to make the input file a File object first[02:18:22] <christo_m> then pass it to BufferedReader[02:18:27] <Sirisian> the router I'm on is a bit iffy. surial wait do I need another file other than the JDK?[02:18:40] <surial> christo_m: Taking a File instead of an InputStream is generally a bad idea. Why do you need to know the length?[02:18:45] *** vyoman has joined ##java[02:18:49] <cybereal> christo_m: unless the file is a single-byte encoding like ascii, you can't possibly know how many chars are in it until you've processed the whole file[02:18:52] <christo_m> BufferedReader input = new BufferedReader(new FileReader(filename)); ie instead of filename string a File object instead[02:18:59] <surial> and if the length is so important, why not pass that into whatever methods requires these things, and also have a convenience method that takes a file and sets it up for you?[02:19:00] *** aTypical has joined ##java[02:19:06] <christo_m> its in ascii its just for an assignment[02:19:12] <cybereal> christo_m: well, a fixed-byte-length encoding anyway[02:19:13] <christo_m> i havent dealt with file IO in java[02:19:15] <odinsbane> reval: http://www.pastie.org/384595[02:19:24] <surial> ~~christo_m homework[02:19:24] <javabot> Homework is meant to be done by YOU so that YOU learn something. Stop cheating. We didn't like doing our own, why should we bother with yours? Besides, we'd rather you failed so we have less competition. Have a nice day![02:19:31] <cybereal> and you can't know from the perspective of a Reader at all,t hose are streams meant to be potentially endless[02:19:35] <christo_m> im not trying to get you guys to do it for me[02:19:39] <christo_m> im asking how i can go about this[02:19:40] <cybereal> you could read until it ended and see what you got... but not earlier[02:19:40] <odinsbane> That is how you do the try/catch once you have your exception thrown[02:20:00] <svm_invictvs> exceptional[02:20:27] *** morkar- has joined ##java[02:20:42] <christo_m> my idea was to strip the file of \n's and such then just readLine it into a string[02:20:46] <christo_m> and get the length of that[02:21:03] *** Sirisian has quit IRC[02:21:26] *** poseidon has joined ##java[02:21:35] <poseidon> How can I change the size of an Image object?[02:21:47] <reval> odinsbane: but i need to have actual method throw the exception[02:22:35] <surial> christo_m: So why don't you do that?[02:22:47] <surial> christo_m: No need to know the length in advance. Just keep reading until there is no more data.[02:23:11] *** nmatrix9 has joined ##java[02:23:21] <aTypical> Howdy[02:23:28] <reval> odinsbane: basically: when enqueue is called and isFull returns true, then enqueue needs to throw the QueueFullException[02:23:57] <lolsuper_> <reval> odinsbane: basically: when enqueue is called and isFull returns true, then enqueue needs to throw the QueueFullException[02:24:19] <lolsuper_> if (isFull()) { throw new QueueFullException(); } else { ... }[02:24:21] * kater_ slaps lolsuper_[02:24:59] <lolsuper_> also, reval, for isEmpty(), try doing just 'return head == tail;'[02:25:20] <lolsuper_> its less redundant code :p[02:25:29] <dmlloyd> and it's less redundant[02:25:34] <AMcBain> that doesn't work if there is only one element in it.[02:26:00] <svm_invictvs> dmlloyd: less redundantly repedative.[02:26:02] *** giaco has quit IRC[02:26:41] *** jchauncey has joined ##java[02:26:49] <lolsuper_> actually, to be completely honest, id rather just implement the queue as a linked list :p[02:27:01] <cybereal> a LinkedList is already a Queue[02:27:05] *** RealKillaz has joined ##java[02:27:22] <RealKillaz> guys I have a design problem:[02:27:25] <lolsuper_> cybereal, this is a custom queue... :p[02:27:26] <RealKillaz> btw Hi[02:27:44] <lolsuper_> not the standard java one at java.util.Queue[02:27:52] <RealKillaz> the problem is this: I have some generated code (axis)[02:27:55] <kater_> RealKillaz: too bad for you[02:27:55] <RealKillaz> webservice[02:28:03] *** Daniel_H has quit IRC[02:28:09] <RealKillaz> kater_: too bad why?[02:28:24] <AMcBain> he's just trying to be unfriendly[02:28:28] <RealKillaz> kater_: this is not the correct channel for this?[02:28:29] <kater_> a statement for a statement[02:28:29] <cybereal> lolsuper_: what's your point? haven't you heard of composition?[02:28:32] <kater_> AMcBain: indeed =)[02:28:45] *** tansaku has quit IRC[02:28:45] <kater_> rather mean then unfriendly ;p[02:28:46] <jchauncey> do you guys know if there are any books out for jersey or resteasy? Ive looked on amazon, oreily, and manning and cant find any[02:28:58] <RealKillaz> ok let me continue then[02:29:19] *** thorat has quit IRC[02:29:26] <RealKillaz> so I need to add some functionlity too one of the object[02:29:34] <RealKillaz> first I thought extend it[02:29:36] <reval> im still getting that "must be caught.." error with this code http://www.pastie.org/384602[02:29:37] *** meanburrito920_ has quit IRC[02:29:40] * AMcBain kicks MapleTA in the shin.[02:29:46] <RealKillaz> but then this problem arise[02:29:55] <cheeser> ~~ reval exceptions[02:29:55] <javabot> reval, exceptions is http://java.sun.com/tutorial/essential/exceptions[02:29:58] <lolsuper_> reval,[02:30:20] <RealKillaz> I can not type cast the object I recieved from the generated code to this extend object[02:30:29] <RealKillaz> so I want to wrap it[02:30:44] <lolsuper_> this is because enqueue(int) throws QueueFullException and QueueFullException isnt inherited from RuntimeException and therefore it isnt unchecked and must be caught inside your main(String[[02:30:54] <lolsuper_> String[]) * heh sorry[02:31:06] *** durka42 has joined ##java[02:31:10] <surial> whomever lolsuper_ is talking to: or thrown from your main method, which is easier.[02:31:41] *** Malformation has joined ##java[02:31:44] <RealKillaz> but then I get this problem I need to get the object back from the wrapper(s) and send them back as an array...... should I use the wrapper design or is there something else?[02:32:02] *** decafbad has joined ##java[02:32:25] <RealKillaz> cause I want to use the generated code as less as possible in my application code so I'm as loosely coupled as possible to the generated code[02:32:32] <lolsuper_> surial, that would be ok i guess for the main method, but it wouldnt do good inside enterprise code because it would propagate down the method invoke stack (man i think this is really confusing cause i dont know how to word it right)[02:32:36] <RealKillaz> does this make sense?[02:32:48] <lolsuper_> i think ill just shut up now[02:33:06] <surial> lolsuper_: actually, that WOULD be good. Exceptions that you can't really handle are supposed to be propagated up the stack.[02:34:27] *** exbio has quit IRC[02:34:56] *** Malformation has quit IRC[02:36:06] *** FireSlash has quit IRC[02:36:31] *** Malformation has joined ##java[02:36:42] *** rullie has joined ##java[02:37:16] *** jchauncey has quit IRC[02:39:01] *** christo_m has quit IRC[02:39:32] *** christo_m has joined ##java[02:39:51] <christo_m> surial: im not sure how to strip the newlines out[02:39:56] *** giaco has joined ##java[02:40:23] *** peyman_t has quit IRC[02:40:41] *** javahorn has joined ##java[02:41:20] <surial> christo_m: no need. Just keep calling readLine() until readLine() returns null, then you're done.[02:41:22] *** amnesiac has joined ##java[02:41:43] <christo_m> surial: ahh so calling it again reads the NEXT line[02:41:48] *** decafbad has left ##java[02:42:35] *** em_pleh has joined ##java[02:42:38] <surial> Yes.[02:42:38] *** Ububegin has quit IRC[02:42:42] <em_pleh> hello![02:42:58] <em_pleh> can someone please help me by telling me how to escape string to html?[02:43:06] <odinsbane> reval: Then you need to have the method that calls enqueue also throw the exception on up untill somebody will handle it, like I did.[02:45:03] <em_pleh> i want to escape a string to url encode[02:45:38] <lolsuper_> “A liberal is a socialist with a wife and two children.”[02:45:42] <lolsuper_> ""[02:45:42] <surial> em_pleh: URLEncoder.encode(foo, "UTF-8");[02:46:01] <surial> ~~em_pleh javadoc URLEncoder.encode(*)[02:46:02] <javabot> em_pleh: http://is.gd/iYWn [java.net.URLEncoder.encode(String)]; http://is.gd/iYWo [java.net.URLEncoder.encode(String,String)][02:46:36] <lolsuper_> ~~em_pleh javadoc OperatingSystemMXBean[02:46:37] <javabot> em_pleh: http://is.gd/iYWy [java.lang.management.OperatingSystemMXBean][02:47:24] <em_pleh> Thank you, is this supported in J2ME ?[02:48:15] *** rajesh has joined ##java[02:48:28] *** odinsbane has quit IRC[02:48:47] <em_pleh> ok its fine thanks![02:50:24] <svm_invictvs> ~singleton--[02:50:24] <javabot> singleton has a karma level of -8, svm_invictvs[02:50:45] <em_pleh> ~em_pleh[02:50:45] <javabot> em_pleh, I have no idea what em_pleh is.[02:50:53] <em_pleh> ~em_pleh--[02:50:53] <javabot> Changing one's own karma is not permitted.[02:50:54] <javabot> em_pleh, you have a karma level of -1[02:51:05] <em_pleh> lol[02:51:14] <em_pleh> ~surial+1[02:51:14] <javabot> em_pleh, I have no idea what surial+1 is.[02:51:20] <em_pleh> ~surial-1[02:51:20] <javabot> em_pleh, I have no idea what surial-1 is.[02:51:24] <svm_invictvs> Werid javabot bug...[02:51:24] <em_pleh> ~surial-+[02:51:24] <javabot> em_pleh, I have no idea what surial-+ is.[02:51:27] <svm_invictvs> ~svm_invictvs++[02:51:28] <javabot> Changing one's own karma is not permitted.[02:51:29] <javabot> svm_invictvs, you have a karma level of 28[02:51:29] <surial> Having fun?[02:51:32] <em_pleh> ~surial++[02:51:32] <javabot> surial has a karma level of 78, em_pleh[02:51:35] <svm_invictvs> cheeser: Ping[02:51:38] <em_pleh> there we go[02:51:49] <surial> ~surial += over 9000![02:51:49] <javabot> surial, I have no idea what surial += over 9000 is.[02:51:52] <surial> damn.[02:51:52] *** M[]ssad has quit IRC[02:52:06] <em_pleh> there we go[02:52:10] <em_pleh> ~surial++[02:52:11] <javabot> surial has a karma level of 79, em_pleh[02:52:15] <cheeser> svm_invictvs: pong[02:52:27] <svm_invictvs> ~svm_invictvs++[02:52:28] <javabot> Changing one's own karma is not permitted.[02:52:29] <javabot> svm_invictvs, you have a karma level of 27[02:52:36] <svm_invictvs> What?[02:52:44] <svm_invictvs> cheeser: oh, I thought that was a bug.[02:52:54] <svm_invictvs> or is it?[02:53:07] <surial> svm_invictvs: Nono, the 'lose a karmapoint for svm_invictus every minute or so' plugin is working fine.[02:53:10] <r0bby> surial: nope[02:53:15] <r0bby> ~~ svm_invictvs javabot[02:53:15] <javabot> for a FAQ and a quick tutorial on how to use javabot, see: http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot[02:53:17] <r0bby> read :)[02:53:26] <r0bby> that is intentionally coded in[02:53:26] <cheeser> what are you talking about?[02:53:32] <christo_m> does null count as false?? can i do something like while(!input.readLine())??[02:53:42] <r0bby> christo_m: no it does not[02:53:49] <cheeser> ~~ christo_m tias[02:53:50] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[02:53:50] <surial> r0bby: I think he was suggesting that self-karma modification no longer gives you a -1 was the bug. Except that 'the feature' is that javabot no longer tells you it explicitly took off a point. It just does it. I think that's what svm_invictvs was on about.[02:54:09] <christo_m> ok i gotta think of something else[02:54:10] <surial> christo_m: also, if you do that, then how do you get the data of the line?[02:54:12] <r0bby> String line; while((line = input.readLine()) != null) { ... }[02:54:17] <cheeser> it's always just taken the point off[02:54:17] <svm_invictvs> surial: I didn't realize it was taking karma away from me actually. I guess I started with 29 and when I went to 28.[02:54:27] <svm_invictvs> cheeser: :([02:54:28] <r0bby> christo_m: that is how you do it[02:54:29] <surial> christo_m: try: String line; while ( (line = in.readLine()) != null ) { /* code here */ }[02:54:36] <r0bby> I beat you surial ![02:54:42] <svm_invictvs> cheeser: Why odesn't it tell you that it's docking you a karma point for chaning your own karma?[02:54:45] * r0bby sticks tongue out[02:54:50] <r0bby> it does.[02:54:51] <christo_m> i was going to use !(in.readLine()).equals("null")[02:54:51] <cheeser> svm_invictvs: patches welcome[02:54:52] <surial> r0bby: stop typing so fast.[02:55:06] <svm_invictvs> cheeser: heh[02:55:12] <surial> It's against the ##java union rules to over-exert yourself, don't you know that?[02:55:13] <r0bby> christo_m: won't wokr[02:55:18] <svm_invictvs> ~javadoc string[02:55:19] <r0bby> that LITERALLY compares "null"[02:55:24] <r0bby> you want to compare null.[02:55:29] <javabot> svm_invictvs: http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING][02:55:29] <surial> christo_m: that would never trigger, just use != null, and then - how do you get the actual content of the line?[02:55:30] <em_pleh> http://mibbit.com/pb/8H29BO Can somone tell me why this keeps returning null, the file path is correct[02:55:37] <r0bby> String line; while((line = input.readLine()) != null) { ... }[02:55:47] <AMcBain> cheeser: did you fix the bug where Java bot says "I forgot about" right after you use the "no, X is" syntax?[02:55:52] <svm_invictvs> r0bby: so the java bot doc is incorrect....it's not case sensitivie anymore?[02:56:02] <cheeser> AMcBain: yeah[02:56:04] *** daedra has joined ##java[02:56:08] <r0bby> it's not as far as I know[02:56:12] <cheeser> em_pleh: to start, replace File.separator with "/"[02:56:33] <daedra> if you do not set a resource limit of a Semaphore, is it assumed to be 1?[02:56:44] <cheeser> svm_invictvs: the "bot doc" is correct[02:57:08] <svm_invictvs> I want my karma back :([02:57:18] <daedra> for example final private Semaphore s = new Semaphore();[02:57:22] <christo_m> bah its giving me that IOException crap, looks like i need to put a try catch clause there[02:57:32] <svm_invictvs> exception won't directly catch that...[02:57:43] <cybereal> hehe[02:57:45] <em_pleh> cheeser: ok anything else?[02:57:50] <cybereal> ~be r0bby[02:57:50] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.[02:57:52] <r0bby> ~~ christo_m io[02:57:52] <javabot> christo_m, io is http://java.sun.com/tutorial/essential/io[02:58:02] <r0bby> go read that[02:58:03] <surial> christo_m: throw it on.[02:58:09] <svm_invictvs> I'm sorry r0bby[02:58:15] <r0bby> I love you svm_invictvs[02:58:21] <surial> christo_m: and ignore that ~be r0bby thing. It's there because it's wrong and we think its hilarious.[02:58:23] <svm_invictvs> good toknow[02:58:31] <christo_m> ok[02:58:49] <em_pleh> cheeser: any more suggestions?[02:58:50] *** waz has quit IRC[02:59:24] <svm_invictvs> grumble[02:59:29] <r0bby> christo_m: but seriously, read the io tutorial[02:59:47] <daedra> whoops stupid question[02:59:49] *** ejb has quit IRC[02:59:51] <cheeser> em_pleh: yeah. you could try saying what's coming out null[03:00:01] <poseidon> What should an ImageObserver object do?[03:00:10] <surial> poseidon: I know this one! I know![03:00:12] <em_pleh> the exception it throws is null[03:00:13] <surial> poseidon: observe images?[03:00:16] <em_pleh> thats all i am getting[03:00:18] *** daedra has left ##java[03:00:41] <r0bby> em_pleh: NullPointerException?[03:00:57] <em_pleh> r0bby: no just null[03:01:01] <em_pleh> weird right[03:01:05] *** durka42 has quit IRC[03:01:06] <poseidon> surial, do changes just get sent through it, or do I actually need one for my image to display properly?[03:01:10] <r0bby> ~~ em_pleh test case[03:01:10] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)[03:01:14] <r0bby> ?[03:01:17] <phix> hi[03:01:17] <surial> poseidon: I don't think you need one.[03:01:42] <poseidon> To draw the image it requires one as a parameter, so I'm just making a dummy one[03:02:03] <surial> poseidon: It's more like a listener thing. If you care about when its there. Don't quote me, but I believe the way swing sets up its images, is that it will offload the actual loading in of the image file and turning it into a bitmap until later, whenever is convenient. So an image isn't neccessarily there yet, it'll just be there soon. an ImageObserver allows you to know exactly when its there (decoded and rendered).[03:02:08] <surial> but, that's from vague recollections.[03:02:16] *** waz has joined ##java[03:02:33] <surial> I would imagine the javadoc has more specifics.[03:02:35] <em_pleh> r0bby: http://mibbit.com/pb/a2GfYy[03:03:12] *** [[thufir]] has quit IRC[03:03:14] <svm_invictvs> ook[03:03:16] <svm_invictvs> I'm out[03:03:18] <svm_invictvs> peace fellas[03:03:58] *** svm_invictvs has quit IRC[03:04:47] <r0bby> em_pleh: and the stack trace?[03:04:57] <phix> hmmm Swing is thread unsafe but alot of models for swing components use Vectors :/[03:05:00] <em_pleh> let me grab it[03:05:15] <surial> phix: Backwards compatibility reasons only.[03:05:28] <surial> phix: Way back when (java 1.1 to be exact), there was only Vector and Hashtable and no java collections API.[03:05:32] <r0bby> they're nuts about that[03:05:38] <phix> surial: when are models based on the Collection framework coming out?[03:05:47] <surial> Aren't they already?[03:05:53] <surial> I thought most methods that take Vectors also take Lists.[03:05:55] <phix> surial: for swing?[03:05:58] <surial> they just can't remove the one that takes Vectors.[03:06:03] <phix> surial: I don't think so[03:06:06] <surial> At any rate, don't use swing like that anymore.[03:06:13] <surial> There's a shiny new toy out, that's very very good.[03:06:15] <surial> ~~phix javafx[03:06:15] <javabot> JavaFX (http://sun.com/javafx) is a scripting language from Sun, designed to use declarative syntax to create GUIs, primarily. You can find a tutorial at http://java.sun.com/javafx/1/tutorials/ui/[03:06:20] <r0bby> surial: jesus[03:06:29] * r0bby coughsgrcough[03:06:32] <phix> surial: really? I should use that?[03:06:40] <surial> If you're building GUIs, yes.[03:06:44] <waz> yes[03:06:47] *** poseidon has quit IRC[03:06:48] <em_pleh> r0bby: Stack Trace: [Ljava.lang.StackTraceElement;@f55f27[03:06:53] <r0bby> uhm..[03:06:56] <cybereal> phix: the language is much better suited to defining a GUI than regular java[03:06:57] <phix> surial: I use netbeans to build guis[03:07:06] <waz> surreal night, I've been agreeing with surial for several hours[03:07:10] <surial> em_pleh: don't print getStackTrace(). Just run e.printStackTrace().[03:07:13] <phix> r0bby: you disagree?[03:07:15] <r0bby> em_pleh: e.printStackTrace();[03:07:20] <surial> phix: Time to move on.[03:07:38] <surial> waz: Well, new experiences are good for ones personal development.[03:07:41] <em_pleh> r0bby: let me grab it[03:07:59] <r0bby> em_pleh: pastebin it[03:08:02] <r0bby> it's gonna be long[03:08:03] *** LordMetroid has quit IRC[03:08:15] <em_pleh> ok[03:08:31] <phix> JavaFX --> Allows creative developers to program in a visual context <-- hmmm so what about developers like me with absolutely no creativity? :)[03:08:44] <r0bby> then you fail :)[03:09:07] <r0bby> I avoid GUI programming like the plague[03:09:28] <surial> phix: Heh. Actually, you can still toss together ugly things with javafx too. Not to worry.[03:09:33] <phix> r0bby: :)[03:09:43] <em_pleh> r0bby: http://mibbit.com/pb/cVzBt7[03:09:46] <phix> userek: it says it is for internet apps :/[03:10:14] <r0bby> oh[03:10:20] <r0bby> em_pleh: now do e.getMessage()[03:10:24] *** staykov has joined ##java[03:10:44] <em_pleh> r0bby: get message says "null"[03:10:47] <r0bby> and when does the API you're using say it throws an IOException[03:10:48] <surial> r0bby: Don't forget that an exception's toString() is this.getClass().getName() + ": " + this.getMessagae().[03:11:55] <cheeser> more or less[03:12:35] *** rajesh has quit IRC[03:13:15] <cybereal> ~javadoc LoginContext[03:13:16] <javabot> cybereal: http://is.gd/iZ3v [javax.security.auth.login.LoginContext][03:13:22] <em_pleh> java.io.IOException[03:14:33] *** cybereal has quit IRC[03:16:57] <phix> hmmm, I want to make a login section to my java desktop app, many apis out to do that? (later I also want some type of ACL system which prevents users performs actions they dont have privledge to)[03:17:17] <sproingie> take a look at spring security[03:17:28] <sproingie> formerly known as acegi (most tutorials call it that)[03:17:37] <phix> ok, thnx[03:17:44] <The_Birdman> ~jaas[03:17:44] <javabot> The_Birdman, jaas is Java Authentication and Authorization Services, a standard java API with pluggable authorization and access control modules. Authorization modules exist for various systems such as LDAP, Kerberos, NTLM, simple password files, etc. See http://java.sun.com/products/jaas/index.jsp for details.[03:18:07] <phix> yeah I would probably want it to back to a database (I am using hibernate as well )[03:18:29] <phix> The_Birdman: sweet[03:18:41] <r0bby> em_pleh: but when does the API throw it?[03:19:29] <surial> 'many apis to do that'? I'd say yes :)[03:19:36] <sproingie> yah there's also jaas. matter of taste, both are pretty rich.[03:19:36] <em_pleh> the if statment[03:19:47] <em_pleh> http://mibbit.com/pb/hi7SYh[03:19:53] <sproingie> and both are almost infinitely better than rolling your own[03:19:55] <em_pleh> wait[03:19:58] <em_pleh> let me update that[03:20:09] <em_pleh> r0bby: http://mibbit.com/pb/pB9ObR[03:20:13] <phix> The_Birdman: hmmm, I don't really care what the actual OS user is, I want a seperate authentication and ACL for my application only[03:20:28] <phix> The_Birdman: I might look into spring, that means more like what I want[03:20:32] <em_pleh> r0bby: after i do createplayer i check to see if it is null or not[03:21:03] <phix> The_Birdman: ACL within my application I meant, that is, specifying what groups or users can access a certain menu option (like preferences or edit etc..)[03:21:47] <phix> hmmm java implementation of PAM, nice[03:22:09] *** daedra has joined ##java[03:22:28] *** L-----D has quit IRC[03:22:31] <daedra> how do you go about using one Semaphore across several Class files?[03:22:43] *** psydian has left ##java[03:23:17] *** L-----D has joined ##java[03:23:31] <phix> Semaphore :S Java has that concept?[03:23:47] <phix> this is talking about threading right?[03:23:53] <daedra> phix: yup[03:24:06] <sproingie> stick it somewhere where it's visible to both. better yet, use a concurrency lib that doesn't make you use semaphores directly[03:24:10] <sproingie> ~concurrent[03:24:10] <javabot> sproingie, I have no idea what concurrent is.[03:24:20] *** nmatrix9 has quit IRC[03:24:20] <sproingie> ~javadoc java.util.concurrent[03:24:20] <javabot> I don't know of any documentation for java.util.concurrent[03:24:34] * sproingie grr[03:24:49] <sproingie> i wish javadoc understood packages[03:24:54] <tazle> ~concurrency[03:24:54] <javabot> Java has a sophisticated concurrency package that you can view at http://java.sun.com/javase/6/docs/technotes/guides/concurrency/index.html[03:25:24] <tazle> anyway, he clearly knows about j.u.c if he has stumbled upon Semaphores[03:26:14] <sproingie> i keep thinking those were old-fashioned java.lang.Thread things[03:26:48] *** rellis has joined ##java[03:26:53] <rellis> Hi everyone. I just tried to move three similar spring/ibatis apps I admin into a single JVM. When they are started in seperate JVM's I get one connection pool as I'd expect. If I put two webapps in one JVM I get 4 connection pools created. If I put three webapps in one JVM I get 9 connection pools created. Could anyone help me understand what may be going on here? Could spring be loading configurations from the other apps since they're in the same JVM[03:26:55] <rellis> now?[03:27:17] *** spiderbyte has quit IRC[03:27:22] <tazle> sproingie: no, there just wasn't a Semaphore in the standard library before j.u.c[03:27:24] <sproingie> anyway, same visibility problem as anything else. if you need your other thread to see it, you can subclass Thread and stick it there when you initialize it[03:27:26] <phix> wow, javaFX looks like poo[03:27:39] <sproingie> Bad Idea tho[03:27:41] <daedra> sproingie: how would it be visible to more than one class?[03:27:58] <tazle> daedra: he means "more than one object"[03:28:09] <sproingie> i'm not sure how to answer that question, it's like asking how to set a variable[03:28:29] <sproingie> it's visible when it's visible. you assign it to a property if you need to.[03:28:34] *** trustin_ has joined ##java[03:28:37] <tazle> daedra: and the answer is "the same way any other object can have many references"[03:28:39] <daedra> ok[03:29:23] <sproingie> the visibility and accessibility of concurrency primitives is actually one of the trickier things about writing concurrent code[03:29:27] <tazle> daedra: this is such a fundamental concept that it seems weird that you'd be doing anything with Semaphores if it isn't clear to you[03:29:32] *** Inhuman has quit IRC[03:29:41] <sproingie> too many things want to put their fingers on them when you make them too visible[03:29:43] *** trustin_ has quit IRC[03:29:55] <sproingie> i personally stay way the hell away from semaphores. use an Executor.[03:30:13] <sproingie> or a CyclicBarrier or CountdownLatch depending on what you're using it for[03:30:32] *** trustin_ has joined ##java[03:30:48] <hiredman> blah blah blah Java Concurrency in Practice blah blah blah[03:31:01] <daedra> tazle: yeah I'm being an idiot[03:31:23] * sproingie heads home. &[03:31:24] <daedra> it's basic OO[03:32:42] *** isr` has joined ##java[03:33:05] * tazle ponders pouncing on bad use of "OO"[03:33:09] <isr`> is it safe to throw an execption that will cause the program to exit from a constructor?[03:33:38] <tazle> isr`: "safe" considering what exactly?[03:33:50] <cheeser> ~tias[03:33:51] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[03:35:33] *** ohsix has joined ##java[03:35:43] <daedra> tazle: pounce away! I need to learn[03:37:40] *** spiderbyte has joined ##java[03:40:51] *** DavidC99 has joined ##Java[03:41:21] *** ramdam has quit IRC[03:42:34] *** morkar- has quit IRC[03:42:51] <em_pleh> r0bby: did you give up?[03:45:51] *** DavidC99 has left ##Java[03:46:26] *** javahorn has quit IRC[03:47:03] *** daedra has quit IRC[03:47:55] *** javahorn has joined ##java[03:50:26] *** vyoman has quit IRC[03:51:53] *** daedra has joined ##java[03:52:19] *** christo_m has quit IRC[03:53:53] <r0bby> em_pleh: whatever API you're using is throwing that[03:53:57] <r0bby> i told you to read the api[03:57:32] <aTypical> r0bby, why do you always expect people to read? Why can't you just solve all our problems for us?[04:01:41] *** rullie has quit IRC[04:01:45] *** chatmasta has joined ##java[04:02:06] <chatmasta> hi....i want to turn an int, such as 340, into an int[], such as {3, 4, 0}[04:02:11] <chatmasta> is there an easy way to do this?[04:02:37] <tazle> chatmasta: why do you wish to do that?[04:02:49] <chatmasta> i can also adapt and have it be a string[04:02:50] *** tranceNRG has quit IRC[04:03:02] <chatmasta> tazle: is it possible?[04:03:13] <tazle> chatmasta: yes, now why?[04:03:44] <chatmasta> it will keep my code cleaner[04:04:02] <tazle> chatmasta: how?[04:04:09] <chatmasta> actually nvm[04:04:10] *** chatmasta has quit IRC[04:04:15] <tazle> ~next[04:04:15] <javabot> Another satisfied customer. Next![04:05:08] *** L-----D has quit IRC[04:05:50] <cheeser> tazle: who cares why? he wasn't asking about advisability. he wanted to know how.[04:06:04] <cheeser> if you're going to help, help. but don't pester people with irrelevant questions.[04:07:03] *** daedra has left ##java[04:07:48] <tazle> obviously I do care, since I spent my time asking him about it[04:08:32] <r0bby> it was kinda pointless what he was trying to do, and googlable[04:08:50] <r0bby> String to integer java -- the rest is cake[04:09:14] *** trustin_ has quit IRC[04:09:21] <cheeser> tazle: that was rhetorical.[04:09:44] <cheeser> who gives a fuck if you don't understand/approve of what he's trying to do.[04:09:53] <cheeser> if you don't want to help, just stfu and let someone else.[04:10:40] *** durka42 has joined ##java[04:12:40] <tazle> I don't think helping people write stupid code is particularly helpful in the end[04:13:09] <cheeser> you don't know it's stupid. you know nothing about what he's trying to accomplish.[04:13:53] <tazle> indeed, which is why I asked - weird trivial things are a good indicator of stupidity[04:14:18] <cheeser> so answer his question then try to figure out the why[04:14:37] <cheeser> you have no idea how many complaints i get about people badgering those trying to get help here.[04:15:17] <tazle> yes, that might have been a better approach[04:15:40] <cheeser> i agree it looked ... odd, though.[04:15:54] <cheeser> but people tend to be more open on the why once they get their question answered.[04:16:01] <cheeser> otherwise it just feels like an inquisition.[04:17:15] <cheeser> enough of today. i'm going to bed.[04:17:33] <aTypical> Night, cheesey![04:18:20] *** javahorn has quit IRC[04:20:42] *** SpeedyGhost has quit IRC[04:21:15] *** SpeedyGhost has joined ##java[04:22:37] *** kater has joined ##java[04:23:03] *** kater_ has quit IRC[04:25:11] *** _bugz_ has joined ##java[04:25:12] *** squi has joined ##java[04:27:17] *** TooAngel has joined ##java[04:29:52] *** RealKillaz has quit IRC[04:31:19] *** repnop has quit IRC[04:31:27] <skypce> can you helpme? Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code[04:31:28] *** phix has quit IRC[04:32:49] <skypce> thank you i fix it[04:43:41] *** tieTYT has joined ##java[04:46:13] <aTypical> Glad we could help, skypce[04:47:15] *** kater_ has joined ##java[04:47:55] *** BerMeJo has joined ##java[04:48:00] <BerMeJo> hi all[04:48:24] <aTypical> Hello[04:48:34] * aTypical feels like the Walmart greeter.[04:48:46] <BerMeJo> concept question: protected attribues are accessible by other class in other file but in same package? Thank you[04:49:57] <BerMeJo> resume: friends class[04:50:47] <kinabalu> answer: google.[04:51:27] <BerMeJo> ... i have documents.. but i haven't it clear[04:51:44] <BerMeJo> i need direct response yes/no[04:52:06] <BerMeJo> i know they are accesibles by descendents class[04:52:26] <kinabalu> BerMeJo: its time to be disappointed then. that is easily found using a quick google search[04:53:47] <aTypical> yes[04:54:22] <tieTYT> is it possible to have an enum that refers to other enum values?[04:54:32] <tieTYT> before they're defined?[04:54:36] <BerMeJo> thank you both[04:54:37] *** TooAngel has quit IRC[04:54:52] <aTypical> BerMeJo, I think it's also referred to as package-protected[04:55:53] <BerMeJo> i'm reading it now, i thought package-protected and protected was same[04:56:18] *** surial has quit IRC[04:56:33] <aTypical> Me too. I think they add the term package there so you don't forget they're accessible by classes within the same package.[04:57:36] <BerMeJo> ok, thank you another time :)[04:58:04] <tazle> ~access control[04:58:05] <javabot> tazle, access level is one of 'public' ,'private', 'protected', or default a.k.a. package private. They control which code is allowed to access the attribute / call the method. public means: Everybody, 'private' means: Only stuff in this source file. For more info, see ~public, ~private, ~package-private, and ~protected, and this link: http://is.gd/eJYt (sun.com)[04:58:42] *** TooAngel has joined ##java[05:02:47] <tieTYT> this is my solution to "no forward references". Is it pretty standard? http://pastebin.com/m6ec21079[05:03:00] *** kater has quit IRC[05:08:03] *** MyName has joined ##java[05:08:10] <tazle> tieTYT: why not http://rafb.net/p/nDYBl636.html ?[05:08:34] <pfn> tieTYT, what's the problem with forward refs here?[05:09:06] *** ovnicraft has joined ##java[05:09:14] <tieTYT> pfn: well before AbilityType took another AbilityType in its constructor[05:09:24] <MyName> java is pass by value only, does it mean that if i pass in a reference variable to an object as an input to a function, then inside that function i can still do: myObject.myVariable=2, because i am NOT modifying the underlying value of this variable but only modifying the class content. But I cannot do myObject=null, because i'd be changing the underlying value.[05:09:27] <MyName> is that a fair statement ?[05:09:48] <tieTYT> tazle: I don't see much difference besides the enum[05:09:55] <tazle> MyName: it's wrong in some ways[05:09:57] *** ovnicraft has left ##java[05:09:59] <tazle> tieTYT: yes[05:10:00] <MyName> which way?[05:10:14] <tieTYT> tazle: *shrug*, might as well[05:10:46] *** zacs7 has joined ##java[05:10:48] <pfn> tieTYT, interesting, how do you create the first AbilityType without an abilitytype :p[05:11:08] <tieTYT> pfn: that's the problem :P[05:11:15] <tazle> MyName: inside the function you can do both myObject.myVariable=2 and myObject=null - the previous modifies the object referred to by myObject and the latter modifies the variable named myObject inside the function to refer to null instead of the object that was passed in[05:11:23] <tieTYT> and my answer is that i pass it in a setter instead of a constructor[05:11:44] <tieTYT> pfn: my paste shows the compromise I came up with[05:11:49] <tieTYT> a package-protected setter[05:12:15] <tazle> MyName: the latter however will not modify the reference that is outside the function, so in essence I think you are correct - your terminology just isn't exact[05:12:21] <tieTYT> the setter is called in a static block after everything's defined[05:12:54] <MyName> tazle, ah, that's right.[05:12:55] <MyName> thanks[05:13:11] *** antwaungomez has joined ##java[05:13:14] *** antwaungomez has left ##java[05:13:39] <tazle> tieTYT: you could also store the relations outside the enum instances[05:13:51] <tieTYT> tazle: that seems harder to understand[05:14:35] *** staykov has quit IRC[05:15:11] <tieTYT> is it possible to define "instance" methods on enum? I want every type to have a void applyTo(BattleCharacter bc); but, I want that applyTo method to do something totally different depending on the type[05:15:25] *** zacs7 has left ##java[05:15:25] *** riotz has quit IRC[05:16:29] <tazle> tieTYT: no, but you can create a constructor that takes Function<BattleCharacter> and stashes it in an instance variable and then have applyTo call that function[05:16:43] <tieTYT> i see[05:16:48] <tazle> tieTYT: however, you might not want to use enums for that[05:16:49] <tieTYT> i wonder if tha'd be worth it. It sounds very ugly[05:17:07] <tazle> tieTYT: enums are not very flexible if you ever want to change your program later[05:17:23] <MyName> if i toss a fair coin 10 times,what is the probability of getting 3 total heads. Is it: [ 10 choose 3 ] * [ 1/2] ^ 10 ?[05:18:03] <tieTYT> ~homework[05:18:03] <javabot> Homework is meant to be done by YOU so that YOU learn something. Stop cheating. We didn't like doing our own, why should we bother with yours? Besides, we'd rather you failed so we have less competition. Have a nice day![05:18:15] <tieTYT> and this ain't #math[05:18:20] <MyName> yes and i am tryign to confirm[05:18:22] <tazle> tieTYT: thus it might be OK to do something like that when implementing, say, a codec for some well-specified protocol that cannot ever change anyway, but I would shy away from enums when defining how things in a MUD or something like that can react to each other[05:18:24] <MyName> it makes sense to me this formula[05:19:04] *** navetz has joined ##java[05:19:25] *** smackdab has joined ##java[05:19:46] *** ramdam has joined ##java[05:19:54] *** smackdab has quit IRC[05:21:52] <tieTYT> tazle: i don't expect it to be changing much in my game[05:22:05] <tieTYT> tazle: i was actually asking that question for a different enum i have[05:22:18] *** smackdab has joined ##java[05:37:23] *** smackdab has quit IRC[05:37:31] <joed> Java is slow?[05:37:38] *** skypce has quit IRC[05:40:56] *** yobo2 has quit IRC[05:40:59] <The_Birdman> is it a question or a fact? :-)[05:41:10] <The_Birdman> or just irony?[05:41:15] *** AlanasAnikonis has quit IRC[05:42:15] *** TooAngel has quit IRC[05:44:00] <joed> The_Birdman: Shush, you clearly are not the target of the cleaverly disguised trolldom.[05:44:27] *** monestri has quit IRC[05:44:36] <r0bby> joed: I love you man[05:44:37] *** monestri has joined ##java[05:44:38] <waz> waz is slow[05:44:42] <r0bby> Happy birthday old man[05:44:53] <joed> Thanks r0bby[05:44:59] *** monestri has quit IRC[05:45:05] <mr_ank> happy birthday joed![05:45:05] <waz> it's your birthday!?[05:45:08] *** monestri has joined ##java[05:45:08] <aTypical> r0bby can be so nice... NOT!!![05:45:12] <waz> Happy Birthday[05:45:23] <joed> waz: Thank you sir![05:45:30] <mr_ank> i'm working on this for my blog http://docs.google.com/Doc?id=dfc9qcgg_26g3ncz8f6[05:45:32] <mr_ank> any ideas?[05:45:44] *** woogley has joined ##java[05:45:44] <mr_ank> comments appreciated :)[05:45:52] <r0bby> mr_ank: remove the epic failure[05:46:00] <mr_ank> sure[05:46:02] <mr_ank> /kick r0bby[05:46:03] *** Lhet has joined ##java[05:46:08] <mr_ank> damn, i can't quite do it[05:46:31] *** ChanServ sets mode: +o waz[05:46:39] *** r0bby was kicked by waz (i can!)[05:46:42] *** r0bby has joined ##java[05:46:46] <mr_ank> thanks waz![05:46:46] *** mr_ank was kicked by waz (see!)[05:46:50] <r0bby> waz: :-*[05:46:51] *** mr_ank has joined ##java[05:46:58] <mr_ank> hehehe[05:47:30] <aTypical> Power corrupts. Absolute power corrupts absolutely.[05:47:42] *** TooAngel has joined ##java[05:48:49] *** KarlsBerg87 has left ##java[05:48:51] *** Kwitschibo has quit IRC[05:49:49] *** Wicked has joined ##java[05:52:49] <frivol> Somehow, ##java op falls short of my hopes for absolute power.[05:52:54] <joed> mr_ank: It is a very short list of obvious.[05:53:23] <mr_ank> joed: correction. it's a GROWING short list of obvious.[05:53:30] <joed> mr_ank: It would indicate lack of imagination or experience.[05:53:54] <mr_ank> what would?[05:54:06] <joed> mr_ank: Oi, it is an extenzee list of previously used sarcasm?[05:54:21] <mr_ank> huh?[05:54:27] <mr_ank> English, do you speak it?[05:54:33] <joed> Did you find any of that original?[05:54:48] <mr_ank> Any of what?[05:55:03] <joed> Your list dumbass?[05:55:17] <mr_ank> What list?[05:55:27] <The_Birdman> joed:happy birthday, and yet the most important question How old are you?[05:55:51] <joed> The_Birdman: 29:Going on 38.[05:56:00] <The_Birdman> hehe[05:56:06] <The_Birdman> that's a huge step[05:56:10] <tieTYT> bah, wish I could switch on a string[05:56:30] <mr_ank> joed: to answer your questions, no, i don't think they are original[05:56:45] *** meanburrito920_ has joined ##java[05:56:56] <mr_ank> joed: there's a hundred people who have done this before[05:57:02] <joed> The_Birdman: 2 more to any switch, I still feel young, and obviously mr_ank proves there still are fools born every minute.[05:57:03] <mr_ank> Dilbert being the most obvious[05:57:46] *** blankthemuffin_ has joined ##java[05:57:50] <mr_ank> joed: give me back my "happy birthday" greeting![05:57:56] <mr_ank> no more happy birthday to you, mister.[05:57:58] <mr_ank> sorry[05:58:04] <The_Birdman> mr_ank you've been pwned :-)[05:58:08] <joed> mr_ank: Hah[05:58:33] <mr_ank> look at my Frowny Face[05:58:35] <mr_ank> LOOK AT IT[05:58:38] <mr_ank> :-([05:59:12] <aTypical> mr_ank, it's such a cheerful little channel, ain't it?[05:59:26] <mr_ank> aTypical: yes[05:59:51] <rawblem> hey all. if I have a superclass method that returns "Animal", which versions of java would allow a subclass to return "Tiger" ?[06:00:15] <joed> Java.lang.homework.spieces[06:00:16] * The_Birdman coughes, mr_ank, I can't even smoke my cigarette, don't make me laugh all the time[06:00:16] <aTypical> rawblem, don't ask that question here!!! They'll kill you!!![06:00:21] <mr_ank> joed: lol[06:00:33] <rawblem> heh not homework thanks though[06:00:33] <r0bby> joed: species[06:00:43] <mr_ank> rawblem: version pkzip 2.04g[06:00:46] <r0bby> rawblem: is it for school?[06:00:51] <aTypical> r0bby, don't pick on the dyslexic[06:00:53] <r0bby> an assignment[06:00:58] <rawblem> no this is not for school. i just use animal examples because they're the most intuitive[06:00:59] <joed> r0bby: Do you think?[06:01:00] <r0bby> aTypical: I'll pick on them[06:01:06] <aTypical> You're so mean![06:01:07] <r0bby> Never[06:01:14] <The_Birdman> wrong![06:01:14] <rawblem> i graduated college 4 years ago[06:01:18] <r0bby> thinking burns brain cells[06:01:21] <Wicked> hello all. i have a some string that may contain some letters or characters like KB/s. whats the easiest way to get rid of the KB/s? its always at the end of the string..but i can figure out how to remove it.[06:01:22] <joed> aTypical: I'm not duschbaglexical, I'm hammered and happy.[06:01:23] <rawblem> i just don't know which version allows that kind of subclassing[06:01:26] <The_Birdman> r0bby:correct answer is only when necessary[06:01:34] <aTypical> joed, salud![06:01:38] *** staykov has joined ##java[06:01:39] <mr_ank> Wicked: see String.replace[06:01:42] *** delskorch has quit IRC[06:01:59] <r0bby> Wicked: you'd want String.replaceAll()[06:02:03] <r0bby> ~~ Wicked javadoc String[06:02:05] *** Junior has joined ##java[06:02:05] <javabot> Wicked: http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/iaWp [javax.print.DocFlavor.STRING][06:02:09] <Wicked> just replace(blah, "")?..i though of using that...but didnt think it worked ike that[06:02:12] <r0bby> become familiar with that. (first one)[06:02:14] <rawblem> Ok well that'll teach me to ever use species in my questions again... but seriously its a legitimate question. Does anyone know which java version allows for loose method subclassing return types?[06:02:18] <The_Birdman> mr_ank is actually trying to help after reaching the nirvan of perversion[06:02:25] <Junior> yello ;)[06:02:26] <The_Birdman> nirvana*[06:02:27] <mr_ank> Wicked: you have to do s = s.replaceFirst()[06:02:38] <mr_ank> The_Birdman: the nirvana of perversion?[06:02:42] <r0bby> mr_ank: I'd use replaceAll() :)[06:02:45] <joed> rawblem: You need to go back to the inheritance chapter.[06:02:47] <r0bby> like a real man :)[06:02:58] <Wicked> hmm ok. thanks guys. ill give this a try :)[06:02:58] <r0bby> ~~ rawblem inheritance[06:02:59] <javabot> rawblem, inheritance is http://java.sun.com/docs/books/tutorial/java/concepts/inheritance.html , http://java.sun.com/docs/books/tutorial/java/IandI/subclasses.html , and http://java.sun.com/docs/books/jls/third_edition/html/names.html#104101[06:03:00] <The_Birdman> r0bby, replaceAll but what would you replace?[06:03:19] <r0bby> whatever I need to replace[06:03:24] <The_Birdman> hehe[06:03:47] <mr_ank> joed: so, in your opinion, this is too derivative too matter and if you were in my shoes you wouldn't bother posting it?[06:03:52] <joed> And if you don't mind - would you want to explain exactly how : method subclassing return types should work?[06:03:53] <mr_ank> s/too/to/[06:04:30] *** kochii has quit IRC[06:05:11] <mr_ank> case i'm not sure what you were saying, other than trolling[06:05:33] <joed> mr_ank: Going back to old quotes and things like Twain, sure they are funny, farce is usually reality poking fun at despair and so on, it is nothing new, they existed since the greeks and egyptians, prior to that by word of mouth?[06:06:04] <mr_ank> oh come on, don't give me a history lesson, i'm just asking for your opinion[06:06:13] <joed> mr_ank: Go for it![06:06:26] *** MyName has quit IRC[06:06:31] <joed> Get a Chevy Volt while you are at it.[06:06:32] *** blankthemuffin has quit IRC[06:06:36] *** blankthemuffin_ is now known as blankthemuffin[06:07:33] <mr_ank> i wouldn't mind getting a Chevy Volt[06:08:03] <joed> mr_ank: I think it is material for "I found this really amuzing, I wonder if I'm alone in the whole wide world or if I should just put this onto the backburner until I finish my degree"[06:08:41] <mr_ank> really?[06:08:48] <joed> Really..[06:09:22] <mr_ank> interesting[06:09:34] <mr_ank> i wouldn't mind workign with you then[06:09:46] <mr_ank> you must be more cynical than i am[06:10:02] <joed> Heh.[06:10:04] <mr_ank> Most people think these things but don't post it[06:10:15] <mr_ank> i'm going to post it to my blog[06:10:23] <mr_ank> I wonder what's going to happen[06:10:32] <joed> Those things were posted by the greeks and romans. That was my point.[06:10:34] *** aTypical has quit IRC[06:10:44] <mr_ank> joed: yes, of course[06:11:02] <mr_ank> and "cleopatra does the nasty" if you believe Bubba Ho-Tep[06:11:44] <joed> I'm sure she did, considering her reported choice of facial tratement.[06:12:05] <mr_ank> now, that's a pretty flawed respons.e[06:12:20] <mr_ank> You should have spoken about Bruce Campbell and Don Coscarelli.[06:12:23] <isr`> and this is java related... how?[06:12:33] <isr`> :-P[06:12:35] <mr_ank> i no way...[06:12:36] * mr_ank runs[06:12:37] <joed> In no way whatsoever.[06:12:38] <mr_ank> *in[06:12:44] <rawblem> r0bby, ok seriously, i know how inheritance works... none of those pages say what version of java this is possible in. http://pastebin.ca/1332359[06:12:54] <rawblem> I know it was added in 1.4 or 5.0 or possibly 6[06:12:55] <joed> isr`: And thanks for that pointer.[06:13:09] <isr`> hey now, this is #java, it was a reference[06:13:09] <rawblem> i dont think it was possible in 1.4[06:13:27] <joed> mr_ank: frame those questions in what you just eluded to, great blog.[06:13:40] * The_Birdman frees the pointer reference to isr`[06:14:00] * isr` flee's the garbage collector[06:14:07] <mr_ank> joed: frame the questions in what??[06:14:14] * joed hands The_Birdman 0.0000000002 of Oracle controlled sys5 memory.[06:14:16] <isr`> ~tias[06:14:16] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[06:14:26] <isr`> ~fubar[06:14:27] <javabot> isr`, fubar is one of those acronyms that is fucked up beyond all recognition.[06:14:29] <joed> mr_ank: The list.[06:14:42] <isr`> ~pebkac[06:14:42] <javabot> isr`, pebkac is Problem Exists Between Keyboard And Chair[06:14:50] <isr`> javabot is cool[06:14:50] <javabot> no, you are![06:14:50] <joed> mr_ank: You already proved the discussion point.[06:15:11] <mr_ank> i think you meant allude.[06:15:14] <mr_ank> not elude[06:15:18] <mr_ank> but keep playing[06:15:34] <mr_ank> i'm sure there's a high score for you waiting to happen if you try enough[06:15:41] <joed> Probably, And yes.[06:15:47] <r0bby> rawblem: are you referring to co-variant return types? if So java 1.5.[06:15:53] *** reval has left ##java[06:16:06] <joed> mr_ank: Oh, there is, I can be Bowser Jr?[06:16:17] <mr_ank> joed: i like super punch out myself[06:16:43] <mr_ank> it's probably a bit before your time[06:17:06] <joed> mr_ank: I'm past arguing, we just got to the point a few sentences ago, so super mario Mele, golf hangout smack shack it is.[06:17:36] <joed> mr_ank: Before my time?[06:17:44] <mr_ank> yes, before your time[06:17:57] <isr`> what about pong?[06:18:12] <joed> Okay. I'd like to hear about that time.[06:18:40] <r0bby> mr_ank: joed may be older than you[06:18:41] <mr_ank> joed: well, i believe multicellular organisms were about to appear.[06:18:45] <mr_ank> it was an old time ago[06:18:53] <mr_ank> Case you are an OLD FART! HAPPY BIRTHDAY![06:18:54] <mr_ank> HAHAHA[06:18:58] <joed> Haha[06:19:03] <The_Birdman> happy birthday joed[06:19:04] <rawblem> r0bby, yeah thanks. I think it's kinda funny that a well-asked simple question that gets to exactly what it wants to know doesn't get answered because it sounds like homework[06:19:09] <joed> ~mr_ank++[06:19:09] <javabot> mr_ank has a karma level of 1, joed[06:19:10] <rawblem> but then i'm sure you guys get a lot of homework questions here[06:19:20] <The_Birdman> the man you got 9 years older in one year[06:19:20] <r0bby> yeh[06:19:25] <The_Birdman> 29 to 38[06:19:33] <isr`> pfft[06:19:37] <isr`> ~mr_ank--[06:19:38] <javabot> mr_ank has a karma level of 0, isr`[06:19:41] <joed> ~mr_ank++[06:19:42] <javabot> mr_ank has a karma level of 1, joed[06:19:49] <r0bby> isr`: mr_ank is cooler than you will ever be[06:19:53] <The_Birdman> ~isr`--[06:19:54] <javabot> isr` has a karma level of -1, The_Birdman[06:19:58] <The_Birdman> that was a bad move man[06:20:02] <joed> isr`: Don't fuck with karma[06:20:03] <isr`> ~isr`++[06:20:04] <javabot> Changing one's own karma is not permitted.[06:20:05] <javabot> isr`, you have a karma level of -2[06:20:08] <isr`> dammit[06:20:12] <isr`> lol[06:20:13] <r0bby> let's see if this works[06:20:14] <rawblem> lolol[06:20:16] <r0bby> ~shun isr`[06:20:17] <javabot> r0bby, I have no idea what shun isr` is.[06:20:19] <r0bby> ~shun isr`[06:20:20] <javabot> r0bby, I have no idea what shun isr` is.[06:20:26] <r0bby> damn it[06:20:32] <isr`> ~rape r0bby[06:20:32] <javabot> isr`, I have no idea what rape r0bby is.[06:20:51] *** AlanasAnikonis has joined ##java[06:21:05] <The_Birdman> hehe[06:21:35] <isr`> ~to do with r0bby, he's really gay - he certainly[06:21:36] <javabot> isr`, I have no idea what to do with r0bby, he's really gay - he certainly is.[06:21:56] <The_Birdman> lolrof[06:21:57] <isr`> yeah i know javabot, what a poofter[06:23:03] <r0bby> ok[06:23:26] <r0bby> why the FUCK is ShunOperation not working[06:23:40] *** rdancer has quit IRC[06:23:46] <mr_ank> http://www.flickr.com/photos/24973901@N04/2762458387/ << old but i love it[06:24:03] <r0bby> isr`: grow the fuck up[06:24:35] <isr`> never[06:25:00] <r0bby> then why don't we take the middle road and you just not talk unless you have to?[06:25:01] <joed> r0bby: I don't think it is activated.[06:25:09] <r0bby> it needs to be :/[06:25:19] <r0bby> isr` is a perfect use-case.[06:25:51] <isr`> oh really[06:26:07] <r0bby> isr`: you're over-using the bot, it's not a toy.[06:26:27] *** mySQLnoob has joined ##java[06:26:38] <isr`> its not like he needs to be fed[06:26:55] <joed> isr`: Freedoom of speech and all that since we all on IRC either are FBI agents, Stalkers or males, I'd appreciate you diverting the discussion from what is about 10-15% of the population slurs. - Okay?[06:26:55] <r0bby> ~~ isr` troll[06:26:55] <javabot> Please go away.[06:27:12] <mr_ank> ~~ anus[06:27:12] <javabot> The syntax is: tell nick about factoid - you missed out the 'about', mr_ank[06:27:22] <mr_ank> oh ok[06:27:24] <r0bby> mr_ank: dont encourage him[06:27:31] <mr_ank> sorry :/[06:27:36] <mySQLnoob> can anyone tell me why this wont work? "buf = buf.toString().substring(77).getBytes();" where "byte[] buf = null;", im trying to get ride of the first 77 bytes of the array[06:27:45] <isr`> r0bby: you can't get laid by a bot, chill out man[06:28:07] <joed> mySQLnoob: What is the actual error?[06:28:14] <r0bby> joed: could you kick him? I've seen next to nothing productive out of him[06:28:25] <r0bby> other than him trolling[06:28:37] <mr_ank> mySQLnoob: why not just loop?[06:28:42] <isr`> r0bby: what is it about hastling me that is productive?[06:28:55] <r0bby> you're righjt[06:28:59] <mySQLnoob> joed: java.lang.StringIndexOutOfBoundsException: String index out of range: -69[06:29:01] *** linxuz3r has joined ##java[06:29:02] <joed> r0bby: isr` Why don't you take it to a PM?[06:29:03] <mySQLnoob> that's the error[06:29:11] <linxuz3r> is there a 2 dimensional vector in java?[06:29:15] <r0bby> joed: fantastic idea[06:29:18] <r0bby> linxuz3r: no[06:29:19] <mySQLnoob> mr_ank: would looping over it work better?[06:29:22] <r0bby> not even 2-d arrasy[06:29:26] <linxuz3r> is there an n dimensional vector in java?[06:29:28] <mr_ank> mySQLnoob: it's a lot more clear, yes[06:29:29] <r0bby> vectors of vectors.[06:29:42] <joed> mySQLnoob: So you try and access something that does not exist, use collections.[06:29:43] <r0bby> or Lists of Lists i should say.[06:30:20] <joed> mySQLnoob: Is this a network assignment?[06:30:26] <r0bby> linxuz3r: java has arrays of arrays to emulate multi-dimensional arrays[06:30:37] <mySQLnoob> joed: i dont understand what exactly is wrong, if i print the buf alone it's all fine, why would that substring and back to bytes get all messed up?[06:30:40] <joed> mySQLnoob: You are probably reading in too much prior to this.[06:30:47] <isr`> is vector depricated?[06:30:58] <mySQLnoob> joed: no, not network assignment, just me trying to remove the first 77 bytes from an image in base64[06:30:58] <mr_ank> deprecated[06:31:07] <isr`> mr_ank: thanks[06:31:17] <mr_ank> mySQLnoob: then seek past the first 77 bytes[06:31:25] <joed> mySQLnoob: a String is 'BangSomeThing' Let us call it byte '0', '1', '2'[06:31:42] *** kercyr has joined ##java[06:31:51] <isr`> is vector deprecated. im looking at it on the java doc. is there some reason one would need a vector over an ArrayList[06:31:53] <mySQLnoob> mr_ank: that was the whole purpose of the substring, to seek past the first 77...[06:31:55] <joed> If it does not go to the number you wanted, that is the error you get.[06:32:13] <joed> mySQLnoob: Check the length then.[06:32:15] <mySQLnoob> so basically i should go with the looping[06:32:18] <mr_ank> mySQLnoob: yes, but insteal of trying to cut the string, skip the bytes you are reading[06:32:31] <joed> mySQLnoob: yes.[06:32:36] <mySQLnoob> all i know is i have byte[] and i wanna get ride of the first 77 bytes[06:32:42] <mySQLnoob> easiest way is looping then[06:32:54] <mySQLnoob> thanks[06:33:12] <joed> Yes.[06:33:15] *** ccherrett has quit IRC[06:33:32] <pr3d4t0r> bySmallerArray = byArray[77:][06:33:37] <joed> And you might want to do that once you have more than 77 bytes.[06:34:48] *** le_biloute has quit IRC[06:35:27] *** giaco has quit IRC[06:35:29] <mySQLnoob> ok i got another error....[06:35:29] <kingping> Hello[06:35:53] <mySQLnoob> "for(int i=77;i<buf.length;i++) temp[i] = buf[i];" then i get java.lang.NullPointerException... wait i gotta really figure this out[06:36:12] <r0bby> wtf[06:36:14] <joed> Yup.[06:36:15] *** supersako has joined ##java[06:36:24] <r0bby> for(int i=0;i<bugg.length;i++) { ... }[06:36:44] *** waz has quit IRC[06:36:46] *** amz has quit IRC[06:36:48] <mySQLnoob> but why from 0? i dont wanna copy the first 77.. i wanna skip them[06:37:03] *** SniperFodder has quit IRC[06:37:14] <r0bby> well think throigh that loop[06:37:18] <r0bby> wait..[06:37:23] <r0bby> nevermind that'll work[06:37:32] <joed> Or look at what pr3d4t0r gave you.[06:37:34] <kingping> When I retrieve 'member' attributes list with Attributes answer = ctx.getAttributes("cn=online24,ou=ldap", new String[]{"member"}); it returns ones, but when I try to print them they are showed in the LDAP notation http://freebsd.pastebin.com/d26423cf0[06:37:43] <r0bby> mySQLnoob: did you instantiate your array[06:37:49] <supersako> hey guys so I have a java project due for school, my professor is only going to run javac *.java and expect it to work...[06:37:51] <r0bby> is it still nulll?[06:37:51] <mySQLnoob> i just saw pr3d4t0r thanks but im not sure i've seen that before.. trying to figure out that one[06:37:55] <r0bby> ~~ supersako homework[06:37:55] <javabot> Homework is meant to be done by YOU so that YOU learn something. Stop cheating. We didn't like doing our own, why should we bother with yours? Besides, we'd rather you failed so we have less competition. Have a nice day![06:37:57] <mySQLnoob> r0bby: yes i did[06:38:04] <supersako> which jdk do i need?[06:38:11] <r0bby> supersako: java 6.[06:38:12] <kingping> Like CN=PDC,OU=Domain Controllers,DC=ame,DC=ru But I'd like to get only CN which is the actual name of the computer.[06:38:16] <r0bby> ~~ supersako download[06:38:16] <javabot> Find current releases for Java at http://java.sun.com/javase/downloads/index.jsp and a comprehensive archive of current and older releases of various Java related products at http://java.sun.com/products/archive/[06:38:18] <kingping> Is there a solution?[06:38:22] <supersako> i am running on x64, and i am assuming my professor is gonna be using 32bit or 64[06:38:30] <supersako> does it matter which jdk i get? 32 or 65?[06:38:33] <supersako> 64*[06:38:39] <r0bby> supersako: yes.[06:38:48] <r0bby> if you're on 32 bit, get 32 bit.[06:38:55] <r0bby> if you're on 64 bit, get 64 bit.[06:39:19] <supersako> ok r0bby so theres no issues of me making something in 64 bit and he cmpiles in 32 bit?[06:40:05] <joed> supersako: You'll be providing him the source? No, no issue.[06:40:28] <supersako> yes the source[06:40:30] <supersako> great thanks...[06:40:48] <supersako> so i need the Java SE JDK?[06:41:47] <r0bby> yes.[06:41:50] <r0bby> java se JDK[06:42:14] <supersako> great, thanks again, so many different versions i'm confused :PP[06:42:23] <mr_ank> supersako: it is confusing[06:43:02] <joed> Life is, don't overpopulate.[06:43:56] *** Frostix has quit IRC[06:47:35] <supersako> whats a good way to get started programming on windows, can i just use my own text editor? or is netbeans a good idea?[06:47:45] <supersako> i am not new to programming but new to java[06:47:46] *** durka42 has quit IRC[06:48:01] <mySQLnoob> the example pr3d4t0r gave.. "bySmallerArray = byArray[77:]" im trying it but it says it can't convert from byte to byte[]... then i'm not understanding that fully..[06:48:37] <mySQLnoob> i'll just paste my method in pastebin[06:49:17] <pr3d4t0r> mySQLnoob: I was screwing with you.[06:49:20] <pr3d4t0r> mySQLnoob: That's Python.[06:49:32] <mr_ank> That's python? I thought it was psedocode![06:49:34] <supersako> haha[06:49:42] <mr_ank> it's like executable pseudocode! OMG![06:49:47] <supersako> python _is_ psuedocode[06:49:49] <pr3d4t0r> mySQLnoob: A lot more elegant than Java when it comes to list, array, and dictionary manipulation :)[06:50:05] <pr3d4t0r> mr_ank: ZOMGDDT![06:50:06] <mr_ank> hehehe[06:50:15] <supersako> lol[06:50:22] <mr_ank> pr3d4t0r: what do your passwords look like?[06:50:25] <supersako> what do you guys use for programming in java?[06:50:28] <supersako> what editor?[06:50:33] <mySQLnoob> ok here's the code that works: http://pastebin.com/d346637c7[06:50:35] <isr`> i'm using eclipse[06:50:35] <navetz> hey guys, I don't really understand why im not allowed to do this: buttonVector.ElementAt(i) = new circle(1,i,i/2);[06:50:38] <pr3d4t0r> mr_ank: http://genpasswd.eugeneciurana.com[06:50:45] <isr`> its actually not as bad for java as i remember it being for c/c++[06:50:53] <AlanasAnikonis> supersako: intellij[06:50:58] <navetz> i initialized my vectore to be of length 6[06:51:01] <isr`> but a lot of people use netbeans from what i understand[06:51:04] <navetz> do i have to populate it with add?[06:51:12] <mySQLnoob> what i wanted to do was to do the fos.write(buf) without the first 77 bytes[06:52:58] <mySQLnoob> pr3d4t0r: i kind of gather you were cause i've never seen a thing like that in java but they were saying i should so i thought maybe a new version had something neat like that =/[06:53:24] <pr3d4t0r> mySQLnoob: Let us hope.[06:53:49] <pr3d4t0r> mySQLnoob: Some of the *really* *neat* features like that won't be in Java until they eliminate the primitives vs. objects separation.[06:54:08] *** casmo has quit IRC[06:54:10] *** _acid__ has quit IRC[06:54:14] <mySQLnoob> so that method as i paste it works fine, it writes the decoded string to the file... but then i tried the options above and i was getting all those errors.. i don't understand why 0_0[06:54:42] <mr_ank> maybe it's your hard drive dying?[06:54:56] <mySQLnoob> pr3d4t0r: that is a never then[06:55:03] <pr3d4t0r> mySQLnoob: Maybe.[06:55:15] <pr3d4t0r> mySQLnoob: Pressure is mounting on Sun. Maybe in Java 8.[06:55:18] *** Resistance has quit IRC[06:55:42] <pr3d4t0r> mySQLnoob: At least they didn't put embedded XML in Java 7, like they threatened in March 2005 that they would.[06:55:51] <mySQLnoob> hmm so nobody can tell me why the loop nor the substring would work to remove the first 77 bytes?[06:55:59] *** G0-T0 has joined ##java[06:56:01] *** Resistance has joined ##java[06:56:08] *** supersako has quit IRC[06:56:12] <joed> Oh for fucks sake.[06:56:17] <mySQLnoob> pr3d4t0r: embedded XML in Java t??? 0_0[06:56:22] <pr3d4t0r> mySQLnoob: Yeah.[06:56:27] <pr3d4t0r> mySQLnoob: It was a bad, fugly proposal.[06:56:27] <mySQLnoob> 7*[06:56:35] <pr3d4t0r> mySQLnoob: Saner minds prevailed.[06:56:39] *** ramdam has quit IRC[06:56:44] <mySQLnoob> lol[06:57:20] <pr3d4t0r> Anyway... time for bed. See you guys tomorrow.[06:57:22] <pr3d4t0r> Z z .[06:57:34] <mySQLnoob> nite pr3d4t0r[06:57:39] <pr3d4t0r> mySQLnoob: Cheers.[06:58:39] <The_Birdman> sweet dream from mrcheeks , pr3d4t0r[06:59:03] <The_Birdman> dreams*[06:59:10] <mr_ank> why exactly did you choose mrcheeks, The_Birdman?[06:59:22] <mySQLnoob> ok i guess i'll go figure out why that's happening, unbelievable can't remove 77 freaking bytes from an array >_<[06:59:25] <mr_ank> it just sounds... vaguely immoral.[06:59:32] *** mySQLnoob has quit IRC[06:59:40] <The_Birdman> I cannot give you the uncensored reason, too much for irc[06:59:55] *** kercyr has quit IRC[07:00:23] <The_Birdman> I wanted love which I never found, so I called myself mrcheeks as looking for true love[07:00:38] <mr_ank> TMI[07:01:23] <isr`> can you catch multiple exceptions at a time?[07:01:33] <The_Birdman> yes[07:01:39] <The_Birdman> using Exception :-)[07:01:44] *** vix85 has joined ##java[07:01:46] <mr_ank> isr`: or you can do:[07:02:02] <The_Birdman> do what[07:02:06] <The_Birdman> what mr_ank[07:02:11] <mr_ank> try { } catch (ExceptionType1 e) { ... } catch (ExceptionTYpe 2) { .,.. }[07:02:24] <mr_ank> i mean[07:02:37] <mr_ank> try { } catch (ExceptionType1 e1) { ... } catch (ExceptionType2 e2) { .,.. }[07:02:40] <isr`> yeah,[07:02:47] <isr`> i think just catching Exception would do[07:03:02] <mr_ank> just catching exception is a bad idea unless you want to catch exception :)[07:03:04] <isr`> as all of the exceptions i want to catch are going to result in the same output (a usage thing)[07:03:35] <The_Birdman> it is amusing to see guys catching exceptions try{} catch(Exception e){ // WHAT SHOULD WE DO?}[07:03:38] <isr`> So its better to catch, say three different types of exceptions and have the same code in each catch block than it is to just catch Exception[07:04:01] <Tenac> Is there a reason I can't find a single decent example of a java compiler on google?[07:04:11] <mr_ank> Tenac: example?[07:04:29] <Tenac> All I can find are like 2 line examples of how to use the JavaCompiler[07:04:32] <mr_ank> isr`: it's better to write the code that is closer to your intention[07:04:50] <mr_ank> Tenac: what are you looking for? the actual java -> bytecode compiler?[07:05:07] <The_Birdman> nope[07:05:15] <The_Birdman> the JavaCompiler API[07:05:20] <The_Birdman> to compile dynamically[07:05:37] <mr_ank> ahh[07:05:50] <mr_ank> i've been using ASM[07:06:02] <mr_ank> but it's for bytecode manipulation[07:06:13] <mr_ank> might work, depending on what you need to do[07:06:29] <Tenac> the JavaCompiler needs tools.jar, right?[07:06:38] <The_Birdman> ok guys gn[07:07:17] *** The_Birdman has quit IRC[07:07:32] *** woogley has quit IRC[07:07:53] <isr`> mr_ank: would it be better to just catch RuntimeException[07:08:12] <isr`> because im dealing with command line arguments that get parsed to integers.[07:08:28] <mr_ank> it's better to fail *before* you can get that exception[07:08:31] *** supersako has joined ##java[07:08:45] <mr_ank> That is, try using regular expressions/etc to check for valid inputs and failing then[07:09:02] *** le_biloute has joined ##java[07:09:48] *** sebr is now known as sebr_afk[07:10:02] *** woogley has joined ##java[07:10:27] <isr`> mr_ank: i see. so i shouldn't rely on build in exceptions?[07:11:14] <mr_ank> it's not a good practice for validation[07:11:18] <isr`> for example, if args[0] is "k" and i Integer.parseInt(args[0]), its better to check args[0] than to rely on parseInt[07:11:31] *** kReepicheep has joined ##java[07:11:43] *** b3nn3tt has joined ##java[07:11:44] <isr`> hm[07:12:13] *** warriorforgod has joined ##java[07:12:27] *** DCPom has quit IRC[07:12:30] <warriorforgod> How can I use printf to convert .13 into 13?[07:12:44] <warriorforgod> I tried .2f but this doesn't work. it shows up as 0.13.[07:13:21] <supersako> you can multiply it by 100?[07:14:36] <b3nn3tt> im looking at the quartz library and i see you can schedule a class to execute, but i dont understand how to get a specific object to run?[07:14:48] <b3nn3tt> s/run/execute/[07:15:41] <supersako> anyone here using jdk in linux?[07:15:50] <dangertools> ~anyone[07:15:50] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[07:16:17] <supersako> is it possible to run javac *.java in linux?[07:16:29] <supersako> i tried that in the command line, but got nothing[07:16:51] <dangertools> sure[07:17:34] <supersako> i have the jdk and jre installed, do i have to run anything before i can use javac?[07:17:59] <dangertools> is javac in $PATH?[07:18:37] <supersako> doh, no, how can i add it?[07:18:47] <supersako> my javac is in /opt/java/bin/[07:19:20] <linxuz3r> what is returned in public object objFunc() ?[07:19:35] <dangertools> supersako: why don't you install the jdk via your package manager?[07:19:40] <supersako> i did[07:19:55] <dangertools> linxuz3r: object, which is probably a typo and should be Object unless you are doing C#[07:19:55] <linxuz3r> anyone?[07:20:01] <dangertools> and be patient[07:20:08] <linxuz3r> what is returned in public Object objFunc() ?[07:20:13] <linxuz3r> yes capital C[07:20:17] <linxuz3r> capital O[07:20:53] <dangertools> supersako: ok, why means "got nothing"[07:21:08] <dangertools> linxuz3r: then Object is returned[07:21:25] <linxuz3r> what is an Object is that the same as a class or a type?[07:21:34] <linxuz3r> i mean a class not a type[07:22:03] <dangertools> linxuz3r: java.lang.Object is the superclass of every other class and you should get a book[07:22:44] *** supersako has quit IRC[07:22:45] <linxuz3r> Im referring to a book that we used for our introductory java[07:23:09] *** jkriesten has joined ##java[07:25:06] *** cactaur has quit IRC[07:35:50] *** b3nn3tt has quit IRC[07:36:47] *** yclian has quit IRC[07:38:32] *** SniperFodder has joined ##java[07:38:32] *** Levia has quit IRC[07:43:00] *** convivial has quit IRC[07:43:07] <G0-T0> Hey, I've got a ArrayList, and I want to toString each element, and print them to the console. I'm using a for loop, but I'm getting an error saying that an Array is required. How can I do this if I'm using ArrayLists? This is what I've got... http://pastebin.ca/1332475[07:43:15] *** Kwitschibo has joined ##java[07:43:28] *** cybereal has joined ##java[07:43:49] *** durka42 has joined ##java[07:43:53] <kinabalu> G0-T0: Arraylist is an object. use it like one[07:44:10] <kinabalu> G0-T0: you can't use array syntax on an object. it doesn't work. read the javadoc for Arraylist[07:44:35] <cybereal> yeah, this isn't python or something[07:44:45] <tieTYT> how can i make a method like this less error prone? http://pastebin.com/mdf85dcd[07:44:55] <G0-T0> kinabalu: ok thanks[07:45:02] <tieTYT> i don't like how i have to modify this AND the class it returns every time i add a new one[07:45:21] *** scorchsaber has quit IRC[07:45:43] <cybereal> tieTYT: well, you could do this[07:46:45] <cybereal> Map<String, Class<WhateverType>> to associate those strings with their accompanying type, require the class have a default ctor, and define its interface to have an initialize method that takes the effect parameter(s)[07:46:53] <cybereal> then when you add a new one you just add to the map?[07:47:15] <tieTYT> that has the same problem of 2 places to modify[07:47:23] <tieTYT> i can just as easily forget to add it[07:47:34] <tieTYT> maybe there isn't a solution to that detail[07:47:49] <cybereal> yeah uh if you forget to add it, it wouldn't be half there or something[07:47:58] *** bas-i has joined ##java[07:48:04] <cybereal> that's no worse an issue than if you forgot to write any other code or add any other configuration setting or whatnot[07:48:18] <tieTYT> oh i see what you're saying[07:48:20] <tieTYT> it's a little better[07:48:27] <cybereal> but it does generalize the selection and association construct so you don't have to write as much boilerplate for each new thing[07:48:52] <tieTYT> but on the other hand, it doesn't fail as fast if i pass in the wrong type[07:49:00] <cybereal> if you wanted to go all out you could use annotations to make the mappings[07:49:08] <tieTYT> right now i get a CCE if effect.getValue() is wrong[07:49:27] <cybereal> hm let's see[07:50:09] <cybereal> not sure any of the ideas popping to mind would be worth the effort[07:50:35] <cybereal> or that the return wouldn't be rather diminished vs. just dealing with a CCE[07:50:52] <cybereal> however, I would suggest you let the class do the casting[07:51:22] <tieTYT> that is a good idea[07:52:43] <tieTYT> and now, I get more advantage from the map idea[07:52:48] *** TooAngel has quit IRC[07:53:15] <cybereal> yes it's a incremental progression from abstract to specific code paths[07:53:19] *** TooAngel has joined ##java[07:53:21] <cybereal> er more incremental[07:53:39] *** bindaas has joined ##java[07:53:45] *** yclian has joined ##java[07:53:58] <tieTYT> is it possible to get the # of concrete classes that extend another class (or something similar)?[07:54:09] *** TooAngel has quit IRC[07:54:10] <cybereal> not conventionally[07:54:27] <tieTYT> that's too bad[07:54:42] *** TooAngel has joined ##java[07:54:45] <cybereal> you could do bytecode analysis if you knew your bytecode's location[07:54:48] <cybereal> it's slow[07:54:56] <cybereal> it's how the BND tool works for osgi bundling :)[07:55:13] <tieTYT> sounds like too much effort[07:55:52] <cybereal> yeah[07:55:55] <cybereal> most likely[07:56:15] *** vix85 has quit IRC[07:57:29] *** tomvolek has joined ##java[07:57:32] *** tomvolek_ has joined ##java[07:57:42] *** tomvolek_ has quit IRC[07:57:48] *** BerMeJo has quit IRC[07:57:49] <cybereal> time to do the taxes[07:57:55] <tomvolek> hi[07:58:21] *** TheCastor has joined ##java[08:01:21] *** ahughes has quit IRC[08:01:34] <cybereal> tieTYT: if you were using OSGi you'd have bundles register services for each of those effects, and any code that needed to know about themw ould get a notification when they were made available (also unavailable) automatically :-) So the service could have a getEffectTypeName() method and in the register() callback method in an interested bundle it could just set them in a map, pretty simple. btw, I'm becoming quite an osgi fan heh.[08:06:51] <tieTYT> i can tell[08:06:58] <tieTYT> my friend recently learned it too and likes it a lot[08:07:06] *** meanburrito920_ has quit IRC[08:08:05] *** ayrnieu has joined ##java[08:08:18] <cybereal> it's thick, and requires effort to move to, but I think all the various features it provides makes it worth especially if you have a situations where you have lots of components you might reuse between apps and want to keep them and their development really separate[08:09:49] <cybereal> oh and it's dead f*cking easy to dynamically load code at runtime, hell there is this one bundle that adds a mvn: uri support so you can actually deploy from maven repositories[08:10:01] <cybereal> which is simultaneously hilarious and scary heh[08:10:15] <cybereal> (if you've ever seen maven do the download dance you'd know what I meant)[08:10:54] *** trustin_ has joined ##java[08:11:06] <tieTYT> i don't know maven very well[08:11:31] <cybereal> I moved to maven along with moving to osgi because that's where all the other osgi projects were as well as tools, etc. so it seemed like a good plan[08:11:35] <cybereal> so I don't know it that well yet my self[08:13:09] <linxuz3r> to save me from trouble[08:13:19] <linxuz3r> can you assign primitive types on vectors?[08:13:38] <linxuz3r> also can you use operations on vector indexes when it is of primitive type?[08:15:00] <cybereal> linxuz3r: vectors, just like List which is what you should be using, only contain references, so you cannot use primitives, if you try you'll end up with errors or with autoboing[08:15:02] <cybereal> er autoboxing[08:15:26] *** convivial has joined ##java[08:15:34] *** G0-T0 has quit IRC[08:15:36] <linxuz3r> i havent learned list yet[08:15:39] <linxuz3r> what does it do[08:15:44] <linxuz3r> i know arrays[08:15:57] <linxuz3r> ill just try it out myself[08:16:03] <cybereal> it's the interface for the list types in the collections APi which replaces classes such as vector, hashtable, etc.[08:16:09] <cybereal> ~~ linxuz3r collections[08:16:09] <javabot> The Collections API is available at http://java.sun.com/javase/6/docs/technotes/guides/collections/index.html[08:17:10] <tieTYT> how do i make the stack traces longer?[08:17:52] <cybereal> hm, good question, I can't remember if there is a way to do it or if you just have to walk the stack trace elements yourself[08:19:28] *** TooAngel has quit IRC[08:20:05] *** trustin_ has quit IRC[08:20:08] *** scorchsaber has joined ##java[08:21:14] <linxuz3r> what is wrong with this Vector vint = new Vector(); vint.addElement(1); vint.addElement(2);[08:21:20] <linxuz3r> i get compile warnings[08:21:48] <linxuz3r> source uses unchecked or unsafe operations.[08:22:03] <linxuz3r> Recompile with -Xlint; unchecked for details[08:22:04] <cybereal> you haven't specified the types to the type parameters and it's a generic class that expects them[08:22:04] <linxuz3r> ?[08:22:10] <cybereal> ~~ linxuz3r generics[08:22:10] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics[08:22:12] <cybereal> read that[08:22:14] *** TooAngel has joined ##java[08:22:49] <cybereal> your declaration of the vector should probably look more like: Vector<Integer> vint = new Vector<Integer>(); or in reality, if you get with the times... List<Integer> integers = new ArrayList<Integer>();[08:24:16] *** shadewind has joined ##java[08:26:15] *** kungen has joined ##java[08:26:58] <linxuz3r> i think that is for the advanced courses[08:27:58] <linxuz3r> i still get the same error when I type in : Vector vint = new Vector(); Integer n = new Integer(1); vint.addElement(n);[08:28:19] <linxuz3r> i dont know if those are the write implementation because im really clueless[08:28:22] *** DCPom has joined ##java[08:29:00] <linxuz3r> it seems to me that Vectors in java "for beginners" accepts strings as an element[08:29:08] <linxuz3r> not primitive types[08:29:21] <linxuz3r> I wonder if I can parse it[08:29:25] *** xim_ has quit IRC[08:32:27] *** beol has joined ##java[08:32:36] <cybereal> linxuz3r: you didn't bother reading about generics so you never addressed your actual problem[08:33:09] <cybereal> if you aren't going to take the various paths necessary to understand what it is that you're doing, then go ask your professor for help... or if you're self-teaching out of some kind of book, get one printed in the last 2 years or you're just wasting your time.[08:34:35] *** durka42 has quit IRC[08:34:38] <vinse> i have a bunch of data in a web app that i'd like to keep in application scope: it'll be looked up frequently by lots of different processes, and i want to have one servlet that takes care of updating it when it needs to be updated (which is rare)[08:34:44] <vinse> how can i do this safely?[08:35:11] <vinse> by safely, i mean what are teh synchronization issues[08:35:31] *** staykov has quit IRC[08:35:59] <benJIman> linxuz3r:[08:38:04] <cybereal> vinse: have you considered using in-memory hypersonic db to deal with this issue for you?[08:39:20] <vinse> cybereal: i most certainly have not![08:40:02] <vinse> cybereal: googling now[08:40:37] <cybereal> it might suit you, might not, but something to consider since you can take advantage of the usual sql table/row locking functionality and automatically win querying abilities[08:40:41] * cybereal shrugs[08:41:10] <cybereal> otherwise your concerns will be exactly the same as any other shared data structure, you'll want to lock during all mutations and probably use a read/write lock to gain a little optimism[08:42:38] *** TooAngel has quit IRC[08:43:42] <vinse> cybereal: if i only need to lock during mutations that's no big deal -- are you saying that only the mutator methods would need to be synchronized?[08:43:58] *** woogley has quit IRC[08:44:22] <cybereal> vinse: no, you have to prevent reads during writes too, but you can use a readwrite lock that lets as many readers take out locks so long as there is no writer with a lock, which can help if you mostly read and only write once in a while[08:44:44] <cybereal> I wouldn't try to do it with synchronized blocks, I'd use the ...[08:44:47] <cybereal> ~javadoc ReadWriteLock[08:44:48] <javabot> cybereal: http://is.gd/j0ot [java.util.concurrent.locks.ReadWriteLock][08:45:07] <AMcBain> very nice[08:45:24] <vinse> sadly this app is on 1.4 :O[08:45:37] <cybereal> oh that's not a problem if you can find the pre-1.5 version of those libraries ;)[08:45:37] *** thepointer-work has quit IRC[08:45:48] <cybereal> all that concurrent stuff added in 1.5 existed as a third party lib before[08:46:21] <cybereal> but anyway you could do synchronized it would just always lock, even for reads, so it would serialize access across threads and that's undesirable generally[08:47:07] <cybereal> anyway, any more advanced strategies and I'm not going to be very good at explaining it, you might hit the JCIP if any of these options don't seem like a fit[08:47:17] <cybereal> though I'm not 100% sure how well that addresses 1.4 blargh[08:47:17] *** killuats has joined ##java[08:49:09] <vinse> nice, i'll look into trying to find the older version[08:49:11] <vinse> thx[08:49:18] *** wans has joined ##java[08:49:29] <linxuz3r> nah it seems that I cant parse String to Integer[08:49:43] <cybereal> linxuz3r: you can but you're not reading documentation that states such obvious things[08:49:53] <cybereal> ~~ linxuz3r javadoc Integer[08:49:53] <javabot> linxuz3r: http://is.gd/iswl [java.lang.Integer][08:49:57] <linxuz3r> Integer.parseInteger(value) says cannot find symbol[08:50:05] <cybereal> start there, read every method and its short description[08:50:21] *** tltstc has joined ##java[08:50:51] <wans> hey, I have a java window application that is based on an applet. How can i hook the events generated by the buttons from the applet to handle them in other way that the applet does it. There is a WindowListener, is this the correct way to do what im trying to?[08:51:26] <linxuz3r> cybereal: your link is not working[08:51:34] <cybereal> worked for me[08:51:40] <cybereal> it goes http://java.sun.com/javase/6/docs/api/java/lang/Integer.html[08:51:48] <linxuz3r> http://java.sun.com/javase/6/docs/api/java/lang/Integer.html[08:51:54] <cybereal> it works fine[08:51:55] <linxuz3r> not working[08:51:57] <cybereal> yes it is[08:51:59] <linxuz3r> I wish it does[08:52:04] <cybereal> it's obviously you that has the problem[08:52:13] <cybereal> get better internet access[08:52:13] <wans> its working to me[08:52:22] <vinse> ~~wans applet[08:52:22] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog[08:52:30] *** Resistance has quit IRC[08:52:39] <vinse> hrmph i suck at javabot[08:52:47] <wans> ~girls[08:52:47] <javabot> wans, girls is http://www.xkcd.com/322/[08:54:23] *** killuats has left ##java[08:55:46] *** Bollinger has joined ##java[09:00:19] *** Bavlito has joined ##java[09:05:06] <cybereal> Every year turbotax is better. That's one good webapp. Even over 6 years ago when I started using it, it worked in old-ass konqueror of the time.[09:05:18] * cybereal highly recommends it for the lazy techie tax hater[09:05:34] *** ckuttruff has joined ##java[09:06:23] <ckuttruff> hey all.... quick question. If I want to read in a file with each line being assigned as a String in an array, what's the best way to determine the size before doing that so I can declare the necessary array size[09:06:59] <ckuttruff> sorry I'm used to perl and dynamic languages where I've been super lazy about defining things like that since they automatically shift size[09:07:08] <vinse> cybereal: yeah, i could see turbotax being used in classes on usability[09:07:24] <vinse> ckuttruff: dont use arrays, they're a pain cuz you have to declare their size ;)[09:07:31] <vinse> ckuttruff: use an ArrayList[09:07:43] <ckuttruff> okay, thanks... checking it out now[09:07:46] <ckuttruff> appreciate it[09:08:04] *** Angel-SL has joined ##java[09:08:29] <cybereal> vinse: the really impressive thing is that year after year they keep improving things, even if it's just a little, one little more helpful hint based on user experience, so it really makes it interesting for me because hell.. I was happy with it 6 years ago I'd still be using it but I swear it takes 5 minutes less time to finish it up each year thanks to them improving clarity and automating things[09:08:32] *** ldam has quit IRC[09:09:03] <cybereal> vinse: and the broad browser support even back in the IE5 99% dark ages... that was just surprising[09:09:59] <vinse> cybereal: yeah i dont know anyone who uses konqueror now, let alone 6 years ago ;p[09:10:22] <cybereal> practically every new browser is based on its engine[09:10:34] <linxuz3r> what is wrong with Integer.parseInt(vint.elementAt(0)); ?[09:10:37] <cybereal> safari, chrome, safari mobile, nokia's mobile browser, etc. etc.[09:10:44] <cybereal> WebKit == khtml == konqueror[09:11:19] *** mistik1 has quit IRC[09:11:24] <linxuz3r> when I store a string to a vector it still is a vector object not a string huh[09:11:38] <cybereal> still konqy itself isn't too popular, you're right about that and 6 years ago I was a slim minority using it even though I liked it a lot still, always thought it had a nice rendering output[09:12:09] <linxuz3r> konqueror is so feature packed[09:12:16] <linxuz3r> cybereal can you look at my question[09:12:18] <cybereal> $2000+ tax return, woot![09:12:20] <vinse> linxuz3r: are you getting an error?[09:12:21] <linxuz3r> when I store a string to a vector it still is a vector object not a string huh[09:12:26] <linxuz3r> yeah[09:12:44] <W_work> ~~linxuz3r paraphrase[09:12:44] <javabot> Don't paraphrase code or errors. If you knew what was important to show us, you wouldn't need us to answer your question. You should pastebin the *actual* code and the *actual* error. Anything else is most likely going to be useless.[09:12:58] <linxuz3r> cannot find symbol: method parseInt[09:13:51] *** Spike1506 has joined ##java[09:14:20] *** Odin79 has quit IRC[09:14:30] *** repnop has joined ##java[09:15:09] <linxuz3r> shit[09:15:19] <linxuz3r> how do you go from Object to string?[09:15:23] *** mistik1 has joined ##java[09:15:23] <linxuz3r> im using vectors[09:16:04] <linxuz3r> i thought elementAt will return to string but instead it returns to object?[09:16:11] <dangertools> if your Object is a String, cast it. your book/course/professor should tell you[09:17:16] <vinse> linxuz3r: read a tutorial, you seem to lack the basic tools -- also, if you're getting "cannot find symbol" for Integer.parseInt, you have more fundamental issues to deal with[09:17:44] *** mitch0 has joined ##java[09:17:59] <dangertools> javac probably complains that there is no Integer.parseInt(Object) which is quite right[09:19:37] <vinse> dangertools: really? i thought that was a different error, but now that i think about it, it's been a while since i've looked directly at javac output[09:20:18] *** amnesiac has quit IRC[09:21:26] *** deSilva has joined ##java[09:22:25] <linxuz3r> nice[09:22:28] *** xxxxshame has joined ##java[09:22:33] <linxuz3r> i got it working[09:22:44] <linxuz3r> but i get warnings when I compile[09:22:48] *** Levia has joined ##java[09:23:08] <linxuz3r> VectorTest.java uses unchecked or unsafe operation[09:23:34] <linxuz3r> Recompile with -Xlint; unchecked for deteails[09:23:40] <linxuz3r> what is this warning for?[09:24:15] <ckuttruff> vinse: why does the compiler throw up a warning when you don't specify <String> when declaring an ArrayList object?[09:24:17] <linxuz3r> anyone[09:24:31] <ckuttruff> or whatever type[09:24:33] <tieTYT> you know what's super annoying in idea[09:24:35] <dangertools> ~~ linxuz3r generics[09:24:35] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics[09:24:38] <tieTYT> how the help button is right next to the close button[09:24:39] <vinse> ~tell ckuttruff about generics[09:24:39] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics[09:24:51] <xxxxshame> hallo, how use case tool we commend on linux ? It can be also commercial[09:24:57] <wans> ~Hi[09:24:57] <javabot> http://i38.tinypic.com/25aopzn.jpg[09:25:02] <dangertools> linxuz3r: read it or stop asking about that[09:25:52] *** dpy has joined ##java[09:26:00] <ckuttruff> thanks vinse[09:26:07] *** shervin_a has joined ##java[09:29:12] <xxxxshame> which case tool is most used ?[09:29:31] <xxxxshame> I find for linux visual paradigm[09:31:32] *** geaaru has joined ##java[09:32:10] <geaaru> hi, is there a way to recover CommonName of a certificate through X509Certificate[09:32:13] <geaaru> class[09:32:13] <geaaru> ?[09:32:19] *** jivedude has joined ##java[09:34:14] *** elmomalmo has joined ##java[09:34:18] *** bas-i has quit IRC[09:35:18] <geaaru> maybe i found... it could be done through X500Principal class[09:37:04] *** Odin79 has joined ##java[09:38:12] *** ldam has joined ##java[09:38:51] *** saiful has joined ##java[09:39:31] *** trustin_ has joined ##java[09:40:12] *** ckuttruff has quit IRC[09:45:40] *** Resistance has joined ##java[09:47:10] *** ldamwork has joined ##java[09:50:52] <wans> <wans> hey, I have a java window application that is based on an applet. How can i hook the events generated by the buttons from the applet to handle them in other way that the applet does it. There is a WindowListener, is this the correct way to do what im trying to?[09:51:10] *** ankylose has joined ##java[09:52:02] *** agnul has joined ##java[09:52:07] *** FauxFaux_ has joined ##java[09:52:30] <geaaru> what is name of the default class that implements X509TrustManager interface?[09:55:00] *** jivedude has quit IRC[09:56:48] *** shadewind has quit IRC[09:56:49] *** dimman has joined ##java[09:57:03] *** yclian has quit IRC[09:57:14] *** jivedude has joined ##java[10:00:02] *** yclian has joined ##java[10:01:10] *** yclian has quit IRC[10:01:47] *** yclian has joined ##java[10:02:37] *** trustin_ has quit IRC[10:02:40] *** Spike1506 has quit IRC[10:02:56] *** Levia has quit IRC[10:03:27] *** convivial has quit IRC[10:03:38] *** linxuz3r has quit IRC[10:03:42] <dimman> Hi, i use a List Arraylist and insert Map TreeMap objects into the arraylist.[10:03:42] <dimman> I then iterate through the List and retrieve the objects. But how can i tretrieve[10:03:42] <dimman> the objects back to a Map with keyset and values?:/[10:03:57] *** ldam has quit IRC[10:04:32] <W_work> ~~dimman javadoc Map[10:04:34] <javabot> dimman: http://is.gd/iHyZ [java.util.Map][10:07:25] *** _stack has joined ##java[10:08:33] <dimman> hmmmmmm[10:08:56] <dangertools> ~~ dimman casting[10:08:56] <javabot> type casting is a way of changing the type of a reference (it NEVER changes an object), or a sloppy way of converting between different primitive types. (Type) expression type-casts the result of expression to Type.[10:08:56] *** FauxFaux has quit IRC[10:09:10] *** KikiJiki has joined ##java[10:09:17] *** sphenxes has quit IRC[10:10:34] *** sphenxes has joined ##java[10:10:55] <dimman> dangertools i've tried that also[10:12:45] <dangertools> show us your code then[10:14:58] *** valcker has joined ##java[10:15:43] <dimman> ~pastebin[10:15:43] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[10:15:49] *** dquestions has joined ##java[10:15:53] *** saiful has left ##java[10:16:10] <dquestions> so i found this class i want to use, how to i import the package into my project? (i have no idea whwere I would download it, i only found the java docs online)[10:16:18] <dquestions> http://sec.cs.kent.ac.uk/permis/documents/permis/javadoc/issrg/dis/LDAPUtility.html[10:16:46] *** Levia has joined ##java[10:18:33] *** hanen has joined ##java[10:19:45] <dimman> dangertools http://pastebin.stonekeep.com/5637[10:20:30] <dimman> i try to convert it in the while loop. it doesnt throw an error or something like that but it doesnt work:/[10:20:57] *** schasi has joined ##java[10:21:19] <dangertools> Map rsRows = new TreeMap((java.util.Map)rsList.get(1)); <-- that thing in the list is already a Map, why are you creating a new one?[10:21:48] <dangertools> and any reason why you do not use generics?[10:21:52] <dimman> i dont know how to retrieve it, i tried with everything[10:22:37] *** ml` has joined ##java[10:22:52] <dangertools> just cast it, it is already a Map[10:23:17] <W_work> or just use generics in the first place[10:23:55] <dimman> example ((java.util.Map)rsList.get(1)).get("key") ?[10:25:12] *** JohnBat26 has quit IRC[10:26:42] <dquestions> so how do i import some random set of libraries?[10:26:42] <dquestions> hmmm[10:26:45] <dquestions> or class *[10:27:13] <dimman> dangertools that worked:) thanx[10:27:31] *** genesiss has joined ##java[10:27:38] <dimman> W_work i will take a look at generics:) thanx for the tip:)[10:27:46] <dangertools> ~~ dquestions classpath[10:27:46] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html and http://mindprod.com/jgloss/classpath.html[10:28:00] <dangertools> dquestions: import the classes, you do not import libraries or packages[10:28:53] *** Copter has joined ##java[10:30:01] *** Resistance has quit IRC[10:30:53] <dquestions> dangertools: hmm yeah but when i try to import that class it doesnt work[10:30:57] <dquestions> its not a standard java class[10:31:33] <cybereal> dangertools: you must be terribly bored to be fielding all these noobonanza questions[10:33:03] <dangertools> cybereal: indeed, my current task is rather boring. but i'm afraid that i have to do some work now, no matter if it is boring[10:33:06] <dangertools> dquestions: get a book[10:33:22] <cybereal> ~first cup[10:33:22] <javabot> A friendly web page to get you started with Java programming: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/[10:33:23] <cybereal> ~tij[10:33:23] <javabot> cybereal, tij is Thinking in Java by Bruce Eckel, see http://www.mindview.net/Books/TIJ/ for the 3rd edition (free download, published in 2002) or see http://www.mindview.net/Books/TIJ4 for the current edition which covers Java 5 features.[10:33:50] <dquestions> i understand the notion of importing a class[10:34:00] <cybereal> probably not[10:34:11] <cybereal> shockingly few java programmers actually do[10:34:13] <dquestions> thats not what im' asking[10:34:38] <dquestions> i'm asking, given this java doc... how do i find the class , which is not in the standard libray,[10:34:52] <dquestions> its not int he standard set of libraries[10:34:54] <dquestions> someone else made it[10:34:56] <dquestions> a third party[10:35:14] <cybereal> What do you mean by find it? Ask them![10:35:19] <cybereal> did you lose the files? heh[10:35:24] <dquestions> no[10:35:28] <dquestions> i found it online[10:35:35] *** xxxxshame has quit IRC[10:35:44] <cybereal> well there is no magical universal locator of third party classes or libraries[10:35:59] <cybereal> there are a few systems to *TRY* to do that but nothing's all encompassing or, really, even close[10:36:00] *** dimman has quit IRC[10:36:00] *** KermitTheFragger has joined ##java[10:36:10] <cybereal> so basically you need to look at their website and figure out where they put their shit[10:36:26] <dquestions> so basically nothing to do with my understanding of java itself[10:37:07] <cybereal> chances are they have some jar for you to download, maybe part of a larger archive, which you'll add to your app's classpath and then you'll be able to use those classes...[10:37:35] *** Copter has quit IRC[10:37:43] *** trustin_ has joined ##java[10:37:52] <cybereal> jpackage and maven try to make that process seamless but neither really do well, maven downloads stuff for you but you still need to know exact naming schemes, which are of course arbitrary... I've never used jpackage so no idea there.[10:39:28] *** Bavlito is now known as Beaver`univ[10:40:14] *** trustin_ has quit IRC[10:40:24] *** AWizzArd has joined ##java[10:41:07] *** trustin_ has joined ##java[10:41:15] <dquestions> so the java doc provides absolutely no l ink to the actual jar or w/e ??? damn that sucks then[10:41:44] <AWizzArd> On Win XP in my folder Documents and Settings\username\Application Data\Sun\Java\jdk1.6.0_11 I find several .cab files. What are those good for?[10:42:08] *** aioobe has joined ##java[10:42:32] *** trustin_ has quit IRC[10:42:34] *** magentar has joined ##java[10:42:45] <cybereal> dquestions: that's nowhere near the purpose of javadoc, honestly javadoc is supposed to be contained in the opposite fashion, as part of the proper distribution archive that has the code and sources, though naturally, few actually do it that way[10:42:59] <W_work> dquestions, no, the javadoc is just html files generated from the source. Someone even has to upload them to a web server, for you to see it.[10:44:09] <aioobe> hi! I have a memory leak in my program. I've profiled it with jconsole and jvisualvm. Jvisualvm tells me that my program allocates tons of int[] objects. How do I figure out the class of the owners of these objects?![10:44:12] <dquestions> well i understand that[10:44:15] <dquestions> i've made many java docs[10:44:36] <dquestions> well then this is a shame then[10:44:37] <dquestions> =-([10:44:50] <dquestions> now i'm trying to import the netscape package set, but i cant seem to find that either .. sigh[10:44:51] <cybereal> aioobe: never used those profs, but in jmp you can see that info...[10:44:59] <aioobe> ok![10:45:41] <cybereal> that's how I tracked down an annoying leak in java.util.concurrent's reentrant lock impl :) so I know it can be done with that tool[10:45:50] <aioobe> hehe :)[10:46:07] *** JohnBat26 has joined ##java[10:46:48] <cybereal> in case you ever use Condition instances from ReentrantLock in java 1.5, there's a good chance the leak is still there... basically every time you check that a condition has been met and it hasn't yet been met it adds to a huge graph of tiny objects, and that graph is never releaseable unless the condition is met[10:47:02] <cybereal> which in retrospect, made it an insanely pain in the ass leak to find[10:47:04] *** _stack has quit IRC[10:47:17] <cybereal> because naturally my instinct to find a mem leak was to load the system with activity, which in that case eliminated the leak[10:47:35] <aioobe> hehe suns fault?![10:47:38] <W_work> ouch[10:47:39] * cybereal remembers debugging such issues like a 'nam vet remembers agent orange[10:47:47] *** kapipi has joined ##java[10:47:57] <cybereal> aioobe: well it was an adopted third party impl, so it was whoever wrote it's fault but ultimately yes, a java bug[10:48:02] <cybereal> supposedly fixed up in 1.6[10:48:08] <cybereal> I still left the workaround in though...[10:48:15] <aioobe> mhm.. interesting[10:48:26] <cybereal> basically my code's written in such a way that even if the condition is tripped it still double checks, so now I just trip the condition at least once every day[10:48:42] <cybereal> it's only on very inactive instances of the server that it happened anyway[10:49:04] <aioobe> mhm[10:49:36] <cybereal> still I got to be rather smug to my co-worker who refused to believe my implication that it was a bug in the standard lib :)[10:49:53] <aioobe> :)[10:50:11] *** _stack has joined ##java[10:50:15] *** teralaser has joined ##java[10:50:40] *** trustin_ has joined ##java[10:50:52] *** trustin_ has joined ##java[10:50:55] *** romanb has joined ##java[10:52:11] <mitch0> cybereal: your co-worker must be new in this industry ;)[10:52:35] <cybereal> heh, no, just too much admiration for large commercial entities, surely you've met the type[10:52:43] *** trustin_ has quit IRC[10:52:43] <mitch0> yeah[10:52:47] <cybereal> you know... the guys who wear microsoft shirts and SUN ball caps[10:52:59] <mitch0> actually, no, I don't hang around those :)[10:53:01] <W_work> well, to assume the bug is in your code and not the library use by thousands of people is a good first instinct[10:53:07] <cybereal> eventually I found that there was a bug in the sun bug db, once I knew what class to search for[10:53:09] <mitch0> especially not the microsoft ones :)[10:53:49] <cybereal> W_work: normally I'd agree but at the point I made the assertion I had literally read over every line of code remotely related to the situation :-/ I spent a lot of time on that one.[10:54:03] *** vesz has joined ##java[10:54:29] <mitch0> debugging glibc and gdb was fun, too ;)[10:55:00] <mitch0> only to find later that my issue was fixed in the next upcoming release (in the libc case)[10:55:06] <mitch0> meh[10:55:38] *** n3llyb0y has joined ##java[10:56:24] <wlfshmn> cybereal: he, I used to be one of those guys until I actually started coding[10:56:45] <cybereal> why do they call half a power outage a brownout instead of a grayout?[10:58:54] * W_work peers at cybereal[10:59:00] <W_work> wikipedia to the resque[10:59:15] *** jivedude has quit IRC[10:59:32] *** Levia has quit IRC[11:00:03] <cybereal> causes lights to dim, I guess a dim incandescent light looks kinda brown[11:00:13] *** magentar has quit IRC[11:00:48] *** isr` has quit IRC[11:01:16] *** zophy has joined ##java[11:01:32] *** JohnBat26 has quit IRC[11:01:42] *** jivedude has joined ##java[11:01:55] *** Levia has joined ##java[11:02:08] *** zophy has quit IRC[11:02:37] <wlfshmn> cybereal: or it's simply the color of fried electronics ;)[11:02:44] *** zophy has joined ##java[11:02:45] <cybereal> heh[11:05:35] *** jivedude has quit IRC[11:05:35] <aioobe> cybereal: jmp seems to rely on the obsolete JVMPI interface... I get jmp: error in obtaining JVMPI interface pointer you know of any workaround?[11:05:46] <cybereal> there's a newer version that uses the new interface[11:05:58] <aioobe> mhm.. I'll go look[11:06:00] *** schasi has quit IRC[11:06:01] <cybereal> ~jmp[11:06:01] <javabot> cybereal, jmp is Java Memory Profiler at http://www.khelekore.org/jmp/ - written by ernimril[11:06:13] <aioobe> thx[11:06:15] <cybereal> the author hangs out here, so you could always ask him if he's around[11:06:38] <cybereal> here, not sure what state this is in http://www.khelekore.org/jmp/tijmp/[11:06:44] <cybereal> I was using regular jmp back then[11:07:42] <aioobe> ok[11:08:12] *** JohnBat26 has joined ##java[11:09:02] *** spuz has joined ##java[11:09:42] *** CrypticSquared has joined ##java[11:10:02] *** Resistance has joined ##java[11:10:13] *** tomvolek has quit IRC[11:11:33] *** buntfalke has joined ##java[11:12:03] *** MichielH has joined ##java[11:14:15] *** Solozerk has joined ##java[11:14:17] *** Solozerk has left ##java[11:15:07] *** Solozerk has joined ##java[11:16:59] *** vesz has quit IRC[11:17:10] *** Maaks has joined ##java[11:17:15] *** TooAngel has joined ##java[11:17:16] <Maaks> Bonjour[11:17:47] *** TooAngel has left ##java[11:18:29] *** cybereal has quit IRC[11:18:46] *** FauxFaux_ is now known as FauxFaux[11:19:50] <Maaks> j'ai le probleme suivant , j'ai fait un logiciel de création graphique et j'ai besoins d'imprimer le rendu , le probleme c'est que je veut une qualité d'impression correcte et que java semble borné a m'imprimer du 72 DPI quoi qu'il arrive , j'ai le code ici http://rafb.net/p/qoFhOO39.html , j'espere que ca parle a quelqu'un :)[11:20:05] *** ldam has joined ##java[11:20:43] <dangertools> Maaks: this is an english channel[11:20:50] <Maaks> oups sorry[11:21:04] <Maaks> i do it once again :)[11:22:23] *** ghostknife has quit IRC[11:23:56] *** cofeineSunshine has quit IRC[11:24:39] *** ldamwork has quit IRC[11:25:32] <Maaks> I have the following problem , i have made a software to create images and i need to print the work at the end , but i need a good printing quality. I only succed to get 72 DPI no matter what i did. here is the code : http://rafb.net/p/qoFhOO39.html , i hope someone knows about that :) thanks[11:25:44] <AWizzArd> On Win XP in my folder Documents and Settings\username\Application Data\Sun\Java\jdk1.6.0_11 I find several .cab files. What are those good for?[11:26:03] <zmyrgel> shouldn't a cast from interface to a class that implements it succeed without problems[11:26:31] <zmyrgel> I get error that cannot cast :([11:26:32] *** aatk has joined ##java[11:26:34] <W_work> zmyrgel, if the actual object is of that class, it should[11:26:43] <W_work> if not, you should get a class cast exception[11:27:07] <W_work> ~cast[11:27:08] <javabot> type casting is a way of changing the type of a reference (it NEVER changes an object), or a sloppy way of converting between different primitive types. (Type) expression type-casts the result of expression to Type.[11:27:20] *** aatk has quit IRC[11:27:27] *** Voyager1960 has joined ##java[11:27:48] <yclian> hi guys, I am not sure since when, but whenever I start my java app now, I get a Seg. fault:[11:27:57] <yclian> +++ killed by SIGSEGV +++[11:28:12] <yclian> The app just died silently without any dumps.[11:28:29] <mitch0> run some memory tests[11:30:16] <W_work> yclian, which JVM?[11:31:41] <yclian> W_work, hotspot 64-bit: java version "1.6.0_07"[11:31:54] <yclian> (to be exact): Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)[11:33:38] <yclian> Give it more heap space wont change the situation. In fact, my app is not memory hogging (esp. at startup time, doesnt make sense). It has always been running fine.[11:33:56] <yclian> It fails, last (every time) at: [02-10 10:33:39] DEBUG AnnotationTransactionAttributeSource [main]: Adding transactional method [createUser] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT][11:34:07] <W_work> even if there was a memory problem, the JVM shouldn't seg fault[11:34:26] <yclian> yeap, I would expect an OOM or other thing. Seg fault makes me frustrated now because I dont know where I should start.[11:34:34] <W_work> you running any JNI code? (I don't know how that affects things)[11:34:42] <yclian> W_work, zilch.[11:35:17] *** cofeineSunshine has joined ##java[11:35:20] *** jivedude has joined ##java[11:35:59] <W_work> I would guess a bug in the JVM then; try the latest version[11:36:45] <yclian> W_work, could it happen all out of a sudden? I mean, the server was running fine with that app for the past 2 weeks. But yea, I gotta see if I can install another version.[11:36:45] <zmyrgel> I can't seem to get further with my code as I can't think of good way to figure a way around it. Could somebody review my code a bit and give suggestions? http://www.wickedbsd.net/code/DBConnection.java[11:37:03] <W_work> yclian, some bugs can manifest randomly[11:37:11] <yclian> W_work, true :( let me see.[11:37:49] <zmyrgel> problem is in the searchmathing -methods return value[11:38:11] <W_work> zmyrgel, aw, you specified. I was going to just review it generally; "it sucks"[11:39:51] <zmyrgel> my first bigger java app so it most definately sucks[11:40:28] <mitch0> by running memtests I meant actual hardware memory tests, btw[11:40:42] <mitch0> (^^ about the segfaulting jvm)[11:40:47] *** magentar has joined ##java[11:42:36] *** prodigel has joined ##java[11:44:00] <W_work> zmyrgel, do you have a question though?[11:45:34] *** justafish has joined ##java[11:45:42] <prodigel> hi all. It's not quite a java question, but haven't got a better idea. we use an application(written in java of course) that has different fonts on one computer(larger), thus making some input fields unaccessible. The app has no options on setting fonts or something similar. Is there a way to make them smaller from outside the app?[11:47:04] <zmyrgel> W_work: how could I get the searchmathing to return value to accept both bean types so I wouldn't have to make separate methods to handle each bean[11:49:16] *** magentar has quit IRC[11:50:05] *** Nikke has joined ##java[11:50:17] <Nikke> ~pastebin[11:50:17] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[11:52:08] <Nikke> Hello, i am looking for some help with me do while loop here, i want the program to do some things then say "Again?" if i type "no" the program will quit, if "yes" the program will continue from start again...[11:52:24] <Nikke> but i can't get it to work[11:52:47] <AWizzArd> On Win XP in my folder Documents and Settings\username\Application Data\Sun\Java\jdk1.6.0_11 I find several .cab files. What are those good for?[11:53:38] <yclian> W_work, switched to update 12 (was 07 I guess). no more seg fault :)[11:54:11] *** sphenxes has quit IRC[11:54:56] *** nixblicker has joined ##java[11:57:58] * Stephmw kicks Bamboo so hard its scrotum sprouts from its head[11:59:04] *** xxxxshame has joined ##java[11:59:33] *** prodigel has quit IRC[12:01:43] *** Bevin has joined ##java[12:08:02] <jaggz-> How can I fix this thing -- I don't see how javac tells me what type is incompatible: symbol : method write(java.awt.image.BufferedImage,java.lang.String,byte[]) location: class javax.imageio.ImageIO ImageIO.write( bufferedImage, "png", imageBytes.toByteArray() ); (^ pointing to .write())[12:08:22] *** em_pleh has quit IRC[12:08:23] *** acuster has joined ##java[12:09:54] <jaggz-> imageBytes was initialized with: ImageIO.write( bufferedImage, "png", imageBytes.toByteArray() ); but I don't know how the write() can write to imageBytes() .. it seems like an rvalue type of thing to me, but I guess the java class/method toByteArray() can give .write() access to load the bufferedImage into the imageBytes through the byte array interface somehow (I'm not familiar with java enough to know how that works)[12:10:19] <jaggz-> can anyone shed some light on this for me?[12:11:18] <Maaks> I have the following problem , i have made a software to create images and i need to print the work at the end , but i need a good printing quality. I only succed to get 72 DPI no matter what i did. here is the code : http://rafb.net/p/qoFhOO39.html , i hope someone knows about that :) thanks[12:11:43] *** Junior has quit IRC[12:12:06] *** Nikke has left ##java[12:12:56] *** sombriks has joined ##java[12:13:18] <jaggz-> maaks, sorry.. looking at the code but I'm not familiar with it.. do you know how to solve my problem? it couldn't find the write() symbol I think[12:14:13] <jaggz-> I don't see where you tell the printer the actual resolution though[12:14:14] <Maaks> jaggz-, do you have a pastbin of your code ?[12:14:38] <Maaks> PrinterResolution pr = new PrinterResolution(300,300,PrinterResolution.DPI);[12:17:00] *** bas-i has joined ##java[12:18:04] <jaggz-> http://bdh.voyager.com/j.txt[12:19:10] <jaggz-> maybe catch it and see if there's an error when you set the printer settings[12:19:16] <jaggz-> you don't display an error there[12:19:42] *** Junior has joined ##java[12:19:49] <Maaks> yes , but no error , it works , only not in the good resolution[12:20:09] <Maaks> for your probleme , the syntax given by the javadoc is different :[12:20:38] <Maaks> the last parameter should be an output variable to store the result[12:21:31] <Maaks> http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/ImageIO.html#write(java.awt.image.RenderedImage,%20java.lang.String,%20java.io.OutputStream)[12:22:25] *** acuster has quit IRC[12:22:47] *** ankylose has quit IRC[12:27:59] *** Razec has joined ##java[12:28:05] <Razec> hello everyone[12:28:50] <Razec> I have been with a problem with JFileCHooser: Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0[12:29:14] <Razec> I looking for solution in the great guru Google..and I not found..[12:29:25] <Razec> Some suggestion?[12:29:40] <xxxxshame> again my q: hallo, how use case tool we commend on linux ? It can be also commercial. which case tool is most used ?[12:29:40] <xxxxshame> I find for linux visual paradigm[12:30:35] <ilyak> Why would you need it?[12:34:59] *** Resistance has quit IRC[12:39:08] *** picca has joined ##java[12:40:57] *** picca has left ##java[12:42:01] <Solozerk> "linux visual paradigm", holy shit[12:42:03] *** odinsbane has joined ##java[12:42:05] <Solozerk> I need to leave, now.[12:42:06] *** Solozerk has left ##java[12:42:14] *** AWizzArd has left ##java[12:42:24] *** Vantaa has joined ##java[12:45:23] *** xxxxshame has quit IRC[12:46:02] <jaggz-> hmm.. the output stream is supposed to come from: ByteArrayOutputStream imageBytes = new ByteArrayOutputStream(100000);[12:46:10] *** Resistance has joined ##java[12:46:34] *** rdancer has joined ##java[12:47:26] *** OsAC has joined ##java[12:47:31] <jaggz-> oh, it just used the plain imageBytes[12:47:32] <odinsbane> I'm trying to install java and I'm getting checkdir error: cannot create ...[12:47:42] *** topriddy has joined ##java[12:48:08] <odinsbane> I have write permission and this disk isn't full, plus java has created a bunch of other dirs.[12:49:04] <jaggz-> odin ...?[12:49:05] <cheeser> pastebin the process[12:49:14] <jaggz-> hi cheeser[12:49:26] *** topriddy is now known as angryguy[12:49:31] <cheeser> hey jaggz-[12:50:06][12:50:22] * Logi can't be bothered going for the old spelling...[12:50:31] *** xxxxshame has joined ##java[12:50:36] <cheeser> i doubt it would render any better than what you *did* use[12:50:37] <cheeser> 8^)=[12:51:04] <Logi> it's.. shorter and with fewer funny letters, so it just might[12:52:07] * Logi goes back to reading about joda hoping there is a LocalTimePeriod class of some sort, to denote "from 21:00 to 05:00" in local TZ without date information[12:54:48] *** DragonLord- has joined ##java[12:55:07] <odinsbane> ~pastebin[12:55:07] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[12:56:51] *** Kvasir has joined ##java[12:56:54] <Kvasir> hello[12:57:20] <Kvasir> what do I need to write java programs on linux?[12:57:25] <dangertools> the jdk[12:57:42] <dangertools> ~download[12:57:42] <javabot> Find current releases for Java at http://java.sun.com/javase/downloads/index.jsp and a comprehensive archive of current and older releases of various Java related products at http://java.sun.com/products/archive/[12:57:56] <Kvasir> how can I check if it's already installed?[12:58:02] <Logi> Kvasir: what distribution?[12:58:08] <Kvasir> ubuntu[12:58:14] <cheeser> to start, you should learn your distro.[12:58:32] <Kvasir> like checking in my packet manager?[12:58:36] <Logi> Kvasir: see if you have the sun-java6-jdk package installed and then remove any package with gcc or gij in the name[12:59:18] <Logi> Kvasir: also, this question googles *really* well. See https://jdk-distros.dev.java.net/ubuntu.html and https://help.ubuntu.com/community/Java[12:59:29] <Logi> Kvasir: now we'll expect a better question from you when you come back :-P[12:59:35] <Kvasir> thanks[12:59:58] <Logi> Kvasir: uhh... btw, that was a typo. Remove *gcj* and not gcc[13:00:13] <Kvasir> I was hoping in something like "It's already installed just do javac whatever" :P[13:00:20] *** Resistance has quit IRC[13:00:29] *** Resistance has joined ##java[13:01:05] <dangertools> what happens if you do so?[13:01:09] <OsAC> Kvasir: java -version[13:01:16] <odinsbane> http://pastebin.stonekeep.com/5638 it looks like the missing files are actually supposed to be missing. Except for the last one that ends the installation.[13:01:28] *** angryguy has quit IRC[13:02:47] <Kvasir> OsAC, it's not installed, I'm installing it[13:03:22] <OsAC> cool :-)[13:03:43] <OsAC> apt-get install sun-java6-jdk[13:05:52] * Logi thought he was already spoon-feeding a bit[13:06:41] <Kvasir> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)[13:07:15] <Kvasir> from adept I got an error, with apt-get worked[13:08:01] <OsAC> Kvasir: what did u install jdk or jre?[13:08:23] *** Varox has joined ##java[13:08:24] <Kvasir> jdk[13:08:35] <cheeser> ~~ OsAC aolbonics[13:08:35] <javabot> OsAC, 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![13:09:39] <OsAC> get your self neural network implemented javabot , than we could maybe talk :-D[13:10:05] <odinsbane> I suppose I could try the solaris version.[13:12:59] *** OsAC has quit IRC[13:15:24] * Logi is trying to figure out how javabot getting a neural network implant would make OsAC able to talk any better[13:19:26] <odinsbane> damn I try it on my home computer and it works without a flaw, without errors[13:19:35] *** xxxxshame has quit IRC[13:20:24] *** shadewind has joined ##java[13:21:15] *** Resistance has quit IRC[13:22:00] <jaggz-> hm, I'm trying to get the Graphics object from a View. But this View view3d; has a view3d.memimage member which I can't seem to find docs on[13:22:12] <jaggz-> (and it doesn't recognize view3d.getGraphics() which I thought it would)[13:23:13] *** odinsbane has quit IRC[13:24:18] <Kvasir> I installed the jdk but javac is still missing, do I need to install that too or is there some other command to use?[13:24:35] <wlfshmn> Kvasir: it's not missing it's just not on your path[13:24:48] <Kvasir> ok, let me find it then[13:25:32] <Kvasir> is it named javac?[13:25:38] *** kulhas has joined ##java[13:25:41] <kulhas> hello[13:25:52] <wlfshmn> Kvasir: Yes[13:26:04] <Kvasir> i can't find it with "locate javac"[13:26:41] <cheeser> because taht db will not have been updated yet.[13:26:58] <Kvasir> i update it[13:26:59] <cheeser> like i said, learn your distro and finding the install dir will be trivial[13:27:08] <Kvasir> updated*[13:27:32] <mitch0> what distro?[13:27:38] <mitch0> how did you install the jdk?[13:28:23] <kulhas> I want to recive a date argument , and get the day , year and month from it. I saw the Date API , but almost all methods are deprecated , so what can or should i use ?[13:29:03] <Kvasir> there /usr/lib/jvm/* but i can't see javac[13:29:22] <karstensrage> /usr/lib/jvm/bin[13:29:22] <Kvasir> mitch0, apt-get install sun-java6-sdk[13:30:37] <wlfshmn> kulhas: Calendar, or joda-time if you don't mind additional dependencies[13:30:39] <Kvasir> I have /usr/lib/jvm/java-6-sun/bin but javac is not there[13:30:48] <karstensrage> mine is in /usr/java/jdk-1.5.x-blah/bin[13:31:09] <csaba> how can I call a native SQL CallableStatement from hibernate?[13:31:11] <mitch0> list the package contents with dpkg and grep for javac[13:31:16] <Kvasir> but locate should be able to find it, shouldn't it?[13:31:30] <karstensrage> <cheeser> because taht db will not have been updated yet.[13:31:41] <Kvasir> I did updatedb already[13:31:45] <cheeser> kulhas: notice how the docs say along with the deprecation what to use?[13:31:58] *** Absolute0 has joined ##java[13:31:58] <cheeser> Kvasir: find / -name javac[13:32:39] <mitch0> kvasir: dpkg -l , find the sdk package, then dpkg -L on that[13:33:28] <kulhas> humm, ok tx i got it[13:33:29] <kulhas> now[13:33:57] <Kvasir> dpkg -L sun-java6-bin | grep javac <- nothing[13:34:14] <Kvasir> i have java, orbd, rmid and others[13:35:50] <Kvasir> and I don't have any dir named jdk-x.y.z-blah[13:36:49] <cheeser> that's not the jdk.[13:36:54] *** finalbeta has joined ##java[13:37:00] <cheeser> you were told to use sun-java6-sdk[13:37:19] *** dnmo has joined ##java[13:37:49] <Kvasir> ok, I'm installing some other package now[13:38:44] <Kvasir> ok, now i have it[13:39:06] <cheeser> funny how that works.[13:39:22] <finalbeta> Hello, I need a guide in the jungle :). I need to send a html mail. I read I can do it with javax.mail. as far as I could see (but I could be wrong), this is not included in the JDK, but it would be in the EE. Am I correct so far? If I do compile something with te EE, will users who installed the standard JRE be able to run the program?[13:39:36] *** vesz has joined ##java[13:39:52] <cheeser> you would need to redist that jar as well[13:40:18] *** deepjoy has joined ##java[13:40:44] <finalbeta> ah I see, but that's not really a problem, just include the library with the project? There are no license issues to do this.[13:41:29] <cheeser> ianal[13:42:49] <finalbeta> Now I had to go google that too. But thanks. :)[13:44:26] <finalbeta> They provide a royalty free reference implementation and binary version that can can include and redistribute.[13:44:35] *** durka42 has joined ##java[13:44:45] <finalbeta> can be*[13:45:01] *** CrypticSquared has quit IRC[13:45:14] *** jivedude has quit IRC[13:45:44] *** TooAngel has joined ##java[13:46:15] *** TooAngel has left ##java[13:46:37] *** gregor_k has joined ##java[13:51:52] *** kapipi has quit IRC[13:52:02] *** misfitx7 has joined ##java[13:52:15] *** TooAngel has joined ##java[13:54:22] *** misfitx7 has quit IRC[13:54:27] *** orgy` has joined ##java[13:55:25] *** morkar- has joined ##java[13:55:35] *** TooAngel has left ##java[13:55:35] *** selckin has quit IRC[13:55:57] *** navetz has quit IRC[13:56:00] <ilyak> java.lang.ClassCastException: org.apache.xerces.dom.DocumentImpl cannot be cast to org.apache.xerces.dom.DeferredDoc[13:56:04] <ilyak> umentImpl[13:56:27] <deebo> via jaxp?[13:56:29] <ilyak> It turns that you can, but you can't really adoptNodes from documents parsed by xerces' DOMParser[13:56:33] <ilyak> that's crap[13:57:17] <deebo> im just going from Document + xalan xpath to tinytree + saxon[13:57:28] <deebo> getting a headache from jaxp stuff[13:57:39] *** selckin has joined ##java[13:58:02] *** deepjoy has left ##java[13:59:20] <jottinger> morning[14:00:44] <mr_ank> morning![14:00:53] <ilyak> They're trying to do smart things[14:00:54] *** jivedude has joined ##java[14:01:03] <ilyak> but they are stupid enough for this to fail[14:02:55] *** aioobe has quit IRC[14:03:30] *** deepjoy has joined ##java[14:06:57] *** magentar has joined ##java[14:10:18] *** tissue has quit IRC[14:11:03] *** Copter has joined ##java[14:11:42] <deebo> anyone know if there some trick to passing around Saxon Configuration objects?[14:12:11] <deebo> each method run on a document has to be run in the same configuration context, but i cant find a way to make it happen easily[14:12:17] <deebo> withotu just passing a reference all the time[14:12:23] *** L-----D has joined ##java[14:12:35] *** NielsD has quit IRC[14:12:55] *** IRAQI` has joined ##java[14:13:04] *** NielsD has joined ##java[14:13:16] *** L-----D has quit IRC[14:14:55] *** ankylose has joined ##java[14:14:59] *** buntfalke has quit IRC[14:15:13] <ilyak> I had to use identity transformet[14:15:22] *** Resistance has joined ##java[14:15:23] <ilyak> s/t$/r$[14:15:59] *** durka42 has quit IRC[14:16:21] <deebo> via jaxp TransformerFactory has the Configuration for saxon, but it still has to be set specifically for like XPathFactory etc[14:19:43] *** Resistance has quit IRC[14:21:25] *** eidolon has left ##java[14:23:39] *** karstensrage has quit IRC[14:24:44] *** Resistance has joined ##java[14:26:09] *** xxxxshame has joined ##java[14:29:22] <ldam> hm. htmlunit comes with 1 jar, httpunit comes with 14 jars... which to choose...[14:29:43] <jottinger> heh[14:29:46] *** magentar has quit IRC[14:30:37] *** eidolon has joined ##java[14:30:38] *** waz has joined ##java[14:30:47] *** acuster has joined ##java[14:31:15] *** acuster has quit IRC[14:32:04] <xxxxshame> I must go away so Which case tool Do we demand on linux ?[14:32:47] <xxxxshame> sorry not demand but commend[14:33:01] *** eduardoboss has joined ##java[14:34:54] *** FireSlash has joined ##java[14:35:02] <dangertools> xxxxshame: 1. that's not a java but a UML question. 2. did you already look at any?[14:35:25] *** deepjoy has quit IRC[14:35:33] *** Varox has quit IRC[14:35:47] <xxxxshame> dangertools: yes I look but I find only visual paradigm[14:35:59] *** monkeycid has joined ##java[14:36:41] *** Niike has quit IRC[14:36:43] <dangertools> xxxxshame: there's a whole bunch of other UML tools available. google knows all of them[14:37:17] *** eduardoboss has quit IRC[14:37:29] *** magentar has joined ##java[14:37:46] *** skoskav has quit IRC[14:38:08] *** deepjoy has joined ##java[14:41:19] *** mele- has joined ##java[14:42:10] *** sombriks has quit IRC[14:42:45] *** sombriks has joined ##java[14:43:11] *** sombriks has quit IRC[14:43:54] *** skoskav has joined ##java[14:48:03] *** krad has joined ##java[14:48:14] <krad> i'm getting /libexec/ld-elf.so.1: /usr/home/migz/.eclipse/org.eclipse.platform_3.3.0_185596441/configuration/org.eclipse.osgi/bundles/80/1/.cp/libswt-mozilla-gtk-3349.so: Undefined symbol "NS_StringContainerInit2 while running Eclipse on FreeBSD, any idea?[14:48:16] *** b0fh_ua has joined ##java[14:49:10] <b0fh_ua> hello there! Can somebody please advice, which opensource tool makes it possible to build a project on each commit into SVN (we are using Maven as a build system) and if eny of tests do fail - then the commit wouldn't be accepted?[14:49:42] <b0fh_ua> additionally, what is the best way to organize regular builds of a component on each commit to SVN, if that possible at all?[14:49:48] *** giaco has joined ##java[14:49:54] <b0fh_ua> so we can detect if something breakes a build at early stages[14:50:09] <waz> google continuous integration[14:50:23] <waz> Hudson, Cruise Control. yada yada[14:50:27] <eidolon> mm, hudson.[14:50:37] <b0fh_ua> I will appreciate any opinions ;)[14:50:43] <eidolon> b0fh_ua: how many more do you want?[14:51:07] <b0fh_ua> eidolon: I just need to make sure the version of the project in SVN passes all unit tests[14:51:33] *** UK-sHaDoW has joined ##java[14:51:33] <b0fh_ua> may be later I will want to check the coverage of the modules by unit tests[14:51:55] <eidolon> ...[14:52:00] *** UK-sHaDoW has quit IRC[14:52:06] <eidolon> so, lets see. lets try this more directly[14:52:18] <eidolon> b0fh_ua: HUDSON IS A CONTINUOUS INTEGRATION TOOL[14:52:21] <eidolon> GOOGLE IT YOU FOOL.[14:52:51] <eidolon> subtle enough?[14:53:05] <waz> nicely done[14:53:18] * eidolon bows.[14:54:37] *** magentar has quit IRC[14:55:05] <waz> b0fh_ua: there is no need to go beyond: 'what continuous integration tool do you recommend?'[14:55:14] <waz> we're all aware of what they do[14:55:14] *** Voyager1960 has quit IRC[14:55:34] <cheeser> ~hudson++[14:55:34] <javabot> hudson has a karma level of 5, cheeser[14:55:41] *** Marfi has joined ##java[14:56:02] <Marfi> random question. " DrawGame is not abstract and does not override abstract method mouseDragged" what do i do? =)[14:56:23] <Marfi> here is the code: public class DrawGame extends Applet implements MouseListener, MouseMotionListener[14:56:23] <cheeser> ~~ Marfi abstract[14:56:23] <javabot> Marfi, abstract is http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html[14:56:36] *** ghostknife has joined ##java[14:56:49] <Marfi> ty ty cheeser[14:57:02] <waz> hudson really doesn't have any competition these days does it?[14:57:08] <waz> in the oss realm at least[14:57:24] <spuz> waz: what about contiuum?[14:57:31] <cheeser> there's anthill and continuum[14:57:31] *** FireSlash has quit IRC[14:57:36] <ghostknife> I am connected to a networked socket. on the other end a C program is sending raw data, ex. int i = 5; send(&i, sizeof(int));[14:57:51] <ghostknife> Now I receive this data, how would I transform it into java variables?[14:58:31] *** Sulis has quit IRC[14:58:36] <cheeser> read the data. assign it.[14:58:38] <cheeser> ~next[14:58:38] <javabot> Another satisfied customer. Next![14:58:39] *** ramdam has joined ##java[14:58:52] <Marfi> lol[14:59:01] <ghostknife> cheeser: read it how? into what?[14:59:07] <ghostknife> cheeser: DataInputStream's readInt() ?[14:59:07] <cheeser> ~io[14:59:08] <javabot> cheeser, io is http://java.sun.com/tutorial/essential/io[14:59:10] <Marfi> after adding the abstract, the applet won't initialize. any idea, cheeser ?[14:59:18] <cheeser> Marfi: read the link[14:59:26] <cheeser> you don't want your class to be abstract[14:59:37] *** blahjake has joined ##java[15:00:28] <Marfi> so it compiles when its abstract, wants to be abstract, but won't run when its abstract. God, do I love Java! =)[15:00:47] <cheeser> i love reading![15:00:48] <cheeser> rtfm[15:00:49] *** KikiJiki has quit IRC[15:01:00] <cheeser> implement the missing methods and stop blaming java because you can't read.[15:01:43] <Levia> ~cheeser++[15:01:43] <javabot> cheeser has a karma level of 608, Levia[15:02:11] *** kenleycapps has joined ##java[15:03:30] *** eduardoboss has joined ##java[15:03:52] *** mele- has quit IRC[15:04:33] <ghostknife> cheeser: I'm still confused as to how to take 4 raw bytes of data (which is actually an integer) and assign it to a java variable..[15:04:50] *** sjhd has joined ##java[15:05:00] <frivol> Being an applet, it might not "run" or "initialize" for other reasons.[15:05:02] <sjhd> can I get maven to use ftp instead of http?[15:05:16] *** Kvasir has quit IRC[15:05:32] *** KikiJiki has joined ##java[15:07:33] <ghostknife> cheeser: it seems it's not as simple as: 16:01 <@cheeser> read the data. assign it.[15:07:56] <ghostknife> all I can think of is to read the data as individual bytes, and calculate the int based on that[15:09:07] <kenleycapps> ghostknife, http://snippets.dzone.com/posts/show/94[15:09:22] <ghostknife> kenleycapps: been there ;>[15:09:28] <ghostknife> that's the byteArrayToInt() one[15:09:37] <ghostknife> there's a intToByteArray() one as well (same site)[15:09:45] <kenleycapps> then what's the issue? that's how to convert from a byte array to an int. o.i[15:09:49] <kenleycapps> o.o*[15:10:18] <ghostknife> kenleycapps: sure, that's a way to do it (btw, there much easier two methods using high school comp. sci.)[15:10:32] <ghostknife> kenleycapps: but I want to know if java allows me to read directly to an int using some inputstream or something[15:10:34] *** Marfi has quit IRC[15:11:26] <Stephmw> Have you looked at the implementors of Input/OutputStream?[15:11:36] <kenleycapps> well if you're possibly using a stream, then take a look at ByteArrayInputStream and DataInputSteam[15:11:39] <Stephmw> ~~ ghostknife DataInputStream[15:11:39] <javabot> ghostknife, I have no idea what DataInputStream is.[15:11:43] <Stephmw> hmmm[15:12:37] <Stephmw> http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataInputStream.html[15:12:41] * Stephmw pokes javabot[15:12:50] <kenleycapps> thats odd[15:13:22] <kenleycapps> anyways, DataInputStream has a readInt() method[15:13:25] <ghostknife> Stephmw: DataInputStream doesn't work[15:13:32] <ghostknife> Stephmw: tried that first time[15:13:33] *** zophy has quit IRC[15:13:42] *** rollins has joined ##java[15:13:57] <ghostknife> hold a bit[15:14:00] <blahjake> ghostknife: how so? it has readInt[15:14:19] <ghostknife> blahjake: dunno, the number read is not the number writ.[15:14:52] <blahjake> endianess?[15:14:58] * Stephmw also thinks endianness[15:15:01] <jottinger> engine-ness![15:15:29] <krad> anyone uses Eclipse on FreeBSD here?[15:15:38] *** jdolan_ has joined ##java[15:15:55] <Stephmw> krad: plenty of masochists in here, but that's a new breed to me[15:16:31] <kenleycapps> heh[15:17:44] <ghostknife> blahjake, Stephmw: that was my though as well, though I took readInt()'s method, and swapped the bytes around, and it still didn't work.[15:17:52] <ghostknife> and I can paste the C and Java code.[15:17:55] <ghostknife> This is getting very weird[15:18:28] <ghostknife> wait[15:18:44] *** kapipi has joined ##java[15:18:56] <ghostknife> nope, nothing[15:20:14] <ghostknife> heh, now it works[15:20:43] *** firen has quit IRC[15:20:56] <ghostknife> apparently a pure FileInputStream.read() and a DataInputStream.readByte() returns 2 different things, even when both assigned to an int[15:20:58] *** convivial has joined ##java[15:21:05] <waz> spuz: there are a lot of choices, almost everyone seems to be choosing Hudson[15:21:06] <waz> we did[15:21:10] <ghostknife> so I made my own[15:21:41] <ghostknife> And yes, it is endian-ness (afaik bigendian is java and gcc on linux is little?)[15:21:54] <waz> Stephmw: using java not gcj?[15:21:57] <waz> oops[15:22:06] <waz> krad: I mean[15:22:20] <krad> yes?[15:23:24] <dangertools> ghostknife: you should send and receive your data in network byte order on the c side[15:23:38] *** IRAQI` has quit IRC[15:23:52] <blahjake> network byte order is little endian IIRC, true?[15:24:05] *** bas-i has quit IRC[15:24:06] <mitch0> don't think so[15:24:19] <dangertools> big endian[15:24:40] <blahjake> ah yeah, big endian[15:25:03] *** deSilva has quit IRC[15:25:44] *** bas-i has joined ##java[15:27:31] *** Levia has quit IRC[15:29:41] <cheeser> yeah. big endian. the intertubes confirm.[15:29:57] *** ppr has joined ##java[15:33:09] *** Frostix has joined ##java[15:33:20] *** kenleycapps has quit IRC[15:34:07] *** ghostknife has quit IRC[15:34:12] *** ghostknife has joined ##java[15:34:36] *** deSilva has joined ##java[15:34:50] <ghostknife> Hah! I got it! read the data into a byte[4]. then do ByteBuffer b = new ByteBuffer.wrap(byte); b.order(ByteOrder.LITTLE_ENDIAN); b.getInt();[15:34:59] <ghostknife> Remember this one ;>[15:35:08] <ghostknife> I should have done my testing on the network layer[15:35:22] *** Angel-SL has quit IRC[15:35:28] <ghostknife> I discovered this by accident just now while implementing a custom DataInputStream extension[15:35:36] <ghostknife> Would have never wasted this time[15:35:49] <cheeser> nice. great tip, though.[15:35:49] *** peper has quit IRC[15:36:09] *** Sulis has joined ##java[15:37:18] *** B|ackPanther has quit IRC[15:37:18] *** kungen has quit IRC[15:37:42] *** alex-c has joined ##java[15:38:00] *** skoskav has quit IRC[15:40:16] *** beol has quit IRC[15:42:13] <dangertools> ghostknife: what if your c code runs on a big endian system at some point? that's the reason why there are helper functions to transfer host to network byte order in c[15:42:28] <dangertools> or rather, to be correct, in the BSD socket api[15:44:00] <ghostknife> dangertools: explain?[15:44:24] <ghostknife> dangertools: nm, after reading that last part of your first line 10 times I think I get it[15:46:35] <ghostknife> dangertools: that is probably a good idea. though this is for a pretty "fixed system", and if the byte order ever had to change, much more changes would also be put in place, which would likely include changing the constant. But I'll take note and put the endianness in a configuration file. or maybe even do a check in the handshake using some constant 0x01, 0xff, 0xbb, 0x23 or whatever.[15:48:30] <dangertools> ghostknife: well, it is really damn easy to fix this on the c side and have it fixed for now and forever - without having to place any ignorable comments or configuration values[15:49:05] <dangertools> java does not change its endianness in the next future, c does on every architecture[15:49:10] <ghostknife> dangertools: I agree. can you explain more?[15:49:23] <ghostknife> dangertools: like which functions would do this?[15:49:33] <ghostknife> dangertools: you mentioned BSD socket api? I don't think we're using that?[15:49:43] <dangertools> that's the normal socket api[15:50:13] <dangertools> man ntohl[15:50:46] <ghostknife> dangertools: oh. I've used those before when writing some IP stuff :>[15:50:55] <ghostknife> dangertools: never really appreciated it's value[15:51:02] <ghostknife> dangertools: so network byte order is Big Endian?[15:51:37] <ghostknife> dangertools: iirc I ran ntohl to convert the IP/mac addresses or something before putting it into the header[15:52:11] <dangertools> hopefully you used htonl, not ntohl when writing[15:52:17] <ghostknife> dangertools: nm last question: "...first, whereas the network byte order, as used on the Internet, is Most Significant Byte first"[15:52:33] <ghostknife> dangertools: can't recall, i just recognized the manpage when I opened it[15:52:57] <dangertools> network byteorder is big endian for IP, may be different for other protocols[15:53:34] *** rio_123 has joined ##java[15:53:36] *** rio_123 has left ##java[15:53:45] <ghostknife> that's fine. have never used anything other than IP anyway[15:53:54] <cheeser> but realisatically, when are you going to use something other than IP?[15:54:06] <ghostknife> anything else is specialized[15:54:22] *** teralaser has quit IRC[15:54:43] *** rio_123 has joined ##java[15:55:37] <ghostknife> well, I'm off to give some attention to my only Microsoft possession, Xbox[15:55:56] *** ridoo has joined ##java[15:57:57] *** atlants has joined ##java[15:58:43] *** skoskav has joined ##java[15:58:59] <atlants> does anyone have any experience with Java SNMP APIs? I am just trying to find one to use - the only one i have looked deeply into is snmp4j, and it seems to be really low level (create your own PDUs, etc.). Any suggestions?[15:59:52] *** magentar has joined ##java[16:00:12] <atlants> I am just trying to send a trap to a device, and get its response - i do not need any server side functionality..[16:00:27] <rio_123> has anyone here worked with EBCDIC encoding before?[16:00:46] <W_work> ~~rio_123 anyone[16:00:47] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[16:00:48] *** ridoo has quit IRC[16:01:22] *** ridoo has joined ##java[16:02:54] <rio_123> I need to a way to convert an EBCDIC byte array to a String. new String(byte[], offset, len, "cps330") does'nt seem to work.[16:02:55] *** kungen has joined ##java[16:04:32] *** b0fh_ua has quit IRC[16:04:58] <W_work> what does Charset.isSupported("cps330") return? Or Charset.isSupported("EBCDIC") for that matter[16:08:13] *** hrehf has joined ##java[16:08:51] <W_work> actually, it appears it does support several EBCDIC character sets by default, just not by those names[16:09:29] <rio_123> there is no problem with cps330. charset.issupported() returns true. The new String() statement sort of works but there is always space between the characters.[16:09:50] <W_work> then it's not the correct character set[16:10:14] <rio_123> yep.. i'll try to find the correct character set i guess.[16:10:29] <rio_123> thanks W_work[16:11:02] *** surial has joined ##java[16:11:23] <surial> Hmm, I'm doing some home improvement and I've got a question about currents. Might there be an IRC channel for such a thing?[16:11:28] <surial> Time to page through the /list...[16:11:59] *** blankthemuffin has quit IRC[16:12:20] <W_work> what? no, inquire here, this is the IRC directory after all![16:12:41] <W_work> (#physics perhaps?)[16:12:48] *** Varox has joined ##java[16:12:50] *** sircco has joined ##java[16:12:51] *** alex-c has quit IRC[16:13:08] <waz> what's the question? Most of it isn't too hard.[16:13:32] <sircco> if i have url to wsdl methods like http://ip.addr./API?wsdl , how can i find out xml for those methods?[16:13:49] *** bindaas has quit IRC[16:14:29] <surial> The law here in the netherlands just changed; transport costs are now measured on capacity and no longer on usage. Our house has 3x35A capacity, but downgrading to 3x25A gives us a 450,- a year savings. So I'm waltzing through the house measuring currents with a clamp device (clamp it around the + or - of a cable). When I turn on the water heater, I read 12.5A at the source of the heater, but where the power cables enter our house, between the br[16:14:31] <surial> I measure only 10A.[16:14:39] <surial> I don't understand why those are different. How could that be?[16:14:44] *** magentar has quit IRC[16:14:50] <surial> (a 10A jump up and down as a friend of mine toggles the heater on and off).[16:14:59] <waz> wow, crazy way to bill[16:15:01] <waz> hrmm[16:15:13] <W_work> surial, because clamp devices aren't 100% accurate?[16:15:17] <waz> I had 3x150a at one house :)[16:15:30] <mr_ank> 150A![16:15:31] <W_work> oh wait, I think I missunderstood what kind of device you mean[16:15:40] <surial> The only thing I can think of is that another device in the house that eats 2.5A turns on and off in response to the current draw from the heater.[16:15:55] <surial> W_work: They aren't, but a 25% error?[16:16:12] *** atlants has quit IRC[16:16:14] <mr_ank> are you getting electrocuted as you do this?[16:16:29] <surial> This is a €30,- toy, but nonetheless, on everything else I've measured with it, it does a fine job. Worse, when I measure the wash machine or the iron, the current at the switchbox is almost exactly the same as when I measure it at the device.[16:16:31] <mr_ank> cause that could draw a bit[16:16:36] *** sircco is now known as slonkko[16:16:42] <cheeser> ~interesting[16:16:42] <javabot> this is all very interesting (not really) but please take it somewhere else.[16:16:49] <waz> surial: had you just turned on the heater?[16:17:01] <surial> mr_ank: Well, as I'm shoving the clamp in between the cabling between the breakers and the switchbox, there is no way for me to turn off the power. Possibly today is your lucky day and I'll shortly blow myself up.[16:17:06] <surial> waz: Yes.[16:17:16] <waz> startup usage different[16:17:30] <waz> measure after it runs, maybe it's down now?[16:17:37] * waz hides from cheeser[16:17:38] <mr_ank> surial: !! seriously, be careful[16:17:39] <surial> Possibly. I'm doing basically the same thing twice, first measuring at the heater itself, then at the switchbox.[16:17:46] <cheeser> try ##homewiring[16:17:53] <waz> heh[16:18:01] <waz> Off to take food to my son at school[16:18:09] <surial> mr_ank: I don't have to wire anything in. Clamps are easy like that.[16:19:07] <slonkko> does anyone here know about WSDL, i have beginner problem[16:19:10] *** Beaver`univ is now known as Bavlito[16:19:11] <surial> mr_ank: http://www1.uk.conrad.com/m/1000_1999/1200/1200/1201/120172_RB_00_FB.EPS.jpg <- that's the device. You open the clamp so a cable runs through the loop. That's all you need to do.[16:19:17] *** cheeser sets mode: +b %surial!*@*[16:19:56] *** Razec has quit IRC[16:19:59] *** jeremy_c has joined ##java[16:20:44] <jeremy_c> During a long process, how can I cause an edit widget to be repainted? (I set the background color).[16:21:30] *** surial has quit IRC[16:22:04] *** Daniel_H has joined ##java[16:22:29] <dangertools> don't do long processing on the edt[16:22:40] <cheeser> ~edt[16:22:40] <javabot> cheeser, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1[16:22:52] *** lami1984 has joined ##java[16:22:55] <lami1984> heelo[16:23:12] <jeremy_c> cheeser : thanks.[16:23:24] <cheeser> sure[16:23:53] *** l3ns has joined ##java[16:23:58] <l3ns> Hi everyone![16:24:42] <l3ns> Is it possible to listen events from the "menu" itself?[16:24:56] <cheeser> ~javadoc JMenu[16:24:58] <javabot> cheeser: http://is.gd/j2MX [javax.swing.JMenu][16:24:58] <cheeser> ~javadoc JMenuItem[16:25:04] <javabot> cheeser: http://is.gd/j2N0 [javax.swing.JMenuItem][16:25:11] <cheeser> look for ways to add listeners[16:26:23] <l3ns> Because I can do it with the menuItem[16:26:40] <l3ns> JMenuItem*[16:27:02] <cheeser> ok. so why are you asking us then?[16:27:37] <l3ns> Because I can't make it to respond if I have no items under a menu.[16:28:42] <cheeser> oh, i see.[16:28:59] *** DragonLord-- has joined ##java[16:29:12] <cheeser> look at the api for JMenu[16:29:29] *** MacFlecknoe has joined ##java[16:30:16] <MacFlecknoe> i work for a company where every major object in their system is an extension of hashmap... and they think its wonderful[16:30:24] <cheeser> hahaha. awesome.[16:30:54] <l3ns> I am trying to create a "Connect" Menu, then if a user clicks that menu a pop up window will open....[16:31:13] <mr_ank> MacFlecknoe: why do they do that?[16:31:25] <MacFlecknoe> they want the objects to be "flexible"[16:31:37] <cheeser> MacFlecknoe: and not typesafe.[16:31:38] <MacFlecknoe> they want to be able to add anything to it that they want[16:31:40] <mr_ank> but why hashmap specifically?[16:31:42] <cheeser> polish up that resume![16:31:44] <MacFlecknoe> and not typesafe[16:31:49] <MacFlecknoe> its the worst idea ever[16:31:56] <cheeser> mr_ank: put("somenewkey", "somenewvalue")[16:32:16] *** NielsD has quit IRC[16:32:22] *** dnmo has quit IRC[16:32:29] <mr_ank> yes, but you lose the order etc[16:32:40] <mr_ank> if you were to do something insane like that[16:32:46] <mr_ank> you would use something more flexible[16:33:08] <cheeser> i doubt *order* is their primary concern[16:33:12] <mr_ank> like, say... a more abstract concept. An Object.[16:33:39] <cheeser> mr_ank: you're missing the whole point[16:34:14] <mr_ank> cheeser: i'm trying to get into the deceased mind of the hashmap extender.[16:34:31] <mr_ank> where i work, they all talk about spring's autowiring[16:34:43] <cheeser> they want to be able to add arbitrary values to an object without having to write the code[16:34:45] <mr_ank> but noone is brave enough to use it in production for some reason.[16:35:09] <jottinger> mr_ank: that' ssilly[16:35:17] <mr_ank> very silly, jottinger[16:35:30] <cheeser> well, spring is new after all.[16:35:31] <mr_ank> cheeser: like DOM nodes[16:35:45] <cheeser> mr_ank: like Map entries[16:36:21] *** jaggz- has left ##java[16:36:27] <mr_ank> More like DOM nodes that have a set of key/values in them for the user to store stuff[16:36:34] * cheeser sighs.[16:36:51] <cheeser> whatever. it's a dumb idea. it's even dumber trying to explain/justify it to you.[16:36:54] <MacFlecknoe> mr_ank: do you actually code for a living[16:36:59] <MacFlecknoe> lol[16:37:18] <mr_ank> ![16:37:38] <mr_ank> MacFlecknoe: i'm not the guy extending hashmap to dead[16:37:52] <cheeser> mr_ank: but you are the guy making no sense.[16:38:11] <mr_ank> cheeser: it's 2:39am[16:38:14] *** p8m has joined ##java[16:38:25] *** Hates_ has joined ##java[16:38:44] <mr_ank> also, my brain is one of the worst parts of my body.[16:38:48] <mr_ank> so don't trust what i say[16:39:09] <cheeser> ...[16:41:21] *** Woot4Moo has joined ##java[16:41:23] *** TooAngel has joined ##java[16:41:52] *** benny`work has joined ##java[16:42:06] *** sombriks has joined ##java[16:42:10] *** TooAngel has left ##java[16:42:12] *** ghostknife has quit IRC[16:42:59] *** Frostix has quit IRC[16:43:40] *** MigoMipo has joined ##java[16:44:47] *** DragonLord- has quit IRC[16:45:31] <l3ns> JPopupmenu is not the answer -([16:45:47] * cheeser shakes his head[16:46:44] *** floe has joined ##java[16:47:07] <mr_ank> MacFlecknoe: do you actually code for a living?[16:47:27] <MacFlecknoe> huh? yes[16:47:30] <cheeser> apparently no one in his office does. P^)=[16:47:33] <l3ns> What can you suggest that I can use for this; A Connect Menu, then if I click that, a new frame will pop up that has 2 textfields for user and password?[16:47:39] <MacFlecknoe> cheeser: not well[16:47:53] <mr_ank> MacFlecknoe: and i assume you are the one that does things fine[16:48:08] <MacFlecknoe> mr_ank: as fine as i know... of course[16:48:09] <mr_ank> out of everyone in your office, YOU, just YOU understand how to do things properly.[16:48:14] <mr_ank> Thank god you are there![16:48:19] *** giupo has joined ##java[16:48:20] <mr_ank> they made a great choice by hiring YOU.[16:48:22] <dangertools> l3ns: why did you think JPopupmenu could be the answer?[16:48:29] *** juc0 has quit IRC[16:48:48] <MacFlecknoe> mr_ank: feathers ruffled much?[16:48:54] <l3ns> I thought it's a new frame that will pop up.....[16:49:11] <mr_ank> MacFlecknoe: think about it, genius :)[16:49:17] *** lami1984 has quit IRC[16:49:57] <MacFlecknoe> mr_ank: with due respect id raher not take advice from someone who would suggest using DOM rather than a hashmap in an object...[16:49:59] *** viperhr has joined ##java[16:50:09] <mr_ank> MacFlecknoe: that's not what i said[16:50:12] <MacFlecknoe> mr_ank: i dont even know what that means[16:50:23] <mr_ank> it doesn't surprise me[16:50:33] <jottinger> heh[16:50:42] <MacFlecknoe> mr_ank: it shouldnt suprise you as no one can make snese of what you say[16:50:48] <jottinger> nothing wrong with DOM... as long as the backing store is worth a flip[16:50:48] *** kungen has quit IRC[16:50:49] <MacFlecknoe> mr_ank: you should be used to it by now[16:51:11] <cheeser> MacFlecknoe: mr_ank: you two should get a room and relieve of us of your penis contests[16:51:30] *** ChanServ sets mode: +o jottinger[16:51:37] <jottinger> I can hay-elp make that happen[16:51:48] <MacFlecknoe> cheeser: im not interested in mr_ank at all... hebrought the insults..[16:51:53] <MacFlecknoe> im over it[16:51:57] <cheeser> MacFlecknoe: so ignore him[16:52:08] *** omaru has joined ##java[16:52:11] <MacFlecknoe> cheeser: done[16:52:25] *** yclian has quit IRC[16:52:30] <mr_ank> i was just saying, it's awesome his company has him on the payroll :) how is that an insult?[16:52:43] <cheeser> mr_ank: shush[16:53:25] * mr_ank sets mode +facepalm cheeser[16:54:33] * jottinger sets mode +b mr_ank[16:54:36] *** jottinger sets mode: +b *!*n=ank@*.static.tpgi.com.au[16:57:09] *** Maaks has quit IRC[16:57:21] *** jottinger sets mode: -b *!*n=ank@*.static.tpgi.com.au][16:57:23] *** jottinger sets mode: -b *!*n=ank@*.static.tpgi.com.au[16:58:39] *** theblackbox has joined ##java[16:58:47] *** DragonLord-- has quit IRC[16:59:37] *** rlubke has joined ##java[17:00:42] <whaley> entertaining.[17:01:30] <theblackbox> hello all..... what's the beef with Set? I'm trying to get a field of a class tagSupport, called tagsList .... which is in fact a Set<String> .... to be ordered.... but I keep getting a null exception of one kind or another... I've tried various different ways of doing this and I'm missing something fundamental here[17:02:08] <jottinger> you might want to consider what the NPE actually is telling you[17:02:09] <theblackbox> I know I could have tagsList as a List or even a SortedSet, but it /isn't/ so I'm trying to order a Set[17:02:36] <theblackbox> jottinger, I've changed it since getting that, but the exception passed is null[17:02:40] <theblackbox> I'll try and recreate it[17:03:25] *** Sulis has quit IRC[17:03:57] <cheeser> another aussie. strange how often that works out.[17:04:52] <blahjake> theblackbox: you could use a LinkedHashSet if you want ordering without sorting[17:06:21] <whaley> theblackbox: show some code... also, you can always instantiate a new TreeSet / LinkedHashSet from the Set you are given (as blahjake just stated)[17:06:22] *** casmo has joined ##java[17:06:43] *** Frostix has joined ##java[17:06:46] *** Greeny_ has joined ##java[17:07:17] *** yclian has joined ##java[17:07:48] <theblackbox> hmmm, I'll have a look into that cheers blahjake, whaley[17:07:55] <jdolan_> does anyone know if it's possible to run a 32 bit jvm safely on a 64 bit os? i'm getting an error, complaining about libpthread.so.[17:08:05] <jdolan_> invalid ELF header format; i'm assuming because the lib is 64 bit.[17:08:22] <whaley> theblackbox: you are welcome[17:08:38] <jdolan_> and as far as i know, all of the "standard" 32 bit compatibility packages are installed.[17:08:39] *** Sulis has joined ##java[17:08:44] <jdolan_> (it's RHEL if that helps)[17:08:45] *** [[thufir]] has joined ##java[17:08:53] *** toytoy has quit IRC[17:09:21] <theblackbox> the exception I get is InvocationTargetException(Throwable target) where target is null .... think I'm going about this the wrong way trying to cast the Set, will check out getting a new TreeSet / LinkedHashSet[17:09:53] *** toytoy has joined ##java[17:12:02] *** mohax has joined ##java[17:14:54] <blahjake> what is the best practice in java for a deep copy of an object of unknown (at compile time) type?[17:15:32] <cheeser> if i were being lazy, i'd serialize it using xstream and then deserialize it back to another variable[17:15:59] *** giaco has quit IRC[17:16:00] *** durka42 has joined ##java[17:16:07] *** javahorn has joined ##java[17:16:23] *** sphenxes has joined ##java[17:17:20] <blahjake> lazy because the xml parsing overhead is high?[17:17:37] <cheeser> yeah[17:18:48] *** yclian has quit IRC[17:19:42] *** mistik1 has quit IRC[17:19:54] *** mistik1 has joined ##java[17:20:00] <dpy> is there a design pattern name for the act of separating I/O logic from the in-memory representation of an object by means of Reader/Writer ?[17:20:56] *** Goundy has joined ##java[17:21:22] *** _acid__ has joined ##java[17:21:29] *** giupo has left ##java[17:23:30] *** krad has quit IRC[17:23:46] *** theblackbox has quit IRC[17:24:08] <jdolan_> cheeser, xstream looks fantastic.[17:24:17] *** nihi|ist has joined ##java[17:24:18] <jdolan_> what a nice way to speed up REST development.[17:24:38] <jdolan_> (and not use Axis/XFire (or whatever XFire was renamed to))[17:24:52] <cheeser> cxf[17:24:57] <jdolan_> right.[17:25:03] <jdolan_> i haven't used it since it was xfire.[17:25:16] <jdolan_> but with something like xstream, there's little reason to use SOAP anymore, hehe.[17:25:19] <nihi|ist> jersey?[17:25:29] <l3ns> question: can I put textfields on a dialog?[17:25:35] *** ScottG489 has quit IRC[17:25:40] <cheeser> jdolan_: http://www.infoq.com/news/2008/10/jaxrs-comparison[17:25:48] <cheeser> ~~ l3ns tias[17:25:49] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.[17:28:38] <elmomalmo> jdolan_: xstream doesn't actually implement RESTful interface does it? It's just for serialisation right?[17:29:30] <cheeser> elmomalmo: correct[17:29:54] <jdolan_> right, it'd just take most of the legwork out of doing your own REST.[17:30:04] *** pezia has joined ##java[17:30:30] <benJIman> JSR-311[17:30:31] <jdolan_> and someone could write a simple wrapper that provides the HTTP part (URL endpoint config and some try/catch, heh)[17:30:32] <l3ns> Wow! It can!! :)[17:30:42] *** deSilva has quit IRC[17:30:44] <cheeser> l3ns: no way![17:31:21] *** OsAC has joined ##java[17:31:54] <l3ns> cheeser: There is a way. :)[17:32:01] *** schasi has joined ##java[17:32:03] <cheeser> of course, there is.[17:32:12] * elmomalmo looks aty xstream and JSR-311[17:32:38] *** geaaru has quit IRC[17:33:05] *** elmomalmo has quit IRC[17:33:31] *** UT2K3 has joined ##java[17:33:44] *** schasi has quit IRC[17:34:29] *** dos000 has joined ##java[17:34:33] <dos000> howdy[17:35:54] <whaley> jdolan_: I hear google protocol buffers is a nice serialization format also[17:35:56] <dos000> anyone knows how one can trap the instantiation of a certain class ? i basically need to return a different object when new is called on a certain class[17:36:06] <cheeser> uh...[17:36:28] <cheeser> i'd look into aspects but that sounds pretty broken to me.[17:36:36] <dos000> the new object is derived from the previous object obviously ... this is for testing purposes[17:37:15] <dos000> cheeser: i am trying to create mock objects that would make the app fail at certain points[17:37:40] <cheeser> sounds like it's *already* failed.[17:37:41] <cheeser> 8^)=[17:37:49] <dos000> i was hoping something other an aspects would work .. brute force was to use search replace[17:37:56] <whaley> dos000: you are probably beyond this point, but using dependency injection would have been a better up front solution[17:37:59] *** DjZemich has joined ##java[17:38:05] <cheeser> javabot: whaley++[17:38:05] <javabot> whaley has a karma level of 184, cheeser[17:38:32] <dos000> whaley: mmmmmmmm dep injection .. never heard this ![17:38:48] <whaley> dos000: it would be more work now... but probably better in the long run to do the type of thing you are describing[17:38:50] <cheeser> where have you been the last 3 or 4 years?[17:38:51] <cheeser> 8^)=[17:39:02] *** Sulis has quit IRC[17:39:07] *** dpy has quit IRC[17:39:14] <dos000> cheeser: doing management ...[17:39:21] <pezia> hi. do you know about some documentation about the bandwidth requirement of RMI invocations?[17:39:30] *** caverdude has joined ##java[17:39:44] *** nihi|ist has quit IRC[17:39:49] *** nihi|ist has joined ##java[17:40:36] <dos000> btw ... is there a nice jar file i can use for compiling and generating aspects. I dont need something inside an ide. Same thing would be for dep injection.[17:40:46] <caverdude> hi[17:40:51] <whaley> ~~ dos000 spring[17:40:51] <javabot> dos000, spring is a Java/JEE Application Framework - http://www.springframework.org/[17:41:01] <cheeser> ~aspectj[17:41:02] <javabot> cheeser, aspectj is http://www.eclipse.org/aspectj/[17:41:11] <whaley> dos000: spring has aop and a di framework[17:41:13] <dos000> thats an ide ...[17:41:17] <cheeser> what?[17:41:26] <whaley> dos000: aspectj is not an ide... it has ide plugins, but it is just another compiler[17:41:39] <dos000> cheeser: i need an aspectj compiler i can chip with my code .[17:41:49] <cheeser> dos000: did you even bother following the link?[17:42:04] <dos000> whaley: i was hoping i can ship it as a jar file[17:42:13] <cheeser> or did you just see eclipse and stop?[17:42:16] <dos000> cheeser i have been there alraeady[17:42:33] <dos000> i was thinking af aspectj right away[17:42:58] <whaley> dos000: uhm... eh? aspectj just compiles your aspects+classes into .class files like a regular 'ol compiler would, but with the aop goodness (if one considers aop good)[17:43:13] <cheeser> aspectj is not an ide.[17:43:24] <waz> aop is magical![17:43:32] <waz> IBM can not survive without it[17:43:38] <whaley> waz: HEH[17:43:57] <waz> one of my more favorite quotes from the aop craze[17:44:00] *** Sulis has joined ##java[17:44:15] <dos000> waz: for aspectj how do you do overnight builds ?[17:44:28] *** blankthemuffin has joined ##java[17:44:42] <cheeser> part of the ant/maven build process[17:44:59] <whaley> dos000: there are ant tasks for aspectj[17:45:04] * dos000 hides under a tree at the mention of maeven[17:45:04] *** camilojd has joined ##java[17:45:22] <dos000> ok .. gotta google those then[17:45:30] <whaley> dos000: 'bout time :D[17:45:39] <cheeser> reading++[17:45:56] <dos000> thanks a bunch guys[17:46:03] <whaley> ~next[17:46:04] <javabot> Another satisfied customer. Next![17:46:11] *** Yustme has joined ##java[17:46:29] *** agnul has quit IRC[17:48:26] *** Varox has quit IRC[17:50:01] *** vix85 has joined ##java[17:50:29] *** segun has joined ##java[17:51:27] *** segun has left ##java[17:52:59] *** ldam has quit IRC[17:54:57] *** woogley has joined ##java[17:57:40] *** cyth has joined ##java[17:58:09] *** TooAngel has joined ##java[17:58:41] *** TooAngel has left ##java[17:59:31] *** akintayo has joined ##java[18:00:07] *** rio_123 has quit IRC[18:00:08] *** javahorn has quit IRC[18:00:39] *** xxxxshame has quit IRC[18:01:15] *** javahorn has joined ##java[18:01:51] *** segun has joined ##java[18:02:44] <segun> akintayo are u here[18:02:52] <cheeser> ~~ segun aolbonics[18:02:52] <javabot> segun, 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![18:02:57] *** sphenxes has quit IRC[18:03:25] *** svm_invictvs has joined ##java[18:03:53] <akintayo> one day I will stop using them. That bad habit just dont want to leave me[18:04:05] <svm_invictvs> akintayo: What?[18:04:29] <akintayo> never mind me[18:04:44] <akintayo> I am just thinking in black and white[18:04:46] *** sphenxes has joined ##java[18:04:47] <svm_invictvs> Vector?[18:04:52] <akintayo> thanks for the concern[18:05:42] <akintayo> I just installed this centerim and the guy is not behaving itseld[18:05:46] <akintayo> ifself*[18:05:57] <akintayo> JOIN #uknglobal[18:06:19] *** ayrnieu has left ##java[18:06:35] *** ankylose has quit IRC[18:06:54] *** vix85 has quit IRC[18:08:35] *** shadewind has quit IRC[18:09:22] *** benny`work has quit IRC[18:09:40] *** segun has left ##java[18:10:31] *** Saggese has joined ##java[18:11:25] *** Saggese has left ##java[18:12:28] *** blankthemuffin has quit IRC[18:13:49] *** caverdude has quit IRC[18:14:02] *** UK-sHaDoW has joined ##java[18:16:02] *** OsAC has left ##java[18:16:03] *** javahorn has quit IRC[18:16:21] *** javahorn has joined ##java[18:17:20] *** sjhd has quit IRC[18:19:00] *** pandora-- has quit IRC[18:20:18] *** KingBilly has joined ##java[18:21:25] *** bitshuffler has joined ##java[18:21:41] <dos000> anyone knows the impact of dependency injection on performance ? i am looking a guice ... and it maybe a performance hit.[18:21:57] <jottinger> it doesn't have a performance hit unless you're doing the injection constantly.[18:22:08] *** pandora-- has joined ##java[18:22:10] <jottinger> een then it's a matter of how expensive the construction is.[18:22:38] <dos000> mmmmm[18:23:03] *** b3nn3tt has joined ##java[18:23:28] <jottinger> if it's something you have to worry about, then you've actually much larger problems than dependency injection.[18:24:04] *** amnesiac has joined ##java[18:24:12] *** skypjack has joined ##java[18:24:57] *** KermitTheFragger has quit IRC[18:25:36] <dos000> jottinger: for me to introduce this .. i would have to define the impact . Even if it is minimum[18:25:57] <dos000> jottinger: someone mustve done this .. i assumed[18:28:13] <svm_invictvs> BF Injection![18:28:39] <dos000> bf ???[18:30:31] <dmlloyd> usually you do DI once, when your app starts up[18:30:34] *** Hates_ has quit IRC[18:30:48] <dmlloyd> maybe once per session, rarely once per request[18:30:55] <dmlloyd> at least, so it seems to me[18:31:31] <svm_invictvs> dos000: That was the name of a car from GTA3, I think.[18:31:32] *** javahorn has quit IRC[18:31:37] <dos000> dmlloyd, but if you have objects created 1000000 times it could be a prob[18:31:41] <svm_invictvs> dos000: It has nothing to do with anything we're talking about.[18:31:51] <dos000> ah![18:32:09] *** kapipi has quit IRC[18:32:44] *** DJGummikuh has joined ##java[18:32:56] <dos000> dmlloyd, the top object is created once ... all child objects are traped by DI (provided the annotations are present). And these child ojects could be created multiple times[18:33:05] *** pezia has left ##java[18:33:23] <DJGummikuh> Hello can someone please help me with getting a hello world servlet webb application to run under tomcat 6.0.18? I'm totally lost here :-([18:33:39] <dos000> my code runs inside a server that handles requests with 100000 transactions per sec[18:34:09] *** jmpf has joined ##java[18:34:21] <dos000> any kind of latency will translate to bigger timing[18:34:44] <DJGummikuh> I'm using Eclipse and when I hit F11 everything works. But I kinda fail in deploying my webapp to tomcat manually (without hitting F11 in eclipse)[18:34:59] *** skypjack has left ##java[18:35:02] <DJGummikuh> I allways get 404[18:35:06] *** jivedude has quit IRC[18:35:55] *** rgravener has joined ##java[18:36:12] *** jmpf has left ##java[18:36:13] <rgravener> how much memory does it cost to instantiate a class with no member variables?[18:37:06] <eidolon> $14.22[18:37:14] <dmlloyd> plus tax[18:37:32] <rgravener> ~ridicule eidolon[18:37:33] <javabot> points at eidolon and laughs[18:37:33] *** Sulis has quit IRC[18:37:36] <dmlloyd> I'd say it costs "one class with no member variables"[18:37:46] <dmlloyd> there are no other units that make sense to use[18:37:53] <rgravener> ok[18:38:00] <rgravener> i was curious, first time j2me development[18:38:04] <dmlloyd> since it's different on every platform, and maybe even between JVMs on the same platform[18:38:40] *** juanez has joined ##java[18:39:12] *** DJGummikuh has quit IRC[18:39:24] *** DJGummikuh has joined ##java[18:39:28] <DJGummikuh> meh disconnected...[18:39:35] <DJGummikuh> anyone answered to my prayers yet? :)[18:40:14] <DJGummikuh> it woudl seem that either my tomcat is configured wrong or I am missing something completely obvious because I at least believe I did everything right according to the book I read for that topic...[18:42:27] *** Bevin has quit IRC[18:43:02] *** z4chh has joined ##java[18:43:23] <z4chh> anyone recommend a good ap comp sci. book?[18:43:36] <DJGummikuh> a what?[18:43:40] <rgravener> advanced placement[18:43:45] *** Sulis has joined ##java[18:43:46] <z4chh> yeah[18:43:56] <DJGummikuh> oh sorry.. never heard of that before..[18:44:25] <z4chh> i thought id ask here since the test is all java[18:44:35] <rgravener> what does the test test you on?[18:44:42] *** spathi has joined ##java[18:44:42] *** tomvolek has joined ##java[18:45:21] <z4chh> rgravener, pretty much the foundational oop and procedural programming concepts in java..[18:45:41] *** sombriks has quit IRC[18:45:48] *** Ivellina has joined ##java[18:45:49] <rgravener> effective java?[18:45:58] <rgravener> ~effective java[18:45:58] <javabot> rgravener, effective java is a book written by Josh Bloch (java guru). It contains a big bunch of java samples, each one food for thought and designed to teach you how to be a better programmer. You need to know java already, but you don't need to be an expert. See http://java.sun.com/docs/books/effective/[18:46:30] <wlfshmn> I loved that book..[18:46:33] <rgravener> that may be over kill but my co - worker (wrote wicket in action) recommends that book.[18:46:37] <wlfshmn> need to get me a copy of the new edition[18:47:08] *** sombriks has joined ##java[18:47:33] <z4chh> hmm[18:48:11] <z4chh> im thinking of finding a book that actually prepares one for the test[18:48:33] <sproingie> doesn't sun publish a book specifically for the test?[18:48:36] <z4chh> i know java and programming already..i just need some brush up[18:49:02] <sproingie> oh an AP test nvm[18:49:55] <sproingie> effective java's probably pretty good then. apply some of it in your own code, you'll get un-rusty soon enough[18:50:16] <rgravener> z4chh: read this? http://www.collegeboard.com/student/testing/ap/compsci_a/java.html[18:51:42] *** timte has joined ##java[18:51:49] <blahjake> z4chh: is it still a pen and paper test?[18:52:37] *** teralaser has joined ##java[18:53:14] <z4chh> yeah[18:54:16] <z4chh> rgravener, i need to know the test, not java ;p[18:54:50] *** kapipi has joined ##java[18:54:58] <rgravener> z4chh: that tells you what they go over[18:59:13] *** Goundy has quit IRC[18:59:20] *** Luminari has joined ##java[18:59:51] <Luminari> anyone know of a good library/snippet to filter html (possibily selectively) out of text?[18:59:55] *** British0zzy has joined ##java[19:00:17] <British0zzy> Hi, I need help doing some filesystem independent voodoo[19:01:24] <dmlloyd> see javax.voodoo[19:02:22] <British0zzy> I am implementing #include lines. Is there any way to know when someone says #include "this.txt" vs #include "/blah/blah/this.txt"?[19:02:49] <British0zzy> in a system independent manner.[19:04:17] <Luminari> British0zzy: includeString.contains("/")[19:04:45] *** sjhd has joined ##java[19:04:52] <British0zzy> but on windows can't one use #include "C:\blah\blah\this.txt" ?[19:04:58] *** durka42 has quit IRC[19:05:05] <sjhd> how can I persuade maven to use ftp instead of http?[19:05:38] *** beol has joined ##java[19:05:50] <rgravener> sjhd: add your own repo[19:05:52] <rgravener> for ftp[19:05:54] <Luminari> okay includString.contains(File.pathSeparator);[19:06:05] <sjhd> sjhd, I want to use the official repos[19:06:11] <sjhd> uh[19:06:18] <sjhd> rgravener, I meant you[19:07:19] <rgravener> they aren't available as ftp[19:07:55] <British0zzy> Luminari: yeah, i already tried that, but it leaves out another case: #include "blah/this.txt"[19:07:58] *** ppr is now known as peper[19:08:10] <sjhd> hm[19:08:19] <British0zzy> i'm trying to distinguish whether or not the include uses the full path name or a relative path[19:08:29] <sjhd> it's just that I am behind a firewall quite often and http access is restricted[19:08:49] *** edsantos has joined ##java[19:08:56] *** hanen has quit IRC[19:09:01] <Luminari> British0zzy: sounds like a job for regular expressions[19:09:25] <British0zzy> yea, i guess i'll have to look at the C lang spec closely.[19:09:29] <British0zzy> oh well, thanks[19:10:57] <sjhd> oh well, you're welcome[19:12:59] *** gd1 has joined ##java[19:13:02] <gd1> hi[19:13:11] *** British0zzy has quit IRC[19:13:15] <gd1> I'm getting out of memory errors on a certain line[19:13:21] <gd1> unless I call System.gc() before[19:13:44] <gd1> isn't there a clearer way?[19:13:55] <dmlloyd> ~~ gd1 show us[19:13:55] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.[19:14:15] *** jmole has joined ##java[19:14:37] <sjhd> show us your pants first[19:14:43] <dmlloyd> I"m guessing you're creating a giant array[19:15:19] <gd1> http://pastebin.com/m2a4169ae[19:15:22] <jmole> So I was reading this post on using HandlerMap to handle processing of things with dynamic type information: http://stackoverflow.com/questions/103564/the-performance-impact-of-using-instanceof-in-java/111271#111271[19:15:30] <gd1> array is HUGE[19:15:45] <gd1> its size may reach 1 million Strings[19:15:52] <dmlloyd> there's your problem[19:15:55] <gd1> yeah[19:15:58] *** UT2K3 has quit IRC[19:15:59] <gd1> but it has to be so[19:16:12] <dmlloyd> you need a 1,000,000 array?[19:16:17] <gd1> yes I do[19:16:19] <dmlloyd> you can't have, say, 1,000 1,000-element arrays?[19:16:31] <gd1> think it's better?[19:16:47] <dmlloyd> probably, especially if your data is sparse[19:17:02] <gd1> you mean there are lots of empty cells?[19:17:04] <dmlloyd> either that or bump up -Xmx (and maybe beef up some of the region sizes)[19:17:06] <dmlloyd> right[19:17:16] <gd1> there are LOTS of empty cells since[19:17:24] *** KikiJiki has quit IRC[19:17:31] <gd1> it's a tree-like structure[19:17:38] <dmlloyd> or perhaps you want e.g. a TreeMap<Integer,String>[19:17:45] <_W_> gd1, so why not use a tree-like structure?[19:17:55] <gd1> I've got a problem with it[19:18:07] <gd1> I explain[19:18:09] <dmlloyd> ~gc tuning[19:18:09] <javabot> http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html[19:18:23] <gd1> dmlloyd: thanks[19:18:30] <_W_> GC tuning is hardly ever necesarry[19:18:43] <dmlloyd> unless it is[19:18:45] <gd1> I was telling you I've got a list of "words"[19:19:05] <gd1> that words can sure be put in a TreeMap and it should be fast[19:19:21] <dmlloyd> or a TreeSet<String> even, depending on how you're using it[19:19:22] <_W_> gd1, perhaps you better explain what you are doing with these million words?[19:19:38] <gd1> _W_: kind of dictionary[19:19:47] <gd1> that words can be put in a TreeMap and it should be fast[19:19:53] <_W_> you'd be hard pressed to reach a million words even given several high-vocabulary languages[19:20:04] <_W_> "kind of"? don't paraphrase[19:20:12] *** SummerWO has joined ##java[19:20:14] *** durka42 has joined ##java[19:20:32] <dmlloyd> if it's just a plain dictionary, I'd use a SortedSet<String> dict = new TreeSet<String>()[19:20:41] *** Epcylon has quit IRC[19:20:43] <_W_> it'[19:20:51] <_W_> sorry, it's probably not a dictionary at all[19:20:55] <gd1> dmlloyd: I would like to cache tree structure[19:21:07] * _W_ waits for gd1 to explain better his needs[19:21:27] *** latebind has joined ##java[19:21:42] <gd1> dmlloyd: so... I pre-process the original word list and put it in a file which observes a tree structure[19:21:44] <gd1> for fast recall[19:22:13] <l3ns> why use JPanel instead of JFrame?[19:22:13] <dmlloyd> what kind of access pattern?[19:22:17] *** gfather has joined ##java[19:22:31] <_W_> l3ns, because they do different things?[19:22:41] <gfather> i have a small question wich is bothering me as im learning java[19:22:43] <gd1> dmlloyd: sorry I'm not English mothertongue[19:22:50] <gfather> wich would be better eclipse or netbeans[19:22:50] <gd1> dmlloyd: what you mean for access pattern?[19:22:52] *** vesz has quit IRC[19:22:54] *** Blaay has joined ##java[19:23:01] <_W_> gfather, try both and make up your own mind[19:23:01] <dmlloyd> gd1: it's ok. How do you access the dictionary? look up by name?[19:23:07] <l3ns> In what way they differ?[19:23:16] <gfather> _W_ tried them both[19:23:21] <l3ns> They are both containers[19:23:23] <gfather> couldent understand as a java noobi[19:23:28] <_W_> ~~l3ns rtfm[19:23:28] <javabot> Firstly, see http://xkcd.com/293/ then see the API Docs at http://java.sun.com/javase/6/docs/api and the Really Big Index at http://java.sun.com/docs/books/tutorial/reallybigindex.html[19:23:30] <gd1> dmlloyd: lookup by name, lookup by array index. It's a replace-word-with-index reversible process[19:23:57] <_W_> gfather, then it hardly matters, right? toss a coin, and when you know and understand more, evaluate both again[19:23:59] <gd1> dmlloyd: I mean you have the word, I give you the index. You give me the index, I give you the word[19:24:07] <dmlloyd> gd1: ah, that makes sense. Then probably you want two maps: HashMap<Integer,String> and HashMap<String,Integer>[19:24:16] <dmlloyd> gd1: fill both maps together.[19:24:21] <gd1> dmlloyd: I said the problem was cache[19:24:46] <dmlloyd> you mean CPU cache?[19:24:50] <gd1> dmlloyd: you should see how it's damn fast if you put the tree structure on a file (already with BLANK lines)[19:25:04] <_W_> or don't keep them in memory, or keep them in a prefix tree, or keep them in a plain old hash map, or any number of solutions you might use, depending on /what you are actually doing/[19:25:20] *** valcker has quit IRC[19:25:27] <gd1> no, I cache tree structure on disk[19:25:38] <dmlloyd> ~trie[19:25:38] <javabot> dmlloyd, I have no idea what trie is.[19:25:40] <dmlloyd> hm[19:25:45] <dmlloyd> you could use a trie[19:25:52] <dmlloyd> for the String->int lookup[19:26:04] <_W_> gd1, what I'm trying to get across is that you haven't explained what you are actually doing, thus any advice we give might be moot for your actual purpose[19:26:10] <dmlloyd> http://en.wikipedia.org/wiki/Trie[19:26:13] <_W_> give more details=get better advice[19:26:32] <gd1> OK I try to explain better[19:26:41] <gd1> dmlloyd: thank you for that Trie stuff, I'll read it[19:26:55] <gd1> I know Java tree-like structures[19:26:59] <_W_> that would be good too, but I'd settle for you explaining /more/ :)[19:27:11] <dmlloyd> a hash table will probably be better than a tree in any case[19:27:19] <_W_> probably?[19:27:19] <gd1> but they don't write down a serialized representation of their contents[19:27:25] <_W_> it surely depends on what you are doing[19:27:31] <SummerWO> The code I'm looking at has two methods: getSettingAsInteger(String) and getSettingAsBoolean(String) -- how can I make this more generic?[19:27:40] *** npm has joined ##java[19:27:50] *** blankthemuffin has joined ##java[19:27:53] <gd1> so they has to be rebuilt everytime[19:28:01] <gd1> by performing several add operations[19:28:02] <_W_> gd1, yes, but what is your application doing? Is it a database engine? Is it a spell checker? An IRC client?[19:28:17] <gd1> _W_: assume a spell checker if you care to[19:28:26] <_W_> gd1, no, TELL ME what it is[19:28:33] <gd1> _W_: a spell checker[19:28:41] <_W_> I don't want to assume, I don't want to pretend, I want to know[19:28:47] <_W_> is it top secret? have you signed a NDA?[19:28:59] <gd1> It's a fucking experiment, _W_[19:29:09] <gd1> there's no top secret, there's no actual objective[19:29:35] <_W_> ah, ok, so you're not actually coding anything useful, you're just looking for things to learn :) should have said so then[19:29:43] <gd1> ok fine[19:29:53] *** edsantos has quit IRC[19:29:57] <gd1> so try at least to read what I type[19:30:27] <gd1> problem with Java normal tree-like classes is that they don't cache on disk their internal structure in a serialized representation[19:30:27] *** alek_b has joined ##java[19:30:43] <gd1> for faster RECALL[19:30:53] <_W_> serializing to disk would make things slower[19:30:59] <gd1> for the FIRST time _W_[19:31:09] *** sphenxes has quit IRC[19:31:13] <gd1> than for the OTHER times from 1 to infinite it would be MUCH faster[19:31:29] <_W_> no, whatever you do on disk, you can do in memory, faster[19:31:44] <dmlloyd> no reason to antagonize, _W_. he just wants to mess with a bi-map between strings and ints[19:31:49] <gd1> _W_: if you turn off the computer memory disappears[19:32:04] <_W_> gd1, yes, and /that/ is a good reason to put stuff on disk[19:32:05] <_W_> not speed[19:32:20] <gd1> speed at RECALLING, when it's DAYS after[19:32:23] <dmlloyd> gd1: have a look at berkeley db (the C one, not the java one)... they have an interesting on-disk hash table, as well as a b-tree structure[19:32:27] <_W_> and most (all?)of java's collections are in fact serializable[19:32:31] <dmlloyd> they also cover cache[19:32:40] *** zophy has joined ##java[19:32:59] <_W_> (assuming the content is serializable, like Strings for instance)[19:33:12] <gd1> dmlloyd: oh I've already implemented my own cache method[19:33:35] <_W_> why? there are so many existing ones, well thought-out and tested by thousands of developers[19:33:37] <dmlloyd> gd1: I'd still use a HashMap for the in-memory structure.[19:33:50] <gd1> dmlloyd: it just writes down tree inorder leaving empty lines for null nodes[19:34:29] *** ridoo has quit IRC[19:34:31] <gd1> dmlloyd: it's so fast at recall since it just copies from disk to memory preserving empty spaces[19:35:12] *** squi has quit IRC[19:35:21] <gd1> ok never mind[19:35:31] <gd1> thank you dmlloyd I'll go GC optimizing[19:35:32] <dmlloyd> gd1: here's an idea. you can use a FileChannel to map the whole dict file into memory, and treat it as a giant ByteBuffer :) You can implement your search that way[19:35:39] *** staykov has joined ##java[19:35:44] <gd1> FileChannel?[19:35:47] *** heyqule has joined ##java[19:35:48] <dmlloyd> then the OS will handle in-memory caching for you[19:35:55] <dmlloyd> ~~ gd1 javadoc FileChannel[19:35:57] <javabot> gd1: http://is.gd/j4bV [java.nio.channels.FileChannel][19:36:05] <gd1> yeah[19:36:21] <gd1> very very nice[19:36:30] <dmlloyd> FileChannel.map() specifically[19:36:33] <_W_> ~xstream[19:36:34] <javabot> XStream is a simple library to serialize objects to XML and back again. It can be found at http://xstream.codehaus.org[19:36:34] <gd1> I didn't know about it[19:36:57] <gd1> _W_: I'll check it out[19:37:09] *** wans has quit IRC[19:37:27] *** woogley has quit IRC[19:37:35] <gd1> now you understand I'm not totally crazy and what I want to do ? :)[19:37:38] <_W_> if you use a real sparse structure, and xstream (or even JVM serialization) I bet that will be even faster than what you are doing now[19:38:03] <_W_> erm, I mean a structure that stores the data in a compact way (eg a hashmap)[19:38:25] <gd1> I see[19:38:25] *** kab has joined ##java[19:38:32] *** jmole has quit IRC[19:38:52] <gd1> I will read your links and find a way to get it even faster[19:39:11] <gd1> using less memory than it uses now[19:39:26] <_W_> with the added benefit that you're probably reducing 200 lines of code to 10 :)[19:39:29] *** PRINCESS_FLUFF has joined ##java[19:39:36] <dmlloyd> the nice thing about FileChannel.map() is that it doesn't use Java's heap space[19:40:12] *** ankylose has joined ##java[19:40:39] <akintayo> identify 20milesfromhome[19:40:45] <dmlloyd> no thanks[19:40:50] <dmlloyd> you better change your password now though[19:40:50] <svm_invictvs> ~javadoc String[19:40:51] <javabot> svm_invictvs: http://is.gd/6UoM [java.lang.String]; http://is.gd/iaWp [javax.print.DocFlavor.STRING]; http://is.gd/iaWp [javax.print.DocFlavor.STRING][19:41:04] <dmlloyd> akintayo: ^^[19:41:20] <akintayo> dmloloyd: just testing[19:41:45] <dmlloyd> nevertheless, 328 other people now know your password :)[19:41:51] *** staykov has quit IRC[19:42:08] *** staykov has joined ##java[19:42:10] <akintayo> :)[19:42:18] <gd1> dmlloyd: it happened to me on a c channel!!!![19:42:20] *** NukaCola has joined ##java[19:42:28] <gd1> dmlloyd: it was so embarassing[19:43:08] <NukaCola> hello, is there a way to run java class with a full path to it? I mean I have /home/smth/smth/Test.class.. and I can't run it without NoClassDef[19:43:41] *** Absolute0 has quit IRC[19:44:32] *** latebind has quit IRC[19:44:35] *** latebind has joined ##java[19:44:46] *** akintayo has quit IRC[19:44:48] <dmlloyd> ~~ NukaCola classpath[19:44:48] *** Vanger has joined ##java[19:44:49] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html and http://mindprod.com/jgloss/classpath.html[19:44:52] <_W_> ~~NukaCola first cup[19:44:53] <javabot> A friendly web page to get you started with Java programming: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/[19:45:11] <dmlloyd> hm, that factoid needs to be shortened..[19:45:58] <NukaCola> ok I've tried -cp.. when using CP you need to only write the class name in the end. I can't do that.. I only can write full paths to the classes[19:46:27] <NukaCola> even when the $CLASSPATH is set.. I can't operate with the full path[19:46:34] <tieTYT2> don't ever set that[19:46:38] <tieTYT2> and no you can't, that's not the way it works[19:46:52] <NukaCola> so it's just not possible?[19:47:01] <NukaCola> yes, I know[19:47:19] <_W_> so specify the directory where your class' package begins?[19:47:31] <NukaCola> java -cp directory classname works.. and java -cp directory directory/classname doesn't[19:47:45] <_W_> so, problem solved?[19:47:58] <Vanger> Dumb question, but didn't find it in FAQ. If I'm only very-very-very starting learning Java, what IDE should I use, NetBeans or Eclipse?[19:48:01] <_W_> use the first (correct) form[19:48:01] *** akintayo has joined ##java[19:48:13] <NukaCola> no, I can't write ONLY the classname.. I have a testing system and for it to work - you have to specify the full path[19:48:13] <_W_> Vanger, you should try both and make up your own mind[19:48:19] <dmlloyd> ~~ Vanger newbie ide[19:48:19] <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.[19:48:23] <NukaCola> every other language was fine with it[19:48:27] <_W_> NukaCola, then your testing system sucks, and you should replace it[19:48:33] *** __simon__ has joined ##java[19:48:43] <gd1> _W_: you have a talent in keeping people far from you[19:48:52] <_W_> Java has excellent tools for such things anyway[19:48:56] <__simon__> is there any eqvivalent procedure in Java to C++'s dynamic_cast<Type>() ?[19:49:05] <__simon__> cal it "up-cast" if you will[19:49:12] <NukaCola> _W_ - what's wrong with a test system that uses full path ? because you can't test java in it?[19:49:13] <_W_> ~~__simon__ equivalent[19:49:13] <javabot> When asking for java equivalents of a feature or library found in another language assume we don't know what the other thing does and just explain what you want to do.[19:49:18] <Vanger> Understood. These two are the only "major" IDEs I should check? I know there are tens of them, but are these the main ones?[19:49:25] *** sphenxes has joined ##java[19:49:26] <__simon__> _W_: yeah, that was swedish xD[19:49:27] <dmlloyd> NukaCola: java is not a scripting language. It doesn't work on files. It works on classes, packages, and classpaths. If you can't get your system to accept that, then try making shell scripts to wrap your class execution.[19:49:33] <_W_> NukaCola, that'd be a big show-stopper for me, for sure.[19:49:50] <dmlloyd> Vanger: many (most?) pros consider IntelliJ IDEA to be the best.[19:49:55] <Vanger> dmlloyd: I code my C and perl in mc, but I'm tired of it[19:49:57] <NukaCola> ech. ok. thank you everyone, I'll try[19:50:05] <Vanger> Thank you,[19:50:13] <_W_> Vanger, there's also IDEA[19:50:37] *** ebil|work has joined ##java[19:50:46] *** ldam has joined ##java[19:50:47] *** KingBilly has quit IRC[19:50:54] <_W_> hmm, guess my selective blindness is back, I missed that comment from dmlloyd[19:51:06] <_W_> gd1, I am not here to make friends. I am here to get and give help.[19:51:42] <__simon__> Ok Ill try again. I have an object "public class Foo extends Bar {}" and a function somewhere taking Foo as argument. How can I cast Foo to be of type Bar?[19:51:45] *** Vanger has quit IRC[19:52:00] <_W_> you don't have to[19:52:11] <_W_> anything that expects a Bar reference will happilly take a Foo reference[19:52:32] <tieTYT2> how do you make a stack trace show more?[19:52:48] <__simon__> _W_: Yeah but can I call Bar specific methods on it?[19:52:54] <_W_> tieTYT2, write your own printStackTrace[19:52:59] *** kulhas has quit IRC[19:52:59] <tieTYT2> that's the only way?[19:53:06] <__simon__> In other strongly typed languages you have to cast it to let the compiler know[19:53:13] *** Hink has joined ##java[19:53:15] <_W_> __simon__, yes, /anything/ that expects Bar, including a dereference for methods or fields[19:53:26] <Hink> has anyone messed with the Merapi Project and AIR[19:53:27] <tieTYT2> that's super lame. It should be configurable with a compiler/vm param[19:53:32] *** spathi has quit IRC[19:53:37] <_W_> tieTYT2, I agree[19:54:12] <tieTYT2> i'm sure in 15 years they'll add it[19:54:27] <tieTYT2> right when they make it slightly easier to debug invalid classpath's[19:54:39] <__simon__> _W_: I beleive you have got it backwards xD I pass a subclass reference and want to call Superclass specific methods, not the other way around[19:55:43] <_W_> __simon__, that's not what you said[19:55:55] <_W_> I can only go by what you say, I'm afraid. You had "Foo extends Bar"[19:56:23] <_W_> anyway, for that, you can cast (though you probably just want to do a redesign instead, casts are rarely ideal)[19:56:28] <_W_> ~~__simon__ cast[19:56:28] <javabot> type casting is a way of changing the type of a reference (it NEVER changes an object), or a sloppy way of converting between different primitive types. (Type) expression type-casts the result of expression to Type.[19:56:47] *** narcoclepsy has joined ##java[19:56:47] <tieTYT2> ~remote debug[19:56:47] <javabot> tieTYT2, I have no idea what remote debug is.[19:56:51] <tieTYT2> ~remote debugging[19:56:51] <javabot> tieTYT2, remote debugging is -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n[19:57:11] *** justafish has quit IRC[19:58:16] *** npm has quit IRC[19:58:21] *** narcoclepsy has quit IRC[19:59:04] *** spathi has joined ##java[19:59:29] *** sjhd has quit IRC[20:00:52] *** Epcylon has joined ##java[20:01:20] *** Lhet has quit IRC[20:01:28] *** indeterminatus has joined ##java[20:05:23] *** supersako has joined ##java[20:05:58] *** NielsD has joined ##java[20:06:13] <gd1> THANK YOU ALL :) :) :)[20:06:15] *** gd1 has quit IRC[20:08:17] *** sphenxes has quit IRC[20:08:43] *** Cypher has joined ##java[20:09:07] *** Balgan has quit IRC[20:09:37] *** narcoclepsy has joined ##java[20:10:09] <narcoclepsy> Is there some jar I have to add to import java.io.Console? It doesn't appear to exist on my system[20:10:31] <FauxFaux> New in Java 6.[20:10:32] <cheeser> use java 6 then[20:10:40] *** Sagi22 has joined ##java[20:10:41] <cheeser> ~javadoc Console[20:10:47] <javabot> cheeser: http://is.gd/j4tB [java.io.Console][20:10:58] <cheeser> says right in the docs[20:11:32] <narcoclepsy> ugh. that would be it. I must be on 1.5, thank you[20:13:23] *** sphenxes has joined ##java[20:14:11] <svm_invictvs> Is it possible, with JAXB, to marshall a singl element into a DOMResult?[20:14:30] *** deepjoy has quit IRC[20:16:43] *** prgrmr has quit IRC[20:17:15] *** prgrmr has joined ##java[20:17:23] *** mitchnull has joined ##java[20:17:32] *** vix85 has joined ##java[20:19:20] *** prgrmr has quit IRC[20:19:27] *** rindolf has joined ##java[20:20:24] *** casmo has quit IRC[20:22:24] *** prgrmr has joined ##java[20:22:52] *** casmo has joined ##java[20:23:03] *** sphenxes has quit IRC[20:23:56] *** prgrmr has quit IRC[20:24:00] *** Sulis has quit IRC[20:24:53] *** casmo has quit IRC[20:27:44] *** casmo has joined ##java[20:28:18] *** Varox has joined ##java[20:28:21] *** SpeedyGhost has quit IRC[20:28:21] *** drtroll has quit IRC[20:28:21] *** rindolf has quit IRC[20:28:21] *** Epcylon has quit IRC[20:28:21] *** __simon__ has quit IRC[20:28:21] *** kab has quit IRC[20:28:21] *** heyqule has quit IRC[20:28:22] *** beol has quit IRC[20:28:22] *** MigoMipo has quit IRC[20:28:22] *** dos000 has quit IRC[20:28:22] *** gengid has quit IRC[20:28:22] *** suiside has quit IRC[20:28:22] *** crowbar has quit IRC[20:28:22] *** zeel has quit IRC[20:28:22] *** ozzloy has quit IRC[20:28:22] *** kshepherd has quit IRC[20:28:22] *** trustin has quit IRC[20:28:35] *** Epcylon has joined ##java[20:28:35] *** __simon__ has joined ##java[20:28:35] *** kab has joined ##java[20:28:35] *** heyqule has joined ##java[20:28:35] *** beol has joined ##java[20:28:35] *** dos000 has joined ##java[20:28:35] *** MigoMipo has joined ##java[20:28:35] *** SpeedyGhost has joined ##java[20:28:35] *** gengid has joined ##java[20:28:35] *** crowbar has joined ##java[20:28:35] *** trustin has joined ##java[20:28:35] *** drtroll has joined ##java[20:28:35] *** suiside has joined ##java[20:28:35] *** ozzloy has joined ##java[20:28:35] *** zeel has joined ##java[20:28:35] *** kshepherd has joined ##java[20:29:35] *** kab has quit IRC[20:32:27] *** M[]ssad has joined ##java[20:35:13] *** Sagi22 has quit IRC[20:35:56] *** blankthemuffin has quit IRC[20:39:29] *** tomvolek has quit IRC[20:40:32] <tieTYT2> re: ant. I've used a condition to set a property. How do I do something with it? I want to echo if the property is null[20:41:18] <cheeser> use <if> from ant-contrib[20:41:41] *** nihi|ist has quit IRC[20:41:59] <tieTYT2> wow, really?[20:41:59] *** nihi|ist has joined ##java[20:42:02] *** Rictoo has joined ##java[20:42:07] <tieTYT2> thanks a lot ant for providing half of something useful[20:42:27] <pfn> tieTYT2, you can use the properties in stuff like <fail>[20:42:30] <Rictoo> http://rafb.net/p/nFDpbs82.html <= this is the code, and the "Points" text sticks to the left, but I want it to be centered between the left and next separator.[20:42:39] <Rictoo> the other JLabels are centered fine.[20:42:43] <tieTYT2> i'd like to, then i wouldn't even need a condition[20:42:51] <Rictoo> This is Swing, if you haven't clicked.[20:43:15] <tieTYT2> this situation is just stupid. There's this property file that devs need in their conf folder but deployments don't have[20:43:38] <dmlloyd> tieTYT: using targets: <target name="thingThatSetsProperty"> ...set foo property... </target> then: <target name="echoMsg" depends="thingThatSetsProperty" unless="foo"> ....[20:43:38] <tieTYT2> and you get hard to debug errors if you miss it. But if I fail on error, it breaks the deploy for everyone but us[20:43:44] <dmlloyd> no extra libs necessary[20:43:58] <cheeser> tieTYT2: oh, i'm sorry. do you need someone to hold your hand, too? forgive me for thinking someone who's been here as long as you have had half a clue. but i've taken note: you're apparently a clueless newb who needs someone to wipe his nose.[20:44:19] *** DJGummikuh has quit IRC[20:44:31] <tieTYT2> cheeser: are you talking about my complaint over the extra lib?[20:44:38] <tieTYT2> cheeser: or something else I said[20:45:01] <tieTYT2> dmlloyd: thanks[20:45:22] <pfn> yeah, what dmlloyd says[20:45:22] <pfn> heh[20:45:31] <cheeser> tieTYT2: hahahaha. my apologies. i read that and thought you were busting *my* chops. excuse me while i go kick myself in the balls.[20:45:40] * cheeser <-- douche[20:45:40] <tieTYT2> enjoy[20:45:42] <Rictoo> Can soemone look at my code?[20:45:47] *** bindaas has joined ##java[20:46:06] <dmlloyd> cheeser: don't apologize! that's weakness![20:46:37] *** blankthemuffin has joined ##java[20:47:44] <cheeser> i'm going nuts over here[20:48:00] <tieTYT2> then i think you've kicked enough[20:49:12] <r0bby> cheeser: bad day?[20:49:29] <cheeser> having a hard time finding some mental traction.[20:49:59] * amnesiac smacks cheeser[20:50:16] *** Vicfred has joined ##java[20:51:51] *** tomvolek has joined ##java[20:51:57] *** mers has joined ##java[20:55:10] *** sphenxes has joined ##java[20:55:15] *** bindaas has quit IRC[20:55:21] *** __simon__ has quit IRC[20:57:47] <dos000> anyone here used jmockit ?[20:57:58] <waz> ~anyone[20:57:58] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.[20:58:15] <dos000> ok ...[20:58:58] <dos000> apparently jmockit wants all "mocked" methods to exist in the mock object ![20:59:09] <dos000> which sucks[21:00:03] <_W_> is there a question in there?[21:00:22] <dos000> more like an observation[21:00:38] <dos000> maybe there is a way to turn this behavior off ...[21:00:43] <mers> hi guys. is it possible to reference Maven project properties in Ant build files using IntelliJ IDEA? standard ${property} syntax isn't resolving them, not sure if i need to do something different[21:01:02] <dos000> sometimes it helps if you can just speak about your problem[21:01:34] *** BigAllan has joined ##java[21:01:47] <cheeser> ~~ mers make sense[21:01:48] <javabot> make: *** No rule to make target `sense'. Stop.[21:02:32] *** latebind has quit IRC[21:02:50] *** latebind has joined ##java[21:06:43] *** Copter has quit IRC[21:07:13] <svm_invictvs> man[21:07:24] <svm_invictvs> I wish I could forward X11 apps over the internet.[21:07:40] <waz> for a nice speedy ui[21:07:47] <svm_invictvs> yeah[21:07:49] *** supersako has quit IRC[21:07:54] <svm_invictvs> Sitting at home it works great.[21:08:13] <svm_invictvs> But I tried loading up eclipse over the internet and it was just...so...slow.[21:08:42] *** cybereal has joined ##java[21:08:46] <Luminari> svm_invictvs: can't you just create a local install of eclipse and version control?[21:08:56] <svm_invictvs> Luminari: yeah[21:09:16] *** LordMetroid has joined ##Java[21:10:05] <whaley> svm_invictvs: time for vnc, I'd reckon[21:10:18] <svm_invictvs> whaley: Yeah. Even VNC is slow as shit.[21:10:24] <waz> why run remote?[21:10:29] *** heyqule has quit IRC[21:10:33] <svm_invictvs> waz: So I work from home.[21:10:39] <waz> and....[21:10:52] <svm_invictvs> I don't wanna check out company code on my personal laptop.[21:11:11] <svm_invictvs> But they don't care if I SSH in and use vnc.[21:11:32] <waz> heh[21:11:32] <teralaser> what does your company make ? stealth-vira ?[21:11:50] <svm_invictvs> waz: at this point I'm just being nitpicky.[21:12:35] <waz> I can't imagine working running an editor remove[21:12:38] <waz> remote[21:12:39] <Luminari> svm_invictvs: you could map a remote network drive so the files never reside on your local machine, but run a local ide on them[21:12:41] <waz> well ide[21:12:54] *** Seldon75 has joined ##java[21:14:16] <blahjake> svm_invictvs: sshfs[21:14:43] <cheeser> you want him to be quiet, ffs?[21:14:48] <cheeser> P^)=[21:15:06] *** ebil|work has quit IRC[21:15:27] *** hrehf has quit IRC[21:15:52] *** hrehf has joined ##java[21:16:03] *** latebind has quit IRC[21:16:30] <dos000> svm_invictvs: use nx ... or freenx[21:17:44] <Seldon75> cheeser: heh[21:17:55] *** juc0 has joined ##java[21:17:57] <Seldon75> that was my first parse too[21:18:10] <svm_invictvs> cheeser: since when am I excessively talkative?[21:18:12] *** sjhd has joined ##java[21:18:14] *** ffgeek200b has quit IRC[21:18:32] <sjhd> is it possible to start hsqldb using maven?[21:18:47] <cybereal> yes[21:18:54] <ffgeek200> I'm sure this is impossible, but is there a way to see the # of threads waiting on an object lock?[21:19:00] <sjhd> I searched the net, but didn't find how[21:19:14] <cybereal> ffgeek200: through instrumentatio you can see exactly which threads are waiting and which have it and so on[21:19:35] <cybereal> sjhd: use your creative thinking and the index of plugins on the maven site to figure out the best way for you[21:19:44] <ffgeek200> cybereal, true, you mean by looking at the stacks. Good idea, I should use jstack!! sweet[21:19:52] <ffgeek200> forgot about that[21:20:23] <cybereal> ffgeek200: no... there's monitor inspection, if you used eclipse, for example, you can just turn it on in the debug view and then pause the whole process, or parts, or whatever, and it'll just display the status[21:20:43] <cybereal> the info is also used by jconsole to do deadlock searches[21:21:08] <ffgeek200> cybereal, nice. of course the problem only manifests when I load up the server so I don't have eclipse to work with, but it is possible[21:21:13] *** Bollinger has quit IRC[21:21:19] <cybereal> remote debug[21:21:22] <sjhd> cybereal, can't ya give a hint?[21:21:37] *** jbellis has joined ##java[21:21:40] <cybereal> sjhd: I already did, and you asked an almost completely useless question so I don't see how I could be more helpful[21:21:41] <ffgeek200> true, remote debug should do it, havent used that w/ eclipse but it should work nicely[21:21:48] *** Bollinger has joined ##java[21:21:56] <cybereal> it's pretty easy, you just create a runner under the remote category[21:22:02] <sjhd> cybereal, why is it useless?[21:22:05] <ffgeek200> ahh nice[21:22:07] <cybereal> and be sure to start the process with the right parameters[21:22:14] <cybereal> ~remote debug[21:22:14] <javabot> cybereal, I have no idea what remote debug is.[21:22:23] <cybereal> hmmmm there's a factoid with the parameters[21:22:35] <cheeser> ~remotedebug[21:22:36] <javabot> cheeser, I have no idea what remotedebug is.[21:22:39] <cheeser> ~debug[21:22:40] <javabot> cheeser, I have no idea what debug is.[21:22:42] <cheeser> javabot: you suck[21:22:43] <javabot> A tool is only as good as its user. Tool.[21:22:45] <sjhd> ~remote[21:22:46] <javabot> sjhd, remote is what you use to change channels on the TV[21:23:05] <cybereal> hm weird, I can never remember that factoid's name heh[21:23:05] <sjhd> ouch[21:23:09] *** blankthemuffin has quit IRC[21:23:18] *** blankthemuffin has joined ##java[21:23:30] *** SummerWO has left ##java[21:23:36] <ffgeek200> cybereal, whoa, remote application debuggin w eclipse, i've used it for years but it still amazes me how awesome eclipse is[21:23:54] <cybereal> sjhd: it's useless because you have not asked how to solve a problem, you've asked how to implement a solution, and the answer is a matter of tediously explaining how to use a particular tool which is boring and the information is available on their site[21:24:20] <cybereal> ~remote debugging[21:24:20] <javabot> cybereal, remote debugging is -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n[21:24:28] <cybereal> ~remote debug is <see>remote debugging[21:24:28] <javabot> Okay, cybereal.[21:24:34] <sjhd> proud to be a nerd I guess[21:24:35] <cybereal> ~remotedebug is <see>remote debugging[21:24:35] <javabot> Okay, cybereal.[21:24:45] *** EdwardIII has joined ##java[21:24:48] <cybereal> ffgeek200: there's the parameters you'll need to pass to the vm that you'll connect to[21:24:53] <cheeser> ~debug is <see>remote debugging[21:24:53] <javabot> Okay, cheeser.[21:24:55] <cybereal> or at least, one example of them[21:25:11] <Seldon75> this may seem like a naiive question, but should I expect Jetty, embedded in my application to serve up large files at a significantly slower bitrate than Tomcat running stand-alone?[21:25:22] <cybereal> no[21:25:32] <Seldon75> so it's down to how I'm using Jetty?[21:25:40] <cybereal> possibly[21:25:51] <Seldon75> any other thoughts?[21:26:01] <cybereal> how are you serving the file?[21:26:09] <cybereal> the default handler from jetty or one of your own made up servlets?[21:27:04] <Seldon75> the default handler from Jetty -BUT I have a request interceptor 'over the top' of it that does *minimal* processing[21:27:39] <cybereal> request interceptor?[21:27:42] <cybereal> a filter?[21:28:05] <cybereal> or are you taking a request then redirecting or something?[21:28:13] <Seldon75> yes redirecting[21:28:17] *** jbellis has left ##java[21:29:22] *** dmead has quit IRC[21:29:36] <EdwardIII> why do java applications always seem to run really slow in windows compared to other VM stuff like .NET?[21:29:42] <Seldon75> so, if I understand correctly, this redirect operation only gets executed when the initial request comes in[21:29:57] <Seldon75> so for large files the impact should be unnoticable[21:30:06] <Seldon75> and it wouldnt affect average throughput[21:30:40] *** MIR100 has quit IRC[21:30:49] <cybereal> Seldon75: when it boils down to it, I don't think you should have a noticeable difference in throughput, the only plausible explanation I can think of is that jetty is buffering differently[21:30:55] <cybereal> reading and writing less at a time maybe[21:30:59] <repnop> EdwardIII: only reason you come here is to troll?[21:31:15] <Seldon75> cybereal: I see thanks for that I'll find out whether that's something I can tweak[21:31:18] <cybereal> Seldon75: it's not as though tomcat has a magic touch over java that other code doesn't have hehe[21:31:40] <cybereal> well if you have to you could always make your own servlet to serve up a file with full control over such things I guess[21:31:46] *** floe has quit IRC[21:32:11] <EdwardIII> repnop: nup just a general question, i'm interested and i'd also know if there's a way to make it run faster[21:32:19] <cybereal> Seldon75: oh here's something maybe you're doing that you want to stop[21:32:31] <EdwardIII> i'm also looking into the very early stages of java 'cos i'm interested in putting together some basic apps on my phone[21:32:33] <repnop> ~~ EdwardIII igb[21:32:34] <javabot> Is google broken?[21:32:37] <cybereal> Seldon75: are you comparing these times where tomcat is run normal standalone but jetty is embedded in a process run by the IDE in debug mode?[21:32:53] <cybereal> because that can make a huge difference[21:33:53] <cybereal> EdwardIII: in my experience java apps run faster than comparable .NET apps, and I work in a shop where we write the same library in java and .net so I have a real basis for comparison, not just perception[21:33:55] <Seldon75> cybereal: no I'm not but thanks for trying[21:34:06] *** sjhd has left ##java[21:34:19] *** ScottG489 has joined ##java[21:34:37] <EdwardIII> cybereal: interesting - what kind of stuff do you do?[21:35:18] <[pwgr]> ok, JPA generics help[21:35:22] <cybereal> message-oriented middleware, horizontal and vertical integration "after the fact" for school data systems (like info systems, lunch room management software, library software, etc.)[21:35:25] <[pwgr]> i'm in need of it[21:35:46] <[pwgr]> Page returnedPage = (Page)query.getSingleResult();[21:35:52] <cybereal> EdwardIII: basically the hot spots in this software is xml processing and large scale data translation[21:35:57] <[pwgr]> is there a way to do that using generics syntax? and avoiding the cast ?[21:36:11] <cybereal> EdwardIII: things that you can actually benchmark :)[21:36:13] <cheeser> [pwgr]: no[21:36:16] <EdwardIII> hrm - my main experience is with desktop apps like TVersity[21:36:19] *** goan has joined ##java[21:36:23] <[pwgr]> ok thanks :/[21:36:34] <cybereal> tversity does almost all of its hard work with native code[21:36:55] *** goan has left ##java[21:36:58] <cybereal> you could do the same thing in java with JNI if you really wanted, though it's not as automatica as .NET's access to directshow and such[21:36:58] <[pwgr]> @SuppressWarnings("unchecked")[21:37:22] *** ekontsevoy has joined ##java[21:37:41] <cheeser> [pwgr]: the problem is that since you don't create the Query, you can't specify the generic types[21:37:42] *** le_biloute has quit IRC[21:38:05] <ekontsevoy> I don't do much Java but I have a system question: if one is running two separate Java programs and they share same jar libraries, how many copies of those libs will be present in RAM?[21:38:20] <cheeser> 2[21:38:21] <[pwgr]> cheeser: the entity manager creates the query ?[21:38:25] <EdwardIII> cybereal: i didn't realise that[21:38:28] <cheeser> [pwgr]: yeah[21:38:29] <[pwgr]> when I say createNamedQuery()[21:38:35] <ekontsevoy> cheeser: thanks... That's what I was afraid of.[21:39:04] <[pwgr]> grrr[21:39:26] <[pwgr]> in toplink native api you can tell it what class or classes it's dealing with the whole way through the query building process :/[21:39:44] <[pwgr]> and EntityManager.find takes a class param[21:39:46] <cybereal> EdwardIII: anyway if you're thinking of doing j2me dev for phones, it's a totally different world, with far less respectable libraries and performance/behavior expectations :)[21:39:51] <[pwgr]> but not so for queries :/[21:40:01] <EdwardIII> heh yeah i'm sure it's a crock cybereal, that's just a question i've always wondered about[21:40:22] *** ekontsevoy has quit IRC[21:40:36] <cybereal> ekontsevoy: on windows, one, on other platforms, two, potentially fewer depending on the usage scenario[21:40:46] <cybereal> heh[21:41:32] *** RLa has joined ##java[21:42:03] <EdwardIII> what IDE do you use for java, cybereal?[21:42:10] <cybereal> EdwardIII: the benefit of having java for mobile dev is basically the language is well known and easy to work with, but the vm's often fail to do proper gc and things like that so you kind of have to target devices or at least device classes more specifically than is ideal. Though if you're talking like... Android or Sidekicks it's a totally different situation, they have more complete implementations. Ultimately overall it's just a crapshoot, so beware t[21:42:32] <cybereal> EdwardIII: eclipse, i've toyed with eclipse netbeans and idea, I like idea and eclipse, but I like not paying more so I stick with eclipse.[21:42:35] <EdwardIII> i'm talking blackberry[21:42:48] <cybereal> I've never worked with java on blackberry so I can't speak to that platform[21:43:18] * cybereal wanders off to a meeting[21:44:17] <EdwardIII> well blackberry have their own java library and even IDE i think, but it also supports MIDP2 which i guess is more generic[21:44:28] *** goan has joined ##java[21:44:43] *** bitshuffler has quit IRC[21:45:26] <svm_invictvs> EdwardIII: They have their own sdk, and j2me support is done using a special compiler which converts the j2me bytecode to their code.[21:45:40] <EdwardIII> svm_invictvs: sounds nasty[21:45:50] *** slonkko has quit IRC[21:45:58] <EdwardIII> i guess this means i'm never going to be able to compile blackberry apps in linux too?[21:46:04] *** n3llyb0y has quit IRC[21:46:20] *** thecarlhall has joined ##java[21:46:56] *** monkeycid has quit IRC[21:47:16] <svm_invictvs> EdwardIII: what?[21:47:38] <svm_invictvs> EdwardIII: Oh, yeah, you need a windows box to do the final step of converting your jar to RIM code.[21:48:34] <EdwardIII> hrm ok... what IDE do you use for java, svm_invictvs?[21:48:45] <goan> Hi. I am trying to build an online calendar based on a java servlet, which creates an xml document (calendar) file and applies an xsl stylesheet onto the xml document. The client retrieves the html form in a browser and upon clicking various links on the html form, he/she can continue navigating the calendar.[21:48:49] *** Rictoo has quit IRC[21:48:53] *** epalm has quit IRC[21:49:15] *** Luminari has left ##java[21:49:21] <goan> I have deployed a sample servlet but I am not sure how to post the html on the client side[21:49:25] *** epalm has joined ##java[21:49:36] <goan> ^to the client side[21:50:33] *** shadewind has joined ##java[21:50:51] *** warriorforgod has quit IRC[21:51:28] *** monkeycid has joined ##java[21:51:30] *** MigoMipo has quit IRC[21:51:40] *** prgrmr has joined ##java[21:53:34] <goan> anyone?[21:53:55] <EdwardIII> er goan .... i don't know anything about this, but is 'apache + tomcat' a dumb answer?[21:54:23] <goan> EdwardIII, I am using winstone as I just need a servlet container[21:54:28] *** zophy has quit IRC[21:54:37] <EdwardIII> i guess 'yes' then heh[21:56:15] *** shervin_a has quit IRC[21:56:39] *** akintayo has left ##java[22:01:01] *** linnuxxy has joined ##java[22:01:06] <linnuxxy> is there a java runtime environment (JRE) for ARM linux?[22:01:38] <cheeser> if it's not on sun's site or blackdown.org, probably not[22:01:48] <cheeser> ~~ linnuxxy google java ARM linux[22:01:48] <javabot> http://letmegooglethatforyou.com/?q=java+ARM+linux[22:03:11] *** le_biloute has joined ##java[22:03:15] <EdwardIII> heh i always thought that URL was a joke, but no, it's real[22:03:45] *** indeterminatus has quit IRC[22:04:49] <r0bby> EdwardIII: it's revolutionary[22:05:22] <teralaser> oh they made a livestream of searches :)[22:05:48] <EdwardIII> i'll be using that at work tomorrow[22:06:42] <teralaser> "periodic beach towel" , hm some chemistry chicks heard about lmgtfy too :)[22:06:52] <teralaser> +system ... *sigh*[22:07:17] <svm_invictvs> EdwardIII: At the risk of sounding like a tool, Eclipse.[22:08:19] *** le_biloute has quit IRC[22:08:28] <whaley> ~tool svm_invictvs[22:08:28] <javabot> A tool is only as good as its user. Tool.[22:08:49] *** ionine_ has joined ##java[22:08:49] *** ChanServ sets mode: +b *!*n=ionine@*.dyn.optonline.net[22:08:49] *** ionine_ was kicked by ChanServ (Banned: seriously. just stfu.)[22:09:04] <EdwardIII> svm_invictvs: , why would that be toolish?[22:09:09] *** Varox has quit IRC[22:09:19] <svm_invictvs> EdwardIII: because everybody in here pretty much dislikes eclipse[22:09:20] <svm_invictvs> ~eclipse[22:09:20] <javabot> svm_invictvs, eclipse is an open-source IDE for Java and a number of other languages. See http://www.eclipse.org/ . It's the most used java IDE, and it's free. Some people in ##java use in Eclipse, but questions regarding it would best be answered in #eclipse. Also ask me about IDEs for alternatives.[22:09:28] <EdwardIII> you know... that's the first time in a long time i've seen a +b on freenode[22:09:32] <svm_invictvs> ~idea[22:09:33] <javabot> svm_invictvs, idea is a non-free (as in beer, as in speech) IDE held in high regard by ##java - and by most professional programmers. See http://www.intellij.com/idea . It's worth every penny - and it's also free for participating open source projects.[22:09:47] <EdwardIII> javabot: tell me about ides[22:09:47] <javabot> EdwardIII, I have no idea what ides is.[22:09:52] <EdwardIII> javabot: tell me about ide[22:09:52] <javabot> EdwardIII, ide is Integrated Development Environment, see IDEA, Eclipse or Netbeans. You don't *need* an IDE to use Java, but it helps. Everyone and their brother has an opinion on which is best, but please try them all out and decide for yourself.[22:09:57] <svm_invictvs> cheeser: why not just permaban the guy?[22:10:03] <cheeser> which guy?[22:10:13] <cheeser> ionine? he is.[22:10:16] <svm_invictvs> ionine[22:10:17] <svm_invictvs> oh[22:10:26] <svm_invictvs> Chanserv did it, I see.[22:10:28] <cheeser> notice that I didn't kick him[22:10:29] <cheeser> yeah[22:10:33] <EdwardIII> what did he do?[22:10:41] <cheeser> EdwardIII: i don't even remember now[22:10:43] <svm_invictvs> EdwardIII: There's a few people who are just dickheads.[22:10:48] <cheeser> ~seen ionine_[22:10:50] <javabot> cheeser, ionine_ was last seen at 2/10/09 4:09 PM with the following entry: :ool-18b89a63.dyn.optonline.net joined the channel[22:10:52] <EdwardIII> heh dickheads on IRC? surely not[22:10:53] <cheeser> heh[22:11:00] <cheeser> it might still be in the logs.[22:11:08] *** Varox has joined ##java[22:11:09] <EdwardIII> i think freenode is great though, a really excellent resource[22:11:09] <svm_invictvs> Was the the guy who was making comments about Miley Cyrus[22:11:35] <EdwardIII> on the whole i think it strikes an excellent balance between smart questions and actually wanting to help people (with only a few naughty exceptions)[22:12:35] <svm_invictvs> throw new NaughtyException()[22:12:41] <EdwardIII> heh[22:13:16] <svm_invictvs> cheeser has come close to permabanning me before, iirc[22:13:16] *** le_biloute has joined ##java[22:13:30] *** le_biloute has quit IRC[22:13:48] *** ahnfelt has joined ##java[22:14:01] *** ahnfelt has left ##java[22:14:06] *** ahnfelt has joined ##java[22:14:16] <EdwardIII> have you guys all read the gang of four book?[22:14:29] <cheeser> i haven't. i've read parts of it, though.[22:14:35] <ahnfelt> me too[22:14:37] <cheeser> tidbits here and there[22:14:47] <EdwardIII> own a copy?[22:14:50] <cheeser> nope[22:15:08] <cheeser> i have vol 1 of TAOCP, though. haven't read that one either.[22:15:09] <cheeser> 8^)=[22:15:14] <_W_> it's elevating the monitor of one of my coworkers at work[22:15:25] *** le_biloute has joined ##java[22:15:28] <EdwardIII> heh[22:15:33] <ahnfelt> yeah[22:15:43] *** tkr has quit IRC[22:15:46] <ahnfelt> I have a question about evaluation order[22:15:55] <ahnfelt> foo(x()).bar(y())[22:16:16] <ahnfelt> is y() guarenteed to execute after foo(x())?[22:16:24] <cheeser> yes[22:16:42] <cheeser> x(), foo(), y(), bar()[22:16:55] <cheeser> left -> right, inside->out[22:17:00] <ahnfelt> Oh[22:17:02] <ahnfelt> thank you :)[22:19:20] *** BigAllan has quit IRC[22:19:25] *** smackdab has joined ##java[22:20:05] *** RLa has quit IRC[22:20:45] *** chopin has joined ##java[22:21:00] <chopin> how can i convert List<String> to String[]?[22:21:19] <_W_> ~~chopin javadoc List[22:21:22] <chopin> (String[])List<String>.toArray() ...?[22:21:26] <javabot> chopin: http://is.gd/j5sq [java.awt.List]; http://is.gd/j5sr [java.util.List][22:21:50] <_W_> toArray comes in two flavours - try using the other one[22:21:53] <svm_invictvs> It's kind of funny...[22:22:03] <svm_invictvs> As much as those guys talked about patterns in their book...[22:22:15] <svm_invictvs> THey never actually produced the program they set out to create.[22:22:19] <chopin> _W_: ah, gots it[22:22:24] <ahnfelt> myList.toArray(new String[myList.size()])[22:22:36] <ahnfelt> or is there a better way[22:23:12] <_W_> yes[22:23:18] <_W_> actually read the documentation, please?[22:23:38] <Seldon75> B^)=[22:23:49] <chopin> ah hah! thx ahnfelt[22:24:05] <ahnfelt> wait[22:24:09] <chopin> hahahaha[22:24:10] *** ankylose has quit IRC[22:24:12] <chopin> i'm trying a few diferent ways[22:24:26] <chopin> (T[] a) is unfamiliar to me[22:24:39] <ahnfelt> casting... don't wanna do that[22:25:00] <chopin> right, no ... in the javadoc, List.toArray(T[] a)[22:25:11] *** ankylose has joined ##java[22:25:13] *** Pupeno has quit IRC[22:25:17] <ahnfelt> oh, well duh ;-)[22:25:37] <_W_> ~~chopin generics[22:25:37] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics[22:25:49] <ahnfelt> would be neat with mylist.toTypesafeArrayWithoutMakingMeWorkForItPrettyPlease();[22:26:52] <_W_> erasure to the resqu... err... to the foiling![22:27:38] *** sebr_afk is now known as sebr[22:27:59] <dos000> how does one trap when a webapp in tomcat is about to be deployed/undeployed ?[22:28:10] <cheeser> context listeners[22:28:17] <dos000> ah![22:28:26] <blahjake> ahnfelt: you could probably cheat toArray by keeping a reference to the array you pass in, it promises to return that same one if the size is right[22:28:39] <blahjake> ahnfelt: but you might as well cast and be done with it[22:28:44] <ahnfelt> Hmm, wouldn't List<T>: T[] getArray() { return toArray(new T[size()]); } do?[22:28:46] <svm_invictvs> Hm[22:29:00] <svm_invictvs> Is it possible to iterate over all of the attributes of an element with JAXB?[22:29:05] <cheeser> toArray() returns an Object[][22:29:05] *** vix85 has quit IRC[22:29:09] <_W_> ahnfelt, can't do new on a generic type[22:29:27] <_W_> or even an array of a generic type[22:29:30] <cheeser> now, if constructors were class members you *could*[22:29:49] <svm_invictvs> cheeser: heh...[22:29:52] <_W_> they'll fix generics in Java 10 anyway[22:30:00] <ahnfelt> riiiight[22:30:13] *** tomvolek has quit IRC[22:30:40] <ahnfelt> ah[22:31:04] <ahnfelt> but anyway, then[22:31:14] <EdwardIII> does class members refer to anything which is inside a class e.g. private variables, methods, properties etc?[22:31:26] <ahnfelt> List<T>: T[] getArray() { return T[] toArray(new Object[size()]); }[22:31:35] <svm_invictvs> anyone, anyone...[22:31:43] <svm_invictvs> Voodoo Economics[22:31:59] <EdwardIII> C# looks a ton like Java (we use c#.net at work as part of asp.net and for small desktop apps)[22:32:20] <cheeser> EdwardIII: funny how that worked out.[22:32:24] <Seldon75> svm_invictvs: something d-o-o economics[22:32:28] <svm_invictvs> heh[22:32:35] <svm_invictvs> Bueller, Bueller...[22:32:43] <Seldon75> uh, he's sick[22:32:44] <EdwardIII> cheeser: .........theft!?[22:33:43] <cheeser> well, c# came out not too long after sun's suit against MS was settled[22:33:47] <Sou|cutter> Hey, this is just a sanity-check, because the Random javadocs aren't clear (but Math.random()'s javadoc makes some mention of it). Is an instance of Random threadsafe once initialized?[22:34:26] <cheeser> if it doesn't say, assume no[22:34:48] *** ScottG489 has quit IRC[22:34:55] <dos000> cheeser: are you allowed to have multiple <listener-class> in the web-xml ?[22:35:07] <cheeser> sure[22:35:08] <Sou|cutter> cheeser: :( indeed[22:35:14] <cheeser> check the xsd to be sure, though.[22:35:20] <dos000> ok[22:35:23] <dos000> thanks man[22:35:50] <svm_invictvs> Sou|cutter: Evidently in >=1.5 it is thread safe but not documented so.[22:36:04] *** pstickne has joined ##java[22:36:13] <Sou|cutter> svm_invictvs: hrm, they should really document that[22:36:54] <EdwardIII> hrm cheeser surely that means MS would be cautious about ripping Sun's language off? or am i missing the point?[22:36:54] <svm_invictvs> Sou|cutter: From a post I read. I don't know how accurate it is.[22:37:11] <svm_invictvs> EdwardIII: When have they ever been cautious about ripping anything off?[22:37:17] *** pstickne has quit IRC[22:37:37] <teralaser> heh[22:37:39] <EdwardIII> svm_invictvs: i just mean i don't see how it pertains to the Sun/MS trial[22:37:51] *** narcoclepsy has left ##java[22:38:01] *** Seldon75 has quit IRC[22:38:13] <svm_invictvs> EdwardIII: The lawsuit wasn't about ripping off the language.[22:38:36] <EdwardIII> svm_invictvs: it was about the MS VM right?[22:39:00] <svm_invictvs> EdwardIII: MS made their own implementation of the JVM embedded into windows. But they added MS specific extensions which made for non-portable java code. Sun didn't like that.[22:39:34] <tieTYT2> i always thought groovy was a ruby impl. I didn't know it was its own language[22:39:43] *** chopin has left ##java[22:39:57] <EdwardIII> svm_invictvs: i still fail to see what that has to do with the similarity between Java and C#? but i'm fairly ignorant about all this[22:40:00] <Sou|cutter> svm_invictvs: Looking at the java source, it uses an AtomicLong for the seed, but two threads calling it at the same time might get back the same number... I'm not sure (going to write a quick test)[22:40:18] <blahjake> EdwardIII: the implication is that they said 'fine, we'll make our own then'[22:40:46] *** mitchnull has quit IRC[22:41:21] <svm_invictvs> FINE! I'll write my own VM. With Blackjack. And Hookers.[22:41:35] *** dfas has quit IRC[22:41:46] <cheeser> don't forget the blow[22:41:47] <svm_invictvs> ~bender[22:41:47] <javabot> Bite my shiny metal ass![22:41:53] <svm_invictvs> ~be bender[22:41:54] <javabot> Bite my shiny metal ass![22:41:56] *** eduardoboss has quit IRC[22:41:57] <svm_invictvs> lol[22:42:00] <camilojd> interactive JRuby is amazing[22:42:51] * camilojd waves the channel[22:43:01] *** House|AFK is now known as DrHouse__[22:43:02] <svm_invictvs> blah, jaxb[22:43:21] <svm_invictvs> DrHouse__: heh[22:44:20] *** timte has quit IRC[22:45:31] <EdwardIII> heh blahjak, cheeser yes i suppose that makes sense[22:45:40] * svm_invictvs curses at JAXB[22:45:41] <DrHouse__> svm_invictvs hello[22:45:53] *** ciaron has joined ##java[22:46:36] *** Blaay has quit IRC[22:46:59] *** gfather has quit IRC[22:48:05] <EdwardIII> a friend of mine sent me a doc outling some of his rules for developing bespoke client software. he said he plans to use ODBC as a DB layer for increased portability and will probably start with sqlite... what do you guys think about that?[22:48:43] <EdwardIII> my first thoughts were that you should probably handle DB portability in your application rather than relying on something like ODBC where all sorts of unknown driver conficts/unmet requirements could occur plus you're getting some unknown overhead[22:49:18] <Sou|cutter> svm_invictvs: hmm seems threadsafe, I guess[22:50:36] <svm_invictvs> To be truly pedantic I guess you could say that you cant' be 100% sure your java implementation is provided by Sun.[22:51:04] *** OsAC has joined ##java[22:51:42] <camilojd> why would someone use the JDBC-ODBC bridge instead of native Java drivers (supossing there IS a native driver)[22:51:44] <cheeser> EdwardIII: he's going to use ODBC in a java program?[22:51:52] <cheeser> camilojd: for just that reason[22:52:20] <EdwardIII> there's a native driver for sqlite, right?[22:52:48] <EdwardIII> he just thinks it's going to make it super easy to implement dbms changes[22:53:14] <camilojd> I believe is far better to avoid ODBC when possible[22:53:28] <svm_invictvs> *shrug*[22:53:42] * EdwardIII shrugs also[22:53:58] *** tyler_d has joined ##java[22:54:20] <cybereal> camilojd: they'd do it out of desperation because surely they would know that the jdbc-odbc driver is strictly provided for testing purposes[22:54:21] *** jonaslund has quit IRC[22:54:42] *** Vicfred has quit IRC[22:54:42] <camilojd> cybereal, yeah that sounds right to me[22:54:44] <tyler_d> we are getting random errors within a server: java.io.IOException: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full[22:54:44] <tyler_d> this is occuring on a windows 2003 box with 8gb of ram... unable to find anything in google[22:55:00] <tyler_d> hoping someone might have some insight please?[22:55:06] <cybereal> camilojd: it's very slow and not officially supported as a production tool[22:55:13] <camilojd> EdwardIII: just be practical, which backends are you going to support? which one of them HAS NOT a Java native JDBC driver?[22:55:21] <EdwardIII> well it was a theoretical question, i was interested in what you guys would think - he's actually developing in C++ (don't +b please heh)[22:55:29] <svm_invictvs> I dont' know what you woudl change in windows, but I think that would involve adjusting the ulimits[22:55:30] *** TryNiX has joined ##java[22:55:33] <svm_invictvs> tyler_d:[22:55:40] <cheeser> tyler_d: clearly a buffer is filling up[22:55:55] *** Woot4Moo has quit IRC[22:56:01] *** ciaron has quit IRC[22:56:21] <TryNiX> is there a minimum fibre optic connection speed =p[22:56:49] <camilojd> I don't do C++ but I heard from a lot of people that ODBC is probably the most complex and clunky solution[22:57:16] <tyler_d> investigating now[22:57:19] <svm_invictvs> tyler_d: There may be a system property you can set to mak ethe buffer bigger.[22:57:26] <svm_invictvs> java -Dproperty=foo[22:57:27] <camilojd> but... is also the one of the oldest ones and their gotchas are well known, too[22:57:28] <svm_invictvs> Or something[22:58:05] *** NukaCola has quit IRC[22:59:06] *** Junior has quit IRC[22:59:30] <EdwardIII> that sounds pretty likely camilojd[23:01:55] *** ciaron has joined ##java[23:02:05] *** ilaggoodly has joined ##java[23:02:38] *** BigAllan has joined ##java[23:04:33] <tyler_d> anyone know how the buffer would be increased?[23:04:43] *** bas-i has quit IRC[23:04:59] <TryNiX> hmm, with a bandwidth of 1000 kbit/s and propagation delay of 0.008ms , how many networks are capable of such stats.... fibre optic and copper only?[23:06:04] <cheeser> ~~ TryNiX igb[23:06:04] <javabot> Is google broken?[23:06:44] *** _acid__ has quit IRC[23:07:17] *** ankylose has quit IRC[23:07:44] *** jvv has joined ##java[23:08:03] <TryNiX> cheeser, I am fully utilizing google, I eliminated satellite connections due to them having higher propagation delay, but not sure about short range wireless connections[23:08:10] *** omaru has quit IRC[23:08:16] <cheeser> TryNiX: sounds awesome. but it's not a java question.[23:08:43] <TryNiX> indeed, didn't know where else to find smart people to ask a networks question[23:08:51] <EdwardIII> tried #networking ?[23:08:54] *** ankylose has joined ##java[23:09:22] <TryNiX> didn't know it existed! went to network and networks which were empty[23:09:24] <TryNiX> thanks alot :)[23:11:05] *** Seldon75 has joined ##java[23:11:15] *** bas-i has joined ##java[23:11:23] <dos000> when doing junit tests .. how does one starts omcat 5/6 programatically ?[23:11:29] <EdwardIII> no problem[23:11:46] <cheeser> ~~ dos000 tomcat 6 embedded[23:11:46] <javabot> dos000, I have no idea what tomcat 6 embedded is.[23:11:52] <cheeser> ~~ dos000 google tomcat 6 embedded[23:11:52] <javabot> http://letmegooglethatforyou.com/?q=tomcat+6+embedded[23:12:00] *** ankylose has quit IRC[23:12:04] <Seldon75> dos000: you might be better off installing Tomcat as a service and starting the service[23:12:49] <r0bby> or using something like httpunit[23:13:41] *** ankylose has joined ##java[23:13:47] <jvv> could someone help me with jsf navigation in netbeans ?[23:13:54] *** ScottG489 has joined ##java[23:14:00] <Seldon75> cybereal: using the plain Jetty example at http://docs.codehaus.org/display/JETTY/Newbie+Guide+to+Jetty (File Server, One Handler) I'm seeing 25% of the throughput speed of Tomcat for file transfer[23:14:21] <Seldon75> any other ideas[23:14:59] <cheeser> jvv: ##jsf probably could[23:15:18] *** nixblicker has quit IRC[23:15:37] <jvv> @cheeser: something like #networks ?[23:15:43] <dos000> cheeser ... wonder if you can help here. i want to start tomcat from a java app. and then deploy a dependent web project. I am using eclipse for my development.[23:15:56] <cheeser> jvv: something like ##jsf[23:16:08] <jvv> oh it actually exists ;][23:16:14] <cheeser> ~ dos000 google tomcat 6 embedded[23:16:15] <javabot> cheeser, I have no idea what dos000 google tomcat 6 embedded is.[23:16:21] <cheeser> ~~ dos000 google tomcat 6 embedded[23:16:21] <javabot> http://letmegooglethatforyou.com/?q=tomcat+6+embedded[23:16:30] <cheeser> jvv: i don't intentionally mislead people until they've earned it[23:16:31] <Seldon75> B^)=[23:16:31] <cheeser> 8^)=[23:16:32] <r0bby> dos000: use httpunit[23:16:39] <r0bby> ~~ dos000 httpunit[23:16:39] <javabot> dos000, httpunit is an automated testing framework for your web applications. See http://httpunit.sourceforge.net/ for more information.[23:16:53] <r0bby> it's designed specifically for this[23:16:55] <cheeser> r0bby: that has nothing to do with starting tomcat programmatically[23:16:59] <r0bby> true.[23:17:13] <r0bby> but I'm under the assumption, I know Ass, U, Me etc[23:17:16] <cheeser> no, it's designed to interact with http requests. tomcat isn't even a concern.[23:17:21] <r0bby> that he's unit testing[23:17:29] <r0bby> ah[23:17:30] <r0bby> yes[23:17:35] <cheeser> he is. but he's asking a question that you're not answering.[23:18:02] *** convivial has quit IRC[23:18:07] <r0bby> httpunit could very well eliminate this portion of his problem, but whatever nevermind[23:18:17] *** smackdab has quit IRC[23:18:25] <tieTYT2> i think there's also a htmlunit[23:18:34] <r0bby> huh?[23:18:39] <tieTYT2> i forget which one i like[23:18:47] <jvv> @cheeser: ok... nobody answers on #jsf... maybe you could help me ? it's a simple one[23:18:55] <tieTYT2> ~ask toa sk[23:18:55] <javabot> toa sk, just ask the question. If nobody can answer, nobody will answer![23:19:13] <tieTYT2> hm, that works[23:19:57] <cheeser> jvv: i don't use jsf or netbeans[23:20:18] <cheeser> r0bby: httpunit needs a server to talk to.[23:20:22] <tieTYT2> jvv: can you ask your question in the form of wicket?[23:20:26] <cheeser> one like, say, tomcat[23:20:30] *** BigAllan has quit IRC[23:20:44] *** jdolan_ has quit IRC[23:21:02] <r0bby> nevermind[23:21:03] *** genesiss has quit IRC[23:21:13] * r0bby moron[23:21:33] <tieTYT2> i wonder if cheeser knew that off the top of his head or he just researched it to find holes in what r0bby says[23:22:02] <r0bby> you could mock up the request and response -- i never got it to work right[23:22:24] <Seldon75> yeah! take that, toa sk![23:22:25] <cheeser> tieTYT2: i've used both httpunit and htmlunit[23:22:33] <tieTYT2> ah i see[23:22:58] <r0bby> am I wrong in that assertion? That you COULD mock up the request?[23:22:59] <tieTYT2> i've used one of them but even if i knew both i wouldn't remember those details off the top of my head[23:23:23] <tieTYT2> r0bby: i think it's hard[23:23:50] <tieTYT2> but I don't see why you couldn't do it with jmockit[23:23:54] <r0bby> it is insanely difficult :/ -- i think i wound up testing with a running tomcat instance[23:23:55] <cheeser> r0bby: you could yes, but that'd still doesn't answer his question. and you'd need to write buttloads of code to mock up the request.[23:23:59] *** Vantaa has quit IRC[23:24:10] <Seldon75> you'd also have to emulate a browser[23:24:11] <cheeser> personally, i'd just use jetty but he might need tomcat specifically[23:24:14] <Seldon75> including handing ajax[23:24:26] <cheeser> Seldon75: that's that httpunit/htmlunit are for[23:24:34] <Seldon75> they do that?[23:24:36] <Seldon75> gee[23:24:38] *** BigAllan has joined ##java[23:24:39] <cheeser> sort of[23:24:43] <Seldon75> hrmm[23:24:54] <cheeser> all you really need is something to maintain the page dom[23:25:06] <ahnfelt> hmm[23:25:07] <Seldon75> I assumed they'd choke on JS[23:25:14] *** Ivellina has quit IRC[23:25:15] *** Yustme has quit IRC[23:25:37] <Seldon75> so many things are still browser-dependent unfortunately[23:25:42] <r0bby> I test my JS manually :x[23:25:53] <ahnfelt> if I want to specify that a generic type T implements both A and B, how do I do?[23:26:02] <ahnfelt> <T extends A, B> is wrong[23:26:19] *** SwanR has joined ##java[23:26:23] <ahnfelt> (A and B are out of my control and do not extend each other)[23:26:40] <SwanR> Hello, with java webstart is it possible to access even a temp directory on the harddisk ?[23:27:02] <ahnfelt> I'd like something to the effect of <T extends A and also extends B>[23:27:07] *** crowbar has quit IRC[23:27:22] *** MacFlecknoe has quit IRC[23:28:38] <cheeser> SwanR: yes[23:29:04] <dmlloyd> ahnfelt: <T extends A & B>[23:29:13] <dmlloyd> ahnfelt: but it might not be as useful as you think :)[23:29:40] <dmlloyd> ahnfelt: when you specify multiple types, the first one in the list is the one that gets erased to[23:29:56] <ahnfelt> Hmm, but it will still type check it right?[23:30:05] <dmlloyd> as much as any generic type[23:30:05] <SwanR> @cheeser: thanks. i was actually wondering something else - ive used a web launch program, itchycats ... its a download program ... somehow it manages to save downloaded files to the harddrive , is this not going against the rules of web launch ?[23:30:18] <Ragnor> And all but the first must be interfaces.[23:30:30] <r0bby> SwanR: it probably signs the app.[23:30:40] <ahnfelt> good[23:30:44] <SwanR> r0bby: oh ok[23:30:45] <dmlloyd> ahnfelt: for example, if you've got an object you want to cast to T, you still want to use a Class<? extends T> instance's .cast() method[23:30:46] <ahnfelt> however[23:31:35] <ahnfelt> well, here's the deal - I have a generic type T and I'd like to ensure that for one of the methods, it's a subtype of Number[23:31:45] <ahnfelt> public <N extends T & Number> Query isGreater(N value) {[23:31:58] <dmlloyd> I'm not sure if that will work[23:32:15] <dmlloyd> maybe it will, I don't know[23:32:17] <ahnfelt> But it says: a type variable may not be followed by other bounds[23:32:25] *** staykov has quit IRC[23:32:30] <dmlloyd> ah, then all bounds must be required to be concrete[23:33:04] <ahnfelt> well I *can* have <N extends T>[23:33:10] <ahnfelt> and also <N extends Number>[23:33:12] <dmlloyd> what are you looking to achieve? some compile-time checking that a method only works if T extends Number?[23:33:13] <ahnfelt> but not both :([23:33:25] <ahnfelt> Yes[23:33:32] <ahnfelt> but other methods in the class does not require this[23:33:49] <dmlloyd> then perhaps you should have more than one class[23:33:54] <dmlloyd> I think you have a design error[23:34:13] *** romanb has quit IRC[23:34:17] <ahnfelt> hmm[23:34:30] <Ragnor> ahnfelt: Number is a *class*, not an *interface*. Therefore the compiler rejects it.[23:34:40] <dmlloyd> Ragnor: no, it's not because class vs interface[23:34:57] <Ragnor> You sure?[23:35:03] <dmlloyd> yeah, pretty sure[23:35:03] <ahnfelt> and <N extends Number> works[23:35:17] <dmlloyd> it's because you can't mix type vars and types in a bounds list[23:35:32] <ahnfelt> I wonder what the reason for that is[23:35:45] <dmlloyd> ahnfelt: maybe you could do Number & T rather than T & Number, but I wouldn't hold my breath[23:35:49] *** staykov has joined ##java[23:35:55] <Ragnor> What I want to explain is: in ampersand(sp?) types, you cannot use *classes* except in the first place.[23:36:25] <Ragnor> Means: <T extends class & interface & interface>[23:36:50] <ahnfelt> ahhh[23:37:18] <ahnfelt> but <N extends Number & T> gives me another error[23:37:29] <ahnfelt> unexpected type[23:37:40] <Ragnor> Yes: T prbably is a type variable, not an interface.[23:37:46] <ahnfelt> yeah[23:38:04] <ahnfelt> ahh[23:38:07] <ahnfelt> which could be a class[23:38:08] <ahnfelt> I see[23:38:19] *** DevInquiry has joined ##Java[23:39:21] *** euvitudo has joined ##java[23:40:56] <EdwardIII> this seems like a fairly interesting channel - in britain i think java has always been tied in with academia due to it's use in schools/unis probably encouraged by heavy academic discounts[23:41:28] <ahnfelt> Academia? Java? ... really?[23:41:52] <EdwardIII> was that always the intention from it's creation?[23:41:56] <ahnfelt> I don't have a professor who couldn't ramble forever about what's broken in Java[23:42:05] *** OsAC has quit IRC[23:42:52] <DrHouse__> my professors taught me FORTRAN 90[23:42:57] <DrHouse__> rolf :P[23:43:46] <ahnfelt> Well we did learn Java, but we've never been encouraged to use it since (though lots of people do)[23:44:08] <r0bby> EdwardIII: look around you[23:44:17] <r0bby> it's used industry wide on the server side[23:44:45] <r0bby> some desktop applications as well[23:45:05] <EdwardIII> r0bby: i'd be interested to know what the stats are ASP.NET vs JSP[23:45:19] <r0bby> I'd say depends[23:45:27] <r0bby> I can't say[23:45:33] <ahnfelt> There it is, right there in Java precisely: Only the first constraint can be a class type or a type parameter; the following ones must be interfaces. If the first constraint is a ter, then that must be the only constraint.[23:45:42] <r0bby> I can just go by outsider observations[23:46:12] <r0bby> JSP isn't the only java technology either.[23:46:36] <r0bby> there's grails(yes, it's technically groovy, but there is some java code hidden somewhere deep inside), wicket, etc[23:46:46] <ahnfelt> I don't think it's used a lot for desktop applications though[23:46:55] <r0bby> ahnfelt: i didn't say a lot.[23:47:05] <r0bby> i said "some" hence little.[23:47:10] <cheeser> ahnfelt: more than you think[23:47:14] <EdwardIII> well it's all anadeotal in here i guess heh[23:47:16] *** cactaur has joined ##java[23:47:26] *** ilaggoodly has quit IRC[23:47:27] <ahnfelt> no, but I mean it's used very much on the server side[23:47:39] *** eidolon has quit IRC[23:47:41] <r0bby> there is a framework like grails that seems to be taking off called griffon for desktop apps[23:47:44] <DrHouse__> steve jobs: "We didn't put java on iphone since noone use it"[23:47:53] <DrHouse__> I don't agree with him[23:48:19] *** kercyr has joined ##java[23:48:22] <ahnfelt> well they're just pusing their own tech[23:48:38] <AMcBain> DrHouse__: that's why there's Android[23:48:41] <ahnfelt> I'm getting an Android though, when it comes on a phone worth buying[23:48:44] <r0bby> though, i'm not sure what application it's having in a the industry[23:49:51] <EdwardIII> is Android based heavily around java then?[23:50:09] <r0bby> EdwardIII: yes Android is java-based.[23:50:27] <DrHouse__> I don't know wha'ts Android, googling[23:50:35] <cheeser> ~android[23:50:35] <javabot> cheeser, android is Google's 'will-be-open-sourced' OS based on Linux and a non-Java-bytecode Virtual Machine. See http://code.google.com/android/ and #android[23:50:57] <r0bby> it makes me laugh that they're tying it to t-mobile right now[23:51:09] <r0bby> since it goes against the entire purpose of the platform[23:51:42] *** rlubke has quit IRC[23:51:45] <ahnfelt> well I don't care for politics[23:52:05] <r0bby> excuse me while i go get coffee.[23:52:22] <tieTYT2> what does non-java-bytecode mean?[23:52:30] <tieTYT2> does that mean the language is the same but the bytecode isn't?[23:52:33] <cheeser> it's bytecode that's not java.[23:52:51] <cheeser> unless it passes the TCK it can't be called java.[23:52:55] * cheeser eyes gcj[23:52:59] <EdwardIII> i knew of android but didn't realise that about it - it sounds interesting[23:53:01] *** Odin79 has quit IRC[23:53:50] *** UK-sHaDoW has quit IRC[23:53:57] <r0bby> EdwardIII: yeh until it's available across all providers, it's really just a crock of BS.[23:54:07] <EdwardIII> heh i guess they have to play the game though[23:54:40] <r0bby> I can't say much more though since I don't have t-mobile[23:55:03] <r0bby> and since it's approaching a rant[23:55:09] <ahnfelt> Well as long as I get java-the-language I'm fine[23:55:23] <r0bby> if you say so.[23:55:52] <ahnfelt> what am I saying, I'm not even that fond of Java[23:56:04] <ahnfelt> nevermind I guess :)[23:57:33] <EdwardIII> nobody has made moves to implement .NET other than windows mobile though i'm guessing?[23:57:40] <EdwardIII> am i right to compare .NET to Java?[23:58:14] <r0bby> EdwardIII: not really.[23:58:30] <ahnfelt> Yes, in the sense they're both names for a huge pile of things[23:59:04] <r0bby> ahnfelt: don't troll...[23:59:09] <ahnfelt> sorry :)[23:59:11] <AMcBain> EdwardIII: if you had a Linux phone, you could run Mono[23:59:36] <ahnfelt> I should go to bed anyway, cya[23:59:41] <ahnfelt> and thanks for the help[23:59:49] *** ahnfelt has quit IRC