NOTICE: This channel is no longer actively logged.
[00:00:39] *** poseidon has joined ##java[00:01:46] *** Vantaa has quit IRC[00:02:44] *** nijm has quit IRC[00:04:35] *** sombriks has quit IRC[00:04:45] *** bjv has joined ##java[00:05:06] *** lolsuper_ has joined ##java[00:05:12] <bjv> Client has this terrible idea in their head, to distribute a vetted JRE with the bytecode[00:05:23] <bjv> thus, totally negating the platform independence of java..[00:05:45] *** getBoa has quit IRC[00:06:09] *** schasi has quit IRC[00:06:11] *** DjZemich has quit IRC[00:06:40] *** steve-e has joined ##java[00:06:58] <bjv> does sun have a blessed way of doing this?[00:07:03] *** alek_b has quit IRC[00:07:11] <bjv> my first search turns up 3rd party packagers[00:11:15] <poseidon> ~swing[00:11:15] <javabot> poseidon, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing[00:11:45] <supersako> hey guys just curious what editor + plugins are good to use in linux for java programming?[00:11:50] <supersako> i love vim, any suggestions?[00:12:09] <bjv> supersako i use vim often at work[00:12:12] <jottinger> use vim?[00:12:22] <bjv> but for development i.. use eclipse[00:12:26] *** harurenu has quit IRC[00:12:35] <jottinger> and?[00:12:51] *** tilerendering has joined ##java[00:12:54] <bjv> and it's nice.[00:13:11] *** ankylose has quit IRC[00:13:27] *** riotz has quit IRC[00:17:08] <SwanR> Hello, im having a problem with threads. I want to give thread A an object created in my main thread. The main thread has to wait until thread A has finished doing some processing on the object , then it can continue using it. I am however, getting a IllegalMonitorStateException. Does anybody know why this would be[00:18:13] <SwanR> i have used wait(1000) in my main thread , and notifyAll() in thread A[00:20:46] *** steve-e has quit IRC[00:22:02] *** alek_b has joined ##java[00:22:03] *** cybereal has quit IRC[00:22:17] *** cybereal has joined ##java[00:22:18] *** jstream has quit IRC[00:24:03] *** OsAC has joined ##java[00:24:28] *** Xianny has quit IRC[00:24:37] *** Xianny has joined ##Java[00:27:17] *** The_Birdman has joined ##java[00:28:24] <supersako> i have a project to do for class, this is my first Java class.. All my previous classes were with C/C++ so it's my first time with an implemented language... Any links that wuld help me get started??[00:28:45] <supersako> the program has to run with javac *.java[00:28:47] *** hashed_ has joined ##java[00:29:02] <The_Birdman> ~firstcup[00:29:02] <javabot> The_Birdman, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava[00:29:03] *** vesz has quit IRC[00:29:03] <supersako> so im assuming this means all the files classes and such are supposed to be in the same folder[00:29:38] <supersako> ah perfect thanks The_Birdman[00:30:09] *** teralaser has quit IRC[00:30:27] <gionny> I have a class Foo<T> and then a Set<Foo<?>> that can contain objects of Foo< everything >. How can I tell if an element of that set is, for example, a Foo<Boolean>, please?[00:30:38] <gionny> I'm not sure if I explained me right...[00:33:03] *** vyoman has joined ##java[00:33:38] <dmlloyd> no, that's not right[00:33:48] <dmlloyd> Foo<?> means that you don't know what the type of T is[00:33:59] <gionny> dmlloyd: yeah... but then can I check that?[00:34:04] *** ramdam has joined ##java[00:34:15] <gionny> dmlloyd: I mean... I would like to do something just for Foo<Boolean> elements[00:34:16] *** supersako has quit IRC[00:34:20] <dmlloyd> only if Foo<T> has e.g. a method like " Class<T> getMemberClass();"[00:34:44] <dmlloyd> then you can use:[00:34:49] <dmlloyd> ~javadoc Class.isAssignableFrom(*)[00:34:51] <javabot> dmlloyd: http://is.gd/je8k [java.lang.Class.isAssignableFrom(Class)][00:34:56] *** Varox has quit IRC[00:35:05] <gionny> dmlloyd: good thinking! I didn't think about that, thanks a lot[00:36:03] *** FireFly has quit IRC[00:36:35] <gionny> dmlloyd: that's why you can know the type only at runtime, right? that's why you have to write that method[00:36:51] <gionny> the compiler cannot know it[00:36:59] <dmlloyd> right[00:37:17] <dmlloyd> one other method that is important to know:[00:37:26] <dmlloyd> ~~ gionny Class.cast(*)[00:37:26] <javabot> gionny, I have no idea what Class.cast(*) is.[00:37:28] *** DragonLord- has quit IRC[00:37:28] <dmlloyd> er[00:37:31] <dmlloyd> ~~ gionny javadoc Class.cast(*)[00:37:36] <javabot> gionny: http://is.gd/ipBB [java.lang.Class.cast(Object)][00:38:42] <gionny> dmlloyd: thanks a lot... I sometimes still have some problems with generics, at work we still use 1.4 :S I understand generics, but sometimes I am stuck because I don't have a lot of experience with them[00:38:50] <gionny> you helped me a lot, thank you dmlloyd[00:39:36] <dmlloyd> no problem[00:40:10] *** thepointer-work has quit IRC[00:44:36] *** codethief has quit IRC[00:44:59] <EdwardIII> hey for anyone hwo cares - got my first hello world app working on the blackberry![00:45:26] <EdwardIII> night all[00:45:40] *** ma3x has joined ##java[00:45:56] <ma3x> i just installed java for windows. why when i type 'javac' in cmd nothing really happens[00:45:56] *** yahooooo has joined ##java[00:45:58] <ma3x> it can't find the command[00:46:07] <ma3x> i installedjdk-6u12-windows-i586-p.exe[00:52:01] *** harurenu has joined ##java[00:52:07] *** nihilis7 has quit IRC[00:52:11] <_val_> hello guys.. where could I find java support which executes UNIX commands? like php uses exec . Is there anything I could find?[00:52:14] <gionny> dmlloyd: I am still lost on how can I write the method Class<T> getMemberClass()[00:52:14] <r0bby> ma3x : set up PATH to point to the bin directory of the root of your JDK install.[00:52:29] <gionny> dmlloyd: I tried something as: return this.getClass() ... and then I am stuck[00:52:35] <r0bby> ~~ _val_ javadoc Runtime.exec(*)[00:52:38] <javabot> _val_, too many results found. Please see your private messages for results[00:53:29] <_val_> r0bby: yep.. I'm checking the PM ..thank you[00:53:32] <dmlloyd> gionny: you need to keep a field of Class<T>, probably passed in to the constructor[00:53:50] <dmlloyd> gionny: remember that getClass() always returns Class<? extends Foo>[00:54:17] <gionny> dmlloyd: yes, that's the problem... now that you say it, I used elsewhere this trick on the constructor[00:54:38] <gionny> dmlloyd: so the only way is that, I guess... thanks[00:55:01] <r0bby> ~~ _val_ javadoc ProcessBuilder[00:55:03] <javabot> _val_: http://is.gd/jeeR [java.lang.ProcessBuilder][00:55:04] <r0bby> other option[00:55:18] <r0bby> _val_: in most cases, you'll want to use the String[] version.[00:55:27] <r0bby> of exec()[00:56:17] <_val_> r0bby: I used this just to show the time of the system . java.util.Date().toString(); So I now want to have more functionallity to use.[00:56:20] *** mengu has joined ##java[00:56:22] <gionny> dmlloyd: I just don't like that very much... but it seems that there are no alternatives. I mean, it seems stupid to force to pass in the constructor something like that when you use it, but anyways it is correct[00:57:07] <CaBa> is there a way to get the order of an array, i.e. another array with the indizes of the original array instead of sorting the array implemented in the jdk?[00:57:12] <dmlloyd> gionny: it's not ideal. But you can get some other benefits from that later - like the ability to do checked casts with memberClass.cast()[00:57:51] <dmlloyd> CaBa: what do you mean by "the order of an array". You mean you just want a copy?[00:58:01] <CaBa> dmlloyd: no. the indizes[00:58:10] <gionny> dmlloyd: now I understand it better, thanks[00:58:12] *** vinse has quit IRC[00:58:19] <dmlloyd> CaBa: the indices of an array are always 0..array.length[00:58:25] <dmlloyd> array.length - 1 that is[00:58:27] <CaBa> dmlloyd: oh, really?[00:58:32] *** gengid has quit IRC[00:58:36] * cybereal chortles[00:58:44] <CaBa> dmlloyd: i want an int[] with the right order of the indizes[00:58:55] *** G0-T0 has joined ##java[00:59:02] <cybereal> bwahahah[00:59:03] <CaBa> dmlloyd: smt like "int[] ascendingOrder(Object[] objects, Comparator c)"[00:59:03] <dmlloyd> CaBa: the indices are always in the right order[00:59:13] <CaBa> dmlloyd: u are so smart[00:59:23] <cybereal> CaBa: I don't think you understand what you're asking[00:59:35] <dmlloyd> CaBa: ooooh. You want another array that holds the.... I see.[00:59:44] <r0bby> ~~ CaBa aolbonics[00:59:44] <javabot> CaBa, 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![00:59:46] <cybereal> or at least, are not asking it very well[01:00:19] <r0bby> CaBa: sorting the elements[01:00:20] <dmlloyd> CaBa: I don't know of any way to do that[01:00:23] <ma3x> r0bby how do you setup path in windows xp?[01:00:29] <CaBa> cybereal: maybe not asked well, maybe the people in this channel simply believe that its smart first to assume that a question is dumb[01:00:32] <r0bby> ask in ##windows[01:00:44] <cybereal> CaBa: the question was dumb[01:00:51] <cybereal> CaBa: it's not an assumption it's an evaluation[01:01:04] <cybereal> CaBa: if the question wasn't dumb then there would not have been such confusion[01:01:06] <r0bby> CaBa: I assume you misunderstand the concept of arrays[01:01:15] *** gkhnoisgtht has joined ##java[01:01:20] <CaBa> r0bby: come, go play with the bot[01:01:29] <r0bby> no need.[01:01:35] <r0bby> Arrays are piss-easy to understand[01:01:38] <dmlloyd> cybereal: give him a break, he's obviously not a native english speaker, and I am and I still am not sure how to express what he's looking for, though I think I understand it[01:02:21] <CaBa> cybereal: well that evaluation might be statistically true - nevertheless it doesnt justify the assumption[01:02:21] <r0bby> death to politicians who call people..[01:02:33] <cybereal> he wants to sort an array, and instead of returning the sorted mutated array he wants a new array with indexes of the original in the sorted order[01:02:34] <r0bby> his grasp of the language seems to be pretty damn good[01:02:37] <dmlloyd> I think he's looking for an array whose values represent the indices of *another* array, in the order that they would be put in if the elements were sorted on the second array[01:02:48] <dmlloyd> yeah[01:02:51] <CaBa> exactly[01:02:59] <cybereal> there's nothing standard to do that[01:03:08] <dmlloyd> it seems like it should be possible to do[01:03:09] <CaBa> thats my answer! thank you![01:03:15] <cybereal> you have to do this during the sorting process, so you will have to implement it yourself[01:03:30] <r0bby> why maintain two arrays?[01:03:35] <sproingie> sort the array of ascending indexes using a comparator that compares the value of the elements in the other array that the index values refer to[01:03:38] <r0bby> just sort the elements?[01:03:38] <sproingie> clear as mud?[01:03:45] <CaBa> r0bby: go play with the bot![01:03:51] <r0bby> CaBa: stop being an asshole.[01:03:53] <dmlloyd> r0bby: perhaps you want a sorted view of an array[01:04:01] <dmlloyd> but you don't want to affect the original order[01:04:14] <dmlloyd> an alternative could be to .clone() the array and sort the clone[01:04:15] <cybereal> a simple solution would be taking a normal sorting algorithm, but instead of mutating the original array, make a new one with the indexes in count order, and move them around as you sort, comparing by reference the elements of the original array addressed by the value of the elemnt in the array being mutated... yeah simple[01:04:17] <gkhnoisgtht> quick question. how can i convert a string of IEEE754 binary to float? i looked at Float.valueof(string s)...? am i on the right track?[01:04:20] <r0bby> dmlloyd: ah -- so just sort the original array[01:04:25] <r0bby> return that :0[01:04:28] *** adi112358 has quit IRC[01:04:40] <G0-T0> I swear, half of the time i'm in here someone is calling someone an asshole[01:04:42] <r0bby> ~~ gkhnoisgtht javadoc Float.parseFloay(*)[01:04:43] <cybereal> r0bby: no that would change the original array[01:04:44] <javabot> I don't know of any documentation for Float.parseFloay(*)[01:04:49] <r0bby> ~~ gkhnoisgtht javadoc Float.parseFloat(*)[01:04:51] <javabot> gkhnoisgtht: http://is.gd/jeim [java.lang.Float.parseFloat(String)][01:04:52] <CaBa> dmlloyd: bright boy. the sorting is for visualization purposes _and_ the objects kept in the original array are quite huge - which is why i wouldn't like to rearrange them in memory each time the user wants the view them differently[01:04:57] <joed> r0bby: That wasn't what he asked for.[01:05:04] <r0bby> crap..[01:05:06] *** pgib has joined ##java[01:05:10] <gkhnoisgtht> thanks[01:05:26] <r0bby> is it just me or CaBa very condescending?[01:05:37] <CaBa> r0bby: _angry_[01:05:39] <CaBa> thats the word[01:05:43] *** poseidon has quit IRC[01:05:47] <r0bby> oh I remember you.[01:05:56] <CaBa> i just don't like how you guys tend to treat people that come in here[01:06:00] <dmlloyd> CaBa: remember that an array clone is a shallow copy. an int[] of 1000 elements should require a similar amount of memory to an Object[].[01:06:04] *** Tenac has quit IRC[01:06:08] *** cyth has quit IRC[01:06:18] *** blahdeblah has joined ##java[01:06:19] <r0bby> CaBa: oh jesus victim mentality needs to go[01:06:29] <dmlloyd> stop, guys.[01:06:34] <joed> Shush.[01:06:50] <dmlloyd> CaBa is not being that bad, and we're not uniformly evil.[01:06:58] <sproingie> what cybereal said. sort an array of indices into the original array, using the values of the original array as a comparator[01:07:16] <r0bby> I am, esp. to people who act like tools for no reason[01:07:29] *** jcrites has joined ##java[01:07:31] <cybereal> however if the desire to do this is entirely born of the misunderstanding of how cloning an object type array works then I would say to clone the array and sort that[01:07:39] <CaBa> r0bby: at first you assume the person coming in is a dumb stupid idiot - then you flood him with bot replies and instaed of giving the question a thought for at least 30 seconds you reply with whatever superficial and inferiour reply that comes in mind[01:07:42] *** gkhnoisgtht has quit IRC[01:07:52] <r0bby> CaBa: no, i give them the api.[01:07:56] <sproingie> get a room guys[01:07:59] <dmlloyd> CaBa: enough. r0bby: stop it[01:08:01] <CaBa> r0bby: and _you_ in particular make a very unqualified impression[01:08:03] <cybereal> it's going to take basically the same amount of ram to clone the array vs. making a new one full of indexes to the original[01:08:15] <cybereal> it's just a matter of whether that works with your data model and needs[01:08:19] *** alek_b has quit IRC[01:08:24] <r0bby> CaBa: sorry, okay :) now we can move on[01:08:32] *** gregor_k has quit IRC[01:08:33] <dmlloyd> cybereal: and I bet that sorting an Object[] vs. sorting between two arrays is probably faster.[01:08:54] *** ma3x has quit IRC[01:09:06] <cybereal> mm certainly b ut almost certainly negligibly[01:09:13] <cybereal> as the copy will take time[01:09:15] <dmlloyd> of course, the copy might take longer. But I suspect that to do the index thing, you'd have to initialize the int[] with 0..n[01:09:23] <dmlloyd> yeah[01:09:34] <dmlloyd> hard to say what the winner would be.[01:09:45] <dmlloyd> clone+sort would be the least code though.[01:09:50] <sproingie> on your benchmarks, get set...[01:09:59] <cybereal> the only reason I'd do this is if I needed to maintain an index association, so I don't have to scan the original array for its index of the same object in the new array[01:10:09] <cybereal> not because the copying is faster/slower[01:10:11] <dmlloyd> yeah[01:10:24] <cybereal> but to avoid a horribly slow lookup O()[01:10:35] <blahdeblah> Hi. Is there a method to give me N repetitions of a String? Maybe somewhere hidden in String or StringBuffer that i can't see for looking?[01:10:38] <cybereal> so it depends on what he's really doing I guess[01:10:48] <dmlloyd> blahdeblah: StringBuilder + a for loop[01:10:49] <cybereal> blahdeblah: no but making your own is trivial[01:11:15] <blahdeblah> I know it's trivial to make, but it seems ridiculous that the class libraries don't have one already[01:11:25] <blahdeblah> I just thought i'd check before writing it[01:11:27] <r0bby> String s; for(int i=0;i<100;i++) s += "Hi";[01:11:29] <cybereal> it is equally ridiculous that you expect it[01:11:38] <dmlloyd> r0bby: ew.[01:11:38] <cybereal> r0bby: can't believe you just produced that code[01:11:40] <sproingie> r0bby: die painfulyl[01:11:59] * cybereal considers updating r0bby's ~be r0bby factoid[01:12:03] <dmlloyd> haha[01:12:04] <gionny> dmlloyd: I am not sure if I did it right, it should work but I don't know if this is what you said me[01:12:11] <r0bby> is it that bad :)[01:12:13] <cybereal> it won't even work, it will die from an NPE[01:12:14] <dmlloyd> gionny: pastebin?[01:12:21] <cybereal> or it won't compile rather[01:12:23] <dmlloyd> cybereal: not even. it won't compile[01:12:24] <dmlloyd> yeah :)[01:12:33] <blahdeblah> cybereal: ridiculous to expect it? Perl has it as a language builtin, not even a class library. Are you trying to be a cheap imitation of r0bby?[01:12:34] <cybereal> r0bby: yes it's "that bad" for like 4 reasons[01:12:35] <r0bby> oh crap[01:12:35] <sproingie> that's worth updating the factoid[01:12:45] <cybereal> blahdeblah: no I'm trying to point out that you're a dumbass[01:12:45] <r0bby> don't do it[01:12:49] <r0bby> it _NEVER_) Happened[01:13:19] <gionny> dmlloyd: I have a class Option<T>, in the constructor I have a parameter Class<T> ... then the method 'Class<T> getMemberClass()'.[01:13:22] <cybereal> ~no, be r0bby is <reply>String s; for(int i=0;i<100;i++) s += "Hi";[01:13:22] <javabot> I forgot about be r0bby, cybereal.[01:13:23] <javabot> Okay, cybereal.[01:13:45] <r0bby> LOL cute[01:14:00] <dmlloyd> gionny: use the pastebin if you want, it might make it easier to explain[01:14:05] <dmlloyd> ~~ gionny pastebin[01:14:05] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[01:14:07] <gionny> dmlloyd: then, to check that an Option<?> instance is an Option<Boolean>, I just do: if (option.getMemberClass().isAssignableFrom(Boolean.class) { ... }[01:14:10] <gionny> dmlloyd: ok, wait[01:14:12] <r0bby> oh crap.[01:14:13] *** blahdeblah has left ##java[01:14:15] <gionny> thanks[01:14:15] *** misfitx7 has joined ##java[01:14:27] * r0bby needs to be less impulsive[01:14:31] <dmlloyd> gionny: that looks correct... actually I think it's backwards.[01:14:44] <cybereal> blahdeblah: just because a couple minor scripting languages have it as a first class builtin feature doesn't somehow make it necessary or useful generally, and your example of perl is fantastic since perl is specifically designed around string parsing needs. It's stupid to think every damn language needs this function. In 5 years of java coding I've never once even needed this feature, even though I made use of it in python.[01:15:10] *** misfitx7 is now known as tgarneau[01:15:17] <dmlloyd> r0bby: something like this is what we're looking for: StringBuilder b = new StringBuilder(s.length() * cnt); for (int i = 0; i < cnt; i ++) { b.append(s); } b.toString();[01:15:28] <r0bby> about that[01:15:35] *** tgarneau has quit IRC[01:15:35] <r0bby> dmlloyd: I've never actually done that[01:15:47] *** misfitx7 has joined ##java[01:15:52] <r0bby> I used a StringBuilder[01:15:54] *** Riov has quit IRC[01:15:55] <cybereal> r0bby: and you never experienced what your previous ~be r0bby claimed either but it's the gaffe that's funny[01:15:58] <dmlloyd> r0bby: sure.[01:16:13] <r0bby> yeh true[01:16:19] *** aksn has quit IRC[01:16:21] <r0bby> I'd never write code like that[01:16:36] <r0bby> _NEVER_[01:16:42] <r0bby> least i don't have this one[01:16:44] <r0bby> ~dreadlocks \[01:16:44] <javabot> r0bby, I have no idea what dreadlocks \ is.[01:16:46] <dmlloyd> methinks he doth protest too much[01:16:46] <r0bby> ~dreadlocks[01:16:47] <javabot> PRINCESS_FLUFF> I thought my very first concurrent program was doing that dreadlock thing because it wouldn't ever finish... I wish that tutorial had bothered to mention ".shutdown()";[01:16:51] <sproingie> i throw out python when i want to give a handwavey answer[01:16:59] *** misfitx7 has quit IRC[01:17:03] <sproingie> especially if it involves lots of listcomps[01:17:06] <cybereal> hehe[01:17:28] <sproingie> usually when it's a homework question[01:18:11] <sproingie> i should use something like forth instead[01:18:19] <cybereal> the only time I've ever had a real use for creating a string from a repeated copy of another string was to draw lines to stdout with hyphens heh[01:18:26] <cybereal> print "-" * 72[01:19:00] *** pgib has quit IRC[01:19:01] *** FireSlash has joined ##java[01:19:14] <jonaslund> profiler4j is really good[01:19:29] * jonaslund curses at all the time wasted with visualvm[01:19:32] *** Copter has quit IRC[01:19:38] <cybereal> System.out.println(new String(new char[72]).replaceAll(".","-"));[01:20:05] <jonaslund> visualvm might be good for runtime testing and maybe memory testing.. but for normal code profiling it just blows[01:20:49] <cybereal> oh wow that trick will work with any relacement string basically[01:21:01] *** phix has joined ##java[01:21:03] <cybereal> that's horrible but it works as a single expression[01:21:19] *** thepointer-work has joined ##java[01:21:37] <jonaslund> umm[01:21:48] *** Hink has quit IRC[01:22:02] <cybereal> jonaslund: aren't you bored of obsessing over visualvm now?[01:22:17] <cybereal> different profilers tend to have different strengths and weaknesses[01:22:18] *** Daniel_H has quit IRC[01:22:26] <cybereal> I prefer jmp/tijmp for memory profiling ...[01:22:59] *** UK-sHaDoW has quit IRC[01:23:13] <r0bby> http://commons.apache.org/lang/api/org/apache/commons/lang/StringUtils.html#repeat(java.lang.String,%20int)[01:23:17] <r0bby> ^ what he wanted.[01:23:26] *** UK-sHaDoW has joined ##java[01:23:32] <cybereal> sure but that's external :)[01:23:38] <Drone> See gionny's post at http://rifers.org/paste/show/8771[01:23:43] <r0bby> shrug[01:23:51] <r0bby> it's there if he's too lazy to write it...not my issue[01:23:52] <gionny> dmlloyd: ^[01:23:56] <jonaslund> cybereal: i spent a bit too much time before i took a closer look at what it really did :P[01:23:58] <cybereal> r0bby: new String(new char[count]).replaceAll(".", originalString) works :) hehe[01:24:05] <r0bby> though be r0bby is changed to something worse or better i can't decide[01:24:17] <gionny> dmlloyd: I don't know if this is a good way of doing it or if there is a better way...[01:24:37] <jonaslund> cybereal: on optimizing the wrong things[01:24:38] <gionny> just wrote that example in vi right now :P[01:24:52] <dmlloyd> gionny: the isAssignableFrom is backwards. It should be: Boolean.class.isAssignableFrom(option.getMemberClass()).[01:25:12] <dmlloyd> otherwise it looks right[01:25:55] <cybereal> jonaslund: I didn't ask why you used a profiler, just why you were so upset about visualvm not being so great :) heh[01:26:05] *** Towny has left ##java[01:26:29] <gionny> dmlloyd: ok thanks. Why is it backwards? doing it as you do takes care of handling classes that extends other ones correctly?[01:26:31] <jonaslund> cybereal: well i think the main thing is[01:26:34] <jonaslund> ~profiler[01:26:34] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169[01:27:24] <dmlloyd> gionny: take Object and Boolean. You can do: Object foo = new Boolean(); but you can't do: Boolean foo = new Object();[01:27:30] <cybereal> don't take opinions inserted into factoids too seriously[01:27:32] <svm_invictvs> ~testng[01:27:33] <javabot> svm_invictvs, testng is a testing framework that many consider more powerful than jUnit. For more information check out their homepage http://testng.org/.[01:27:41] * cybereal goes home for dinner[01:27:42] *** cybereal has quit IRC[01:28:09] *** blahjake has quit IRC[01:28:15] *** mosno has joined ##java[01:28:56] *** amz has joined ##java[01:29:14] *** misfitx7 has joined ##java[01:30:48] *** misfitx7 has quit IRC[01:30:48] *** GarrettSF has joined ##java[01:31:12] *** GarrettSF has left ##java[01:31:40] *** r0bby has quit IRC[01:32:23] *** UK-sHaDoW has quit IRC[01:32:36] <gionny> dmlloyd: ok, got it, thanks a lot[01:32:37] <phix> hey, I want to specify a containerDelegate i both a parent class its sub classes, however when I attempt this I get a cannot init layout, how does one get around this?[01:32:47] <SwanR> Is it possible to get my main thread to wait for another thread? Or will i need a third thread?[01:32:52] <phix> and its sub classes even[01:33:47] <Kog|Work> finally...[01:33:47] *** r0bby has joined ##java[01:33:49] <phix> I am using netbeans btw, and I am specifying my own BeanInfo classes for both the parent and child classes[01:34:05] <Kog|Work> dmlloyd: so it turns out that I found good configuration advice on the jboss wiki hours ago, but that my implementation of base64_encode was bogus[01:34:10] <Kog|Work> dmlloyd: lame.[01:34:14] <phix> any ideas?[01:34:18] <phix> any one use netbeans?[01:34:48] <Kog|Work> dmlloyd: now that I have it all working it's really just a 3 step process... so why the everloving hell the documentation couldn't say as much...[01:35:32] *** Dr_Link has quit IRC[01:35:40] <hiwk> " package org.eclipse.swt does not exist" how can I make javadoc supress those warnings? I don't want to document org.eclipse.* anyway[01:35:56] <hiwk> I guess some -exclude flag, but I can't seem to get the hang of that[01:36:36] <r0bby> hiwk: fix your classpath[01:36:44] <r0bby> that's not a warning, it's an error[01:37:27] <hiwk> r0bby: ok, how can I make javadoc ignore those errors? I don't care about any references to org.eclipse.*[01:37:34] <phix> ok let me try another question, what is the best way to extend a JPanel but only allow the sub class to add stuff to a particular container (another JPanel) within the form?[01:37:44] <r0bby> hrm[01:37:51] <phix> r0bby: ?[01:37:54] *** arpu has joined ##java[01:37:54] <phix> Cycom: ?[01:37:59] <r0bby> noclue :x[01:38:02] <phix> ok[01:38:31] <r0bby> phix: no clue...not even sure you can put such a restriction in place[01:39:00] <hiwk> r0bby: and I want to run the javadoc on a machine without the ecplise swt stuff, so the class path can not be fixed[01:39:44] <r0bby> why is getting the swt stuff hard? why not fix the problem???[01:40:33] <hiwk> becuase I'm not admin on that machine?[01:41:08] *** delskorch has joined ##java[01:41:12] *** aceofspades19 has quit IRC[01:41:17] <r0bby> you have a home directory no?[01:41:18] <phix> hmmm[01:41:25] <r0bby> grab the jars[01:41:35] <r0bby> fix your classpath[01:41:37] <hiwk> so the problem is that javadoc tries to follow references to swt, not that the swts are missning[01:41:37] <svm_invictvs> ~javadoc Class.getResourceAsStream(*)[01:41:38] <javabot> svm_invictvs: http://is.gd/jeu4 [java.lang.Class.getResourceAsStream(String)][01:41:42] *** Luminari has joined ##java[01:41:43] <svm_invictvs> ~javabot++[01:41:44] <javabot> javabot has a karma level of 183, svm_invictvs[01:41:44] <hiwk> r0bby: no.[01:41:45] <r0bby> SWT does not need to be installed systemwide does it not?[01:41:48] <hiwk> anyone else?[01:41:53] <svm_invictvs> r0bby: no[01:42:00] <hiwk> r0bby: I don't want it[01:42:16] <svm_invictvs> r0bby: When I packaged SWT apps, I just set up my classpath in my manifest and it worked great.[01:42:18] <r0bby> hiwk: if it does not need to be installed system wide then your "I'm not a sysadmin" is a cop out...[01:42:30] *** nog_lorp has joined ##java[01:42:48] <hiwk> well ok, I simply do not want to install the swt stuff on that machine[01:43:05] <Luminari> I'm doing 200 inserts in hibernate. First I try it via createSqlQuery and hibernate takes 20 ms or so each insert + every 30th or 60th insert takes 400ms. Whereas if I do it via connection object, it takes about 0-1ms per operation. Caching is turned completely off. Any ideas?[01:43:17] <hiwk> anyone know if there is a way to make javadoc igonre external packages?[01:43:28] <nog_lorp> is there a way I can configure JVM system properties globally for Sun Java?[01:43:33] *** pgib has joined ##java[01:43:57] *** kapipi has quit IRC[01:44:11] <nog_lorp> IBMs java docs mentions the SystemDefault.properties file, but that is not mentioned anywhere by sun[01:44:15] <nog_lorp> and doesn't work[01:44:31] *** mele- has joined ##java[01:45:04] *** Frostix has joined ##java[01:45:40] <pgib> Let's say I'm using JAAS. Let's also say that I have to means of authentication: Username/Password, and: Username/AuthenticationProvider/VerificationCode. The first case is simple, I have UserPasswordCallbackHandler to provide the user/pass to my custom LoginModule[01:46:18] <pgib> In the other case, I created a UserAuthAgentCallbackHandler to provide the 3 values to the LoginModule[01:46:33] <svm_invictvs> hiwk: What are you smoking? And where can I get some?[01:47:16] <hiwk> svm_invictvs: nothing. I want to check out my code on a machine at campus and be able to run javadoc there.[01:47:23] <r0bby> hiwk: you don't "install" libs you download the jars, place there somewhere on the classpath and VOILA.[01:47:52] <r0bby> ohhh[01:47:54] <pgib> The highest level of the application knows which kind of authentication to use. My question is: Should The LoginModule look at the class of CallbackHandler to determine which Callbacks to use?[01:48:06] <r0bby> hiwk: try -link[01:48:07] *** G0-T0 has quit IRC[01:48:49] <hiwk> r0bby: ooh, that seems interesting[01:48:56] <pgib> or should it just send all possible callbacks to the CallbackHandler and just let the CallbackHandler pick-and-choose?[01:49:06] <pgib> Anyways, That is my question.[01:49:28] <pgib> "two means of authentication", by the way[01:49:33] *** bjv has quit IRC[01:50:00] <r0bby> more important: why are you using SWT?[01:50:16] <r0bby> the new Nimbus Look/Feel looks rather nice[01:50:20] *** vyoman has quit IRC[01:51:06] <hiwk> r0bby: actually, it is a crappy client GUI that came as a part of the skelleton code we were given[01:51:18] <r0bby> refund[01:51:53] <hiwk> :)[01:52:51] *** nor3 has left ##java[01:53:00] *** nor3 has joined ##java[01:53:29] *** OsAC has quit IRC[01:53:30] <tieTYT2> question: this code is hitting a url and grabbing the text. When I hit the url directly I get something completely different from what the code gives me. What is the difference? http://pastebin.com/m57a3d98a[01:56:11] <r0bby> cute ordering of your comparison[01:56:16] <r0bby> in the while loop[01:56:49] <tieTYT2> what do you mean?[01:56:52] <tieTYT2> it's not mine, btw[01:56:52] <nog_lorp> anyone know how JVM system properties can be configured?[01:56:59] <jonaslund> r0bby: the length!=0 ?[01:57:02] *** sidelil has quit IRC[01:57:08] <jonaslund> i actually did the same code just the other day :)[01:57:25] <r0bby> reading from the BufferedReader[01:57:39] <jonaslund> null!=(str=.. ?[01:57:44] <r0bby> si.[01:57:51] <jonaslund> i think it's a c/c++ coder syndrome[01:58:01] <tieTYT2> r0bby: oh i see what you're talking about[01:58:01] <jonaslund> i keep doing the same thing :P[01:58:03] <tieTYT2> yeah nobody does that[01:58:44] <r0bby> I've seen "foo".equals(str)[01:58:48] <r0bby> that's normal[01:58:50] <tieTYT2> that's good to do[01:58:51] <r0bby> but null == ...[01:58:55] <r0bby> I know it is[01:58:58] <r0bby> prevents NPE[01:59:12] <r0bby> I think i _MAY_ have seen code in Drone that did that[01:59:13] *** orgy` has quit IRC[01:59:17] <r0bby> not sure though[01:59:23] <jonaslund> no it's not why[01:59:42] <r0bby> ...?[01:59:42] <jonaslund> it's more like a stop-quick setup[01:59:52] <r0bby> ah ok[02:00:03] <r0bby> it _DOES_ prevent NPEs[02:00:21] <jonaslund> true :)[02:01:01] <jonaslund> tieTYT: as for your difference, maybe your browser is caching ?[02:01:20] <nor3> what does npe stand for?[02:01:24] <nor3> oh[02:01:28] <nor3> null pointer exception[02:01:31] <nor3> ignore me[02:02:21] * Kog|Work wanders off to go write some mbeans[02:02:22] *** Kog|Work has left ##java[02:02:34] <tieTYT2> r0bby: how about the fact that it uses a Buffer instead of a builder?[02:02:57] *** tissue has joined ##java[02:03:47] *** dunmer has quit IRC[02:04:05] *** popcornPanic has joined ##java[02:04:50] *** webPragmatist has quit IRC[02:04:57] <popcornPanic> i am writing a simple calculator program and everything seems to work fine so far but this error keep popping up, but it is not stopping anything i would just like to know what it is.[02:04:57] <popcornPanic> Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ""[02:05:08] *** webPragmatist has joined ##java[02:05:18] <webPragmatist> Is there an inputVerifier for dates?[02:05:29] <webPragmatist> already out there somewhere...[02:06:34] <tieTYT2> there's a SimpleDateFormat[02:07:07] <webPragmatist> oh neat[02:08:05] *** mosno has quit IRC[02:09:38] <tieTYT2> actually if i remember it's kinda lenient[02:09:41] <tieTYT2> you shouldn't use that[02:10:07] * tieTYT2 figured it out[02:10:34] <tieTYT2> it's because the session has extra stuff in it when i visited it manual[02:10:43] <tieTYT2> and the reason for that is because I was already doing something on the webapp[02:10:53] <tieTYT2> if i restarted and tried instantly, i'd get the same symptoms but i didn't try that[02:12:05] *** Tenac has joined ##java[02:15:41] <webPragmatist> tieTYT2: what do you mean by lenient?[02:15:52] <webPragmatist> i'm confused now[02:16:35] <webPragmatist> is SimpleDateFormat a type of format like String ?[02:16:36] *** viperhr has quit IRC[02:16:40] <webPragmatist> or Integer maybe[02:17:01] <webPragmatist> I guess... how can I convert a string from that an catch if it is successful[02:17:16] <pgib> it is a class[02:17:31] <waz> ~ DRMacIver--[02:17:32] <javabot> drmaciver has a karma level of 49, waz[02:21:27] <tieTYT2> webPragmatist: it doesn't work well for that task[02:21:39] <tieTYT2> how can I get my session attributes into a URLConnection object?[02:23:34] <webPragmatist> tieTYT2: hrmmm as long as it works half assed i'm okay with it[02:23:51] <tieTYT2> ok it'll work half assed[02:24:17] <webPragmatist> http://www.dreamincode.net/forums/showtopic14886.htm[02:24:32] <webPragmatist> tieTYT2: if I want to use Date do i need some other import?[02:24:47] <webPragmatist> I just have java.text.*[02:24:52] <pgib> then you'll need more[02:25:16] *** harurenu has quit IRC[02:25:27] <webPragmatist> what else?[02:25:32] <webPragmatist> I don't know what to search for to find ti[02:25:38] <webPragmatist> hehe I found SimpleDateFormat[02:25:41] <pgib> google?[02:25:50] <webPragmatist> ^^[02:26:17] <webPragmatist> okay nm[02:26:27] *** durka42 has quit IRC[02:28:20] *** convivial has quit IRC[02:28:31] *** NotADJ has joined ##java[02:28:39] *** popcornPanic has quit IRC[02:28:44] <NotADJ> How would I make a string into an array of characters?[02:28:53] *** baks17 has joined ##java[02:29:04] <r0bby> ~~ NotADJ javadoc String.toCharArray(*)[02:29:07] <javabot> NotADJ: http://is.gd/jeIu [java.lang.String.toCharArray()][02:29:36] <NotADJ> r0bby: Thanks :D[02:31:06] <Luminari> hibernate is really pissin me off. I do 200 inserts with jdbc and hibernate. The jdbc calls all take like 1ms, whereas the hibernate has random spikes of almost a second on some records.[02:31:36] *** baks17 has left ##java[02:34:22] <phix> how, how so I change the background colour of a JScrollPane that contains a JTable?[02:34:34] <phix> s/how/hey/[02:36:22] <phix> jScrollPane.setBackground(myColour); fails[02:36:54] <phix> it is stil la gray colour[02:36:56] *** supersako has joined ##java[02:37:01] <phix> grey even[02:37:03] <phix> any ideas?[02:37:13] <supersako> hey fellas, whats a good ide for vista?[02:37:24] *** G0-T0 has joined ##java[02:37:28] <phix> supersako: Netbeans for the win[02:37:34] <phix> supersako: on any operation system[02:37:42] <supersako> is netbeans avail on linux?[02:37:46] <phix> yes[02:37:49] <supersako> awesome[02:37:51] <phix> and mac[02:37:51] *** durka42 has joined ##java[02:38:01] <supersako> ive been looking for a reason not to use eclipse :P[02:38:03] <supersako> thanks[02:38:17] <phix> eclipse wroks in linux too doesnt it?[02:38:21] <supersako> ya[02:38:30] *** Exussum has quit IRC[02:38:32] <supersako> i dont like the interface that much[02:38:41] <supersako> i hear netbeans is more user friendlyu[02:38:48] <G0-T0> Anyone use IDEA? I was wondering if it was worth the money.[02:38:49] *** eduardopl has joined ##java[02:38:52] <phix> it is great[02:38:57] *** nog_lorp has quit IRC[02:39:02] <supersako> i like sun[02:39:09] <phix> same <3[02:39:27] <phix> virtualbox <3 java <3 solaris <3[02:39:44] <phix> oh yeah netbeans works on solaris of corse too :)[02:39:46] <r0bby> G0-T0: i do.[02:40:51] <Luminari> can anyone see anything in here that would make hibernate randomly take 100x longer for inserts compared to the jdbc? http://pastebin.com/d59c73837[02:42:12] *** vinse has joined ##java[02:44:58] *** mySQLnoob has joined ##java[02:45:19] <phix> how do I change the colour of an empty JTable ? it is the scrollpane's background colour that presists right?[02:45:39] <mySQLnoob> hi there, i'm getting a Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/client/Service when i java <myprogram> , how do i add a jar file lib when i want to run my java file? i cant seem to find it[02:46:23] <mySQLnoob> i think the switch is like -classpath.. or something like that, can't remember[02:49:25] <phix> :/[02:49:29] <cheeser> ~classpath[02:49:30] <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://is.gd/j4gM [sun.com] for more info.[02:49:51] *** svm_invictvs has quit IRC[02:50:36] *** Varox has joined ##java[02:51:01] <supersako> ~firstcup[02:51:01] <javabot> supersako, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava[02:51:09] *** magcius has quit IRC[02:51:16] *** eidolon has joined ##java[02:51:33] *** magcius has joined ##java[02:52:05] <mySQLnoob> thanks i see, i was adding a "=" after the switch.. no wonder[02:52:21] <phix> ok I found it[02:52:26] <phix> you can stop trying t help me on that now[02:52:31] <phix> (bastards)[02:52:35] *** BSWolf has quit IRC[02:52:47] <eidolon> so opinoins - and i know there's another channel. spring. i'm using it now - but primarily for injecting stuff into classes in a tomcat hosted app. is that primarily what it's for? or am i missing some big part of it (i know about the MVC stuff - just haven't pursued what it's about)[02:53:21] <phix> eidolon: there is security stuff it does too apparantly[02:53:22] *** nvictor has joined ##java[02:53:23] <phix> loging forms[02:53:26] <phix> loggin even[02:53:28] <phix> log on[02:53:30] <phix> bah[02:53:36] <eidolon> ~tell phix about return[02:53:36] <javabot> Don't press return until you've finished typing your question, it's annoying to see multiple lines for one question, and hard to follow.[02:53:48] <supersako> hey phix do you know if the netbeans C/C++ plugin has a compiler?[02:54:02] *** nvictor has left ##java[02:54:10] <supersako> or does the java even have a compile and run feature?[02:54:12] <supersako> im installing it now :)[02:56:18] <mySQLnoob> hmm not working very well.. i do specify class path but then it says it can't find my class 0_0[02:56:40] <mySQLnoob> and without the -cp it complains about the jar[02:56:42] <mySQLnoob> *sighs*[02:56:51] *** basix has joined ##java[02:57:44] *** meanburrito920_ has joined ##java[02:57:52] <eidolon> crap. httpclient is not part of commons net.[02:57:56] * eidolon adds another dependency.[03:00:58] <cheeser> ~~ supersako newbie ide[03:00:58] <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.[03:01:19] <supersako> i agree thanks cheeser[03:01:29] *** b3nn3tt has quit IRC[03:01:34] <supersako> im actually gonna be using the cli in linux for this first project[03:01:52] <Cycom> I really only use the IDE for the automatic tabbing and brace closing.[03:02:35] *** ErebFaer has quit IRC[03:03:06] <cheeser> Cycom: eclipse user, right?[03:03:35] <waz> wow, that's a complete waste of an ide[03:03:47] <cheeser> eclipse? yeah, it is.[03:03:52] <cheeser> oh, you mean what Cycom does.[03:04:07] <waz> well, both I guess :)[03:04:07] <Cycom> cheeser: no, I use NetBeans.[03:04:13] <waz> ~eclipse--[03:04:13] <javabot> eclipse has a karma level of -71, waz[03:04:14] <supersako> cheeser: i found a good tutorial on the firstcup tutorial page for cli from linux, is there a similar one for windows?[03:04:15] *** convivial has joined ##java[03:04:24] <supersako> im not sure where the JDK installed the javac and such[03:04:26] <cheeser> supersako: all the commands are the same[03:04:34] <Cycom> Well I still use the managment of projects and stuff, and it is nice to have the debugger right there...[03:04:41] <supersako> i guess i gotta append the path of javac to my $PATH[03:04:44] <Cycom> also the fact that I can code in C and Python and Java all in the same IDE[03:05:12] <supersako> Cycom: that sounds awesome[03:05:19] <supersako> Cycom: glad i just installed NetBeans :P[03:05:20] <waz> you can do that in an editor[03:05:29] <supersako> i love C and python, just getting the hang of java[03:05:30] <waz> you're not using an ide[03:06:20] <kercyr> kercyr--[03:06:25] <kercyr> ~kercyr--[03:06:25] <javabot> Changing one's own karma is not permitted.[03:06:26] <javabot> kercyr, you have a karma level of -22[03:06:42] <kercyr> Eclipse is way ahead of me.[03:06:59] <NotADJ> Boolean logic is not allowed in a switch, correct?[03:07:10] *** Zakath has quit IRC[03:07:22] *** dmlloyd_ has joined ##java[03:07:33] <kercyr> NotADJ, there is a thing call an if-statement[03:07:46] <kercyr> It's a boolean switch statement.[03:08:15] <cheeser> wow. talk about bass ackwards[03:08:33] *** juanez has quit IRC[03:09:11] <NotADJ> kercyr: I know, but I'd need many of them.[03:10:40] <Cycom> NotADJ: that sounds... well, lets just say I'm concerned.[03:11:13] *** dude7064 has quit IRC[03:12:10] <NotADJ> :D[03:12:11] <NotADJ> :P[03:12:15] *** twolf_ has joined ##java[03:12:21] <NotADJ> Thanks, Cycom :P[03:12:22] <rdancer> when i try to debug a program compiled with gcj, i'm getting this: Breakpoint 1 at 0x401a2b: file /tmp/ccNBhQjv.i, line 9.[03:13:04] <rdancer> seems to me gcj is using temporary files to store the source, and the debugging info points to them, and, logically, gdb can not find the source code[03:13:11] <rdancer> what do i do to right this?[03:13:28] *** twolf has quit IRC[03:13:38] *** twolf_ is now known as twolf[03:14:26] *** mySQLnoob has quit IRC[03:14:43] <cheeser> ~~ rdancer gcj[03:14:43] <javabot> rdancer, gcj is not Java; don't be surprised if we refuse to help you. You can find information about gcj at http://gcc.gnu.org/java/, join #gcc, or join #gcj on irc.oftc.net[03:14:58] <rdancer> ok cheeser[03:14:59] <supersako> was just gonna say gcj is not java[03:15:00] <supersako> :P[03:15:16] <supersako> does gcj even have support for swing yet?[03:15:27] *** skypce has joined ##java[03:15:29] <cheeser> some of it[03:15:45] <supersako> why not just use the sun jdk[03:15:51] * supersako shrug[03:15:56] * supersako shrugs[03:16:01] <rdancer> 02:16 -!- Topic for #gcj: Google Code Jam http://code.google.com/codejam. Americas: local onsites today.[03:16:17] <rdancer> looks like #gcj is not at all related to gcj(1)[03:16:28] <rdancer> not on freenode atm, anyway[03:16:55] *** Varox has quit IRC[03:17:00] <skypce> do you known if exist a extjs clone for java?[03:17:24] <Luminari> gwt-ext[03:17:47] <Luminari> and ext-gwt[03:17:48] <skypce> mmm thank Luminari[03:17:53] <Luminari> sure[03:18:01] *** G0-T0 has quit IRC[03:18:14] <skypce> google web toolkit = gwt?[03:18:19] <Luminari> yep[03:18:38] <skypce> but i need develop a desktop application[03:18:51] <waz> Swing[03:18:56] <skypce> good , i study it first thank[03:19:44] *** ErebFaer has joined ##java[03:19:45] <skypce> i find first for the easy way waz[03:19:52] <The_Birdman> ~gwt[03:19:52] <javabot> The_Birdman, gwt is Google Web Toolkit, which converts Java to JavaScript. http://code.google.com/webtoolkit/[03:19:56] *** mengu has quit IRC[03:19:59] <The_Birdman> ~karma gwt[03:19:59] <javabot> gwt has no karma, The_Birdman[03:20:06] <The_Birdman> ~gwt--[03:20:06] <javabot> gwt has a karma level of -1, The_Birdman[03:20:10] *** mySQLnoob has joined ##java[03:20:12] <waz> ~gwt++[03:20:12] <javabot> gwt has a karma level of 0, waz[03:20:32] <The_Birdman> looks like someone like gwt[03:20:39] <The_Birdman> likes*[03:20:52] <mySQLnoob> i keep getting asked to add more jars in classpath while executing my java program, how can i add this jars to classpath under linux? i see a lot on windows, but i cant seem to find on linux[03:20:54] <waz> what don't you like?[03:21:12] *** Epitaph64 has joined ##java[03:21:29] <The_Birdman> when looking about gwt and being ask what I think about it, I can only think about limitations and integrations issues[03:21:35] <Epitaph64> Hey, anyone know how to override windows way of managing key input?[03:21:35] *** SwanR has quit IRC[03:21:37] <The_Birdman> integration*[03:21:55] <supersako> ~karma python[03:21:55] <javabot> python has no karma, supersako[03:22:32] *** dmlloyd has quit IRC[03:23:23] <waz> such as?[03:23:47] <waz> when asking you what you don't like I can only think you didn't answer[03:24:13] *** Ububegin has quit IRC[03:24:58] <Epitaph64> anyone know why java reads input like you are typing?[03:25:08] <Epitaph64> as in, if you hold down a letter, it hits it once, and then hits repeatedly afterwards[03:25:22] <Epitaph64> and if there is a way to just read raw "is the key pressed or released"[03:25:45] *** cactaur has joined ##java[03:25:54] <The_Birdman> waz, nevermind[03:26:14] <waz> figured[03:26:20] <waz> unfounded --[03:26:22] <waz> next[03:27:40] <The_Birdman> :-), as I don't use GWT and don't plan to use it, there's no point in me discussing about what I like and don't like in it. I said I can only think about limitations when being asked about it(generics, hibernate, j2ee, not having to rpc for non trivial stuff, etc.)[03:28:14] <The_Birdman> that's basically what I think about GWT without having used it[03:28:20] <jonaslund> uh-oh[03:28:28] <jonaslund> hibernate on gwt? :D[03:28:44] *** aTypical has joined ##java[03:28:51] *** mySQLnoob has quit IRC[03:29:35] *** amz has quit IRC[03:29:36] <Luminari> hibernate works fine with gwt[03:29:41] *** nihi|ist has joined ##java[03:29:51] <Luminari> so do generics[03:30:06] <Luminari> rpc works for non trivial stuff[03:30:35] <The_Birdman> yes I am aware about those hibernate projects for gwt, I know that generics support was improved lately[03:30:46] <supersako> cheeser: are you on windows? if so what text editor do you use? i been tryin out notepad++[03:30:54] <supersako> its alright i guess, looking for something better[03:31:04] <The_Birdman> but yes, having to do rpc all the time, is not something I really consider for "common apps"[03:31:40] <aTypical> Evening[03:32:17] <Luminari> The_Birdman: rpcs are ajax requests. You'd have to do them regardless if you want a javascript heavy application[03:33:00] *** ScottG489 has quit IRC[03:33:01] *** staykov has quit IRC[03:33:22] <webPragmatist> how do you add a year to today's date? I tried examples online that netbeans didn't like[03:33:24] <supersako> what editor you all use for java editing? somthing like notepad++[03:33:38] <The_Birdman> Luminari:I never said I didn't know what RPC is, I don't necessary believe that a Javascript heaving application is sane, but well nevermind, I respect your opinion anyway[03:33:43] <webPragmatist> http://www.mibbit.com/pb/pFiW7n[03:33:43] * tazle wonders why people talk about "rpcs" as is they were something very specific and totally unlike any other communication mechanism[03:33:52] <tazle> *as if[03:33:52] <Luminari> The_Birdman: fair enough :)[03:34:07] *** GarrettSF has joined ##java[03:34:31] *** GarrettSF has left ##java[03:34:58] <Luminari> well an rpc heavy application would be gmail. I use gwt as a supplement for occasional goodness on a mostly server generated pages.[03:35:04] *** pandora-- has quit IRC[03:35:17] <webPragmatist> anyone?[03:35:57] <Luminari> get rid of the plus, and Calendar cal = new GregorianCalendar()[03:37:36] <webPragmatist> okay[03:38:03] <webPragmatist> should i be using calender at all? because i currenlty use it to simply compare todays date[03:38:16] <Luminari> for simple date math, sure[03:38:42] <waz> ~gwt++[03:38:42] <javabot> gwt has a karma level of 1, waz[03:38:45] <conan> with JPA, anyone konw how to create an extended persistencecontext for an entitymanager using an api instead of injection? as i can't assume I'm in a application server environment.[03:38:54] <Luminari> ~gwt++[03:38:54] <javabot> gwt has a karma level of 2, Luminari[03:38:56] <webPragmatist> okay[03:39:36] *** durka42 has quit IRC[03:39:40] <nor3> ~gwt++[03:39:40] <javabot> gwt has a karma level of 3, nor3[03:40:03] <webPragmatist> Luminari: still no good :\ .... I have java.util.* and it says it can't find the symble?[03:40:44] <cheeser> webPragmatist: don't use * imports[03:40:46] <The_Birdman> I am truly sorry. I should have spoken my mind about GWT. It has its usage for sure and I don't deny it.[03:40:47] *** lacqui has joined ##java[03:40:53] <cheeser> ~javadoc GregorianCalendar[03:40:54] <javabot> cheeser: http://is.gd/jf1v [java.util.GregorianCalendar][03:41:15] <NotADJ> ~javabot++[03:41:15] <javabot> javabot has a karma level of 184, NotADJ[03:41:18] <NotADJ> ~javabot++[03:41:18] <javabot> Rest those fingers, Tex[03:41:24] <NotADJ> :P[03:41:31] *** lacqui has left ##java[03:41:35] <webPragmatist> cheeser: but they are fun[03:43:29] <webPragmatist> eff it ![03:43:37] <webPragmatist> er not really[03:43:39] <webPragmatist> but what the eff[03:44:11] *** [TechGuy] has joined ##java[03:44:12] <waz> ~starimports[03:44:13] <javabot> waz, star imports is http://en.wikibooks.org/wiki/Java_Programming/StarImports[03:44:16] <webPragmatist> it doesn't know what a "Calender" is[03:44:19] <webPragmatist> as a type[03:44:31] *** twolf has quit IRC[03:44:42] *** Riov has joined ##java[03:45:13] *** The_Birdman has quit IRC[03:45:14] <Luminari> probably because its spelled Calendar[03:45:34] <cheeser> ~spelling++[03:45:34] <javabot> spelling has a karma level of 4, cheeser[03:45:36] *** FireSlash has quit IRC[03:45:50] <cheeser> webPragmatist: see? this is one reason why you shouldn't use * imports.[03:45:58] <supersako> ok so my project has just 1 restriction, it must run with javac *.java... Now I also have to have classes in different files so are the classes going to be put in seperate .java files? and will have a main.java which will have the main function in it??[03:46:05] <supersako> i should say main method :P[03:46:07] <cheeser> the import on java.util.Calender would fail and you'd know right away[03:46:24] <webPragmatist> cheeser: but it doesn't work with util.calender[03:46:31] <cheeser> java.util.Calendar[03:46:34] <cheeser> DAR[03:46:39] <cheeser> not der[03:47:08] <webPragmatist> or lorder[03:47:11] <webPragmatist> lordy[03:47:12] <webPragmatist> lol[03:47:18] <webPragmatist> it's late[03:48:53] *** brwnphyscst has joined ##java[03:49:34] <brwnphyscst> Within the API, are iterators supposed to only work on collections which do not include binary tree collections?[03:50:07] <Luminari> I know I asked this before, but I do 200 inserts via jdbc, then I do the same inserts via hibernate SQLQuery, and during the hibernate one, some inserts randomly take almost a second to execute. Any ideas why? http://pastebin.com/d59c73837[03:50:17] <rdancer> what's the result of casting a double to int, likewise?: (int) 1.2345[03:50:43] <Luminari> rdancer: in the case you supplied 1[03:50:57] <rdancer> and in a general case?[03:51:00] <brwnphyscst> If you cast a double to an int shouldn't you lose the non-integer aspect of the double precision?[03:51:07] <[TechGuy]> truncation[03:51:08] *** theatrus has quit IRC[03:51:30] <Luminari> rdancer: converts the double to fit inside the constraints of a java int[03:51:32] *** twolf has joined ##java[03:51:34] <rdancer> so the integral part is kept, there is no rounding[03:51:57] <rdancer> are there any special cases which one should be aware of?[03:51:58] <brwnphyscst> Nope.[03:52:29] <rdancer> ok[03:52:33] <rdancer> thanks[03:53:36] <brwnphyscst> Anyone up for my inquiry? (I think I know that answer, however, since this is semantics I felt that I should ask to get some other opinions.)[03:54:16] <brwnphyscst> This is not a "homework" question, but rather a generic inquiry based on a conversation with a professor for my algorithm class. I think that she is trying to define her own bonds to make her own interpretation seem more relevant, however, I believe that she is just wrong. Any opinions?[03:54:28] <brwnphyscst> Within the API, are iterators supposed to only work on collections which do not include binary tree collections?[03:54:40] *** LordMetroid has quit IRC[03:55:06] <r0bby> brwnphyscst: huh?[03:55:14] <brwnphyscst> I know. It looks wierd.[03:55:29] *** squi has joined ##java[03:55:43] *** durka42 has joined ##java[03:55:46] <brwnphyscst> the conversation stemmed from a project that I have to turn in, where we use a binary tree to store monomials in a polynomial for processing.[03:56:23] <rdancer> brwnphyscst: why would iterators not work there?[03:56:43] *** nihilis7 has joined ##java[03:56:51] <nor3> does anyone know why classLoader is sandboxed?[03:56:53] *** nihi|ist has quit IRC[03:57:17] <brwnphyscst> I used three different iterable-type mechanisms to allow a caller, i.e. Polynomial instance to get three different functionalities from three different instances of a binarysearchtree-type structure.[03:57:25] <rdancer> nor3: because it can do dangerous stuff?[03:57:39] <nor3> rdancer: such as?[03:57:43] <nor3> lol[03:57:55] <brwnphyscst> She said that I was using the iterators wrong because iterators are for "lists" like a linked list structure, and not the binary tree.[03:57:56] <nor3> it doesn't seem comparable to sandboxing the hosts filesystem and network connection[03:58:00] *** repnop has quit IRC[03:58:05] <rdancer> nor3: load classes?[03:59:00] <brwnphyscst> She also went on to tell me that a monomial is not multiple terms multiplied together, but a single term, like (X^3)(Y) is not a monomial, but (X^3) is.[03:59:36] <nor3> rdancer: yes but if the rest of the sandbox remains in place, what damage could that do beyond what the original applet could?[03:59:48] *** amnesiac has quit IRC[03:59:52] <durka42> brwnphyscst: what about (X^2)(X)?[03:59:55] <brwnphyscst> I am just trying gain some clarity because I personally think she is full of shit.[04:00:07] *** theatrus has joined ##java[04:00:09] <r0bby> brwnphyscst: a monomial is a single term.[04:00:10] <rdancer> brwnphyscst: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html[04:00:29] *** Epitaph64 has quit IRC[04:00:39] <r0bby> what kind of clown school are you at?[04:00:41] *** multi_io has joined ##java[04:00:56] *** repnop has joined ##java[04:01:00] <eidolon> hm, anyone familiar with jakarta commons httpclient? i'm getting a response back from a serveer that's formatted like a URL encoded 'get' call. ala, it look slike: rver response: TIMESTAMP=2009%2d02%2d12T02%3a55%3a47Z&CORRELATIONID=f8ecc5babb727&ACK=Failure - i'd like to, say, parse that into a set of tuples i can work with. can i do that with httpclient?[04:01:00] <aTypical> I went to clown school.[04:01:25] <multi_io> is there a good reason why Java doesn't support leaving out the names of unused parameters in method definitions?[04:01:26] <r0bby> is that why you're so funny looking?[04:01:27] <brwnphyscst> Yeah but a term is composed of multiple terms multliplied together, and they only become a "polynomial" when the previously discussed term is summed with another such term, correct?[04:01:50] <r0bby> 2x^2 // monomial[04:02:14] <brwnphyscst> Thanks rdancer: but I am good with the javadocs. I am just trying to figure out what my professor is trying to say.[04:02:30] <r0bby> bi-nomial is two terms; tri-nomial = 3 terms polynomial more than 3 :)[04:02:36] <webPragmatist> how can I add 30 days instead of a "Month" ... cal.add(Calendar.MONTH, 1);[04:03:24] <webPragmatist> oh wait[04:03:38] <webPragmatist> cal.add(Calendar.set(someDate), 1);[04:03:45] <webPragmatist> 30*[04:03:46] *** Love4Boobies has joined ##java[04:03:47] <brwnphyscst> r0bby: 2x^2 is a monomial, just like 2(x^a)(y^b) == monomial, and 2(x^a)+(y^b) is a binomial, or polynomial with two distinct terms, or two distince monomials, or am I incorrect.[04:04:22] *** Vicfred has quit IRC[04:04:26] <webPragmatist> wawit what this is confusing[04:04:31] * r0bby sucks at algebraic crap[04:04:31] <rdancer> nor3: because the sandboxing is implementing in classloader[04:04:45] <rdancer> nor3: so you can't invoke it from within sanbox explicitly?[04:04:46] *** ScottG489 has joined ##java[04:04:57] <rdancer> nor3: *implemented[04:05:02] <webPragmatist> setTime(someDate) ... sets the calender to that time... then if I want to add thirty days why would I what's the first attribute for?[04:05:04] <nor3> aaah, the sandboxing is implemented in the classloader[04:05:24] <Luminari> webPragmatist: cal.add(Calendar.DAY_OF_YEAR, 30);[04:05:36] <Love4Boobies> hey... i don't really have much understanding of java (i do understand OOP though), i am a c/c++ programmer... i have the following: $( "book", _P.data ).each(function( i ) { ,,, }). my question is: what can i use instead of each to go through only the first n? u don't even know the syntax, lol[04:05:50] <cheeser> ~~ Love4Boobies aolbonics[04:05:51] <javabot> Love4Boobies, 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![04:05:59] <rdancer> brwnphyscst: you're correct[04:06:02] <nor3> rdancer: i don't understand what that means, but it seems like something i could investigate. thanks[04:06:24] <Love4Boobies> cheeser: sorry[04:06:31] *** Wicked has quit IRC[04:06:32] <cheeser> Love4Boobies: that's not even java code there[04:06:37] <rdancer> oopsie[04:06:40] <Love4Boobies> lol[04:06:43] <cheeser> is.gd++[04:06:51] <Love4Boobies> thank you[04:07:03] <nor3> rdancer: that wasn't meant for me?[04:07:11] *** Wicked has joined ##java[04:07:18] *** pgib has quit IRC[04:07:21] <brwnphyscst> I am a physics major and sometimes I swear that these phd-level computer science professors failed all their higher level math because it is like they are making stuff up just to maintain the fact they are "correct." I think this is the case here. But I was hoping to be dashed into the cazm of incorrect theory by you guess so that I can stop feeling like she is just plain screwing with me.[04:07:26] <rdancer> nor3: yes, this is a shorter version: http://tinyurl.com/acbv8c[04:07:29] *** staykov has joined ##java[04:07:34] <brwnphyscst> Thanks rdancer: at least I know that I am not crazy.[04:07:37] <brwnphyscst> :)[04:07:43] <nor3> ah ok, thanks a lot[04:07:47] <webPragmatist> nm got it[04:08:00] *** aleksei has joined ##java[04:08:20] *** jstream has joined ##java[04:08:43] <brwnphyscst> any opinions about the use of iterators to change how elements are added to a collection which is implimented as a binary tree structure? That was where my conversation stemmed, with the professor.[04:09:10] <rdancer> brwnphyscst: cs is swarming with ppl who can't do maths, your observation is absolutely correct[04:09:10] *** Love4Boobies has quit IRC[04:09:30] <cheeser> ~~ rdancer aolbonics[04:09:30] <javabot> rdancer, 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![04:09:40] <rdancer> thx, chsr[04:10:07] *** giaco has joined ##java[04:10:10] *** cheeser sets mode: +b %rdancer!*@*[04:10:13] <jstream> Hi, I've got a Java 101 question. I'm trying to create an array of objects. Each object is simply a data structure. I created the class and then declared an instance of it as an array: public datastruct_class datastruct_array[];[04:10:55] <jstream> then, to add items to the array, I tried datastruct_array[i] = new datastruct_class();[04:11:00] <jstream> but, I get an exception[04:11:14] <[TechGuy]> go figure[04:11:18] <jstream> Am I doing something wrong or is there a better way to do what I want?[04:11:22] *** yobo2 has joined ##java[04:11:23] <yobo2> ~php--[04:11:24] <javabot> php has a karma level of -1, yobo2[04:11:25] <[TechGuy]> ~doesn't work[04:11:25] <javabot> [TechGuy], doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions)[04:11:42] <[TechGuy]> ~~jstream arrays[04:11:42] <javabot> jstream, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html[04:11:52] *** skypce has quit IRC[04:12:19] <supersako> hey guys is there some good source code out there with classes in seperate files and such? good coding technique and style?[04:12:34] <supersako> want to see how similar java is to C++ as far as layout[04:12:35] <aTypical> supersako, huh?[04:12:39] <[TechGuy]> o_O[04:12:42] <yobo2> whaaat[04:12:46] <jstream> [TechGuy]: I've seen that and it isn't exactly helpful because each element in the array is just a single variable...[04:12:51] <yobo2> supersako: style depends on the programmer...[04:12:58] *** rdancer_ has joined ##java[04:13:05] <yobo2> maybe guidelines that your environment has in place, etc.[04:13:12] <supersako> ya i agree[04:13:15] <yobo2> good![04:13:16] <yobo2> ~next[04:13:17] <javabot> Another satisfied customer. Next![04:13:18] <rdancer_> would you please unban me?[04:13:18] <[TechGuy]> jstream: You're missing one of the very first steps[04:13:38] <[TechGuy]> jstream: Seriously, stare at the docs on how the array itself is created[04:13:44] <supersako> yobo2: you know any good example java code sites?[04:13:59] <supersako> i guess the sun tutorial should do fine?[04:14:00] <rdancer_> cheeser: please?[04:14:26] <yobo2> supersako: probably[04:14:42] <yobo2> supersako: top-level classes have to be in separate files in java btw[04:14:47] <jstream> [TechGuy]: thanks[04:15:23] * cheeser eyes rdancer_[04:15:30] *** cheeser sets mode: -b %rdancer!*@*[04:15:34] <rdancer_> cheeser: yes?[04:15:42] <rdancer_> thanks, cheeser[04:15:56] <brwnphyscst> Should collections only ever have a single iterator?(semantics again...)[04:16:00] <supersako> yobo2: whats a top-level class?[04:16:05] <rdancer_> cheeser: I meant: “Thank you, cheeser!”[04:16:08] *** rdancer_ has quit IRC[04:16:14] <yobo2> i dont know a better term[04:16:19] <yobo2> the most outer class in a file[04:16:26] <supersako> oh ok[04:16:27] <yobo2> not nested in another class[04:16:40] <yobo2> one class per file and it has to be the same as the file name[04:16:45] <supersako> ya thats one of my teachers "commandments" no nested classes :P[04:16:54] *** bashoh has joined ##java[04:16:59] <supersako> and i gotta name it ClassName.java right?[04:17:19] <yobo2> is another one of your teachers commandments "no commandments shall have explanations"? thats a pretty common one.[04:17:21] <yobo2> yes[04:17:38] <supersako> let me check LOL[04:18:37] *** dmlloyd_ is now known as dmlloyd[04:19:06] <supersako> heres one.. "Thou shalt not dictate commandments to the Grader-god!"[04:20:20] <yobo2> ha[04:20:42] <supersako> ya hes a fun teacher[04:21:10] <supersako> he likes to make his students laugh as he tortures us[04:21:46] *** eduardopl has quit IRC[04:22:22] <brwnphyscst> Can anyone take a nab at my inquiry about iterators? I am kind of hurting over here. I can't find any style guides on the best way to implement iterations.[04:23:07] <brwnphyscst> Is it bad form to use multiple iterables within a single object to manage how a caller is adding elements to a collection?[04:24:22] <jonaslund> it's interesting how your code style changes over time[04:24:31] <yobo2> brwnphyscst: http://www.osnews.com/images/comics/wtfm.jpg[04:24:38] <yobo2> brwnphyscst: if its good by that standard then the style is ok[04:24:52] <yobo2> if youre going to look at it in 6 months and wonder wtf you were doing; its not ok.[04:25:10] <yobo2> if its going to make somebody else's ears bleed its also probably not ok.[04:27:08] <jonaslund> for me recently it's kinda how my java is done almost as if thinking in a functional language[04:27:21] <jstream> [TechGuy]: Ok.. I'm declaring here: datastruct_class[] datastruct_array; then later, datastruct_array = new datastruct_class[x]; and then each element: datastruct_array[i].x = 1;[04:27:30] <jstream> the last line results in an exception[04:27:51] *** Csow has joined ##java[04:27:59] <jstream> a null pointer exception[04:28:08] <yobo2> jstream: the common conventions is to start class names with capital letters and not use underscores.[04:28:25] <yobo2> jstream: that said youre only creating a new array that can hold 'x' datastruct_class's, i dont see you instantiating new datastruct_class's anywhere.[04:28:32] <brwnphyscst> yobo2: Did you see my earlier discussion about what a monomial is? If so, then that is the type of "Code Reviewer" that I am dealing with, and I just want to know if my method of solution is actually wrong, or if the professor is just lazy and buffered from real-world code so anything outside of her research field is considered confusing and wrong.[04:28:37] <jonaslund> (and that's not really a bad thing in many cases as it kinda builds on terminating everything quickly and not leaving things half-done)[04:28:42] <yobo2> brwnphyscst: no i did not i got here recently.[04:28:59] <Csow> anyone knows of a reading material teaching the use of fixed size array to create List[04:29:11] *** cactaur has quit IRC[04:29:19] <[TechGuy]> jstream: What yobo2 said[04:29:34] <jstream> yobo2: each element needs a "new" ?[04:29:40] <jonaslund> ~javadoc csow arrays[04:29:40] <javabot> I don't know of any documentation for csow arrays[04:30:00] <jonaslund> ~~javadoc arrays csow[04:30:00] <javabot> The user javadoc is not on ##java[04:30:10] <jonaslund> ~~csow javadoc arrays[04:30:10] <javabot> csow: http://is.gd/iqF5 [java.util.Arrays][04:30:42] <yobo2> jstream: yes.[04:30:47] <brwnphyscst> Well, my professor is trying to sell me on the fact that I am incorrect about the even the definition of a monomial, i.e. (x^2)(y)==monomial, but according to her, only (x^2)||(y)==monomial, and not the original set of multiples. So there is my problem with just sitting back and thinking that my implementation is wrong.[04:31:03] <[TechGuy]> jstream: Again, re-read the arrays tutorial[04:31:29] *** Woflborg has joined ##java[04:32:10] <brwnphyscst> I was hoping that some of the professional java coders in the channel would give me some hints as to the possible faulty style, hence my inquiry.[04:32:22] <yobo2> brwnphyscst: (x^2)(y) is a monomial but this has nothing to do with java...[04:33:14] <jstream> okay, that worked... thanks[04:33:22] <yobo2> i might be wrong[04:33:47] <yobo2> no im not wrong[04:33:59] <yobo2> brwnphyscst: but what is the java you are referring to?[04:34:20] <brwnphyscst> I know, it is an aspect of my project which was being discussed, while she was trying to tell me that my style was wrong for using monomialIterator() methods to return implementors of MonomialCollectionIterator interface so that you can add XOrder, YOrder, and DegreeOrder sorted elements into a binarysearchtree type of structure.[04:34:40] <yobo2> ~javadoc MonomialIterator[04:34:41] <javabot> I don't know of any documentation for MonomialIterator[04:34:46] <yobo2> ~javadoc MonomialCollectionIterator[04:34:46] <javabot> I don't know of any documentation for MonomialCollectionIterator[04:34:54] <yobo2> brwnphyscst: what are you talking about?[04:35:23] <yobo2> is MonomialIterator part of some package that you were given to work with?[04:35:40] <brwnphyscst> The project is to implement a Polynomial object which has a binarytree structure which holds terms that are sorted in order according the X-Order, Y-Order, or sorted by degree.[04:36:07] <yobo2> brwnphyscst: if you are having a specific java problem please post the relevant code and ask a specific question.[04:36:24] <brwnphyscst> Just getting to that.[04:36:38] <brwnphyscst> Is the link pastebin.net ?[04:36:42] <yobo2> ~pastebin[04:36:42] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.[04:37:49] *** AgentScorpion has joined ##java[04:38:50] *** webPragmatist has quit IRC[04:38:59] <AgentScorpion> I am trying to load image from a JAR file, I need to set it as the input to a ImageReader, but am unable to do this[04:39:12] <AgentScorpion> Can anyone help?[04:39:18] <brwnphyscst> http://www.papernapkin.org/pastebin/view/4397/[04:39:43] <yobo2> brwnphyscst: and what is the question?[04:40:19] <[TechGuy]> ~~AgentScorpion test case[04:40:19] <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.)[04:41:22] <brwnphyscst> I am trying to find out what is a possible "style" or "semantic" issue with how I have implemented the code. Instead of having an explicit parameter dictating what type of binarytree add will occur, I have the iterators which do the addition, and removal, etc... Is there a code style issue with having more than one iterator in a single collection?[04:42:33] <yobo2> brwnphyscst: you mean you are wondering if its ok to have xOrderIterator(), yOrderIterator(), and diagonalIterator() all at once?[04:42:43] <brwnphyscst> yes.[04:43:00] <yobo2> well none of them are named iterator()[04:43:08] <yobo2> so im not sure what the big deal is[04:43:15] <yobo2> if you need 3 separate iterators then that works[04:43:24] <yobo2> if you feel more comfortable sticking to the Container interface[04:43:43] <yobo2> your only other option would be to have something like xOrderContainer() that returned a container with an iterator() method that returned an iterator over x order[04:43:43] <jonaslund> yobo2: i think the issue is the prof being comfortable[04:43:46] <yobo2> and the same for the other[04:43:50] <yobo2> i see[04:44:02] <yobo2> well is the professor uncomfortable with your 3 separate non-iterator() iterator methods?[04:44:59] <AgentScorpion> http://rafb.net/p/IOgaPa12.html[04:45:08] *** kater_ has joined ##java[04:45:13] <yobo2> brwnphyscst: if you want to implement iterator() for your MonomialCollection then you have to pick one of those 3 to return. so its either that, or 3 separate collections.[04:45:32] <brwnphyscst> I know.[04:45:53] <yobo2> so which one does your professor want? what meets the requirements of the assignment?[04:46:25] <yobo2> more importantly, what should the iterator() method of an IterableMonomialCollection return in general?[04:46:31] *** kater has quit IRC[04:46:47] *** imohax has quit IRC[04:46:47] <brwnphyscst> Actually the requirements are met with that code. It was only when I made sure she would not "gig" me on this type of thing that she goes into the whole, "one iterator per object" etc....[04:46:50] *** nvictor has joined ##java[04:46:57] <yobo2> well[04:47:16] <yobo2> are you sticking to the 'contract' defined by the IterableMonomialCollection?[04:47:18] *** nvictor has left ##java[04:47:52] *** nwmcsween has joined ##java[04:47:53] <brwnphyscst> She want me to pretty much duplicate what I am doing with the iterators, but with some CS-101 way of doing it, where you have an explicit parameter for the constructor which tell the binarytree structure which add method to use, when adding.[04:48:01] <yobo2> e.g. if i was dealing with an IterableMonomialCollection and didn't necessarily know whether it was your MonomialCollection or something else, would i be surprised when i called iterator()?[04:48:04] <nwmcsween> ok how do I return an array?[04:48:13] <yobo2> interesting[04:48:16] <yobo2> well if she wants that then do it[04:48:19] <yobo2> that shouldnt be too hard[04:48:25] <brwnphyscst> Hm.[04:48:32] <yobo2> even with your current setup; add a constructor parameter and have iterator() return one of those 3 depending on what it was.[04:48:38] <AgentScorpion> any ideas?[04:48:47] <yobo2> if it makes her feel more comfortable make the 3 iterator methods you have now private or something.[04:49:12] <yobo2> i dont see whats to gain by that but whatever; as long as your thinking about it your smart, so just give her what she wants.[04:51:21] <brwnphyscst> Dude. this is exactly the dialog that I was hoping for. Even if someone said that I was completely off, I would still be just as content because I have some input. Thanks for the dialog, yobo2: and rdancer: (but I think he left...)[04:51:45] <yobo2> np[04:51:51] <[TechGuy]> AgentScorpion: Your issue is line 10. BTW, you're setting an output, which would be for writing. Why?[04:52:02] <brwnphyscst> I still think she is full of shit though.[04:52:08] <yobo2> think of her as a client. then multiply the weirdness by 1000 and youll almost be ready for reality.[04:52:21] <brwnphyscst> Hehehehee.!!!!!!!!!1[04:53:56] <AgentScorpion> [TechGuy]: sorry, should be http://rafb.net/p/c3O9de64.html[04:54:56] <AgentScorpion> Essentially, I can get it working from a file, but I can't see how to set the input to a file in the Jar archive[04:55:57] <[TechGuy]> you don't get access to files in JARs. You access them as resource streams[04:56:07] <yobo2> AgentScorpion: does something here help: http://www.google.com/search?hl=en&q=java+load+image+from+jar+file[04:56:11] <yobo2> there are some examples in the first few results[04:56:45] *** woogley has joined ##java[04:57:09] *** Luminari has quit IRC[04:58:19] *** beol has joined ##java[04:58:51] *** Scott_Dude25 has left ##java[04:59:57] *** brwnphyscst has left ##java[05:06:42] *** zacs7 has joined ##java[05:07:57] *** [TechGuy] has quit IRC[05:10:40] <AgentScorpion> doesn't help[05:11:06] <AgentScorpion> i need to provide the file to a imagereader, and all the examples create a image object instead[05:16:15] *** Thamster has joined ##java[05:16:51] <Thamster> is javaFx worth a damn?[05:18:51] *** Agrajag- has joined ##java[05:20:21] *** mosno has joined ##java[05:20:42] *** BSWolf has joined ##java[05:21:38] <Agrajag-> i'm trying to use jaxb xml marshalling. i've created java classes with xjc and when i create the elementTypes then marshal them i get no namespace definitions in the output XML. however if i marshal(objectFactory.createFoo(fooType)); instead of just marshal(fooType), then i do get namespace stuff - but only in the root element[05:22:05] *** aleksei has quit IRC[05:22:53] <dmlloyd> maybe you didn't specify the right formElementDefault somewhere (in your xsd maybe?)[05:24:03] <Agrajag-> but from other examples thati 've found, it seems normal that the namespace definitions only come from the ObjectFactory.createFoo(fooType); methods, not from objectFactory.createFooType(); ?[05:25:01] *** cactaur has joined ##java[05:25:21] <Agrajag-> i create all my elements with createFooType(); and call the setters on them, then add them to the rootType's object, then marshal the root element - but by calling objectFactory.createFoo(fooType);[05:26:22] *** ShadowHntr has joined ##java[05:26:33] <Agrajag-> i think i somehow need to also call the objectFactory's createBar() methods for the child elements? but i don't know how to then build the document with just JAXBElement's (which is what objectFactory.createBar(BarType) returns)[05:26:34] *** zacs7 has quit IRC[05:26:42] <Agrajag-> sorry if i'm not making sense.. bit hard to describe :)[05:27:59] <dmlloyd> I think it has to do with formElementDefault[05:28:18] <Agrajag-> http://blogs.sun.com/enterprisetechtips/resource/JAXBSample.java - in that example, on the line "JAXBElement<JustAType> e = aObj.createJustAnElement(t);" is where they create the JAXBElement to be marshalled - that example is simple though, that element has no children[05:28:19] <dmlloyd> elementFormDefault="qualified"[05:28:24] <dmlloyd> in your xsd[05:28:47] <dmlloyd> assuming that you're creating the classes from an xsd[05:29:18] <Agrajag-> i am.. but i don't have control of the xsds[05:29:40] <phix> dmlloyd: what is your specialality in java?[05:29:56] <Agrajag-> actually this is already in the xsd: elementFormDefault="qualified"[05:30:05] <dmlloyd> then you probably shouldn't use xjc to create the classes - I'd create the classes and use the annotations to bind to the schema[05:30:23] <dmlloyd> ok, then I don't know why it wouldn't qualify the elements with a namespace[05:30:38] <dmlloyd> anyway the namespace is inherited, so it only needs to be on the root element[05:30:50] <Agrajag-> hmm ok[05:31:00] <dmlloyd> phix: server side stuff - threads, marshalling, networking, logging[05:31:19] <dmlloyd> a little security stuff here and there[05:31:43] <dmlloyd> JBoss Remoting is my primary project right now[05:31:55] <dmlloyd> it has tendrils into all those fields[05:32:28] <phix> dmlloyd: nice, so no gui?[05:32:32] <dmlloyd> nah[05:32:38] <dmlloyd> and I hate web app development :)[05:32:44] <phix> aawww, fail for me :)[05:33:00] <dmlloyd> I'd do a little swing, just for fun, if I had the time. I like the client/server model far better than writing web apps.[05:38:53] <jstream> Can I read the 2nd character in a string using something like smallstring = bigstring[1]; ?[05:41:13] *** G0-T0 has joined ##java[05:41:37] *** zacs7 has joined ##java[05:43:16] *** delskorch has quit IRC[05:43:28] *** CrypticSquared has joined ##java[05:44:20] <dmlloyd> ~~ jstream javadoc String.charAt(int)[05:44:22] <javabot> jstream: http://is.gd/iGKT [java.lang.String.charAt(int)][05:44:41] <dmlloyd> ~~ jstream javadoc String.subString(int, int)[05:44:42] <javabot> jstream: http://is.gd/iifN [java.lang.String.substring(int,int)][05:45:53] *** aTypical has quit IRC[05:46:23] *** Kwitschibo has quit IRC[05:47:20] *** G0-T0 has quit IRC[05:47:40] *** Junior has joined ##java[05:47:42] *** yclian has joined ##java[05:48:03] <Junior> good morning[05:50:06] <dmlloyd> good night[05:53:57] <waz> good riddance[05:54:35] *** dk_schrute is now known as svm_invictvs[05:56:15] *** jdrake has joined ##java[05:56:26] <nwmcsween> I think i've created the worlds worst random output generator[05:58:22] <jdrake> In Linux (debian) I am running netbeans and I have noticed in it and other java apps that the menus do not have any frames around them, only white background. Has anyone ever heard of this?[05:58:34] *** beol has quit IRC[06:00:00] <nwmcsween> http://paste.pocoo.org/show/103648/[06:00:10] <nwmcsween> god i'm rusty at compsci[06:01:08] *** meanburrito920_ has quit IRC[06:06:19] *** mySQLnoob has joined ##java[06:07:30] *** zacs7 has left ##java[06:07:34] <mySQLnoob> question... if i have to open a file that's before my current user.dir, how do i do that? i tried user.dir+"../filename" but it doesnt work.. how do i go back a lvl?[06:09:01] *** linxuz3r has joined ##java[06:09:02] <linxuz3r> hi[06:09:03] *** ShadowHntr has quit IRC[06:09:13] *** bhz- has joined ##java[06:09:27] <linxuz3r> java sources name and classes name cant have numbers in them[06:10:52] <nwmcsween> ....ok[06:12:22] *** yobo2 has quit IRC[06:12:31] *** rullie has joined ##java[06:13:03] <svm_invictvs> grumble[06:13:11] <svm_invictvs> Why did Java not have generics until Java5?[06:13:17] <svm_invictvs> Who's brilliant fucking plan was that?[06:13:34] *** blankthemuffin_ has joined ##java[06:14:02] <kercyr> to include it or to not have it the first place?[06:14:26] <nwmcsween> ...[06:14:51] <svm_invictvs> Not to have it.[06:15:06] <svm_invictvs> Because I'm writing legacy java code right now.[06:15:18] <svm_invictvs> And I'm throwing around a bunch of asserts and shit.[06:15:20] <svm_invictvs> Secondly...[06:15:30] <svm_invictvs> The fact that they did implement it so late....[06:15:42] <svm_invictvs> They made it half baked for the sake of compatibility.[06:15:48] <waz> svm_invictvs: you have the bot code compiling right?[06:16:07] <svm_invictvs> waz: I've always got it to compile...[06:16:24] *** doubleagent has joined ##java[06:16:38] <svm_invictvs> waz: Did you want my flood plugin so the bot would shut me up?[06:16:54] <svm_invictvs> waz: I'm gonna pull the latest update. I've been a bit dstracted with my own projects.[06:17:02] <waz> Running TestSuite[06:17:03] <waz> log4j:WARN No appenders could be found for logger (org.quartz.core.SchedulerSignalerImpl).[06:17:03] <waz> Running TestSuite[06:17:03] <waz> log4j:WARN No appenders could be found for logger (org.quartz.core.SchedulerSignalerImpl).[06:17:04] <waz> oops[06:17:08] <waz> seen that?[06:17:14] <svm_invictvs> For the bot?[06:17:17] <waz> yeah[06:17:31] <svm_invictvs> yeah, just add a root logger and it'll pick up anything not defined in teh log4j.[06:17:45] <svm_invictvs> That's what I did.[06:17:57] <waz> k[06:18:17] <doubleagent> would anyone here be able to help me with some xml dom validation?[06:18:42] <doubleagent> i'm pretty sure it's a simple problem[06:18:44] <waz> ~anyone[06:18:44] <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.[06:18:50] <mySQLnoob> i can doubleagent[06:18:59] <mySQLnoob> i've been working on it for the past few weeks[06:19:15] <doubleagent> sweet - i'll post my code. one sec[06:19:45] <mySQLnoob> if i have to open a file that's before my current user.dir, how do i do that? i tried user.dir+"../filename" but it doesnt work because it literally puts the dots in the path!.. how do i go back a lvl? anyone?[06:20:07] *** basix has quit IRC[06:20:49] <doubleagent> http://omploader.org/vMThwNg[06:20:52] <doubleagent> there's my code[06:21:11] <doubleagent> http://omploader.org/vMThwNw[06:21:14] <doubleagent> there's the dtd[06:21:41] <mySQLnoob> let me see[06:21:45] <doubleagent> i'm compiling like this: javac -cp .:/usr/share/jaxp/lib/jaxp-ri.jar:/usr/share/sun-dtdparser/lib/sun-dtdparser.jar myreader.java[06:22:02] <doubleagent> and am running similarly: java -cp .:/usr/share/jaxp/lib/jaxp-ri.jar:/usr/share/sun-dtdparser/lib/sun-dtdparser.jar myreader[06:22:02] <kercyr> getParent()?[06:22:12] <mySQLnoob> can u just paste it in pastebin?[06:22:13] <svm_invictvs> waz: did that work?[06:22:30] <doubleagent> sure[06:22:33] <doubleagent> one sec[06:23:11] <mySQLnoob> kercyr: getParent()?[06:23:13] <waz> yah[06:23:15] <waz> thanks[06:23:43] <kercyr> in java.io.File[06:24:13] <mySQLnoob> kercyr: sweet i see it now.. let me try that, i'd just hug you if i could[06:24:39] * kercyr backs away slowly[06:26:13] <mySQLnoob> im a girl >_>[06:26:29] <mySQLnoob> fine i'll just wave[06:28:26] <doubleagent> alright, i think everything's up now[06:28:37] <doubleagent> code: http://pastebin.com/mdab0582[06:28:46] <doubleagent> xml: http://pastebin.com/m7ba6f60f[06:28:55] <doubleagent> dtd: http://pastebin.com/m278c3bc7[06:29:05] <doubleagent> other info: http://pastebin.com/m16488e73[06:29:11] *** Riov has quit IRC[06:31:04] <doubleagent> wait...[06:31:12] <doubleagent> this also contains the error message: http://pastebin.com/m6b56dcf6[06:32:54] *** yxxm has quit IRC[06:33:54] <reverend> there are no girls on the internet[06:33:58] <reverend> you've been duped[06:34:08] *** rullie has quit IRC[06:35:19] *** rawblem has joined ##java[06:35:57] *** amnesiac has joined ##java[06:36:04] <doubleagent> mySQLnoob, what do you think?[06:36:51] <mySQLnoob> doubleagent: give me a minute, im looking at them[06:36:59] <doubleagent> sure :) ty[06:37:00] <mySQLnoob> reverend: now that's very sexist[06:39:37] <mySQLnoob> i definitely love xsd better[06:41:33] <doubleagent> i'm actually looking at that line...like i used the wrong constant[06:41:50] *** Frostix has quit IRC[06:42:11] *** rainmann has joined ##java[06:42:55] *** Riov has joined ##java[06:43:16] *** aceofspades19 has joined ##java[06:44:00] <mySQLnoob> not seeing anything so far, still looking[06:44:16] *** BSWolf has quit IRC[06:44:17] *** BSWolf2 has joined ##java[06:44:42] *** waz has quit IRC[06:44:55] *** Resistance has quit IRC[06:45:15] *** BSWolf2 is now known as BSWolf[06:46:01] <mySQLnoob> aren't u missing elements in operations?[06:46:17] <mySQLnoob> w and h[06:47:34] <doubleagent> no...factor[06:47:56] <doubleagent> ((w, h) | factor),...[06:48:07] <mele-> ~aolbonic[06:48:07] <javabot> mele-, I have no idea what aolbonic is.[06:48:11] <mele-> ~aol[06:48:11] <javabot> mele-, I have no idea what aol is.[06:48:56] <doubleagent> mySQLnoob, there shouldn't be anything wrong with the xml & dtd...my C code validates it[06:49:13] <doubleagent> there's something wrong with my java code, or the way i'm compiling it, or something isn't set up correctly[06:49:32] <doubleagent> i'm beginning to think that i don't have a dtd validator[06:49:46] <doubleagent> which seems strange[06:50:11] <mySQLnoob> doubleagent: if yur C code validates it then let me double check because it does seem strange[06:50:51] <doubleagent> could it be an issue with my system..do i not have the correct packages installed?[06:51:15] *** Csow has quit IRC[06:52:05] <mySQLnoob> i doubt it'd be that[06:52:20] <mySQLnoob> you wouldn't be getting that kind of error[06:54:02] *** euvitudo has quit IRC[06:57:13] *** EtherNet has quit IRC[06:58:06] *** mosno has quit IRC[06:58:31] <doubleagent> alright...think I fixed it[06:58:39] <doubleagent> I was going about it the wrong way[06:58:48] *** Resistance has joined ##java[06:59:27] <doubleagent> Well, actually I was misinterpreting what I thought that was doing[06:59:33] <l3ns> Hi everyone.[06:59:45] <doubleagent> calling parse on the DocumentBuilder will actually validate the xml[06:59:54] <doubleagent> and throw errors if it doesn't work[07:00:07] <doubleagent> Since it was getting past that line, the xml _did_ validate[07:00:11] <doubleagent> my mistake[07:00:19] <doubleagent> problem solved...thanks :)[07:00:51] <doubleagent> well...there is actually one caveat.[07:01:16] <doubleagent> DocumentBuilderFactory: setValidating(true);[07:01:25] <doubleagent> it defaults to false for some reason[07:06:14] *** Kalianyia has quit IRC[07:06:44] *** jstream has quit IRC[07:06:50] *** Kwitschibo has joined ##java[07:11:05] <whaley> ~pbv[07:11:06] <javabot> Java only supports pass by value, *NOT* pass by reference. (References to objects are passed by value). For more information please see the following link: http://javachannel.net/wiki/pmwiki.php/FAQ/PassingVariables[07:11:38] *** BSWolf has quit IRC[07:15:58] *** doubleagent has quit IRC[07:21:49] *** twobytes has quit IRC[07:23:41] *** jonaslund has quit IRC[07:26:03] *** Shirik has joined ##java[07:26:20] *** durka42 has quit IRC[07:26:53] *** twobytes has joined ##java[07:26:57] <Shirik> This may be an effort in futility, but I'll ask anyway to see if anyone has ideas. My program is modular, that is, people can write modules for it, distribute JAR files, and they get dynamically loaded. I'd like to try to protect the user by analyzing things these modules might try to do (such as delete all files) and block it.[07:27:03] <Shirik> Is installing a security manager the right way to do this?[07:28:08] <Shirik> Naturally the optimum solution would be "ensure your users aren't morons," but we all know that isn't going to happen anytime soon[07:28:24] *** mySQLnoob has quit IRC[07:30:19] <r0bby> Shirik: why are you not using something like osgi?[07:30:26] <Shirik> I am using osgi[07:30:26] <r0bby> ~~ Shirik osgi[07:30:26] <javabot> Shirik, osgi is a module system for Java, defined by http://www.osgi.org/ . It's a lot cooler than you'd think, even despite Eclipse relying on it for bloody well everything. The documentation isn't so great at osgi.org, but this is an excellent tutorial: http://www.theserverside.com/tt/articles/article.tss?l=OSGiforBeginners[07:30:31] <r0bby> ahh ok[07:31:00] <r0bby> yeh i'd use a securitymanager -- but i'm not well versed in that crap[07:31:03] <Shirik> But it is my understanding that all bundles will have access to, e.g., java.io.File[07:31:08] <r0bby> have a good one[07:32:57] <Shirik> :) Well, I'm just ignoring the possibility for now, but it's been sitting in the back of my mind as "something to do after everything seems to be running well"[07:36:27] *** squi has quit IRC[07:36:28] *** mele- has quit IRC[07:37:24] *** cactaur has quit IRC[07:39:08] *** casmo has quit IRC[07:39:44] *** ldam has quit IRC[07:45:49] *** bas-i has joined ##java[07:55:14] *** twobytes has quit IRC[07:57:59] *** sebr is now known as sebr_afk[08:02:27] *** cybereal has joined ##java[08:03:54] *** theatrus has quit IRC[08:04:05] *** woogley has quit IRC[08:04:42] *** theatrus has joined ##java[08:07:44] <svm_invictvs> pr3d4t0r: What'st he skulled thing?[08:07:50] <svm_invictvs> I'm at home and I cant' et in trouble.[08:07:52] <svm_invictvs> ~logs[08:07:53] <javabot> channel logs can be found at http://www.antwerkz.com/javabot/javabot/home (Select the channel from the list on the left-hand side.)[08:08:31] *** ldam has joined ##java[08:08:37] *** jeukku has joined ##java[08:08:49] *** rainmann has quit IRC[08:09:23] *** zerobytes has joined ##java[08:09:46] *** BSWolf has joined ##java[08:11:26] *** scorchsaber has quit IRC[08:12:26] <svm_invictvs> pr3d4t0r: Tahts' fucking stupid, imo.[08:16:35] <dangertools> and really really old[08:19:07] <svm_invictvs> Shake that bear[08:19:07] <svm_invictvs> lol[08:20:17] <svm_invictvs> I just read the descritpion[08:20:21] <svm_invictvs> I didn't need to watch the video.[08:22:03] *** zerobytes is now known as twobytes[08:22:14] *** twobytes is now known as zerobytse[08:22:23] *** metaperl has quit IRC[08:22:36] *** zerobytse is now known as zerobytes[08:23:27] *** mikeym has quit IRC[08:25:28] *** zerobytes is now known as twobytes[08:25:49] *** twobytes is now known as zerobytes[08:27:08] *** zerobytes is now known as twobytes[08:27:40] *** twobytes is now known as zerobytes[08:27:59] *** zerobytes is now known as twobytes[08:28:28] *** twobytes is now known as zerobytes[08:29:19] *** zerobytes is now known as register[08:29:31] *** register is now known as zerobytes[08:30:26] <whaley> that's quite enough[08:30:30] *** zerobytes has quit IRC[08:30:43] <nwmcsween> i guess it was[08:30:53] <svm_invictvs> ok..[08:30:55] <svm_invictvs> ~ops[08:30:55] <javabot> to a list of the channel ops type: /msg chanserv access ##java list. If you have an issue with channel operations, contact any of the above.[08:31:04] *** shadewind has quit IRC[08:33:16] <svm_invictvs> ChanServ: access list[08:33:17] <svm_invictvs> pft[08:34:53] *** zerobytes has joined ##java[08:35:56] <svm_invictvs> is tehre a way to set conditional breakpoints in eclipse?[08:42:59] *** lamby has left ##java[08:46:48] *** carrus85 has joined ##java[08:48:07] *** squi has joined ##java[08:48:24] *** carrus85 has quit IRC[08:50:59] *** bindaas has joined ##java[08:52:00] *** isr` has joined ##java[08:52:12] <isr`> hey[08:52:26] <isr`> got a new project spec, looks pretty ridiculous[08:52:31] <isr`> i have a month to learn awt/swing[08:52:53] <isr`> i just started using java 3 weeks ago. someone shoot me[08:54:20] *** Resistance has quit IRC[08:54:37] <svm_invictvs> Have you used other, similar languages before?[08:58:21] <Shirik> swing really is a piece of cake, you just have to sit down and learn it[08:58:33] <Shirik> Sun has a tremendous amount of documentation and tutorials for it[08:58:56] <isr`> svm_invictvs: yeah[08:59:14] <isr`> i mean, what do you mean by similar[08:59:21] <Shirik> Have you used OOP languages before?[08:59:37] <Shirik> perhaps C++? If so you'll be fine[08:59:42] <isr`> i've used c, c++, python, php, and others[08:59:43] <isr`> yeah c++[08:59:57] <isr`> i have some experience with QT and wxWidgets in c++[09:00:19] <svm_invictvs> If you're a competent programmer[09:00:23] <svm_invictvs> (Spelling?)[09:00:32] <svm_invictvs> And can read APIs you're fine.[09:00:37] *** amit1 has joined ##java[09:00:38] <isr`> yea[09:00:39] <svm_invictvs> (Read and understand)[09:00:41] <isr`> its just a lot to take in[09:01:09] *** porcelain_doll has joined ##java[09:01:10] <dangertools> isr`: there's Qt for Java (QtJambi) - you maybe want to "update" your spec ;)[09:01:16] <isr`> basically the project is to reverse engineer java files :-P[09:01:32] <isr`> java file as input yeilds UML diagram as output[09:01:35] <isr`> so its somewhat substantial[09:01:52] <isr`> but i have to use a JTree[09:01:58] <isr`> which has got me scared pooless[09:02:07] *** dpy has joined ##java[09:02:16] *** ridoo has joined ##java[09:03:56] *** shadewind has joined ##java[09:05:06] *** FMJaguar has quit IRC[09:06:35] *** skoskav has quit IRC[09:06:47] *** jeremy_c has quit IRC[09:07:11] *** dos000 has quit IRC[09:08:08] *** mistik1_ has joined ##java[09:09:05] *** jeukku has quit IRC[09:09:32] *** nihilis7 has quit IRC[09:09:40] *** shervin_a has joined ##java[09:10:16] *** Levia has quit IRC[09:10:48] *** tilerendering has quit IRC[09:11:24] *** magcius has quit IRC[09:13:01] *** supersako has quit IRC[09:13:51] *** skoskav has joined ##java[09:15:24] <Woflborg> heh[09:16:18] <Woflborg> isr`: you'll do fine :P Swing is one of the easiest things to get started with.[09:16:44] *** pierrep has joined ##java[09:18:19] *** TooAngel has joined ##java[09:18:26] *** jeukku has joined ##java[09:18:50] *** TooAngel has left ##java[09:18:57] *** mistik1 has quit IRC[09:18:57] *** mistik1_ is now known as mistik1[09:19:26] *** deSilva has joined ##java[09:19:26] *** thepointer-work has quit IRC[09:22:26] *** agnul has joined ##java[09:22:46] <Thamster> what's the best data struct for fifo in Java .[09:23:20] *** bushwakko has joined ##java[09:23:56] <dangertools> what's the usual datastructure that implements FIFO?[09:24:39] <Thamster> a queue?[09:24:56] <bushwakko> Caused by: java.lang.UnsupportedClassVersionError: (org/coos/messaging/osgi/COOSActivator) bad major version at offset=6 <-- I get this error while trying to fire up my bundle on a j2me[09:25:13] <dangertools> Thamster: right[09:25:51] <bushwakko> I thought it was because I compiled it with java 1.6, but then I compiled with 1.5 and got same error[09:26:08] <bushwakko> would think I'd get offset=5 with java 1.5[09:26:11] <Thamster> linked list?[09:26:38] <shadewind> ~~ Thamster javadoc queue[09:26:40] <javabot> Thamster: http://is.gd/j7uY [javax.jms.Queue]; http://is.gd/j7uZ [java.util.Queue][09:26:55] <shadewind> any class implementing the latter[09:27:02] *** gdoko has joined ##java[09:27:59] <Thamster> did you try java 1.4 ?[09:28:28] <bushwakko> nope, not yet[09:29:28] <bushwakko> compiling with 1.4.2 now[09:29:50] <Thamster> yeah i would just check what version of java the jar or class you are trying to use needs[09:29:56] <Thamster> thats usually what that error means[09:30:02] <bushwakko> but, if the offset=6 actually means that it's 1.6, then maven is still using 1.6 even though my default cli version is 1.4[09:30:24] <bushwakko> but can't really find any info on that error and what "offset" means[09:31:52] *** webPragmatist has joined ##java[09:32:01] <webPragmatist> is it possible to clear all fields in a jframe?[09:32:16] <shadewind> offset means offset into the class file probably[09:32:23] <dangertools> webPragmatist: all fields?[09:32:29] <webPragmatist> text fields[09:32:38] <webPragmatist> and check boxes?[09:32:44] <webPragmatist> and radio group selections?[09:32:46] <shadewind> yes[09:32:50] <shadewind> but not automatically[09:32:51] *** linxuz3r has quit IRC[09:32:59] <webPragmatist> oh just one by one?[09:33:03] <dangertools> yes[09:33:12] *** jeukku has quit IRC[09:33:14] <webPragmatist> bummer[09:33:25] *** xjkx has joined ##java[09:33:31] <dangertools> bushwakko: you do not compile j2me code using a j2se compiler[09:33:33] <shadewind> retrieve the components from the JFrame and check the type of them and do something appropriate according to the type[09:33:54] <bushwakko> dangertools: aha, that might be the problen then :P[09:33:59] <webPragmatist> meh there's not enough to use my brain[09:35:47] <bushwakko> so I have to set up my maven repo to make an additional jar for j2me ?[09:36:14] *** jeukku has joined ##java[09:36:16] *** perry753 has joined ##java[09:37:26] *** FauxFaux has joined ##java[09:41:12] *** jeukku has quit IRC[09:42:10] <webPragmatist> can you prevent a window from closing using the "onClosing" event/[09:42:43] *** isr` has left ##java[09:44:19] <dangertools> ~~ webPragmatist javadoc JFrame.setDefaultCloseOperation(int)[09:44:21] <javabot> webPragmatist: http://is.gd/jgk7 [javax.swing.JFrame.setDefaultCloseOperation(int)][09:50:07] * Logi feels that wicket, DWR and Hibernate should support the SPI to pick up converters and persisters[09:50:25] * cybereal feels they should use OSGi instead[09:51:12] <Logi> I've not looked at OSGi, but I've a feeling that it would be a bit more involved[09:51:35] <Logi> btw, dows DWR look dead to anyone else?[09:52:16] <Logi> there is a 3.0 release candidate out, with a couple of outstanding bugsand no movement since ~October[09:52:40] *** tilerendering has joined ##java[09:53:44] <cybereal> that rc came out in december, not october[09:54:18] *** dunmer has joined ##java[09:54:22] <cybereal> anyway r0bby is the big DWR hard-on wielding fanboy of the channel afaik[09:54:25] <cybereal> maybe he has a better idea ;)[09:54:42] *** Resistance has joined ##java[09:56:09] *** bushwakko has quit IRC[09:57:13] *** bashoh has quit IRC[09:58:33] *** wlfshmn has joined ##java[09:59:09] *** perry753 has quit IRC[10:02:33] *** svm_invictvs is now known as dk_schrute[10:02:42] *** mocas has quit IRC[10:03:28] <Logi> cybereal: ok[10:04:24] *** medjr has joined ##java[10:06:12] <medjr> i'm using netbeans and i need to use some classes and interfaces that are in a .jar file, how can i do that please ?[10:07:55] <porcelain_doll> medjr: in the projects window you have a "Libraries" directory, right click on it and you can add jars...[10:08:08] *** bas-i has quit IRC[10:08:49] <medjr> and the imports : what is the path to use ???[10:08:59] *** gnech has quit IRC[10:09:02] <medjr> let's say that my .jar is named xx.jar[10:10:40] <porcelain_doll> medjr: what netbeans does is including that jar file in your classpath. when it's included you can look into the package names and whatnot for importing the classes/ interfaces you want[10:11:02] *** ankylose has joined ##java[10:11:09] *** zophy has joined ##java[10:15:19] *** bindaas has quit IRC[10:17:35] *** dheeraj_k has joined ##java[10:18:05] *** gregor_k has joined ##java[10:18:05] <dheeraj_k> is it possible to use arrayList with dwr?[10:19:23] *** Junior has quit IRC[10:20:36] *** thpar has joined ##java[10:22:49] <medjr> ok porcelain_doll thx very much[10:23:06] *** amnesiac has quit IRC[10:24:23] *** kapipi has joined ##java[10:25:11] *** valcker has joined ##java[10:30:08] *** xjkx has quit IRC[10:32:42] *** isr` has joined ##java[10:32:45] *** nijm has joined ##java[10:33:34] *** vesz has joined ##java[10:34:33] *** KikiJiki has joined ##java[10:40:05] *** convivial has quit IRC[10:41:59] *** geaaru has joined ##java[10:53:18] *** umz has joined ##java[10:54:30] *** ErebFaer has quit IRC[10:54:38] *** jamil_1 has joined ##java[10:56:41] *** Angel-SL has joined ##java[11:01:48] *** Levia has joined ##java[11:02:27] *** geaaru has quit IRC[11:04:59] *** geaaru has joined ##java[11:06:41] *** Resistance has quit IRC[11:06:49] *** Resistance has joined ##java[11:09:07] *** justafish has joined ##java[11:11:04] <wlfshmn> Is there a conveineit way to schedule a runnable for execution on the swing EDT, similar to MIDP's callSerially()?[11:12:18] <medjr> i'm using netbeans, how can i add the documentation for a .jar ??? (i have the dowumentation in a .jar file)[11:13:44] <medjr> ??[11:14:22] <dangertools> medjr: this is ##java, not #netbeans[11:15:07] *** dheeraj_k has quit IRC[11:15:44] *** umz has quit IRC[11:16:01] <wlfshmn> ah, never mind, found my answer[11:16:11] *** umz has joined ##java[11:16:36] *** nijm has quit IRC[11:18:04] <l3ns> How can I make more than one textfields in a dialog?[11:18:54] <dangertools> l3ns: create more, add more[11:19:08] <l3ns> I tried putting textfields in a JPanel and passed it to the dialog[11:19:20] <l3ns> but seems not working..[11:20:24] <dangertools> read up on layout managers[11:21:41] <l3ns> dangertools: Okay, will do that.[11:21:48] *** cristi_an has joined ##java[11:22:13] <cristi_an> hi there : i am confused about the 2 types of jax-ws rpc and message oriented[11:22:24] <cristi_an> anyone know what glassfish implements (metro) ?[11:22:44] <l3ns> dangertools: Yes, that's what I did..[11:23:24] <l3ns> xxxx.getContentPane.add(textfield1);[11:24:23] <l3ns> I am unsure though what to put on that xxx portion..[11:24:43] <isr`> naked pictures[11:24:59] <medjr> lol[11:25:01] <l3ns> :|[11:25:40] <dangertools> l3ns: learn layout managers, add your components to a container. a panel can be a container, a content pane is usually the container of a Frame[11:26:38] <isr`> wait isn't a frame a window?[11:26:45] *** Thamster has quit IRC[11:26:59] *** hiwk has quit IRC[11:27:01] <l3ns> dangertools: Yes I got that part..[11:27:14] <l3ns> my program however is different...[11:27:29] <l3ns> i have one jframe and has a menu[11:27:29] *** bashoh has joined ##java[11:27:44] <l3ns> then when I click the menu, a dialog pops up[11:27:51] <l3ns> that asks for user and pass..[11:29:00] <l3ns> I am successful displaying the dialog box: JOptionPane.showInputDialog();[11:29:13] <l3ns> but has only one textfield..[11:29:40] *** amit1 has quit IRC[11:30:02] <dangertools> you never said that you use JOptionPane. However, its api allows to place more components in it - but you should consider using a JDialog[11:31:46] <l3ns> dangertools: So you mean, I have to create another class that extends JDialog?[11:32:00] <dangertools> you should use a JDialog, not extend it[11:32:06] <dangertools> composition vs. inheritance[11:34:25] *** Shirik has quit IRC[11:35:33] <l3ns> dangertools: I will look into JDialog.. brb....[11:35:45] *** cristi_an has left ##java[11:38:55] *** _stack has joined ##java[11:40:27] <l3ns> dangertools: The reason why in my case JDialog is better than JOptionPane is that I am modifying the dialog with three textfields?[11:40:30] *** ramdam has quit IRC[11:41:16] <dangertools> l3ns: you modify nothing. you want a dialog with 3 text fields, JOptionPane is not the first choice for this task[11:42:03] *** cyzie has quit IRC[11:42:40] *** orgy` has joined ##java[11:43:27] *** vinse has quit IRC[11:44:40] *** yclian has quit IRC[11:45:25] *** skoskav has quit IRC[11:45:52] *** Bevin has joined ##java[11:45:53] <l3ns> dangertools: what is the counterpart of JOptionPane.showInpuiDialog() in JDialog?[11:48:09] <umz> Hey[11:48:32] <umz> I need some help am using RMI to get the server public key[11:48:48] <umz> but when I invoke method I get exception of java lang null[11:48:53] <umz> !ping me[11:48:59] <umz> ~tell rmi[11:50:32] <ilyak> hi *[11:50:35] *** juc0 has quit IRC[11:50:51] *** Daniel_H has joined ##java[11:51:07] <dangertools> ~~ l3ns api[11:51:07] <javabot> l3ns, api is http://java.sun.com/javase/current/docs/api/index.html[11:52:02] <l3ns> dangertools: Here's what I did..[11:52:16] <l3ns> JDialog dialog;[11:52:47] <l3ns> dialog = new JDialog(frame, "dialog", false);[11:52:53] *** yclian has joined ##java[11:53:25] <l3ns> dialog.getContentPane.add(panel);[11:53:59] <dangertools> next time use a pastebin[11:54:24] *** kane77 has joined ##java[11:55:04] *** NielsD has quit IRC[11:55:08] <l3ns> What is a pastebin?..[11:55:23] *** NielsD has joined ##java[11:55:29] <dangertools> ~pastebin[11:55:29] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.[11:55:31] <l3ns> dangertools: It does not show the dialog...[11:55:56] <dangertools> it is not meant to show it because you don't tell it to show up[11:56:25] *** goki-_- has left ##java[11:56:28] <l3ns> it is inside the actionperformed method..[11:56:50] <l3ns> i'll paste some part of the code on the pastebin..[11:57:49] <l3ns> Okay there.. same name, l3ns..[11:57:55] <l3ns> http://eugeneciurana.com/pastebin/pastebin.php?show=40210[11:57:57] *** juc0 has joined ##java[11:59:27] *** bas-i has joined ##java[12:01:16] *** Junior has joined ##java[12:02:21] <l3ns> dangertools: Can you please look at my code...[12:02:26] *** CarstenP2 has joined ##java[12:02:27] <l3ns> http://eugeneciurana.com/pastebin/pastebin.php?show=40210[12:03:23] *** skoskav has joined ##java[12:03:54] *** cyzie has joined ##java[12:05:24] *** _stack has quit IRC[12:06:12] *** jonaslund has joined ##java[12:07:24] *** shadewind has quit IRC[12:07:36] *** cybereal has quit IRC[12:07:41] *** jerkface03 has quit IRC[12:09:03] <geaaru> hi, how can i enable ws policy through jboss client library to resolve this error: No Security header in message but required by policy[12:09:08] <geaaru> thanks in advance[12:09:17] *** cybereal has joined ##java[12:10:48] *** romanb has joined ##java[12:10:58] *** morkar- has joined ##java[12:11:32] *** jerkface03 has joined ##java[12:12:36] *** Ven]n has joined ##java[12:12:44] <Ven]n> whats the syntax for importing classes?[12:12:45] <Ven]n> :D[12:13:04] *** medjr is now known as medjr|afk[12:16:05] *** Tenac has quit IRC[12:16:25] *** tilerendering has quit IRC[12:16:27] *** kushal_12_27_200 has joined ##java[12:17:08] *** sombriks has joined ##java[12:17:08] <Ven]n> nevermind[12:20:14] *** viperhr has joined ##java[12:21:44] <dangertools> l3ns: read the documentation for JDialog/JFrame.[12:22:39] <l3ns> dangertools: yep, I forgot to put in setVisible(true);[12:22:58] <l3ns> it shows now a frame but no content on it.....[12:24:49] <dangertools> ~layoutmanager[12:24:49] <javabot> dangertools, layout managers is http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html If the layout managers included with the jdk don't satisfy you, have a look at FormLayout, TableLayout, PercentLayout, HTMLLayout, CentreLayout, or GridLayoutPlus (ask me about each of those to learn more). Book chapter at http://javafaq.mine.nu/lookup?290[12:25:07] *** JanK has joined ##java[12:25:41] <JanK> are cyclic references serializable?[12:26:08] *** Greyhound- has joined ##java[12:27:15] <l3ns> dangertools: Okay....[12:28:53] *** bas-i has quit IRC[12:33:43] *** kushal_12_27_200 has quit IRC[12:36:54] *** goki-_- has joined ##java[12:38:40] *** Woflborg has quit IRC[12:40:32] *** B|ackPanther has quit IRC[12:44:21] *** chillitom has joined ##java[12:45:10] *** umz has quit IRC[12:45:15] *** OsAC has joined ##java[12:45:48] *** keks_ has joined ##java[12:48:52] *** derjohn has quit IRC[12:51:49] *** Resistance has quit IRC[12:53:36] *** juc0 has quit IRC[13:00:28] <l3ns> dangertools: Do you think JFrame and JDialog can be run in one class?[13:00:49] <dangertools> sure[13:01:16] <dangertools> although "run" is not very clear in case of Components[13:01:33] <jottinger> morning[13:02:00] *** vezzoni has joined ##java[13:03:54] *** NielsD has quit IRC[13:04:01] <l3ns> dangertools: Okay..[13:04:11] *** NielsD has joined ##java[13:04:59] *** derjohn has joined ##java[13:06:30] *** kapipi has quit IRC[13:07:12] *** ahughes has quit IRC[13:08:32] <l3ns> dangertools: Thank you very much for the help! :) I will be out for several minutes to grab something to eat.. I will be back to finish reading about layout manager.[13:11:01] *** Vantaa has joined ##java[13:14:15] *** L-----D has joined ##java[13:14:30] *** L-----D has quit IRC[13:16:15] *** HolyGoat has joined ##java[13:18:22] <jottinger> uh oh... jini starter kit fails with java 6[13:18:40] *** skoskav has quit IRC[13:19:41] <wlfshmn> jini.. now there is something you don't see every day..[13:19:46] *** neshaug has joined ##java[13:20:37] *** durka42 has joined ##java[13:22:45] <jottinger> wlfshmn: it's a pity, too[13:22:52] *** OsAC has quit IRC[13:23:47] *** W_work has joined ##java[13:24:43] <wlfshmn> jottinger: didn't you get the memo? we are supposed to use an ESB to be properly SOAed.[13:25:05] *** kulhas has joined ##java[13:25:08] <kulhas> hello[13:25:48] *** skoskav has joined ##java[13:26:19] <jottinger> wlfshmn: bah, I like actual performance[13:26:56] <kulhas> i am trying to use java.xml, and making a idented xml, i am using Trasnformer , and seting ident like this serializer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1"); but its not working ... does anyone knows why ?[13:27:07] <kulhas> ops[13:27:22] <kulhas> serializer.setOutputProperty(OutputKeys.INDENT,"yes");[13:27:53] *** pschriner has joined ##java[13:28:19] <wlfshmn> jottinger: this is not a requirement in SOA. Performance was replaced by interopabile xml, where each service is equally confused.[13:28:42] <jottinger> sure[13:28:49] *** genesiss has quit IRC[13:29:15] <wlfshmn> Atleast my work only claims to be SOA by applying the term loosly to the stuff we aready have[13:29:50] <wlfshmn> not sure what I think about finding myself appreciative of marketing fudging the facts though[13:30:50] *** Resistance has joined ##java[13:32:10] <wlfshmn> I must say, swingworker makes ui coding a little less annoying[13:32:15] *** jamil_1 has quit IRC[13:33:01] *** Pianista has joined ##java[13:33:24] *** nixblicker has joined ##java[13:33:54] *** kapipi has joined ##java[13:34:24] *** alek_b has joined ##java[13:35:58] *** kulhas has quit IRC[13:36:32] *** bashoh has quit IRC[13:36:33] <jottinger> wlfshmn: Jini's biggest challenge is that the project people are brilliant, superintelligent morons[13:37:20] *** tilerendering has joined ##java[13:37:27] <ldam> a fact well known that applies not just to jini[13:37:47] <jottinger> ldam: yes, but jini's morons are both brillianter and more moronic than others[13:37:58] <jottinger> look at how stupid the OSGi people are... then multiply by four[13:38:09] <jottinger> you'll have half the moron score of the jini people[13:38:36] <ldam> hm. Pretty sure the jini people will be proud of that[13:38:54] <jottinger> probably so, because they're STUPID[13:39:02] <jottinger> brilliant, yes. Stupid beyond belief, yes.[13:39:13] *** eidolon has left ##java[13:39:27] *** Spike1506 has joined ##java[13:39:28] *** obnauticus has quit IRC[13:39:42] <jottinger> ticks me off, because I can see jini for what it is[13:40:42] *** alek_b has quit IRC[13:42:09] *** bitshuffler has joined ##java[13:43:57] *** nijm has joined ##java[13:44:04] *** respecting has joined ##java[13:44:44] <selckin> ~jini[13:44:44] <javabot> selckin, jini is a plug 'n play thing for java that also doubles as a general platform for running java on tiny things, and making them communicate together. It's a bit hard to explain in one sentence, see http://www.jini.org/[13:44:49] <respecting> hi please i want to show my session variable.i have a variable session called username i want toshow it in my page welcomeuser.jsp how can i do that ?[13:45:59] <jottinger> respecting: <%= session.getAttribute("username") %>[13:46:02] <W_work> sounds like a question where the answer is in google[13:46:13] <jottinger> W_work: not even there[13:46:20] <jottinger> it's like OSGi but designed for distribution[13:46:23] <respecting> no not in google w work[13:46:35] <W_work> I meant respecting's question...[13:47:16] <W_work> ~~respecting google jsp session variable[13:47:17] <javabot> http://letmegooglethatforyou.com/?q=jsp+session+variable[13:47:27] <respecting> thank you W_work[13:47:29] <respecting> it works[13:47:31] <respecting> :)[13:47:34] <respecting> thx very much[13:48:09] *** jottinger sets mode: +b *!*=c4cb4802@gateway/web/ajax/mibbit.com/x-3acd09bcd1355fb8[13:48:09] *** respecting was kicked by jottinger (golly you're annoying)[13:48:58] *** JanK has left ##java[13:49:06] *** l2trace99 has joined ##java[13:52:50] *** L-----D has joined ##java[13:53:11] *** jottinger sets mode: -b *!*=c4cb4802@gateway/web/ajax/mibbit.com/x-3acd09bcd1355fb8[13:58:58] *** dnmo has joined ##java[13:59:59] *** riotz has joined ##java[14:03:01] *** respecting has joined ##java[14:04:01] <respecting> hello i want to do something(for example System.out.println("hello my page"); once i open a jsp page called for example mypage.jsp(i'm using JSF and JSP) how can i do that please?[14:07:09] *** respecting has quit IRC[14:07:59] *** bindaas has joined ##java[14:08:59] *** Varox has joined ##java[14:11:46] *** path_ has joined ##java[14:14:18] *** bas-i has joined ##java[14:14:22] <path_> is there anything wrong here? http://pastebin.com/m55038601[14:14:51] <path_> it works and highlights words, though spanish and accent words are not highlighted[14:15:10] <path_> I wonder if something enconding-related[14:16:03] *** mohax has joined ##java[14:16:19] *** W_work has quit IRC[14:16:52] *** durka42 has quit IRC[14:16:56] *** skoskav has quit IRC[14:17:30] *** OsAC has joined ##java[14:18:59] *** keks_ has quit IRC[14:20:33] *** waz has joined ##java[14:23:44] *** theblackbox has joined ##java[14:25:53] <le_biloute> Hi, I want to pick out the character which is the most present in a String, is there any method ?[14:27:31] *** skoskav has joined ##java[14:29:32] *** MetaMorfoziS has joined ##java[14:29:35] <MetaMorfoziS> Hi all[14:30:07] <MetaMorfoziS> how can i pass an array to a function that is defined inline? I mean function({2,4,9});[14:30:25] <MetaMorfoziS> ^ this causes syntax error, what is the correct sysntax?[14:30:27] *** yclian has quit IRC[14:32:47] *** medjr|afk has quit IRC[14:33:12] *** respecting has joined ##java[14:33:23] <respecting> i have created a session how can i destoy the session and the cookies of the session when i make logout(i have login and the welcomepage then i have a button called logout)?[14:33:32] *** ggl_7 has joined ##java[14:38:40] *** FireSlash has joined ##java[14:39:04] <mitch0> meta: f(new int[] { 2, 4, 9 }); ?[14:40:40] *** SaEeDIRHA has joined ##java[14:40:42] <MetaMorfoziS> Thank you mitch0![14:42:46] <SaEeDIRHA> hi, when i draw something on Jframe, "Using Graphics g , g.draw" it works fine , but when i minimize the Jframe or bring other window above it, the what i draw removes, how can i make what i draw stable ?[14:45:28] *** OsAC has quit IRC[14:45:47] <ldam> SaEeDIRHA, use proper drawing mechanism: http://java.sun.com/products/jfc/tsc/articles/painting/[14:46:14] *** monkeycid has joined ##java[14:46:43] *** Greyhound- has quit IRC[14:48:33] *** tissue has quit IRC[14:48:41] *** spathi has quit IRC[14:48:53] *** spathi has joined ##java[14:50:35] *** spathi has quit IRC[14:51:31] *** ilyak has quit IRC[14:52:14] *** respecting has quit IRC[14:53:54] *** FireSlash has quit IRC[14:54:16] *** kercyr has quit IRC[14:55:25] *** acuster has joined ##java[14:55:31] *** L-----D has quit IRC[14:55:54] *** L-----D has joined ##java[14:56:46] *** spathi has joined ##java[14:58:38] *** jcrites has quit IRC[14:58:58] *** jcrites has joined ##java[15:00:15] *** geaaru has quit IRC[15:02:38] *** jdolan_ has joined ##java[15:03:27] *** HeatHawk[AP2] has quit IRC[15:03:33] *** HeatHawk[AP2] has joined ##java[15:06:51] *** ggl_7 has quit IRC[15:06:53] *** MetaMorfoziS has quit IRC[15:09:04] <l3ns> dangertools: Finished reading the layout manager... got some changes with my code, still no effect..[15:09:13] <l3ns> the entire code is here: http://eugeneciurana.com/pastebin/pastebin.php?show=40215[15:09:49] *** yclian has joined ##java[15:11:13] *** waz has quit IRC[15:12:00] *** ggl_7 has joined ##java[15:12:07] *** rollins has joined ##java[15:13:15] *** rgravener has left ##java[15:13:22] *** waz has joined ##java[15:14:25] *** geaaru has joined ##java[15:15:16] *** ldam has quit IRC[15:19:44] *** keks_ has joined ##java[15:22:12] *** Bevin has quit IRC[15:22:20] *** rollins has quit IRC[15:23:01] *** Levia has quit IRC[15:24:17] *** deepjoy has joined ##java[15:25:12] *** Junior has quit IRC[15:25:44] <theblackbox> hello all, just want to make sure I've got something right in my head - a ConcurrentModificatioError would be thrown when iterating over a list and one or more of the list elements are changed? is this correct?[15:27:20] <theblackbox> for (Element e:list){ e.field = change} would therefore throw the exception, but for (Element e:list){ change = e.field} would not[15:28:44] *** rollins has joined ##java[15:29:17] * theblackbox gets the tias blues[15:32:12] *** Gracenotes has quit IRC[15:33:32] *** fanti has joined ##java[15:33:52] *** ramdam has joined ##java[15:34:45] <fanti> hello! i like to reload an updated class with a URLClassLoader. but when trying to reload it, the old version is used instead of the new one. is the old class cached somewhere?[15:35:09] *** topping has joined ##java[15:35:23] <topping> greetings[15:35:36] *** crowbar has joined ##java[15:36:06] <topping> anyone know how to track down what thread is using a particular socket? this would be like 'lsof' at the JVM level[15:36:06] <crowbar> Is there a reason enumerations are not iterable? Or is that just a great way for java to annoy me?[15:36:06] *** HockeyInJune has quit IRC[15:36:07] *** pschriner has quit IRC[15:36:44] *** LordMetroid has joined ##Java[15:37:13] <ggl_7> hi there, Im trying to get a grasp of SAX XML parser... so basically I have to extend the DefaultHandler class and override the 'characters', 'startElement', 'endElement' methods?[15:37:20] <LordMetroid> Can one make a timer that is not "busy-updating" but rather act on an interrupt?[15:38:44] *** lyy has joined ##java[15:38:55] *** Necker has joined ##java[15:39:11] *** KingBilly has joined ##java[15:39:15] *** ldam has joined ##java[15:39:22] <LordMetroid> Stupid question, sorry...[15:39:31] <lyy> ?[15:40:01] *** Necker has quit IRC[15:40:59] <crowbar> LordMetroid, Probably isn't. Just ask again in an hour or so.[15:41:00] *** fryderyk has quit IRC[15:42:00] <lyy> what's the question?[15:42:02] <lyy> hehe[15:42:02] *** monkeycid has quit IRC[15:42:20] <crowbar> you should have joined the channel 15 seconds earlier[15:42:46] <lyy> excuuuuse me. I shouldn't seen the future. my bad[15:42:50] <lyy> just kidding :P[15:43:02] <LordMetroid> lyy, <LordMetroid> Can one make a timer that is not "busy-updating" but rather act on an interrupt?[15:43:02] <LordMetroid> * lyy (n=lyy at c-24-16-118-214 dot hsd1.wa.comcast.net) has joined ##java[15:43:04] *** fryderyk has joined ##java[15:43:40] <lyy> what impeccable timing[15:43:42] <LordMetroid> I am thinking, to create a thread with a sleep and add a listener to to be called when the thread wakes up again[15:43:44] <lyy> lol[15:44:03] <lyy> hmmm[15:44:24] <wlfshmn> LordMetroid: we call these Timer/TimerTask, oddly enough[15:44:29] *** userek has quit IRC[15:44:29] <lyy> I did a python project that was of a client-server architecture[15:44:43] <waz> fascinating[15:44:57] <lyy> and I had the server just listen and just do whatever and whenever the client wanted it to do work[15:45:23] <topping> please expand[15:45:44] <waz> whatever!?[15:45:49] <lyy> kinda better then having a thread "busy-updating"[15:45:54] *** G0-T0 has joined ##java[15:46:48] *** G0-T0 has quit IRC[15:46:57] <lyy> hmm[15:47:20] *** SwanR has joined ##java[15:48:03] <lyy> is there a good gui remote app from windows to linux?[15:48:17] <SwanR> Hi - i have a button that went click processes something in the event queue. Ive got round this by making two local classes , one that notifies the other when its finished. This seems like a long winded way of doing it - is it the right way ?[15:48:19] <lyy> ie, something that let's me have a xsessions?[15:48:24] <lyy> oops wrong chat[15:49:18] *** nijm has quit IRC[15:50:44] *** dmlloyd has quit IRC[15:50:55] *** porcelain_doll has left ##java[15:51:16] *** tonyukuk_ has joined ##java[15:51:18] <tonyukuk_> hello[15:51:19] *** dmlloyd has joined ##java[15:51:24] <tonyukuk_> i have one desktop gui application..when I compile my application,then i can see searchform1 form,then when i click DELETE button in searchform1.form then I will see Delete.form the thing is i wanna close previous window when i click delete.form..I meant i wanna close searchform1.form when i see delete.form[15:51:28] *** Odin79 has quit IRC[15:51:38] <tonyukuk_> how i can close the previous window of form?[15:53:56] *** ShanghaiScott1 has joined ##java[15:54:24] *** Varox has quit IRC[15:55:05] *** FMJaguar has joined ##java[15:57:20] *** Angel-SL has quit IRC[15:57:33] *** catmando has joined ##java[15:59:14] *** jabalsad has joined ##java[15:59:14] *** blahjake has joined ##java[16:01:14] *** skoskav has quit IRC[16:01:40] *** dmlloyd has quit IRC[16:02:12] *** dmlloyd has joined ##java[16:04:24] *** Necker has joined ##java[16:05:37] *** Necker has quit IRC[16:05:38] *** Daniel_H has quit IRC[16:06:01] *** dmlloyd_ has joined ##java[16:06:55] *** lyy has quit IRC[16:09:13] *** lataffe has quit IRC[16:09:35] *** HolyGoat has quit IRC[16:09:38] *** skoskav has joined ##java[16:09:47] *** keks_ has quit IRC[16:10:04] *** Necker has joined ##java[16:11:00] *** geaaru has quit IRC[16:13:21] *** ilyak has joined ##java[16:13:24] *** sombriks has quit IRC[16:13:54] <ilyak> Ant question: do I need to call mkdir before doing copy todir="", or it's smart enough to make the directory if it doesn't exist?[16:14:06] <ilyak> The copy task documentation is silent on that[16:14:22] *** topping has left ##java[16:14:28] *** geaaru has joined ##java[16:14:54] *** Daniel_H has joined ##java[16:15:25] <AMcBain> ilyak: what language and if Java, with File?[16:16:11] *** Necker has quit IRC[16:17:00] <AMcBain> (hmm, File doesn't have a copy mechanism, so this must not be Java)[16:17:09] <AMcBain> (or not File, or in the wrong channel)[16:17:14] <ilyak> AMcBain: ant[16:17:17] *** convivial has joined ##java[16:18:17] *** bas-i has quit IRC[16:18:20] <AMcBain> hm, don't know why I did see that prefix ... can't help you there sorry, I have no experience with build programs/dependency managers, whatever that all falls under.[16:18:58] *** Woot4Moo has joined ##java[16:19:00] *** dmlloyd has quit IRC[16:19:24] *** mengu has joined ##java[16:19:26] *** bas-i has joined ##java[16:19:57] *** ggl_7 has quit IRC[16:21:12] <cythrawll> ilyak, you need to mkdir[16:21:47] *** dmlloyd_ is now known as dmlloyd[16:22:00] <cythrawll> you can always try it and see, but I seem to remember getting error messages about that when I forget to mkdir, or forget to run a dependent task[16:23:36] *** [TechGuy] has joined ##java[16:23:55] *** szr has joined ##java[16:25:06] <szr> in a java console application, how does one set the exit status? Like in c/c++ int main() { ... reutrn 123; }[16:25:30] *** Resistance has quit IRC[16:25:39] *** Resistance has joined ##java[16:25:49] <[TechGuy]> ~~szr javadoc System.exit(*)[16:25:51] <javabot> szr: http://is.gd/jinj [java.lang.System.exit(int)][16:25:54] <szr> I know of System.exit(n), but that doesn't seem the same, as it's more like c's exit(n) in that is forces a termination right then and there[16:26:58] <szr> in c/cpp, return just sets the exit status. From what I have read, System.exit(n) isn't thread safe. I just want to set the exit status.[16:27:10] *** polydektes has joined ##java[16:27:37] <[TechGuy]> you do realize you can make main have an int return type also?[16:28:02] *** dnmo has quit IRC[16:28:32] <fanti> hello! i like to reload an updated class with a URLClassLoader. but when trying to reload it, the old version is used instead of the new one. is the old class cached somewhere?[16:28:38] <szr> do you mean "public static int main(String[] args) {" instead of "public static void main(String[] args) {" ?[16:28:53] <[TechGuy]> uh huh[16:29:02] <szr> and 'return n;' will set the exit status, a la c/c++ ?[16:29:07] <tonyukuk_> hello[16:29:09] <tonyukuk_> i have one desktop gui application..when I compile my application,then i can see searchform1 form,then when i click DELETE button in searchform1.form then I will see Delete.form the thing is i wanna close previous window when i click delete.form..I meant i wanna close searchform1.form when i see delete.form[16:29:19] <jonaslund> great, my code is much faster but leaks memory :(([16:29:25] <tonyukuk_> how i can close the previous window of form?[16:29:31] <[TechGuy]> szr: tias[16:29:33] * jonaslund wonders wtf he did[16:29:48] <szr> [TechGuy]: thanks[16:30:36] *** magcius has joined ##java[16:31:08] *** magcius has quit IRC[16:31:17] *** catmando has quit IRC[16:32:26] *** magcius has joined ##java[16:32:37] <ilyak> jonaslund: jhat it![16:33:04] <polydektes> working on this: http://pastebin.com/m14a6d363 , when I go to compile I get this error: Main.java uses unchecked or unsafe operations.[16:33:05] <polydektes> Note: Recompile with -Xlint:unchecked for details. Any ideas?[16:33:34] *** magcius has quit IRC[16:33:48] <jonaslund> ilyak: yeah i just discovered jhat (browsed a bit)[16:33:56] <jonaslund> working up to get a heap now[16:34:04] *** Hink has joined ##java[16:34:24] *** magcius has joined ##java[16:35:01] <ilyak> jmap it![16:35:27] <tonyukuk_> :/[16:35:30] <SaEeDIRHA> hi, when i draw something on Jframe, "Using Graphics g , g.draw" it works fine , but when i minimize the Jframe or bring other window above it, the what i draw removes, how can i make what i draw stable ?[16:35:36] <tonyukuk_> noone can answer my question?[16:35:40] *** magcius has quit IRC[16:35:42] <tonyukuk_> it's only a simple swing question :D[16:35:43] <ilyak> for me, jhat (and jstack) is the reason to switch from BEA JRE to Sun's[16:36:28] *** magcius has joined ##java[16:36:29] <SaEeDIRHA> specially when i draw an image on my frame , this problem happens[16:37:38] *** magcius has quit IRC[16:37:59] *** geaaru has quit IRC[16:38:13] *** troy_psx has joined ##java[16:38:18] <csaba> I have sever stuff that I do within the same Hibernate transaction, and the last one is deleting some items. The problem is, despite the coding order, Hibernate first executes the delete order, and then the other stuff. How can I force it to make the delete command the last one?[16:38:24] *** magcius has joined ##java[16:39:01] <csaba> I've tried with flush() and hibernate seems to output the correct order in the logs, but the server gets blocked and I have to restart it when I do this[16:39:02] <ilyak> csaba: That's it![16:39:14] <csaba> ?[16:39:20] <ilyak> Hibernate is going to execute your commands in random order[16:39:42] *** adi112358 has joined ##java[16:39:52] <csaba> no it won't.... i guess it will execute them in some internal logic of its own[16:40:20] <csaba> and if I write flush() before the delete command, then the ordering will be fine... but it blocks[16:40:49] <ilyak> csaba: Well, you're doing something wrong if it blocks[16:40:56] <ilyak> use jstack to see why it hangs[16:41:03] <csaba> all commands are in the same transaction...[16:41:13] <ilyak> but it's really really going to execure them without any figureoutable logic[16:41:32] <ilyak> for me, it did the exactly opposite to piss me off - insert before delete[16:41:54] <csaba> well it's a bit retarded to execute delete * from table where num=0 when in the begining all nums are 0...[16:42:31] <csaba> maybe if I try flush and clear...[16:44:08] <szr> [TechGuy]: if I use "public static int main(String[] args) {" instead of void main, it compiles, but running 'java Test' I get "Exception in thread "main" java.lang.NoSuchMethodError: main"[16:44:18] *** thpar has quit IRC[16:44:21] <szr> it runs fine if it's void main instead of int main[16:44:42] <szr> but it it's void main, then it will not allow a 'return 123'[16:45:10] <SaEeDIRHA> everyone ?[16:45:44] <csaba> flush and clear do shit[16:45:51] <ilyak> SaEeDIRHA: Why would you want to return 123?[16:45:53] *** gdoko has quit IRC[16:45:56] <SaEeDIRHA> can anyone know how can i draw an image on JFrame ? without it being removed when i minimized the JFrame ?[16:45:56] <ilyak> szr: I mean[16:46:07] <ilyak> SaEeDIRHA: Sorry, no idea[16:46:14] *** beol has joined ##java[16:46:17] <ilyak> szr: just don't return 123[16:46:26] <jonaslund> hum-ho-hum[16:46:29] *** CrypticSquared has quit IRC[16:46:33] <szr> to return an exit status in a console app, a la c/c++, I'm just curious how that's done[16:46:36] *** Levia has joined ##java[16:46:41] <szr> (without using System.exit)[16:46:45] <jonaslund> hmh[16:46:55] <jonaslund> ilyak: is OQL useful/simple/convoluted ?[16:46:57] *** spideryummy has joined ##java[16:46:57] <szr> [TechGuy] said to just make main return an int[16:47:12] *** sombriks has joined ##java[16:48:12] <csaba> just do it with System.exit[16:48:28] <spideryummy> i am encountering this intermittent problem wherein my JDialog or JPanel suddenly enlarges impossibly large, with blank contents,that is, missing controls inside..I am using Netbeans to develop my app..What could be possibly wrong and what areas should I look into to trace this issue?[16:49:08] <szr> from what I read, System.exit isn't a graceful way of ending the program, and not thread safe (sort of like c's exit(), where as just 'return'ing at the end of main in c/c++ is the norm ),[16:49:09] <csaba> but a debug point at the action which happens just before it goes blank[16:49:49] <spideryummy> the problem is intermittent...\[16:50:13] <SaEeDIRHA> ?[16:50:17] *** CrypticSquared has joined ##java[16:50:23] <SaEeDIRHA> no one can help ?[16:50:27] <csaba> haha flush blocks again[16:51:16] <wlfshmn> szr: what constitutes a thread-unsafe way of terminating the execution environment?[16:51:25] *** spideryummy has quit IRC[16:51:39] <csaba> szr: if that is your biggest problem then why don't you make some super-complicated framework where you check if all threads are shut down, and then write platform-dependent code for the 10 most popular OSs so you would return an exit code to each of those OSs in a perfect perfect way[16:52:06] *** valcker has quit IRC[16:53:08] *** Necker has joined ##java[16:53:42] *** Necker has quit IRC[16:54:54] *** adi112358 has quit IRC[16:55:02] <jonaslund> ho-hum[16:55:12] *** UK-sHaDoW has joined ##java[16:55:25] *** Spike1506 has quit IRC[16:55:43] *** isr` has quit IRC[16:56:12] *** Infinito- has left ##java[16:59:41] <csaba> haha I did it! I separated the code into two methods and then it worked![16:59:47] *** anoopr has joined ##java[17:00:11] <csaba> but terminating the transaction and starting a new one in the same method didn't work, I hat to let it close the transaction itself... (banghead)[17:00:32] <ldam> SaEeDIRHA, i gave you a link a few hours ago which tells you how it should be done; didn you see it?[17:00:40] <ldam> SaEeDIRHA, http://java.sun.com/products/jfc/tsc/articles/painting/[17:01:04] <SaEeDIRHA> yes[17:01:18] <SaEeDIRHA> but it didnt involve the answer for my question[17:02:01] <csaba> and what was your question[17:02:12] <anoopr> hi all! i have a problem that has been bugging me for awhile. i have a tree like data structure where each of the nodes is a HashMap with Strings as keys and other HashMaps as values. This nesting can be arbitrarily deep.[17:02:17] <ldam> SaEeDIRHA, unfortunately, yes it does. It tells you how to build a component that can paint; if you do it the right way, then it will get repainted properly[17:02:21] <AMcBain> Sometimes resources won't give you an exact answer, but help you along with understanding things that will help you along to your answer.[17:02:47] <jonaslund> haha[17:02:47] <anoopr> I have no idea how to declare the HashMap to be a "recursive type" to use functional programming parlance.[17:02:48] <jonaslund> fucking hell[17:02:55] <jonaslund> it was tomcat! :)[17:03:10] <csaba> anoopr: Map<Map, Map> ?[17:03:10] <jonaslund> (or well tomcat and jmeter in combination with my config)[17:03:15] <SaEeDIRHA> ldam: it doesnt say anything about painComponent or nothing[17:03:21] <AMcBain> You can always decrement tomcat's karma.[17:03:30] <anoopr> csaba: so I've tried HashMap <String, HashMap>[17:03:38] *** shahan has joined ##java[17:03:39] <anoopr> but then it wants me to bput types on the Value HashMap[17:03:39] <SaEeDIRHA> i am still searching, and all i want t do is to draw an image in Current Frame[17:03:48] <AMcBain> anoopr: types as in, Generic types.[17:03:51] <anoopr> so HashMap <String, HashMap<String, HashMap>>[17:03:51] <r0bby> anoopr: you know there is a project called functionaljava right? \[17:03:57] <csaba> SaEeDIRHA: quote from that link: "Swing programs should override paintComponent() instead of overriding paint()."[17:03:59] <r0bby> which implements this...[17:04:04] <anoopr> but it will want me to just keep typing them out[17:04:05] <csaba> you just didn't read it[17:04:06] <ldam> No? I dare say you didnt read it...[17:04:11] <shahan> hi everyone, i have a strange occurrence, a non-static method is being accessed in a static way and i'm not sure how[17:04:12] <Woot4Moo> if its recursive no it wont[17:04:14] *** monkeycid has joined ##java[17:04:16] <Woot4Moo> anoopr[17:04:22] <jonaslund> ilyak: thanks for the help[17:04:26] <Woot4Moo> a recursive call to me says repeat this one method repeatedly[17:04:27] <r0bby> ~functionaljava[17:04:27] <javabot> r0bby, functionaljava is a library to provide common types from functional programming in Java 5.0, the BGGA prototype for Java 7 and for Scala - http://functionaljava.org/[17:04:29] <shahan> InsertQuery = new RunInsertion(dbCon);[17:04:31] <shahan> boolean insertResult = InsertQuery.InsertTransactions();[17:04:32] <jonaslund> ~karma[17:04:33] <javabot> jonaslund, I have no idea what karma is.[17:04:39] <ldam> SaEeDIRHA, in case you read it you could try give a more explicit description of your problem[17:04:41] <jonaslund> ~ilyak+[17:04:42] <javabot> jonaslund, I have no idea what ilyak+ is.[17:04:45] <jonaslund> ~ilyak++[17:04:45] <javabot> ilyak has a karma level of 8, jonaslund[17:04:59] <AMcBain> anoopr: why not make an inner class that represnents your nodes, it just happens to store a HashMap of Strings and more of itself ...[17:05:11] <mitch0> !paste[17:05:14] <AMcBain> (that way you shorten what you paste)[17:05:19] <AMcBain> s/paste/type/[17:05:24] <AMcBain> damn reading while I type.[17:05:28] <shahan> !paste[17:05:31] <csaba> ?[17:05:37] <mitch0> what's the preferred pastebin here?[17:05:38] <csaba> ~paste[17:05:39] <javabot> Paste your code, preferably a test case, any errors, and any other relevant information into the pastebin and tell us the URL: http://eugeneciurana.com/pastebin[17:05:39] <AMcBain> ~~mitch0 pastebin[17:05:40] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.[17:05:40] *** TheCastor has joined ##java[17:05:45] <anoopr> AMcBain: That's the path I've been headed down. I just wanted to see if it was possible to use the straight up HashMaps. Thanks![17:06:01] <AMcBain> anoopr: okay, well, gl.[17:06:31] * AMcBain heads out.[17:06:32] <SaEeDIRHA> ldam: well thank you for your help, but my problem is so simple, all i want to do is to draw an image on JFrame and make it stable, so it remains in same place even if i minimize the JFrame or maximize it, it seems that i have to use paintComponent() insted of paint()[17:06:36] <r0bby> anoopr: why noy use functional java to get the functional programming bits?[17:06:37] <shahan> http://www.papernapkin.org/pastebin/view/4399/[17:07:14] <csaba> SaEeDIRHA: yes extend the JPanel, override it's paintcomponent() method and with it's Graphics parameter draw a circle[17:07:27] <r0bby> shahan: are you shitting me?[17:07:31] <szr> csaba, wlfshmn: I don't really care about threads, the question was if there is a more graceful way of returning an error code (like return 123; vs exit(12); in main() in c or c++)[17:07:31] <ldam> SaEeDIRHA, basically; you override some paintComponent, in like JComponent or JPanel; Then you add an instance of this onto your frame; that should do it[17:07:36] <shahan> really, it's working[17:07:41] <csaba> szr: no[17:07:49] <r0bby> ~~ shahan snippets[17:07:49] <javabot> Snippets too often lack vital information. Create a test case instead.[17:07:53] <mitch0> anoopr: take a look at http://www.papernapkin.org/pastebin/view/4400/[17:07:57] <szr> that seems od then, as most other langs have some way of doing it[17:08:13] <anoopr> mitch0: perfect! thanks, that'll help a lot[17:08:13] <csaba> szr: System.exit!!![17:08:41] <anoopr> r0bby: this is more me playing around than trying to do something useful. i'm trying to port some OCaml code I wrote to Java.[17:08:43] <szr> csaba: I guess so[17:08:51] <SaEeDIRHA> ok, but my class is already extended from JFrame[17:08:54] <shahan> what am i supposed to write a test case for, that it returns a boolean? i'm trying to figure out how it doesn't even give a syntax error[17:08:57] <mitch0> anopr: if you also happen to write a prefixmap, it'll be extra helpful ;)[17:09:09] <fanti> is it possible to exclude some packages from classpath that are part of a .jar file ?[17:09:16] <csaba> szr: you're not exiting a stand-alone program, you're terminating a program within the Java virtual machine. The JVM doesn't have to shut down if it doesn't want to[17:10:04] <csaba> SaEeDIRHA: and are you overriding the paintComponent method?[17:10:23] <SaEeDIRHA> i am now , let me try it and i let you know :D[17:10:36] <r0bby> anoopr: use functional java[17:10:41] <szr> csaba: true enough[17:10:47] <r0bby> it provides the facilities to do what you're looking for likely[17:11:28] *** bas-i has quit IRC[17:11:42] <anoopr> mitch0: haha, i'll keep that in mind. right now i'm just implementing a simple trie. prefix map might be next![17:11:44] *** L-----D has quit IRC[17:12:24] <shahan> ah boo, found out the prob, i assumed it was a class, it's a var, my bad[17:13:08] <r0bby> anoopr: http://code.google.com/p/patricia-trie/[17:13:15] *** vesz has quit IRC[17:13:25] *** shahan has quit IRC[17:13:39] *** szr has left ##java[17:16:48] <tonyukuk_> 'I have A window.When I click a button in A window then I do see B window.But ,A window does not quit , it still remains in my taskbar as a java application. Because I have to click buttons in my A window a lot,then I will see lots of B windows in my taskbar and it causes " Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space " after a while. I hope this time I could tell :( . So sorry again and thank you for your helps...[17:16:53] <tonyukuk_> guys it's urgent please help me[17:16:55] <epalm> "There is no Base64 encoder/decoder in the standard Java SDK class library. The undocumented classes sun.misc.BASE64Encoder and sun.misc.BASE64Decoder should not be used" is this still true? http://www.source-code.biz/snippets/java/2.htm[17:17:38] *** durka42 has joined ##java[17:17:38] *** theblackbox has quit IRC[17:17:42] <r0bby> tonyukuk_: why is it so urgent?[17:17:57] *** Resistance has quit IRC[17:17:59] <csaba> epalm: you can use apache's base 64 decoder[17:18:01] <tonyukuk_> i need to give my project in 1 hour[17:18:06] <r0bby> ohh[17:18:09] <tonyukuk_> and only that small left[17:18:10] <tonyukuk_> that's why[17:18:14] <Woot4Moo> lol[17:18:15] *** bas-i has joined ##java[17:18:15] *** Resistance has joined ##java[17:18:19] <epalm> csaba: is that the "standard" b64 enc/dec one would use?[17:18:21] <r0bby> and this is our problem...how?[17:18:32] <tonyukuk_> i did not say it's your problem[17:18:34] <epalm> csaba: why isn't there one in the std java library?[17:18:34] *** deSilva has quit IRC[17:18:36] <tonyukuk_> i only demanded help[17:18:37] <csaba> well we use[17:18:40] <polydektes> is it better to throw IOException or deal with it when a method needing it is called? or depends on the situation[17:18:44] <csaba> i don't know if it's standard[17:18:46] <tonyukuk_> if you do not want help then do not waste my time r0bby[17:18:47] *** suriro has joined ##java[17:18:49] <r0bby> You don't demand help, you're not entitled to it.[17:19:01] *** igordcard has joined ##java[17:19:01] <r0bby> demanding help will get you nowhere[17:19:08] <tonyukuk_> please do not waste peopple's time if you are not capable of help[17:19:10] <mitch0> nearer to a /kb though[17:19:11] <csaba> help me or else![17:19:12] <r0bby> You could provide us with a test case[17:19:22] <r0bby> ~~ tonyukuk_ test case[17:19:22] <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.)[17:19:35] <tonyukuk_> test case ?[17:19:38] <r0bby> yes[17:19:42] <r0bby> show the problem[17:19:50] <tonyukuk_> i need to paste the problem to somewhere ?[17:19:58] <[TechGuy]> amazing concept...[17:20:00] <whaley> tonyukuk_: that would be... helpful.[17:20:03] <tonyukuk_> http://forums.sun.com/thread.jspa?threadID=5366768[17:20:10] <r0bby> did you setDefaultCloseOperation on the JFrame?[17:20:11] <tonyukuk_> i pasted my problem here..you can also read the codes[17:20:18] <tonyukuk_> yes r0bby[17:20:39] *** vix85 has joined ##java[17:20:45] <tonyukuk_> man i wanna close the application after i click OK button but it won't go anywhere,it still remains at my toolbar[17:20:46] <[TechGuy]> amazing, and they're all saying the same thing.[17:20:47] <epalm> "the codes"[17:20:48] <SaEeDIRHA> well i have overrode the paintComponent[17:20:57] <r0bby> oh lord[17:20:59] <r0bby> Matisse[17:21:03] <whaley> epalm: for the softwares[17:21:03] <SaEeDIRHA> but when i draw a picture still i have problem[17:21:06] <tonyukuk_> swings[17:21:21] <SaEeDIRHA> do i need to add JFrame Container to it as well?[17:21:21] <epalm> whaley: ahh, thank you for clarifying[17:21:21] <csaba> setDefaultCloseOperation(EXIT_ON_CLOSE) or something like that[17:21:26] <tonyukuk_> you can see the codes from the website that i provided? http://forums.sun.com/thread.jspa?threadID=5366768[17:21:29] <whaley> epalm: HEH[17:21:30] <tonyukuk_> csaba i tried it[17:21:35] <r0bby> you got an answer[17:21:57] <tonyukuk_> the thing is when i click OK button,it will go to another window but it should go previous windows[17:21:59] <tonyukuk_> but it could not[17:22:03] <tonyukuk_> i swear i tried :)[17:22:12] <r0bby> tonyukuk_: you MUST setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[17:22:16] *** Bevin has joined ##java[17:22:37] <r0bby> or DO_NOTHING_ON_CLOSE if you intend to handle it yourself[17:22:44] <csaba> i couldn't understand it, but if you have dialogs, you could add DISPOSE_ON_CLOSE to them[17:22:48] *** dpy has quit IRC[17:23:06] *** Gabbie has joined ##java[17:23:10] <tonyukuk_> yes r0bby i tried[17:23:19] <r0bby> tonyukuk_: when you ask a question on forums or in a programming channel, it's always best to provide a test case, not just a snippet[17:23:33] <csaba> post your entire Java class[17:23:41] <csaba> ~paste[17:23:41] <javabot> Paste your code, preferably a test case, any errors, and any other relevant information into the pastebin and tell us the URL: http://eugeneciurana.com/pastebin[17:23:43] <tonyukuk_> yes csaba i have dialogs even i put DISPOSE_ON_CLOSE but i can still see that previous dialog box at my toolbar[17:23:57] <tonyukuk_> csaba http://forums.sun.com/thread.jspa?threadID=5366768[17:23:57] <r0bby> snippets often lack information (you don't understand the problem, so you're not quite knowing what's important and what's not so it's best to post a COMPLETE test case.[17:24:03] <tonyukuk_> sorry[17:24:04] <tonyukuk_> guys[17:24:06] *** deepjoy has quit IRC[17:24:09] *** notk0 has joined ##java[17:24:25] <r0bby> tonyukuk_: what part of COMPLETE class do you not get...[17:24:26] <tonyukuk_> you can find all the info from http://forums.sun.com/thread.jspa?threadID=5366768[17:24:35] <csaba> but not the code...[17:24:39] <[TechGuy]> That is NOT COMPLETE CODE[17:24:48] <r0bby> ~~ tonyukuk_ homework[17:24:48] <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![17:24:49] <tonyukuk_> csaba at the end there is code[17:24:51] <tonyukuk_> you can see the code[17:24:57] <tonyukuk_> r0bby it's not homework[17:24:59] <[TechGuy]> You have your answer. Any further, deal with it and plead for forgiveness to your professor[17:25:01] <r0bby> tonyukuk_: NOT THE IMPIORTANT PIECES[17:25:09] <tonyukuk_> it's my project which I need to deliver to client[17:25:16] <r0bby> tonyukuk_: it's a project, it's graded, ergo it's homework.[17:25:19] *** rlubke has joined ##java[17:25:36] <tonyukuk_> well they do not pay for homeworks[17:25:39] <r0bby> lord have mercy on the client[17:25:44] <tonyukuk_> hehe[17:25:46] <csaba> tonyukuk_: from that code in that forum, I can say you're doing the right thing... now post the rest[17:26:07] <[TechGuy]> Someone logging the time on this so we can back-bill the client as subcontractors?[17:26:28] <tonyukuk_> ok csaba[17:26:31] <[TechGuy]> "Sorry sir, you owe $12,000+ to 12 different people because your main contractor couldn't get it right..."[17:26:38] <csaba> hehe[17:26:45] <csaba> damn it's dark, i need to go home[17:28:00] <r0bby> ~~ tonyukuk_ pastebin[17:28:00] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.[17:28:05] <r0bby> post your code there[17:28:37] <[TechGuy]> *all of it*[17:30:03] *** Gracenotes has joined ##java[17:30:46] <r0bby> tonyukuk_: nice try; just ran a whois on your IP[17:30:56] <r0bby> University of Sunderland[17:31:06] <tonyukuk_> http://pastebin.stonekeep.com/5648[17:31:07] <r0bby> so this _IS_ homework.[17:31:15] <tonyukuk_> i swear this is not homework[17:31:18] <tonyukuk_> man it's not homework :D[17:31:33] <[TechGuy]> I still feel bad for the client[17:31:39] <r0bby> yet you're irc'ing from a university...[17:31:41] <tonyukuk_> hehehe techguy[17:31:47] <tonyukuk_> this is my first job techguy[17:31:54] <epalm> someone is paying this guy. that makes me sad. :([17:32:01] <tonyukuk_> r0bby i'm staying university's accommodation[17:32:16] <tonyukuk_> hehe epalm[17:32:17] <r0bby> right...[17:32:19] <jottinger> everyone should try to be nice to each other[17:32:34] <r0bby> I believe you... this still is pretty bad[17:32:36] <tonyukuk_> yea epalm and techguy can be kind[17:32:38] <tonyukuk_> well[17:32:38] <tonyukuk_> ok[17:32:47] *** tonyukuk_ was kicked by jottinger (I, on the other hand, am a bastard.)[17:33:03] <r0bby> I still say he's lying[17:33:07] *** tonyukuk_ has joined ##java[17:33:18] *** KingBilly has quit IRC[17:33:30] *** monkeycid has quit IRC[17:33:30] <SaEeDIRHA> anyone can help ? i have overrode the PaintComponent, and it draws the image, bust still the image doesnt stick to Frame , and when i minimize or mximize a JFrame, the image is gone[17:33:46] <SaEeDIRHA> anyone knows how can i solve this problem ?[17:33:51] *** TheCastor has quit IRC[17:34:30] <tonyukuk_> jottinger what is your problem ?[17:34:35] <tonyukuk_> you do kick people who needs help?[17:34:54] *** jottinger sets mode: +b *!*n=moo@157.228.230.*[17:34:54] *** tonyukuk_ was kicked by jottinger (yes. particularly if they're whiny bitches.)[17:35:01] <whaley> bahahaha[17:35:06] <epalm> jottinger: he needs The Codes[17:35:10] <jottinger> I know the DEFINITION of pity, but...[17:35:10] <r0bby> I still say he's lying[17:35:13] <r0bby> This is homework[17:35:17] <[TechGuy]> oh well[17:35:24] <[TechGuy]> Back to work (right....)[17:35:24] <r0bby> andf i can't look at this code anymore, my eyes are bleeding[17:35:26] <whaley> jottinger: that was pity... you are saving him tons of grief[17:35:37] <jottinger> it was mostly self-interest.[17:36:10] <r0bby> they'd get better work by outsourcing[17:36:35] *** anoopr has quit IRC[17:36:55] <epalm> "<tonyukuk_> i need to give my project in 1 hour" is a pretty solid "it's homework" argument[17:37:10] <jottinger> or it's a "I'm about to be fired" argument[17:37:34] <[TechGuy]> either works[17:37:34] <jottinger> in neither case do I have any pity[17:38:08] *** gnech has joined ##java[17:38:36] <r0bby> epalm: no shit[17:38:37] *** shervin_a has quit IRC[17:38:39] *** Seldon75 has joined ##java[17:38:42] *** Yustme has joined ##java[17:38:48] *** monkeycid has joined ##java[17:38:56] <r0bby> I ran a whois on his ip primarily to see if he was from India[17:39:02] <epalm> why is it that people are against admiting to needing help with homework[17:39:19] <r0bby> epalm: because there is an aversion to helping w/ homework on programming channels.[17:39:28] <jottinger> it's because they DO know the mores of such channels but insist on defying them anyway[17:39:48] *** ExxKA has joined ##java[17:39:52] <jottinger> you KNOW he's snickering to himself about it. "Sure, *I* need help with homework, but damed if I'll help anyone else with homework."[17:39:57] *** cyth has joined ##java[17:40:01] *** jottinger sets mode: -b *!*n=moo@157.228.230.*[17:40:19] <r0bby> just for kicks, run a whois on his ip epalm[17:40:31] <r0bby> "University Accomodations"[17:40:52] *** Goundy has joined ##java[17:41:16] *** ankylose has quit IRC[17:41:16] <jottinger> he's prolly just stayig with a friend... while he's being "paid"... right before his homework assignment is due[17:41:36] <jottinger> I do, of course, believe him totally[17:41:43] <r0bby> jottinger: As do I.[17:41:57] <jottinger> gentle and kind soul that I am.[17:41:58] <epalm> r0bby: i'm not well versed in the mysteries of irc, not sure how to whois an ip address, or see the ip address now that he's gone[17:42:16] <waz> ~src[17:42:16] <javabot> you can find my source at my project site http://kenai.com/projects/javabot[17:42:25] <r0bby> That should be a plugin to javabot[17:42:30] <r0bby> :) \[17:42:46] *** Bevin has quit IRC[17:42:55] *** Pianista has quit IRC[17:42:57] *** elmomalmo has quit IRC[17:43:12] *** Towny has joined ##java[17:43:42] *** zophy has quit IRC[17:43:50] *** reverend has quit IRC[17:43:58] *** reverend has joined ##java[17:44:17] *** [TechGuy] has quit IRC[17:44:31] *** [TechGuy] has joined ##java[17:45:27] *** l2trace99 has quit IRC[17:46:45] *** ScottG489 has quit IRC[17:46:50] <[TechGuy]> well, that was different. Been awhile since I've had a connection abort[17:47:01] *** ScottG489 has joined ##java[17:47:56] *** lolsuper_ has quit IRC[17:48:19] *** lolsuper_ has joined ##java[17:49:04] *** jdrake has quit IRC[17:50:47] *** Woot4Moo has quit IRC[17:54:08] *** convivial has quit IRC[17:55:31] *** LordMetroid has quit IRC[17:56:16] *** Bleadof has quit IRC[17:57:15] *** amnesiac has joined ##java[17:59:14] *** Seldon75 has quit IRC[17:59:38] *** jcrites has quit IRC[18:01:20] *** ExxKA has quit IRC[18:02:47] *** convivial has joined ##java[18:02:58] *** dmlloyd_ has joined ##java[18:03:26] *** convivial has quit IRC[18:03:28] *** dmlloyd has quit IRC[18:03:32] *** dmlloyd_ is now known as dmlloyd[18:04:33] *** convivial has joined ##java[18:07:02] *** catmando has joined ##java[18:07:05] *** catmando_ has joined ##java[18:07:37] *** catmando_ has quit IRC[18:08:19] *** kungen has quit IRC[18:08:30] *** durka42 has quit IRC[18:11:06] *** vesz has joined ##java[18:11:12] *** catmando has quit IRC[18:12:45] *** SaEeDIRHA has quit IRC[18:14:33] *** theatrus has quit IRC[18:14:52] <epalm> ~pastebin[18:14:52] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.[18:15:56] <Drone> See epalm's post at http://rifers.org/paste/show/8774[18:16:23] <epalm> ok, so i've got some Base64, which is actually HTML which i want to parse with TagSoup and pull out all the <p> tags[18:16:34] *** codethief has joined ##java[18:17:08] <epalm> around line 39 and onward, i know how to deal with org.w3c.dom to get all the <p> tags[18:17:45] <epalm> i just don't know how to connect what i parse with TagSoup with a org.w3c.dom.Document[18:18:14] *** notk0 has quit IRC[18:18:36] *** goki-_- has quit IRC[18:19:01] *** goki-_- has joined ##java[18:19:50] *** gdoko has joined ##java[18:20:11] <Drone> See epalm's post at http://rifers.org/paste/show/8775[18:20:20] <epalm> slightly modified format[18:20:43] *** snodnipper has joined ##java[18:21:00] <epalm> so, anyone used tagsoup before?[18:25:10] *** fanti has quit IRC[18:25:32] *** Pianista has joined ##java[18:25:47] *** troy_psx has quit IRC[18:27:23] *** gdoko has quit IRC[18:27:59] *** umz has joined ##java[18:29:31] *** eoh676 has joined ##java[18:29:42] *** justafish has quit IRC[18:30:01] *** zachscrivena has joined ##java[18:30:12] <eoh676> is there a way to render into the user's screen without creating a window or preventing mouse-clicks from reaching their target below?[18:30:27] *** zachscrivena has quit IRC[18:31:00] *** igordcard has quit IRC[18:34:55] *** DjZemich has joined ##java[18:34:56] *** umz has quit IRC[18:35:03] *** vix85 has quit IRC[18:35:20] <Ven]n> im trying to get the time in seconds on a movie running in my media player.. getMediaTime gives javax.media.Time@17f242c[18:35:24] <Ven]n> any ideas?[18:35:35] <Ven]n> getMediaNanoseconds gives the time in nanoseconds[18:36:03] <Ven]n> but i dont understand why getMediaTime doesnt work the same way[18:37:50] <dangertools> Ven]n: it gives you a javax.media.Time object. look at its api and be happy[18:37:55] *** TooAngel has joined ##java[18:38:54] *** Towny has left ##java[18:39:11] <Ven]n> hm[18:39:39] *** agnul has quit IRC[18:40:07] <Ven]n> getSeconds()[18:40:08] <Ven]n> :D[18:40:18] <Ven]n> thanks[18:40:36] *** elmomalmo has joined ##java[18:40:45] <Ven]n> ok, so now I can pick out the seconds... any ideas how to make my JSlider move while the movie is playing? hehe[18:40:58] *** EnderMB has joined ##java[18:41:04] *** tomvolek has joined ##java[18:41:27] *** eoh676 has quit IRC[18:42:18] *** durka42 has joined ##java[18:42:46] *** tranceNRG has joined ##java[18:43:38] *** adi112358 has joined ##java[18:44:05] *** adi112358 has quit IRC[18:44:27] *** CarstenP2 has left ##java[18:44:57] *** KikiJiki has quit IRC[18:47:07] *** Junior has joined ##java[18:49:12] *** giaco has quit IRC[18:50:06] *** jjshoe_ has joined ##java[18:50:36] <jjshoe_> ok a bit of a weird question, I once found a very nice graph/map kind of package for java, but I can't seem to find it on google, does anyone here know of any such packages?[18:51:54] *** zophy has joined ##java[18:51:57] *** Riov has quit IRC[18:56:02] *** EnderMB has quit IRC[18:57:03] *** _stack has joined ##java[18:57:19] *** Goundy has quit IRC[18:58:30] *** tomvolek has quit IRC[18:58:42] *** tomvolek has joined ##java[18:59:51] *** jjshoe_ has quit IRC[19:00:24] *** ffgeek200b has joined ##java[19:00:47] *** cstudent has joined ##java[19:01:35] *** ScottG489 has quit IRC[19:02:10] <ffgeek200b> I have a queue which allows for putting/receiving& waiting on the queue. In reality I have multiple queues within that for speed reasons. The bottleneck used to be synchronize(this) for access to the queue when I had one queue. Now the bottleneck is still synchronized(this) for doing the notify(). Any ideas for a better approach to speedi tup? I was thinking wating on multiple objects[19:03:14] *** suriro has left ##java[19:03:22] *** zmanning has quit IRC[19:04:29] <tieTYT2> ffgeek200b: there's an object for that[19:04:33] <tieTYT2> it's called a BlockingQueue[19:04:36] <tieTYT2> you should use that instead[19:04:57] <[TechGuy]> java.util.concurrent FTW[19:05:07] <ffgeek200b> i hope the implementation is faster than mine[19:06:29] *** durka42 has quit IRC[19:07:44] <EdwardIII> hey.... do any of you guys use java with vim? i'm wondering if i can use ctags to create something like autocomplete in VS? tried asking in #vim but they're awful quiet and i thought some of you hardcore javaites might have an answer[19:08:57] <sproingie> you'll never get anything like an IDE's autocomplete with ctags. autocomplete understands types.[19:09:33] <joed> Besides the educational value of using VI, i'd suggest looking at an IDE if you are after those featurer.[19:09:38] <joed> features/[19:10:32] <sproingie> EdwardIII: good job on that whole ruling england thing. sorry about your old man.[19:10:36] <EdwardIII> well my main motivation is that all my hardware is pretty weak. i tried using eclipse but it was such a monster it was useless[19:10:42] <EdwardIII> sproingie: many thanks![19:11:42] <EdwardIII> the thing is.... although i don't understand it to any great depth i don't see why ctags or exhuberant tags can't help vim work that out - i mean isn't that what ctags does? work out from your source code information about your variables, objects etc and build a database that vim can use?[19:11:56] *** ramdam has quit IRC[19:12:09] <sproingie> it looks for identifiers and builds a cross-reference on where they're found[19:12:20] <sproingie> it's not so much for completion as it is for navigation[19:12:35] <EdwardIII> mmm ok that makes sense[19:12:38] *** Consty has quit IRC[19:12:48] *** l3ns has quit IRC[19:12:55] *** jjshoe_ has joined ##java[19:12:58] <EdwardIII> so if you want that stuff you gotta use an IDE... maybe i can try and find an IDE that does that but is less hungry? i'm apt-getting netbeans at the moment[19:12:59] <jjshoe_> hrm weird[19:13:00] <jjshoe_> ok a bit of a weird question, I once found a very nice graph/map kind of package for java, but I can't seem to find it on google, does anyone here know of any such packages?[19:13:31] <sproingie> when you consider eclipse uses less memory than an average browser session, it's not really that awful[19:14:04] <sproingie> netbeans is also decent. IDEA's not exactly light, but it's certainly the smartest.[19:14:20] <EdwardIII> sproingie: really? maybe it's because i'm running it over X11 forwarding. but other apps (like monodevelop) seem to run OK?[19:14:20] *** jjshoe_ has quit IRC[19:15:00] <joed> Java seldom seems great over X11 forwarding...[19:15:13] <sproingie> there's not a lot of decent mid-range IDE's around anymore[19:15:18] <sproingie> there used to be a plethora of 'em[19:15:35] *** tranceNRG has quit IRC[19:15:39] *** polydektes has quit IRC[19:15:39] <EdwardIII> hmm[19:15:57] <EdwardIII> sharpdevelop is my main IDE experience, it's pretty cute[19:16:08] *** genesiss has joined ##java[19:16:23] *** pchapman has joined ##java[19:16:24] <sproingie> sharpdevelop is a nice example of a mid-range IDE that the java ecosystem lacks[19:16:49] <sproingie> eclipse could probably be pared down to something tight[19:16:56] <sproingie> but i wouldn't want to take that on[19:17:32] <EdwardIII> i guess nobody would heh[19:17:36] <tieTYT2> we have a bunch of jsp's in a package called sysAdmin that are all prefixed with the word sysAdmin[19:17:43] <Ven]n> how do I make something that runs a command every 10 ms? :p[19:17:45] <EdwardIII> none of my machines have more than 512RAM, i guess ram is a big factor with these apps?[19:17:47] *** MigoMipo has joined ##java[19:17:52] <tieTYT2> and I think this is pointless so I removed the prefix on one of them (the one that I was working on)[19:17:59] *** teralaser has joined ##java[19:18:02] <tieTYT2> and people are complaining I shoudln't have renamed it because now it's inconsistent[19:18:07] <tieTYT2> i'd argue that I should rename all of them[19:18:29] <sproingie> EdwardIII: 512 megs is just fine for eclipse. it won't take more than 128 megs out of the box anyway, java's got a fixed heap[19:18:31] <tieTYT2> put yourself in my shoes, would you make that argument to your coworkers or do you consider it a fight not worth fighting[19:18:55] <sproingie> i pushed my eclipse up to 256M when i started using heavy GEF-based stuff, but it never got that high when just editing code[19:19:13] <EdwardIII> sproingie: maybe it's something to do with eclipse & x11 forwarding then.[19:19:29] *** Riov has joined ##java[19:19:53] <sproingie> EdwardIII: eclipse looks like ass whenever i remote it from a unix box to my xming server[19:20:03] <EdwardIII> sproingie: looks fine here, just runs slow[19:20:06] <sproingie> it's a conspiracy of factors there, mostly rotten fonts[19:20:42] <sproingie> EdwardIII: try NX instead, it's usually faster for me[19:20:47] <sproingie> despite always tunneling over ssh[19:20:47] *** NiSoOo has joined ##java[19:20:54] <EdwardIII> sproingie: really? i should check it out[19:21:18] *** kane77 has quit IRC[19:22:15] <EdwardIII> actually... just checked, the machine i'm remoting to is 256RAM, pretty pathetic. i should upgrade it - or migrate it to some better hardware! it's just a hasstle setting up all that stuff, getting down the monitor, plugging it in, y'know[19:22:38] <sproingie> yah you're going to be hurting. i suggest upgrading.[19:23:21] <waz> 256!?[19:23:23] <waz> wow[19:23:32] <waz> I'm upgrading my home server to 10 gig today[19:23:36] <EdwardIII> heh[19:23:43] <EdwardIII> that's 64bit i take it?[19:23:57] <waz> not right now[19:24:00] <waz> only 2 gig in it[19:25:02] <EdwardIII> 64bit CPU and OS i mean though? 10g, that's obscene[19:25:08] <EdwardIII> what could you possibly need that much ram for?[19:25:16] *** teralaser has quit IRC[19:26:00] <sproingie> windows 8[19:26:08] *** ScottG489 has joined ##java[19:26:35] <sproingie> (can't say win7, since it's using a lot less than vista)[19:27:25] <EdwardIII> heh[19:28:10] <FauxFaux> Multiple virtual machines, all running Eclipse with JST. >.<[19:28:18] *** bas-i has quit IRC[19:28:53] *** Necker has joined ##java[19:30:37] <[TechGuy]> waz tends to go overboard, running virtual clusters on one box. :P[19:31:44] <EdwardIII> heh this machine's swapping like a bitch[19:32:46] *** csgeek has joined ##java[19:32:51] <waz> four copies of Ubuntu, 2 XP, all running on a solaris host[19:33:10] <csgeek> I thought you could do this.. but I may be wrong.. can't I declare multiple classes in the same .java file?[19:33:41] <EdwardIII> ah right i thought that was a joke[19:33:52] *** TheCastor has joined ##java[19:33:53] <EdwardIII> waz ... 'home server'? sounds more like a professional jobbie heh. what do you use it for?[19:34:15] *** riotz_ has joined ##java[19:34:21] <Ven]n> if i want to run a command every second my movie in my media player is running.. are Threads my best choice?[19:34:33] <waz> EdwardIII oddly enough I'm a professional :)[19:35:12] <EdwardIII> waz: i suspected it was a bit too much machine meat for holidng your family friendly movies and photos[19:35:36] <waz> a hudson server, an esb server, etc[19:35:37] <AlanasAnikonis> Ven]n: you got a girl over at your place? http://xkcd.com/196/[19:36:12] <[TechGuy]> EdwardIII: He actually does work, unlike most of us[19:36:30] <Ven]n> AlanasAnikonis, heh[19:36:38] <EdwardIII> i work my ass off, heh. but not in java[19:36:48] <AlanasAnikonis> i just say, move the mouse by hand :P[19:36:53] <joed> [TechGuy]: Lies.[19:37:15] <waz> heh[19:37:20] *** M[]ssad has joined ##java[19:37:27] <AlanasAnikonis> Ven]n: you might be interested in TimerTask[19:37:29] <waz> I'm unemployed actually[19:37:46] <waz> but I did decide to play with hudson[19:37:50] <waz> and it now pulls javabot code and runs the tests :)[19:39:01] *** staykov has quit IRC[19:39:15] *** nor3 has quit IRC[19:41:55] *** M[]ssad has quit IRC[19:41:56] *** M[]ssad_ has joined ##java[19:42:20] *** M[]ssad_ is now known as M[]ssad[19:42:27] *** aioobe has joined ##java[19:42:53] *** _acid__ has joined ##java[19:43:10] *** Riov has quit IRC[19:43:16] *** riotz has quit IRC[19:45:22] *** Ivellina has joined ##java[19:46:12] <aioobe> cybereal: I tried out the memory analyzing tool you suggested. I didn't really like it... I think jvisualvm and jhat does a nice job though. However, what I've found out that I really need is a way to figure out all paths (excluding the cycles ofcourse) from the root set to a given object. Can this be done in jhat?[19:51:47] *** schasi has joined ##java[19:51:52] *** ankylose has joined ##java[19:51:55] <tieTYT2> hudson seems really cool[19:52:17] <Ven]n> can I have a Timer inside a method?[19:53:29] *** schasi has quit IRC[19:54:21] <pr3d4t0r> Hello.[19:56:48] *** werdan7 has quit IRC[19:57:18] *** kane77 has joined ##java[19:59:27] *** casmo has joined ##java[19:59:35] *** ridoo has quit IRC[20:02:23] *** waz has quit IRC[20:04:27] *** vinse_ has joined ##java[20:04:27] <ernimril> good evening![20:04:43] *** vinse_ has left ##java[20:05:17] *** bobbytek has quit IRC[20:07:19] *** umz has joined ##java[20:08:06] *** ckuttruff has joined ##java[20:08:08] <umz> Can any1 tell me that how can I send notifaction from RMI SERVER to all connected RMI clients[20:08:09] <umz> ?[20:08:28] <ernimril> ~~umz aolbonics[20:08:28] <javabot> umz, 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![20:08:44] <ckuttruff> hey all... how does one refer to a backreference in a java regex (default variables?)? and can this be done in a String.matches() method call?[20:09:00] <dmlloyd> no[20:09:04] <dmlloyd> ~~ ckuttruff javadoc Matcher[20:09:06] <javabot> ckuttruff: http://is.gd/jkcv [java.util.regex.Matcher][20:09:17] <umz> ernimril, thans[20:09:19] <umz> thnks[20:09:46] <ernimril> ckuttruff: \n (\1 or \7 ...) read the javadoc for Pattern[20:09:57] <ernimril> ~~ckuttruff javadoc Pattern[20:09:57] <javabot> ckuttruff: http://is.gd/izkz [java.util.regex.Pattern][20:10:15] <umz> Can anyone tell me that how can I send notifaction from RMI SERVER to all connected RMI clients ---->> Is it right now ernimril ?[20:10:21] *** staykov has joined ##java[20:10:53] *** spuz has quit IRC[20:10:53] *** path_ has quit IRC[20:11:13] *** foo-nix has joined ##java[20:11:23] *** josemoreira has joined ##java[20:11:47] *** foo-nix has quit IRC[20:12:25] *** foo-nix has joined ##java[20:12:51] *** timte has joined ##java[20:13:42] *** cortef has joined ##java[20:13:47] *** osmosis has joined ##java[20:15:03] *** _grepper has joined ##java[20:15:09] *** shadewind has joined ##java[20:15:28] <_grepper> OK, don't curse me, but what's the best way to install java on MacOS X?[20:15:49] <[TechGuy]> dev.apple.com/java IIRC[20:15:51] *** cortef has quit IRC[20:15:51] <_grepper> My current version fails:[20:15:56] <_grepper> I did download it from there[20:16:07] <_grepper> [fcoury@hackintosh 17:10]:~$ java[20:16:07] <_grepper> dyld: Library not loaded: /usr/lib/libsqlite3.0.dylib[20:16:07] <_grepper> Referenced from: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork[20:16:16] <dmead> hey guys, does anyone here familiar with running java on arm chips?[20:16:23] <ckuttruff> http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html#cg[20:16:33] <ckuttruff> it doesn't specify the syntax of retrieving the captured group[20:16:37] <ckuttruff> which is what I'm looking for[20:16:56] <ckuttruff> "(regex_pattern)"... $1 in perl[20:16:58] <ffgeek200b> is there any way to serialize objects that don't implement the serializable interface? speed is not a concern[20:17:46] <ckuttruff> can anyone tell me how to refer to a captured group within a regex match pattern outside the actual regex expression?[20:17:51] <ernimril> ffgeek200b: not in the general case, no[20:17:53] <ckuttruff> as perl does with $1-...[20:18:23] <[TechGuy]> ~~ckuttruff javadoc Matcher.group(*)[20:18:24] <javabot> ckuttruff: http://is.gd/jkgK [java.util.regex.Matcher.group()]; http://is.gd/jkgL [java.util.regex.Matcher.group(int)][20:18:34] <ffgeek200b> meh i kinda miss being able to dump any allocation bytes w/ C, but i don't miss mem leaks[20:19:45] <ernimril> ffgeek200b: you can have memory leaks in java[20:20:21] <ernimril> ffgeek200b: they are of a different kind though[20:20:23] *** TooAngel has left ##java[20:20:40] <ffgeek200b> ernimril, you mean like adding to a static infinitely? I wouldnt call that a leak, but that's terminology i guess[20:20:43] *** dheeraj_k has joined ##java[20:20:43] *** ckuttruff has quit IRC[20:21:11] *** Copter has joined ##java[20:21:15] <dheeraj_k> is any 1 familiar with @WebRemote in seam framework?[20:21:29] <ernimril> ffgeek200b: that is one case, failing to close streams/graphics/images/database resources/... is another (in some case it is more of a resource leak than a memmory leak, but almost the same thing)[20:21:58] <ffgeek200b> ernimril, true, in that case is a leak[20:22:41] <ernimril> ffgeek200b: so if you plan on doing serious stuff with java, then learn one or more memory profilers[20:24:05] <ffgeek200b> ffgeek200b, i've used yourkit profiler to track down a cache that had a bug where it would add infinitely to a variable, it's too expensive though, open source ones probably do the same thing[20:24:27] <ernimril> ~~ffgeek200b profiler[20:24:28] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169[20:24:47] <ffgeek200b> Thanks, now I know what a profiler is.[20:24:48] <ernimril> ffgeek200b: jvisualvm is part of the jdk nowdays[20:25:05] *** umz has quit IRC[20:25:14] <ernimril> ffgeek200b: personally I prefer my own, tijmp, but consider me biased in this case :)[20:26:26] *** rlubke has quit IRC[20:26:26] *** waz has joined ##java[20:26:33] <ffgeek200b> ernimril, I've used jensor before which did the trick i will check out those two[20:28:33] *** conan has quit IRC[20:29:15] *** bas-i has joined ##java[20:29:37] <shadewind> ffgeek200b: VisualVM is recommended[20:29:44] <shadewind> by me at least :)[20:30:07] *** donavan has quit IRC[20:30:56] <ffgeek200b> wow just looked at the screenshots for visual vm, impressive, tijmp is impressive too, we've come a long ways in the last 5-10 years of java[20:31:03] <ffgeek200b> commercial profilers are no longer necessary[20:31:29] *** donavan has joined ##java[20:31:51] *** bas-i has quit IRC[20:31:54] *** anair has joined ##java[20:32:17] *** steve-e has joined ##java[20:32:22] <epalm> http://pastebin.ca/1335126 i'm using http://www.nada.kth.se/hacks/doc/xml/jdom-b5/build/apidocs/org/jdom/output/DOMOutputter.html#output(org.jdom.Document) to convert from org.jdom.Document to org.w3c.dom.Document. the jDomDoc works fine, but the w3cDomDoc comes out as a null doc after the conversion :([20:33:22] <ernimril> epalm: org.w3c.dom.Document have no nice toString() so do not be too worried yet[20:33:55] *** anair has left ##java[20:34:03] <ernimril> epalm: if you want to output a w3c Dom, you use a Transformer a DomSource and a StreamResult (and probably a TransformerFactory or something like that to get the Transformer)[20:34:17] <epalm> yikes...[20:34:42] <epalm> i would have thought org.jdom.output.DOMOutputter().output(...) was *exactly* what i was looking for[20:35:10] *** cybereal has quit IRC[20:36:59] *** Seldon75 has joined ##java[20:38:00] *** bas-i has joined ##java[20:38:05] *** _grepper has quit IRC[20:40:54] *** jgosse has joined ##java[20:41:20] <jgosse> Question, was having statement();; always legal in Java?[20:41:31] <jgosse> Or does Eclipse just strip it out for me? Or does the compiler?[20:42:42] <tieTYT2> yes it's legal[20:44:03] *** giaco has joined ##java[20:44:04] *** werdan7 has joined ##java[20:44:19] <jgosse> I just just because it reads statement(), then gets the ;, then moves to the next statement before a ;... but snice there's nothing there... poof[20:44:49] *** ishino has joined ##java[20:45:31] *** Infinito- has joined ##java[20:47:06] *** donavan has quit IRC[20:47:13] <ernimril> jgosse: compilers have complained more or less loudly about it over time[20:47:32] <ernimril> jgosse: javac, jikes and ecj have behave slightly different over time[20:47:53] *** hrehf has joined ##java[20:47:57] *** casmo has left ##java[20:48:20] *** donavan has joined ##java[20:48:39] <tieTYT2> you mean gcj?[20:48:43] <tieTYT2> ~ecj[20:48:43] <javabot> tieTYT2, ecj is Eclipse's own Java compiler, and it's leet.[20:48:46] <tieTYT2> oh[20:49:03] <ernimril> no, I mean ecj[20:49:04] <tieTYT2> does eclipse come with its own wheel?[20:49:08] <ernimril> yes[20:49:17] *** ramdam has joined ##java[20:49:19] <ernimril> to handle its "compile each line as you type"[20:49:40] <tieTYT2> couldn't that jsut be a wrapper over sun's?[20:49:54] <tazle> writing Objective C in Xcode felt weird after eing used to IDEs compiling everything all the time[20:49:56] <ernimril> ecj is quite nice regarding error/warnings, it produces a lot more warnings that javac (with full warnings turned on)[20:49:58] <tieTYT2> or just a keystroke listener?[20:50:05] *** ciaron has joined ##java[20:50:24] <ernimril> tieTYT2: javac was a sun-tool for a long time, that you could not use in any nice way[20:50:38] <tieTYT2> i see[20:50:55] <ernimril> tieTYT2: and I do not think javac was ever really built to handle partial-recompile-on-keypress[20:51:16] <tieTYT2> in what sense?[20:51:26] <tieTYT2> oh you mean it'll recompile the whole thing[20:51:33] <ernimril> tieTYT2: or at least full files[20:51:48] <tazle> tieTYT2: that and its parser mgith not do a very good job in continuing after a syntax error[20:51:54] <ernimril> ecj is a bit slower than javac though, that is not very nice[20:52:10] <tieTYT2> so does intellij need its own too?[20:52:36] <ernimril> I think that both netbeans and idea uses javac internally (but feel free to correct me)[20:52:59] <tieTYT2> well intellij gets by with many more warnings and real time errors too[20:53:15] <wlfshmn> I doubt IDEA runs the compiler at all to generate it's warnings[20:53:15] <tieTYT2> so did it take a different approach to the problem?[20:53:38] <wlfshmn> half the point of IDEA is the excelent AST they build. I imagine they validate it on their own[20:55:21] <tazle> I guess Eclipse does refactorings using the same data structures the compiler front end produces?[20:56:22] <ernimril> ecj is also a lot easier to use if you have to call it in code[20:56:58] <tazle> I find it somewhat odd that none of the IDEs seems to have been extended with a proprietary macro system yet :)[20:57:00] *** Seldon75 has quit IRC[20:59:40] *** SwanR has quit IRC[21:00:51] *** vix85 has joined ##java[21:01:53] *** SwanR has joined ##java[21:02:48] *** vezzoni has quit IRC[21:02:49] <SwanR> Hello, i have a KeyEvent which always returns getKeyCode() as zero. getKeyChar() works just fine though. Any ideas why?[21:03:22] <ernimril> SwanR: one is from keyTyped, the other from keyPressed[21:03:58] <ernimril> ~~SwanR javadoc KeyEvent[21:03:59] <javabot> SwanR: http://is.gd/jkAB [java.awt.event.KeyEvent][21:04:03] <SwanR> hmm guess i can do if key == '\n'[21:04:15] <ernimril> SwanR: why would you do that?[21:05:49] *** riotz_ has quit IRC[21:06:02] <SwanR> why would i do what , the == '\n' ? sorry i didnt mention i wanted to do something when enter is pressed[21:06:26] <ernimril> SwanR: in what component?[21:06:51] <ernimril> SwanR: JTextField gives you action events on enter and similar for a lot of other components[21:06:53] <SwanR> a text field[21:06:56] <SwanR> ohh[21:07:06] <SwanR> thats me being blind then[21:07:15] <ernimril> hmmm, time to tune down the mind reading a bit :-)[21:07:15] <SwanR> thanks[21:07:20] <SwanR> heh[21:08:02] *** Misc1 has joined ##java[21:08:09] <Misc1> Hello[21:08:11] *** jtong has joined ##java[21:08:53] *** dmlloyd_ has joined ##java[21:09:19] *** squi has quit IRC[21:10:11] *** Meddi has joined ##java[21:11:42] *** acuster has quit IRC[21:13:10] <Misc1> Is there a function to which I can find the day (Sunday, for example) of a given date?[21:13:12] *** webus has joined ##java[21:13:17] <webus> hi to all[21:13:24] <ernimril> ~~Misc1 javadoc Calendar[21:13:24] <javabot> Misc1: http://is.gd/jkEQ [java.util.Calendar][21:13:39] *** TJC09 has joined ##java[21:13:39] <crowbar> I have a JList backed by a DefaultListModel and a custom ListCellRenderer. Click in the JList properly causes the active cell to highlight, but when using Jlist.setSelectedIndex() (inside a ActionListener attached to a button) the JList loses all highlighting.[21:13:43] <webus> i'm young JAVA coder from Russia[21:13:43] <Meddi> hi guys. Here is my problem: I have got an editable JTable. Underneath it there is a proceed button. When the button is pressed, a for loop is executed which grabs the values of each cell. the problem is, the value of the last_edited cell is not grabbed. Is there a way to move the "focus" from the last edited cell when the proceed button is pressed? I tried changing the column/row selection, i tried disabling the row/column selection variables but still nothing[21:13:48] *** cstudent has quit IRC[21:13:54] <AMcBain> Misc1: :-/ if you're going to be doing more date processing (than just that), considering checking out JodaTime[21:14:19] *** Necker has quit IRC[21:14:37] <Misc1> I won't be doing much more than that, actually. I need to find the first day of each month for any given year. I was looking at the javadoc and came up with a big "??".[21:14:55] <AMcBain> yeah check out Calendar, also see Google for examples ... Calendar is a mess.[21:15:01] <Misc1> My professor hasn't talked anything about the Calendar class, so I wasn't sure if there was a way to do it without Calendar[21:15:08] <ernimril> Misc1: Calendar.get(DAY_OF_WEEK) or something like that[21:15:12] <AMcBain> Date, but it's deprecated.[21:15:42] <Misc1> Hrm, I see. Thanks.[21:15:46] <Misc1> I'll keep reading[21:15:53] *** dmlloyd has quit IRC[21:15:54] *** dmlloyd_ is now known as dmlloyd[21:15:58] <AMcBain> (I think Date wasn't all that bad, even if simplistic, they should have kept it non-deprecated, and just added Calendar in addition to)[21:17:02] *** SwanR has quit IRC[21:17:07] * Misc1 doesn't know much Java, to be honest[21:17:17] <Misc1> I'm actually a Python programmer, heh[21:17:50] *** webus has quit IRC[21:18:01] <Logi> just get joda-time.jar and be done with it[21:18:03] <AMcBain> I'd make a joke, but I haven't tried python, so it'd be in rather poor taste :P[21:18:06] *** BeholdMyGlory has joined ##java[21:18:27] *** deepjoy has joined ##java[21:18:28] <Logi> AMcBain: if it were a Monty Python reference, it would be very good form[21:18:58] <AMcBain> ah, no, I think it was something else ... it was one of those things where if you don't type it, you forget it :-/[21:19:07] <AMcBain> type it quick*[21:21:37] *** KingSilly has joined ##java[21:21:42] <EdwardIII> the java concepts tutorial from the website is awesome[21:21:45] *** svm_invictvs has joined ##java[21:21:46] <Misc1> Ah, I think I understand it now :)[21:21:53] *** cybereal has joined ##java[21:22:01] <svm_invictvs> ~singleton[21:22:01] <javabot> In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively necessary.[21:22:04] *** drip has joined ##java[21:22:36] <KingSilly> if (godNames.contains(userInput)) -- godNames = a vector of names, i wanted to know if its possible to do a contains which ignores the case of the user input?[21:23:17] *** mitchnull has joined ##java[21:23:30] <EdwardIII> hey what's the difference between a singleton and a class you only call once yourself?[21:23:43] *** deepjoy has quit IRC[21:23:45] <cybereal> KingSilly: no[21:24:17] <ffgeek200b> i'm working for people who dont believe in using profile output grrh[21:24:23] <cybereal> KingSilly: unless the objects in that list were your own and you could create appropriate hashCode() and equals() methods to make it happen... but not automatically, no[21:24:25] <Logi> EdwardIII: I could tell you, but instead, I'm just going to say that singleton isn't a good idea anyway[21:24:37] <EdwardIII> heh thanks Logi[21:24:39] <whaley> EdwardIII: in theory (only), no matter how hard you try you can only ever have one instance of a singleton...[21:24:55] <EdwardIII> is that the only difference?[21:25:02] <EdwardIII> it's globally accessible too i guess[21:25:11] *** M[]ssad has quit IRC[21:25:15] <EdwardIII> by default in most languages objects are globally accessible though arne't though?[21:25:18] <KingSilly> thanks cybereal[21:25:29] <Logi> a singleton is just a roundabout way of making a bunch of static methods and static variables[21:25:29] <svm_invictvs> ~info singleton[21:25:30] <javabot> singleton was added by: svm_invictvs on 08-27-2008 at 2:18 PM, EDT and has a literal value of: <reply>In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively n[21:25:30] <tieTYT2> i've got this part in my game[21:25:31] <whaley> EdwardIII: not necessarily... you could have a singleton that's package private[21:25:34] <cybereal> EdwardIII: the objects are yes, but the acquisition path is what matters here[21:25:34] <tieTYT2> that loads all the graphics[21:25:48] <tieTYT2> and i need one instance of this class or else it'll load graphics mulitple times[21:25:54] <cybereal> privacy affects type visibility not object access, you could still have a Object reference to anything on the heap[21:25:59] <tieTYT2> and i'm wondering if this is actually a good case for a singleton[21:26:03] <tieTYT2> the class only has getters[21:26:26] <Logi> tieTYT2: no, it's not a good case for a singleton. what are you talking about anyway?[21:26:47] <tieTYT2> it's really a pain to inject with spring because most classes that use it are instantialized during runtime[21:26:53] *** Bollinger has quit IRC[21:27:02] <tieTYT2> Logi: my AnimationFactory[21:27:07] <cybereal> EdwardIII: singletons are problematic because they reduce the flexibility of your implementations down the road, for example, I have this library that has a bunch of singletons it initializes at startup, this means I can only have ONE copy of this library working in my app's VM at one time, even though I'd like to have several each with different configurations[21:27:23] <Logi> tieTYT2: would you make it a static-only class? that's completely equivalent to a singleton[21:27:32] <tieTYT2> Logi: either way[21:27:43] *** monkeycid has quit IRC[21:27:49] *** hrehf_ has joined ##java[21:27:51] <tieTYT2> this class should only load its data once[21:27:55] <Logi> s/completely/essentially[21:28:12] <tieTYT2> and most sprites need access to it[21:28:19] *** Bollinger has joined ##java[21:28:21] <tieTYT2> i think all, really[21:28:29] <tieTYT2> and since the sprites are created at runtime, it's hard to inject with spring[21:28:50] <EdwardIII> hrm cybereal i'm trying to get my head around what you're saying, i think i follow, but why would you want multiple copies of the same library running with different configurations?[21:29:11] <Logi> EdwardIII: that's the thing. You don't know beforehand.[21:29:23] <cybereal> EdwardIII: in my real case? because it's being used in a new, unexpected way and the only reason that's not possible easily is because of stupid assuming by the original designer[21:29:25] *** Niike has joined ##java[21:29:36] *** Greyhound- has joined ##java[21:29:36] <cybereal> EdwardIII: locking people into 100% unnecessary restrictions like singletons is just thoughtless imo[21:29:37] *** durka42 has joined ##java[21:29:46] <cybereal> I'm actually getting around this with osgi btw[21:29:50] <EdwardIII> mmm sounds reasonable[21:30:22] <EdwardIII> i did wonder when reading about the singleton why you would want to restrict a class so it can only ever spawn 1 object[21:30:23] <Logi> cybereal: does osgi allow loading and unloading modules at runtime?[21:30:29] <EdwardIII> sorry if my terminology is all wrong[21:30:46] *** SinisterBen has joined ##java[21:30:48] <cybereal> Logi: yes, though there are some minor caveats if they start up threads or are tightly bound to one another, but it's pretty powerful in that regard[21:30:53] <EdwardIII> tieTYT2: when you say spring is that anything to do with spring ta?[21:31:14] <Logi> cybereal: cool. I see some serious osgi-ing in my mid-term future[21:31:29] <tieTYT2> no[21:31:45] *** dmlloyd_ has joined ##java[21:31:55] <tieTYT2> i thought that was the whole point of osgi[21:32:19] <cybereal> it's part of the point[21:32:23] <cybereal> but definitely not the "whole point"[21:32:31] * EdwardIII shrugs[21:32:41] *** fukazzz has joined ##java[21:32:53] <cybereal> osgi's primary purpose is to give you that kind of... operating system services thing you see in linux in java, but of course, with more control[21:32:56] <cybereal> hell it even has runlevels[21:33:01] *** fukazzz has quit IRC[21:33:17] *** fukazzz has joined ##java[21:33:20] <Logi> cybereal: that sounds very relevant to some things we need to do[21:33:44] <Logi> it would be even more relevant if the runlevels could be extended to javascript out on the client, but I don't see that working out[21:34:16] <cybereal> it expands beyond the simple cases with certain additional features, like... you can get bundles to load and wire up solely based on package export and import statements or you can do a services model where you can get notifications of when bundles offering services show up and etc.[21:34:59] <cybereal> Logi: well I dunno, it's not going to manage remote javascript of course, but your server-side link to that javascript can monitor what's going on in the osgi platform through its event system[21:35:38] <cybereal> thing about osgi is, there's a TON there, it's not just these few things I've mentioned[21:35:41] *** KingSilly has quit IRC[21:35:44] <cybereal> it also goes on to define numerous standard services and so on[21:36:28] *** deufrai has joined ##java[21:36:30] <cybereal> for example, a standard way of accepting configuration and reconfiguration instructions from other bundles without them even needing to know your bundle was loaded or not, etc.[21:36:40] *** werdan7 has quit IRC[21:36:44] <Logi> ok[21:37:14] <cybereal> I use this logging bundle from the ops4j project that, thorugh some interesting osgi manifest magic, overrides all the common logging framework hooks for your bundles and pipes all that through one log4j instance which you can configure via the standard configuration service[21:37:43] <cybereal> and on top of that it provides an implementation of the osgi defined standard logging service heh[21:38:14] <cybereal> that was an awesome bundle to find because within my one app, log4j, commons-logging, slf4j, and jdk logging are all in use totally separately[21:38:27] <cybereal> because of other libraries and such[21:38:40] *** Verbafoo has joined ##java[21:38:55] <Verbafoo> hi, i'm trying to launch a file.jar with java -jar file.jar but i've got this : "No X11 DISPLAY variable was set, but this program performed an operation which requires it."[21:39:26] <ernimril> Verbafoo: either get a display or try to run headless[21:39:51] <Verbafoo> to run headless ?[21:39:57] <ernimril> ~headless[21:39:58] <javabot> Set -Djava.awt.headless=true as a JVM parameter to allow you to use graphical-based classes on a server without a display.[21:39:59] <Logi> like a chicken[21:40:30] <Verbafoo> but i have a display[21:41:13] <deufrai> hi there. Is there a way, using reflection, to list the names classes located in a particular package in my source tree ?[21:41:36] <ernimril> deufrai: no, but you can use a profiler to do it[21:41:43] <Logi> do we have an FAQ?[21:41:50] <Logi> this would be around #3[21:41:53] <cybereal> we ARE an faq[21:42:02] <Verbafoo> how can i say to java to use the default display ?[21:42:08] <Logi> ah, that's this sinking depression I suddenly felt[21:42:11] <deufrai> ernimril: I'd need that feature at runtime[21:42:16] <cybereal> Verbafoo: define your DISPLAY variable correctly[21:42:18] <ernimril> Verbafoo: it normally does, have you run "su" or something like that?[21:42:24] <cybereal> usually export DISPLAY=:0[21:42:37] <ernimril> deufrai: yes, why do you think that would be a problem?[21:42:42] <Verbafoo> ernimril: no[21:42:46] <ernimril> ~~Verbafoo javadoc Instrumentation[21:42:47] <javabot> Verbafoo: http://is.gd/jkSK [java.lang.instrument.Instrumentation][21:42:50] *** ofl_ has joined ##java[21:43:04] <ernimril> ops, that was meant for deufrai[21:43:31] <ernimril> deufrai: you can write your own minimal profiler using Instrumentation[21:43:49] <ernimril> deufrai: or you can use any of the profilers that can attach to the jdk[21:43:50] <deufrai> ernimril: don't know really. The only profiler I use is the one used by Eclipse TPTP project[21:43:57] <Verbafoo> cybereal: that did not work[21:44:08] <cybereal> ernimril: doesn't that limit you to currently loaded classes?[21:44:13] <ernimril> deufrai: why do you need to do this?[21:44:13] *** hrehf has quit IRC[21:44:14] *** hrehf_ is now known as hrehf[21:44:16] <cybereal> Verbafoo: well this isn't the right channel for you to figure out how to use X11[21:44:17] <deufrai> and only thought about results given after code execution ended[21:44:20] <cybereal> ~~ Verbafoo tech support[21:44:20] <javabot> Hello, ##java is not a technical support channel for your Java apps or virtual machines, it is a development enthusiast channel which prefers to receive questions and discussion on the topic of programming with the Java language. Please consider seeking help with the vendor of your software if you can't figure out how to use it.[21:44:22] <ernimril> cybereal: That was the question, was it not?[21:44:48] <Verbafoo> cybereal: it's java specific since my X11 server works just well[21:44:50] <ernimril> deufrai: most _modern_ profilers give you results at the time you want[21:44:56] <cybereal> ernimril: he wants all those in a package in the source tree, there's a good chance some of them may not have been loaded[21:45:07] <Logi> Verbafoo: try running xeyes or something in that same console window[21:45:12] <ernimril> cybereal: he/she did not ask for that...[21:45:24] <ernimril> deufrai: why do you need to know about the classes?[21:45:28] <deufrai> ernimril: I'm considering this for an batch program to be able to instanciate processing modules according to a list given in a property file[21:45:30] <cybereal> ernimril: yes they did[21:45:42] *** DjZemich has quit IRC[21:46:06] <ernimril> deufrai: so you really want to find classes in a given package, but you do not care about them being loaded or not?[21:46:12] <Verbafoo> Logi: now that i have written what cybereal told me (export DISPLAY=:0) ; xeyes does not work[21:46:20] *** josemoreira has quit IRC[21:46:25] *** dmlloyd has quit IRC[21:46:27] <deufrai> they actually won't be loaded at that time[21:46:37] <EdwardIII> 'enthusiast' - that's very nice[21:46:37] <ernimril> deufrai: ok, that is easier....[21:47:05] <ernimril> deufrai: something like this may help: http://www.khelekore.org/~robo/PluginFinder.java[21:47:08] <Logi> Verbafoo: open a fresh one. Make xeyes work. Then re-try your java app.[21:47:10] *** Vicfred has joined ##java[21:47:29] <deufrai> ernimril: ok, I'm having a look[21:47:36] <deufrai> will get back to you[21:47:39] <ernimril> deufrai: look at your classpath, find the jars, search them (my case looks for classes that implement a certain interface/extend a given base class)[21:47:53] <ernimril> deufrai: if you want to restrict to classes inside a given package, that is easy enough[21:47:57] *** dmlloyd_ has quit IRC[21:48:06] *** dheeraj_k has quit IRC[21:48:22] <deufrai> all my modules extend a single abstract class...[21:48:32] <deufrai> ernimril: let me get back to you in a bit[21:48:37] <deufrai> ernimril: thanx already[21:49:18] *** BigAllan has joined ##java[21:51:07] <deufrai> ernimril: the class I'm looking for are not in a separate .jar file. They are in the same source tree as the main app code.[21:51:29] <ernimril> deufrai: source files have to be compiled before you can load them into the jvm[21:51:32] <deufrai> could my app (once exported as a runnable .jar) explore its own .jar file ? I guess yes[21:51:48] <ernimril> deufrai: yes, you can look in your jars[21:52:17] <deufrai> Ok, then this code will help me for sure. Thanx[21:54:07] <blahjake> Verbafoo: running remotely?[21:54:48] <blahjake> Verbafoo: like are you X-forwarding over SSH or anything like that?[21:55:24] <Verbafoo> blahjake: not at all[21:55:50] <blahjake> Verbafoo: what's your environment?[21:56:04] <Verbafoo> blahjake: not at all[21:56:15] <Verbafoo> blahjake: kde4 on kubuntu 8.10[21:56:27] *** MigoMipo has quit IRC[21:56:27] <Verbafoo> thanks Logi[21:56:28] *** fryderyk has quit IRC[21:56:36] *** Meddi has left ##java[21:56:39] <blahjake> Verbafoo: running in konsole or via the run dialog?[21:56:46] *** bas-i has quit IRC[21:56:54] <Verbafoo> blahjake: thanks also ; it's working now ; i did not understand what was the problem (via konsole)[21:57:13] <cybereal> maybe you were sudo and forgot or something[21:57:18] <blahjake> Verbafoo: oh ok, didn't realize it was worked out[21:57:54] <deufrai> ernimril: great. Thank you for this starting point. Adapting it will be easy[21:58:08] <Verbafoo> i've installed openjdk-6-jre but the display is buggy[21:58:15] <blahjake> i had the most frustrating time with SWT being unable to create a Display once, eventually realized i'd ssh-d into localhost to test something and hadn't dropped back out[21:58:30] <Verbafoo> should i install sun-java6-jre ?[21:58:40] *** Towny has joined ##java[21:58:54] *** Towny has left ##java[21:58:57] *** Pianista has quit IRC[21:59:18] <blahjake> Verbafoo: sure, sun one works fine, that's what i'm using now[21:59:24] <Verbafoo> ok[22:01:07] *** DjZemich has joined ##java[22:02:45] *** werdan7 has joined ##java[22:04:33] <Ven]n> should this work? http://rafb.net/p/kmRpDY16.html[22:05:00] *** aioobe has quit IRC[22:05:35] <ernimril> Ven]n: how can we know, there are a lot of objects and methods that we know _nothing_ about[22:05:42] <Ven]n> :)[22:05:43] <ernimril> ~snippets[22:05:43] <javabot> Snippets too often lack vital information. Create a test case instead.[22:06:04] <Ven]n> http://rafb.net/p/Yr0vK346.html[22:06:07] *** pfn has quit IRC[22:06:09] <Ven]n> thats the class[22:06:33] <Ven]n> i need line 160 to be repeated every 200 ms[22:06:44] *** pfn has joined ##java[22:07:11] *** jkriesten has quit IRC[22:07:42] *** vix85 has quit IRC[22:07:52] <cybereal> how are you going to stop that timer if your only reference to it is lost when the method exits?[22:08:08] <cybereal> also, you have ot realize java's not realtime so you need to progress frames asynchronously[22:08:17] <cybereal> that means you might have to skip frames if the cpu bogged down, or whatnot[22:09:01] <Ven]n> hmm[22:09:45] <cybereal> the usual idea behind this is that you set the frame to be whatever it should be for the current "time" generally the real current time modulated based on the frame count and frame delay[22:10:13] <Ven]n> too much information :)[22:10:14] <cybereal> then the frequency that your timer actually executes isn't as important, faster execution would potentially result in smoother animation/video updates though[22:10:27] <Ven]n> what happens now is that it only moves my frameSlider when i press pause and start again[22:11:01] <cybereal> you probably didn't schedule your task repeating[22:11:23] <cybereal> no it seems you did, hm[22:11:50] <cybereal> it's hard to work on other people's problems and your own at the same time :)[22:12:37] <cybereal> Ven]n: well what happens if you keep the timer reference in the class scope?[22:12:54] *** hrehf has quit IRC[22:13:21] <Ven]n> instead of the frameSlider.... i put in System.out.println(duration).. and that kept spamming duration over and over[22:13:40] *** werdan7 has quit IRC[22:13:45] <cybereal> meeting time[22:14:49] *** durka42 has quit IRC[22:15:08] *** codethief has quit IRC[22:16:38] <Ven]n> so.. i printed mediatime every 2 seconds.. and it seems it doesnt update itself[22:16:44] <Ven]n> every time it says 0.0[22:16:59] <svm_invictvs> yay[22:17:03] <svm_invictvs> they gave me a linux desktop at work.[22:17:32] <Ven]n> it only updates mediatime if i pause the movie and start it again[22:19:01] *** josemoreira has joined ##java[22:19:35] <[TechGuy]> vaguely smells like an EDT-related issue[22:19:58] <Ven]n> eastern daylight time? :)[22:20:27] <[TechGuy]> ~~Ven]n edt[22:20:27] <javabot> Ven]n, 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[22:20:47] <Ven]n> hm[22:20:49] *** mdmkolbe has joined ##java[22:21:29] <mdmkolbe> What is a "static import"? (I'm an old Java 2 programmer)[22:21:53] <joed> ~static[22:21:54] <javabot> joed, static is a keyword which indicates that a member is scoped to a class rather than an object instance. Members of interfaces (except methods) are always static. Nested interfaces and enums are always static. See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.[22:23:12] <mdmkolbe> thx[22:23:30] *** romanb has quit IRC[22:23:41] *** mdmkolbe has quit IRC[22:24:03] *** thecarlhall has quit IRC[22:27:34] *** monkeycid has joined ##java[22:27:56] <Ven]n> p.getMediaTime().getSeconds() instead of mediatime[22:27:58] <Ven]n> that fixed it[22:28:01] <Ven]n> dont understand why[22:28:07] *** Drizzt321 has joined ##java[22:29:20] *** durka42 has joined ##java[22:30:31] *** durka42 has quit IRC[22:31:04] <Drizzt321> I'm using HttpURLConnection to do an API call via a REST interface, and I'm trying to get the content of the response with .getGetContent (http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLConnection.html#getContent()) It says that an object of some type under sun.net.www.content. is created and returned, but I can't find ANY documentation on the classes that those might be, or how to get...[22:31:05] <Drizzt321> ...at the actual data contained within them. Anyone know where I can get more info?[22:32:53] *** morkar- has quit IRC[22:33:10] <[TechGuy]> Any reason you're using getContent rather than getInputStream?[22:36:18] *** steve-e has quit IRC[22:36:23] *** Varox has joined ##java[22:36:25] <Drizzt321> I figured it was an easier/faster way to get the resulting text that I know (testing through my web browser) is returned[22:36:53] <[TechGuy]> if you know it's text, just get the input stream and read as normaml[22:36:54] <Drizzt321> should I not bother and just wrap the getInputStream() with something like a bufferedreader?[22:37:05] <[TechGuy]> dealing with content handlers gets icky[22:37:24] *** _stack has quit IRC[22:37:39] *** sebr_afk is now known as sebr[22:38:18] *** TryNiX has joined ##java[22:38:32] <TryNiX> what is difference between protected and private classes[22:38:34] <jonaslund> hmh[22:39:00] *** slango has joined ##java[22:39:08] <slango> does java have any type of heredoc syntax?[22:39:19] <jonaslund> If getContent does proper decoding and handling of various encodings i'd say it's a better choice[22:39:30] <AMcBain> slango: no. Java doesn't imiate poor languages.[22:39:34] <AMcBain> imitate*[22:39:45] <Drizzt321> [TechGuy]: ah, ok. thanks. probably easier then[22:39:49] <slango> AMcBain, well, that's a whole lot of opinion, when a factual answer would have done[22:39:51] <slango> but thanks[22:39:54] <AMcBain> :P[22:40:22] <slango> AMcBain, so what is the easiest way to get a bunch of static HTML into a Java servlet?[22:40:30] <Drizzt321> jonaslund: yea, usually a better idea, but I know I'm getting back straight plain text, so if I can avoid having to use anything thats a pain, I'll pass.[22:41:09] <AMcBain> slango: read it in from a server-side file? I don't know. I haven't done those things in a long while. Someone else might know.[22:41:23] <[TechGuy]> indeed[22:41:41] <AMcBain> (I was joking about the PHP though, you should know, as I have to use it too :-/ it's not great, but it works, sometimes)[22:41:48] <[TechGuy]> Hardcoding blocks of output is A Bad Thing, regardless of how "static" you think it is[22:41:55] <jonaslund> slango: maybe you want quercus[22:41:58] * EdwardIII manages some old php apps.... hrm[22:42:09] * [TechGuy] shudders[22:42:18] <AMcBain> If one thing goes wrong, it all blows up.[22:42:31] <[TechGuy]> The one big PHP app I ever wrote, the last update I did to it was in 2002. It's still running.[22:42:40] <slango> jonaslund, not for this project[22:42:41] *** dmlloyd has joined ##java[22:43:17] <slango> and Java doesn't have a simple way to read the whole contents of a file into a string either, does it?[22:43:27] *** funktor has joined ##java[22:44:14] <dmlloyd> no, mainly because that's completely daft[22:44:24] <jonaslund> slango: it's not exactly rocket-science to implement yourself? :)[22:44:55] <slango> jonaslund, yeah, I know... I'm just trying to minimize my effort here[22:44:59] <slango> it's an assignment for class[22:45:07] <slango> the course topic is not Java though[22:45:25] *** beol has quit IRC[22:45:27] <AMcBain> slango: why not read it in and print it out to the output? no need to turn store it in one large string ... it's a waste of time.[22:45:28] <slango> but the prof requires that we use Java because he apparently is unable to read the code of other C-based languages[22:45:43] <AMcBain> s/turn//[22:45:47] <slango> AMcBain, good point[22:46:10] <[TechGuy]> while loop, one more line of code. Gasp.[22:46:21] <AMcBain> it also keeps it out of memory, if the file is large, as you don't have much in memory except the buffer (if you buffered the input stream)[22:46:29] <Drizzt321> yea, I use both PHP and Java, and both have their uses[22:46:30] * jonaslund is happy that his templating system is working well now[22:46:49] <jonaslund> now do i integrate it with rhino[22:46:52] <jonaslund> ? :)[22:47:04] <AMcBain> Rhino = JS ... so I'd say yes :) .... :P[22:47:12] *** Mack has joined ##java[22:47:13] <Drizzt321> java for real serious apps, and php is good for building quick UI's that are easily accessible for our clients[22:47:39] <[TechGuy]> ~php[22:47:39] <javabot> [TechGuy], php is the solution of choice for relaying mysql errors to web users.[22:47:49] * jonaslund is actually a bit disappointed in rhino performance[22:47:54] <jonaslund> atleast the compiler helps a bit[22:48:15] <Drizzt321> lmao[22:48:38] <AMcBain> Pretty Hellish Programming[22:48:54] *** Zemich has joined ##java[22:48:58] *** jbellis has joined ##java[22:49:04] <EdwardIII> hrm OK so you can't call a non-static class from inside a static class e.g. public static void main(.... does this mean that a command line app will almost always have at least 2 classes?[22:49:05] *** Zemich has quit IRC[22:49:22] <[TechGuy]> wtf[22:49:26] <AMcBain> no[22:49:29] <[TechGuy]> no[22:50:10] <jbellis> does java have anything like python's sys.excepthook, which allows specifying a method to run when an exception occurs in any thread? (my use case is, i want to send all exceptions, including RuntimeExceptions, through log4j, and it's a legacy code base so it's tough to make sure i get all the threads when adding catch{} manually)[22:50:22] *** trentg has joined ##java[22:50:55] *** applicable has joined ##java[22:51:04] <Drizzt321> jbellis: erm...do a try{ } catch( Throwable e ) {} I think it is to catch everything. not saying its a good idea tho[22:51:10] <trentg> Hello. I want to make an executable jar file but I have some JNI libs. How do I do it without making users run a shell script to launch the jar?[22:51:14] <applicable> i have a dir org/json/java-files. i want to compile this to a jar. how?[22:51:15] <Drizzt321> in fact, I think its usually not[22:51:29] <[TechGuy]> jbellis: There's a setDefaultExceptionHandler somewhere, I think in Runtime or System[22:52:01] *** mengu has quit IRC[22:52:10] <trentg> applicable: http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html[22:52:37] <EdwardIII> ah right... so you're just supposed to create any methods that you want to call inside main(..){ as static then? i'm trying to think what the implications of this are.....[22:52:44] *** ScottG489 has quit IRC[22:52:51] <[TechGuy]> oh boy...[22:53:00] <[TechGuy]> No, you create an instance of the containing class[22:53:08] <EdwardIII> i'm very green[22:53:12] <applicable> but if i want to compile each file in a dir ?[22:53:36] <[TechGuy]> ~~EdwardIII getstarted[22:53:36] <javabot> EdwardIII, getstarted is http://java.sun.com/tutorial/getStarted[22:53:46] <EdwardIII> i'm following the java book on java.sun.com, it's really great[22:54:07] *** bindaas has quit IRC[22:54:31] *** quodt has joined ##java[22:54:56] <trentg> Does anyone know how I can create a jar with native libs?[22:54:56] *** DjZemich has quit IRC[22:56:03] *** Verbafoo has quit IRC[22:56:17] <quodt> i was wondering why i do not get a warning when casting an object to any interface...[22:56:29] <quodt> this is not very type-save[22:57:27] *** omaru has joined ##java[22:57:36] *** gionny has quit IRC[22:57:37] <jbellis> [TechGuy]: thanks! that's exactly what i was looking for[22:57:42] <whaley> quodt: because when you cast a) the compiler assumes you know wtf you are doing b) you should expect, catch, and handle ClassCastExceptions appropriately[22:57:59] *** Misc1 has left ##java[22:58:33] *** shadewind has quit IRC[22:58:57] *** bas-i has joined ##java[22:59:02] *** ScottG489 has joined ##java[22:59:15] <quodt> whaley: hm, i mean, i like this behaviour...but it feels not type-save[22:59:41] <EdwardIII> enough geek for today i think - take it easy all[22:59:46] <whaley> quodt: casting definitely void type safety and it is one of the warts of java, imo. Use Generics where you can.[22:59:48] <joed> Is it supposed to be doing mind-reading? The compiler that is?[22:59:57] <whaley> *voids[23:00:11] * joed voilates whaley's void[23:00:16] <[TechGuy]> void*[23:00:17] <whaley> ./clear[23:00:44] <joed> 10-4, over and out.[23:00:50] <whaley> joed: :*[23:01:10] <[TechGuy]> (*(malloc(1024))->doFrobnicate(&bar)[23:01:12] *** _acid__ has quit IRC[23:01:21] * whaley gouges his eyes[23:02:19] *** fukazzz has quit IRC[23:02:21] <[TechGuy]> It's got a certain... rustic, provincal quality to its flow[23:02:27] <slango> alright, here's a good question... my tomcat directory is in one place on my machine, but this servlet will be deployed elsewhere by my professor[23:02:37] <cybereal> slango: that wasn't a question[23:02:48] *** genesiss has quit IRC[23:02:50] <slango> how can I read a text file from a location relative to the Servlet.class file in question[23:02:52] <[TechGuy]> don't say your servlet has hardcoded paths[23:03:03] *** Junior has quit IRC[23:03:06] <slango> [TechGuy], that's what I'm working on fixing[23:03:25] *** neuro_damage has joined ##java[23:03:31] <cybereal> slango: include it in the package that your servlet's in, and load it with getResouresAsStream or whatnot[23:03:41] <[TechGuy]> ^^^[23:04:24] *** Drizzt321 has quit IRC[23:04:29] *** trentg has left ##java[23:05:01] <cybereal> really it could be anywhere on the classpath as long as it's visible to your servlet's loader[23:05:10] *** Copter has quit IRC[23:05:35] *** jbellis has left ##java[23:05:42] <cybereal> imo that's the easiest way, no idea if that fits with your, almost assuredly, ridiculous school-type restrictions[23:05:55] *** Riov has joined ##java[23:06:53] *** Hink has quit IRC[23:08:45] <slango> cybereal, I think I can make it work[23:08:55] <slango> what package do I have to import for getResourceBySteam?[23:09:01] <slango> *As[23:09:21] <cybereal> it's on classes in java.lang, which is already imported, let's see if I can remember where exactly...[23:09:27] <cybereal> ~javadoc Class.getResourceAsStream(*)[23:09:29] <javabot> cybereal: http://is.gd/jeu4 [java.lang.Class.getResourceAsStream(String)][23:09:38] <tieTYT2> i'm having a huge brain fart[23:09:38] <cybereal> there's one rather convenient location of it[23:10:01] <tieTYT2> is !a || (a && b) == !a || b ?[23:10:21] <cybereal> slango: to use that you just need an instance of Class which is trivial to get, in an instance method getClass() will return the current class's Class instance...[23:10:39] <le_biloute> tieTYT: sure[23:10:59] <le_biloute> !a || a && !a || b == !a || b[23:11:13] <cybereal> tieTYT2: if you even got to (a && b) you already know a is true, because you're using a conditional operand[23:11:15] *** ScottG489 has quit IRC[23:11:18] <cybereal> so no need to evaluate a again[23:11:24] <tieTYT2> yeah i figured[23:11:31] <tieTYT2> ok thanks[23:11:36] <tieTYT2> the spec was written in a confusing way[23:12:42] *** mprentice has quit IRC[23:14:09] *** timte has quit IRC[23:14:19] *** mthx has left ##java[23:15:01] *** amz has joined ##java[23:15:02] *** Yustme has quit IRC[23:15:18] *** svm_invictvs has quit IRC[23:15:28] *** riotz has joined ##java[23:16:22] *** vesz has quit IRC[23:17:40] <slango> cybereal, so once I have my InputStream, how do I get a Reader type to use with BufferedReader?[23:17:51] <slango> or is there some other way I should do that?[23:18:48] *** BigAllan has quit IRC[23:18:52] *** [TechGuy] has quit IRC[23:18:54] <dmlloyd> ~~ slango javadoc InputStreamReader[23:18:56] <javabot> slango: http://is.gd/jlCw [java.io.InputStreamReader][23:18:59] <dmlloyd> specify a character encoding[23:21:03] *** omaru has quit IRC[23:21:35] *** rdancer has quit IRC[23:24:05] *** conan has joined ##java[23:24:47] *** ahughes has joined ##java[23:28:01] *** drip has quit IRC[23:29:09] <slango> dmlloyd, thanks[23:30:40] <slango> dmlloyd, is there anything necessary to make a text file a resource in a package other than just putting it in the folder?[23:30:57] *** amz has quit IRC[23:31:18] <cybereal> slango: nope[23:31:40] <cybereal> slango: just follow the same system you see is used for the class files in packages[23:32:22] <slango> InputStream strm = getClass().getResourceAsStream("style.txt");[23:32:25] <slango> so that is fine?[23:33:13] <cybereal> either that or "com/package/name/here/style.txt" I forget[23:34:20] <TryNiX> is it possible to insert a gif photo into a BufferedImage object[23:34:26] <AMcBain> I think it does use slashes for AsStrema[23:34:29] *** ScottG489 has joined ##java[23:34:32] <AMcBain> Stream*[23:34:51] *** fryderyk has joined ##java[23:35:34] *** amz has joined ##java[23:35:40] *** gnufied has quit IRC[23:36:06] *** trentg has joined ##java[23:36:07] <cybereal> TryNiX: sure, why not?[23:36:08] *** applicable has quit IRC[23:36:22] <slango> well that syntax gives me a null pointer exception instead of an infinitely repeating loop of null[23:36:31] <trentg> Why does my app run with 1.5 and not 1.6?[23:36:50] <slango> alright, have to go to class[23:36:51] <cybereal> trentg: how could we possibly know?[23:36:53] <slango> I'll be back on in a bit[23:37:00] *** slango has quit IRC[23:37:03] <trentg> I get UnsatisfiedLinkErrors with 1.6 for my native libs[23:37:27] <jonaslund> maybe you oughta recompile them[23:37:34] <trentg> I thought java was supposed to be backwards compatible[23:37:41] <jonaslund> (and setup some dual-version compilation system)[23:37:43] <cybereal> it is[23:37:52] *** amz has quit IRC[23:37:53] <cybereal> you're complaining about linking errors, not backwards compatibility errors[23:37:55] <jonaslund> trentg: not necessarily with native libs[23:38:01] *** Vantaa has quit IRC[23:38:20] <trentg> cybereal: those are runtime errors[23:38:28] <cybereal> so what?[23:38:34] <trentg> So it should work[23:38:40] <cybereal> It works for me[23:38:45] <cybereal> I use one native lib, works fine in 1.5 and 1.6[23:38:59] <cybereal> maybe you have it configured wrong, wrong library path or something *shrug*[23:39:16] <trentg> I tried all the library paths, everything, but it won't run on 1.6[23:39:17] <cybereal> it's not as if you've provided any useful information to get useful answers[23:39:27] *** aleksei has joined ##java[23:39:36] <aleksei> hola[23:39:38] *** amz has joined ##java[23:39:47] <AMcBain> hi[23:40:13] <trentg> cybereal: what more useful information could I provide?[23:40:43] <cybereal> your complete stack trace for one, maybe the output of ldd on your library binary[23:40:43] *** dk_schrute has quit IRC[23:40:44] *** mistik1 has quit IRC[23:40:49] <cybereal> maybe even your OS?[23:40:52] <joed> ~doesnt work[23:40:52] <javabot> joed, 'doesn't work' is not very helpful. What does it do, sit around on IRC all day?[23:40:54] <cybereal> and don't paste in channel[23:41:24] *** drip has joined ##java[23:41:29] <trentg> I already told you I get an UnsatisfiedLinkError when I call loadLibrary, only on version 6[23:41:37] <trentg> OS is OSX[23:41:43] <cybereal> oh[23:41:50] <cybereal> you're haivng 32 bit vs. 64 bit problems[23:41:53] <cybereal> having even[23:42:13] <cybereal> trentg: see you left out VITAL information, and I didn't ask you to repeat yourself, I asked for all new info you didn't provide, so maybe learn to read a little better too...[23:42:14] <trentg> Hmm what is 32 bit and what is 64 bit?[23:42:28] * cybereal spews his chocolate milk all over the kid sitting across the table[23:42:35] *** dk_schrute has joined ##java[23:43:09] <cybereal> trentg: I'm sorry, your apparent skill level has been severely demoted to "r0bby" level, I can't help you any further.[23:43:25] <AMcBain> further, r0bby knows what that is.[23:43:50] <trentg> I was asking what software is 32 bit and what is 64[23:43:53] <cybereal> r0bby likes to answer such remedial questions, I like to avoid the ensuing tedious kindergarten discussions that usually ensue[23:44:05] <cybereal> trentg: if you were asking that, then why the hell didn't you ask that?[23:44:06] <trentg> Man you have a big ego[23:44:19] <cybereal> ~~ trentg smart questions[23:44:19] <javabot> you need to ask smart questions to get a smart answer. see http://www.catb.org/~esr/faqs/smart-questions.html[23:44:33] *** skoskav has quit IRC[23:44:37] <Sou|cutter> trentg: no worries, it's because he doesn't know the answer[23:44:44] * Sou|cutter grins[23:45:03] <cybereal> trentg: if you knew anything about OS X then you would know that java 1.6 on OS X is only available in 64 bit mode, aand the default 1.5 implementation is 32 bit[23:45:14] *** Ivellina has quit IRC[23:45:22] <cybereal> trentg: and without going through some nastiness you can't just link arbitrarily between 32bit/64bit code[23:45:31] <trentg> Who said I know anything about OSX?[23:45:46] <cybereal> If you're doing native code work for a platform, you need to know about it[23:46:00] <trentg> I've never seen osx until a couple days ago[23:46:01] <cybereal> I expect people doing things like this to be equipped for the job[23:46:27] <trentg> Ya cause I bet you just woke up knowing all of this one day[23:46:31] <joed> ~nirvana[23:46:31] <javabot> joed, I have no idea what nirvana is.[23:46:54] <trentg> Oh well, I'll provide two different versions[23:47:37] *** Stiny has joined ##Java[23:47:49] *** mistik1 has joined ##java[23:47:53] <cybereal> trentg: I hope this has been as good for you as it was for me[23:48:15] <Stiny> Is there a way I can move the pointer around in the DOS window?[23:48:26] <Sou|cutter> Stiny: no[23:48:37] *** slango has joined ##java[23:48:46] <Stiny> Why is Java lame sometimes...[23:49:00] <Sou|cutter> Stiny: maybe check out JavaCurses[23:49:02] <cybereal> Stiny: it's not java in this case, it's the horrible terminal provided by dos and windows over the years[23:49:17] <cybereal> Stiny: in every other platform you could at least send terminal control codes without having to invoke native crap[23:49:18] <Sou|cutter> ~Stiny javacurses[23:49:18] <javabot> Sou|cutter, I have no idea what Stiny javacurses is.[23:49:18] *** crowbar has quit IRC[23:49:22] <Sou|cutter> ~Stiny jcurses[23:49:22] <javabot> Sou|cutter, I have no idea what Stiny jcurses is.[23:49:29] <Sou|cutter> ~~Stiny javacurses[23:49:29] <javabot> Console/terminal support: See JavaCurses - http://sourceforge.net/projects/javacurses/ and Charva - http://www.pitman.co.za/projects/charva/ and Jcurzez - http://www.nongnu.org/jcurzez/ and also "Console Window with a JTextArea Component" - http://javaalmanac.com/egs/javax.swing.text/ta_Console.html and Java 6.0's java.io.Console class.[23:49:30] <joed> ~tool[23:49:30] <javabot> A tool is only as good as its user. Tool.[23:49:32] <Stiny> ok cybereal. I can buy that. ;)[23:49:34] <Sou|cutter> there we go[23:49:49] <Stiny> thanks.[23:50:07] <cybereal> Stiny: I mean, those jerks can't even get the scroll bar on it right, I swear it always indicates that you're scrolled up about 30%[23:50:11] <cybereal> even if you're at the bottom[23:50:12] *** slango has quit IRC[23:50:19] <Stiny> Yeah. XD[23:50:38] <Stiny> It's terrible.[23:50:42] <cybereal> even when they give you an awesome shell finally (powershell/monad) they still make you use that terrible terminal emulator window heh[23:50:48] <cybereal> I wonder if windows 7 improves it at all[23:51:06] <Stiny> Who knows.[23:51:09] *** jdolan_ has quit IRC[23:51:34] <aleksei> aint that a comma before the "Tool"[23:51:35] <aleksei> hehe[23:53:11] *** bas-i has quit IRC[23:53:33] <r0bby> cybereal: you bitch[23:53:48] <Stiny> Is "aint" not a real word.[23:53:48] <r0bby> I'll beat you up one day...and maybe steal your wallet[23:53:55] <Stiny> o.O[23:53:58] <r0bby> Stiny: it's not[23:54:03] <Stiny> I know.[23:54:12] <aleksei> haha[23:54:22] <Stiny> I wanted to say it before you had said anything. I was talking to aleksei[23:54:53] <TryNiX> but ain't is ? isn't it ?[23:55:02] *** gnufied has joined ##java[23:55:21] <aleksei> ~ain't[23:55:22] <javabot> aleksei, I have no idea what ain't is.[23:55:28] <aleksei> no it seems[23:55:30] <aleksei> hehe[23:56:00] <Stiny> Nope[23:56:10] <TryNiX> online dictionaries say its a contraction of "am not" , but o well =p[23:56:17] <TryNiX> can't trust anything online anymore =p[23:56:30] *** Stiny has quit IRC[23:56:36] <AMcBain> ~idk[23:56:36] <javabot> AMcBain, I have no idea what I Don't Know is.[23:56:43] <cybereal> TryNiX: contractions are only accepted as words due to mass popularity anyway[23:57:16] <cybereal> TryNiX: they really only exist to encompass colloquial speech impediments but the nature of language... being so fluid based on how its actually used :)[23:57:24] <TryNiX> true =p[23:57:25] <cybereal> it's a wonder "ain't" hasn't become more generally accepted[23:57:35] <TryNiX> but this one, interestingly has quite a history[23:57:45] <TryNiX> quoting an online dictionary: " Ain't has a long history of controversy. It first appeared in 1778, evolving from an earlier an't, which arose almost a century earlier as a contraction of are not and am not."[23:57:49] <cybereal> etymology can be pretty fun[23:58:10] <dmlloyd> I'm sure I've heard "amn't" before[23:58:59] <cybereal> a while back one of my friends and I came up with the longest sentences we could make entirely out of arbitrarily invented contractions. It was rather amsuing.[23:59:01] <cybereal> amusing