Switch to DuckDuckGo Search
   February 9, 2009  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:12] <zupaxx> USE ECLIPSE please
[00:00:27] <ojacobson> ~ide war
[00:00:27] <javabot> idea rocks, see http://xkcd.com/378/ for further details.
[00:00:30] *** oxi has quit IRC
[00:00:32] <zupaxx> eclipse not monopolized
[00:00:35] <waz> please?
[00:00:42] <zupaxx> pls
[00:00:43] <waz> SWT is a load of crap
[00:01:22] *** ChanServ sets mode: +o waz
[00:01:24] <JEisen83> Do you tend to use SingleFrameApplication and that stuff?
[00:01:29] *** zupaxx was kicked by waz (stop)
[00:01:36] <_W_> zupaxx, we're not talking about IDEs here
[00:01:36] *** durka42 has joined ##java
[00:01:43] <ojacobson> _W_: denied
[00:01:47] *** zupaxx has joined ##java
[00:01:57] <_W_> just as well
[00:02:04] *** Trollinator has joined ##java
[00:02:15] <Trollinator> my god, java really does suck.
[00:02:22] *** waz sets mode: +b *!*@85.183.215.164
[00:02:23] <zupaxx> dont say that traitor
[00:02:24] <ojacobson> Trollinator: I know, just look at the people who program in it
[00:02:38] <waz> Eclipse does suck!
[00:02:47] <zupaxx> ok
[00:02:54] *** Trollinator has left ##java
[00:03:03] <zupaxx> netbeans tied to glassfish
[00:03:09] <zupaxx> monopoly all sun products
[00:03:11] <waz> no it's not
[00:03:17] <waz> stop being an idiot
[00:03:20] <zupaxx> 1 vendor
[00:03:25] *** waz sets mode: +b *!*@acl1-1375bts.gw.smartbro.net
[00:03:27] <waz> never mind
[00:03:33] <waz> go be an idiot somewhere else
[00:03:39] <ojacobson> zupaxx: your ignorance is no longer entertaining
[00:04:14] *** zupaxx has left ##java
[00:05:27] *** UT2K3 has quit IRC
[00:05:32] *** Bollinger has quit IRC
[00:06:03] *** t3mp3st has quit IRC
[00:06:15] *** yobo2 is now known as Guest10827
[00:06:23] *** yobo2 has joined ##java
[00:07:18] *** FireSlash has joined ##java
[00:07:44] *** beol has quit IRC
[00:07:53] *** timte has quit IRC
[00:07:57] <JEisen83> So, anyway.
[00:08:21] <HeatHawk[AP2]> i actually like netbeans, lol
[00:08:36] <_W_> HeatHawk[AP2], we're /not/ talking about the IDE
[00:08:47] *** alek_b has joined ##java
[00:08:51] *** waz sets mode: -b *!*@acl1-1375bts.gw.smartbro.net
[00:09:01] <HeatHawk[AP2]> _W_, i know, i was just having a snicker
[00:09:16] <JEisen83> I've been using it mostly for Matisse stuff, then I go and write more of the underlying code in Eclipse. But either way, I'm looking for whatever techniques tend to get this kind of thing done well. ;)
[00:09:26] <_W_> I'm sure that with experience I would like both Netbeans, Eclipse and IDEA
[00:09:46] <_W_> enough people using each that neither can be absolute rubbish
[00:10:02] <_W_> also, I see my grammar is worsening, so I am heading off to bed
[00:10:12] <deadbeef> Sadly the Debian Tomcat can't be used with Eclipse as Eclipe doesn't recognize the files at /var/lib/tomcat5.5 as a valid tomcat install.
[00:10:16] <deadbeef> wow
[00:11:14] <HeatHawk[AP2]> you are probably doing it wrong
[00:11:22] *** viperhr has quit IRC
[00:11:26] <JEisen83> So is the Swing Application Framework a decent way to go? For people who may have used it?
[00:11:45] <HeatHawk[AP2]> i love swing
[00:11:47] *** zupaxx has joined ##java
[00:11:50] <HeatHawk[AP2]> i picked it up with in a week
[00:11:59] <waz> Swing is nice
[00:12:07] *** Guest10827 has quit IRC
[00:12:15] <HeatHawk[AP2]> and if you really dont care what the code looks like, Swing Builder in netbeans is pretty cool
[00:12:18] <waz> I'd probably go JavaFX if I was doing something new for the desktop
[00:12:22] <JEisen83> I use Swing in general, yeah. This application framework stuff is what I've been looking ar.
[00:12:25] <JEisen83> at
[00:13:24] <zupaxx> yeah swing is nice
[00:14:54] *** _stack has quit IRC
[00:15:26] <JEisen83> Looking through the examples, it looks like SAF might be the way to go. Out of all the ones I've tried in the last 2 weeks for this.
[00:16:33] <JEisen83> With a JPA layer
[00:17:09] *** SystemWizard has quit IRC
[00:17:22] <JEisen83> I think I just need to really get in and understand beans binding with JPA. That's what I think was tripping me up.
[00:17:38] *** arpu has joined ##java
[00:18:59] <zupaxx> maybe jcp can do jsr for ide
[00:19:15] <r0bby> zupaxx: why?
[00:19:27] *** FireSlash has quit IRC
[00:19:29] <r0bby> standardize an IDE?
[00:19:39] <zupaxx> just an idea
[00:19:54] <zupaxx> yeah.
[00:20:11] *** tipme has joined ##java
[00:20:44] *** ScottG489 has quit IRC
[00:21:13] *** tipme has quit IRC
[00:24:11] *** Fanook has quit IRC
[00:25:16] <waz> wow
[00:25:23] <waz> that is a completely idiotic idea
[00:26:08] *** afaik has quit IRC
[00:26:36] *** zophy has joined ##java
[00:27:10] *** zophy has quit IRC
[00:27:39] *** drichards has quit IRC
[00:27:53] *** zophy has joined ##java
[00:30:12] *** Absolute0 has quit IRC
[00:32:03] *** alek_b has quit IRC
[00:33:45] <ojacobson> waz: I feel a little sorry for the chanops here
[00:33:46] *** ChanServ sets mode: -o pr3d4t0r
[00:33:52] <pr3d4t0r> ojacobson: It's a tough life.
[00:34:03] <ojacobson> you can't really use your /ignore list effectively because you have to be able to hear the stupidity in order to stop it
[00:34:42] *** Varox has joined ##java
[00:35:01] *** SystemWizard has joined ##java
[00:35:06] <waz> heh
[00:35:27] <waz> at least zupaxx is innocently stupid
[00:35:34] <ojacobson> Yah.
[00:35:41] *** cambazz has joined ##java
[00:35:56] *** kaos01 has joined ##java
[00:36:25] *** kapipi has quit IRC
[00:36:50] <reverend> i like to think of my contributions to this channel consisting of a long runs of utter stupidity punctuated by a rare moment of hilarious stupidity
[00:36:51] <kaos01> hi, when one installs the x86_64 java , can one still use -client option ?
[00:38:25] *** vesz has quit IRC
[00:40:40] <aTypical> reverend, you can't take my job!
[00:41:29] *** Zvpun has joined ##java
[00:41:44] <reverend> i can try, though
[00:42:41] <aTypical> Well, as long as you remember to harass r0bby I guess I it'd be all right.
[00:43:03] *** psydian has quit IRC
[00:43:41] <push[EAX]> in eclipse,what would be the easiest way to get the compiler to generate a jar everytime it compiles ?
[00:43:49] <push[EAX]> (i have code that needs to be in a jar to run correctly, esp regarding image paths etc)
[00:43:58] <push[EAX]> but eclipse only compiles to .class by default, i must export by hand to jar
[00:44:06] <push[EAX]> doing it everytime is time consuming
[00:45:02] *** aksn has quit IRC
[00:45:03] <ojacobson> push[EAX]: if you need it to be in a JAR, you're doing it wrong (getResource/AsStream work fine with FS classpath entries too)
[00:45:09] *** Absolute0 has joined ##java
[00:45:59] <push[EAX]> even for splash?
[00:46:47] <ojacobson> The splash manifest entry obviously won't work, since there's no manifest for non-JAR paths, but for debug runs in the IDE you c an pass a system property that does the same thing
[00:46:51] *** Bigshot_ has joined ##java
[00:47:17] *** jgoo has joined ##java
[00:47:27] <Bigshot_> how can I get numbers between 200000 and 250000? using Math.random()? like this --> (Math.random()*100000)?
[00:47:44] <ojacobson> Bigshot_: use arithmetic.
[00:47:57] <Bigshot_> how to do that/
[00:47:58] <jgoo> Hey peeps. Quick dip into J2ME - JSR304 and JSR253 - are there any credible implementations on ANY device?
[00:47:58] <Bigshot_> ?
[00:48:01] *** teralaser has quit IRC
[00:48:30] <jgoo> This is the ability to initiate a call. I've been told there are implementations (there is a Nokia post from 11-08 saying none) but no specific devices
[00:48:58] *** lyy has left ##java
[00:49:03] <ojacobson> Bigshot_: +, *
[00:49:10] <reverend> Bigshot_: with addition... ?
[00:49:18] <ojacobson> push[EAX]: -splash:filename
[00:49:56] <Bigshot_> (Math.random()*200000)+250000?
[00:50:17] <ojacobson> Bigshot_: hire a programmer
[00:50:27] <ojacobson> You're not cut out to be one.
[00:50:43] <Bigshot_> thank you. :|
[00:52:00] <jgoo> Bigshot_, your random range is -..50000 and you want to add 200000 ... so you can work that out surely
[00:53:50] <Bigshot_> ( (Math.random()*50000)/10000 )+200000?
[00:54:43] *** Ilaggoodly has quit IRC
[00:56:16] *** kaos01 has left ##java
[00:56:36] *** teralaser has joined ##java
[00:56:48] <push[EAX]> ojacobson, BUT WHAT IF THE IMAGE IS INSIDE A JAR
[00:56:52] <push[EAX]> shit sry for caps
[00:57:03] *** gregor_k has quit IRC
[00:57:25] *** meanburrito920_ has joined ##java
[00:58:16] <teralaser> push[EAX] : getResource(...) is the way to get it
[00:59:28] *** Zvpun has quit IRC
[00:59:32] *** Daniel_H has quit IRC
[01:00:05] <Bigshot_> okay got it((int) (50000*Math.random())) + 200000 and yeah you are not cut out to be a programmer ojacobson :P
[01:00:21] <jgoo> Bigshot_, congrats
[01:00:38] *** jgoo has left ##java
[01:02:06] <AMcBain> Bigshot_: just because he wants you to do something for yourself?
[01:02:14] <AMcBain> ~ojacobson++
[01:02:15] <javabot> ojacobson has a karma level of 102, AMcBain
[01:02:35] <pr3d4t0r> Ah, rogers.com user.
[01:02:53] <Bigshot_> No, that's for discouraging someone :)
[01:02:55] <pr3d4t0r> Those were /banned from joining the Efnet #java channel due to the high percentage of retards who came from there.
[01:03:09] <pr3d4t0r> It must be endemic.
[01:03:18] <reverend> yes, it's a canadian thing
[01:03:25] <reverend> i've literally never seen clued up canadian irc users
[01:03:26] *** oxi has joined ##java
[01:03:33] <pr3d4t0r> reverend: Well, there are some.
[01:03:34] <reverend> well, except for some exceptions
[01:03:38] <pr3d4t0r> reverend: Heh.
[01:03:40] <reverend> like me
[01:03:56] *** Bigshot_ has quit IRC
[01:04:26] *** pandora-- has quit IRC
[01:04:34] <reverend> oh, yeah, and ojacobson
[01:07:20] <armyriad> I heard concatenating Strings with "+" was slow. What do I do instead?
[01:07:50] <reverend> it's not as simple as 'concatenating strings with '+' is slow'
[01:08:07] <reverend> and in the meantime, don't worry about it
[01:09:02] *** werdan7 has quit IRC
[01:09:07] *** elbeardmorez has quit IRC
[01:10:52] *** staykov has quit IRC
[01:11:00] *** werdan7 has joined ##java
[01:11:44] *** Absolute0 has quit IRC
[01:11:54] *** DevInquiry has joined ##Java
[01:12:10] *** MichielH has joined ##java
[01:12:12] *** Copter has quit IRC
[01:12:43] *** Absolute0 has joined ##java
[01:13:16] <JEisen83> Unless you're doing it in a loop, generally, don't worry about it.
[01:14:15] *** MIR100 has quit IRC
[01:15:17] <armyriad> Uh oh, I am doing it in a loop. It's in a toString method that I'm writing.
[01:15:41] *** orgy` has quit IRC
[01:16:02] <AMcBain> ~~armyriad javadoc StringBuilder
[01:16:04] <javabot> armyriad: http://is.gd/iRce [java.lang.StringBuilder]
[01:16:05] *** monestri has joined ##java
[01:16:55] *** staykov has joined ##java
[01:17:25] <reverend> how can we expect children to learn how to read if they can't even fit inside the building?
[01:17:26] *** blbrown has joined ##java
[01:18:00] <blbrown> find . -name *.java -exec grep -Hn String {} \; I am trying to pass this command through the ProcessBuilder. It doesn't return any results but on the command line it works. Has anyone run a command like this
[01:20:46] <reverend> the problem is likely \; which doesn't come out like you want
[01:21:18] *** ScottG489 has joined ##java
[01:21:49] <blbrown> reverend, what do I need to do to fix me
[01:22:23] *** monestri has quit IRC
[01:22:33] *** monestri has joined ##java
[01:23:05] *** Varox has quit IRC
[01:34:33] *** hrehf has quit IRC
[01:34:36] *** ScottG489 has quit IRC
[01:35:41] *** funktor has quit IRC
[01:36:36] *** thepointer-work has joined ##java
[01:37:26] *** ScottG489 has joined ##java
[01:38:27] <blbrown> reverend, have any idea?
[01:38:42] <blbrown> reverend, I tried this \\\\; that didn't do it
[01:39:50] <pr3d4t0r> blbrown: \\;
[01:40:23] <pr3d4t0r> Ugh.
[01:40:31] <pr3d4t0r> blbrown: I just saw your line. Pretty fugly.
[01:40:56] <blbrown> pr3d4t0r, how would you do a find/grep. find . -name *.java -exec grep -Hn String {} \;
[01:41:03] <pr3d4t0r> blbrown: I'd use awk instead of grea, and skip the -exec altogether.
[01:41:34] <pr3d4t0r> blbrown: So you want all the files that contain String {} in them?
[01:41:43] * pr3d4t0r checks what -Hh do
[01:42:07] <pr3d4t0r> Ah, the file name.
[01:42:22] *** monestri has quit IRC
[01:42:32] *** monestri has joined ##java
[01:42:45] <pr3d4t0r> blbrown: Yeah, I ugess that'll be nicer than awk for this case.
[01:42:50] <pr3d4t0r> blbrown: Ne'er mind.
[01:42:52] * pr3d4t0r left.
[01:42:56] <blbrown> hehe
[01:43:21] <r0bby> pr3d4t0r: I'd put the String im looking for in double quotes
[01:43:24] *** monestri has quit IRC
[01:43:24] <r0bby> when using grep
[01:43:29] <r0bby> grep -Hn "Foo"
[01:43:32] <blbrown> those didn't work either
[01:43:33] *** monestri has joined ##java
[01:43:37] <blbrown> with ProcessBuilder, anyway
[01:43:38] *** DevInquiry has quit IRC
[01:44:16] *** tansaku has joined ##java
[01:47:51] *** GarrettSF has joined ##java
[01:47:54] <The_Birdman> Maybe oro has a grep tool that you can combine with commons io filters helpers
[01:48:09] *** GarrettSF has left ##java
[01:48:27] *** zophy has quit IRC
[01:48:56] <reverend> blbrown: did you look at STDERR?
[01:49:51] <reverend> actually, i don't think you need to escape the ';' at all
[01:50:03] *** eduardopl has joined ##java
[01:50:27] *** oxi has quit IRC
[01:51:31] *** MichielH has quit IRC
[01:51:42] *** ayrnieu has quit IRC
[01:51:52] <blbrown> reverend, cool, that was the trick. Thanks
[01:51:53] *** gnech has joined ##java
[01:52:04] *** ayrnieu has joined ##java
[01:56:05] *** mr__daniel has quit IRC
[01:59:04] *** zupaxx has quit IRC
[01:59:04] *** ScottG489 has quit IRC
[02:04:10] *** LordMetroid has quit IRC
[02:06:43] *** tissue has joined ##java
[02:07:07] *** alek_b has joined ##java
[02:08:00] *** ScottG489 has joined ##java
[02:12:07] *** shadewind has quit IRC
[02:12:22] *** monestri has quit IRC
[02:12:44] *** ayrnieu has quit IRC
[02:13:35] *** ayrnieu has joined ##java
[02:14:00] *** zmanning has joined ##java
[02:14:44] *** eduardopl has quit IRC
[02:16:45] *** morkar- has quit IRC
[02:17:59] *** psydian has joined ##java
[02:18:09] *** monestri has joined ##java
[02:20:47] *** alek_b has quit IRC
[02:21:24] *** aleksei has joined ##java
[02:21:47] *** Insolit has quit IRC
[02:21:48] *** noobraska has quit IRC
[02:23:24] *** Bonix has quit IRC
[02:24:18] *** GarrettSF has joined ##java
[02:24:38] *** GarrettSF has left ##java
[02:25:23] *** alek_b has joined ##java
[02:28:08] *** hultqvist has joined ##java
[02:29:24] *** bearded_oneder has joined ##java
[02:29:50] *** J0bk has joined ##java
[02:31:19] *** FireSlash has joined ##java
[02:32:18] *** mele- is now known as rburton
[02:34:53] *** HockeyInJune has quit IRC
[02:34:58] *** teralaser has quit IRC
[02:37:38] *** Absolute0 has quit IRC
[02:40:27] *** neuro_damage has joined ##java
[02:40:41] *** Absolute0 has joined ##java
[02:40:53] *** hultqvist has quit IRC
[02:43:45] *** blbrown has left ##java
[02:44:48] *** javahorn has joined ##java
[02:45:02] *** HockeyInJune has joined ##java
[02:45:12] *** ryuho has quit IRC
[02:45:58] *** Inc` has quit IRC
[02:46:59] *** Inc` has joined ##java
[02:51:28] <kavon> what is the point of a finally{} after a try-catch?
[02:51:51] <waz> what do the docs say?
[02:51:55] <kavon> I know it executes that code regardless of what happens within the try, but if it isn't a showstopper, isn't it not even necessary?
[02:51:59] *** riotz has quit IRC
[02:52:26] <The_Birdman> kavon, sometimes you want some code to be executed whatever happens and/or do some cleanup
[02:52:47] <waz> if what's not a show stopper?
[02:52:56] <kavon> the exception waz
[02:53:20] <waz> maybe your code opened a file
[02:53:31] <waz> or some resource and you want to close it?
[02:53:49] <waz> finally is not required
[02:54:15] *** althaser has joined ##java
[02:55:18] <kavon> waz: hrm, alright thank you for explaining why one would use it
[02:56:28] <waz> I've never read docs that talked about finally that didn't
[02:56:36] *** marvs has quit IRC
[02:56:59] <r0bby> kavon: to close streams in the event of an exception, basically resource handling
[02:57:21] <r0bby> and in the event of success as well
[02:57:58] *** SystemWizard has quit IRC
[02:58:21] *** schasi has quit IRC
[03:00:40] *** popcornPanic has joined ##java
[03:04:19] *** cyzie has quit IRC
[03:04:49] *** AeGuy has joined ##java
[03:05:33] *** iron34 has joined ##java
[03:05:42] *** iron34 has left ##java
[03:05:52] *** Absolute0 has quit IRC
[03:06:38] <AeGuy> can someone help me real quick? I created a java program that creates a few directories. The program works in windows however when i alter it to work in linux it cant create the file. The path to create it is correct and the permissions for the folder that it is creating it has permissions 777
[03:06:53] <AeGuy> any ideas?
[03:07:42] <waz> can't create = what?
[03:07:52] <waz> error message? Silent
[03:07:53] <waz> ?
[03:07:58] <AeGuy> it cant create directories
[03:08:06] <waz> what does that mean
[03:08:10] *** FireSlash has quit IRC
[03:08:12] <AeGuy> No its not giving me any error messages
[03:08:15] <waz> does the program crash
[03:08:23] <waz> are you checking return codes?
[03:08:31] <waz> ~doesn't work
[03:08:31] <javabot> waz, 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)
[03:10:24] <AeGuy> boolean success = new File(parent, newDirName).mkdir(); this is returning false
[03:12:19] *** Techdeck has joined ##java
[03:12:20] *** nmatrix9 has joined ##java
[03:13:04] <Techdeck> hey, can anyone remind me what is the right way to write an SQL statement? I mean, I don't simply wanna do con.executeQuery(...), there's a right way to do it.. I just forgot the name
[03:13:36] <AMcBain> PreparedStatement?
[03:13:41] <Techdeck> yes!
[03:13:42] <Techdeck> thank you
[03:13:46] <AMcBain> np
[03:13:50] <lolsuper_> cant u just do
[03:13:57] *** lolsuper_ was kicked by waz (waz)
[03:13:58] *** lolsuper_ has joined ##java
[03:13:58] <lolsuper_> con.createStatement();
[03:14:12] <lolsuper_> * You have been kicked from ##java by waz (waz)
[03:14:14] <lolsuper_> wither a bot or a dick
[03:14:19] *** waz sets mode: +b *!*@pool-96-254-154-75.tampfl.fios.verizon.net
[03:14:34] <waz> hope that clears it up
[03:15:23] *** waz sets mode: -b *!*@pool-96-254-154-75.tampfl.fios.verizon.net
[03:15:32] <lolsuper_> what was the point in that?
[03:15:35] <waz> ~aolbonics
[03:15:36] <javabot> waz, 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!
[03:15:41] <lolsuper_> ooooooooh
[03:15:51] <lolsuper_> woops
[03:16:28] <lolsuper_> heh aolbonics
[03:16:39] *** alek_b has quit IRC
[03:16:54] <armyriad> Is there any exception for dividing by zero?
[03:17:02] <waz> ~tias
[03:17:03] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[03:17:31] *** misreckoning has joined ##java
[03:17:43] <lolsuper_> <armyriad> Is there any exception for dividing by zero?
[03:17:44] <armyriad> waz: I mean like an exception class. I already know that I can divide by zero (and get infinity).
[03:17:45] <lolsuper_> yes
[03:17:57] <waz> do it
[03:18:07] <waz> see what exception is thrown
[03:18:09] <waz> easy
[03:19:19] <armyriad> waz: Java doesn't throw an exception but I'm making a calculator program and I want to. I don't want to make a new exception class though.
[03:19:20] <lolsuper_> its like
[03:19:24] <lolsuper_> ArithmeticException
[03:19:33] <lolsuper_> or something
[03:20:23] <armyriad> Ooh.
[03:20:25] <lolsuper_> it becomes like
[03:20:26] <lolsuper_> java.lang.ArithmeticException: / by zero
[03:20:49] <lolsuper_> "When division by zero in integer arithmetic occurs, Java throws an ArithmeticException." ~ http://www.deitel.com/articles/java_tutorials/20060408/DivideByZero/
[03:22:13] <armyriad> Oh, maybe that's why I didn't get an exception. I was working with doubles.
[03:22:21] <r0bby> lolsuper_: yes
[03:22:27] <r0bby> it's invalid any way you look at it
[03:22:48] <r0bby> armyriad: consider using google
[03:22:59] <lolsuper_> <armyriad> Oh, maybe that's why I didn't get an exception. I was working with doubles.
[03:23:06] <lolsuper_> it does some crazy stuff then
[03:23:10] <lolsuper_> returns like
[03:23:13] <lolsuper_> Double.NaN
[03:23:14] <lolsuper_> or w/e
[03:23:45] <lolsuper_> YEA
[03:23:51] <lolsuper_> yea** thats it
[03:23:58] <AMcBain> ~~ lolsuper_ enter
[03:23:59] <javabot> lolsuper_, enter is not punctuation. Please don't press return until you've finished typing your question. It is annoying to see multiple lines for one question, and hard to follow.
[03:24:12] <lolsuper_> java/lang/Double/NaN;Ljava/lang/Double; thats it
[03:24:20] <lolsuper_> sorry AMcBain :p wont happen again
[03:24:36] *** staykov has quit IRC
[03:24:57] *** LongkerDandy has joined ##java
[03:27:08] <armyriad> Hmm, when I divided by zero in my calculator program, I got "Infinity".
[03:29:10] <misreckoning> armyriad, infinity is more appropriate term when searching for the tan(90deg) or tan(-90deg) in which case it is nice to return positive or negative infinity. However when dividing by zero, that is just NaN
[03:29:17] *** popcornPanic has quit IRC
[03:29:28] <r0bby> should return NaN
[03:29:32] *** goon12 has quit IRC
[03:29:36] <misreckoning> I guess, correct me if I'm wrong
[03:31:01] *** cyzie has joined ##java
[03:31:12] <r0bby> tangent at 90 degrees is undefined due to the fact that 1/0 is the ratio for sin/cos
[03:31:43] *** cyzie has quit IRC
[03:31:53] <r0bby> technically it does not exist :)
[03:32:03] <AeGuy> does anyone know of a function in java that would tell me what the most common color in a picture is?
[03:33:09] *** Toktik has joined ##java
[03:33:09] <armyriad> misreckoning: I agree but I think it's Java's fault because none of my code specifically deals with division by zero.
[03:33:16] *** nmatrix9 has quit IRC
[03:33:36] *** cyzie has joined ##java
[03:33:37] <misreckoning> armyriad, Java rocks :)
[03:34:07] <armyriad> misreckoning: It does.
[03:34:44] *** nmatrix9 has joined ##java
[03:38:06] *** Dr_Link has quit IRC
[03:38:16] *** cyzie has quit IRC
[03:39:43] *** alek_b has joined ##java
[03:39:53] *** yobo2 has quit IRC
[03:41:00] *** squi has joined ##java
[03:41:36] *** Dr_Link has joined ##java
[03:44:45] *** alek_b has quit IRC
[03:44:58] *** althaser has left ##java
[03:46:21] *** noobraska has joined ##java
[03:47:37] <Techdeck> after I have a PreparedStatement, is there a way to print the query it will run?
[03:54:26] *** Simucal has quit IRC
[03:54:58] *** aknm has joined ##java
[03:54:58] *** ahughes has quit IRC
[03:55:15] *** ahughes has joined ##java
[03:55:46] <misreckoning> Techdeck, I think there is some "getSQL" method...
[03:56:52] <misreckoning> Techdeck, nah, bad memories :(
[03:57:50] *** noobraska has quit IRC
[04:01:43] <Techdeck> :(
[04:01:51] <bearded_oneder> AeGuy -> did you solve your mkdir() problem?
[04:03:43] *** aTypical has quit IRC
[04:03:48] <phix> hmmm, if I add a key listeners to a JList (for example) which listens for when the enter key is pressed, the listener is run if the enter key is pressed in a JDialog that was created in the JList code :\
[04:03:54] <phix> how can I stop this?
[04:04:22] *** durka42 has quit IRC
[04:04:54] <phix> not JList code, the same place where the JList exists even :\
[04:05:38] <phix> ?
[04:06:16] *** yobo2 has joined ##java
[04:06:32] <phix> ?
[04:06:35] *** nvictor has joined ##java
[04:07:15] *** nvictor has left ##java
[04:08:12] <misreckoning> phix, !????? stop doing that - you have a bug
[04:08:16] *** MIR100 has joined ##java
[04:11:40] *** Niike has joined ##java
[04:12:33] *** alcane has joined ##java
[04:13:10] *** nmatrix9 has quit IRC
[04:13:22] *** nmatrix9 has joined ##java
[04:16:23] *** cambazz has quit IRC
[04:16:50] *** durka42 has joined ##java
[04:16:52] *** misreckoning has quit IRC
[04:22:49] <phix> hmmm
[04:23:17] *** warriorforgod has quit IRC
[04:23:38] *** `House` has quit IRC
[04:24:06] *** eduardoboss has joined ##java
[04:25:59] *** mk has joined ##java
[04:26:58] <mk> why use a monospaced font for programming?
[04:28:46] <AMcBain> easier to do indentation/read
[04:28:47] <armyriad> mk: One reason is that the characters are easier to see.
[04:29:49] <mk> armyriad: this can't be true, because reading characters is just as important in books and they are non-monospaced. Or what do you mean?
[04:30:09] <mk> AMcBain: tabbed indents work just as well under non-monospaced
[04:30:26] <AMcBain> yes, but most don't use/like tabs and use spaces instead.
[04:31:02] *** nmatrix9 has quit IRC
[04:31:42] <r0bby> some use spaces, whereas some use tabs
[04:32:00] <r0bby> programming styles are like underwear: everybody has their own
[04:32:35] <frivol> Not everyone should try to invent new metaphors.
[04:32:45] *** cyzie has joined ##java
[04:32:45] <AMcBain> and when I meant by indentation is that a line of 15 characters is not the same length monospaced as it is non-monospaced, and as such it is harder to make things line up and make like they go together.
[04:32:52] <dotCOMmie> is there an editor for magic fields of a java class?
[04:33:02] <AMcBain> "magic fields"?
[04:33:17] <mk> AMcBain: I suppose. I use tabs, spaces seem insane. (I'm googling the points-for-each-side)
[04:33:18] <frivol> You mean that all this time java has had magic fields?
[04:33:20] <r0bby> frivol: was that disturbing?
[04:33:35] <dotCOMmie> The header on the compiled java class file
[04:33:45] <AMcBain> why would you want to edit it?
[04:33:54] <r0bby> you mean 0xCAFEBABE?
[04:33:55] *** cyzie has quit IRC
[04:34:06] <dotCOMmie> yeah the 0xCAFEBABE chunk
[04:34:12] <r0bby> why?
[04:34:19] <mk> r0bby: his objection might be to the metaphor's inaccuracy
[04:34:21] *** aleksei has quit IRC
[04:34:30] <AMcBain> he wants it to say 0xCAFED00D
[04:34:38] <r0bby> mk: I suppose
[04:34:40] <dotCOMmie> I need to rename a class
[04:34:56] <r0bby> I've adjusted my style to match that of the sun conventions
[04:35:02] <r0bby> so it's kind of inaccurate
[04:35:07] <r0bby> sounded good in my head
[04:35:34] <r0bby> /win 1
[04:35:37] <r0bby> ugh
[04:35:37] <AMcBain> r0bby: oh god ... you're just like the guy that has conformed his coding style so such that he receives as few errors (or none) from JS lint when he runs his code through it ...
[04:35:57] <r0bby> AMcBain: what?
[04:36:16] <r0bby> I'm anal retentive too... if my code doesn't line up right i get all crazy
[04:36:17] <dotCOMmie> Is there an editor out there or some tool to edit the CAFEBABE header? Or do I have to resort to a hex editor and pulling my hair?
[04:36:29] <r0bby> dotCOMmie: hex editor.
[04:36:39] <r0bby> why the hell do you want to?
[04:36:41] <dotCOMmie> r0bby: not what I wanted to hear d:
[04:36:42] <AMcBain> r0bby: JS Lint goes through code and outputs warnings for things it doesn't like and errors for bugs for JS code ... he has changed his coding style so that it matches what JS Lint likes, even if some of it is silly.
[04:37:00] <AMcBain> (JS) Lint = good program. following its every whim = bad idea.
[04:37:11] <r0bby> heh
[04:37:18] *** fatefree has quit IRC
[04:37:26] <r0bby> AMcBain: i'm sure i break away from certain conventions
[04:37:48] <dotCOMmie> r0bby: if you have any usefull information, on the issue. I can tell you details in private d:
[04:38:08] <r0bby> dotCOMmie: tell me why you want to... \
[04:38:15] <r0bby> what are you trying to accomplish?
[04:38:25] <AMcBain> r0bby: an example of this program is that it warns you if you define a variable in an if statement, as in JS, an if "block" is not a scope modifier (I do it anyways and pretend it is, so that I don't do ugly things)
[04:38:50] <AMcBain> (if I need it after the if, I defined it before)
[04:38:58] <r0bby> ahh
[04:39:21] *** yellow_ has quit IRC
[04:39:28] *** cyzie has joined ##java
[04:39:31] <AMcBain> so if you were to follow JS Lint to the letter, you'd end up with all your variables defined at the top of a function, even if some of them are only used inside one part of an if, not before or after.
[04:39:48] <r0bby> holy crap
[04:40:06] <r0bby> I'd define them as i need them
[04:40:20] <dotCOMmie> r0bby: check pm
[04:40:33] <r0bby> don't pm me
[04:40:34] <r0bby> say here.
[04:40:45] <AMcBain> I prefer the same, and I pretend that the "if" is a scope modifier, so that I don't use those variables afterwards, creating weird code.
[04:40:46] <r0bby> ah he's reverse engineering
[04:41:06] <r0bby> dotCOMmie: yeh even if i knew i wouldn't help now.
[04:41:06] *** cyzie has quit IRC
[04:41:37] *** javahorn has quit IRC
[04:41:49] <r0bby> why are you reverse engineering anyways?
[04:41:56] <repnop> ~~ dotCOMmie spec
[04:41:56] <javabot> dotCOMmie, I have no idea what spec is.
[04:42:02] <r0bby> ~~ dotCOMmie jvm spec
[04:42:03] <javabot> dotCOMmie, jvm spec is http://java.sun.com/docs/books/vmspec/
[04:42:04] <repnop> bah whats the link again hehe
[04:42:07] <repnop> there we go :)
[04:42:22] <repnop> everything you need is in there
[04:42:24] <r0bby> there are two specs: jvm and the language spec itself
[04:42:33] *** ankylose has quit IRC
[04:43:00] <AMcBain> r0bby: apparently when you compile your code you can use -Xlint option
[04:43:08] <AMcBain> (with javac)
[04:43:24] <AMcBain> this is the JS Lint I was talking about: http://www.jslint.com/
[04:43:31] <r0bby> ah
[04:43:48] *** pressingonalways has joined ##java
[04:43:54] <dotCOMmie> r0bby: I don't want to tell you. d:
[04:44:08] <dotCOMmie> thanks for links
[04:44:17] <repnop> dotCOMmie: not like you're doing anything unique
[04:44:29] <r0bby> dotCOMmie: now it sounds like you're doing something illegal
[04:44:40] <r0bby> or unethical.
[04:44:42] <pressingonalways> hi, can i use C++ declare and instiantiate on one line syntax like: for(int i=0;i<5; i++) { } ?
[04:44:53] <cheeser> ~~ pressingonalways tias
[04:44:53] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[04:44:57] *** eduardoboss has quit IRC
[04:45:50] <pressingonalways> cheeser, i'm getting errors...
[04:45:52] <pressingonalways> but i don't know why :-P
[04:46:23] <r0bby> what errors?
[04:46:30] <r0bby> ~~ pressingonalways doesn't work
[04:46:31] <javabot> pressingonalways, 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:46:36] <pressingonalways> is there any interactive interpreting console like python?
[04:46:41] * pressingonalways has been spoiled
[04:46:43] <cheeser> not really
[04:46:50] <r0bby> you could use beanshell
[04:46:57] <pressingonalways> i'll just make simpler examples
[04:47:12] <r0bby> ~beanshell
[04:47:12] <javabot> r0bby, beanshell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. It can be found at http://www.beanshell.org.
[04:47:17] <pressingonalways> java.lang.NullPointerExceptionjava.lang.NullPointerException
[04:47:18] <pressingonalways> java.lang.NullPointerException
[04:47:18] <pressingonalways> java.lang.NullPointerException
[04:47:21] <pressingonalways> oh sorry
[04:47:24] <r0bby> ~~ pressingonalways npe
[04:47:24] <javabot> NullPointerExceptions are easy to spot and deal with. For some tips on dealing with them, please see http://is.gd/ha7A
[04:47:27] <pressingonalways> screen wasn't refreshing
[04:47:32] <AMcBain> ~~ pressingonalways pastebin
[04:47:32] <javabot> http://eugeneciurana.com/pastebin Paste the final url after you've pasted your stuff there.
[04:47:56] *** ayrnieu has quit IRC
[04:47:56] *** nmatrix9 has joined ##java
[04:48:30] <r0bby> whoa cheeser you ditched dibblego's thing?
[04:48:35] <cheeser> yep
[04:49:01] <r0bby> heh
[04:49:16] <AMcBain> "dibblego's thing"? I assume was a solution to the thing the url-shortening solves?
[04:49:35] <mk> I've been using a non-monospaced font for over a year now, and it's much easier to read than any mono. Anyone else tried non-monospaced?
[04:49:42] <cheeser> no. dibblego == tony morris == pompous prick
[04:49:50] <cheeser> mk: who cares?
[04:50:10] <r0bby> mk: good for you! Want a cookie?
[04:50:22] <AMcBain> the "meh" attitude prevails :)
[04:50:30] <r0bby> what attitude?
[04:50:32] <AMcBain> ~~mk cookie
[04:50:32] <javabot> Here is a cookie. Now go to http://www.jibble.org/cookies.php
[04:50:35] <cheeser> who wants a cookie? meh.
[04:50:36] <cheeser> 8^)=
[04:50:52] * r0bby would take the cookie, but fears it's poisoned!
[04:51:01] <AMcBain> no, that's just apples.
[04:51:12] <r0bby> I poison my cookies
[04:51:12] *** monestri has quit IRC
[04:51:19] <AMcBain> or rather penut butter, given the recent issue.
[04:51:21] <pressingonalways> ok... so java supports int i=0; in a for loop
[04:51:21] *** monestri has joined ##java
[04:51:22] <mk> cheeser: anyone who cares about editor layout and config?
[04:51:23] <pressingonalways> that isn't the problem
[04:51:24] <pressingonalways> :)
[04:51:27] <r0bby> yes
[04:51:33] <r0bby> ~~ pressingonalways loops
[04:51:34] <javabot> pressingonalways, loops is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/flow.html
[04:51:39] <AMcBain> pressingonalways: why wouldn't Java?
[04:51:43] <AMcBain> that seems rather basic to me.
[04:51:55] <r0bby> pressingonalways: go through the tutorials...
[04:51:58] <pressingonalways> yeah
[04:52:09] <pressingonalways> i actually am going through some tutorials now
[04:52:11] *** mistik1 has quit IRC
[04:52:15] *** cyzie has joined ##java
[04:52:26] <pressingonalways> but i'm getting that NullPointerExceptions
[04:52:37] <pressingonalways> i'll simplify my code and figure it out
[04:52:47] <AMcBain> make sure you actually initialized a variable you are trying to use ...
[04:53:27] *** kater_ has joined ##java
[04:54:15] <pressingonalways> what methods/functions exist for arrays
[04:54:16] <pressingonalways> ?
[04:54:19] <r0bby> you're pressingonalway: 1) all variables need to be instantiated 2) arrats too
[04:54:30] <pressingonalways> i think it's a problem with i < pinfo.length;
[04:54:31] <AMcBain> ~~ pressingonalways javadoc Arrays
[04:54:32] <r0bby> int[] foo; foo[0] = 3; // NPE!
[04:54:32] <javabot> pressingonalways: http://is.gd/iqF5 [java.util.Arrays]
[04:54:47] <pressingonalways> thanks
[04:54:53] <AMcBain> r0bby: damn C++ for giving the impression that works! :P
[04:54:56] <r0bby> int[] foo = new int[3]; foo[0] = 3; // works like a charm
[04:55:32] *** mk has left ##java
[04:55:44] <r0bby> in object arrays, each _element_ must be instantiated individually otherwise some NPEs will occur
[04:55:47] *** deadbeef has quit IRC
[04:55:57] <r0bby> that should fix your problems
[04:56:41] <pressingonalways> object arrays opposed to what other arrays are there in java?
[04:56:54] <r0bby> pressingonalways: reference types vs primitive data types
[04:56:58] <pressingonalways> ok
[04:56:59] <r0bby> primitive data types are never null
[04:57:26] *** kochii has joined ##java
[04:57:37] <kochii> hi all
[04:57:50] <AMcBain> hello
[04:58:09] <pressingonalways> does arrays have a length field?
[04:58:12] <r0bby> another problem: class Foo { Bar bar; Foo() { Bar bar = new Bar(); } } your field is never instantiated
[04:58:15] *** M[]ssad_ has quit IRC
[04:58:34] <r0bby> ~~ pressingonalways arrays
[04:58:34] <javabot> pressingonalways, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[04:59:35] <kochii> does the executeQuery method in java.sql.PreparedStatement only take a "Select" sql statement ?
[05:00:05] <r0bby> ~~ kochii jdbc
[05:00:05] <javabot> kochii, jdbc is Java DataBase Connection, the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/tutorial/jdbc
[05:00:42] <kochii> yea jdbc
[05:00:57] <r0bby> read it.
[05:00:58] <AMcBain> kochii: obviously, read existing documentation, but I believe it works with UPDATE and INSERTS as well.
[05:01:12] <AMcBain> you can put ? in for data in both SQL statement types.
[05:01:31] <pressingonalways> thanks all, will read and digest
[05:01:37] *** pressingonalways has quit IRC
[05:02:19] <kochii> when i use insert statement i get this error java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
[05:02:33] <kochii> but sql statement works fine with the method execute()
[05:03:09] <r0bby> then your question is answered
[05:03:34] <kochii> so i just want to confirm that executeQuery only works with select statements. There is nothing in the documentation that restricts this method for select only
[05:04:59] <r0bby> executeUpdate() for inserts
[05:05:28] *** kater has quit IRC
[05:06:16] <kochii> i know that...i thought the executeQuery would return a resultset of the new record entries. I want to use the primary id from that result set for another query. I guess i have to issue another sql command to retrieve the primary key of the record i just inserted
[05:09:11] <gengid> quick question someone remember what function display a warning message with a button
[05:09:42] *** mistik1 has joined ##java
[05:12:05] <kochii> gengid: check out this class javax.swing.JOptionPane
[05:15:39] *** spathi has quit IRC
[05:17:37] *** arpu has quit IRC
[05:21:16] *** nytejade has joined ##java
[05:21:39] *** nytejade has quit IRC
[05:22:23] *** nytejade has joined ##java
[05:23:07] *** trustin has joined ##java
[05:24:15] *** cyzie has quit IRC
[05:26:46] *** hashed_ has left ##java
[05:28:37] *** SystemWizard has joined ##java
[05:30:55] *** amnesiac has joined ##java
[05:33:15] *** The_Birdman has quit IRC
[05:34:52] *** meanburrito920_ has quit IRC
[05:35:39] *** dob1 has quit IRC
[05:38:55] *** cactaur has joined ##java
[05:42:45] <alcane> why isn't my jlabel.setBackground(black); working?
[05:42:47] <alcane> http://pastebin.com/d6c7ffa86
[05:43:11] <AMcBain> alcane: you have to set JLabels opaque first.
[05:43:21] <alcane> how
[05:43:22] <AMcBain> jlabel.setOpaque(true);
[05:43:32] <alcane> 1 sec
[05:44:01] <AMcBain> most components are opaque by default, JLabels are not.
[05:44:08] <alcane> yea... not working
[05:44:18] <alcane> red line under black saying symbol not found
[05:44:29] <AMcBain> Colors.BLACK
[05:44:31] *** ofl_ has quit IRC
[05:45:17] *** squi has quit IRC
[05:45:19] <AMcBain> or, "new Color(0,0,0)"
[05:45:20] <alcane> symbol not found
[05:45:28] *** squi has joined ##java
[05:45:33] <AMcBain> *sigh* ... you have to *import* Colors.
[05:46:29] <alcane> import java.awt."star" is already there
[05:46:40] <alcane> http://pastebin.com/d6c7ffa86
[05:46:56] <kinabalu> i didn't think * was a reserved character in irc? why are you "star" 'ng about
[05:47:09] <AMcBain> star imports suckl
[05:47:17] <alcane> kinabalu: it's not letting me type it
[05:47:38] <kinabalu> heh. what client do you use? i'll steer clear
[05:47:41] <alcane> AMcBain: why? it only imports whatever librarys you need
[05:47:49] <alcane> kinabalu: putty
[05:48:36] <alcane> AMcBain: doesn't matter, I'm only in my second quarter of java and not really looking to make my code as optimized as it can be
[05:48:45] <AMcBain> poor choice
[05:48:57] <alcane> AMcBain: anyways...
[05:48:59] <AMcBain> star imports are easy to avoid
[05:49:27] <alcane> AMcBain: ok, I'll remember that =)
[05:49:30] <AMcBain> Color.BLACK *
[05:49:31] *** corrupt has joined ##java
[05:49:51] <AMcBain> (I wondered why I said "colors" must be because of the Arrays class)
[05:49:57] *** Kwitschibo has quit IRC
[05:50:26] <alcane> http://pastebin.com/d70466b69
[05:50:51] *** mocas_ has quit IRC
[05:50:57] <AMcBain> I just said it's Color.BLACK ... not Colors.BLACK
[05:51:29] <alcane> ah...~correction made~
[05:51:42] <corrupt> what do you think would be a cool data mining project?
[05:51:44] <kinabalu> use javadoc ... might help?
[05:51:49] <kochii> whats your take on declaring a variable in a method that called a a lot of times. no worries on memory b/c garbage collector takes care of it or bad for code efficiency ?
[05:51:52] <alcane> sweet! it's finally working THANKS! ^_^
[05:53:11] <kinabalu> kochii: might want to focus on just getting a bit of working code?
[05:53:17] *** phyburn has joined ##java
[05:53:19] <kinabalu> premature optimization is the root of all code 3v1ls
[05:53:36] <kochii> hmmm
[05:53:48] <JEisen83> hail knuth.
[05:54:24] <kochii> the problem with me is that once i get a running code im too lazy to go back and try to optimize it
[05:54:33] *** da_shadow has joined ##java
[05:55:13] <JEisen83> which probably means it didn't need optimization. ;)
[05:55:14] <kinabalu> kochii: does it run?
[05:55:48] <kochii> yea...it runs well but alwasy aspire for an efficent code
[05:56:24] *** ryuho has joined ##java
[05:57:36] *** jaggz- has joined ##java
[05:57:39] <JEisen83> kochii: Next time you write something, use a code analyzer with optimization checks turned on. the good ones will give you descriptions of why it makes a recommendation.
[05:57:51] *** tomvolek has joined ##java
[05:58:03] <JEisen83> use it as you write, though. turning it on later just makes a lot of work.
[05:58:03] <kochii> interesting...thanx JEisen83
[05:58:05] <jaggz-> so I used: gcj File.java and got: ../sysdeps/i386/elf/start.S:98: undefined reference to `main' (in function _start)
[05:58:28] <kinabalu> gcj != java
[05:59:08] <AMcBain> eww. gcj ... people still use that?
[05:59:19] <tomvolek> HI , I have a few configuration fiel for an application, I prefer to make them XML based. what is a good utility to parse XML in Java ?
[05:59:20] <jaggz-> hm, missing javac on that system.. darned.
[06:00:04] <jaggz-> old ubuntu (hoary hedgehog) system
[06:00:04] <kinabalu> apt-get install java :)
[06:00:34] <jaggz-> no java package.. found.
[06:01:28] <kinabalu> java.sun.com
[06:01:41] *** nmatrix9 has quit IRC
[06:01:44] <waz> you don't have the right repositories to use apt then
[06:01:47] <jaggz-> yeah.. just working in lynx/links is difficult .. :)
[06:01:56] <jaggz-> waz, hm
[06:02:12] <tomvolek> HI , I have a few configuration fiel for an application, I prefer to make them XML based. what is a good utility to parse XML in Java ?
[06:02:29] <AMcBain> ~~ tomvolek mox
[06:02:30] <javabot> tomvolek, mox is an extremely simple XML reader and writer, using POJOs and annotations. http://www.zwitserloot/java-boilerplate/mox
[06:02:38] <waz> deb http://us.archive.ubuntu.com/ubuntu dapper main restricted
[06:02:38] <waz> deb http://us.archive.ubuntu.com/ubuntu dapper universe multiverse
[06:02:44] <waz> add those
[06:02:45] <tomvolek> i see thanks
[06:02:57] <AMcBain> romvolek: I recommend this because your XML inputs are "known" as you control the format.
[06:02:57] <waz> to /etc/apt/sources.list
[06:03:05] <jaggz-> probably won't work with this really old unsupported version of ubuntu, waz..
[06:03:12] <tomvolek> I am trying to rrad my config files from a java application
[06:03:20] <waz> w3m then :)
[06:03:30] <tomvolek> thanks AMcBain
[06:04:11] *** pstickne has joined ##java
[06:04:16] *** alek_b has joined ##java
[06:04:52] <JEisen83> tomvolek: Is it just basically a properties file?
[06:05:17] <kab> jaggz-, trye this sudo apt-get install sun-java6-jdk
[06:05:26] <JEisen83> tomvolek: Properties can load from XML in the right format
[06:06:08] *** alek_b has quit IRC
[06:06:15] <jaggz-> not available either, kab. apt-cache search jdk shows a free java sdk
[06:06:37] <waz> run
[06:06:39] <jaggz-> I'll try that for now until this system's update (debian etch -> lenny) is finished.
[06:06:42] <waz> far away :)
[06:06:51] <waz> did you run apt-get update
[06:06:51] <waz> ?
[06:07:06] <jaggz-> probably not within the past month
[06:07:24] <waz> if you added to sources.list you have to
[06:09:12] <jaggz-> I see.. well I can't add the dapper repositories [usefully] to etch.. (and jikes is unhappy with my classpath). sorry, I'm new to working with java, as I code in C normally.
[06:09:29] <jaggz-> I really don't mean to trouble any of you and hope I'm not.
[06:09:37] <kab> jaggz-, what ubuntu version are you using?
[06:09:58] <tomvolek> JEisen83 its a configuration file for my application a format liek this Color:red:250
[06:10:07] <jaggz-> hoary.. it's really old but since that's my every-day dev system, and I don't have an alternative (laptop), I've put off updating it for a couple years.
[06:10:07] <tomvolek> Os i want to make it an XML ..
[06:10:39] <JEisen83> tomvolek: I'd really look into whether you can just use Properties. It'll make things a lot easier.
[06:11:33] <jaggz-> I guess I can wait until this current system is updated and just get the actual sun sdk
[06:12:41] <jaggz-> it'll be an updated debian system but it'll be an hour when these packages are done transferring (1gb) and .. probably tomorrow (hopefully) before it's working. I guess I should get a nap for now.
[06:12:56] *** AeGuy has left ##java
[06:13:19] <tomvolek> JEisen83 what do you mean by properties ?
[06:13:34] <waz> ~properties
[06:13:38] <JEisen83> tomvolek: java.util.Properties
[06:13:39] <javabot> Try system properties or javadoc Properties
[06:14:15] <tomvolek> tx, let me read about it ..
[06:14:46] <jaggz-> okay, ttyl.. thanks so much though.
[06:16:20] *** meanburrito920_ has joined ##java
[06:17:39] *** killuats has joined ##java
[06:17:56] *** killuats has quit IRC
[06:29:55] *** bearded_oneder has quit IRC
[06:31:01] *** Vicfred has quit IRC
[06:31:48] *** blankthemuffin has joined ##java
[06:33:40] <r0bby> jaggz-: you can grab the self extracting binary from sun's site and drop it somewhere then update your PATH accordingly
[06:33:58] <r0bby> no need to wait for package maintainers to get their thumbs out of their asses
[06:34:08] <r0bby> or sysadmins either way it works :)
[06:36:46] *** werdan7 has quit IRC
[06:40:42] *** waz has quit IRC
[06:40:42] <pstickne> now, if only Sun bothered about fixing 64-bit plugin support :(
[06:41:20] *** _stack has joined ##java
[06:46:14] *** bindaas has joined ##java
[06:46:16] *** Junior has joined ##java
[06:46:35] <Junior> yellou ;)
[06:46:50] *** Tenac has quit IRC
[06:47:33] *** bindaas has quit IRC
[06:48:02] *** bindaas has joined ##java
[06:50:25] *** zhongwen123 has joined ##java
[06:51:41] *** amnesiac has quit IRC
[06:53:18] *** psydian has quit IRC
[06:53:23] *** blankthemuffin has quit IRC
[06:57:32] *** SystemWizard has quit IRC
[06:58:00] *** toytoy has joined ##java
[06:58:03] *** zhongwen123 has left ##java
[06:58:19] *** ahughes has quit IRC
[07:01:13] *** squi has quit IRC
[07:01:35] *** squi has joined ##java
[07:02:41] *** da_shadow has left ##java
[07:05:07] *** delskorch has quit IRC
[07:08:07] *** yobo2 has quit IRC
[07:08:22] *** meanburrito920_ has quit IRC
[07:09:19] *** blankthemuffin has joined ##java
[07:10:46] *** Levia has quit IRC
[07:16:49] <Ububegin> anyone knows how I can write the Image object to a file...
[07:17:06] <Ububegin> I know how to do this for a BufferedImage
[07:18:09] *** peper has quit IRC
[07:18:10] <pstickne> ImageIO
[07:18:15] <pstickne> next! :)
[07:18:24] *** peper has joined ##java
[07:20:46] <pstickne> Actually, hmm, that sucks
[07:20:57] *** cybereal has joined ##java
[07:23:34] *** illbeatu has joined ##java
[07:23:51] <illbeatu> my random number generator is generating the same integer over and over and over
[07:23:53] *** amz has quit IRC
[07:24:02] <pstickne> illbeatu: stop seeding it you ninny
[07:24:12] * cybereal chortles
[07:24:13] <pstickne> illbeatu: 'wiki prng'
[07:24:24] *** Inhuman has quit IRC
[07:26:31] *** sebr is now known as sebr_afk
[07:29:24] *** kab has quit IRC
[07:29:36] <Ububegin> pstickne: BufferedImage buffImage=convertToAWT(img.getImageData()); ... this code was supposed to convert it into buffimage, but alas.. the getImageData() method is no longer available
[07:29:52] <pstickne> Ububegin: it's awt.Image you're dealing with?
[07:30:21] <Ububegin> yes
[07:30:55] <pstickne> Ububegin: you might be able to create an ImageConsume and request a re-send, then implement the IC to write to a BufferedImage :)
[07:31:00] <pstickne> *ImageConsumer
[07:31:20] <pstickne> Those early Java graphics API are absolutely horrid, I forgot how bad it was...
[07:31:27] <Ububegin> pstickne: Request a resend.... :S
[07:31:32] *** nater has quit IRC
[07:32:08] <pstickne> Image.getSource <- ImageProducer; then create and add an ImageConsumer to it :-)
[07:32:26] <pstickne> ImageProducer has requestTopDownLeftRightResend :p
[07:32:39] <pstickne> Horribly awful sounding, but hey, it should work
[07:32:45] *** SystemWizard has joined ##java
[07:33:03] <Ububegin> pstickne: you can show me a code snippet... I dont get it
[07:33:08] *** nater has joined ##java
[07:34:59] <pstickne> class MyImageConsumer /* implements ImageConsumer and writes/creates a BufferedImage that is exposed via getBufferedImage */; theImage.getSource().sendTopDownLeftRightResend(myConsumer); theBuffered = myConsumer.getBufferedImage()
[07:38:15] <pstickne> Ububegin: O.o!
[07:38:18] <pstickne> Ububegin: look at PixelGrabber
[07:39:44] <pstickne> Ububegin: then it's just working the raw pixel data into a BufferedImage (you don't have to write a custom consumer at all)
[07:40:10] <pstickne> Ububegin: or maybe ... this entire problem could just be avoided? :-)
[07:40:54] <Ububegin> Oh, i actually have the image array, i got from PixelGrabber... Maybe I cud do this.. buffImage.setRGB(.........)...
[07:41:46] *** arpu has joined ##java
[07:45:05] *** btb996 has joined ##java
[07:46:04] <btb996> hello, all.
[07:46:11] *** SystemWizard has quit IRC
[07:46:12] *** Greeny_ has quit IRC
[07:46:24] <AMcBain> hello
[07:46:27] *** JEisen83 has quit IRC
[07:46:28] *** Greeny_ has joined ##java
[07:50:33] *** beol has joined ##java
[07:52:50] *** deepjoy has joined ##java
[07:53:59] *** Frostix has quit IRC
[07:55:09] *** Kwitschibo has joined ##java
[07:58:33] <btb996> :D
[08:00:59] *** `House`1 has joined ##java
[08:01:16] *** `House`1 is now known as DrHouse__
[08:05:07] *** The_Birdman has joined ##java
[08:05:17] *** phyburn has quit IRC
[08:08:14] *** nater has quit IRC
[08:09:27] *** btb996 has quit IRC
[08:10:10] *** gengid has quit IRC
[08:10:34] *** kelten has joined ##java
[08:11:48] <kelten> Hey all. I am trying to take in a polynomial and split it into it's seperate terms.
[08:12:13] <kelten> Right now I take it in as a string and simple .split("[+-]") it
[08:12:13] *** CaT_MaN has joined ##java
[08:12:18] *** inktri has joined ##java
[08:12:53] <inktri> i've got a string with two numbers and an arbitrary number of spaces between them... how do i extract the two numbers? split? with what args?
[08:13:03] <inktri> eg. 0.4342554 0.134654544
[08:13:29] <AMcBain> split("\s+")
[08:14:07] *** chap has joined ##java
[08:14:18] <AMcBain> kelten: with variables ("x") in them, or just an expression of 1 + 3 + 5 ... ?
[08:14:32] <chap> with variables and exponents
[08:15:14] <chap> <-kelten (got disconnected)
[08:15:22] <AMcBain> I noticed the connection.
[08:15:26] <inktri> AMcBain: it says that regex is an "invalid escape sequence"?
[08:15:33] <AMcBain> ah ... oops. \\s+
[08:15:49] *** PyDon has joined ##java
[08:16:04] <chap> So I am trying to split up the terms without losing the +,-
[08:16:04] *** nater has joined ##java
[08:16:10] <inktri> thanks worked
[08:16:19] *** xabbuh has joined ##java
[08:16:33] <AMcBain> chap: well, there's a way to do that (via split) but it might be easier if you ... hm, well, I have an idea.
[08:16:42] *** PyDon has left ##java
[08:16:55] *** squi has quit IRC
[08:17:04] <chap> Or an overall better way to split the terms
[08:17:44] <AMcBain> split("(?<=[+-*/^])|(?=[+-*/^])")
[08:18:54] <AMcBain> (both [] do not have to be the same, but if you have ones in the first one that are not in the second one, it will split by them but not keep/separate them)
[08:19:51] *** cactaur has quit IRC
[08:20:15] <AMcBain> chap: does that work for you?
[08:20:26] *** inktri has left ##java
[08:20:41] *** Pupeno has joined ##java
[08:20:46] <Pupeno> Hello.
[08:20:50] <AMcBain> hi
[08:21:34] <Pupeno> How should I generate an array of Strings with the numbers 3 to 99 (as strings)?
[08:21:45] <Pupeno> {"3", "4"..."99"}
[08:21:46] <AMcBain> why not just loop?
[08:22:03] <Pupeno> There's no way to express it?
[08:22:28] <AMcBain> anything else would just be abstracting out the looping from your code to theirs ...
[08:22:42] <AMcBain> (so no, there is no built in way that I know of)
[08:24:05] *** cyzie has joined ##java
[08:24:09] <Pupeno> Thanks.
[08:24:38] <r0bby> Pupeno: for(int i=0;i<100;i++) { arr[i] = i+""; }
[08:24:45] <chap> AMcBain, ya I dont it works out right
[08:24:56] *** LongkerDandy has quit IRC
[08:25:00] <AMcBain> chap: huh?
[08:25:05] <deebo> String.valueOf :P
[08:25:07] <chap> My input is: 12x^3+5x^3-7
[08:25:11] <deebo> catenation baaaaad
[08:25:14] <deebo> beeeer good
[08:25:14] <r0bby> deebo: yeh this was easier :)
[08:25:41] <r0bby> he should be using int[] but whatever.
[08:26:06] *** steerpike has joined ##java
[08:26:06] <r0bby> adios
[08:26:07] <steerpike> hi!
[08:26:12] <AMcBain> chap: yes, and that regex I gave you will break it up by +-*/^ then place the operators into the output array as well ... if you don't want it to split by ^, remove it in both places from the regex.
[08:26:15] <steerpike> has anyone used java-curl?
[08:26:16] <AMcBain> hello
[08:26:29] <r0bby> ~~ steerpike anyone
[08:26:29] <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.
[08:26:34] <steerpike> ok
[08:26:43] <steerpike> hey r0bby, i know you from ##slackware :)
[08:26:52] <r0bby> probably not.
[08:26:53] <r0bby> I just lurk
[08:27:00] <r0bby> or did
[08:27:06] <r0bby> just ask
[08:27:23] <AMcBain> chap: hello?
[08:27:34] <steerpike> ok, i just wanted to know if the curl-java was the best solution for http stuff
[08:27:42] <chap> ya, im checking
[08:27:46] <r0bby> you don't need it
[08:27:53] <steerpike> i don't?
[08:27:54] <r0bby> ~~ chap url
[08:27:54] <javabot> chap, I have no idea what url is.
[08:28:05] <r0bby> ~httpurlconnection
[08:28:05] <javabot> r0bby, I have no idea what httpurlconnection is.
[08:28:12] <r0bby> ~javadoc HttpURLConnection
[08:28:14] <javabot> r0bby: http://is.gd/iSQS [java.net.HttpURLConnection]
[08:28:26] <steerpike> so will this do cookie management?
[08:28:26] <AMcBain> r0bby: chap is doing regex, steerpike is doing http :P
[08:28:51] <r0bby> er no
[08:29:04] <steerpike> no to whom?
[08:29:13] <AMcBain> you
[08:29:27] <steerpike> hmm.. seems i'll have to manually check in the header
[08:29:52] <steerpike> and parse it, and store it
[08:29:58] <csaba> if I write in hibernate select * from Person p where p.boss=? then how could I do the same with Criteria?
[08:30:13] <r0bby> ~/q javabot
[08:30:13] <javabot> r0bby, I have no idea what /q javabot is.
[08:30:14] <r0bby> er
[08:30:22] <csaba> sorry bad question
[08:30:30] <r0bby> ~~ steerpike httpcomonent
[08:30:30] <javabot> steerpike, I have no idea what httpcomonent is.
[08:30:34] <csaba> if I write in hibernate select * from Person p where p.boss.name=? then how could I do the same with Criteria?
[08:30:36] <r0bby> ~~ steerpike httpcomponent
[08:30:36] <javabot> steerpike, I have no idea what httpcomponent is.
[08:30:37] <steerpike> whaht?
[08:30:41] <r0bby> god i camn't psell
[08:30:49] <csaba> criteria.add(Property.forName("boss.name")) ?
[08:30:51] <chap> AMcBain, Illegal character range near index 7
[08:30:57] <r0bby> javabot: httpcomponents
[08:31:02] <javabot> r0bby, httpcomponents is http://hc.apache.org/httpcomponents-client - the current version of Apache's HTTP client for Java. More modular than httpclient 3.x was, and *probably* more multithread-friendly.
[08:31:06] *** AlanasAnikonis has joined ##java
[08:31:19] <AMcBain> chap: you're going to have to show me what regex you use ... I gave you one, but it might not be the one you actually used.
[08:31:20] <csaba> should I write criteria.add(Property.forName("boss.name")) or criteria.add(Property.forName("boss").getProperty("name")) ?
[08:31:22] <r0bby> that's what i was trying for
[08:31:24] <r0bby> night
[08:31:29] <r0bby> im out
[08:31:38] <r0bby> ~httpclient
[08:31:39] <javabot> r0bby, httpclient is a deprecated http client package for Java by Jakarta. It can be found at http://hc.apache.org/httpclient-3.x/index.html - note that it has dependencies like commons-codec, commons-logging, and possibly the other 18,000 jakarta dependencies that tend to accompany any single jakarta lib. Otherwise, great stuff. See ~httpcomponents for more current stuff.
[08:31:42] <r0bby> also available
[08:31:44] <chap> AMcBain, split("(?<=[+-*/^])|(?=[+-*/^])");
[08:31:59] <steerpike> r0bby: thanks! :)
[08:32:10] *** kelten has quit IRC
[08:32:15] <AMcBain> chap: you might have to escape the dash with a \
[08:32:19] <r0bby> night o/
[08:32:20] <chap> ah
[08:32:21] <AMcBain> (in both places)
[08:32:52] <chap> nope
[08:33:07] <AMcBain> try \\ ... (forgot about that)
[08:33:08] <Ububegin> I printed my exception... print .. exp.getMessage()... and I got Null... what does that mean
[08:33:28] <AMcBain> \ will escape it for the string, but not for when it is finally passed to the regex, so you need \\
[08:33:34] <chap> nope
[08:33:49] <AMcBain> define "nope"? same error?
[08:34:07] <chap> ya, same index aswell
[08:34:16] <chap> 7 being the *, no?
[08:34:21] <chap> or does it start at 1
[08:35:36] <AMcBain> chap: it works here with the double slashes.
[08:35:44] <AMcBain> System.out.println(Arrays.toString("12x^3+5x^3-7".split("(?<=[+\\-*/^])|(?=[+\\-*/^])")));
[08:36:08] <Ububegin> Nobody knows...
[08:36:15] <chap> ohhh alright
[08:36:17] <AMcBain> I get '[12x, ^, 3, +, 5x, ^, 3, -, 7]' as my output.
[08:36:49] *** amitev has joined ##java
[08:36:58] *** rburton has quit IRC
[08:37:29] <AMcBain> if you wish to group the 12x^3 and 5x^3 ... just remove any ^ from the regex.
[08:38:24] <chap> nice, thanks :)
[08:38:36] <deebo> doesnt mathlab have a java api or something :P
[08:38:39] <AMcBain> np ... that regex is useful from time to time, as it keeps the slplit values.
[08:38:46] <deebo> seems retarded to do that by hand
[08:38:56] <AMcBain> deebo: this might be an assignment.
[08:39:35] <deebo> could be, but ive always thought javas strenght is the millions of apis available, doing that by hand would be stupid in any case :)
[08:39:58] <AMcBain> Professors have infinite ways of saying "you can't use that"
[08:40:31] <deebo> true :)
[08:40:44] <AMcBain> (at the very least, they amend the rules for next time if you bend them this time :P so the *next* group gets the shaft)
[08:41:57] <AMcBain> I've managed to do that sort of thing to a teacher before ... unofficially, I think he amended his plans for the next assignment because of what my group turned in.
[08:42:23] <AMcBain> (next one built on the current one and we sort of preempted what he was going to have us do)
[08:45:43] *** agnul has joined ##java
[08:46:48] *** gdoko has joined ##java
[08:47:15] *** hoerup has joined ##java
[08:48:17] *** jahid has joined ##java
[08:52:26] *** Junior has quit IRC
[08:52:49] *** sphenxes has quit IRC
[08:52:54] *** tansaku has quit IRC
[08:53:29] *** tansaku has joined ##java
[08:54:35] *** Bollinger has joined ##java
[08:54:38] *** tansaku has quit IRC
[08:55:55] *** tansaku has joined ##java
[08:57:12] *** agentfy2k has joined ##java
[08:57:16] *** woogley has quit IRC
[08:57:55] *** sphenxes has joined ##java
[08:58:06] *** bitshuffler has joined ##java
[08:58:49] *** pandora-- has joined ##java
[08:59:33] *** cybereal has quit IRC
[09:00:27] *** tansaku has quit IRC
[09:02:43] *** cybereal has joined ##java
[09:02:58] *** tansaku has joined ##java
[09:06:34] *** deSilva has joined ##java
[09:07:09] <chap> AMcBain, for some reason my split() is returning weird for the first and last elements
[09:07:22] <AMcBain> define "weird"
[09:07:51] *** deSilva has quit IRC
[09:08:23] *** steerpike has left ##java
[09:09:17] <chap> It's returning a whitespace or something
[09:09:25] <AMcBain> what's the input?
[09:09:36] <AMcBain> (with quotes)
[09:09:45] <chap> String p1 = "-12x^3+5x^3-7";
[09:10:03] <chap> split("(?<=[+*/])|(?=[+\\-*/])")
[09:10:24] <AMcBain> well, it might add an empty array slot before character 1, I wouldn't know ... but it does help to have the same characters in the front *and* back [] ...
[09:10:55] <AMcBain> you'll have to determine after the split whether a character is a minus or a negative sign.
[09:11:18] *** skoskav has quit IRC
[09:11:18] <AMcBain> (a usual indicator is if the previous item was a - or a +, and the current one is a - or a +, then it is a positive or negative indicator0
[09:11:19] *** zmanning has quit IRC
[09:11:19] <AMcBain> )
[09:11:23] *** thepointer-work has quit IRC
[09:11:50] <chap> Ya, i guess I'll do that
[09:12:38] * AMcBain tries to find out why mysql barfed on his schema file.
[09:13:09] *** bas-i has joined ##java
[09:13:10] <chap> well split("(?<=[+\\-*/])|(?=[+\\-*/])") returns a whitespace or newline for 0 element
[09:13:26] <chap> in the case of the first char being a -
[09:13:34] *** pandora-- has quit IRC
[09:13:39] <AMcBain> just ignore it then :) whitespacee means nothing to you, so ...
[09:13:44] *** zmanning has joined ##java
[09:13:57] <AMcBain> I will also warn that this regex won't remove whitespace if there is any between your elements in the exression.
[09:14:00] <AMcBain> expression*
[09:14:49] <AMcBain> so you'll have to run trim() on strings (or run a regex to remove all spaces if there are some inside the strings, not just the ends)
[09:15:24] *** deSilva has joined ##java
[09:15:47] *** vesz has joined ##java
[09:16:26] <chap> hmmm
[09:16:43] <chap> would if(terms[i].contains("[ ]") be proper?
[09:17:21] *** mitch0 has joined ##java
[09:17:22] <chap> nvm, isEmpty works
[09:17:34] <AMcBain> er for checking for spaces? no ... you want to use .contains(" ")
[09:20:29] * AMcBain decides he should stop being gung-ho and just use drop * cascade;
[09:20:48] <AMcBain> makes drop scripts easier if you don't care about constraints :P
[09:21:41] * AMcBain kicks mysql for being stupid.
[09:22:42] *** jaggz- has left ##java
[09:24:00] *** skoskav has joined ##java
[09:24:13] *** hanen has joined ##java
[09:29:25] *** pstickne has quit IRC
[09:31:51] *** hanen has quit IRC
[09:33:23] *** bhz- has joined ##java
[09:35:15] * phix hands AMcBain a copy of firebirdsql and postgresql to choose from
[09:35:43] <AMcBain> I have postresql ... but I found it pretty much unusable (to me). Nothing I seemed to do worked.
[09:37:07] <AMcBain> (my host also offers phpmyadmin and pgadmin, and I know it's bad to judge the DBs based on products made for them, but pgadmin was pretty broken ... wouldn't let me (owner of the hostspace) change table stuff for tables created by a user account I created and ran from a webpage)
[09:37:27] <cybereal> AMcBain: you just don't know what you're doing
[09:38:27] <AMcBain> I think I know SQL pretty well ... and postgres claims to be more standards compliant, but when you've worked with mysql and oracle (both not exactly perfect) and you get to pg and everything just doesn't work, it must have a very messed up version of "standard"
[09:38:31] *** nater has quit IRC
[09:38:34] <AMcBain> s/I think//
[09:39:06] <cybereal> it works fine, you just don't know what you're doing, just learn to accept that and move on
[09:39:45] *** bitshuffler has quit IRC
[09:40:08] *** AskHL has quit IRC
[09:40:10] <AMcBain> I'm not going to argue with you ... but when you can't even insert tables, even when you have proper syntax (and not mysql's random `` version of it, the proper version), it's not worth it.
[09:40:22] <cybereal> but you can
[09:40:25] <cybereal> or nobody would be able to use it
[09:40:34] <cybereal> so clearly you've got some idiotic impression of reality here
[09:40:46] *** \k has joined ##java
[09:41:12] <cybereal> seeing as postgres is basically the most capable rdbms you can possibly get without paying, and still a fine competitor against commercial offerings...
[09:41:14] <AMcBain> hmmm, reality = I tested it and it didn't happen ... I must be in fantasy land if stuff I actually do with my own hands isn't real, and happening somewhere.
[09:41:25] <cybereal> no, you just don't know sql like you think you do :)
[09:42:23] <cybereal> and you probably didn't bother learning how postgres works, either, seeing as there is no such thing as a standard for administration
[09:42:23] <AMcBain> uh, yeah, I actually made sure after the first time it didn't work to look up and make sure my table creation statements, and quotes, etc. where all correct, and it *never* liked anything I had tried to written. pg might be fine, but not the copy my webhost has installed.
[09:42:30] *** Lhet| has quit IRC
[09:42:41] <AMcBain> to write*
[09:43:25] <cybereal> I've deployed to postgres in a large scale production environment, I'm quite certain it's capable of creating tables bwahaha
[09:43:37] *** dpy has joined ##java
[09:44:34] <cybereal> maybe you got confused by unquoted name case normalization that it does? or maybe you aren't used to working with schema spaces
[09:44:37] <AMcBain> well, I'm not disputing that ... I'm disputing my hosts ability to install it correctly ... but anyways, I think I may have eventually gotten tables in it, but I don't remember. I was fed up with it rejecting perfect SQL left and right that I gave up my endevour and return to mysql
[09:45:03] <cybereal> mysql barely qualifies as a sql server
[09:45:16] <cybereal> so if that's your skill base, I am not surprised pgsql confused you...
[09:45:25] *** MichielH has joined ##java
[09:45:26] <cybereal> mysql screws with me for the opposite reasons
[09:45:37] <cybereal> or at least, it did when I had to use it, I haven't had to use 5
[09:45:44] <AMcBain> no, I've used oracle too ... mysql was not my first learn for DBs ... though Ihave been using it for the longer amount of time.
[09:45:55] <AlanasAnikonis> i am too mysql-fied, I don't even know how to work with pgsql :(
[09:46:18] <AlanasAnikonis> i wish I knew how to work with it
[09:46:23] <cybereal> AMcBain: dude you've apparently only worked with rather non-standard rdbms's then
[09:46:40] <AMcBain> yeah oracle is pretty strange.
[09:46:48] <cybereal> oracle's a pain in the ass
[09:46:53] <AMcBain> +1 there.
[09:47:31] *** \k has quit IRC
[09:47:37] <AMcBain> (oracle doesn't even have limit and offset)
[09:49:18] <AlanasAnikonis> don't blame oracle for sql standard being so stupid ;)
[09:49:27] <cybereal> AMcBain: you get limit through JDBC calls
[09:49:36] <cybereal> I never tried for offset
[09:49:40] <cybereal> so few db's have such a thing
[09:50:04] <AlanasAnikonis> I thought all DBs have their own version, you just have to find it
[09:50:06] <cybereal> but I wouldn't be surprised if it had it through an oracle jdbc specific call
[09:50:37] *** ldam has quit IRC
[09:50:38] *** ijuma has joined ##java
[09:50:39] <AMcBain> possibly. the normal approach it seems for oracle is to use the special variable "rownum" which doesn't quite mean the same thing.
[09:50:41] <AMcBain> I use limit and offset to do paging for most of the stuff I do, for lists of items, so having it is extremely valuable ...
[09:50:59] *** tomvolek has quit IRC
[09:52:08] <cybereal> but you can use a scrollable resultset to accomplish the same thing as offset with the same performance implications for basically any proper db with a proper jdbc driver
[09:52:27] <AMcBain> yeah I suppose
[09:52:40] <cybereal> all you're getting with offset is that same thing already having been done by the server
[09:53:59] *** ldam has joined ##java
[09:54:04] *** DrHouse__ is now known as `House`
[09:54:58] *** ijuma has left ##java
[09:56:17] *** squiddle has joined ##java
[09:56:41] *** schasi has joined ##java
[09:56:52] *** TheCastor has joined ##java
[09:59:43] *** dnmo has joined ##java
[09:59:55] *** Copter has joined ##java
[10:02:35] *** deepjoy has quit IRC
[10:03:40] *** deepjoy has joined ##java
[10:05:24] *** dangertools has quit IRC
[10:06:44] *** dangertools has joined ##java
[10:07:40] *** Levia has joined ##java
[10:09:54] *** chap has quit IRC
[10:10:09] *** bashoh has joined ##java
[10:11:13] *** genesiss has joined ##java
[10:12:11] *** Junior has joined ##java
[10:13:46] *** magentar has joined ##java
[10:18:35] *** Sonderblade has joined ##java
[10:18:59] *** magentar has quit IRC
[10:19:25] *** KermitTheFragger has joined ##java
[10:23:41] *** valcker has joined ##java
[10:27:54] *** magentar has joined ##java
[10:30:56] *** tsdh has joined ##java
[10:31:05] <AMcBain> cybereal: would you say (if you know) that it is "easier" to set up a mysql db or a postgresql database (we'll assume a good distro of linux)? By ease, I mean have it ready to use and get user accounts set up ... when I was complaining earlier, I was working with the mysql on my webhost and what I'm working on will easily outstrip what I've got (space, possibly bandwidth) and I'd consider going to a place like slicehost, where I'd start basically from scratch
[10:31:05] <AMcBain> ... the problem is that if I did convert, I'd have to rewrite all my queries. It's not entirely bad, I do use InnoDB, so I get foreign keys, etc.
[10:31:27] <AMcBain> (queries and tables, slightly, currently I use stuff like tinyint instead of the standard boolean)
[10:32:01] <tsdh> Hi. I want to read an hexadecimal long from a string, but I always get a NumberFormatException. Why? An example is at http://pastebin.ca/1331482.
[10:33:19] <cybereal> AMcBain: I've only done configuration/management on my own machines, with full access, and from-scratch installs so with that I'd say it's pretty easy to setup, easier than oracle, harder than MS SQL (Only because MS SQL has pretty user friendly management tools compared to other RDBMS's) but even when I was brand new to pgsql I didn't have any trouble getting a basic setup going with multiple users
[10:34:00] <AlanasAnikonis> tsdh, isn't that just overflowing?
[10:34:00] <AMcBain> cybereal: well that's about what I'd have with slicehost: full access. they let you choose the OS (limited list) and install whatever apps you want.
[10:34:05] <cybereal> as far as comparing to mysql, I've only ever set that up via command line and it was a tedious affair figuring out which sttings I had to configure for external access and such, probably simpler if I had a gui tool such is that which comes with pgsql, or some of the third party ones for mysql
[10:34:28] <cybereal> Is it a virtual host with a chroot or an actual vm?
[10:34:38] <AMcBain> hmmm ... let me check.
[10:34:47] *** ghostknife has joined ##java
[10:35:03] <tsdh> AlanasAnikonis: Seems so, but reading the decimal representation works. Is it really true that I cannot read back longs I printed with toHexString()?
[10:36:38] <AMcBain> cybereal: it just says they use their "Xen virtualization software" and that you have full root access and reboot capability ...
[10:36:53] <cybereal> you're in a vm, basically
[10:36:57] <cybereal> which is pretty cool
[10:37:11] <AMcBain> yeah ... it allows them to "cap" the servers such that there is room for overflow.
[10:37:21] <cybereal> it's basically the same deal as vmware but the HAL is linked into the OS kernel requiring OS support to some minor degree
[10:38:11] *** gdoko has quit IRC
[10:38:21] <AMcBain> http://www.slicehost.com/ the reason I'd consider switching is that if it really need to "upgrgade" from where I currently am, I get to install what I want (and *just* what I want) I get to pick my OS, and their base plan is incredibly enticing.
[10:38:36] *** schasi has quit IRC
[10:38:53] <ghostknife> Can this be a deadlock? I have a JEditorPane, and if early in the execution of my program i call setText() if freezes on line 2 of JEditorPane.setText(). I can't even close the program, and nothing else can execute. All is dead. Though I can see anything that has been paint()ed up to that point. Also, when listing the threads, under group "main" the threads "main" and "AWT-shutdown" are both "waiting". Also, I found that the last line exe
[10:39:24] <ghostknife> could be right?
[10:39:44] <cybereal> AMcBain: I'd never do anything important without at least a vm, I hate that whole slice of a httpd server hosting deal that was so common in the pat
[10:40:18] <AMcBain> well, you get the whole deal there ... my current host probably does similar to that (I get what isn't used by others)
[10:40:59] *** orgy` has joined ##java
[10:41:05] *** teralaser has joined ##java
[10:41:44] *** bashoh has quit IRC
[10:42:18] <AMcBain> The problem is that I can't switch until I get a steady inflow from a possible job this summer, or the community my project is for donate hosting costs (but I think my partner and I on this need to finish it before we can gauge how popular it really is)
[10:43:01] <AMcBain> (it just depends on how badly people still think the alternative to our thing sucks when we release)
[10:43:22] *** duard has joined ##java
[10:49:23] *** duard has quit IRC
[10:52:21] *** corrupt has quit IRC
[10:52:29] *** defenderBG has joined ##java
[10:52:40] <defenderBG> hi guys and girls
[10:54:01] <defenderBG> i was wondering for quite some time now, is there a good strategy for handling exception
[10:55:15] <defenderBG> like should I handle them at the very beginning, should I let them live as long as possible (throw them as an exception from the method), what should I do?
[10:55:22] <goki-_-> There is no good strategy, and that is why they defeated us in the great Exception war.
[10:56:34] <goki-_-> You should handle them where you can do something meaningful
[10:56:36] <defenderBG> goki-_-: sounds kind of problematic, but yet then again at which level do you handle the exceptions?
[10:56:46] <W_work> defenderBG, use your regular boundaries of abstraction
[10:57:06] *** coalado has joined ##java
[10:57:10] <coalado> HI
[10:57:16] <coalado> I have a very strange situation.
[10:57:18] <defenderBG> W_work: what do you mean?
[10:57:23] <W_work> if by "handle" you mean "write something funny to standard out and ignore it" then don't
[10:57:40] *** sphenxes has quit IRC
[10:57:44] *** Junior has quit IRC
[10:57:55] <W_work> defenderBG, I mean it depends on the exception, where it occurs, and what path of calls reaches that point
[10:58:04] <coalado> IN my tool, I have some statics like this public static String mystatic=Meidatabase.getDataSet("key");
[10:58:18] <goki-_-> For example, a class that handles a particular file format might get an IO exception. It doesn't have any reasonable way of dealing with it, so it should just pass it on (or wrap it in another exception to add information). Then when that exception reaches (for example) a GUI, that GUI can tell the user that the file is incorrect.
[10:58:24] <defenderBG> W_work: no, thats not "handling" at all, i should inform somewhat the upper methods that an exception was thrown
[10:58:24] <coalado> if MyDatabase is not initialised yet, it will get initialised on first getdataSet call
[10:58:40] <W_work> defenderBG, the typical way of doing that is... by throwing an exception
[10:59:03] *** sphenxes has joined ##java
[10:59:05] <W_work> coalado, when the class is loaded
[10:59:26] <defenderBG> W_work: yep, that is when the problem gets more complicated, when do i know that I should handle and not throw it again?
[10:59:29] <coalado> W_work: this might no be a very good idea to do such things in the statics
[10:59:39] <coalado> bute the problem is this one:
[10:59:40] <W_work> defenderBG, if you don't know, you shouldn't
[11:00:11] *** cyzie has quit IRC
[11:00:13] <ghostknife> hmmm
[11:00:19] <defenderBG> W_work: hmmm? then what should I do?
[11:00:37] <W_work> defenderBG, do where? when?
[11:00:49] <coalado> the getDataBaseConnector Method gets somehow interrupted and I do not get any excepttions.
[11:00:57] <W_work> if you don't know how to handle an exception, you either let it propagate, or you throw your own exception with an initialized cause
[11:00:57] <coalado> even finally blocks get skipped.
[11:01:11] <ghostknife> it seems that if you can JEditorPane.setText() and then while it has it's AbstractDocument.writeLock you call the JEditorPane's container's validate() then you get a deadlock on AbstractDocument's internal locking mechanism
[11:01:17] <W_work> coalado, no, that is not what happens
[11:01:25] <W_work> unless you use some broken-java
[11:01:30] <W_work> ~~coalado test case
[11:01:31] <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.)
[11:01:49] <coalado> W_work: i know that a testcase would be nice
[11:01:49] <defenderBG> goki-_-: the example is quite good, maybe it will be good if i try to look at which point the exception does not make a difference any more and handle it before that
[11:02:01] <coalado> but a cannot give you one
[11:02:17] <coalado> since this proble only occures on some clients machines
[11:02:18] <W_work> coalado, ok
[11:02:21] *** ffgeek200b has quit IRC
[11:02:35] <coalado> very strange... I am confused
[11:03:09] <defenderBG> W_work: you wrote: if you don't know, you shouldn't, that's why i asked you what I should do then...
[11:03:26] <coalado> W_work: i will try t collect some stack traces
[11:03:50] <ghostknife> coalado: how do you know it gets interrupted? doesn't it maybe "hang" in the middle, and that is why you don't have the finally executed?
[11:04:12] <coalado> ghostknife: because i step through it
[11:04:22] <coalado> and it just skips a few steps
[11:04:23] <ghostknife> coalado: for finally not to execute you have to run a very broken VM or have run into a very bad bug. You running sun vm? version?
[11:04:29] *** Levia has quit IRC
[11:04:50] <coalado> sun vm 1.6_**
[11:04:52] *** malax has joined ##java
[11:05:03] *** isymi007 has joined ##java
[11:05:16] <coalado> It seams that its a problem of very slow pcs. so may be timing problems... give me a few minutes.
[11:05:20] <goki-_-> defenderBG: I think W_work meant that if you don't know what to do, throw the exception, which is what I would say as well.
[11:05:49] <goki-_-> defenderBG: At some point, you must have the information necessary to respond to the exception sensibly - catch it and deal with it then.
[11:06:16] <goki-_-> defenderBG: If you never have a point where you are able to deal with the exception, then perhaps you should give up and just log it?
[11:06:16] *** shadowrider has joined ##java
[11:06:23] *** shadowrider has left ##java
[11:06:46] <goki-_-> defenderBG: For example, "out of memory" is hard to respond to, so most people will just let it go, and it kills the app
[11:08:09] *** cyzie has joined ##java
[11:08:43] <defenderBG> W_work, goki-_-: if we look at the program like layers, i should throw the exception as long as it is meaningful, that means I can handle it correctly. if the error has an impact on the layers above (IOException while reading the file, file reading permition, etc ), I should report it as well, maybe in a general way, like FileReadExeption and have a method, which allows me to get the real exception if needed (maybe getCause()/getExc
[11:08:44] <defenderBG> eption)?
[11:09:20] <W_work> defenderBG, don't encapsulate if the calling layer is likely to need to know what happened
[11:09:43] <goki-_-> W_work: I think it is bascially one rule "If something goes wrong, and you don't know how to handle it, throw an exception"
[11:09:49] <goki-_-> Sorry, that was to defenderBG
[11:10:06] <W_work> if you have a FileReader, let it throw IOException. If you have a LinesOfDataSource you might want to encapsulate in UnableToGetLinesException
[11:10:12] <defenderBG> W_work: hm... the exception will be handled from the layer beneth, which means logged as well. so I though this might be usefull when debuging...
[11:10:35] <W_work> defenderBG, well, my general advice when it comes to logging is the same: don't
[11:10:49] <goki-_-> Logging is different to exceptions though
[11:10:49] <coalado> W_work: sorry fals alarm. I saw that there are serialised objects in my db which cause some very strange initialisations...
[11:10:56] <coalado> but it looks correct
[11:11:04] <coalado> anyway. thx for help
[11:12:29] <defenderBG> W_work: logging is part of the exception handling, it is not the only thing. if the upper layer calls a method to read a file, and the file is not readable, it might not be too interested in why the file is not readable, since it will just ignore the fail and try to read the next one
[11:13:24] *** magentar has quit IRC
[11:13:29] <W_work> defenderBG, well, logging (in the sense of spewing lines into a flat file) is different from proper UI (which might report how many, and which, files were failed in processing)
[11:13:39] <defenderBG> W_work: the exception will be handled on the layer below, reported as needed, and then the layer above will be informed
[11:13:48] *** Junior has joined ##java
[11:14:35] <defenderBG> W_work: I am writing a deamon, that means no UI
[11:15:31] <defenderBG> W_work: that means I only have the log file and the System.exit(int) to show what is happening with the program
[11:15:31] *** Soliah has joined ##java
[11:16:19] <defenderBG> this is why i want to agregate the exception, that the above layer gets, as it is not going (in the normal case) to represent them to the user
[11:16:28] <malax> Hello everyone! I've written an application which works quite fine but it seems it leaks some memory after some weeks running. Is there any way to detect that i'm running out of heap space within the application to handle that case more graceful?
[11:16:43] <goki-_-> defenderBG: In that case... Which level of the code can decide to skip a bad file? That layer is the first one that can decide what to do with an exception (by skipping the file), so that is the layer where the exception should stop.
[11:16:53] <cybereal> malax: not in any terribly reliable way
[11:17:11] <cybereal> malax: but I think Runtime acquired through System might be able to give you some heads up on the current state of allocations
[11:17:20] <cybereal> malax: however, fixing your leak would be better of course
[11:17:48] <defenderBG> and i want to be able to give the oportunity to whoever whats to make some UI, to be able to represent the exception, whithout rewriting the program, thus the exception encapsulation
[11:19:21] <goki-_-> defenderBG: Yup. So if the code is driven by a daemon, it decides what to do, if you add a UI you would remove the daemon and replace with a UI, and the UI would decide what to do.
[11:19:30] <isymi007> hello, Sorry for my bad English.
[11:19:38] <isymi007> Hello, i need a hotkey to complete the text in Ecplipse. When I try to write Object anObject = new Object( ... constructor with many parameters ...); I type "Object(", press CTRL+SPACE, select the appropriate constructor and press ENTER but this method only show in a popup yellow window the parameters but not complete in the editor
[11:19:45] <defenderBG> goki-_-: soo... it sounds kind of ok?
[11:19:51] <malax> cybereal, yeah of course it would be better to fix that problem. But i want to support our administrator in the meantime. I'll check Runtime, thank you! :)
[11:19:56] <goki-_-> defenderBG: Or you split things up further, and give a separate class responsibility for responding to file exceptions.
[11:20:20] *** beol has quit IRC
[11:20:22] <goki-_-> defenderBG: Yeah it sounds fine - TBH I hadn't thought about this very much since it seems like just "handle exceptions when you know what to do" covers most cases ;)
[11:20:39] <goki-_-> defenderBG: The only tricky thing normally is deciding what should be a runtime exception, that causes a lot of arguments ;)
[11:21:32] <isymi007>
[11:21:32] <isymi007> I know there is a way to write the editor eclipse parameters
[11:21:40] *** bindaas has quit IRC
[11:21:48] <defenderBG> goki-_-: in my case allmoast every exception is a runtime one, if the config file is not readable, if the port is not free... everything
[11:22:21] <defenderBG> goki-_-, W_work: thanks for the help, you helped me a lot!
[11:23:15] *** ghostknife has quit IRC
[11:24:45] *** ilyak has joined ##java
[11:24:47] <ilyak> hi *
[11:24:59] *** Voyager1960 has joined ##java
[11:25:57] *** gregor_k has joined ##java
[11:26:09] *** justafish has joined ##java
[11:26:35] *** geaaru has joined ##java
[11:30:27] *** romanb has joined ##java
[11:30:33] *** fairway has joined ##java
[11:35:53] <isymi007> then, nobody knows how to do Eclipse to complete the parameters when i write "Object anObject = new Object(" and select the constructor (pressing CTRL+SPACE).
[11:35:53] <geaaru> hi, i'm try to create an email sender application with sun-javamail to a SSL smtp server with self-signed certificate
[11:36:05] <geaaru> but i have this error: unable to find valid certification path to requested target
[11:36:23] <geaaru> is there a way to avoid check of the certificate ?
[11:36:30] <geaaru> or is always needed?
[11:36:31] <cybereal> geaaru: you need to import the public cert from that server into your local truststore
[11:36:31] <W_work> geaaru, you have to add the certificate as a trusted anchor
[11:36:45] <W_work> or whatever it's called; what cybereal said
[11:37:14] <geaaru> so, is mandatary use of local truststore?
[11:37:16] <cybereal> java makes dealing with this into an unnecessary pain in the ass (except on mac) so I'm not going to give a walkthrough but that's the gist of what you have to do
[11:37:33] <cybereal> yes, java won't (by default) make untrusted ssl connections
[11:37:47] <cybereal> you can implement a TrustManager that'll do it but I'm not sure you can insert that into javamail's stack
[11:38:18] <geaaru> ah k, thank you very much for support
[11:38:25] <cybereal> though if you can, it's trivial to override and trust everything, you basically end up overriding two methods with empty method blocks
[11:44:31] *** ghostknife has joined ##java
[11:45:16] <ghostknife> Has anyone ever experienced running a Swing application and having it on intermittent startups be a 0x0 pixel wide window? Just a little titlebar box in the upperleft corner of the screen?
[11:45:23] *** edrin has joined ##java
[11:46:08] *** edrin has left ##java
[11:46:15] <Sonderblade> ghostknife: yes, where and how the window shows is wm specific
[11:47:36] <ghostknife> Sonderblade: what do you mean? that this isn't a java bug? because this happens ONLY with java programs? and all of them? could it be the way the windows identify themselves and the WM remembers a previous one with same ID (hypothetical ex. "java-app-0")?
[11:48:12] *** deSilva has quit IRC
[11:48:45] *** Trollinator has joined ##Java
[11:48:53] *** virhilo has quit IRC
[11:50:12] <Sonderblade> ghostknife: what os?
[11:50:45] <ghostknife> Linux (Gnome)
[11:51:07] <jottinger> ghostknife: sounds like a bug in the programs
[11:51:51] <ghostknife> jottinger: it does, but it's a very simple startup, and even with very simple programs. I do setVisible(true), and then setSize(700, 500); done.
[11:52:12] <jottinger> ghostknife: file a bug.
[11:52:27] <ghostknife> jottinger: ok.
[11:53:06] <ghostknife> am I supposed to setSize() / setVisible() in the event queue?
[11:53:22] <jottinger> I don't know. What does the tutorial do?
[11:53:44] <ghostknife> not sure.
[11:54:02] <jottinger> might be worth checking :)
[11:54:31] <ghostknife> nope
[11:54:38] *** nekrozion has joined ##java
[11:54:41] <ghostknife> they set in the main thread
[11:54:46] <jottinger> *nod*
[11:55:02] <jottinger> note that I do zero GUI development
[11:56:05] <ghostknife> I am farely new to it myself. A whole different ballgame.... exciting though
[11:58:38] <tsdh> Hey, I've fixed my hex-long problem. The quintessence is: You cannot read back longs you've written with Long.toHexString(), but you have to use Long.toString(mylong, 16) instead.
[11:58:51] *** ankylose has joined ##java
[11:58:59] <jottinger> bwaha
[11:59:03] *** shervin_a has joined ##java
[11:59:14] *** `House` has quit IRC
[12:00:20] *** AskHL has joined ##java
[12:00:34] *** Hates_ has joined ##java
[12:01:57] <cybereal> tsdh: joke's on you, toHexString() produces the same output as toString(long, radix)
[12:02:00] *** DrHouse___ has joined ##java
[12:03:10] <tsdh> cybereal: That's what I thought, too, but it's false for huge negative values. There toHexString() encodes the sign with the first bit while toString(xxx, 16) writes "-0xAAA".
[12:03:50] <cybereal> tsdh: why would you want -0xAAA ?
[12:04:25] <tsdh> cybereal: Because I can read that back in using Long.decode().
[12:04:32] *** bas-i has quit IRC
[12:05:29] *** bas-i has joined ##java
[12:05:33] <cybereal> or you could use parseLong
[12:05:35] *** lvh has joined ##java
[12:05:41] <lvh> hello :-)
[12:05:51] <tsdh> cybereal: Nope, doesn't work. Check http://pastebin.ca/1331482 for a minimal example.
[12:06:39] *** skoskav has quit IRC
[12:08:49] *** The_Birdman has quit IRC
[12:11:23] <ghostknife> interstingly enough, doing setSize() and setVisible() at the end of the constructor seems to have taken the problem away
[12:11:52] <ghostknife> probably a timing/threading error of some sorts, since my EJBs are loaded from within the constructor, and happened after the setSize()
[12:12:54] <ghostknife> I had a 0% "small window" out of 100 launches, where I would get between 5%, 28% and 7% in previous 3 runs.
[12:13:26] <ghostknife> slap my wrist, 1% now :<
[12:13:59] <AMcBain> if you added the text or set stuff visible on the EDT, you might greatly reduce your chances of a problem.
[12:15:44] *** skoskav has joined ##java
[12:16:05] *** Levia has joined ##java
[12:18:04] *** xanax` has joined ##java
[12:18:07] <xanax`> hello
[12:18:15] <xanax`> i am using vista and it doesn't let me install java runtime environment 6 update 11 because of an unknown and untrusted provider.
[12:19:33] <coalado> I have vista
[12:19:46] <coalado> und installation of u11 was no problem
[12:20:00] <coalado> did you download it from sun?
[12:20:04] <xanax`> sure
[12:20:30] *** ankylose has quit IRC
[12:20:32] <coalado> strange. perhaps they forgott to sign it, or anything like this.
[12:20:42] <coalado> google may help you to find others with the same problem
[12:20:50] <xanax`> yes
[12:20:55] <xanax`> that's what i am doing
[12:20:57] <xanax`> :)
[12:21:20] <coalado> I'm pretty sure, that it is possible to disable this trust-check
[12:21:25] *** DrHouse___ has left ##java
[12:21:34] <coalado> but this is rather a vista issue
[12:23:03] *** sombriks has joined ##java
[12:23:52] *** DragonLord- has joined ##java
[12:24:02] *** NiSoOo has joined ##java
[12:24:59] *** shervin_a has quit IRC
[12:28:04] *** Levia has quit IRC
[12:29:10] *** KikiJiki has joined ##java
[12:29:38] *** buntfalke has joined ##java
[12:30:43] *** Levia has joined ##java
[12:32:50] *** kulhas has joined ##java
[12:32:54] <kulhas> hello
[12:33:25] <xanax`> coalado : it's not. it's rather a certificate problem
[12:33:55] <kulhas> hello , i got this error java.lang.ClassNotFoundException: org.jboss.ejb3.JBossProxy (no security manager: RMI class loader disabled)
[12:34:00] <kulhas> how can i solve it ?
[12:35:05] <coalado> include all libraries?
[12:38:08] *** igordcard has joined ##java
[12:40:33] *** Toktik has quit IRC
[12:43:03] *** xanax` has quit IRC
[12:43:10] *** yclian has joined ##java
[12:44:41] *** morkar- has joined ##java
[12:45:11] *** werdan7 has joined ##java
[12:45:24] <jottinger> no
[12:45:28] <jottinger> set the RMI classloader
[12:45:35] <jottinger> the RMI security manager is the problem
[12:46:51] <ghostknife> well... executing the setSize() outside of the constructor (directly after) and at the end of the constructor (the latter having been done on the event queue previously as well), seems to work. have a 0% "small window" rate in 10 separate 100 launches tests
[12:47:01] <ghostknife> stupid but works.
[12:47:04] <ghostknife> this sucks bad
[12:47:12] <ghostknife> and I can't find anything on google...
[12:48:47] <mitch0> ghost: make a blog about it, so other can :)
[12:49:09] <ghostknife> mitch0: I was in fact planning on that.
[12:49:18] <ghostknife> mitch0: just trying to get more information
[12:49:35] <ghostknife> trying different scenarios.
[12:50:06] <ghostknife> also trying to find the cause of it. but damn hard since it only happens when the sun strikes the side of my building at a specific yet unknown angle after reflecting against a yet unknown piece of grass
[12:50:29] *** codethief has joined ##java
[12:51:50] *** agentfy2k has quit IRC
[12:51:56] *** Dopesmoker has joined ##java
[12:51:57] *** psydian has joined ##java
[12:52:30] <ghostknife> you see, ot
[12:52:53] <ghostknife> you see, it's cloudy, now it never happens. not even with the originally buggy revision
[12:52:56] <kulhas> jottinger, how do i set the rmi class loader ?
[12:53:41] <jottinger> kulhas: setSecurityManager(new RMISecurityManager()) IIRC
[12:54:14] *** L-----D has joined ##java
[12:57:04] *** Levia has quit IRC
[12:57:22] <kulhas> jottinger, tx its seems to be working, now i just need to set permission in my jboss server
[12:57:49] *** sombriks has quit IRC
[12:57:55] *** `House` has joined ##java
[12:58:25] *** defenderBG has quit IRC
[13:00:03] *** Angel-SL has joined ##java
[13:00:07] *** Levia has joined ##java
[13:00:21] *** LostMonarch has joined ##java
[13:01:16] *** cybereal has quit IRC
[13:03:21] *** Trollinator has left ##Java
[13:04:51] *** armyriad has quit IRC
[13:06:12] <coalado> is it possible to get the source of.. for example. sun.net.www.protocol.http.HttpAuthenticator ?
[13:06:37] *** amitev has quit IRC
[13:07:13] *** amitev has joined ##java
[13:07:27] <W_work> yes
[13:08:25] <coalado> where? it's not included to the normal jdk src.zip.
[13:08:37] <W_work> in fact, the top google hit for just that qualified class name is the source
[13:10:19] <mitch0> :)
[13:10:22] <coalado> in fact... the first google hit is www.javadocexamples.com...
[13:10:28] <coalado> which is unfortunatelly down
[13:11:14] *** isymi007 has quit IRC
[13:12:33] <jottinger> why do you need that?
[13:12:44] <jottinger> You should probably use commons-http if you're doing authentication
[13:12:57] * Stephmw nods
[13:14:47] *** wild_oscar has joined ##java
[13:14:54] <jottinger> but still... why do you need the source?
[13:15:58] *** deepjoy has quit IRC
[13:17:09] <jottinger> ... or not.
[13:18:24] <ilyak> Who else does really really want javadocs to have a 'view source' button for every method, pointing to the appropriate line of properly-highlighted source?
[13:18:24] <mitch0> that reminds me... need to investigate this cookie issue with commons-http
[13:19:01] <jottinger> ilyak: I would
[13:20:35] *** vhs-jon has joined ##java
[13:21:43] *** Angel-SL has quit IRC
[13:21:57] *** shervin_a has joined ##java
[13:24:12] <reverend> ilyak: yes, if you're considering doing it, do it
[13:24:26] <coalado> jottinger: I just want to look how they "made" it
[13:24:42] <Levia> ilyak: I would
[13:25:20] <reverend> that would be a great extension to javadoc in general. also, generated docs without frame based navigation would be nice too
[13:25:32] <coalado> I need a Authenticator that can be resricted on certain urlconnections
[13:25:45] <kulhas> does anyone knows how to solve this exception : Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve)
[13:25:52] <coalado> as far as i know... this is not possible
[13:26:16] <deebo> ilyak: just attach sources/javadocs to your ide
[13:26:40] <fairway> how do I test with XPath if a certain node has been changed?
[13:26:54] <deebo> umm what
[13:27:03] <deebo> xpath doesnt have a state
[13:27:12] <Levia> deebo: there have been numerous times where I want to view source of javadcos found online without actually setting it all in my IDE just to check something out
[13:27:36] <deebo> eclipse has soem great plugins to bring javadocs to your ide via the interwebs
[13:27:47] <Levia> but that's eclipse.
[13:27:51] <fairway> deebo: how would it be possible to test if an xml section has been changed?
[13:28:07] <reverend> good code _is_ documentation, might as well have to option to navigate to it from the docs
[13:28:13] <deebo> get its value, then get it again and compare them
[13:28:15] <fairway> deebo: i need to call callbacks if a node has been changed
[13:28:16] <deebo> but im off ->
[13:28:32] <fairway> deebo: alright
[13:31:33] <wild_oscar> hey, I'm having trouble finding the right way to load a File into an application
[13:31:38] <fairway> is dom4j in java 1.6?
[13:31:58] <wild_oscar> I need to new File(path)
[13:32:01] *** Vantaa has joined ##java
[13:32:06] <wild_oscar> to load a xls file
[13:32:39] <wild_oscar> the idea is to create a jar application (double clickable)
[13:33:05] <wild_oscar> if I put the xls file in the same directory as the .jar, how should I define the path variable?
[13:33:36] *** lyy has joined ##java
[13:33:38] <lyy> hi
[13:35:20] *** JohnBat26 has joined ##java
[13:35:29] <lyy> I wanna play around with tomcat - do I want to download the "Core" binary distribution?
[13:35:48] <lyy> or do I want the "Deployer" ?
[13:35:55] <lyy> kinda confused here.
[13:36:07] *** igordcard has quit IRC
[13:36:44] <jottinger> core should be fine, but why do you want to play with tomcat?
[13:36:48] <jottinger> fairway: no
[13:37:01] <lyy> jottinger: I don't know anything about it..
[13:37:15] <jottinger> what makes you choose tomcat?
[13:37:19] <paulweb515> wild_oscar: if you double-click to run, won't its CWD be the directory with the jar just be default?
[13:37:34] <lyy> jottinger: going to try to use jsp server pages on it
[13:37:35] <jottinger> reverend: you know of any way to convert from OOo to Visio?
[13:37:46] <jottinger> lyy: you realise there are better containers than tomcat, of course
[13:37:47] <lyy> javaserver pages I mean
[13:37:57] <jottinger> I know what you meant
[13:37:57] <lyy> jottinger: No, what should I read?
[13:38:00] *** Varox has joined ##java
[13:38:07] <jottinger> lyy: jetty, glassfish, resin
[13:38:18] <lyy> writting those down..
[13:38:23] <lyy> and will google
[13:39:01] *** hrehf has joined ##java
[13:39:27] <lyy> I chose tomcat because I thought it was the standard
[13:40:26] *** Levia has quit IRC
[13:40:38] <jottinger> it's not
[13:41:27] <jottinger> tomcat is generally a fairly large pile of suck
[13:41:34] <lyy> hehe :D
[13:41:58] <lyy> I'm looking at wiki's doc on jetty - it looks pretty cool
[13:42:07] <lyy> kinda small info though
[13:42:26] <wild_oscar> paulweb515: I don't think so; the code File f = new File("db.xls"); doesn't work if I double-click
[13:43:52] <wild_oscar> paulweb515: however, if I run the code from within the directory, it works
[13:43:54] <jottinger> not much info is necessary
[13:44:17] <reverend> jottinger: no idea
[13:44:28] <wild_oscar> ie, having db.xls in the same dir as the jar: double click - doesn't work
[13:44:28] <reverend> they might share a common xml representation though
[13:44:36] <ghostknife> ooooo.
[13:44:45] *** ghostknife has quit IRC
[13:44:45] <wild_oscar> "cd jar path; java -jar file.jar" - works
[13:44:56] *** ghostknife has joined ##java
[13:45:01] <jottinger> heh
[13:45:04] <jottinger> this tells you nothing?
[13:45:19] <wild_oscar> jottinger: are you talking with me?
[13:45:20] *** ghostknife has quit IRC
[13:45:44] <lyy> looks like glassfish might be the best choice
[13:46:04] <jottinger> yes
[13:46:10] <paulweb515> wild_oscar: in theory it's the property user.dir that matters ... you could print it out to see what it is when you double-click
[13:46:44] *** ghostknife has joined ##java
[13:46:47] <ghostknife> oooo
[13:46:50] <ghostknife> interesting.
[13:46:51] <wild_oscar> it tells me the current directory is in the classpath
[13:47:03] <paulweb515> wild_oscar: potentially the other option is to try and find your jar in the java.class.path ... if double-clicking generates an absolute path, you can track down the directory that contains your jar
[13:47:40] <wild_oscar> what I don't know is the best way for it to work when double clicking it
[13:47:56] <ghostknife> jottinger: re. that "small window" bug. It must be a bug. I made a thread execute 1 second after the program starts. and noticed that the dimensions returned by "window.getSize()" is 1024x768. even if the window is small.
[13:48:08] *** illbeatu has quit IRC
[13:48:25] <ghostknife> imo, this is definite indication of a bug
[13:48:32] <reverend> doubts
[13:48:53] <wild_oscar> paulweb515: I think I've tried the user.dir property - the thing is, when double clicking the jar, it points to my system user's path (/home/user)
[13:51:00] <reverend> ghostknife: are you messing with your swing components from multiple threads?
[13:51:09] <reverend> and not using the edt
[13:53:23] <wild_oscar> paulweb515: yes, I can track it with getClass().getProtectionDomain().getCodeSource().getLocation().toURI()
[13:53:34] <reverend> you should at least consider that it's highly unlikely that on day 1 or 2 of you using Swing that you uncovered such a blatant bug when there are highly skilled people who use it all over the world on a regular basis for very complex tasks
[13:53:45] <reverend> they're unlikely to have 'just missed' something like that
[13:53:50] <paulweb515> wild_oscar: success ... but that seems complicated :-)
[13:54:17] <wild_oscar> I do have two issues with it: 1) I get the application.jar part as well (I can edit the string, of course)
[13:54:37] <W_work> reverend, a little knowledge is a dangerous thing
[13:54:57] <wild_oscar> 2) I also get JavaApplication1/build/classes/ in my netbeans environment, and I don't have the .xls there
[13:55:10] *** Daniel_H has joined ##java
[13:55:33] <wild_oscar> I could, of course, try File("db.xls"), test if it exists, if not, then use the getClass().... code
[13:55:57] <wild_oscar> it does seem complicated, hence my question :P
[13:56:01] <wild_oscar> jottinger: any idea?
[13:56:08] *** gdoko has joined ##java
[13:56:14] <W_work> wild_oscar, or, you could just specify the path on the commandline or in a config file
[13:57:45] <wild_oscar> W_work: yes; but in commandline makes double-clickable jar file not an option and...I'll also get the same issue when loading the config file ;)
[13:57:55] *** beol has joined ##java
[13:58:16] *** TranceControl has joined ##java
[13:58:20] *** rgravener has joined ##java
[13:58:46] *** bindaas has joined ##java
[13:59:16] <W_work> wild_oscar, a "double-clickable jar file" is a jar file that contains everything inside itself
[13:59:57] *** deepjoy has joined ##java
[14:00:23] <W_work> you could of course take the ugly-route so many others have and specify a MYAPP_HOME environment variable
[14:00:43] *** Absolute0 has joined ##java
[14:01:06] *** shadewind has joined ##java
[14:04:52] *** OsAC has joined ##java
[14:04:54] *** deSilva has joined ##java
[14:05:11] <DragonLord-> I started my application and got a file permission error, so I changed owner of a file, then when I try to run my application again, I get "Port already in use.", so it most be running in the background. How do I close it? I checked with htop and I did not find any match. (Ubuntu Server 8.10 / sun-java6-jre)
[14:05:41] <OsAC> ps xvf
[14:05:49] <jottinger> DragonLord-: it may not be RUNNING, ports sometimes take a few seconds to release
[14:05:50] *** lokedk has joined ##java
[14:06:01] <fairway> is a DOM an abstract xml model?
[14:06:04] <jottinger> wild_oscar: where's the config file stored?
[14:06:08] <jottinger> fairway: errrr
[14:06:09] <jottinger> why?
[14:06:15] <jottinger> it's not abstract
[14:06:18] <W_work> ~~fairway dom
[14:06:18] <javabot> fairway, I have no idea what dom is.
[14:06:21] <fairway> k
[14:06:29] * W_work peers at javabot
[14:06:40] <jottinger> W_work: not sure W3c knows what dom is either :)
[14:06:40] *** tissue has quit IRC
[14:06:46] <DragonLord-> jottinger okey, but not serveral minutes?
[14:06:57] <jottinger> DragonLord-: probably not. look harder. :)
[14:07:11] <DragonLord-> =)
[14:07:33] <jottinger> DragonLord-: what was the application?
[14:08:24] <wild_oscar> jottinger: same directory as the clickable jar file
[14:08:25] <jottinger> fairway: why are you asking?
[14:08:35] <fairway> just curious
[14:08:42] <fairway> because I am reading/writing xmls from java
[14:08:44] <jottinger> wild_oscar: well, you'll have to figure out where the jar file was clicked, then
[14:08:44] <DragonLord-> jottinger it is a SocketServer who delivers Policy Files so that Flash/Flex can connect
[14:08:52] <jottinger> DragonLord-: written in java?
[14:09:04] <DragonLord-> jottinger yes, wrote it myself
[14:09:07] <jottinger> fairway: I'm sorry. DOM isn't my fault; I'll apologize anyway.
[14:09:23] <jottinger> DragonLord-: then it's likely still running somewhere; it should be under the java bin
[14:09:43] <jottinger> ~xom
[14:09:43] <javabot> XOM is a high-performance XML object model for Java, at http://www.xom.nu - it has the advantage of being designed by and for programmers, and actually does a much better job than DOM4J or JDom.
[14:10:13] <jottinger> Hrm, XOM makes no reference to it being better than W3C DOM... just in case some retard thinks W3C DOM is even worth considering
[14:10:29] <ilyak> I've stopped reading about xom when I've found it has an object for every attribute
[14:10:51] <ilyak> Does it really, or they are only created for you if you really want an attribute as a node?
[14:11:25] <jottinger> I'd have to analyze it. But what I've found is that XOM kicks ass in every way I've needed it to.
[14:11:33] <jottinger> Therefore: I don't care
[14:11:41] <ilyak> :)
[14:13:32] *** waz has joined ##java
[14:13:39] *** ankylose has joined ##java
[14:14:41] *** Varox has quit IRC
[14:17:56] *** Techdeck has quit IRC
[14:18:01] *** durka42 has quit IRC
[14:19:29] <rgravener> sup sup
[14:20:03] <ilyak> Elements is a something which looks like a List but isn't really?
[14:20:04] *** Voyager1960 has quit IRC
[14:20:18] <ilyak> I doubt I want to use that. I've fed with DOM's NodeList-s
[14:20:18] <jottinger> Pretty much
[14:20:48] *** dangertools has quit IRC
[14:21:22] <ilyak> and it isn't ever iterable
[14:21:31] <ilyak> I think I wouldn't
[14:22:05] <jottinger> ilyak: the problem here is that I've yet to see any API, ever, that you've not been whining about in some way
[14:22:08] *** dangertools has joined ##java
[14:22:11] <jottinger> Certainly no API is perfect
[14:22:18] <jottinger> not XOM, not Joda-Time, nothing
[14:22:32] <ilyak> jottinger: Well, yes
[14:22:32] <jottinger> but your kill rate based on API satisfaction is ridiculously high
[14:22:47] <ilyak> I'll try to remember if there ever was one I've not whined about
[14:23:06] <ilyak> However, I really like smart for-loop
[14:23:07] <jottinger> so... with all due respect, your rejection of a given API doesn't mean much, since you've rejected EVERY API you've ever mentioned using so far
[14:23:46] *** Taube has joined ##java
[14:24:18] <mitch0> anyone got a handy URL with example code to access a private member thru reflection (from an outside class (beanshell, to be exact))
[14:24:22] <mitch0> ?
[14:25:06] *** Woot4Moo has joined ##java
[14:25:56] <ilyak> jottinger: Well, no
[14:26:05] <ilyak> Whine != rejection
[14:26:11] <ilyak> POI is nice, for example
[14:26:22] *** TranceControl has quit IRC
[14:26:44] <ilyak> but POI should work, and work flawlessly, and if it does the API doesn't matter much
[14:26:50] <ilyak> XML apis: the opposite
[14:27:29] <jottinger> heh
[14:27:34] <Woot4Moo> is someone making excel spreadsheets?
[14:27:35] <jottinger> funny that you like POI
[14:27:54] <jottinger> see, the reason the XML stuff isn't iterable is because iteration implies order
[14:28:00] <jottinger> and XML by definition doesn't use order
[14:28:09] <jottinger> It would be HANDY - no doubt.
[14:28:37] <ilyak> Why doesn't XML use order?
[14:28:50] <ilyak> I guess it does, because one element comes after other
[14:28:50] <jottinger> why should it?
[14:29:06] <ilyak> Even more, doctypes can restrict the order of elements
[14:29:33] <jottinger> the order of elements != the order of attributes, and the order of elements in a set of like elements is undefined
[14:31:03] <ilyak> Well, there's no order of attributes
[14:31:44] <ilyak> And I guess that element's children have the order
[14:31:53] <jottinger> do they? :)
[14:31:55] <ilyak> they come one after another, don't they?
[14:32:03] <jottinger> where?
[14:32:08] <ilyak> how does the XPath's [1] and [last()] work?
[14:32:36] <jottinger> XPath and XML aren't quite the same thing :)
[14:32:54] <ilyak> Well, XPath operates on XML *and* acknowledges order
[14:33:11] <ilyak> So I assume that XML does have order, otherwise how would XPath's [1] and last() work?
[14:33:16] <ilyak> And they do
[14:33:39] <jottinger> You can't guarantee the order.
[14:33:53] <jottinger> [1] and last() work only for incidental ordering for the XSL
[14:34:47] <ilyak> Well, they do work. If you put a few elements into the dom, and then output them using xslt, they would retain the order in which you've added them
[14:35:18] <jottinger> ilyak: work by definition or incidentally?
[14:36:08] <ilyak> Just works.
[14:36:15] <ilyak> I've never heard or seen that it wouldn't
[14:36:51] <ilyak> Attributes' order is undefined; elements' order is defined
[14:37:16] *** Junior has quit IRC
[14:39:02] *** geaaru has quit IRC
[14:39:08] *** Exzu has joined ##java
[14:39:44] <Exzu> Is there a possible way to load a frame from an exe file and then load up into a java frame? like lets say i want to play wow is there way to load it into a jframe ?
[14:40:08] *** FireSlash has joined ##java
[14:41:03] <Exzu> Meaning the graphics
[14:41:10] *** teralaser has quit IRC
[14:42:41] <ilyak> you can to that, but I doubt that by java means
[14:42:44] <W_work> Exzu, that would be OS-dependent (and hard to do on some OS')
[14:42:56] <ilyak> And also I doubt that would work with wow client
[14:43:07] <ilyak> but both windows and X11 permit that, I guess
[14:43:09] <W_work> someone has probably tried to do it on windows though (you can play around with windows handles)
[14:43:12] <ilyak> not sure about os x
[14:43:47] <W_work> Exzu, a more important question is - why on Earth would you want this?
[14:44:05] <Exzu> W_work, Well dual-boxing for wow :p
[14:44:34] <W_work> then you're looking at the wrong solution
[14:45:13] <Exzu> A better possible way to do it?
[14:45:21] <Exzu> Oh and by the way, im using windows
[14:46:44] <W_work> I would suggest you look at other things than Java - if Java is all you know, get software from third parties
[14:47:10] <Exzu> I do know more languages but i prefer java
[14:47:17] <W_work> it's not like there is a great lack of such tools out there
[14:48:29] <cheeser> to continue an earlier conversation, XPath works on a DOM not XML
[14:49:45] <Exzu> Well i guess my question should be something like, is there a possible way to "lock" onto a window with java and then if i minimized the window it would still be locked on, so if the app send's a keyclick like T it would still send it to the java window?
[14:52:47] *** jivedude has joined ##java
[14:54:02] *** wij32 has joined ##java
[14:54:30] <kulhas> jottinger, now i have this exception Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve) , i alredy google for it
[14:54:33] *** NiSoOo has quit IRC
[14:54:39] <kulhas> but cant find anything
[14:54:45] <wij32> hey, ive created a jar file using netbeans, when i run it on my machine, it works fine, when i move to another box i get Exceeption in thread "main" java.lang.NoClassDefFoundError
[14:54:49] <wij32> why is that?
[14:54:56] <wij32> im doing "java -jar TexGrab.jar"
[14:55:22] <malax> wij32, you may have missed some libraries which are not available at the other box.
[14:55:26] *** teralaser has joined ##java
[14:55:44] <wij32> i created it in 1.6 and the box is running 1.5, you think that is the problem?
[14:55:45] *** gnech has quit IRC
[14:56:17] <wij32> as im not using any extra libraires other than the standard ones
[14:56:26] <malax> wij32, could be. But may you mind to tell us which class is missing?
[14:57:01] *** FireSlash has quit IRC
[14:57:17] <wij32> javax/swing/GroupLayout$Group
[15:01:11] <lolsuper_> uhhh
[15:01:11] <lolsuper_> http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/GroupLayout.html
[15:01:18] <lolsuper_> it didnt exist in j2se 5?
[15:01:28] <dangertools> it didn't
[15:02:14] *** l3ns has joined ##java
[15:02:20] <l3ns> Hi everyone!..
[15:02:24] *** jasonpr has joined ##java
[15:02:42] <cheeser> ~javadoc GroupLayout
[15:02:49] <javabot> cheeser: http://is.gd/iUnJ [javax.swing.GroupLayout]
[15:02:50] <wij32> oh right, weird netbeans didnt moan when i tried making it java 1.5
[15:02:53] <jasonpr> any ITEXT Pros out there?
[15:02:58] <cheeser> ~anyone
[15:02:58] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[15:02:59] <lolsuper_> http://kendes.blogspot.com/2008/03/grouplayout-converting-java-6-to-java-5.html theres somethig
[15:03:10] <cheeser> lolsuper_: Since: 1.6
[15:03:17] <cheeser> ~be api barbie
[15:03:17] <javabot> <barbie>Javadoc is *hard*</barbie>
[15:03:30] <lolsuper_> thanks for the info cheeser, although i think i already figured that out :p
[15:03:37] <jasonpr> ITEXT anyone?
[15:03:45] <cheeser> ~~ jasonpr anyone
[15:03:45] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[15:03:55] <wij32> ive just installed jre 6 now, problem solved :)
[15:04:05] <cheeser> lolsuper_: i was pointing out that the docs point out exactly when a class/method showed up
[15:06:17] *** Gracenotes has quit IRC
[15:06:46] *** TranceControl has joined ##java
[15:07:39] <ilyak> What I like in my ORM is that it's immediate (you call save and object is saved, and its id is set), and also that all objects are valid, there's no misconcept of 'session'
[15:08:04] <cheeser> yeah. transactions suck!
[15:08:15] <ilyak> Not sure about transactions
[15:08:17] *** neuro_damage has quit IRC
[15:08:20] <jottinger> ilyak: using prevayler?
[15:08:27] <cheeser> they really do suck.
[15:08:30] <ilyak> However sticking anything into one transaction isn't really good
[15:08:42] <cheeser> who's dumb enough to do that?
[15:08:46] <ilyak> And they suppose you to do that by default
[15:08:53] <cheeser> hibernate doesn't.
[15:08:54] <ilyak> Well, hibernate's Session have a Transaction
[15:09:02] <CaBa> man apple did a poor job integrating java...
[15:09:03] <jottinger> heh
[15:09:15] <mitch0> hrmp. beanshell is evil
[15:09:19] <cheeser> ~evil
[15:09:19] <javabot> only morons use the word "evil" to refer programming practices, IDEs, etc.
[15:09:20] <ilyak> and you are supposed to do everything in it, or your pain multiplies by ten
[15:09:29] <cheeser> in a Session? who cares?
[15:09:32] <jottinger> ilyak: you don't reuse sessions much
[15:09:36] <cheeser> i've been doing it for years and it works like a champ
[15:09:38] <CaBa> when i disconnect my external screen my swing application throws an arrayindexoutofbounds exception
[15:09:40] <ilyak> Yeah I don't
[15:09:41] <cheeser> jottinger: at all, really
[15:09:55] *** javahorn has joined ##java
[15:09:58] <cheeser> ilyak: yeah. so blame hibernate because you can't follow the rules.
[15:10:00] <cheeser> awesome.
[15:10:09] <ilyak> cheeser: Rules like?
[15:10:17] <cheeser> like using Session
[15:10:22] <jottinger> cheeser: we've already had the "ilyak, you've never met an API you didn't abuse and then blame for the abuse" discussion
[15:10:28] <cheeser> jottinger: i saw that.
[15:10:31] <ilyak> Well, I'm using Session
[15:10:35] <cheeser> par for the course it looks like.
[15:10:40] <ilyak> I just don't re-use it, I use Session per request
[15:11:05] *** jdolan_ has joined ##java
[15:11:07] <ilyak> The problem is, request consists of a different activities, and also, request isn't transaction
[15:11:08] <cheeser> yes. that's typically what you should od.
[15:11:13] *** OsAC has quit IRC
[15:11:26] <Bollinger> Can I get some opinions please. How many people here have used BigDeciaml in real world applications and actually use BigDecimal.equals() for some useful comparison? (instead of compareTo)??
[15:11:27] <cheeser> so break it down into multiple transactions and don't use OSiV
[15:11:47] <mp> geronimo doesn't show ejb jndi names in default initialcontext, only when I connect to localhost:4201 they're there; why?
[15:11:53] <ilyak> Well, 99% requests are read-only
[15:12:16] <cheeser> so don't use a transaciton for those
[15:12:31] <ilyak> Does Hibernate have an immediate mode?
[15:12:44] <cheeser> anyway. i'm kona make some coffee.
[15:12:46] <ilyak> Where it executes statements as early as possible, not the opposite?
[15:13:04] *** ScottG489 has quit IRC
[15:13:04] *** blahjake has joined ##java
[15:14:54] *** Soliah has quit IRC
[15:16:42] <mitch0> anyone knows if commons-httpclient will call the HttpMethodRetryHandler if it encounters a 302 - Found (aka. redirect) response?
[15:17:06] <W_work> that seems like it would be really easy to test for
[15:17:06] *** javahorn has quit IRC
[15:17:14] *** UT2K3 has joined ##java
[15:17:30] <jottinger> ~tias
[15:17:31] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[15:18:22] *** durka42 has joined ##java
[15:18:28] *** pred2k5 has joined ##java
[15:18:38] *** javahorn has joined ##java
[15:18:41] <pred2k5> hi, what does this expression mean? ? qName : localName
[15:18:55] *** viperhr has joined ##java
[15:19:29] <mitch0> seems the default is to not follow redirects
[15:19:40] *** jivedude has quit IRC
[15:20:01] <cheeser> ~~ pred2k5 ternary operator
[15:20:01] <javabot> pred2k5, ternary is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op2.html
[15:20:33] *** buntfalke has quit IRC
[15:20:48] *** flb has quit IRC
[15:21:03] *** Exzu has quit IRC
[15:21:24] <pred2k5> ah ok thx
[15:22:53] *** Dopesmoker has quit IRC
[15:23:32] *** smoog has quit IRC
[15:23:37] <ilyak> In Hibernate, immediate execution isn't offered to you by default; and to get it, you will need to endure a lot of pain, and also mix some concerns
[15:23:41] *** jaggz- has joined ##java
[15:23:47] *** alek_b has joined ##java
[15:23:49] *** smoog has joined ##java
[15:24:02] <ilyak> I.e. your code that just manipulated entities now does some arcane flushing tricks of which it shouldn't really be aware
[15:24:02] *** sphenxes has quit IRC
[15:24:03] <jaggz-> Once I compile with javac file.java how do I get the .class files into a .jar?
[15:24:11] <ilyak> jaggz-: use jar
[15:24:12] <ilyak> man jar
[15:24:19] <l3ns> I am fairly new to gui/swing in java. I am interested to make a GUI just like with any messenger that first asks for user/pass then directs to a new GUI where a hello msg is displayed. I am using netbeans and was following the tutorial in sun.com
[15:24:27] <l3ns> jaggz: Use netbeans.
[15:24:35] *** ilyak has quit IRC
[15:24:37] <waz> no!!
[15:24:41] <waz> ~newbie ide
[15:24:41] <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.
[15:25:18] *** sphenxes has joined ##java
[15:25:35] <l3ns> waz: How is that effective?
[15:25:46] <waz> did you read?
[15:25:55] <l3ns> Okay..
[15:26:05] <waz> I think the factoid is damn clear
[15:26:10] *** zophy has joined ##java
[15:26:17] <waz> not sure I could improve on it's explanation
[15:26:23] <l3ns> But I have only a short time to learn the fundamentals :(
[15:26:32] <jaggz-> trying to just do this from commandline
[15:26:34] <waz> Shortcuts!
[15:26:35] *** fornwall has joined ##java
[15:26:37] <waz> yeah that's the key
[15:26:39] *** zophy has quit IRC
[15:26:40] <jaggz-> since I threw it in a Makefile
[15:26:58] *** rollins has joined ##java
[15:27:28] *** zophy has joined ##java
[15:28:09] *** fornwall has quit IRC
[15:28:10] *** Razec has joined ##java
[15:28:28] *** zophy has quit IRC
[15:28:33] <l3ns> waz: Can you recommend a basic tutorial on GUI/java swing that can help with my little project?..
[15:28:35] <jaggz-> so I did a jar cf file.jar *.class and when I run it with java file.jar I get an exception. :(
[15:28:58] <jaggz-> file.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
[15:29:02] *** zophy has joined ##java
[15:29:23] <dangertools> ~~ jaggz- gcj
[15:29:23] <javabot> jaggz-, 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
[15:29:34] <cheeser> ~debian--
[15:29:34] <javabot> debian has a karma level of -24, cheeser
[15:29:58] *** zophy has quit IRC
[15:30:11] <dangertools> jaggz-: besides that, look at 'java -help'
[15:30:15] *** arpu has quit IRC
[15:30:32] *** zophy has joined ##java
[15:30:34] *** ilyak has joined ##java
[15:30:53] *** Levia has joined ##java
[15:31:04] <waz> ~rbi
[15:31:04] <javabot> waz, reallybigindex is http://java.sun.com/docs/books/tutorial/reallybigindex.html
[15:31:14] <jaggz-> installing gcj. I tried java --cp . file.jar but it's the same result
[15:31:17] <waz> l3ns: so there and follow the swing track
[15:31:23] <waz> gcj is not java
[15:31:32] *** zophy has quit IRC
[15:31:37] <cheeser> and continued questions about problems with it here will get you kicked.
[15:31:51] <jaggz-> I didn't ask about gcj
[15:32:00] <dangertools> but you are using it
[15:32:02] <waz> you mentioned it, I commented on it
[15:32:06] *** zophy has joined ##java
[15:32:34] <jaggz-> are you reading that dangertools mentioned it? I was being polite, please don't scold me for it.
[15:32:48] <cheeser> 09:30 < jaggz-> file.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
[15:32:50] <jaggz-> I installed sun's java6
[15:32:52] <cheeser> you're using gcj
[15:33:03] <jaggz-> ohhh... I see. hmm.
[15:33:06] *** zophy has quit IRC
[15:33:07] <dangertools> ...
[15:33:18] <waz> ~shortcuts--
[15:33:18] <javabot> shortcuts has a karma level of -1, waz
[15:33:39] *** zophy has joined ##java
[15:33:40] <waz> dangertools: am I using it?
[15:33:46] <cheeser> time for another inflammatory blog post, i think.
[15:34:14] <dangertools> waz: hu? jaggz- is using it, and now stop talking about gcj! :)
[15:34:37] <waz> cheeser: topic?
[15:34:39] *** zophy has quit IRC
[15:34:44] <cheeser> waz: how it's time for gcj to die
[15:34:54] <waz> amen
[15:35:06] <cheeser> blog traffic is getting kinda low P^)=
[15:35:10] <waz> haha
[15:35:14] <waz> traffic?
[15:35:15] *** zophy has joined ##java
[15:35:18] <waz> I'm not sure I get any :P
[15:35:25] <cheeser> waz: it helps when you write stuff...
[15:35:26] <cheeser> 8^)=
[15:35:32] <waz> details details
[15:35:45] <cheeser> those help, too.
[15:35:49] <waz> actually a couple of the few entries I did get regular traffic :)
[15:35:52] <jaggz-> I didn't mean to use it. :) Now I'm running the java6 binary by hand: /usr/lib/jvm/java-6-sun-1.6.0.07/bin/java
[15:36:03] <waz> jaggz-: awesome
[15:36:10] <cheeser> jaggz-: look at alternatives for how to change your java setting.
[15:36:11] *** zophy has quit IRC
[15:36:41] <l3ns> by the way, does java allow us to write two GUIs in one class?
[15:36:44] *** zophy has joined ##java
[15:37:04] <dangertools> define GUI
[15:37:10] <wlfshmn> dddfdd
[15:37:15] <jaggz-> yeah.. I see the symlinks
[15:37:44] *** zophy has quit IRC
[15:37:46] <l3ns> graphical user interface....
[15:38:10] *** pschriner has joined ##java
[15:38:14] <W_work> l3ns, how do you quantify graphical user interfaces_
[15:38:21] *** zophy has joined ##java
[15:38:26] <W_work> a button is a GUI
[15:38:37] <l3ns> I mean like, I have a GUI to ask for user and pass. then when i hit the submit button, another gui appears and display the "hello" text on it..
[15:38:49] <Woot4Moo> you mean window?
[15:38:49] <W_work> and yes, you can have two buttons in one class, say a subclass of JFrame, so I guess the answer is yes
[15:38:51] *** hellask has joined ##java
[15:38:53] <hellask> http://www.textpresso.org/clustering-software/javadoc/libsvm/SVM_Problem.html
[15:39:02] <hellask> how do i set those fields?
[15:39:10] <jaggz-> still failing: http://bdh.voyager.com/j.html
[15:39:20] <l3ns> aaah yes, a window is the right term..
[15:39:21] *** zophy has quit IRC
[15:39:28] <waz> hellask objectname.i = foo
[15:39:55] *** zophy has joined ##java
[15:40:07] *** mp has left ##java
[15:40:24] <dangertools> jaggz-: i imagined that you would find -jar on your own when reading 'java -help'. did you _read_ it?
[15:40:47] <jaggz-> ah, different output now too, danger.. (switched java binaries)..
[15:40:53] <jaggz-> maybe it was in the old link too.
[15:41:04] *** TranceControl has quit IRC
[15:41:32] <dangertools> jaggz-: your manifest has to define a main-class btw
[15:41:55] <jaggz-> yeah, I'm reading on making a manifest now
[15:42:35] <l3ns> so is it possible the the action performed after I click the submit button will open a new window?
[15:42:36] <jaggz-> I'm not sure why he wouldn't have a manifest in here if it were necessary: http://www.falstad.com/circosc/
[15:42:52] <l3ns> that*
[15:43:33] <jaggz-> I made the directory META-INF/ but the default manifest isn't being made
[15:43:52] <dangertools> l3ns: why not? if you are able to open one window, opening a second one shouldn't be the problem
[15:44:05] <jaggz-> anyway, reading more
[15:44:24] *** TranceControl has joined ##java
[15:44:25] *** javahorn has quit IRC
[15:44:35] *** Frostix has joined ##java
[15:45:08] <jaggz-> need to symlink jar too probably
[15:45:26] *** siyb has joined ##java
[15:46:19] <l3ns> dangertools: So I have two windows A and B. First displayed is window A. then when I hit the submit button, window A disappears and window B appears. Still possible?..
[15:47:17] <dangertools> sure
[15:48:04] <waz> is you actually spend a little time learning swing it'll be very easy
[15:49:16] <jottinger> but... time!
[15:49:27] <waz> get an IDE!
[15:49:44] <jottinger> if I'm planning on spending a month writing and running Swing GUIs, spending 30 minutes to learn Swing is surely wasted
[15:49:50] <waz> you on efnet jottinger? bozo parade everywhere today
[15:49:52] <jottinger> I'd rather take eight hours doing a 15-minute assignment
[15:50:13] <jottinger> I'm on the wrong server for efnet
[15:50:22] <jottinger> looks like we should start applying chlorine liberally
[15:51:09] *** mohax has joined ##java
[15:51:10] <cheeser> done!
[15:51:19] <cheeser> blog entry posted.
[15:52:11] <l3ns> dangertools and waz: Thank you both. I will start reading the tutorial found in sun.com about swing.. I hope I am in the right direction..
[15:52:35] <waz> you are
[15:54:37] <jaggz-> Okay, I moved the .class files into a subdir (CircOsc/) then moved my Manifest.txt to META-INF/MANIFEST.MF and re-ran jar (now without the 'm' option). It says "added manifest" but java -jar circosc.jar still can't find the main class attribute. However, I put one line in the MANIFEST.MF file and it's probably wrong... Main-Class: CircOsc.CircOsc
[15:55:18] <jaggz-> I don't know what the "package" is supposed to be, but it seems the class would be CircOsc
[15:55:26] <cheeser> ~~ jaggz- packages
[15:55:26] <javabot> please see http://java.sun.com/tutorial/java/interpack/packages.html and some examples http://javafaq.mine.nu/lookup?254
[15:55:34] *** hoerup has quit IRC
[15:56:02] *** hellask has left ##java
[15:56:02] *** eidolon has left ##java
[15:56:10] *** teralaser has quit IRC
[15:56:25] <Bollinger> I need 2 volunteers, 1 using Intellij and another using eclipse. Could you create a simple bean TestBean add 1 BigDecimal field, then get the IDE to generate equals and hashcode, then post the results thanks
[15:56:36] <cheeser> why?
[15:56:53] *** romanb has quit IRC
[15:57:03] <jaggz-> thanks
[15:57:29] *** yellowtape has joined ##java
[15:57:30] <Bollinger> a discussion I'm having with someone regarding using .equals to compare BigDeciamal I think 99.99% of the time people want compareTo over equals
[15:57:33] <jottinger> what prevents you from doing this?
[15:57:46] <jottinger> equals() and compareTo don't do the same thing
[15:57:50] <cheeser> ~polls--
[15:57:50] <javabot> polls has a karma level of -1, cheeser
[15:57:51] <Bollinger> I know
[15:57:56] <jottinger> if you need compareTo, you should prefer it 100% of the time
[15:58:07] <jottinger> if you need equals(), you should prefer IT 100% of the time
[15:58:07] <mitch0> ;)
[15:58:13] <jottinger> it's not an argument that merits participation
[15:58:30] <jottinger> it's like two retards arguing over whether dr. pepper is flatter than a pancake
[15:58:37] <cheeser> it's not!
[15:58:38] <cheeser> 8^)=
[15:59:00] <Woot4Moo> it is!
[15:59:07] <jottinger> I say "42"
[15:59:25] <cheeser> and i say, refill please! *glug* *glug*
[15:59:26] <jottinger> so I obviously win. Unless someone uses triangle feathers.
[15:59:46] <yellowtape> Hi all. A quick possible silly question. I have downloaded a .java file which uses a .jar file. I've downloaded the required .jar file and now I need to "include this jar-file in your classpath". Any hints on how to do this? I'm running Linux.
[15:59:56] <jottinger> yellowtape: tutorial.
[15:59:58] <cheeser> ~classpath
[15:59:59] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html and http://mindprod.com/jgloss/classpath.html
[16:00:59] <jaggz-> hm.. he doesn't have a main() routine
[16:01:00] <gambler> Is there anyway in Java to listen on a Unix Socket or a TCP socket that wont respond to the network? (when iptables is unavailable to the programmer)
[16:01:03] *** wij32 has quit IRC
[16:01:35] <yellowtape> cheeser: Oooer, thanks
[16:01:41] <jaggz-> it's coded as an applet if that matters
[16:02:11] <jottinger> ~applet
[16:02:11] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog
[16:02:28] <dangertools> first gcj, then applets? ...
[16:02:49] <jaggz-> for those interested in physics (or just want to see some neat applets) check out http://www.falstad.com/mathphysics.html
[16:02:53] <jaggz-> oh, no applets here. great.
[16:02:56] <mitch0> gambler: you mean like listening on 127.0.0.1:8000?
[16:02:56] <jottinger> dangertools: it's been that kind of day.
[16:05:04] <gambler> mitch0, ye
[16:05:21] <jaggz-> I don't need this to be a web applet.. but his code is for one. I'm modifying the Circle membrane source (with his permission for use at a presentation at a local university)
[16:05:52] <mitch0> gambler: well, then bind to 127.0.0.1 :)
[16:06:04] <gambler> mitch0, that prevents external connections?
[16:06:12] <mitch0> normally yes
[16:06:13] <waz> hey!
[16:06:16] <waz> that's my ip
[16:06:21] <Woot4Moo> lawl
[16:06:26] <mitch0> unless you have some portforwarding or bouncer enabled
[16:06:36] <jaggz-> outside hosts shouldn't be able to connect to localhost under normal circumnstances
[16:06:45] <cheeser> s/normal/any/
[16:06:53] <jaggz-> s/any/sane/
[16:07:02] <gambler> hmmm ok
[16:07:07] <jottinger> an applet can't open ports
[16:07:24] <jaggz-> man.. why's this have to be so time-consuming.
[16:07:24] <jottinger> oh, sorry - combining a set of idiots into one conglomerate idiot
[16:07:31] <jaggz-> heh, jott
[16:07:37] <jaggz-> I'm a c coder mainly
[16:07:42] <jottinger> jaggz-: I don't care
[16:07:44] <waz> Windows may allow it
[16:07:45] <jaggz-> sorry for my javignorance
[16:07:53] <jottinger> you're merely one of many today
[16:07:58] <jaggz-> in a time crunch to get this presentation done
[16:08:01] <jottinger> I have no pity and do not care
[16:08:09] *** randoms has joined ##java
[16:08:18] <jaggz-> your poor heart
[16:08:23] <l3ns> Okay.. I just had a quick look at all the links on this tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
[16:08:37] <l3ns> but none provided me
[16:08:39] <cheeser> jottinger: it can if it's signed, duh.
[16:08:39] <cheeser> 8^)=
[16:08:45] <l3ns> with the action I am looking for...
[16:09:12] <randoms> hey. im trying to build a java wrapper around a exe file (service). and i want to redirect the external exe files output stream (which is my inputstream from that process) to stdout. how can this be done?
[16:09:22] <l3ns> that is, a window to appear as hitting the submit button...
[16:09:33] <cheeser> randoms: read from that process's stream and write it to standard out
[16:10:05] <l3ns> how can I do that in netbeans?..
[16:10:08] <jottinger> ~be jottinger
[16:10:08] <javabot> Everybody dies.
[16:10:15] <randoms> cheeser: trying too. System.setOut(process.getInputStream()) does not work ^^
[16:10:56] <cheeser> of course not.
[16:12:08] <randoms> so how should i do it?
[16:12:47] <cheeser> read from one. write to another.
[16:13:10] <cheeser> ~javadoc PipedOutputStream
[16:13:12] <javabot> cheeser: http://is.gd/iUQd [java.io.PipedOutputStream]
[16:13:13] <cheeser> that might help
[16:13:34] *** Varox has joined ##java
[16:14:27] *** koukos_ has joined ##java
[16:14:34] <koukos_> hi everyone
[16:14:45] <jaggz-> channel for java applets? his runs (at http://www.falstad.com/circosc/) but mine won't load (notinited)
[16:14:55] <jaggz-> although I unzip right from his .zip archive
[16:15:00] <koukos_> can I make a quick programming question for java.net ?
[16:15:07] <cheeser> for what?
[16:15:46] <koukos_> java.net.ServerSocket methods
[16:16:35] <koukos_> I have a server class that waits for a connection 'clientSocket = serverSocket.accept();'
[16:16:53] <koukos_> where clientsocket is a plain socket
[16:17:32] <koukos_> so I receive a message, and now I want to reply. How do I get the clientSocket's address to send the reply message back ?
[16:18:02] *** jasonpr has quit IRC
[16:19:40] *** MacFlecknoe_ has joined ##java
[16:20:01] *** snodnipper has joined ##java
[16:20:05] *** LordMetroid has joined ##Java
[16:20:06] <koukos_> any ideas ?
[16:20:45] <jottinger> ~javase
[16:20:45] <javabot> jottinger, I have no idea what javase is.
[16:20:52] <jottinger> ~api
[16:20:52] <javabot> jottinger, api is http://java.sun.com/javase/current/docs/api/index.html
[16:21:06] *** durka42 has quit IRC
[16:21:31] <randoms> thnx cheeser.
[16:23:11] *** TranceControl has quit IRC
[16:24:18] *** yclian has quit IRC
[16:25:37] *** yclian has joined ##java
[16:25:59] *** teralaser has joined ##java
[16:26:19] *** blankthemuffin has quit IRC
[16:26:31] *** lvh has quit IRC
[16:26:38] *** fairway has quit IRC
[16:29:18] *** blankthemuffin has joined ##java
[16:33:04] *** epalm has joined ##java
[16:33:42] *** AskHL has quit IRC
[16:37:09] *** blankthemuffin has quit IRC
[16:38:14] *** koukos_ has quit IRC
[16:39:15] *** ankylose has quit IRC
[16:39:17] *** romanb has joined ##java
[16:39:29] *** viperhr has quit IRC
[16:39:30] *** jaggz- has quit IRC
[16:39:54] *** Gracenotes has joined ##java
[16:40:10] *** blankthemuffin has joined ##java
[16:40:18] *** javahorn has joined ##java
[16:40:26] *** L-----D has quit IRC
[16:42:12] *** roots_ has joined ##java
[16:43:04] <l3ns> Okay I am now in frames :)
[16:43:12] *** alek_b has quit IRC
[16:44:15] *** chrismaster11 has joined ##java
[16:47:06] *** convivial has joined ##java
[16:52:15] *** deSilva has quit IRC
[16:52:37] *** unlord has joined ##java
[16:52:50] <unlord> hi
[16:53:20] <unlord> I am trying to run a linux command line conversion program form within Java using a ProcessBuilder.start().waitFor();
[16:53:28] <unlord> when I run it from the command line, everything works fine
[16:53:34] <unlord> however when I run it in Java it just hangs
[16:55:29] <kulhas> try make it in another language
[16:55:47] *** jmpf has joined ##java
[16:55:48] <Woot4Moo> python
[16:56:41] <unlord> I guess I could do that
[16:56:50] <unlord> I'd need to move my parsing code out of JAva
[16:57:02] <blahjake> unlord: does ps show the process has actually terminated while java is still hung?
[16:57:16] *** CaT_MaN has quit IRC
[16:57:21] <unlord> blahjake: yes
[16:57:32] <cheeser> unlord: try reading from the input streams and make sure you're getting output
[16:58:09] <unlord> I can do that
[16:58:32] <unlord> if it is printing output, do I need to read it all before it will tell me the stream is closed?
[16:58:43] <unlord> err, that the process is done?
[16:58:52] <unlord> maybe I filled a buffer or something
[16:58:57] *** eidolon has joined ##java
[16:59:05] *** UT2K3 has quit IRC
[16:59:09] <cheeser> exec/streams is odd...
[16:59:24] *** gdoko has quit IRC
[16:59:36] *** pred2k5 has quit IRC
[16:59:55] *** nihi|ist has joined ##java
[17:00:16] <roots_> unlord: do you fully read both stdout and stderr of the program ?
[17:00:32] <roots_> if you don't the program will be blocked by the os when buffers are full
[17:00:35] *** xabbuh has quit IRC
[17:01:02] <Sonderblade> when you unserialize java objects, the constructor and initialization code is not run, correct?
[17:01:17] *** nvictor has joined ##java
[17:01:51] <unlord> thats it
[17:02:12] <unlord> roots_: I moved my command into a script and piped output to /dev/null
[17:02:15] *** nvictor has left ##java
[17:02:29] <unlord> this is prefect now
[17:02:41] <unlord> except that its a hack, but whatever this is scientific computing :)
[17:02:47] <unlord> thanks for the help
[17:03:22] <cheeser> Sonderblade: i don't believe so but it depends on the serialization method
[17:03:27] *** notk0 has joined ##java
[17:03:43] *** surial has joined ##java
[17:03:49] *** thecarlhall has joined ##java
[17:03:54] <notk0> greetings friends
[17:04:21] *** mitch0 has quit IRC
[17:04:34] *** tsdh has quit IRC
[17:06:39] <Coder4> is it posible to get jave to reload a picture on a site, not just reload the hole site?
[17:06:53] <notk0> coder4: yes
[17:07:01] <Coder4> notk0, how?
[17:07:07] <notk0> coder4: idk
[17:07:14] <cheeser> Coder4: eh?
[17:07:31] <dmlloyd> one of those days I see
[17:07:44] *** sakyamuni has quit IRC
[17:08:09] <Coder4> i have an function there uploads a picture, and when its done, the popup have to close, and the picture on the site have to be reloaded :)
[17:08:28] <Coder4> notk0, idk?
[17:09:06] *** vhs-jon has quit IRC
[17:09:30] <Coder4> someone have an example of a code, og a clue ;)
[17:09:50] <notk0> coder4 idk=i dont know
[17:09:54] *** Resistance has quit IRC
[17:10:03] <Coder4> notk0, ahh :P
[17:12:09] *** LostMonarch has quit IRC
[17:12:27] *** randoms has quit IRC
[17:13:01] *** rlubke has joined ##java
[17:13:04] <jottinger> Coder4: how would JAVA be involved? It sounds like a javascript issue.
[17:13:32] <Coder4> jottinger, it is an javescript i need :)
[17:13:59] <Woot4Moo> coder are you using gwt by chance?
[17:14:24] <Coder4> Woot4Moo?
[17:14:26] <wlfshmn> have whomever fixed the naming of JS been located and suitable rewarded?
[17:14:30] <Woot4Moo> coder?!
[17:15:03] <cheeser> Coder4: this is a java channel not javascript
[17:15:40] <Coder4> cheeserm sorry :)
[17:15:55] <roots_> it should have been called browserscript
[17:16:11] <roots_> 10% less traffic #java channels
[17:22:46] *** looner{work has quit IRC
[17:24:00] *** crowbar has joined ##java
[17:25:57] *** MigoMipo has joined ##java
[17:26:24] *** jmpf has quit IRC
[17:27:59] *** Blaay has joined ##java
[17:30:07] *** ebil|work has joined ##java
[17:31:07] <ebil|work> I know that I can call runtime.exec from java to have the system execute a command. Is there a way though, to have java execute a new main command inside a SEPERATE jvm? (long story, basically I need to have each instance of my program run inside a seperate clean JVM)
[17:32:17] <roots_> jsr 121
[17:32:21] <roots_> but its not implemented
[17:32:31] <cheeser> ~jsr 121
[17:32:32] <javabot> 'JSR 121: Application Isolation API Specification' can be found at http://www.jcp.org/en/jsr/detail?id=121
[17:32:39] <cheeser> that's not quite the same thing, though.
[17:32:51] <roots_> i mean i reckon that would be the ideal thing to have
[17:32:51] *** javahorn has quit IRC
[17:33:12] <roots_> added some controlling api
[17:33:31] *** javahorn has joined ##java
[17:34:04] <ebil|work> roots_, ok, to get into the story :) we are doing parallel computation using various toolkits. the problem is all of them run the parallel 'work unit' in a jvm that gets reused. so all of our singletons and static variables are never reset (nor can they be as we are using a ton of jar files)
[17:34:21] <cheeser> ebil|work: to start, stop using singletons.
[17:34:37] <cheeser> but you can also start each work unit in a separate classloader
[17:34:47] <ebil|work> cheeser, not possible without rewriting everything from the ground up (and this includes code from other places where we don't have access to the code)
[17:34:54] <ebil|work> cheeser, ok, I had tried doing that...
[17:35:02] <cheeser> so use different classloaders
[17:35:05] <ebil|work> but kind of never got it working. is there a good guide to that?
[17:35:07] <ebil|work> rather
[17:35:13] <cheeser> ~classloaders
[17:35:13] <javabot> cheeser, I have no idea what classloaders is.
[17:35:15] <cheeser> ~classloader
[17:35:16] <javabot> cheeser, I have no idea what classloader is.
[17:35:19] <cheeser> javabot: you suck
[17:35:19] <ebil|work> where should I look so I can figure it out for my self
[17:35:19] <javabot> A tool is only as good as its user. Tool.
[17:35:22] <waz> ~dumb bot
[17:35:23] <javabot> stupid human
[17:35:28] <ebil|work> lol
[17:36:11] <Woot4Moo> 2 words cheeser?
[17:36:31] <ebil|work> now, will the class loader fix the issue of things not clearing out between executions of code? (i.e. is there a class UNloader?)
[17:36:45] <cheeser> Woot4Moo: what?
[17:36:56] <Woot4Moo> the class loader thing
[17:36:58] <roots_> in theory yes
[17:36:59] <Woot4Moo> that the bot was confused on
[17:37:01] *** nihi|ist has quit IRC
[17:37:08] <cheeser> ~class loader
[17:37:08] <javabot> cheeser, I have no idea what class loader is.
[17:37:09] *** javahorn has quit IRC
[17:37:11] <cheeser> nyet
[17:37:15] <Woot4Moo> meh
[17:37:17] *** nihi|ist has joined ##java
[17:37:23] <roots_> but in practise there is APIs that successfully work around the common sense of classlaoding
[17:37:36] *** [[thufir]] has joined ##java
[17:37:53] <roots_> eg things that load from other classloaders than the one that loaded them
[17:38:02] <cheeser> ~osgi
[17:38:02] <javabot> cheeser, 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
[17:38:10] <roots_> thread context class loader or just ones arbitrarily obtained
[17:38:27] <roots_> also with native libraries there is a show-stopper problem
[17:38:33] <roots_> OSGi comes to the rescue
[17:38:49] <roots_> though also not effortless and always applicable
[17:38:50] <ebil|work> roots_, an example we made was this: a static counter that counts up. you would expect it to count upwards as you increment then reset for the next 'run' of the parallel code. unfortunately in our case, it does not. but since we don't have access to all the source code, we can't fix that aspect of things. so we get a bunch of index errors :)
[17:38:52] *** javahorn has joined ##java
[17:39:02] *** cyth has joined ##java
[17:39:08] <cheeser> ebil|work: you begin to see the folly of statics
[17:39:11] <roots_> ebil: you could try what cheeser said though
[17:39:19] <roots_> just URLClassLoader will do
[17:39:33] *** dnmo has quit IRC
[17:39:35] <roots_> to launch the "main"
[17:39:54] <roots_> frankfurt am main is a german town where a lot of coding must be going on
[17:40:17] <ebil|work> cheeser, yep :) I do. but can't do anything about it (work and stuff) I'm appreciate all the insight, I'm going to go look at everything presented now Thanks again!
[17:40:34] * cheeser nods.
[17:40:41] <cheeser> good luck. sucks, i know.
[17:41:20] <cheeser> roots_: you'd think so but it turns out things are pretty static there.
[17:42:23] <ebil|work> so if I get this (for URLClassloader) since main is loaded by the URLClassloader, and the rest of things are loaded by the default classloader, when main is done, it drops out of scope and is deleted?
[17:42:32] <roots_> static fields are only static for the Class they belong to and Class can be reloaded
[17:42:45] <roots_> ebil: the deal is that classloaders are chained
[17:42:58] <roots_> if you load a class twice from different URLClassLoaders you get two static fields
[17:43:19] <ebil|work> Ahh. ok. so make a new URLClassloader each time I run the code?
[17:43:21] <ebil|work> cool
[17:43:45] <cheeser> yeah. and load your class with that CL...
[17:44:44] <ebil|work> does that follow down the tree of classes? (i.e. if class A uses B and I classload A with two seperate classloaders (and B has static variables) are there 2 different statics for B too?)
[17:45:55] *** woogley has joined ##java
[17:46:28] <roots_> Class identity is a compound made up of literal and classloader that loaded it
[17:46:55] <ebil|work> so class A uses the classloader that loaded A to load B?
[17:47:02] *** deepjoy has quit IRC
[17:48:21] *** KikiJiki has quit IRC
[17:48:22] *** javahorn has quit IRC
[17:48:37] *** jpcooper has joined ##java
[17:48:39] <jpcooper> hello
[17:48:52] <jpcooper> is there a sum method for integer arrays?
[17:49:02] <jottinger> yep.
[17:49:05] *** pgib has joined ##java
[17:49:14] <jpcooper> jottinger, could you tell me its name, please?
[17:49:16] <cheeser> a loop
[17:49:22] <jottinger> whatever you called it when you wrote it.
[17:49:24] *** epalm has left ##java
[17:49:32] <jpcooper> jottinger, that's bloody funny, isn't it?
[17:49:38] <jpcooper> ho ho ho
[17:49:42] *** javahorn has joined ##java
[17:49:53] <jottinger> I thought it was kinda obvious. Why the hell would you expect a generalized API to have a sum mechanism for an integer array in it?
[17:50:01] <jpcooper> clearly I am too stupid to write a summing function, and it is not the case that I would like to save the effort if it is already implemented
[17:50:10] <jpcooper> nooooo
[17:50:11] <jottinger> if you say so.
[17:50:12] <cheeser> there is no such method
[17:50:21] <jpcooper> it is also not the case at all that other languages do have summing functions for lists
[17:50:32] <jpcooper> cheeser, yeah, bloody long way to say that, eh?
[17:50:49] *** zophy has quit IRC
[17:51:02] *** spideryummy has joined ##java
[17:51:18] <cheeser> jpcooper: well, i thought "a loop" was shorter, actually, but that didn't seem to help.
[17:51:32] <jpcooper> in fact, "no" is shorter
[17:51:33] *** ldam has quit IRC
[17:51:42] <jpcooper> both more polite, and more helpful
[17:51:46] <cheeser> true.
[17:51:49] *** OpenSores has joined ##java
[17:51:55] <cheeser> well, don't bust my chops for jottinger's behavior.
[17:52:02] <OpenSores> can anyone recommend an IRC package?
[17:52:09] <cheeser> ~~ OpenSores igb
[17:52:09] <sproingie> a builtin reduce method would be nice. probably have to wait for closures for the syntax to not suck.
[17:52:09] <javabot> Is google broken?
[17:52:12] *** UK-sHaDoW has joined ##java
[17:52:35] *** arpu has joined ##java
[17:52:37] *** shadewind has quit IRC
[17:52:42] <ebil|work> jpcooper for(int ii=0,int jj=0;ii<list.length();ii++,jj+=list[ii]) would work? no? that's small and simple...
[17:52:58] <sproingie> i'm seein double
[17:53:02] <jpcooper> ebil|work, oh yes, I commend you greatly for your one-liner
[17:53:03] *** teralaser has quit IRC
[17:53:04] <cheeser> ii am too
[17:53:11] *** jpcooper has left ##java
[17:53:12] <jottinger> I was trying to go the extra mile.
[17:53:21] <ebil|work> cheeser, sorry, my coworker beat that into me
[17:53:53] <cheeser> ebil|work: your coworker is dduummbb
[17:53:54] <cheeser> 8^)=
[17:54:00] <ebil|work> LOL
[17:54:07] *** lami1984 has joined ##java
[17:54:14] <lami1984> hello
[17:54:28] <ebil|work> the worst code I ever had to go through though was in tsh.... all the variable names were simpsons characters
[17:54:34] <cheeser> awesome
[17:54:37] *** mitchnull has joined ##java
[17:54:50] *** TooAngel has joined ##java
[17:55:21] *** TooAngel has left ##java
[17:55:48] *** dpy has quit IRC
[17:55:57] *** schasi has joined ##java
[17:56:52] *** LordMetroid has quit IRC
[17:56:57] *** Coder4 has quit IRC
[17:57:22] *** javahorn has quit IRC
[17:57:50] *** push[EAX] has quit IRC
[17:57:55] *** javahorn has joined ##java
[17:58:36] *** ffgeek200 has joined ##java
[17:58:54] *** epalm has joined ##java
[17:59:05] *** spideryummy has left ##java
[17:59:21] *** Varox has quit IRC
[18:00:03] *** Sonderblade has quit IRC
[18:00:07] *** Ivellina has joined ##java
[18:00:52] *** UT2K3 has joined ##java
[18:04:18] *** KikiJiki has joined ##java
[18:04:19] *** lyy has quit IRC
[18:04:41] *** Sulis has quit IRC
[18:06:29] *** UT2K3 has quit IRC
[18:06:30] *** javahorn has quit IRC
[18:06:55] *** kavon has quit IRC
[18:07:15] *** shal3r has joined ##java
[18:07:51] *** javahorn has joined ##java
[18:08:01] *** jor has joined ##java
[18:08:11] *** srcerer has quit IRC
[18:08:47] *** shadewind has joined ##java
[18:09:24] *** lami1984 has quit IRC
[18:09:45] <letfunbegin> I want to supply empty arguments to a method with signature: getConstructor(Object... name) - I do this by calling getConstructor( (Object[]) null ) now I need to call a method with signature: newInstance(Class<?>... name) -- how do I do that without causing warnings?
[18:10:48] *** ldam has joined ##java
[18:10:57] *** pandora-- has joined ##java
[18:11:05] <shadewind> use an empty array?
[18:11:18] <shadewind> hmm...
[18:11:29] <shadewind> I'm not sure I'm following you on second thought
[18:12:02] *** Sulis has joined ##java
[18:12:25] <dmlloyd> just do: getConstructor()
[18:12:28] <dmlloyd> then newInstance()
[18:12:49] <dmlloyd> null is not the same as an empty array
[18:12:56] <dmlloyd> if you pass a null, you'll probably get an NPE
[18:12:58] <dmlloyd> letfunbegin: ^^^
[18:14:22] <letfunbegin> right, that gives me the same as I had before. but I still get the warning: "unchecked call to getConstructor(java.lang.Class<?>...) as a member of the raw type java.lang.Class"
[18:14:34] *** jaggz- has joined ##java
[18:14:36] <dmlloyd> letfunbegin: that has nothing to do with the varargs.
[18:14:56] <dmlloyd> letfunbegin: it's because you're using a variable of type "Class" rather than "Class<SomeType>" or "Class<?>" or whatever
[18:14:57] <jaggz-> ImageIO.write(dbimage, "png", outputfile); it can't find symbol at "write" ..
[18:15:11] <dmlloyd> ~~jaggz- javadoc ImageIO.write(*)
[18:15:18] <dmlloyd> javabot: hello?
[18:15:20] <javabot> http://i38.tinypic.com/25aopzn.jpg
[18:15:20] <javabot> jaggz-: http://is.gd/iVJ1 [javax.imageio.ImageIO.write(RenderedImage,String,File)]; http://is.gd/iVJ2 [javax.imageio.ImageIO.write(RenderedImage,String,ImageOutputStream)]; http://is.gd/iVJ4 [javax.imageio.ImageIO.write(RenderedImage,String,OutputStream)]
[18:15:32] <letfunbegin> oh right, I didn't realize that!
[18:15:47] <jaggz-> actually at the . .. hmm
[18:15:56] *** Woot4Moo has left ##java
[18:16:00] <dmlloyd> jaggz-: maybe it's an instance method, not a static method
[18:16:08] *** Woot4Moo has joined ##java
[18:16:15] *** wm4 has joined ##java
[18:16:18] <woogley> basically jaggz-, make sure the image you're writing is a RenderedImage
[18:16:21] <dmlloyd> or maybe not, I dunno
[18:16:23] <woogley> (BufferedImage is)
[18:16:30] <jaggz-> the source code samples invoke it the same way .. would I get a different error on the image type?
[18:16:42] <woogley> if you're writing just a java.awt.Image, it will not work
[18:16:49] <woogley> because it does not implement the RenderedImage interface
[18:16:54] <jaggz-> yeah, I have a Graphic object, and an Image object..
[18:17:06] <woogley> ok, BufferedImage bimg = (BufferedImage)img;
[18:17:13] <woogley> ImageIO.write(bimg, etc ..)
[18:17:16] <jaggz-> thanks
[18:17:19] <woogley> np
[18:17:22] <wm4> when javac compiles a synchronized(x){...}, it protects the exception handler (which contains the monitorexit) by itself... is there any official documentation for the why?
[18:17:37] *** pschriner has left ##java
[18:17:59] *** UT2K3 has joined ##java
[18:18:43] <jaggz-> hmm.. won't let me write to /tmp/saved.png ... this might be an applet question now though.
[18:18:50] <jaggz-> java.security.AccessControlException: access denied (java.io.FilePermission /tmp/saved.png delete)
[18:19:33] <jaggz-> otherwise, you took me a big step in the right direction :) I didn't know you could just cast like that without calling a member function to convert it or something
[18:19:54] <dmlloyd> well, from the security manager aspect, that answer is self-explanatory - your security policy doesn't let you do that
[18:20:10] <dmlloyd> how to set your applet security policy is one of those applet questions though :)
[18:21:04] *** tieTYT2 has joined ##java
[18:21:28] <jaggz-> yeah.. it'd be nice to provide some popup authorization window or something.. are those available or should I go some other route? (I could use this http post method for example)
[18:23:58] *** drbair_work has joined ##java
[18:24:09] <pgib> Grr
[18:24:24] <pgib> This JFileChooser's OK button never fires when clicked on Vista
[18:24:54] *** svm_invictvs has quit IRC
[18:25:14] *** b3nn3tt has joined ##java
[18:25:20] <jaggz-> wow.. now if that's not a scary program: http://www.wutka.com/hackingjava/ch8.htm .. using dd ibs=1 count=$CONTENT_LENGTH of=$QUERY_STRING 2>/dev/null
[18:25:44] *** dk_schrute has joined ##java
[18:26:23] <pgib> hah
[18:26:32] <pgib> I sure hope they can trust QUERY_STRING
[18:26:58] <jaggz-> I don't even see a warning on this page
[18:27:38] <jaggz-> okay, now I need to convert a Graphic/BufferedImage into bytes
[18:28:53] *** amnesiac has joined ##java
[18:29:46] *** Taube is now known as taube
[18:30:18] *** svm_invictvs has joined ##java
[18:31:00] *** tomisina has joined ##java
[18:32:49] <woogley> jaggz-: that "magical" casting only works in this case because BufferedImage is a direct subclass of Image
[18:32:56] <woogley> it isnt always that easy =)
[18:33:06] *** Akuma0n3 has joined ##java
[18:34:17] *** Varox has joined ##java
[18:34:58] *** Hates_ has quit IRC
[18:37:16] <wm4> this link even claims, that the VM specification contains an incorrect example for compiling synchronized blocks: http://weblog.ikvm.net/PermaLink.aspx?guid=3af9548e-4905-4557-8809-65a205ce2cd6
[18:38:09] *** LordMetroid has joined ##Java
[18:38:45] *** riotz has joined ##java
[18:39:30] *** Frostix has quit IRC
[18:42:04] <jaggz-> thanks :)
[18:42:31] *** UT2K3 has quit IRC
[18:43:18] *** bindaas has quit IRC
[18:43:41] <jaggz-> what about getting this PostPutFile.put() routine, from my new PostPutFile.java, to be accessible by my CircOsc.java ? I'm getting "Expected ')'" at PostPutFile("url", "test", (bytes)"hello");
[18:43:47] <jaggz-> right at "test"
[18:44:02] <jaggz-> These are java basics I guess... sigh.
[18:45:27] *** ankylose has joined ##java
[18:45:28] <woogley> "hello".getBytes()
[18:45:34] <woogley> dont bother casting it
[18:46:01] <woogley> as far as "test" goes.. i dont even know what PostPutFile is
[18:46:25] <jaggz-> there's just a routine in a new .java file.. I have two .java files in this project.
[18:46:50] *** jerkface03 has quit IRC
[18:46:54] <woogley> what is the signature of that
[18:47:06] <woogley> PostPutFile(String,String,byte[]) i assume?
[18:47:15] *** jerkface03 has joined ##java
[18:48:21] <jaggz-> ah, you figured it out. The first param is actually a URL
[18:48:33] <woogley> aha
[18:48:55] *** KikiJiki has quit IRC
[18:49:04] <jaggz-> reading about it now..
[18:50:44] <jaggz-> so much to learn
[18:51:15] <svm_invictvs> ugh
[18:51:25] <svm_invictvs> I hate how close() throws an IOException
[18:53:25] <deebo> hope java7 has syntactic sugar for do-nothing-try-catches :P
[18:53:36] <woogley> exceptions are good for you
[18:53:55] <woogley> they eventually increase your words-per-minute typing speed
[18:54:21] <deebo> like having a .close() in a finally{} block
[18:54:31] <dmlloyd> ~~ svm_invictvs resource management
[18:54:32] <javabot> proper resource management is easy to get right - see http://dmlloyd.blogspot.com/2008/07/proper-resource-management.html for more information.
[18:54:42] <dmlloyd> in particular, see the "safeClose()" method
[18:55:42] <roots_> deebo: like using() in c#
[18:56:18] <deebo> whats that then?
[18:56:28] <wm4> most stupid Java idiom ever: } catch (Throwable t) {t.printStackTrace();}
[18:56:32] *** KermitTheFragger has quit IRC
[18:56:39] <deebo> actually writing a paper on "java vs c#" for a uni thing :P
[18:56:45] *** schasi has quit IRC
[18:56:51] <surial> wm4: And yet e.g. eclipse auto-generate that very code snippet. I don't know why.
[18:56:54] <svm_invictvs> dmlloyd: I've got something like safeClose in my code. I think I call it forceClose()
[18:56:55] <svm_invictvs> or something
[18:57:15] <wm4> surial: lol... that has unintentional comedic value
[18:57:25] <surial> deebo: Odds are somewhat small, as, while closures have been delayed, they aren't really out of the picture either, and just about every resource management trick you could conceivably come up with is also easy to solve with closures.
[18:57:49] *** teralaser has joined ##java
[18:58:38] <dmlloyd> svm_invictvs: the important points are that sometimes you need to catch that IOException - like after a write operation - and that if you do need to safe close (and you're sure it's safe), the close method should log any exception thrown
[18:59:44] <surial> dmlloyd: .... log-and-ignore? By 'logging' it to System.err without printing either the type or the message of the exception?
[18:59:57] <dmlloyd> what?
[18:59:58] <wm4> a failing close() should be handled same like a failed write()
[19:00:06] <surial> I'm going to have to go with: catch ( Foo foo) { foo.printStackTrace(); } being stupid regardless of circumstance.
[19:00:14] <wm4> and the correct way to handle it is NOT to print a backtrace
[19:00:16] <dmlloyd> congratulations?
[19:00:26] <surial> wm4: But a failing close() on any read operation is basically impossible, similar to the UnsupportedEncodingEx on a getBytes("UTF-8");.
[19:00:30] <wm4> instead, you print the filename and the circumstances of the error... or so
[19:00:37] *** buntfalke has joined ##java
[19:00:44] <surial> and if it does occur, its perfectly legal to throw something like an AssertionError. Something is thoroughly fucked up if that happens.
[19:00:57] <dmlloyd> surial, logging is the right thing to do in the event that (a) whether or not a close fails does not affect the code path, and (b) you do not take any other action
[19:01:37] <dmlloyd> that way at least it's possible for someone to know that something happened. That information can be crucial to debugging a problem later on.
[19:01:39] <surial> dmlloyd: sure, but, then, code that up. And use Logger.getLogger("something relevant").log(Level.WARNING, "Can't close the file", e);
[19:01:44] <surial> not e.printStackTrace()
[19:01:47] <dmlloyd> sure, that's fine
[19:02:04] <surial> If eclipse generated that, it would be less dumb. I prefer generating 'throw new RuntimeException(e); //TODO This cannot stand.'
[19:02:05] <dmlloyd> e.printStackTrace() is good enough for the sake of illustration.
[19:02:17] <surial> It's also very bad, but its definitely far less evil than t.printStackTrace().
[19:02:24] <svm_invictvs> dmlloyd: Unless some idiot decidees to remove all appenders for htat class then you're shit out of luck
[19:02:38] * svm_invictvs grumbles and curses
[19:02:41] <dmlloyd> svm_invictvs: well, you've done all you can do in that case. at least it's not your fault
[19:02:58] *** wm4 has quit IRC
[19:03:20] <svm_invictvs> dmlloyd: Yeah...there's a catch(Exception){LOG.fatal(ex);} in this code somewhere.
[19:03:34] *** srcerer has joined ##java
[19:03:46] <surial> Is there a generic Error or RuntimeException in the core library that basically means: An exception that ought to have been handled wasn't?
[19:03:53] *** roots_ has quit IRC
[19:04:24] <dmlloyd> there's one that covers the case where a method threw a checked exception that wasn't declared
[19:04:34] <svm_invictvs> dmlloyd: And what's brilliant is that the log4j.xml file is devoid of any appenders for that class so I spent like 3 hours grepping through logs trying to figure out why the fuck something was mysteriously failing.
[19:04:36] <surial> I wonder if adding "java.lang.UnhandledCheckedException" (extends RuntimeException). would make sense. Because as much as the idea of checked exceptions is that you handle the fucking things, it just doesn't always happen. You can't force a programmer to enter something that has meaning to the context.
[19:04:37] <dmlloyd> that's about the limit of what the JVM considers "should have"
[19:04:53] <surial> dmlloyd: I don't thin kthat exists.
[19:05:09] <surial> dmlloyd: If a method that doesn't declare it throws a checked exception - that's the exception that is thrown. The JVM doesn't have checked exceptions at all.
[19:05:11] <svm_invictvs> of course it got reported to nagios with a message like, "Caught exception!"
[19:05:13] <dmlloyd> ~javadoc UndeclaredThrowableException
[19:05:14] <javabot> dmlloyd: http://is.gd/iW7y [java.lang.reflect.UndeclaredThrowableException]
[19:05:37] <dmlloyd> that covers proxys
[19:06:00] <surial> dmlloyd: That seems to be related to creating a proxy where the interface you're building does NOT declare a certain checked exception that hte thing oyu're trying to roll a proxy for does.
[19:06:04] <dmlloyd> ~javadoc CoderMalfunctionError
[19:06:05] <dmlloyd> haw haw
[19:06:09] <javabot> dmlloyd: http://is.gd/iW81 [java.nio.charset.CoderMalfunctionError]
[19:06:11] <dmlloyd> that's a great name
[19:06:24] <surial> ... I thought you were joking.
[19:06:29] <surial> But, you've sold me on this.
[19:06:49] <svm_invictvs> dmlloyd: That gets thrown when the coder is an idiot.
[19:06:55] <surial> Just for the lolz, eclipse should auto-generate throw new CoderMalfunctionError("For some reason the coder forgot this could happen. Sucks to be you.", e);
[19:07:40] <svm_invictvs> I still think IllegalAccessException should be renamed to TouchingPrivatesException
[19:08:17] <svm_invictvs> ~darwin
[19:08:17] <javabot> svm_invictvs, I have no idea what darwin is.
[19:08:24] *** teralaser_ has joined ##java
[19:08:38] *** phyburn has joined ##java
[19:09:07] <svm_invictvs> hadooooop
[19:09:45] *** kane77 has joined ##java
[19:10:32] *** teralaser_ has quit IRC
[19:11:01] *** teralaser_ has joined ##java
[19:13:06] *** woogley has quit IRC
[19:13:37] *** korney has joined ##java
[19:13:44] <korney> anyone recommend a comprehensive stats library?
[19:14:00] *** staykov has joined ##java
[19:14:30] *** riotz has quit IRC
[19:16:46] <jaggz-> what's wrong with this? ImageIO.write( (BufferedImage)dbimage, "png", imageBytes.toByteArray() );
[19:17:09] <jaggz-> it can't find the write() symbol (method), which is supposed to be: write(java.awt.image.BufferedImage,java.lang.String,byte[])
[19:17:32] <dmlloyd> ~~ jaggz- show us
[19:17:32] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[19:17:34] <jaggz-> Image dbimage;
[19:18:34] *** drbair_work has left ##java
[19:18:47] <jaggz-> http://miral.voyager.com/j.txt line 912
[19:19:11] <dmlloyd> can't connect. try a regular pastebin
[19:19:14] <dmlloyd> ~~ jaggz- pastebin
[19:19:14] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[19:19:38] *** justafish has quit IRC
[19:20:18] <jaggz-> okay, I added the errors at the top. sorry about the URL being inaccessible, one moment.
[19:20:35] *** ffgeek200b has joined ##java
[19:20:47] *** yclian has quit IRC
[19:20:57] <dmlloyd> how about just using a regular pastebin :)
[19:21:29] *** Luminari has joined ##java
[19:21:48] <jaggz-> http://rifers.org/paste/show/8758
[19:21:59] <ffgeek200b> I'm trying to use regex to capture " xyz (a,b,c,d )" into "xyz" and "a,b,c,d". But my pattern isn't working for some reason, any clue as to why? The pattern is "\\s*(\\S+)\\(([^\\)]*)\\)\\s*"
[19:22:08] *** teralaser has quit IRC
[19:22:22] <Luminari> anyone see why the inner loop in the follow never runs? I had it print out the values and the parentId and Id are the same: http://pastebin.com/d1282c14
[19:22:24] <jaggz-> why the double quotes? use single quotes.. is this at shell?
[19:22:35] *** go|dfish has quit IRC
[19:22:39] *** Inhuman has joined ##java
[19:22:43] <jaggz-> or in java?
[19:22:46] <ffgeek200b> java
[19:23:06] <jaggz-> () is not magic I assume
[19:23:11] *** tieTYT has quit IRC
[19:23:15] *** tieTYT2 has quit IRC
[19:23:22] *** yclian has joined ##java
[19:23:26] *** tieTYT2 has joined ##java
[19:23:26] *** valcker has quit IRC
[19:23:42] <ffgeek200b> not sure what you mean by magic.. I was trying to capture all non )'s after the first (
[19:23:58] *** Adrien_C has joined ##java
[19:23:59] <jaggz-> it looks like it will work.. you're not asking for the space after the d by the way .. it'll be included as "a,b,c,d "
[19:24:08] <Adrien_C> hi
[19:24:44] *** LouisJB1 has joined ##java
[19:24:51] <ffgeek200b> jaggz-, good catch, I will just split the string and trim each element to get those
[19:24:53] <LouisJB1> hi
[19:25:16] <coalado> has anybody ever tried java.net.Proxy with https proxies?
[19:25:18] *** nashra has joined ##java
[19:25:25] <jaggz-> I'm not familiar with java's regex's.. there could be other issues, like maybe + must be escaped...
[19:25:27] <LouisJB1> anyone know if I can launch java 6 lightweight http server from ant task to perform some testing (of an applet)
[19:26:06] <nashra> i'm having a hard time with the maven documents online - can anyone tell me in simple terms how i can include a dependency in my project that is located on a non-central repository?
[19:26:18] <nashra> or knows of a good resource for explaining
[19:26:23] <jaggz-> unix regex(7), I believe, accepts * as magic (0 or more), but + is not magic (it's just a char like any other), while \+ must be used for 1 or more matches
[19:26:25] <ffgeek200b> jaggz-, hmm I'm not so familiar w/ java regex but I'll just mess around with it until it works, but you're right that it should work
[19:26:55] <ffgeek200b> really? i didnt know that, i assumed + was magic hrmm
[19:27:03] *** kulhas has quit IRC
[19:27:19] <ffgeek200b> http://java.sun.com/developer/technicalArticles/releases/1.4regex/ shows that + is magic
[19:27:22] <jaggz-> yeah, it is.. reading it here
[19:27:28] <svm_invictvs> ~FileNotFoundException
[19:27:28] <javabot> svm_invictvs, I have no idea what FileNotFoundException is.
[19:27:53] *** ubunturos has joined ##java
[19:28:44] <jaggz-> it looks like it should work.. do you need the last \\s*?
[19:29:01] <jaggz-> (it might matter if you had a $ after it)
[19:29:26] *** Woot4Moo has quit IRC
[19:29:33] <jaggz-> oh, you don't have a space between the groups
[19:29:38] <ffgeek200b> jaggz-, hrmm i will try those
[19:29:47] <jaggz-> you need to allow for the whitespace between xyz and (a,b,c,d )
[19:30:26] *** malax has quit IRC
[19:30:28] <ffgeek200b> jaggz-, that did it, thanks
[19:30:37] <jaggz-> :)
[19:30:52] <ffgeek200b> niice I'm not crazy
[19:31:34] <jaggz-> regex's can do that
[19:32:01] *** imohax has joined ##java
[19:32:40] *** Luminari has left ##java
[19:33:01] *** squi has joined ##java
[19:33:50] *** notk0 has quit IRC
[19:34:29] <coalado> There is no Proxy.Type.HTTPS
[19:35:47] *** magcius has quit IRC
[19:35:50] <ldam> How i hate vista. Anyone knows why a file.renameTo() fails? I have got a directory full of about 200 files; scanning them and renaming them works for 1-3 files pr. scan. I.e. first scan renames 1-3 files; second scan (on the same directory) renames a few more, and after about 10 scans, only 20 files has been renamed, and the rest will never be renamed?
[19:36:06] *** magcius has joined ##java
[19:37:51] *** firen has quit IRC
[19:37:58] *** clows has quit IRC
[19:38:06] *** Helios has quit IRC
[19:39:35] *** r0bby has quit IRC
[19:40:51] <juanez> ldam: sure it's Vistas fault?
[19:41:10] <ldam> juanez, no; trying to simplify
[19:41:19] *** agnul has quit IRC
[19:41:33] *** firen has joined ##java
[19:42:48] *** Helios has joined ##java
[19:44:35] <jaggz-> I give up for now :(
[19:44:38] <jaggz-> have to nap
[19:44:40] * jaggz- &
[19:45:35] <ldam> Never mind; i stupid. i was reading the files during the scan, and forgot to close them...
[19:45:46] <ldam> i not type good also
[19:46:05] *** picca has joined ##java
[19:47:25] *** thorat has joined ##java
[19:49:03] *** mohax has quit IRC
[19:52:26] <surial> ldam: for future reference: Starting with java7 (you can download beta right now in fact) there will be a new file API which gives more useful information for failures of stuff that currently just returns a boolean, like mkdir and renameTo.
[19:52:43] *** redrebel has joined ##java
[19:52:58] <DragonLord-> jottinger the port was not in use, you just need to run with sudo when port <= 1024
[19:53:45] *** dmlloyd_ has joined ##java
[19:54:49] <svm_invictvs> Is there a perticular error type that's appropriate to throw when a critical resource is missing?
[19:55:00] <svm_invictvs> (eg. a properties file that should be packaged in with the jar)
[19:55:24] <ldam> surial, sounds great; but being on the edge right now is not an option for me :/
[19:56:14] *** Razec has quit IRC
[19:57:51] *** sombriks has joined ##java
[20:01:37] *** zachscrivena has joined ##java
[20:01:42] *** zachscrivena has left ##java
[20:02:29] *** shal3r has quit IRC
[20:03:26] <jottinger> DragonLord-: that's... good news?
[20:03:32] <jottinger> unexpected? I have no idea.
[20:04:03] *** javahorn has quit IRC
[20:04:51] <jottinger> DragonLord-: more to the point: "duh." Welcome to ports on any decent OS.
[20:05:49] <DragonLord-> =)
[20:06:51] <svm_invictvs> so....
[20:07:00] <svm_invictvs> Should Interfaces be preceeded with "I" to designate they'r einterfaces?
[20:07:03] <svm_invictvs> Or shouldn't it matter?
[20:07:28] *** indeterminatus has joined ##java
[20:07:40] <jottinger> it doesn't matter.
[20:07:55] <jottinger> if your development environment wants the I, use the I.
[20:07:59] <svm_invictvs> grumble
[20:08:01] * svm_invictvs hates the I
[20:08:07] <jottinger> Personally, I don't think something is an IThing; I think it's a Thing.
[20:08:08] <eidolon> like IPerson ?
[20:08:15] <eidolon> i've seen Person and PersonImpl
[20:08:19] <jottinger> Specialization would be PersonHuman
[20:08:21] <svm_invictvs> Yeah, that's what the idea was...
[20:08:30] <svm_invictvs> "If you use I you don't hav eot use Impl"
[20:08:34] <jottinger> or org.myplace.mammal.Person
[20:08:45] <svm_invictvs> And I was like, "If you name your classes right it doesn't matter."
[20:08:46] *** staykov has quit IRC
[20:08:49] *** dmlloyd has quit IRC
[20:08:51] <jottinger> (implements org.model.Person)
[20:09:23] <eidolon> tricky
[20:09:52] * jottinger hates PersonImpl and OpenSpacesPersonImpl
[20:10:27] <surial> If you create an interface just so you have a Foo and a FooImpl, why is there an interface to begin with?
[20:10:48] <jottinger> surial: because you can replace PersonImpl with a different specialization without changing the original contract.
[20:11:00] <surial> Which is premature optimization.
[20:11:14] <surial> and, also, by the time there IS a different specialization, the name "PersonImpl" would probably look ridiculous.
[20:11:53] <surial> Just use a class, and when you do run into a good reason to have 2 implementations, use a refactor tool to extract an interface, do some renaming, and, yes, fix code that refers to it. future API compatibility isn't a holy grail.
[20:12:02] <jottinger> no, it's not premature optimization.
[20:12:19] <mattis> How can I read a file from a webserver that is in gz format?
[20:12:31] <cheeser> doesn't spring choke on concrete class as bean types?
[20:12:40] <surial> Use URI.getURL().getConnection().getINputStream(), and then run that input stream through GZipInputStream.
[20:12:43] <cheeser> mattis: download it. open it.
[20:12:43] <surial> mattis: That was meant for you.
[20:12:56] <cheeser> ~be thinking barbie
[20:12:56] <javabot> cheeser, I have no idea what be thinking barbie is.
[20:13:01] <cheeser> ~barbie thinking
[20:13:01] <javabot> <barbie>thinking is hard!</barbie>
[20:13:02] <cheeser> 8^)=
[20:13:05] <mattis> surial: thanks!
[20:13:24] <surial> mattis: Those are all part of the core libraries, no need to go hunt for a GZipInputStream. At least...
[20:13:27] <surial> ~javadoc GZipInputStream
[20:13:33] <javabot> surial: http://is.gd/iWDf [java.util.zip.GZIPInputStream]
[20:13:34] <surial> joy.
[20:13:43] *** domevlo has joined ##java
[20:13:56] <surial> jottinger: ...and, also, by the time there IS a different specialization, the name "PersonImpl" would probably look ridiculous.
[20:14:10] <cheeser> you said that already.
[20:14:12] <mattis> surial: I have tried doing it with gzip input stream, but I was doing it a bit backwards
[20:15:23] <ffgeek200b> I have an embedded class B within A. Does it matter if, in class B, I do synchronized(A.this) vs synchronized(this)? I'm pretty sure it's the same thing.
[20:15:35] <jottinger> surial: I don't use... PersonImpl
[20:15:41] <surial> ffgeek200: It's not the same thing.
[20:16:06] <surial> jottinger: If you can come up with a meaningful name for both the interface and the only implementation, that tends to be a decent sign that its a sensible early split.
[20:16:09] <ffgeek200b> surial, so the synchronization would be different? I thought they were the same object?
[20:16:18] <surial> no.
[20:16:28] <surial> obviously, inside B, synchronized(this) would be referring to the B instance.
[20:16:40] <surial> whereas outside of the B embedded class, 'this' refers to the A instance.
[20:17:06] <ffgeek200> Ahh, true, they are separate instances
[20:17:09] <jottinger> surial: I use foo.model.EntityName and foo.model.specificity.EntityName
[20:17:17] <surial> ffgeek200b: Is the embedded class marked 'static'?
[20:17:23] <ffgeek200b> surial, no
[20:17:37] <surial> jottinger: Without any further context that sounds like a bad idea, but, then, there is plenty of context where that would make sense.
[20:18:00] <surial> ffgeek200b: Then your embedded instances of B have an invisible "private final A parent;" field.
[20:18:04] <jottinger> surial: indeed. I've found it works for *me*. For customers/clients/environments where it does not make sense, I use something different. Go figure. :)
[20:18:05] *** domevlo has left ##java
[20:18:09] *** MigoMipo has quit IRC
[20:18:21] *** waz has quit IRC
[20:18:39] <surial> ffgeek200b: You can access this secret field with "A.this", and any references you make that are unqualified (nothing before the .) that do not resolve to anything meaningful in B, are automatically checked in the context of "A.this.whateverYouTyped". That's all you need to know about embedded classes.
[20:19:00] <ffgeek200b> surial, got it, thanks
[20:19:35] *** DeadEd_ is now known as DeadEd
[20:20:22] <surial> ffgeek200b: It gets funnier when you try to create a new B instance when you're not in the context of an A instance. Then you get: someInstanceoFA.new B(). Or new someInstanceofA.B()...
[20:20:25] <surial> some crazy syntax.
[20:21:10] <ffgeek200b> surial: yes I have had to use that syntax in the past, although it didn't quite click until now. I figured it was just some sorta closure and didnt think much of it other than it was kinda nasty.
[20:21:15] *** rgravener has left ##java
[20:21:37] <surial> If the embedded class does not need a reference to an instance of the parent, then use 'static'. like so: public static class MyEmbeddedClass {}
[20:21:58] <surial> then there is no "A.this", and you don't need an instance of A to construct a new MyEmbeddedClass. you can just go new MyOuterClass.MyEmbeddedClass().
[20:22:16] <ffgeek200b> surial: ah, nice
[20:23:04] <cheeser> and if you find yourself doing that, MyEmbeddedClass should probably be its own class
[20:23:11] <ffgeek200b> ok I think I understand 95% of Java now, although I'm probably wrong.
[20:23:19] <ffgeek200b> cheeser: agreed
[20:23:35] *** vix85 has joined ##java
[20:23:55] <ffgeek200b> although you might wanna do private static class if you're being lazy
[20:24:10] *** Adrien_C has quit IRC
[20:24:18] <cheeser> but then we wouldn't be talking about new MyOuterClass.MyEmbeddedClass()
[20:24:32] <ffgeek200b> true
[20:24:49] *** marvs has joined ##java
[20:25:12] <ffgeek200b> I am guilty of creating embedded classes where a private static class is better, now that I understand I'll make those changes
[20:25:24] *** waz has joined ##java
[20:25:38] <ffgeek200b> I don't think I'll ever understand Enum's.
[20:25:55] <waz> change careers
[20:26:02] <cheeser> enums are awesome
[20:26:28] <surial> cheeser: When I have a simple hook (like a listener) interface that really wouldn't make sense anywhere except for a certain widget or other event-slinging class, I just put the hook interface inside the event-emitting class and give it a very simple name.
[20:27:04] *** ubunturos has left ##java
[20:27:08] *** prgrmr has quit IRC
[20:27:12] <ffgeek200b> I use them, and I thought I understood enums, then I skimmed over http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html, i'll learn it in time
[20:27:23] <cheeser> surial: ok. but that doesn't contradict my assertion, though...
[20:27:59] <surial> cheeser: No. Just naming an exceptional case where static inners make sense.
[20:28:04] *** odinsbane has joined ##java
[20:28:36] <dmlloyd_> I like to use static nested classes in some cases like this: http://is.gd/iWIZ
[20:28:42] *** Yustme has joined ##java
[20:28:49] <dmlloyd_> very tiny classes which are trivial implementations of some interface
[20:29:18] *** OpenSores has quit IRC
[20:29:56] *** slonkko has joined ##java
[20:30:02] <cheeser> dmlloyd_: right. but those are private.
[20:30:17] <cheeser> i'm not opposed to that. i'm saying that public static nested classes should probably be top level classes.
[20:30:27] <odinsbane> I'm trying to use threads with multiple processors. I have an Arraylist and each thread neads to access the array list, should I make a copy of it?
[20:30:29] <slonkko> what is best way to make 10 keys -> values types, call it with function and unpack them in for loop?
[20:30:35] <dmlloyd_> ah. Yeah, that usually makes sense.
[20:30:54] *** dmlloyd_ is now known as dmlloyd
[20:31:05] <odinsbane> slonkko: have you checked a hashmap?
[20:31:21] *** coalado1 has joined ##java
[20:31:56] <slonkko> odinsbane not yet, but i will now :)
[20:32:38] *** vesz has quit IRC
[20:32:53] <ffgeek200b> odinsbane: you can either do a synchronized() around the code that accesses the array, you can copy it in the synchronize block and use the copy outside of the synchronize block for speed reasons
[20:33:15] *** DCPom has quit IRC
[20:33:16] <ffgeek200b> odinsbane: you can use a read/write lock
[20:34:00] *** ramdam has quit IRC
[20:34:23] <dmlloyd> ~~ odinsbane jcip
[20:34:23] <javabot> odinsbane, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[20:34:44] *** ballmenace has joined ##java
[20:34:59] <odinsbane> ffgeek200b: I'm not sure where to put the synchronized(), really mind who modifies the array first, but I want the code to speed up.
[20:35:17] <dmlloyd> odinsbane, then you *definitely* should read that book before messing with threads
[20:35:20] <ballmenace> Anyone have any experience with good flatfile parsing libraries? The data I need parsed consist of a fairly long header (75 lines), then the actual data. I need both the header data, and the actual recorded data. I've looked at flatpack and flat file parsing (ffp), are they any good?
[20:36:44] <cheeser> try them and see if they meet your needs
[20:36:50] *** prgrmr has joined ##java
[20:36:53] *** Resistance has joined ##java
[20:36:56] *** yobo2 has joined ##java
[20:36:57] <ffgeek200b> odinsbane: yeah, it has taken me 10 years doing threading in C, C++, and now java. One tip: it's all about protecting shared state. Your question is pretty basic. For now do synchronized(this){//code} where code is the code that accesses your array, but you need to read more, you're going to creat problems
[20:37:17] <ffgeek200b> you need to start with a good threading book
[20:37:31] <cheeser> ~jcip
[20:37:31] <javabot> cheeser, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[20:37:40] *** prgrmr has quit IRC
[20:37:47] <cheeser> from what I can tell, using synchronized is the current "best practice" in java.
[20:38:11] <cheeser> though what's "best practice" depends on the speaker and what he's selling
[20:38:12] <cheeser> 8^)=
[20:38:22] *** DCPom has joined ##java
[20:38:34] <ballmenace> I guess what I'm really wondering, is if there is a flat file parsing library that has become somewhat of a standard in java. Except pure regexp..
[20:38:37] <sproingie> public static synchronized void main(String [] args) { ...
[20:38:54] <sproingie> there we go. nice and thread safe
[20:38:57] <cheeser> ballmenace: no
[20:39:03] <cheeser> ~smack sproingie
[20:39:03] <javabot> smacks sproingie in the mouth
[20:39:10] * sproingie ow
[20:39:22] <ffgeek200b> yeah, I laugh at how java makes it so easy, just put synchronized around everything and it magically works. I'm not fond of the synchronized keyword for methods, people think they can slap synchronzied there and java takes care of the rest
[20:39:30] <cheeser> i'll give you the benefit of the doubt and say that was just a bad joke.
[20:39:36] <sproingie> yes of course
[20:39:41] <cheeser> ffgeek200b: if only it were that easy.
[20:40:04] <sproingie> over-synchronizing is perhaps better than under-synchronizing
[20:40:14] <odinsbane> ffgeek200b: thats what I did, and it works, I am using multiple processors.
[20:40:17] * cheeser introduces sproingie to deadlock
[20:40:23] <odinsbane> To do the job slower
[20:40:29] <sproingie> 'course not if your app grinds to a halt and they say "java is teh slowness, rewrite it in C++!"
[20:40:35] <ffgeek200b> sproingie: yep, that's why i recommend it when starting out
[20:40:52] <cheeser> ~~ ffgeek200b jcip
[20:40:52] <javabot> ffgeek200b, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[20:40:57] *** ldam has quit IRC
[20:41:00] <cheeser> read that and save yourself some heartburn
[20:41:08] <sproingie> failing to deadlock > failing to data corruption
[20:41:35] *** sombriks has quit IRC
[20:41:55] *** sombriks has joined ##java
[20:42:03] <ffgeek200b> cheeser: eh i could probably write a book on concurrency by now although I'm open to any new techniques. But multithreading has been the same for decades
[20:42:09] *** funktor has joined ##java
[20:42:15] *** bolt has quit IRC
[20:42:17] *** Blaay is now known as irc
[20:42:23] *** irc is now known as Blaay
[20:42:43] * cheeser blinks and moves on
[20:43:24] <_W_> Anyone know of an implementation of an autodetecting CharsetDecoder?
[20:43:45] *** ovnicraft has joined ##java
[20:43:53] *** ovnicraft has left ##java
[20:44:25] *** ldam has joined ##java
[20:44:55] *** prgrmr has joined ##java
[20:46:39] *** NielsD has joined ##java
[20:47:53] *** coalado has quit IRC
[20:52:37] <gionny> _W_: I don't have idea, but I was thinking if maybe the jEdit source can have it somewhere... jEdit is open source
[20:52:40] <svm_invictvs> _W_: You could try the not so elegant method of keep trying until you find one that works :(
[20:53:03] <gionny> svm_invictvs: define "it works" ...
[20:53:09] <gionny> I mean... every charset just works
[20:53:20] <svm_invictvs> gionny: exactly...
[20:53:23] <gionny> it is just that you read some character in a way that it is not supposed to be
[20:53:30] <svm_invictvs> gionny: that would fall under the "not so elegant" category
[20:53:36] <gionny> if you pick the wrong one
[20:53:36] <_W_> svm_invictvs, thanks, but the algorithm isn't the problem
[20:53:37] <svm_invictvs> oh and..
[20:53:42] <svm_invictvs> ~~ _W_ anyone
[20:53:42] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[20:53:44] <svm_invictvs> :-P
[20:53:57] <_W_> ~~svm_invictvs abuse
[20:53:58] <javabot> Don't abuse me.
[20:53:59] <svm_invictvs> _W_: I seem to remember having this problem.
[20:54:00] <svm_invictvs> lol
[20:54:24] <_W_> I was just asking if there already exists a provider for such an implementation, before I went and wrote my own
[20:54:48] <gionny> _W_: but how can you do that? I mean... how can you tell that a charset is "correct"?
[20:54:59] <svm_invictvs> _W_: I dont' seem to recall there being one.
[20:55:00] <gionny> you can read a file using whatever charset you want and you will never get an error doing it
[20:55:47] <svm_invictvs> gionny: scan the chars in the file and if a signnificant number of them come up as unprintable I think it may be safe to say the encoding is incorrect.
[20:56:12] <_W_> gionny, an autodetecting charsetdecoder gives no guarantee of correctness
[20:56:17] <gionny> svm_invictvs: ok, that could work... but it is not an "exact" method
[20:56:20] <gionny> _W_: ah, ok!
[20:56:38] <gionny> now this sounds reasonable
[20:56:39] <svm_invictvs> gionny: WHever you do it's going to be a "best guess" sort of algorithm.
[20:56:59] <gionny> ok... this can work
[20:57:03] <svm_invictvs> Actually, the class CharsetDecoder has a callback it looks like..."onUnmappableCharacter"
[20:57:25] <gionny> but sometimes it is very difficult
[20:57:42] *** TommyTheKid has joined ##java
[20:57:46] *** vinse has quit IRC
[20:57:46] <svm_invictvs> I don't know a threashold is pretty simple.
[20:58:03] <gionny> for example, if you write in english, both the Western Latin charset and the UTF-8 will display characters correctly
[20:58:05] <svm_invictvs> gionny: It depends on the use case.
[20:58:18] <gionny> or at least, most of the characters
[20:58:26] <svm_invictvs> gionny: So will any other language.
[20:58:30] <svm_invictvs> In UTF8
[20:58:32] *** elementz has joined ##java
[20:58:34] <gionny> svm_invictvs: not italian (I am italian)
[20:58:44] <gionny> svm_invictvs: the characters è, à .... etc
[20:58:59] <svm_invictvs> gionny: Then your encoder/decoder is broken.
[20:58:59] <gionny> are very used and they are different in Western Latin charset and in UTF8
[20:59:24] <gionny> svm_invictvs: I mean... of course you can read it well if you write them as UTF8 and read them as UTF8
[20:59:36] *** squi has quit IRC
[20:59:57] <gionny> svm_invictvs: but if you write them as Western Latin (ISO-I don't remember what) and you then read it as UTF-8, all this è, à, etc. are not display correct
[21:00:10] <svm_invictvs> gionny: Then it's not encoded correctly.
[21:00:20] *** Junior has joined ##java
[21:00:43] <TommyTheKid> does jvisualvm work in zones? Its giving me an error dialog with no text when I try to enable the CPU profiler
[21:00:44] <gionny> svm_invictvs: no, it is normal that it works this way, Western Latin and UTF-8 are different charset enchodings
[21:00:51] <svm_invictvs> Yeah
[21:01:32] <svm_invictvs> So if you write a bunch of ACSII characters to a file, then attemp to read them as UTF-8 you end up with junk.
[21:01:38] <TommyTheKid> also, I don't even see the "Threads" tab from the demo video (screencast). (S10 sparc java 1.6.0_11)
[21:01:40] <gionny> svm_invictvs: I think that it is 5 mins that we are saying the same things, but we don't understand each other! ahah
[21:01:50] <ernimril> svm_invictvs: no, ascii is a subset of utf-8
[21:02:06] <ernimril> svm_invictvs: so writng ascii and reading as utf-8 will give you the correct results
[21:02:09] <svm_invictvs> er, the other way around.
[21:02:43] <gionny> ernimril: but isn't ASCII a 7 bit charset?
[21:03:07] <gionny> the 8th bit is just lost?
[21:03:11] <ernimril> gionny: it is a charset that only uses 7 bits in each octet
[21:03:16] <gionny> an empty bit?
[21:03:20] <gionny> ernimril: aaah I see
[21:03:36] <ernimril> gionny: the last bit really should be zero
[21:03:51] <cheeser> well, the first bit.
[21:03:51] <cheeser> 8^)=
[21:03:54] <gionny> ernimril: got it :)
[21:04:17] <svm_invictvs> gionny: yeah. But it's valid to set the 8'th bit in UTF8 which tells the decoder read a surrogate,iirc.
[21:04:28] <svm_invictvs> (Though I'm not 100% certain)
[21:04:35] *** thecarlhall has quit IRC
[21:05:48] *** Logi has joined ##java
[21:09:04] *** bolt has joined ##java
[21:09:07] *** teralaser_ is now known as teralaser
[21:10:23] *** timte has joined ##java
[21:11:04] *** vezzoni has joined ##java
[21:12:19] *** TommyTheKid has left ##java
[21:13:37] *** Varox has quit IRC
[21:14:22] *** chrismaster11 has quit IRC
[21:14:44] *** picca has quit IRC
[21:15:42] *** staar2 has joined ##java
[21:15:42] *** bindaas has joined ##java
[21:15:47] <staar2> hi
[21:16:21] *** jor has quit IRC
[21:16:21] *** SpeedyGhost has quit IRC
[21:16:21] *** drtroll has quit IRC
[21:16:21] *** NielsD has quit IRC
[21:16:21] *** marvs has quit IRC
[21:16:21] *** indeterminatus has quit IRC
[21:16:21] *** pandora-- has quit IRC
[21:16:21] *** crowbar has quit IRC
[21:16:21] *** rlubke has quit IRC
[21:16:21] *** blankthemuffin has quit IRC
[21:16:21] *** romanb has quit IRC
[21:16:21] *** jdolan_ has quit IRC
[21:16:22] *** wild_oscar has quit IRC
[21:16:22] *** Copter has quit IRC
[21:16:22] *** Bollinger has quit IRC
[21:16:22] *** peper has quit IRC
[21:16:22] *** _stack has quit IRC
[21:16:22] *** trustin has quit IRC
[21:16:22] *** SniperFodder has quit IRC
[21:16:22] *** suiside has quit IRC
[21:16:22] *** karstensrage has quit IRC
[21:16:22] *** Epcylon has quit IRC
[21:16:22] *** zeel has quit IRC
[21:16:22] *** ozzloy has quit IRC
[21:16:22] *** kshepherd has quit IRC
[21:16:22] *** ccherrett has quit IRC
[21:16:25] *** rindolf has joined ##java
[21:16:33] <staar2> i got question System.in.read() - system is here package, in is class and read is method ?
[21:16:49] *** NielsD has joined ##java
[21:16:49] *** marvs has joined ##java
[21:16:49] *** indeterminatus has joined ##java
[21:16:49] *** pandora-- has joined ##java
[21:16:49] *** jor has joined ##java
[21:16:49] *** crowbar has joined ##java
[21:16:49] *** rlubke has joined ##java
[21:16:49] *** blankthemuffin has joined ##java
[21:16:49] *** romanb has joined ##java
[21:16:49] *** jdolan_ has joined ##java
[21:16:49] *** wild_oscar has joined ##java
[21:16:49] *** Copter has joined ##java
[21:16:49] *** Bollinger has joined ##java
[21:16:49] *** peper has joined ##java
[21:16:49] *** _stack has joined ##java
[21:16:49] *** trustin has joined ##java
[21:16:49] *** drtroll has joined ##java
[21:16:49] *** SpeedyGhost has joined ##java
[21:16:49] *** SniperFodder has joined ##java
[21:16:49] *** suiside has joined ##java
[21:16:49] *** karstensrage has joined ##java
[21:16:49] *** Epcylon has joined ##java
[21:16:49] *** ccherrett has joined ##java
[21:16:49] *** ozzloy has joined ##java
[21:16:49] *** zeel has joined ##java
[21:16:49] *** kshepherd has joined ##java
[21:17:19] <cheeser> ~javadoc System
[21:17:19] <javabot> cheeser: http://is.gd/iN33 [java.lang.System]
[21:17:24] <cheeser> helps to read the docs
[21:17:26] <rindolf> Hi all!
[21:19:45] *** picca has joined ##java
[21:20:34] <rindolf> Why does bootstrap.sh in maven2-2.0.9 ignores CLASSPATH and causes javac to give me a lot of "package org.jdom does not exist"
[21:21:26] <shadewind> rindolf: since it's a shell script, check the source
[21:21:40] <rindolf> shadewind: I don't see anything offending there.
[21:22:11] <shadewind> that sucks
[21:23:39] *** ankylose has quit IRC
[21:24:24] *** nihilis7 has joined ##java
[21:24:25] *** nihi|ist has quit IRC
[21:25:07] *** sphenxes has quit IRC
[21:25:12] *** mitchnull has left ##java
[21:25:34] *** phyburn has quit IRC
[21:27:24] *** pressingonalways has joined ##java
[21:27:32] <pressingonalways> hi, is int and Integer different in java?
[21:27:38] <svm_invictvs> Is there a Collections method that tells youf if there's duplicates in a sorted collection?
[21:27:46] <jottinger> pressingonalways: yes.
[21:28:05] *** sphenxes has joined ##java
[21:28:07] <pressingonalways> jottinger, why would anyone want to use a wrapper Integer, when you can just use an int?
[21:28:38] <pressingonalways> it's not like int isn't readily available unlike some other languages that REQUIRE you to have everything an object...
[21:28:41] <jottinger> Because int != an Object
[21:28:55] <jottinger> so Lists, which store Objects, can't store native ints
[21:29:18] *** ffgeek200 has quit IRC
[21:29:19] *** ankylose has joined ##java
[21:29:28] <jottinger> there is actually no good One True Answer to "should everything be an object?"
[21:29:36] *** ffgeek200 has joined ##java
[21:29:44] <pressingonalways> hmm, ok thanks
[21:29:49] <pressingonalways> makes sense
[21:30:16] <jottinger> svm_invictvs: if you need to eliminate duplicates, you use a Set.
[21:30:29] <jottinger> if you want to check on existence before inserting a duplicate in a List, use List.contains().
[21:30:33] <svm_invictvs> jottinger: The interface calls for a List
[21:30:49] * jottinger shrugs.
[21:31:31] <shadewind> svm_invictvs: then use a Set and create a List when you want to use that interface
[21:31:49] <shadewind> myObject.foobar(new ArrayList(mySet));
[21:31:57] *** EnderMB has joined ##java
[21:32:32] *** vix85 has quit IRC
[21:32:44] *** skelet0n has joined ##java
[21:32:45] *** vix85 has joined ##java
[21:32:50] <ebil|work> cheeser, So, I looked into the classloader stuff. unfortunately nothing seemed to do the trick. what I really need is a classloader that *forces* a relioad of the object every time its asked for (because currently it's just reusing the same AppClassLoader in memory giving us funky results)
[21:33:03] <juanez> pressingonalways: they are very different.. but since java 1.5 there's also auto-(un)boxing...
[21:34:34] <jottinger> ebil|work: why... do you want to do that?
[21:34:38] <skelet0n> hi, i just downloaded a program called properjavardp, and it runs fine with the java command, but when i try loading it as an applet, i dont get the java logo, and it just says "connecting" but nothing even goes out the network. any ideas?
[21:35:08] <ebil|work> jottinger, because... it's necessary without an entire rewrite of software we don't have the sources to
[21:35:23] <jottinger> ebil|work: errrrr
[21:35:31] <pressingonalways> juanez, auto-unboxing? ie. Integer and int are easily exchangeable?
[21:35:31] <jottinger> what would forcing a reload get you?
[21:35:37] <jottinger> Besides, like, a full permgen
[21:35:55] <jottinger> pressingonalways: Integer i1=new Integer(4); int it2=i1; // compiles and runs properly
[21:36:04] <ebil|work> jottinger, running software in parallel, the parallelizing code keeps the objects in memory, the code we have to use unfortunately makes EXTENSIVE use of singletons and statics. so for instance...
[21:36:05] <jottinger> likewise, i1=it2; // compiles and runs properly
[21:36:11] <juanez> pressingonalways: exactly.. a method(Integer), can be called as method(int) and vice-versa
[21:36:41] <juanez> and what jottinger showed also, ofcourse :)
[21:37:00] <pressingonalways> interesting
[21:37:04] <jottinger> I would just like to say - for clarity and honesty - that I hate you all
[21:37:06] *** TryNiX has joined ##java
[21:37:10] <jottinger> just in case you didn't get the memo.
[21:37:26] *** dfas has joined ##java
[21:37:28] <ebil|work> let's say your code needs to increment a bunch of counters (1 to 100) and return the results, but it uses static counters and you can't change that. you want to have 4 counts in parallel. currently, it does: 1 2 3 4 5 for each. then, the next time you run it, it will do 6 7 8 9 10 (instead of resetting like it's supposed to)
[21:37:31] <pressingonalways> so if it is compatible like this nowadays... it's a mute point that you should know about but in practice doesn't affect anything?
[21:37:41] <jottinger> it's a MOOT point
[21:37:47] <jottinger> and yes, it's still relevant
[21:37:55] <dfas> what is the recommended osgi-compatible application server? jetty?
[21:38:02] <jottinger> because int i1=i2; // i2 is an Integer, can still cause exceptions
[21:38:08] <shadewind> it's quite important to know acutally
[21:38:09] <jottinger> dfas: ... errr
[21:38:20] <shadewind> since you can run into performance problems otherwise
[21:38:23] <jottinger> Glassfish runs in an OSGi container, and it's an app server; jetty is only a servlet container
[21:38:23] <juanez> pressingonalways: well, it's still not compatible with generics either
[21:38:36] <pressingonalways> uh huh
[21:38:36] <pressingonalways> ?
[21:38:41] <jottinger> s2ap is an app server, but it's not j2ee
[21:38:45] <jottinger> and it's 100% osgi
[21:39:02] <gionny> ebil|work: just change that stupid static code and do a class for that and instantiate it when needed
[21:39:07] <juanez> pressingonalways: and Integers have quite a large overhead , since they're still objects (at least if you go outside the Integer object cache )
[21:39:17] <jottinger> juanez: "quite a large overhead?"
[21:39:24] <ebil|work> gionny, not possible. we don't have the source for the static bits
[21:39:25] <juanez> jottinger: yes
[21:39:26] <jottinger> I wouldn't say "quite"
[21:39:27] <gionny> ebil|work: it is just a mess... imagine if 2 threads are running concurrently... you will never fix that untill it is static
[21:39:31] <juanez> ok "large"
[21:39:51] <gionny> ebil|work: so it is a pain...
[21:39:58] <jottinger> yes, "large" like somewhere around 20 bytes, since the wrapper classes are among the smallest of Java object implementations
[21:40:03] <ebil|work> gionny, the threads themselves run in seperate jvms. it's that they're never UNloaded at the end
[21:40:21] <juanez> jottinger: so millions of Integers is a real problem
[21:40:31] <jottinger> juanez: just like objects themselves :)
[21:40:44] <cheeser> ebil|work: so use a factory to create your class and then put the classloader magic in there.
[21:40:50] <cheeser> private constructors++
[21:40:54] <pressingonalways> thanks guys, so moral of the story: use the int type unless i need an object?
[21:41:13] <juanez> pressingonalways: use an int if you need and int :) use an Integer if you need Integer
[21:41:20] <jottinger> juanez++
[21:41:23] <jottinger> good rescue
[21:41:32] <jottinger> ebil|work: you could always reverse engineer it and get it right
[21:41:44] <jottinger> and then mock the original authors until they committed suicide
[21:41:47] <TryNiX> http://pastebin.com/d6786fbf3 , in this code I check batches of 23 values, I do a comparision (theoretical value - practical value), and using that comparision I pick the biggest value from the batch... I know for sure that when j is 1911, the comparision is bigger than biggest difference, but still the code picks 1910 instead... I did couple of checks for when j==1911 to confirm and I am sure it is
[21:41:51] *** vezzoni has quit IRC
[21:41:51] *** timte has quit IRC
[21:41:51] *** prgrmr has quit IRC
[21:41:51] *** kane77 has quit IRC
[21:41:51] *** dk_schrute has quit IRC
[21:41:51] *** pgib has quit IRC
[21:41:51] *** Gracenotes has quit IRC
[21:41:51] *** ghostknife has quit IRC
[21:41:52] *** TheCastor has quit IRC
[21:41:52] *** MacGyverNL_ has quit IRC
[21:41:52] *** juc0 has quit IRC
[21:41:52] *** vsync has quit IRC
[21:41:52] *** lolsuper_ has quit IRC
[21:41:52] *** Zhig has quit IRC
[21:41:52] *** _bugz_ has quit IRC
[21:41:52] *** vara2009 has quit IRC
[21:41:52] *** BigJ has quit IRC
[21:41:52] *** tltstc has quit IRC
[21:41:52] <gionny> lol jottinger
[21:42:03] <jottinger> gionny: that's what I had to do last week
[21:42:04] <pressingonalways> eww a split!
[21:42:06] <ernimril> pressingonalways: most of the time it does not matter if you use an int or an Integer, if you have a small list it is much easier to use a list of Integers than to make your own int-list
[21:42:07] <jottinger> I'm still fuming
[21:42:34] *** vezzoni has joined ##java
[21:42:34] *** timte has joined ##java
[21:42:34] *** prgrmr has joined ##java
[21:42:34] *** kane77 has joined ##java
[21:42:34] *** dk_schrute has joined ##java
[21:42:34] *** pgib has joined ##java
[21:42:34] *** Gracenotes has joined ##java
[21:42:34] *** ghostknife has joined ##java
[21:42:34] *** TheCastor has joined ##java
[21:42:34] *** lolsuper_ has joined ##java
[21:42:34] *** MacGyverNL_ has joined ##java
[21:42:34] *** juc0 has joined ##java
[21:42:34] *** vsync has joined ##java
[21:42:34] *** Zhig has joined ##java
[21:42:34] *** vara2009 has joined ##java
[21:42:34] *** BigJ has joined ##java
[21:42:40] <ernimril> pressingonalways: sure, there are a few 3:rd party libs you could use, but still easier to just use the standard api
[21:43:20] <pressingonalways> well, i'm new to java... i'm just looking for the proper ways to do things in java
[21:43:30] <pressingonalways> if people use Integers, i'll use them... if it's int, i'll stick to them too
[21:43:34] <jottinger> pressingonalways: juanez was right.
[21:43:37] <skelet0n> any ideas why an applet fails to work, but the regular program works?
[21:43:40] *** cybereal has joined ##java
[21:43:43] <jottinger> Use what's appropriate. Let java convert as it needs to.
[21:43:46] <jottinger> skelet0n: applets suck.
[21:43:50] <gionny> pressingonalways: and another thing... if you have something optional that can have no value, then you can use Integer that can assume null value, too
[21:44:07] <gionny> pressingonalways: with an int, you always have to specify a value
[21:44:09] <pressingonalways> ah yes, int doesn't have a null value
[21:44:48] <skelet0n> it just doesnt make sense why this works with the java program, but not in the browser
[21:44:55] <jottinger> skelet0n: sure it does
[21:45:01] <pressingonalways> wait... is null really a value?
[21:45:08] <jottinger> applets suck; they have LOTS of restrictions the non-browser VM doesn't have
[21:45:10] <pressingonalways> or a set reference parameter? :-/
[21:45:11] <jottinger> pressingonalways: yes
[21:45:13] <cybereal> pressingonalways: of course it is
[21:45:43] *** durka42 has joined ##java
[21:45:47] <cybereal> pressingonalways: variables of object types are references and their value is an opaque address to the object they refer to, null being the sentinel value for pointing at nothing
[21:45:56] <gionny> pressingonalways: think of the identifiers as references and all will be more clear to you
[21:46:00] <skelet0n> one restriction i read about is that an applet can only connect to the server its on.
[21:46:05] <gionny> yeah, cybereal said that better
[21:46:41] <pressingonalways> see, i hate to bring it up... but it was really never made clear the definitive difference between references and pointers....
[21:47:21] <TryNiX> http://pastebin.com/d6786fbf3 , at some point I am sure the comparision should be true (for j=1911), but still the program opts to pic j=1910 instead
[21:47:34] <TryNiX> pick*
[21:47:38] *** bhz- has quit IRC
[21:47:57] <pressingonalways> as far as i understand, references are not too different than pointers, yet i know that must be wrong...
[21:49:14] <cheeser> references are the interface and pointers are the implementation.
[21:49:29] <cheeser> ReferenceImpl in surialspeek
[21:49:29] <cheeser> 8^)=
[21:49:43] *** skelet0n has left ##java
[21:49:49] <shadewind> they are pointers but they are more abstract
[21:50:13] <gionny> pressingonalways: the difference is that, if you have a reference (i.e.: Integer x = new Integer(0); ), then if you write "x" you refer directly to the pointed value... with a pointer, in C, you have to use the "*" operator to access the pointed value, because without it you just have a memory address
[21:50:31] <TryNiX> cybereal, u were always good with spotting this stuff =p
[21:50:43] <surial> gionny: Not entirely true. x == x in java does pointer comparison.
[21:50:53] <cheeser> ~~ TryNiX aolbonics
[21:50:53] <javabot> TryNiX, aolbonics is using unnecessary abbreviations such as 'u', 'r', 'ur', 'thx', etc. Using this language depicts you as an imbecile in the eyes of the helpful regulars in this channel, and is generally not tolerated. If you want intelligent answers, the least you can do is speak intelligently. Additionally arguing about this rule will get you nowhere except banned. Have a nice day!
[21:50:56] <gionny> surial: oh, you are right
[21:51:07] <cheeser> == is *always* a value comparison of the operands.
[21:51:16] <surial> pressingonalways: there is no real difference between pointers and references. However, in java, pointers are strictly pointers. You can't add or subtract them or cast them to numbers - stuff that happens routinely in C.
[21:51:25] <pressingonalways> gionny, the way you stated it... it sounded like just a asthetics difference?
[21:51:29] <TryNiX> alright, off with the sms habbits !
[21:51:37] <surial> other than that, they are pointers in all their glory. the '.' operator dereferences a pointer.
[21:51:50] <pressingonalways> surial, there's pointers in java?
[21:52:02] * cheeser sighs
[21:52:03] <gionny> pressingonalways: I just tried to explain it in a "practical point of view"
[21:52:16] <waz> ~rif
[21:52:16] <javabot> Reading Is Fundamental
[21:52:39] <surial> pressingonalways: Well, this is where we diverge into semantics. Yes, there are, but, because the term 'pointer' is laden with many preconceptions, java doesn't call them that. And it would be wrong to say that java has C-style pointers (because it doesn't). So, look up, grok what we've been saying. Call it floobargles for all I care.
[21:52:59] <gionny> pressingonalways: it is a lot easier to understand than to explain it... and I am not native english speaking, so it is quite difficult for me!
[21:53:17] *** elementz has quit IRC
[21:53:25] <pressingonalways> lol, ok thanks gionny
[21:53:33] *** ballmenace has quit IRC
[21:53:37] *** Odin79 has joined ##java
[21:53:57] <gionny> pressingonalways: surial just said some very true words
[21:54:03] <surial> or better yet, call them 'references', which is what the java community tends to call them. Just know that they are pointers, in all the important senses of that word (x == x does pointer comparison, so "foo" == "foo" is not neccessarily true, variables and the object you stuff in them are always separated, and x = y will assign whatever y points at to x, it doesn't actually copy anything).
[21:54:19] <pressingonalways> i know java has references...
[21:54:24] <pressingonalways> but does java have explicit pointers?
[21:54:26] <cheeser> no
[21:54:29] <pressingonalways> ok good
[21:54:37] <pressingonalways> so there is only 1 type of variable... they're all references right?
[21:54:39] <cheeser> and "foo" == "foo" is always true
[21:54:40] <cheeser> 8^)=
[21:54:43] <cheeser> no!
[21:54:49] <cheeser> ~primitives
[21:54:50] <surial> pressingonalways: Go copy/paste the last...10 minutes or so. Reread it with a cup of coffee. If you don't get it, find another job.
[21:54:50] <javabot> primitives are 8 of the 9 non-Object types in Java (the special type "void" being the ninth): byte, short, int, long, float, double, boolean, and char. See http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html for more information.
[21:55:04] <surial> cheeser: Please don't be confusing.
[21:55:11] <pressingonalways> besides primitives... yes
[21:55:12] <cheeser> i'm not.
[21:55:22] <pressingonalways> i forgot about those
[21:55:28] <EnderMB> I've got a small question about the Random class. How 'random' is it?
[21:55:28] <pressingonalways> all objects are references?
[21:55:35] <gionny> really? "foo" == "foo" is always true? I would have never said that
[21:55:35] <cheeser> EnderMB: mostly random
[21:55:36] <surial> String foo = new String("foo"); String foo2 = new String("foo"); foo == foo2; // <- that will be false.
[21:55:37] *** romanb has quit IRC
[21:55:43] <cheeser> ~smack pressingonalways
[21:55:43] <javabot> smacks pressingonalways in the mouth
[21:55:51] <pressingonalways> ouch
[21:55:54] <cheeser> objects are not references.
[21:56:04] <cheeser> references are addresses. objects are ... objects
[21:56:36] <shadewind> references reference objects :)
[21:56:37] <surial> gionny: the java compiler will intern all literals, so if you write, literally, "foo" == "foo", then, yes, that will so happen to always resolve to true. However, this is a pedantic discussion about string interning and the type of code emitted by the java compiler, and is only VERY confusing in light of our pointers talk. Unfortunately, this channel is rife with pedants who don't understand that they are just confusing people.
[21:56:42] <EnderMB> I mean, is it securely Random. Would you use it when true randomisation is needed?
[21:56:48] <pressingonalways> ah yes cheeser
[21:57:01] <surial> EnderMB: Use SecureRandom
[21:57:07] <cheeser> ~~ EnderMB javadoc SecureRandom
[21:57:10] <surial> ~~EnderMB javadoc SecureRandom
[21:57:13] <javabot> EnderMB: http://is.gd/iXjO [java.security.SecureRandom]
[21:57:16] <javabot> EnderMB: http://is.gd/iXjO [java.security.SecureRandom]
[21:57:17] <juanez> surial++
[21:57:24] <pressingonalways> so the primitive datatypes are always values and not accessed by reference variables?
[21:57:27] <shadewind> surial: I don't think anyone should ever rely on that fact though
[21:57:27] <surial> juanez: tilde in front.
[21:57:35] <surial> or what do you call those things in english?
[21:57:37] <juanez> ya, figures :D
[21:57:41] <shadewind> pressingonalways: sort of yes
[21:57:41] <juanez> tilde i think
[21:57:44] <TryNiX> pressingonalways, an object is a house, a reference is the address of the house. if you pass a reference to another method for example, the method can modify the original house (since it has got the address of it) without having to return it. wheras if you pass a primitive, the method modifies a copy
[21:57:45] <juanez> ~surial++
[21:57:46] <javabot> surial has a karma level of 78, juanez
[21:57:49] <cheeser> surial: what you call pedantry, i call correct. saying that "foo" == "foo" will always yield the same result. if you're going to instruct someone be correct about it.
[21:57:52] <surial> Oh, tilde. Nevermind.
[21:58:17] <juanez> cheeser: at this early stage, it really doesnt matter much though
[21:58:24] <juanez> cheeser: baby steps, and all that
[21:58:26] <pressingonalways> so all primitive datatypes are copied from method to method?
[21:58:37] <cheeser> juanez: sure it matters.
[21:58:39] <pressingonalways> since they aren't accessed through reference....
[21:58:42] <gionny> surial: thanks for the explanation... I really never said that "foo" == "foo" was always true... interesting.
[21:58:44] <cheeser> foundational stuff matters.
[21:58:53] <gionny> ok, to stop confusing pressingonalways...
[21:59:00] <cheeser> gionny: but it is.
[21:59:04] <surial> cheeser: There's no object type that is immutable and commonly known that can be expressed as eloquently. The spirit of "foo" == "foo" is not neccessarily true drives home the point that == is pointer comparison and cares not one iota about the actual equality of the two objects that are being pointed at.
[21:59:13] <surial> cheeser: Which comes back to pedantry. Don't be a pedant. It doesn't help.
[21:59:19] <cybereal> pressingonalways: variable values are always copied on assignment and when passed as parameters, the confusion comes in when people don't realize that reference types have values too, they are just the reference not the object being referenced
[21:59:26] <gionny> pressingonalways: think about this: String s1 = new String("foo"); String s2 = new String("foo"); if (s1 == s2) { .... this is false ...
[21:59:46] <pressingonalways> gionny, yeah, cuz they're 2 different memory addresses
[21:59:51] <le_biloute> use s1.equals(s2) instead
[21:59:52] <pressingonalways> i get that
[22:00:14] <surial> Here's one that will not trigger cheeser's pedantry hardon: Integer x = 12345; Integer y = 12345; System.out.println(x == y); //this prints 'false'.
[22:00:18] <cheeser> surial: if you talk about == being value comparison, there is no confusion whatsoever unless you confuse objects and references which is entirely different.
[22:00:25] <cybereal> gionny: that's because the entire point of new String(String) is to create a new object...
[22:00:31] <cheeser> and yet... 8^)=
[22:01:01] <cybereal> and it's safe to rely on "foo" == "foo" because the JLS demands it be true or you'll just fail the TCK...
[22:01:08] <pressingonalways> cybereal, wait, it's always copied? so if i call a method, say add1(int i) and add1 adds 1 to it... will i be modified outside of the method or not?
[22:01:13] <surial> cybereal: Seriously, stop saying this shit.
[22:01:13] *** jor has quit IRC
[22:01:18] <cheeser> ~~ pressingonalways pbv
[22:01:18] <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
[22:01:20] <cybereal> I still find it an odd practice to rely on it
[22:01:22] <surial> There is zero reason to write STRING LITERAL == STRING LITERAL in a java source file.
[22:01:46] * pressingonalways clicks... this is all very interesting facts to know about java
[22:01:48] <gionny> well, where I work it is full of code that goes like this: String s = .... something ... ; if (s.trim() != "") { .... } ... that's terrible!
[22:01:59] <gionny> lol
[22:02:03] <surial> so, when you say that you can rely on "foo" == "foo" working in the JVM, it is understandable for people to go: hmmm. he couldn't possibly mean actual string literal comparison, tehre's zero point to doing that. he must mean that any two strings hat are "foo", regardless of how I get them, are always == equal to each other. Which is patently false.
[22:02:03] <cheeser> gionny: find a new job or new coworkers
[22:02:05] <cybereal> surial: it applies transitively to more scenarios than just literal == literal
[22:02:13] <surial> gionny: that code is broken.
[22:02:20] <gionny> surial: I know!
[22:02:28] <surial> gionny: Can't you tell them that?
[22:02:31] <gionny> cheeser, surial: once I corrected 30 of those in just 1 class
[22:02:37] <gionny> lol
[22:02:56] <gionny> it was very old code, when they first switched to java and people probably was not used to it
[22:02:59] <juanez> gionny: enforce the use of FindBugs
[22:03:00] *** Gracenotes has quit IRC
[22:03:04] <gionny> now fortunately people is writing good code
[22:03:07] <surial> ~juanez++
[22:03:07] <javabot> juanez has a karma level of 3, surial
[22:03:09] <juanez> still, that is horribly broken
[22:03:16] *** AskHL has joined ##java
[22:03:37] <juanez> ty :D
[22:04:03] <surial> gionny: Definitely enforce findbugs then. If your coworkers don't know enough java to avoid these mistakes, that's the only way to avoid them properly. These can end up being shadowy bugs - if you write simple test code javac can probably intern them so everything seems to work just fine. Then the strings come in via libraries, the command line, and other sources, and they aren't always interned, and all of a sudden "x == x" (as far as you know)
[22:04:18] *** Copter has quit IRC
[22:04:19] <cybereal> surial: I prefer not to cater to the LCD when talking about programming shit, if someone can't figure out the difference between a literal and arbitrary instances of String, then too bad for them
[22:04:42] *** slonkko has quit IRC
[22:04:42] *** coalado1 has quit IRC
[22:04:59] <surial> cybereal: I reiterate: Its perfectly normal to presume that when anyone writes "foo" == "foo", just like that, that they couldn't possibly be talking about putting that, literally, in a .java file. Why in fuck's name would you?
[22:05:03] <gionny> surial: I think that people should just care more about java warnings...
[22:05:13] <tieTYT2> at my company, we excel at naming things in ways that will never help you if you search for them
[22:05:35] <gionny> surial: another thing I see and makes me a sort of angry is accesing static fields with a reference to an instance
[22:05:36] <surial> gionny: java's warnings are fairly basic. Something like x == "" where x is of type String is definitely worth a warning. And findbugs does just that.
[22:05:42] <cybereal> surial: you're making an assumption I simply disagree with. I think people who know what literals are will see the point of it properly.
[22:05:52] <surial> gionny: That's in my book less of an offence, especially if you know what you are doing.
[22:05:53] <pressingonalways> thanks guys... i'm going to think about this a little... :)
[22:06:04] <surial> but I'm sort of in the minority on the ugliness of that particular construct.
[22:06:10] *** Dr_Link has quit IRC
[22:06:38] *** Dr_Link has joined ##java
[22:06:42] <gionny> surial: :)
[22:06:52] *** ramdam has joined ##java
[22:06:54] <juanez> gionny: static mutable fields are usually quite tricky in themselves...
[22:07:03] <cheeser> given the ... interesting things people say here, i think it's perfectly reasonable not to make any assumptions about what people mean.
[22:07:32] <gionny> surial: another thing that I see are methods that start with a capital letter... when I see them, I usually refactor them and then commit changes :P
[22:07:40] <surial> gionny: Just move.
[22:07:56] <gionny> surial: move? what do you mean?
[22:08:05] <surial> gionny: No human being should be forced to work in these conditions. Consider calling amnesty.
[22:08:12] <gionny> lol!
[22:08:32] <cybereal> gionny: C# developers?
[22:08:38] <cybereal> they capitalize everything I swear
[22:09:03] <gionny> cybereal: probably they are
[22:09:15] <surial> gionny: though, again, there are automated tools that can generate warnings/errors when people fuck up capitalization conventions on identifiers.
[22:09:20] <juanez> it's in the C# codestyle though.. cant blame them
[22:09:37] *** vara2009 has quit IRC
[22:09:37] *** vsync has quit IRC
[22:09:37] *** juc0 has quit IRC
[22:09:37] *** ghostknife has quit IRC
[22:09:38] *** vezzoni has quit IRC
[22:09:38] *** BigJ has quit IRC
[22:09:38] *** TheCastor has quit IRC
[22:09:38] *** kane77 has quit IRC
[22:09:38] *** Zhig has quit IRC
[22:09:38] *** timte has quit IRC
[22:09:38] *** dk_schrute has quit IRC
[22:09:38] *** MacGyverNL_ has quit IRC
[22:09:38] *** prgrmr has quit IRC
[22:09:38] *** lolsuper_ has quit IRC
[22:09:38] *** pgib has quit IRC
[22:09:41] <cybereal> I can blame them for picking C# :)
[22:09:45] <svm_invictvs> what the fuck
[22:09:46] <juanez> ahh. yes
[22:09:51] <gionny> surial: the only problem is that I don't have time for all that...
[22:09:53] <svm_invictvs> jottinger: you know what, I can use a sorted set
[22:09:58] <juanez> but C# has a few nice features that would be nice in java too
[22:10:02] <juanez> LINQ for one
[22:10:07] *** vezzoni has joined ##java
[22:10:07] *** timte has joined ##java
[22:10:07] *** prgrmr has joined ##java
[22:10:07] *** kane77 has joined ##java
[22:10:07] *** dk_schrute has joined ##java
[22:10:07] *** pgib has joined ##java
[22:10:07] *** ghostknife has joined ##java
[22:10:07] *** TheCastor has joined ##java
[22:10:07] *** lolsuper_ has joined ##java
[22:10:07] *** MacGyverNL_ has joined ##java
[22:10:07] *** juc0 has joined ##java
[22:10:07] *** vsync has joined ##java
[22:10:07] *** Zhig has joined ##java
[22:10:07] *** vara2009 has joined ##java
[22:10:07] *** BigJ has joined ##java
[22:10:12] <cybereal> heh yeah I guess
[22:10:38] * AMcBain thinks there are a few features C# has that Java *doesn't* need, but people seem to want them anyways ...
[22:10:41] <gionny> surial: I am working in a quite big company and my group works directly for the costumer... we have the costumer that phones and wants problem solved, new things implemented...
[22:11:01] <juanez> AMcBain: sure, that too.. but in a few fields it seems Java is being left behind
[22:11:05] <gionny> I cannot stay there and care about all this "little" things usually... unless I work 12 hours a day, and I don't want that :P lol
[22:11:11] <juanez> Linq, Databindings are two i can think of
[22:11:19] <surial> This is called a death march. The specifics have been discussed to bits. Suffice to say, the self destructive behaviour of continuing shoddy work in the name of 'but we got fucking deadlines to meet' is very very bad indeed. Studies have been done.
[22:11:21] <cybereal> the foolishness is expecting one language to be appropriate for every programming task
[22:11:38] <AMcBain> ~cybereal++
[22:11:38] <javabot> cybereal has a karma level of 155, AMcBain
[22:11:56] <AMcBain> (I think I know some of those people ... "C++ for everything! yay!")
[22:12:20] <cybereal> AMcBain: nearly every inexperienced programmer thinks this way with regards to whatever language they're most heavily invested in
[22:12:30] <cybereal> AMcBain: it's actually understandable for those who haven't thought it through
[22:12:42] <cybereal> AMcBain: I mean if you're an expert in C++, why would you want to take the time to learn prolog?
[22:12:45] <cybereal> just for one task?
[22:12:55] <gionny> surial: very true words...
[22:13:07] <cybereal> but the reality is, if you could easily combine work in multiple task appropriate languages you will end up with a better expressed solution, imho
[22:13:14] <AMcBain> most of those people just don't like the alternatives (the one guy I'm thinking of doesn't like Java at all)
[22:13:24] <cybereal> AMcBain: they are expressing fear
[22:13:42] <cybereal> AMcBain: fear that all that "work" they put into mastering one language will no longer be so valuable
[22:14:02] <cybereal> it's an instance of the human tendency to associate value directly with effort
[22:14:25] <AMcBain> ah yes, well, something those that know better should keep to themselves ... as I know that person is enough of an asshole that he'd find some fault with that statement (it's not worth arguing over)
[22:14:28] <surial> I somewhat disagree with the 'tools in the toolbox' thing, cybereal, AMcBain. Its worth treating every problem like a nail if you're a fucking whizkid with a hammer. Consider that learning how to use any tool takes years (yes, that's multiple) initial investment and significant usage after that, and its no longer so strange when you see someone attempting to screw a nail by hammering it in place.
[22:15:02] *** Blaay is now known as Blay
[22:15:12] *** Blay is now known as Blaay
[22:15:18] <surial> there's a limit to how far the 'I'll just treat all as nails' can take you, sure, but for plenty of serious programmers the value proposition isn't there. It becomes far more interesting when you add the notion that learning other languages also makes you better at your existing language knowledge. Then learning, say, lisp, or something, is mostly an excuse to improve your hammering skills.
[22:15:23] <cybereal> surial: you're thinking only from the perspective of a single programmer
[22:16:15] <AMcBain> surial: I'm not suggesting that one should change tools just because the problem is slightly different, I think more along the lines of changing tools when there is a significant reason for doing so (but everything has shades of gray, so this isn't to be taken 100% strictly)
[22:16:18] <cybereal> if you could take a general java application then start to refactor parts or add features progressively in more appropriate languages/tools that'd be pretty great. Of course, you can, though it's not always as trivial or convenient as I'd like...
[22:16:29] <surial> Well, if you add more programmers, then using lots of languages makes the cost of entry into the group very high indeed. They'd have to be passing smart at anything. someone who doesn't know any python (but knows java) can maybe read some python code, but grokking the same thing done in java, even if that means the code is 4x the size, would be eiaser for them.
[22:16:42] <surial> and it gets progressively worse as you get into progressively more exotically non-hammery tools.
[22:16:56] <cybereal> You have very low expectations of programmers
[22:17:04] <surial> I like to think I'm merely realistic.
[22:17:18] <surial> I'm sort of playing devil's advocate here, by the way.
[22:17:25] <cybereal> I expect any programmer I work with to be able to pick up a passing, workable knowledge of any but the most bizarre languages within a short period of time, a week maybe.
[22:17:40] *** enoksrd has joined ##java
[22:17:47] <AMcBain> yay. challenges. I like those.
[22:17:53] <cybereal> The more interesting application of this strategy is actually the ability to hire experts
[22:17:56] <surial> I'm just trying to say that the whole 'find the right tool for the job' argument is just lacking. You have to add in that broad knowledge has a marked positive effect on your skills at any individual language, especially if the other language you learn has academic merits.
[22:17:59] *** sebr_afk is now known as sebr
[22:18:01] <cybereal> and not expect them to learn everything about all your tools
[22:18:24] <surial> Which is e.g. a great argument to use to convince people to learn scala or lisp or haskell instead of broadening their java horizon by, say, adding PHP, or broadening their python by adding ruby, which is utter pointlessness.
[22:18:47] <surial> cybereal: I think we strongly differ on the demands on code quality.
[22:19:03] <cybereal> How did you jump to that conclusion?
[22:19:03] <AMcBain> PHP doesn't broaden much ... it just softens the ability to recognize and say "this is just wrong".
[22:19:20] *** nashra has quit IRC
[22:19:24] <surial> I want any code that is for public consumption (where 'public' is company, open source group, whatever), to be fucking great. And there is absolutely no snowball's chance in hell that a smart programmer who just picked up new language X in a week, knows the right idioms for the nicest code.
[22:19:25] <enoksrd> how do i specify which java version is used to compile by ant?
[22:19:36] <surial> They can make shit work, but it'll be ugly to the eyes of a seasoned programmer.
[22:19:38] <enoksrd> from my reading of the docs i thought it was <property name="build.compiler" value="java1.5"/>
[22:19:49] <enoksrd> but that gives me a "Class not found" error
[22:19:49] <surial> enoksrd: no, there's a source or version thing for <javac>
[22:19:52] *** Woot4Moo has joined ##java
[22:20:14] <Woot4Moo> what is the command to append jars to the classpath after jarring
[22:20:17] <cybereal> surial: I didn't expect that from one week, the one week is the ability to understand the "other" parts of the system you're not working on.
[22:20:33] <cybereal> surial: I don't expect any individual programmer to be *focusing* on more than one tool at a time
[22:20:52] <enoksrd> surial: what do you mean by "source or version thing"? example?
[22:20:53] <cybereal> again this is part of the point, and it's really only important for sophisticated or complex software development
[22:21:09] <surial> cybereal: Depends on how complex the code to be understood is, and, crucially, on the language. Grokking some macro-infested lISP, even if it is a glorified hello world, can be difficult in just a week. Grokking some python code, even fairly complex stuff, really ought to be second nature in a week.
[22:21:10] <waz> hrmm
[22:21:18] <surial> enoksrd: http://ant.apache.org/manual
[22:21:24] <surial> enoksrd: check the <javac> Tasks documentation.
[22:21:57] <enoksrd> surial: i got my info from http://ant.apache.org/manual/CoreTasks/javac.html
[22:22:25] *** staar2 has quit IRC
[22:22:44] <cybereal> surial: I don't know... I still think you have low expectations of programmers. It's like this idea that a programmer would build their entire career around a single language.
[22:22:48] <enoksrd> surial: that's where it talks about the build.compiler
[22:23:00] <surial> enoksrd: target= and source=, on that very page.
[22:23:08] <cybereal> It's as smart as a mechanic building their entire career around a single range of tools, like... all screwdrivers, or all ... leatherman multitools haha
[22:23:25] <surial> enoksrd: There's a difference in asking the java 1.6 javac to compile java5 source to a java5 class file, and using the java 1.5 javac, if its installed on your system. Which of the two do you want?
[22:23:34] <AMcBain> I can add a plugin to this language that functions as a bottle opener!
[22:23:35] <Inhuman> cybereal, alot of programmers do base thier entire career around one language.
[22:23:44] <cybereal> Inhuman: I know they do
[22:23:48] <cybereal> Inhuman: and I'm saying that's kinda stupid
[22:24:06] <juanez> enoksrd: look at the examples. it's right there
[22:24:08] <Inhuman> It's not always necessary for them to learn any others, but yes it is stupid.
[22:24:15] <AMcBain> I think a lot of employers look for the idea and ability of people to be able to learn and understand new things (languages, tools, etc)
[22:24:20] <cheeser> fsvo stupid
[22:24:21] <odinsbane> Is there a way to check if my jre is 32 or 64 bit?
[22:24:25] *** Vicfred has joined ##java
[22:24:28] <cybereal> even if they don't actively learn other languages, the inherent fear of doing so seems to be there as well
[22:24:28] <cheeser> odinsbane: it's 32
[22:24:38] <surial> odinsbane: java -version
[22:25:03] <Inhuman> I'm just now learning lisp and... I am a little scared.
[22:25:08] <cheeser> ~interesting
[22:25:08] <javabot> this is all very interesting (not really) but please take it somewhere else.
[22:25:20] <AMcBain> off to ##java-talk!
[22:25:22] <surial> cybereal: Oh, absolutely. Again, from the point of personal development and in that way, when you're hiring, knowing multiple languages is great. But the practical aspect of employing multiple languages in a group of programmers? Kinda hard to find a set of languages that everyone's decently good at.
[22:25:28] <odinsbane> the -version doesn't return anything about the bit.
[22:25:39] <cheeser> odinsbane: you're using a 32 bit vm.
[22:25:49] <AMcBain> surial, yeah, well, it works best if more than 1 join and the conversation continues.
[22:25:50] <surial> odinsbane: Yeah, if it doesn't say 64-bit, it isn't.
[22:25:59] <surial> AMcBain: :)
[22:26:06] <cybereal> Inhuman: even if they don't have a direct need for other languages, programmers nearly always benefit, if only indirectly, from knowledge of them. Still it's nice to have more exposure so you can comfortably approach more opportunities I think. I had only written one complete java app before I took my current job... but it was enough that I felt I'd be able to keep up with the demands.
[22:26:39] <cybereal> surial: well in my current app we employ java, and javascript so there's two...
[22:26:42] *** shervin_a has quit IRC
[22:26:43] *** vinse has joined ##java
[22:26:51] *** eidolon has left ##java
[22:27:28] <cybereal> surial: and I'd consider adding prolog or some similar dsl for a certain part of the app if it had more support from managerial types because it would be far better suited at the task, etc. I am not suggesting you have 17 different languages going but sometimes some things are just way easier in a different language.
[22:27:44] <odinsbane> I'm on an amd 64 I don't know if I should try using the 64bit jre.
[22:29:27] <cybereal> surial: about 20% of the purpose of my app is to apply rules against a tree structured message to decide... where it should go, how it shoujld be translated, if it should be rejected, plus an open ended customization vector, so a tool like drools is attractive... rather than continuing to try and manage all this logic in tedious and verbose java.
[22:29:33] *** redrebel has quit IRC
[22:29:41] <waz> I threw a couple of ruby support apps into our mix in the last few years just to shake up the devs some
[22:30:15] <cybereal> a co-worker put together a nice integration testing tool that you script with groovy...
[22:30:21] <surial> odinsbane: Nah. 64-bit JRE makes a lot of sense mostly if you need more than about ~2.5GB of heap.
[22:31:19] <surial> cybereal: sure, and if it's -way- easier -AND- very large, there really is no excuse to keep pissing about with the wrong tool. But those situations are fairly rare.
[22:31:22] <surial> at least in my experience.
[22:31:43] *** schasi has joined ##java
[22:33:02] <odinsbane> Im trying to install 1.6 in my local dir does somebody know a reference page?
[22:33:32] *** ech0 has joined ##java
[22:33:33] <ech0> Hello tout le monde !!!
[22:34:06] <cybereal> ech0: j'suis un omelette au fromage
[22:34:25] <ech0> quoi ?
[22:34:46]
[22:34:50] <ech0> bienvu
[22:34:57] <cybereal> Whenever I see tout le monde I can't help but think of Megadeth
[22:35:12] <cybereal> ech0: sorry it's a joke that pretty much only I seem to get these days
[22:35:22] *** convivial has quit IRC
[22:35:23] <cybereal> (and if anyone was ever a fan of the cartoon Dexter's Lab...)
[22:35:46] *** lvh has joined ##java
[22:35:48] <lvh> hi
[22:35:51] <cybereal> but I don't actually speak french
[22:36:22] <lvh> I'm not entirely sure if I understand the difference between unconditional (&) and conditional (&&) and -- is it simply that one short-circuits if lhs is false and the other doesn't?
[22:36:33] *** convivial has joined ##java
[22:36:42] *** convivial has quit IRC
[22:36:45] <Logi> lvh: && works on boolean values, & works on integers
[22:36:57] <cybereal> & works on booleans too
[22:37:00] <`House`> yes
[22:37:00] <lvh> What difference does it make? Assuming your boolean expressions don't *change* anything, and you want it to force that
[22:37:03] <TryNiX> cybereal, do french people that learn programming, end up having good english too? :P
[22:37:05] <`House`> its a matter of evaluation
[22:37:07] <Logi> lvh: logical operator vs. bit-manipulation
[22:37:10] *** convivial has joined ##java
[22:37:10] <cybereal> TryNiX: I wouldn't know
[22:37:23] <`House`> A && B => if A is false B is not checked
[22:37:26] <lvh> my courseware says & works on bools as unconditional and
[22:37:29] <cybereal> Logi: no it's different... with booleans and &
[22:37:36] *** enoksrd has quit IRC
[22:37:36] <cybereal> lvh: the JLS explains it
[22:37:38] <lvh> `House`: So you only use & if for some strange reason you want to always eval rhs?
[22:37:38] <cybereal> ~jls
[22:37:38] <javabot> cybereal, jls is The Java Language Specification: http://java.sun.com/docs/books/jls/
[22:37:47] <lvh> cybereal: thanks!
[22:38:00] *** convivial has quit IRC
[22:38:33] *** convivial has joined ##java
[22:39:17] <cybereal> http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.22.2
[22:39:18] <cybereal> start there
[22:39:20] *** `House` is now known as House|AFK
[22:39:43] *** riotz has joined ##java
[22:40:04] <cybereal> lvh: but basically yes it amounts to not doing short circuiting
[22:41:04] <blahjake> lvh: you can also use it for, uh, accumulating i guess you'd call it, like so: myBool &= otherBool;
[22:41:09] <lvh> cybereal: Why would you *not* want that?
[22:41:50] <cybereal> lvh: only if you need the side effects, most likely, of both expressions
[22:41:52] <lvh> unless your boolean expression somehow changes a state, but then it really shouldn't return anything either
[22:42:15] <lvh> cybereal: okay -- so, never use & | in boolean contexts :-p
[22:42:18] <pressingonalways> is there a way to find and print all the static fields in a class?
[22:42:31] <cybereal> lvh: never use it unless you have a special need to, I suppose
[22:42:57] <cybereal> lvh: I don't like saying never but you can use a kind of priority rule for this sort of thing: default to conditional logical operands unless you have a special need for unconditional ones
[22:43:03] *** Pred2k5 has joined ##java
[22:43:07] <cybereal> and you probably never will
[22:43:13] <Pred2k5> hi, is this article for xml paring up to date: http://java.sun.com/developer/technicalArticles/xml/mapping/ ?
[22:43:17] <cybereal> but at least it's possible if you need it :)
[22:43:18] <Woot4Moo> anyone have a solution to my problem?
[22:43:54] <blahjake> ~~pressingonalways reflection
[22:43:54] <javabot> pressingonalways, reflection is http://java.sun.com/tutorial/reflect
[22:43:58] <cybereal> Pred2k5: doubt it
[22:44:03] <cybereal> Pred2k5: it's dated 2000
[22:44:08] *** Absolute0 has quit IRC
[22:44:12] <pressingonalways> thanks blahjake
[22:44:25] <Pred2k5> they use xmlreader
[22:44:33] <cybereal> Pred2k5: it's probably largely still ... "true" but you might be better off reading something more recent since APIs have changed and such
[22:44:35] <cybereal> ~xml
[22:44:36] <javabot> cybereal, xml is http://www.w3.org/XML - XML stands for "eXtensible Markup Language". It looks a bit like HTML except that you can define whatever tag you want. Used to store hierarchical data of any kind into a standard format. See "xml parsing" for how to write or parse XML.
[22:44:42] <cybereal> ~xml parsing
[22:44:42] <javabot> cybereal, xml parsing is best accomplished with one of - XOM @ http://www.xom.nu/ - JAXB @ http://java.sun.com/xml/jaxb/ - JDOM @ http://www.jdom.org/ - XmlMap @ http://tinyurl.com/3pjxjn - JAXP (including StAX as well as the legacy SAX and DOM) @ https://jaxp.dev.java.net/
[22:45:25] *** lolsuper_ has quit IRC
[22:45:59] *** shadewind has quit IRC
[22:46:21] <Woot4Moo> ~jar
[22:46:22] <javabot> Woot4Moo, jar is Java ARchive See http://java.sun.com/tutorial/jar and http://java.sun.com/javase/6/docs/technotes/guides/jar/index.html Also see fatjar and jarjar
[22:47:42] <ebil|work> cheeser, I hate to keep asking :\ here's a snippet I created, the output is supposed to be 1 2 3 4 5, but it ends up being 5 5 5 5 5: http://pastebin.ca/1331908
[22:48:07] <ebil|work> if you get a chance and could take a quick gander at it I'd appreciate it... it's I think as simple as I could come up with
[22:48:23] *** Ivellina has quit IRC
[22:48:36] <ebil|work> the problem with creating a classloader is, I don't necessarily know where the class files are, so I can't load them from disk :)
[22:48:50] *** Ivellina has joined ##java
[22:48:52] *** Blaay has quit IRC
[22:49:07] *** Pred2k5 has quit IRC
[22:49:57] <cheeser> ebil|work: i'd start by not putting all of those in one file.
[22:50:11] *** peepsalot has joined ##java
[22:50:14] <ebil|work> cheeser, they weren't originally, I just did that for ease of pasting?
[22:50:51] *** enoksrd has joined ##java
[22:51:35] <peepsalot> does anything happen if you use -D to set a system property, but do not include '=' or a value afterwards?
[22:51:49] <cybereal> ebil|work: what are you trying to accomplish? your own isolated class pools?
[22:51:59] <surial> ebil|work: General note on your getInstance() logic: It's kinda faulty; it'll break in multi-threaded environments, and you can just go: public static final MyThingie instance = new MyThingie();
[22:52:17] <surial> ebil|work: It won't actually cook up an instance until you refer to the class name, which almost always means you'll shortly be grabbing an instance anyway.
[22:52:22] <cybereal> peepsalot: it sets it to an empty value
[22:52:40] <peepsalot> cybereal, empty string?
[22:52:55] <surial> ebil|work: also, the fact that you CAN cast the Incrementors you make automatically means they aren't being uniquely loaded the way you think they are.
[22:52:56] <ebil|work> cybereal, yes. it's unfortunately necessary :\
[22:53:11] <surial> ebil|work: 5 classes that are the same, but loaded by different loaders, are 100% incompatible with each other.
[22:53:32] <surial> ebil|work: The solution is to create an interface (that you load once), which is implemented by some class (that you load 5 times), and only access the classes via the interface. That would work fine.
[22:53:59] <surial> ~~peepsalot TIAS
[22:53:59] <cybereal> peepsalot: yeah
[22:53:59] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[22:54:04] <cybereal> ebil|work: well you can get this from OSGI
[22:54:14] <ebil|work> surial, I'm trying to keep them seperate...
[22:54:15] *** _graham_ has joined ##java
[22:54:33] <cybereal> ~felix
[22:54:34] <javabot> cybereal, felix is Apache's OSGi container. It's still in incubation, but Apach Sling uses it in an embeddable .war, which isn't a bad idea as far as OSGi and web apps go. Find it at http://felix.apache.org/site/index.html.
[22:54:38] <ebil|work> cybereal, can that work with classes that are already existing? (we assume I can't modify the incrementor class)
[22:54:46] <cybereal> it's not in incubation, I should update that...
[22:55:24] <enoksrd> surial: i'm not sure which i want. i have both 1.5 and 1.6 installed. someone on another computer with only 1.5 installed can build. so i guess i'd like to use 1.5 javac?
[22:55:46] *** _acid__ has joined ##java
[22:55:50] <cybereal> ebil|work: yeah it'll work with existing classes, though in some rare cases you have to do a little finagling to get certain libs working right
[22:55:55] <surial> enoksrd: why?
[22:56:03] <cybereal> ebil|work: at any rate it's just an idea, I don't know your whole situation
[22:56:09] <surial> enoksrd: If you need to create class files that work on a 1.5 JRE< just use source="1.5" target="1.5"
[22:56:48] *** EnderMB has quit IRC
[22:56:51] *** Vantaa has quit IRC
[22:56:52] <ernimril> surial: but that will not give compiler warnings or errors if you use methods that are only in java/6
[22:57:09] <surial> ebil|work: again, your entire infrastructure simply won't work. See, when you cast the thingie your classloader makes to a (Incrementor), that fact causes the classloader of your Main class to load in Incrementor. If you let your memoryclassloader cook up its own version of Incrementor, it will not be instanceof your Main Class'es version of Incrementor.
[22:57:17] <ernimril> surial: so it is generally better to just use the javac from jdk/1.5
[22:57:19] <surial> And in fact gets you the funny error: "Incrementor not assignable to type Incrementor".
[22:57:34] <surial> ernimril: fair enough.
[22:57:43] *** bas-i has quit IRC
[22:57:44] *** wild_oscar has left ##java
[22:58:06] <surial> ebil|work: This part of using multiple class loaders seems to have confused you. I don't think you're ever going to make this work yourself (you may get OSGi to work, though) unless you grok this.
[22:58:23] <phix> hey, I extend a JPanel which contains a JComboBox, when the JPanel gets focus I want it pass the focus to the JComboBox straight away, what is the best way to do this? override requestFocusInWindow? or provide a FocusTravservalPolicy?
[22:58:25] <ebil|work> surial, yeah, I've been trying to get my head around it
[22:59:04] <ebil|work> don't quite think I'm getting it :\
[22:59:07] <ebil|work> at all
[22:59:47] <enoksrd> surial: thanks. the .java files were written by someone using java1.5. i just want them to build. when i use 1.6 i get a bunch of errors about "error in opening zip file" for all the .jars
[23:00:06] <surial> enoksrd: I seriously doubt that you are going to solve this problem by switching to an older version of javac.
[23:00:12] <surial> enoksrd: I'm guessing that your jars are corrupted.
[23:00:21] <enoksrd> surial: oh
[23:00:31] <enoksrd> surial: ok, thanks, i'll try new jars
[23:00:36] <surial> enoksrd: jars are just zip files.
[23:00:42] <surial> enoksrd: if unzip can't read them, they are fucked.
[23:00:44] *** Ivellina has quit IRC
[23:00:54] <tieTYT2> ~break
[23:00:55] <javabot> Please the JLS for information about the break keyword: http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#6842
[23:01:02] <enoksrd> surial: i'll try unzipping them manually
[23:01:32] <surial> ~no, break is a keyword to indicate you want to break out of a for or while loop. See the JLS for more info: http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#6842
[23:01:32] <javabot> I forgot about break, surial.
[23:01:33] <javabot> Okay, surial.
[23:02:10] <enoksrd> surial: regular unzip on command line successfully unzips them
[23:02:11] <surial> phix: probably by setting a listener on the JPanel's focus.
[23:02:23] <surial> enoksrd: Okay. And what were you trying to do with java/ant?
[23:02:31] <AMcBain> that's a bit of a "bug" ... it shouldn't tell you it forgot about it if you're doing the "no, " syntax ... but I bet it is already fixed in the repo ...
[23:02:54] *** tranceNRG has joined ##java
[23:03:12] <phix> surial: ah ok, onFocus then call jComboBox.requestFocusInWindow()?
[23:03:26] <surial> Isn't there just a setFocus()
[23:03:27] <surial> ?
[23:03:37] <surial> ~javadoc JComboBox.requestFocusInWindow()
[23:03:38] <javabot> I don't know of any documentation for JComboBox.requestFocusInWindow()
[23:03:43] <surial> ~javadoc JComboBox
[23:03:48] <javabot> surial: http://is.gd/iXKS [javax.swing.JComboBox]
[23:04:32] <surial> Seems like the method you want. Give it a spin.
[23:04:39] <enoksrd> surial: trying to compile the .java files in src/ and store the .class files in classes/
[23:04:49] <surial> enoksrd: paste your build.xml.
[23:04:51] <surial> ~~enoksrd pastebin
[23:04:51] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[23:05:18] *** Yustme has quit IRC
[23:07:16] *** Woot4Moo has quit IRC
[23:07:24] <enoksrd> surial: http://rifers.org/paste/show/8760
[23:07:58] <surial> and that doesn't work?
[23:07:59] <surial> huh. weird.
[23:08:09] <surial> And all your jar files in lib/ unzip properly?
[23:08:46] <enoksrd> surial: it works for a simple example where i downloaded the .jar from the maintainer
[23:09:02] <enoksrd> surial: but not for the complex codebase with many .jars copied from someone else
[23:09:19] <enoksrd> surial: the copied .jars unzip with unzip and jar -xf
[23:09:23] <surial> I'm just guessing at this point, but perhaps one of the jar files is borked.
[23:09:25] *** exbio has joined ##java
[23:09:29] <enoksrd> surial: but when i run ant compile it get
[23:09:32] <surial> and that one jarfile is mucking with it.
[23:09:38] <svm_invictvs> debelopers developers developers!
[23:09:44] <svm_invictvs> Oh wait, that's C#
[23:09:54] <tieTYT2> anyone know a shortcut in idea to close all those bottom windows at once?
[23:10:18] <enoksrd> surial: [javac] error: error reading /home/collins/e/crono/webapps/cronodemo/WEB-INF/lib/backport-util-concurrent.jar; error in opening zip file
[23:10:25] *** gengid has joined ##java
[23:10:34] <surial> well, unzip that one. Is it broken, or does it work fine?
[23:10:37] <surial> and what happens if you run:
[23:10:38] *** convivial has quit IRC
[23:10:43] <surial> jar tvf lib/backport-util-concurrent.jar ?
[23:10:49] <enoksrd> surial: it unzips fine
[23:10:53] <surial> (tvf means: list all files in archive, it won't create or delete any files).
[23:11:30] <gengid> why when im adding a scrollbar the window is becoming really small isn't it set by xxx.setSize(arg0)
[23:11:43] <enoksrd> surial: the jar tvf prints a bunch of files and i don't see any errors, also exit status is zero (echo $?)
[23:12:14] *** ebil|work has quit IRC
[23:12:24] <enoksrd> surial: don't know why this would matter, but the .jar files were copied from a macintosh onto my linux comp
[23:12:27] <surial> this is getting weirder and weirder.
[23:12:56] <surial> I doubt. The mac voodoo magic is in the resource fork which either wasn't copied over, or if it was, is in a file named ._.filename.ext and is ignored by linux.
[23:13:07] *** kavon has joined ##java
[23:13:42] <surial> I have no idea what the heck is going on then. the jar tool and ant ought to be using the exact same library to open that file.
[23:13:53] <surial> anyone here know how you can get ant to tell it what kind of javac its using?
[23:13:59] <surial> or even on what JVM its running?
[23:14:26] <phix> surial: ok
[23:14:32] <phix> so setFocus()?
[23:15:24] <blahjake> surial: try setting verbose="true"
[23:15:42] <blahjake> surial: the build.compiler property should contain the general type it will use
[23:16:11] <surial> phix: no, requestFocusInWindow seems right. Try that. If it fails, try setFocus.
[23:16:17] <surial> enoksrd: caught what blahjake just said?
[23:17:04] <enoksrd> surial: yeah
[23:17:31] *** bindaas has quit IRC
[23:18:55] <enoksrd> blahjake: where would i set verbose=true? it tried a global <property name="verbose" location="true"/> and a command line -Dverbose=true
[23:18:55] <phix> surial: done
[23:18:56] *** Bollinger has quit IRC
[23:19:14] <enoksrd> blahjake: i get a bunch of stuff with command line -v, but no build.compiler
[23:19:18] <blahjake> enoksrd: in the javac task
[23:19:53] *** kavon has quit IRC
[23:19:59] *** kavon has joined ##java
[23:20:03] *** beol has quit IRC
[23:20:19] <enoksrd> blahjake: doesn't seem to do anything
[23:21:06] <blahjake> enoksrd: is your javac forking or not?
[23:21:18] <enoksrd> blahjake: no
[23:21:27] *** Therx has joined ##java
[23:21:31] <pfn> surial, ant -verbose
[23:21:35] *** beol has joined ##java
[23:22:01] *** Varox has joined ##java
[23:22:05] *** rockyrock has joined ##java
[23:22:25] <enoksrd> pfs, surial, blahjake: the -verbose/-v does say this: Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.10/jre
[23:22:36] <rockyrock> hi guys, how can i deal with languages other than English in Java? Like Arabic.
[23:22:39] <Therx> is there an efficient way of converting an int[] into a byte[] (i.e. convert each int into 4 bytes). Profiling my code suggests the obvious way is slow.
[23:23:05] *** rollins has quit IRC
[23:23:16] <pfn> you mean an int into a byte[]?
[23:23:18] <surial> Therx: I don't think there's a built in way, no.
[23:23:44] <Therx> pfn: well a lot of int[] into more bytes
[23:24:01] <surial> pfn: He wants to convert new int[] {0x12345678, 0x87654321} into new byte[] { 0x12, 0x34, 0x56, 0x78, 0x87, 0x65, 0x43, 0x21}.
[23:24:17] <pfn> and what's the obvious way?
[23:24:19] <surial> Which I don't think you can do particularly quickly in vanilla java.
[23:24:23] <surial> pfn: a for loop.
[23:24:41] <pfn> it shouldn't take very long
[23:24:42] <surial> Therx: One glaring issue here is endian-ness.
[23:24:43] <ernimril> Therx: why do you need to convert? can you not wrap it into something that just keeps the ints and keeps track of wher to get the next byte from?
[23:24:43] *** kercyr has quit IRC
[23:24:57] <enoksrd> pfs, surial, blahjake: i tried downloading a fresh copy of one of the .jars and the errors for that .jar disappear, so i'll just dl a fresh copy of the other 12 from the maintainers ...
[23:24:57] <surial> Wait, you can do this.
[23:25:00] <Therx> it's for sending over a network
[23:25:04] <surial> Therx: Look at IntBuffer and ByteBuffer.
[23:25:06] <surial> ~javadoc Buffer
[23:25:08] <surial> Those buffers.
[23:25:12] <javabot> surial: http://is.gd/iXSm [java.nio.Buffer]
[23:25:19] <pfn> surial, indeed, interesting way to do it
[23:25:19] <enoksrd> pfs, surial, blahjake: thanks a lot for your help!
[23:25:27] <surial> enoksrd: still very weird, but glad you've got ahandle on the problem.
[23:25:28] <Stephmw> also look at the Javolution Struct packages
[23:25:48] <pressingonalways> why can't i in a switch/case statement do: default: System.err.println("Error"); return false; ?
[23:26:00] <surial> Therx: you can push buffers across a network verbatim. Should definitely be what you're looking for.
[23:26:09] <surial> pressingonalways: You can.
[23:26:18] <pressingonalways> i get "unreachable statement"
[23:26:29] <pfn> pressingonalways, then it's unreachable
[23:26:33] <pfn> if it says it's unreachable, it is
[23:26:37] <pr3d4t0r> pressingonalways: Paste your snippet here: http://eugeneciurana.com/pastebin -- let's have a look.
[23:26:43] <Therx> ok. what are the concrete subclasses of those buffers?
[23:26:45] <pressingonalways> k
[23:26:45] <blahjake> surial: are you sure about the buffers? ByteBuffer is abstract
[23:27:07] <blahjake> only a memory mapped concrete subclass that i see
[23:27:19] *** enoksrd has quit IRC
[23:27:19] <ernimril> Therx: ByteBuffer.wrap(new byte[intArray.length*4]);
[23:27:21] <pfn> blahjake, use any allocate
[23:27:24] <pfn> or wrap
[23:27:35] <Therx> right ok, thanks i'll have a look
[23:27:40] *** ech0 has quit IRC
[23:27:47] *** Junior has quit IRC
[23:28:09] <pressingonalways> http://eugeneciurana.com/pastebin/pastebin.php?show=40089 why doesn't it allow me to return false at the end of the switch staatement?
[23:29:08] *** UK-sHaDoW has quit IRC
[23:29:14] <surial> blahjake: Use BteBuffer.wrap
[23:29:17] <surial> or allocate or whatever.
[23:29:39] <pfn> pressingonalways, looks ok to me, pastebin exact error
[23:29:54] <repnop> ~~ pressingonalways test case
[23:29:54] <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.)
[23:30:07] *** timte has quit IRC
[23:31:23] *** Frostix has joined ##java
[23:31:36] <pressingonalways> odd, it works now
[23:32:25] *** OsAC has joined ##java
[23:33:01] *** rockyrock has left ##java
[23:34:27] *** gregor_k has quit IRC
[23:34:28] *** MacFlecknoe_ has quit IRC
[23:37:58] *** hWsg21 has joined ##java
[23:37:59] *** BobSapp has joined ##java
[23:38:05] *** juanez has quit IRC
[23:38:37] <BobSapp> Hello guys, im writing a neural network application thats supposed to recognise when i whistle
[23:38:51] *** hWsg21 has left ##java
[23:38:55] *** durka42 has quit IRC
[23:39:06] <BobSapp> i know the logic part, but whats a good way of reading the sound information from like a wav file or something?
[23:39:18] <cheeser> ~jmf
[23:39:18] <javabot> cheeser, jmf is Java Media Framework. You can find more information at: http://java.sun.com/products/java-media/jmf/index.jsp
[23:40:15] <OsAC> about to install tomcat6 on ubuntu :-p , anyone knows can I also get it to serve php ?
[23:40:30] <OsAC> googling allready ..
[23:40:33] *** TheCastor has quit IRC
[23:40:54] <cheeser> ~~ OsAC quercus
[23:40:54] <javabot> OsAC, quercus is a java implementation of php5. See http://quercus.caucho.com/ . Or don't, if you value your sanity.
[23:41:39] <OsAC> cheeser: cheers :-)
[23:42:38] <cheeser> 8^)=
[23:42:48] *** genesiss has quit IRC
[23:43:09] *** poseidon has joined ##java
[23:43:32] *** indeterminatus has quit IRC
[23:45:46] *** kansan has left ##java
[23:47:24] *** beol has quit IRC
[23:48:18] *** skoskav has quit IRC
[23:48:42] *** dv_ has joined ##java
[23:48:53] *** skoskav has joined ##java
[23:49:07] *** tansaku has quit IRC
[23:49:44] *** lorbrito has joined ##java
[23:49:49] *** gregor_k has joined ##java
[23:50:38] *** durka42 has joined ##java
[23:50:46] *** codethief has quit IRC
[23:51:52] <lorbrito> some has a fuction of getting the dates between 2 dates someting like LIst<Date> x =dates.getDates(from,to);
[23:53:24] *** bas-i has joined ##java
[23:55:49] *** toytoy has quit IRC
[23:56:39] *** vix85 has quit IRC
[23:58:13] *** imohax has quit IRC
[23:58:18] *** MichielH has quit IRC
[23:58:21] *** jdolan_ has quit IRC
[23:58:41] *** bas-i has quit IRC
[23:59:30] *** rindolf has quit IRC
top

   February 9, 2009  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | >