Switch to DuckDuckGo Search
   February 23, 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:49] <marvi> t3mp3st: "RMI uses a technology called Object Serialization to transform an object into a linear format that can then be sent over the network wire."
[00:00:55] <aslag> you might enjoy reading Daniel Dennett's "Consciousness Explained"
[00:01:02] <aslag> he's a premiere philosopher of mind
[00:01:20] *** BigAllan has quit IRC
[00:01:25] <marvi> t3mp3st: you can use any object that is seralizable as parameter or return value in your RMI exported service.
[00:01:29] <gjvc> aslag, also the origins of concsiousness in the breakdown of the bicameral mind
[00:01:41] <_W_> I'm glad to know consciousness has been explained. By Dennet or by cybereal
[00:01:47] <zrunn> pilkarn: I think you do something like new ImageIcon(ImageIO.read(new FileInputStream(new File(" ...
[00:01:48] <aslag> oh, and for "metaphysics", http://plato.stanford.edu/entries/metaphysics/#WorMetConMet
[00:01:50] <cybereal> heh
[00:01:51] <aslag> .. is a good start
[00:02:12] <aslag> pro tip: it doesn't mean "beyond physics" or "more than physics" or "mystical"
[00:02:14] <marvi> t3mp3st: http://java.sun.com/developer/onlineTraining/rmi/RMI.html#RMIInterfaces
[00:02:15] <r0bby_> this is one of the biggest waste of my screen real estate -- this whole conversation ;)
[00:02:39] <aslag> r0bby_ : I know, what a crime, huh?
[00:02:55] <cybereal> r0bby_: indeed, and after all of that, the original point was never even addressed, aren't IRC arguments fun?
[00:03:06] <marvi> t3mp3st: naturally the implementation has to be on both the client and server's classpath.
[00:03:56] <aslag> I'll start work on my open-source car and washing machine, since my adherence to open-source softare ideals require it
[00:04:33] *** sepult has joined ##java
[00:04:33] *** gregor_k has quit IRC
[00:04:34] <zrunn> You think that's funny but if there were such things, people would buy them... besides, there are kit cars
[00:04:43] <_W_> and I still wonder how ideals can be missplaced
[00:05:13] <cybereal> indeed, it's entirely plausible to have loads of technology without using someone else's proprietary ideas, though you'll hit patent issues repeatedly if you really wanted to try
[00:05:20] <cybereal> there ar eprojects for open source designs of CPUs, BIOSes
[00:05:21] <marvi> aslag: Sun has open sourced a CPU.
[00:05:38] <cybereal> the really hard core freetards are running linux on their own hardware :)
[00:05:54] <_W_> one thing you won't see any time soon; an truly open mobile phone
[00:05:57] <cybereal> of course, I tend to argue that things are often proprietary even if they're free and open
[00:06:00] <t3mp3st> marvi: hm, this stuff makes sense. I'm just not clear when a method argument should have the type of the remote interface, and when its okay to be the actual implementation type (Foobar [implements Remote] vs. FoobarImpl [extends UnicastRemoteObject])
[00:06:13] <aslag> marvi: indeed, and I'm bound to use such open-source designs or I face contradicting my values, clearly
[00:06:15] <zrunn> The Android Dev Phone 1 is pretty open
[00:06:36] <_W_> zrunn, good thing I didn't say "pretty open" then, or I'd have been wrong
[00:06:51] <_W_> on the Internet, to boot!
[00:07:00] <zrunn> well you could unscrew the screws and it would be truly open
[00:07:04] <cybereal> zrunn: and that uh openmoko or whatnot, there's everything from the bottom up hardware to software that's supposedly non-proprietary
[00:08:08] <_W_> when you come down to it, there are actual laws to prevent user control over things like frequencies and network identifiers
[00:08:20] <_W_> (partially for very good reasons)
[00:08:23] <marvi> t3mp3st: the only thing that needs to use an interface is the service class itself. Parameters and arguments works like if you run it locally. With some limits, like Serializable.
[00:08:23] *** whaley has joined ##java
[00:08:26] <cybereal> _W_: indeed
[00:08:59] <zrunn> I thought we just wanted to make money from the large user base on phones.. not change the frequency they use to make calls
[00:09:14] *** bas-i has quit IRC
[00:10:09] <_W_> I wouldn't mind having a phone with a randomized imei for every call
[00:13:30] <Ven]n> if I have a horizontal JSlider, how can I get the arrow and ticks to point upwards instead of downwards?
[00:13:47] <cybereal> Ven]n: that's a factor of your Look and Feel
[00:13:51] <t3mp3st> marvi: So even if a remote JVM were to use a local instance, it would use the type "FoobarImpl" and not "Foobar"? It seems like the remote thing must always use the "Foobar" since the other methods in FoobarImpl may not be remote
[00:14:31] <Ven]n> cybereal, direction cant be changed?
[00:14:45] *** push[EAX] has joined ##java
[00:15:31] *** squiddle has quit IRC
[00:15:49] <cybereal> Ven]n: unless by direction you mean vertical vs. horizontal orientation, no, the appearance of the control is defined by the L&F
[00:15:54] <marvi> Foobar is the service? Yes, then the client should always use the interface. It should not even need to have the implementation in its classpath.
[00:15:58] <push[EAX]> Mmmmm open source biscuits....
[00:16:34] <cybereal> I bet there's at least one public domain recipe for biscuits
[00:16:38] <Ven]n> cybereal, crap.. thanks
[00:16:41] <cybereal> can't get much more open than that
[00:18:46] *** pilkarn has quit IRC
[00:19:06] <zrunn> If I use the JNDI DNS service, does it cache that stuff forever, like InetAddress, or does it behave well for long running servers?
[00:19:39] *** jez9999 has joined ##java
[00:19:52] <jez9999> Hi. What does static { ... } do, inside a class in Java?
[00:20:12] <cybereal> jez9999: it's executed when the class it's on is loaded, in a static context
[00:20:30] <jez9999> hum, that's something c# doesnt have isn't it?
[00:20:42] *** TooAngel has joined ##java
[00:20:56] *** Ven]n has quit IRC
[00:21:22] *** rainmann has quit IRC
[00:21:31] <cybereal> I don't know C# so I don't know the answer
[00:22:06] *** rainmann has joined ##java
[00:22:14] *** yxz97 has joined ##java
[00:22:29] <yxz97> Good evening
[00:22:34] *** TooAngel has left ##java
[00:24:00] *** LostMonarch has quit IRC
[00:26:33] *** twobytes is now known as zerobytes
[00:30:12] *** aksn has quit IRC
[00:31:19] *** flippo has joined ##java
[00:32:42] *** c369 has quit IRC
[00:34:39] *** Inc` has quit IRC
[00:35:10] *** sphenxes has quit IRC
[00:35:23] *** abruptus has quit IRC
[00:38:55] *** mattorantimatt has quit IRC
[00:40:21] *** tissue has quit IRC
[00:41:21] *** senxhnsshp has joined ##java
[00:43:45] *** das7002 has joined ##java
[00:44:01] <das7002> is this a good book to have for a new Java programmer http://www.borders.com/online/store/TitleDetail?sku=0470124512 ?
[00:45:20] <marvi> das7002: I recommend Head First Java for a beginner.
[00:46:01] *** ankylose has quit IRC
[00:46:27] <das7002> I am considering the "for dummies" edition since I have had good expierences with them and I was wondering if anyone else has used it
[00:47:04] <aceofspades19> ~book
[00:48:01] <benJIman> Head first java is terrible imo.
[00:48:15] <cybereal> head first everything
[00:48:17] <cybereal> really
[00:48:21] <cybereal> aceofspades19: bot's MIA
[00:48:33] <aslag> I agree; I liked Core Java by Horstmann and Cornell
[00:48:41] *** SystemWizard has quit IRC
[00:49:04] <waz> cheeser and the bot went on a camping trip
[00:49:29] <marvi> benJIman: Doesn't work for all, I can imagine. But it has worked perfectly for a few friends of mine.
[00:50:15] *** zrunn has quit IRC
[00:50:22] <aceofspades19> waz: when do they plan to be back
[00:50:58] <das7002> when they get back ;)
[00:51:00] <waz> you never know with their special time
[00:53:31] *** Daniel_H has quit IRC
[00:53:42] *** das7002 has left ##java
[00:54:36] *** EspenG has quit IRC
[00:55:08] *** Mkop2 has joined ##java
[00:55:21] <r0bby_> head first java first says scriptlets are bad, then proceed to use them
[00:55:35] <r0bby_> head first servlets and jsp i think sorry
[00:55:39] *** ryuho has joined ##java
[00:55:57] <r0bby_> s/i think.*//
[00:57:08] <r0bby_> I wish IDEA would stop compiling mid-way through or do it in a way that's not intrusive.
[01:00:43] *** panquequinha has joined ##java
[01:05:04] *** _bugz_ has joined ##java
[01:06:09] *** zrunn has joined ##Java
[01:06:51] *** Inc` has joined ##java
[01:09:56] *** Petein has joined ##java
[01:10:13] <Petein> which is the easiest way to create a java 2D-3D game?
[01:10:38] *** trustin has joined ##java
[01:13:03] <r0bby_> ~~ Petein java2d
[01:13:06] *** alg0rithm has quit IRC
[01:13:07] <r0bby_> fuck
[01:13:15] <r0bby_> Petein: google java 2d
[01:13:44] *** radixor has joined ##java
[01:15:17] *** cybereal has quit IRC
[01:19:02] *** mbroeker has quit IRC
[01:19:35] *** twolf has quit IRC
[01:19:37] *** J0bk has joined ##java
[01:20:11] *** twolf has joined ##java
[01:21:44] *** zophy has quit IRC
[01:22:45] *** senxhnsshp has quit IRC
[01:22:46] *** zmanning has joined ##java
[01:22:54] *** teralaser has quit IRC
[01:24:35] <Petein> r0bby_ thanks
[01:25:55] *** aweber has quit IRC
[01:26:22] *** systat has quit IRC
[01:27:40] *** dv_ has joined ##java
[01:30:21] *** zrunn has quit IRC
[01:33:53] *** runev has joined ##java
[01:34:00] <runev> I've got some code over at http://pastebin.ca/1344501 which simply tries to load a file as an Image object, however I'm always getting the "Image not found" error triggered by my code. The test.java file is in the "test" package, while the images is in the "test.images" package. I've tried stuff like setting path to "/src/images/test.gif", "images/test.gif" etc, no luck. Any pointers?
[01:34:52] *** Daniel_G has joined ##java
[01:35:05] *** magmarules has joined ##java
[01:35:22] *** senxhnsshp has joined ##java
[01:35:24] <senxhnsshp> _W_: android isnt open enough?
[01:35:43] *** CrypticSquared has joined ##java
[01:36:18] *** stillRise has quit IRC
[01:36:31] <magmarules> hello there, anyone here has expirience with the stripes framework ? I have built a link using: stripes:link event="view" beanclass="controllers.CalculatorController". When i press it just tells me there is nothing there (althought the url seems to be correct acording to my @Urlbinding =/
[01:36:48] *** zophy has joined ##java
[01:37:44] <magmarules> I getting extremely frustrated that after an hour and a half i cant do a stupid basic link ! and ppl wonder why Rails is so successful =(
[01:38:35] <kavon> I've never seen this kind of syntax honestly
[01:38:35] <aslag> umm, rails is awfully n00b. you're only saying that people, then, are n00b and you're getting close to calling yourself one
[01:38:55] <aslag> pro tip: stop doing it wrong
[01:38:55] <magmarules> aslag: so be it, it works
[01:39:12] <marvi> runev: "images/test.gif" will use cwd from the jvm. It will depend on where you execute it.
[01:39:21] <kavon> magmarules: other than the :? operator and enhanced for loops, I've never seen a semicolon used anywhere in JAva
[01:39:24] <aslag> if by works you mean that it doesn't scale and it's slow and inflexible, sure :)
[01:41:04] <marvi> runev: try an absolute path if you want to be sure. A better solution would be to load images from the classloader with getResourceAsStream.
[01:41:10] <magmarules> kavon: sorry where did i use a semicolon? maybe i pasted something wrong =)
[01:41:13] <bobbytek2> semicolons are used all over
[01:41:22] <bobbytek2> anyways, java supports elvis operator now?
[01:41:42] *** eidolon has joined ##java
[01:42:22] <runev> marvi: So it'll be looking in my running directory? Well, I'm using Eclipse so guess it'd be /home/runev/workspace/test/bin/test.gif
[01:42:41] <runev> marvi: I'll check out the getResourceAsStream thingy first though
[01:43:39] *** Petein has quit IRC
[01:44:02] <marvi> Or getResource if you want the File. ImageIO.read(getClass().getResource("path/to/img.png");
[01:45:31] <runev> marvi: I'll look that up as soon as i can get my code to find the image file, seems that whatever i do i'm supplying the wrong path
[01:45:39] *** shadewind has quit IRC
[01:46:21] <marvi> runev: common issue. Google gives plenty of hits.
[01:46:44] <kavon> magmarules: i meant colon earlier (before i got myself a hot chocolate)
[01:46:58] *** aslag has quit IRC
[01:47:04] *** radixor has quit IRC
[01:47:04] <magmarules> =)
[01:47:14] <kavon> magmarules: stripes:link event="view" beanclass="controllers.CalculatorController"
[01:47:15] *** zophy has quit IRC
[01:47:16] <senxhnsshp> aslag: how is rails noob? for webapps I hardly find Java very suited, I much prefer Python.
[01:47:25] *** alg0rithm has joined ##java
[01:47:43] <kavon> Rails is probably one of the main highlights of Ruby (and one of the only ones)
[01:48:05] <kavon> i don't know where aslag is getting his information (or if he is biased)
[01:48:47] <marvi> I heard that a lot of Ruby devs are moving away from Rails to other Ruby frameworks.
[01:49:10] *** senxhnsshp has quit IRC
[01:49:11] <magmarules> kavon: here : http://pastie.org/397025
[01:49:46] <kavon> marvi: Ruby on Asphalt
[01:50:15] <magmarules> I dont care if it is rails or another framework, as long as it lets me work and not stand in my way =/
[01:50:34] *** zophy has joined ##java
[01:50:36] *** tag has quit IRC
[01:50:50] <kavon> magmarules: I'm not experienced in whatever libraries or framework you're working in with Java
[01:51:09] <magmarules> ok, but that is where the : are comming from =)
[01:51:13] <kavon> magmarules: the Java forums have always been an excellent resource for me, they have many sections
[01:51:17] <marvi> kavon: Ruby on Shinkansen maybe?
[01:51:23] <magmarules> ok
[01:52:28] *** tag has joined ##java
[01:52:41] *** pilkarn has joined ##java
[01:52:53] *** stillRise has joined ##java
[01:53:39] <pilkarn> so I noticed I cans et background of a JPane with setBackGround but I can't set it to an image. is it the JFrame or JPane I should add a skin to if I want one? I still can't find an easy way to do it.
[01:56:26] *** HockeyInJune has quit IRC
[01:56:54] *** HockeyInJune has joined ##java
[01:58:19] *** deadbeef has quit IRC
[02:00:14] <pilkarn> wii! it worked. but it is not what i wanted. i managed to set the icon. what i want to set it is the background.
[02:02:34] *** LumberCartel has joined ##java
[02:02:43] <linear`> is a class variable considered an instance of the class
[02:02:53] <LumberCartel> Did Java ever get fixed to read one byte (or character) at a time from System.in? Thanks in advance.
[02:03:07] <waz> linear`: that didn't make sense
[02:03:40] <[pwgr]> java is and will forever be... broken
[02:03:59] <linear`> i mean is a class variable considered a class's instances
[02:04:04] *** Greyhound_ has joined ##java
[02:05:22] <waz> linear`: that doesn't even make sense
[02:05:27] <waz> so no
[02:06:16] <linear`> then what do you consider a class' instances
[02:06:19] <LumberCartel> Hmm. Java isn't broken in a general sense, but this problem makes it impossible to develop decent types of console apps.
[02:07:21] <waz> I consider them class's instances
[02:07:37] <linear`> ...
[02:08:03] <waz> show me code
[02:08:12] <waz> I'm very confused by your phrasing
[02:08:15] <waz> ~pastebin
[02:08:30] <linear`> im reading effective java and they keep referring to 'a class who instances cannot be modified'
[02:08:37] *** pilkarn has quit IRC
[02:08:43] <linear`> s/who/whose
[02:09:02] *** pilkarn has joined ##java
[02:09:43] <reverend> LumberCartel: wtf, System.in is an InputStream, so yes, you can read by bytes.
[02:09:52] <reverend> and as far as i know, you could always do so
[02:10:12] <linear`> k nvm i figured it out
[02:10:21] <reverend> at least for the last 10 odd years or so
[02:11:16] *** Greyhound- has quit IRC
[02:13:11] *** viperhr has quit IRC
[02:14:02] <bobbytek2> Anyone using hudson here and would like to share their experiences?
[02:14:24] *** magmarules has quit IRC
[02:15:34] <waz> totally rocks
[02:15:58] <LumberCartel> reverend: The problem is that the user has to press the Enter key before those read() functions will work.
[02:16:47] *** linxuz3r has joined ##java
[02:20:36] <pilkarn> any Swing-gods in here? how do you set the background to an image on a JFrame or JPane?
[02:20:36] *** pilkarn has quit IRC
[02:22:27] *** pilkarn has joined ##java
[02:22:44] *** J0bk has quit IRC
[02:24:34] *** delskorch has joined ##java
[02:25:28] <r0bby_> pilkarn: ##swing knows more
[02:28:02] *** zed_DX has quit IRC
[02:28:26] *** t3mp3st has quit IRC
[02:29:30] *** jez9999 has left ##java
[02:30:31] *** Daniel_G has quit IRC
[02:31:25] *** zmanning has quit IRC
[02:31:36] *** zmanning has joined ##java
[02:31:43] *** AlanasAnikonis has joined ##java
[02:32:15] *** Daniel_G has joined ##java
[02:33:02] *** yxz97 has left ##java
[02:33:31] *** fridim_ has quit IRC
[02:36:20] *** NiSoOo has quit IRC
[02:38:45] *** isoieci has quit IRC
[02:42:20] *** cher has quit IRC
[02:48:36] *** stillRise has quit IRC
[02:50:41] *** bitshuffler has quit IRC
[02:51:36] *** pilkarn has quit IRC
[02:51:54] *** rajesh has quit IRC
[02:53:39] *** Niike has joined ##java
[02:53:50] <bobbytek2> Anyone care to comment on itext development?
[02:54:28] <marvi> bobbytek2: we use it a lot.
[02:54:30] *** senxhnsshp has joined ##java
[02:54:42] <bobbytek2> is it feasible to create reports with?
[02:54:57] <marvi> Quite low level.
[02:55:23] <bobbytek2> I find jasper reports to be too restrictive in terms of layout
[02:55:49] <bobbytek2> but xsl-fo too powerful
[02:55:54] <marvi> You can do anything in itext. But it will take some time.
[02:56:05] <marvi> Yeah, I would say iText is in the middle there.
[02:56:20] <marvi> xsl-fo was to complicated.
[02:56:39] *** senxhnsshp has left ##java
[02:56:39] *** The_Birdman has joined ##java
[02:57:06] <bobbytek2> marvi: do you mind taking a look at a report to see how simple it would be to do with itext?
[02:57:16] *** ramdam has joined ##java
[02:57:19] *** examancer has joined ##java
[02:57:34] <marvi> bobbytek2: sure.
[02:58:08] *** _bugz_ has quit IRC
[02:58:46] <bobbytek2> check your pm :)
[02:59:50] *** phyburn has quit IRC
[03:01:26] *** Gevaudan82 has joined ##java
[03:01:27] *** _bugz_ has joined ##java
[03:02:10] *** orgy` has quit IRC
[03:02:55] *** Greyhound- has joined ##java
[03:09:59] *** rlubke has joined ##java
[03:13:54] <svm_invictvs> Gika
[03:13:56] <svm_invictvs> Hola
[03:14:07] <svm_invictvs> heh
[03:16:43] *** zophy has quit IRC
[03:16:55] *** Greyhound_ has quit IRC
[03:17:54] *** LordMetroid has quit IRC
[03:19:38] *** dv_ has quit IRC
[03:22:00] *** ries has quit IRC
[03:27:25] *** espire has joined ##java
[03:28:40] *** zmanning has quit IRC
[03:29:23] *** marvi has quit IRC
[03:29:44] *** sepult has quit IRC
[03:31:41] <Wicked> hmm hello all. i have this code http://pastebin.com/m519850f1 that is part of a anti spam ircbot im writting. the code works but it seems to have a delay. its set to react after something has been repeated 3 times but alot of times it will let more then 3 repeats. im positive thats not the best code...but am i missing something that is obviously delaying things?
[03:34:51] *** asap18 has quit IRC
[03:36:06] *** examancer has quit IRC
[03:36:49] *** staykov has quit IRC
[03:37:35] <LumberCartel> Is there a way to read from STDIN without the line buffering?
[03:41:01] *** JustinLei has joined ##java
[03:42:29] <push[EAX]> you'll need a buffer that's for sure
[03:42:36] <push[EAX]> but you're not forced to read by line
[03:43:18] <LumberCartel> Is there a way to read each keystroke as the user types it, without setting up GUI stuff?
[03:43:33] <r0bby_> LumberCartel: BufferedReader.read()
[03:43:46] <r0bby_> i think may work
[03:43:59] <r0bby_> er wait that won't work i dont think
[03:44:00] <LumberCartel> r0bby_: I tried that, but the same problem occurred, but I'll take another look now.
[03:44:39] <LumberCartel> Nope, same problem there too.
[03:44:51] <r0bby_> what do u need to do?
[03:45:02] <LumberCartel> I need to read user keystrokes, as they type them.
[03:45:13] <LumberCartel> ...as a console application.
[03:45:36] <LumberCartel> For example, if I want to write a Java version of the MS-DOS "choice.com" utility, line-buffered input is simply not suitable.
[03:47:18] *** CrypticSquared has quit IRC
[03:53:07] <LumberCartel> Well, it will be nice when Sun finally gets around to fixing this problem. For now, it means that I have to use other languages to accomplish what I need. I'd much prefer to do it in Java, but for now I'll just have to wait (this was a problem back with Java 1.4, and no doubt since the beginning, and Sun has had it on their to-list since 1.4 for sure). SIgh.
[03:53:31] *** eduardopl has joined ##java
[03:54:13] *** meanburrito920_ has joined ##java
[03:54:27] * LumberCartel logs into the Sun.com web site to try to find that to-do list item and bother Sun about it again.
[03:56:06] <waz> I'm sure they'll get right on it
[03:56:12] <LumberCartel> Heheh.
[03:56:25] <waz> given the focus on console apps
[03:56:26] <LumberCartel> I think it's pathetic that this basic functionality isn't available.
[03:56:30] <LumberCartel> Heheh.
[03:56:40] <svm_invictvs> hm...
[03:56:43] <svm_invictvs> aded more to my resume.
[03:56:47] <LumberCartel> There's a whole bunch of console games I'd like to make too.
[03:56:54] <LumberCartel> Java simply won't be an option if I can't do this.
[03:57:22] <LumberCartel> If there's an AWT method I can use to read the keyboard, but that doesn't require I set up a GUI, that would probably be okay.
[03:57:36] <LumberCartel> Of course I wonder if it would work on headless non-GUI Unix systems.
[03:58:33] <LumberCartel> Continuously writing to System.in from another thread would be okay as well as a kludge, I suppose, but I suspect Java's System.in won't allow that.
[04:00:04] *** dangertools has quit IRC
[04:00:07] *** mwn3d has joined ##java
[04:01:15] <_W_> LumberCartel, why not just use one of the many console libraries for Java?
[04:01:25] *** dangertools has joined ##java
[04:03:11] *** dangertools has quit IRC
[04:03:17] *** popcornPanic has quit IRC
[04:03:34] <LumberCartel> Which console libraries would you recommend? I'd like to use something that's cross-platform, of course.
[04:03:56] <LumberCartel> ...and doesn't have odd dependencies of third-party programs running before-hard.
[04:04:31] *** dangertools has joined ##java
[04:04:48] <r0bby_> commons has some.
[04:04:56] <r0bby_> jcurses
[04:04:58] <LumberCartel> I'm not familiar with commons.
[04:05:03] <r0bby_> apache commons?
[04:05:10] <LumberCartel> Oh. I'll take a look.
[04:05:10] <r0bby_> http://commons.apache.org
[04:05:42] <r0bby_> I do wonder what the original purpose of commons was before it became what it was
[04:05:50] <LumberCartel> Heheh.
[04:07:19] <LumberCartel> Is this the site for the JCurses library? If so, it hasn't released any files yet. =( http://sourceforge.net/projects/javacurses/
[04:07:52] <LumberCartel> Oh, wait a sec., that's just stupid SourceForge's buggy PHP programming indicating that no files were released.
[04:08:27] <LumberCartel> Apache's will likely support many more platforms; JCurses only has Linux and Windows support.
[04:09:32] *** cactaur has joined ##java
[04:09:46] <r0bby_> apache is just a utility library
[04:09:51] *** eduardopl has quit IRC
[04:09:59] *** roue has joined ##java
[04:10:16] <LumberCartel> I'm looking through Apache's Commons web page there, trying to figure out which sub-project has what I need.
[04:11:11] <r0bby_> http://www.pitman.co.za/projects/charva/index.html
[04:11:15] <r0bby_> other option
[04:11:16] *** trustin has quit IRC
[04:12:47] <LumberCartel> That looks like terminal I/O. An interesting solution indeed, and one that would be extremely useful for the internet, but I'd much prefer direct console input.
[04:12:51] *** werdan7 has quit IRC
[04:13:28] * LumberCartel bookmarks the CHARVA web site because that looks like it will be quite useful for an upcoming project in the near future.
[04:15:01] <LumberCartel> Wow, look at this -- it's truly awesome what CHARVA can do: http://www.pitman.co.za/projects/charva/Screenshots.html
[04:15:06] *** mwn3d has left ##java
[04:15:13] <LumberCartel> That one's a real gem, thanks r0bby_.
[04:15:18] *** andrewkasper has left ##java
[04:15:21] <reverend> LumberCartel: you realize that low level control over console io is a platform dependent thing and the fact that core java doesn't support it isn't a 'problem', it's a 'feature', right?
[04:15:40] <reverend> you're perfectly capable of coding your own native extensions or using someone else's though
[04:16:13] <LumberCartel> reverend: Platform dependent to read one keystroke? Really?
[04:16:21] *** mztriz has joined ##java
[04:16:23] <reverend> uh, yes
[04:16:43] <mztriz> http://pastebin.com/d67d5333f cannot find symbol variable y
[04:16:56] <AlanasAnikonis> eh, so what's java's purpose to exist?
[04:17:11] <AlanasAnikonis> to give us a way to do native stuff? :(
[04:17:22] <reverend> haha
[04:17:35] <AlanasAnikonis> lack of console IO is not a feature, it's a lack of console IO,
[04:17:37] <LumberCartel> Well, the function calls will be different, naturally (e.g., in DOS it's a matter of INT calls; in Widows it's a matter of Pascal or C calls to some DLL's functions; in Unix it's something else). There are applications that all do this in all of these environments.
[04:18:04] <reverend> AlanasAnikonis: no, it's a lack of platform dependent support
[04:18:18] <LumberCartel> Of course I don't expect DOS to be supported, but it is an example.
[04:18:25] <LumberCartel> That doesn't seem right to me.
[04:18:38] <AlanasAnikonis> so, anyone wanna add it in into java 7?
[04:18:43] <LumberCartel> I wonder if someone at Sun was just being lazy.
[04:19:00] <AlanasAnikonis> java.nio.oldshit.console
[04:19:06] <reverend> wow, the lack of clue here is reaching astounding proportions
[04:19:19] <LumberCartel> Java 7 having the ability to read one character from System.in (without needing the user to press Enter) would be very useful.
[04:19:51] *** werdan7 has joined ##java
[04:19:57] <AlanasAnikonis> when I run a java program in the console, I expect to be running in sandbox mode :O
[04:20:12] <reverend> ~javadoc Console
[04:20:20] <reverend> ~javadoc java.io.Console
[04:20:23] *** manunderground has joined ##java
[04:20:42] <manunderground> how can you use Java's Preferences in Vista?
[04:20:50] <manunderground> I'm getting errors about writing to the registry
[04:21:13] <mztriz> I need a little help withs something. I think I've defined what 'y' is. http://pastebin.com/d67d5333f cannot find symbol variable y
[04:22:11] <reverend> there's no variable 'y' in your program
[04:22:29] <reverend> yet you attempt to assign it to the String variable 'sentinel'
[04:22:40] <reverend> and the you try to compare it and another variable called 'Y'
[04:22:41] *** jcp has joined ##java
[04:23:11] * LumberCartel is examining some source code: http://www.jdocs.com/javase/7.b12/java/io/Console.html
[04:23:26] <mztriz> yeah, I tried to make the user enter y to continue the while loop
[04:25:18] <mztriz> So, I have to make another statement assigns y to y? Then change the last highlighted line to y= ?
[04:26:08] *** asap18 has joined ##java
[04:26:58] <AlanasAnikonis> sentinel = "y", whatever sentinel means in your code
[04:27:53] <mztriz> Ah okay. I'll try that. I didn't realise it had to be in quotes, that makes sense. Thanks AlanasAnikonis.
[04:28:02] <AlanasAnikonis> later on sentinel+= does not make just any sense...
[04:28:13] <AlanasAnikonis> also, you should not compare strings with ==
[04:28:17] *** espire has quit IRC
[04:28:26] <AlanasAnikonis> strings have an .equals( ) method
[04:28:27] <jcp> compare them with .equals( )
[04:28:33] <AlanasAnikonis> and equalsIgnoreCase
[04:28:46] *** CrypticSquared has joined ##java
[04:29:36] <AlanasAnikonis> can I say how awful that code is :P
[04:29:37] <AlanasAnikonis> int intBranchCode= Integer.parseInt("branchCode");
[04:29:50] <AlanasAnikonis> that will always throw you an Exception
[04:30:00] *** kater has joined ##java
[04:30:09] <AlanasAnikonis> as will the Double.parseDouble etc...
[04:30:09] <jcp> mztriz: since branchCode isn't a number
[04:30:29] <AlanasAnikonis> i think mztriz is totally unaware what a string and variable is
[04:30:46] <AlanasAnikonis> they're used in completely reverse meaning
[04:30:53] <jcp> Yeah, it looks like it from the little bit I've seen
[04:30:58] <jcp> What code is he checking out?
[04:31:03] * jcp just got here about 20 lines ago
[04:31:14] <mztriz> Sorry, I'm new to this...
[04:31:15] <reverend> yet he probably codes for some large US bank
[04:31:25] <AlanasAnikonis> <mztriz> I need a little help withs something. I think I've defined what 'y' is. http://pastebin.com/d67d5333f cannot find symbol variable y
[04:31:26] <waz> nah
[04:31:37] <waz> we get flunky canucks to do the banking stuff
[04:31:42] <reverend> haha
[04:31:52] <waz> :)
[04:31:58] <AlanasAnikonis> reverend: oh I hope he put Double.parseDouble("morgageInterest");
[04:32:23] <jcp> mztriz: you need to get rid of the quotes around the stuff your passing to Integer.parseInt
[04:32:25] <jcp> and Double.parseDouble
[04:32:38] <jcp> If it's the name of a variable that you're referring to, then it shoudn't have quotes
[04:32:49] <mztriz> Oh... I should have realised that...
[04:32:51] <jcp> If you're talking about a literal string value, not a variable, then it should have quotes
[04:32:53] <mztriz> Thanks.
[04:32:57] <jcp> your welcome
[04:34:38] *** panquequinha has quit IRC
[04:35:09] <jcp> mztriz: and instead of sentinel += ... at the end, you need to do sentinel = ...
[04:35:33] <jcp> Using += appends what the user enters onto the end of the string
[04:35:38] <mztriz> yeah, I fixed that bit thanks
[04:37:41] <mztriz> All right there is one more issue then, http://pastebin.com/d413a7c89 'incompatible types'
[04:37:54] *** Frostix has quit IRC
[04:38:03] <mztriz> Thanks again for your help guys.
[04:39:48] <AlanasAnikonis> first of all ==> while (sentinel.equalsIgnoreCase("y")){
[04:40:47] <r0bby_> AlanasAnikonis: nice spelling error.
[04:40:50] <r0bby_> Mortgage.
[04:41:03] <AlanasAnikonis> hmm, yea
[04:41:29] *** Bonix has quit IRC
[04:41:30] <AlanasAnikonis> mztriz: you never said what line fails for you
[04:41:50] <AlanasAnikonis> i'm not gonna put that into my compiler, I might never get that mess out my system
[04:42:06] <mztriz> Hah, it all works well now.
[04:42:13] <AlanasAnikonis> it does?
[04:42:50] <mztriz> Yeah. http://pastebin.com/d1d61d02b That's updated
[04:42:59] <mztriz> I have a few more things to add in and such but for now it's all working.
[04:43:04] <AlanasAnikonis> by the way, you can use a do { } while (...) loop
[04:43:20] <AlanasAnikonis> where the while is after the loop, so no need to check for sentinel in the beginning
[04:43:51] <AlanasAnikonis> i suck at explaining, but yea... maybe no need to add any confusioin
[04:44:56] *** savage- has joined ##java
[04:44:57] <AlanasAnikonis> mztriz: now, make sure nobody inputs $100.00 into your dialogue
[04:45:13] <AlanasAnikonis> cause the $ sign will make it crash
[04:45:23] <mztriz> Okay
[04:45:51] *** savage- has quit IRC
[04:46:07] *** kater_ has quit IRC
[04:46:34] <AlanasAnikonis> for example, sAmount = sAmount.replaceAll( "$", "");
[04:46:54] <AMcBain> if you're going to use replaceAll, you need to escape the $
[04:46:57] <AMcBain> \\$
[04:47:11] *** lolsuper_ has quit IRC
[04:47:27] <AMcBain> (otherwise it is a regex character meaning "the end of the string")
[04:47:28] <AlanasAnikonis> indeed, it's a RegExp
[04:47:58] *** idea4gud has quit IRC
[04:48:35] <AlanasAnikonis> i forget that in Java 1.5+ you use replace( )
[04:50:06] <mztriz> I'm not really sure how to use replaceAll. I'll have to read about it. For now I'll just put I'll just add not to put any special characters in the dialog.
[04:50:08] *** SystemWizard has joined ##java
[04:51:05] <AMcBain> "You can use any of these things ... but *do not* touch the *red* button. The /green/ one is okay though."
[04:51:29] <The_Birdman> In javadoc we trust for replaceAll http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)
[04:51:37] *** Wicked has quit IRC
[04:51:45] <AlanasAnikonis> i think the code will break if they input anything else than a number from 0-9 and the decimal dot .
[04:51:53] <AlanasAnikonis> even a space should be fatal
[04:52:11] <AlanasAnikonis> damnit, now i have to check up on that fact
[04:53:24] <AlanasAnikonis> System.out.println( Double.parseDouble(" 1.35") ); compiled and ran okay
[04:53:49] <AMcBain> yeah, but if you did 1 1.35, it'll either remove it or throw an exception
[04:53:55] <AlanasAnikonis> System.out.println( Double.parseDouble(" 1.3 54 ") ); this fails with an exception
[04:53:56] <AlanasAnikonis> yea
[04:54:11] <AlanasAnikonis> leading and trailing spaces are okay
[04:54:33] <mztriz> Oh okay.
[04:56:54] <AlanasAnikonis> interesting that the javadoc (for 1.4.2) doesn't mention whitespace in the parseDouble function... in public static Double valueOf(String s) it says whitespace is ignored
[04:57:43] <AMcBain> yeah, well, we're up to Java 6
[04:57:50] <AlanasAnikonis> same in 1.6 documentation. Yoi have to go read the "seeAlso" section
[04:57:56] <AlanasAnikonis> and read the valueOf doc
[04:58:08] <AlanasAnikonis> so no luck there ;)
[04:58:32] <AlanasAnikonis> Btw, I use java 1.7 in a production environment
[04:58:50] <AMcBain> eh, it's not like they pay someone to go through and check and make sure all javadoc entires are 100% correct.
[04:58:55] <AlanasAnikonis> as much production as it gets, for a hobby project exposed to the internet
[04:58:58] <AMcBain> plus it does sort of ignroe whitespace.
[04:59:02] <AMcBain> ignore*
[04:59:07] <AMcBain> (beginning and ending)
[04:59:13] <AlanasAnikonis> well too bad the javadocs aren't a wiki, i'd go and edit it
[04:59:28] <AlanasAnikonis> i have to commit sources ...
[04:59:39] <AMcBain> yeah, if they were a wiki n00bs would have edited it long ago to say what they think it should do, and not what it actually does.
[05:00:06] <AlanasAnikonis> you have that little faith in wikis? :(
[05:00:28] <AMcBain> no, I have little faith in some programmers.
[05:00:59] <AMcBain> languages should do what they want, instead of actually learning the language is the approach some take.
[05:01:48] *** [[thufir]] has joined ##java
[05:02:05] *** rlubke has quit IRC
[05:03:09] *** CrypticSquared has quit IRC
[05:03:37] *** warmwaffles has joined ##java
[05:04:42] *** bungrudi has joined ##java
[05:04:46] <warmwaffles> I am developing a game that will be loading thousands of PNGs. All of which are a total of 30 different types of pngs. Anyone know where I can find a good spriting tutorial where I can load the image one time and just make a reference to that memory location
[05:05:11] *** juacom99 has joined ##java
[05:05:22] <AMcBain> Why not just make a special class that loads up a buffered image and returns sub-images from that buffered image when asked?
[05:05:57] <warmwaffles> explain a bit more. I have a seperate class taht loads the images and thats it. But it has to be inherited
[05:06:18] <warmwaffles> such as public Image loadImage(string p) etc....
[05:06:26] <bungrudi> has anyone ever tried to execute external command in Solaris?
[05:06:35] <bungrudi> using ProcessBuilder that is
[05:07:16] <AMcBain> no, no ... I mean, you make a class that can be instanciated and you send it a path to an image. it then stores locations (gotten from a special descriptor file?) in a map by name, and when you ask it to give you "mushroom" or "questionBox" it knows what location to make into a subimage to return.
[05:07:34] <svm_invictvs> horray
[05:07:37] <AMcBain> (the class will load up the image into memory in the constructor)
[05:07:42] * svm_invictvs finished more resume updates
[05:07:51] <svm_invictvs> Hm...
[05:08:16] <warmwaffles> I was thinking something like that. And another idea I had was just load the images up one time and use static references to the buffered images
[05:08:23] <AMcBain> ew
[05:08:32] * AMcBain should really update his bookmarks to go to the Java 6.0 docs)
[05:08:37] <AMcBain> s/)//
[05:08:37] <juacom99> Hi. can anybody plese help me. I'm trying to append HTML text on a JTextPane and the TP render as plane text instead of renderr it as HTML
[05:08:49] <juacom99> here's my code
[05:08:50] <juacom99> http://paste.ubuntu.com/121675/
[05:08:50] <AlanasAnikonis> bungrudi: googling for Solaris and ProcessBuilder leads to believe that answer to your question is: Yes
[05:09:48] <AMcBain> juacom99: if you don't want it to render it as HTML, escape it then. use &lt; and &gt; for tags.
[05:10:12] <juacom99> on ther contrary
[05:10:18] <AMcBain> and don't say "never happens" ... there's *always* a possility.
[05:10:22] <juacom99> i want it to render on html
[05:10:33] <juacom99> but TP is not doing it :S
[05:11:29] <warmwaffles> never say never and never say always
[05:11:30] <AMcBain> well, it might help if you closed your HTML tag, and wrote nice HTML, but that might not be the issue.
[05:12:03] * AMcBain opens up his personal workspace to see what he does.
[05:12:15] <bungrudi> AlanasAnikonis: ok then, am I assuming right in that ProcessBuilder in solaris is behaving differently than in Linux, that in Solaris ProcessBuilder interfaced directly to the OS while in linux ProcessBuilder interfaced to bash process?
[05:12:32] <AMcBain> ah, I use a JEditorPain
[05:12:33] <juacom99> AMcBain: is not workinf anytway :S
[05:12:35] *** monstrfolk has joined ##java
[05:12:52] <AMcBain> yeah, I'm not sure you can do what you want with a JTextPane ... you might have to go to a JEditorPane
[05:12:57] <AlanasAnikonis> I didn't even know Swing supports inline style attribute :O
[05:13:15] <AMcBain> (colloquially known as JEditorPain because beyond simple stuff ...)
[05:13:27] <AMcBain> AlanasAnikonis: It does, to an extent. Nothing super fancy.
[05:13:40] <juacom99> and is hard cons i have span for 2 things text color and and backbround color
[05:14:00] <juacom99> i'm explainn myself better
[05:14:10] <juacom99> i'm using that for a chat clinet
[05:14:12] <AMcBain> as I said ... try using a JEditorPane.
[05:14:22] <AMcBain> I have a reason for saying this :)
[05:14:27] <juacom99> isn't the same ?
[05:14:31] <juacom99> or really like
[05:14:31] <AlanasAnikonis> bungrudi: unfortunately I have no knowledge of Solaris + ProcessBuilder :(
[05:15:47] <AMcBain> juacom99: http://www.asmcbain.net/images/shortclient/minigui-text.png JEditorPane. You want it.
[05:15:57] *** Epcylon has quit IRC
[05:16:22] <juacom99> AMcBain: that kinda the idea :D
[05:16:36] <juacom99> i need to do something really like that
[05:16:48] *** Lhet has joined ##java
[05:17:11] <joed> Isn't slowaris bourne shell, can't handle same length command line, and some other deficiencies.
[05:17:17] <AMcBain> That was done with HTML, and JEditorPane, some "interesting" code for parsing IRC color formats, and voila!
[05:18:06] <AMcBain> (I have newer photos since then, but the client can't join a channel like it could then :-/ )
[05:18:18] <svm_invictvs> McBain?
[05:18:21] <AlanasAnikonis> ahaha, regressions, gotta love them
[05:18:25] <svm_invictvs> Is that really your name?
[05:18:32] <AMcBain> yeah
[05:18:53] <AMcBain> Thought it was a Simpsons reference or somethign?
[05:18:54] <AlanasAnikonis> It's really "AMcBRain", but he's modest
[05:19:01] <svm_invictvs> Yeah
[05:19:05] <svm_invictvs> Art McBain
[05:19:11] <AMcBain> haha, gotten that before :)
[05:20:02] *** SystemWizard has quit IRC
[05:20:41] <svm_invictvs> heh
[05:20:42] <ramdam> is it possible to have a jar contain another jar inside it?
[05:20:47] <svm_invictvs> Reiner Wolfcastle.
[05:21:01] <AlanasAnikonis> Rainier, according to wiki ;)
[05:21:04] <AlanasAnikonis> http://en.wikipedia.org/wiki/Rainier_Wolfcastle
[05:21:18] <svm_invictvs> Rainier, yeah
[05:21:33] <ramdam> and is it possible to extract that second jar into a folder by running code from the first jar?
[05:22:10] <mztriz> If I try to use a %s as a formatting specifier, it's for a string right?
[05:22:19] *** Kwitschibo has quit IRC
[05:22:22] <AlanasAnikonis> java is so cool I think you can run the containing jar code without extracting anything, but that would probably involve a specialized classLoader
[05:22:29] *** Kwitschibo has joined ##java
[05:22:32] <juacom99> AMcBain: question did you use EditorPane's setText ot Document's insert for that?
[05:23:10] <AMcBain> That JEditorPane is cell renderer for a JTable, so it's always setText
[05:23:20] <AlanasAnikonis> ramdam: Applications implement subclasses of ClassLoader in order to extend the manner in which the Java virtual machine dynamically loads classes.
[05:23:33] <ramdam> AlanasAnikonis, hmm, maybe i should explain. i have been having problems setting class paths lately , so i am exploring some solutions before i tackle the code tomorrow morning
[05:24:11] <ramdam> so i'm looking into that
[05:24:14] <juacom99> soemthing like EP.setText(Ep.getText()+newtext) ??
[05:25:11] <AlanasAnikonis> yes... problems are to be solved... that's usually a sound plan
[05:25:13] <AMcBain> I suppose you could do that, but the editor pane will always add the closing tags for things in it, so you're really better off trying to insert it instead.
[05:25:31] <AMcBain> (as if you just do the line you pasted, you'd end up adding that stuff after any existing closing tags)
[05:25:37] <ramdam> i'll also be trying this http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html
[05:25:48] <ramdam> as well as making an installer
[05:25:55] <svm_invictvs> heh
[05:26:02] <svm_invictvs> Best technobabble ever.
[05:26:33] <svm_invictvs> "Getting aroudn our security is pretty difficult. It needed two people. One to open the server port. The other to falsify the logs."
[05:27:07] <juacom99> my porblems is that when i recive a lot of mennsajes at the same time the JscrollPane drive me creazy
[05:27:16] *** squi has joined ##java
[05:27:50] <AMcBain> svm_invictvs: you forgot bribing the security guard with a donut ... or if you're Mr. Bean, a laxative will do :P
[05:27:55] <svm_invictvs> heh
[05:28:05] <svm_invictvs> Which is why I like the idea of printed logs.
[05:28:10] <svm_invictvs> You can't falsify them very easily.
[05:28:27] <AlanasAnikonis> poor squirrels and their precious trees :'(
[05:28:29] <svm_invictvs> I just wish such a thing didn't waste paper.
[05:28:57] <thunderbolt> I thought there were append-only hardware things you could plug into servers instead of printing logs.
[05:29:05] <svm_invictvs> Yeah, I woudl think so.
[05:29:09] <svm_invictvs> That would be pretty cool.
[05:29:32] <svm_invictvs> Append only, but to erase from them you'd have to physically remove them and put them in a separate device.
[05:29:46] <thunderbolt> Yeah.
[05:31:07] *** asap18 has quit IRC
[05:35:59] <AMcBain> juacom99: I wrote something to make the jscrollpane scroll down on new additions and to not scroll down if the user is currently scrolled up (to take a look at previous messages) :)
[05:41:03] *** morkar-- has joined ##java
[05:41:34] *** morkar-- has quit IRC
[05:43:53] *** immortalfire has joined ##java
[05:45:35] *** asap18 has joined ##java
[05:47:22] *** roue has quit IRC
[05:47:57] *** juacom99 has quit IRC
[05:48:07] *** superjoe has joined ##java
[05:48:14] *** superjoe has left ##java
[05:50:21] *** squi has quit IRC
[05:50:35] *** squi has joined ##java
[05:50:56] <r0bby_> svm_invictvs: go to hell
[05:51:10] <svm_invictvs> lol, r0bby_
[05:53:02] <svm_invictvs> r0bby_: ??
[05:54:07] *** Gevaudan82 has quit IRC
[05:54:11] *** Junior has joined ##java
[05:54:37] <Junior> morning
[05:55:57] *** immortalfire has quit IRC
[05:56:18] <r0bby_> svm_invictvs: and sir is all.
[05:57:17] <The_Birdman> good evening Junior, it is 11:57 and 20 seconds here
[05:57:34] <The_Birdman> pm
[05:57:39] <svm_invictvs> r0bby_: I deleted the comment.
[05:58:40] *** morkar- has quit IRC
[05:59:37] *** UK-sHaDoW has quit IRC
[06:00:59] *** CaptainMorgan has quit IRC
[06:01:40] *** CaptainMorgan has joined ##Java
[06:02:13] *** asap18 has quit IRC
[06:02:28] *** thunderbolt has quit IRC
[06:03:17] *** warmwaffles has left ##java
[06:03:29] *** asap18 has joined ##java
[06:05:46] *** pilkarn has joined ##java
[06:05:47] <pilkarn> http://paste.lisp.org/display/76007
[06:05:56] <pilkarn> ^^ noclassdeffound error, but why?
[06:06:10] *** bungrudi has quit IRC
[06:06:42] <flippo> pilkarn, paste the actual error message
[06:07:29] *** bungrudi has joined ##java
[06:07:45] <pilkarn> http://paste.lisp.org/display/76007#1
[06:08:08] <pilkarn> wait i ahev to suply th classpath i guess?
[06:08:30] <pilkarn> no cant be
[06:08:33] <flippo> pilkarn, seems to be in a package called the same as the class
[06:08:35] <pilkarn> it does print something
[06:08:42] <pilkarn> yes ,
[06:09:51] <pilkarn> i changed it to videoplayer
[06:09:58] <pilkarn> but still faisl the same way
[06:10:07] <flippo> with a different package name?
[06:10:23] <flippo> Time to learn how classpaths work, I think
[06:10:41] *** pilkarn has quit IRC
[06:10:52] <flippo> (And how irc works.)
[06:11:21] *** pilkarn has joined ##java
[06:13:18] <pilkarn> if i have MediaPanel and MediaPanelTest in C:/clojure/progs/videoplayer, what should I pass as the classpath?
[06:13:33] <pilkarn> C:\clojure\Progs\videoplayer>javac -cp C:/clojure/progs/videoplayer MediaPanel.j
[06:13:33] <pilkarn> ava MediaPanelTest.java
[06:13:37] <pilkarn> thats how i compile
[06:13:55] *** jabalsad has quit IRC
[06:14:13] *** jabalsad has joined ##java
[06:16:02] *** jcp is now known as javawizard2539
[06:16:08] <manunderground> is there anyway to use the Preferences class in Vista w/ Java 6.10?
[06:16:21] *** NiallC has quit IRC
[06:16:21] *** bitcrave has quit IRC
[06:16:28] <manunderground> or is it simply impossible to write to the registry?
[06:17:01] *** manunderground has quit IRC
[06:17:28] <flippo> It seems as though JNDI works with the "Registry"
[06:18:36] <javawizard2539> manunderground: is your intent to store preferences or to read/write the windows registry?
[06:18:40] <svm_invictvs> Registry?
[06:18:47] <svm_invictvs> Windows Registry?
[06:18:58] <javawizard2539> svm_invictvs: Do you use windows?
[06:19:08] <svm_invictvs> Yeah...sometimes.
[06:19:13] <javawizard2539> Heh
[06:19:26] <javawizard2539> ~wikipedia windows registry
[06:19:33] <javawizard2539> ...
[06:19:34] <svm_invictvs> javawizard2539: I read flippo's message and missed yours.
[06:19:38] <javawizard2539> Thought that would work, wrong channel
[06:19:40] *** mattorantimatt has joined ##java
[06:19:40] <javawizard2539> heh, ok
[06:19:48] <svm_invictvs> I know what the registry is
[06:19:51] *** djp[mbp] has quit IRC
[06:19:58] <svm_invictvs> I just thoght it strange that Java would use it.
[06:20:03] <javawizard2539> I agree
[06:20:04] <svm_invictvs> iirc, there's no direct API to it in java
[06:20:09] <javawizard2539> Correct
[06:20:26] <javawizard2539> So I can't tell what manunderground wants to do but it looked kinda like he wanted to use the windows registry for something
[06:20:39] <javawizard2539> Which, in my opinion, completely defeats the purpose of Java, but then again, I'm not him.
[06:20:50] *** javawizard2539 is now known as jcp
[06:22:13] <AlanasAnikonis> i used some registry lib to locate the tomcat installation path etc.
[06:22:25] <jcp> Yeah
[06:22:31] <jcp> manunderground, you could try jregistrykey
[06:22:41] *** woogley has joined ##java
[06:22:45] <jcp> I used that for something and it worked for me
[06:23:09] <pilkarn> http://paste.lisp.org/display/76007#2
[06:23:17] <svm_invictvs> he left
[06:23:36] <AlanasAnikonis> the purpose of java is to make programs, nothing dictates it HAS to be cross platform
[06:23:37] <jcp> Dang
[06:23:46] <jcp> AlanasAnikonis: Correct
[06:23:54] <jcp> but one of it's strong points is it's platform independence
[06:24:04] <jcp> which is why I said that in my opinion it defeats the point
[06:24:04] <svm_invictvs> Yeah, it depends on his use case.
[06:24:13] <AlanasAnikonis> that goes for anything nowadays...
[06:24:27] <AlanasAnikonis> even sexuality is out of the closet
[06:24:44] <jcp> ...
[06:24:48] * jcp doesn't get the connection...
[06:25:07] <pilkarn> http://paste.lisp.org/display/76007#2 <- there is what i have bow, i dont know what im doing wrong. noclassdeffounderror
[06:25:08] <AlanasAnikonis> well name me one language (except MS made) that's not cross platform
[06:25:24] <LumberCartel> Java: It has no preferences because it like all platforms!
[06:25:45] <AlanasAnikonis> java is the bisexual of all languages?
[06:25:50] <LumberCartel> NETBASIC: It only runs on NetWare.
[06:25:54] <AlanasAnikonis> does anyone and anything
[06:25:58] <svm_invictvs> But yeah, I would never ever want to read/write the registr directly
[06:26:00] <LumberCartel> Bisexual? Oh no, much more than that!
[06:26:14] <AlanasAnikonis> okay, quadsexual!
[06:26:23] <AlanasAnikonis> nah, must be more
[06:26:37] <AlanasAnikonis> i group unix and linux, cause I'm dumb
[06:26:45] <AlanasAnikonis> and cellphones into another
[06:27:02] <AlanasAnikonis> that leaves windows and "other" :P
[06:27:30] <AlanasAnikonis> i've never actually needed to think about being cross platform for more than 3 platforms really
[06:27:53] <AlanasAnikonis> and even then it's 1 or 2 servlet containers too
[06:28:33] *** phyburn has joined ##java
[06:29:04] <pilkarn> http://paste.lisp.org/display/76007#2 <- there is what i have bow, i dont know what im doing wrong. noclassdeffounderror
[06:29:16] <AlanasAnikonis> i'll gladly add windows registry code and linux specific libraries if that solves my problem and makes me rich
[06:29:33] <push[EAX]> lol
[06:29:59] <LumberCartel> That seems to be a sensible justification.
[06:30:20] <AlanasAnikonis> Yea, I'm a sellout ;)
[06:30:21] *** Niike has quit IRC
[06:30:39] <LumberCartel> Me too, as long as the price is right.
[06:30:46] <pilkarn> everyone hates sellouts until they are ahanded the opportunity themselves
[06:30:49] *** Nsipid has joined ##java
[06:31:00] <LumberCartel> I think sellouts are smart.
[06:31:09] <pilkarn> i think they are ubersmart
[06:31:14] <LumberCartel> Heheh.
[06:31:21] <pilkarn> i think they are they are the smartest of the smartest
[06:31:28] <LumberCartel> Smart and Lazy: The opposite of Stupid and Industrious.
[06:31:38] <pilkarn> and since he is so smart he can help me with ^^
[06:31:52] <AlanasAnikonis> tl;dr
[06:31:59] <AlanasAnikonis> nah, i am reading your code
[06:32:05] *** Angel-SL has joined ##java
[06:32:12] <flippo> AlanasAnikonis, to be a sellout, you must first find someone buying
[06:32:15] <AlanasAnikonis> it's annoying, no line numbers I can reference
[06:32:36] <AlanasAnikonis> well, i did work for clients
[06:32:36] <LumberCartel> Draw a 2x2 grid, put Smart and Lazy in non-adjecent corners, then put Stupid and Industrious in the other two corners. Then, try to figure out where you'd be best represented on that grid by a single dot.
[06:32:42] <LumberCartel> It's fun, if you're not too lazy!
[06:32:45] <AlanasAnikonis> when I used windows registry from java
[06:32:51] <svm_invictvs> oh god
[06:32:52] <Nsipid> for-each loops are supposed to work on any class that impliments iterable right how come if i have a class that impliments Iterable<MyClass> i cant do for (MyClass mc : IterableObject) i have to do Object mc
[06:33:49] <AlanasAnikonis> pilkam, I can't deal with code that fetches porno
[06:33:58] <AlanasAnikonis> that's against my religion or something
[06:34:35] *** Inc` has quit IRC
[06:34:40] <svm_invictvs> Nsipid: You should.
[06:34:55] <AlanasAnikonis> how do I read paste.lisp.org anyways? from down to up?
[06:34:56] <Nsipid> I should by able to do MyClass mc instead of typecasting?
[06:35:11] <Nsipid> s/by/be
[06:35:14] <flippo> Nsipid, what was the error message?
[06:35:28] <AlanasAnikonis> pilkarn: did you try just a simple -cp .
[06:35:37] <Nsipid> incompatable types
[06:35:44] <flippo> Nsipid, what was the error message?
[06:35:45] <AlanasAnikonis> why do you need a classpath anyways, if it's current directory, pilkarn
[06:35:54] <svm_invictvs> Nsipid: Post a simple testcase.
[06:36:41] *** The_Birdman has quit IRC
[06:36:58] <Nsipid> odd its a netbeans error but the code actually builds and runs without complaining
[06:37:10] <flippo> Boo, hiss.
[06:37:56] <Nsipid> let me try to test this out again and if it craps out ill post a testcase
[06:38:00] <svm_invictvs> ok
[06:38:01] *** casmo has joined ##java
[06:38:56] *** zophy has joined ##java
[06:39:08] *** bitcrave has joined ##java
[06:39:50] <pilkarn> AlanasAnikonis: i got it working
[06:39:53] <pilkarn> thanx
[06:40:11] *** pilkarn has left ##java
[06:40:23] *** yobo2 has quit IRC
[06:40:24] <Nsipid> yeah netbeans didnt compile it thats why, ill post a testcase what site do i post to?
[06:40:59] <AlanasAnikonis> http://java.pastebin.com for example
[06:41:55] *** TranceControl has quit IRC
[06:42:07] *** ttmrichter has quit IRC
[06:42:20] *** riotz has quit IRC
[06:45:03] *** bitcrave has quit IRC
[06:46:00] *** ahughes has quit IRC
[06:46:26] *** Greyhound_ has joined ##java
[06:46:52] *** cactaur has quit IRC
[06:46:53] *** ttmrichter has joined ##java
[06:48:09] *** cher has joined ##java
[06:48:33] *** Greyhound- has quit IRC
[06:51:08] *** Wicked has joined ##java
[06:51:16] *** seejay has joined ##java
[06:52:42] *** delskorch has quit IRC
[06:53:29] <seejay> guys I'm following a tutorial on java and I don't have acm.programs package by default in my eclipse installation
[06:54:04] <Nsipid> thanks guys i was typign up the testcase and realized my problem i made the iterator impliment iterator<MyClass> but the top class implemented Iterable not Iterable<MyClass>
[06:54:08] <seejay> is it available for download? I couldn't find it by googling. what should i do? how do i install them in eclipse?
[06:54:57] *** mosno has quit IRC
[06:55:20] <mztriz> How can I used these highlighed variables http://pastebin.com/d3e3ee288 outside of my while loop?
[06:55:22] *** daxton has quit IRC
[06:55:31] <svm_invictvs> Nsipid: Why a test case solves 90% of problems ;)
[06:55:57] *** HockeyInJune has quit IRC
[06:56:08] <Tenac> If the first column in my JTable is type Boolean, I overload getValueAt, isCellEditable, and getColumnClass, should the check box be editable?
[06:56:22] *** HockeyInJune has joined ##java
[06:56:24] <reverend> mztriz: you really need to read the tutorial
[06:56:26] *** pilkarn has joined ##java
[06:56:27] <reverend> ~rbi
[06:56:54] <pilkarn> anyone use JMF? it seems the videoplayer cant open any files at all? which formats can it actually handle? ive tried .wmv, .avi, .mp4
[06:56:57] <AlanasAnikonis> /whois javabot -> no such nick/channel
[06:57:12] <mztriz> reverend, what part of the tutorial?
[06:57:26] <AlanasAnikonis> pilkarn: are you sure you are getting any video data at all...
[06:57:34] <AlanasAnikonis> try opening a file on disk first
[06:58:09] <pilkarn> AlanasAnikonis: thats what im doing
[06:59:12] *** amz has quit IRC
[06:59:24] *** amz has joined ##java
[06:59:58] <AlanasAnikonis> http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html#jmf2-support
[07:00:43] *** LumberCartel has left ##java
[07:00:50] <r0bby_> ... do people ever try and read shit or google?
[07:00:59] <AlanasAnikonis> good question
[07:01:13] <AlanasAnikonis> i googled JMF and then clicked on FAQ
[07:01:15] <flippo> There is not much to be learned from studying fecal matter.
[07:01:31] <AlanasAnikonis> so it was 3 clicks away
[07:01:37] *** amz has quit IRC
[07:01:39] <reverend> mztriz: all of it, from the beginning
[07:01:40] <AlanasAnikonis> my hand got tired :(
[07:02:08] <reverend> mztriz: http://java.sun.com/docs/books/tutorial/reallybigindex.html
[07:02:23] <pilkarn> so i got it opening an mp3 finally
[07:02:28] <pilkarn> but vidoe files doesnt work
[07:03:11] <AlanasAnikonis> yea, we all hate it when something does not work
[07:03:14] <pilkarn> anyway, does stuff like DivX and RealPlayer make any money?
[07:03:19] <AlanasAnikonis> my toaster sometimes becomes too hot
[07:03:37] <pilkarn> my computer sometimes becomes to hot, like 60 degreess celsius
[07:04:13] *** Lhet has quit IRC
[07:04:15] <AlanasAnikonis> yea, ain't life a bitch
[07:04:38] <AlanasAnikonis> and DivX probably makes.. or made lots of money
[07:04:44] <reverend> pilkarn: the best way to make money is to know wtf you're doing
[07:04:45] <pilkarn> how?
[07:04:47] <AlanasAnikonis> with their DivX certification
[07:04:50] *** mgenov has quit IRC
[07:04:56] <AlanasAnikonis> it's a brand
[07:05:07] <AlanasAnikonis> and they get companies to pay for a sticker
[07:06:14] *** JustinLei has quit IRC
[07:07:09] <letfunbegin> so they make a brilliant codec, but gets paid for a sticker. brilliant.
[07:07:29] *** meanburrito920_ has quit IRC
[07:08:09] <AlanasAnikonis> well encoder is of course not entirely free either....
[07:08:27] <AlanasAnikonis> but who cares about divx, we like xvid
[07:08:36] <AlanasAnikonis> and it should be pluggable into JMF
[07:08:56] <letfunbegin> indeed :]
[07:09:08] <AlanasAnikonis> "FOBS, the C++ & JMF wrapper for ffmpeg"
[07:09:35] *** SniperFodder has quit IRC
[07:09:52] *** lolipop has joined ##java
[07:11:01] <pilkarn> Unable to handle format: mpeglayer3, 48000.0 Hz, 0-bit, Stereo, Unsigned, 1600
[07:11:09] <pilkarn> thats an .avi
[07:11:24] <AlanasAnikonis> avi is many things
[07:11:44] <AlanasAnikonis> but seems like it doesn't like the audio track
[07:11:45] <letfunbegin> well it's a container
[07:11:48] <pilkarn> No. JMF 2.1.1 does not support playback of audio CDs or DVDs.
[07:11:55] <pilkarn> really what does it support?
[07:12:02] <reverend> not much
[07:12:08] <letfunbegin> what does the documentation say?
[07:12:19] <AlanasAnikonis> i already pasted link to that
[07:12:19] <reverend> which is the poit, jmf is a framework
[07:12:26] <AlanasAnikonis> 12 min ago
[07:12:49] <pilkarn> so you can add your own decoders if you want?
[07:13:13] <reverend> no, it's completely closed up so you can never add anything to it at all
[07:13:26] <letfunbegin> :)
[07:13:46] <r0bby_> pilkarn: did you read the link you were handed like at all?
[07:13:50] <pilkarn> is your ass closed up so you havent been able to get anything out?
[07:14:10] <reverend> i dunno, is it?
[07:14:21] <reverend> take a poke around in it and let me know
[07:14:37] <r0bby_> pilkarn: the reason he responded like he did is because he SAID YOU COULD
[07:15:10] <r0bby_> er wait..
[07:15:13] <r0bby_> misread.
[07:15:49] <r0bby_> pilkarn: once again
[07:15:50] <r0bby_> http://java.sun.com/javase/technologies/desktop/media/jmf/
[07:15:53] <r0bby_> this time read it
[07:15:53] <reverend> mainly because pilkarn has been asking dumb questions about jmf all night and ignoring the answers and pointers he/she get, really
[07:16:11] *** vix85 has joined ##java
[07:16:12] <r0bby_> and again in case you missed the first one: http://java.sun.com/javase/technologies/desktop/media/jmf/
[07:16:18] <letfunbegin> well this is irc, so no surprises really
[07:16:33] <reverend> indeed
[07:17:07] <r0bby_> pilkarn: so in sum, questions are okay... just do your own research before hand (no that is not why we're here.)
[07:17:16] *** systat has joined ##java
[07:17:17] <svm_invictvs> r0bby_: why the _ ?
[07:17:44] <r0bby_> svm_invictvs: lost connection to freenode and this is my alt nick
[07:17:49] <svm_invictvs> oic
[07:18:03] <r0bby_> ...
[07:18:08] <r0bby_> you mean "oh i see"
[07:18:10] <r0bby_> right svm_invictvs
[07:18:13] <r0bby_> RIGHT!?!?!?!
[07:18:16] <svm_invictvs> Yes
[07:18:19] <svm_invictvs> r0bby_: Whats' wrong 2night?
[07:18:38] <svm_invictvs> r0bby_: You seem to be in an irritable mood.
[07:18:44] *** Nsipid has quit IRC
[07:19:21] <pilkarn> so is jmf a media playe?
[07:20:10] <reverend> no.
[07:20:14] <r0bby_> pilkarn: FUCK
[07:20:17] <r0bby_> can you read?
[07:20:21] <r0bby_> seriously for fucks sake
[07:20:25] <AlanasAnikonis> "The Java Media Framework API (JMF) specifies a simple, unified architecture to synchronize and control audio, video and other time-based data within Java applications and applets. "
[07:20:27] <r0bby_> http://java.sun.com/javase/technologies/desktop/media/jmf/
[07:20:30] <r0bby_> AlanasAnikonis: stop
[07:20:34] <reverend> pilkarn: ask yourself, 'wat does 'jmf' stand for?'
[07:20:43] <r0bby_> pilkarn: http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/technologies/desktop/media/jmf/ http://java.sun.com/javase/te
[07:20:44] <svm_invictvs> Java Media Framework?
[07:20:48] <svm_invictvs> r0bby_: Chill out.
[07:20:50] <r0bby_> hint hint hint
[07:20:56] <letfunbegin> haha
[07:20:58] <AlanasAnikonis> hey! JMF 1.0 says: The JMF API is being developed in stages. JMF 1.0, also known as the "Java Media Player", is the first release of the JMF API and concentrates on media "playback", that is the synchronization, control, processing, and presentation of compressed streaming and stored time-based media, such as audio, video and MIDI.
[07:21:05] <AlanasAnikonis> so duh
[07:21:40] <reverend> it remains 'not a media player'
[07:22:01] <AlanasAnikonis> framework can be such an abstract word for anyone
[07:22:07] <AlanasAnikonis> especially non native speaker
[07:22:09] <r0bby_> pilkarn: direct all stupid requestion to /dev/null please
[07:22:39] <r0bby_> AlanasAnikonis: the fact remains he's been given a link (after me) 30x?
[07:22:55] *** flippo has quit IRC
[07:23:52] <r0bby_> he's swedish
[07:24:00] <r0bby_> or so his ip says
[07:24:18] <r0bby_> his english should be better than mine in some respects lol
[07:24:25] * pr3d4t0r throws Swedish meatballs at r0bby_.
[07:24:28] <AlanasAnikonis> yea, i just checked
[07:24:35] <AlanasAnikonis> from southern sweden
[07:24:56] <r0bby_> pilkarn: http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html
[07:25:02] <AlanasAnikonis> i'm 1h away from Stockholm, and I want meatballs for breakfast
[07:25:11] *** bas-i has joined ##java
[07:25:12] <r0bby_> next question better not be answered there.
[07:26:08] *** meanburrito920_ has joined ##java
[07:26:22] <r0bby_> im starving
[07:26:28] <r0bby_> damn it now i want swedish meatballs
[07:26:35] <r0bby_> thanks a lot pr3d4t0r
[07:26:36] <ScottG489> I dont understand why this isn't outputting anything at the end: http://pastebin.com/m1b020d7f
[07:26:37] <r0bby_> thanks a lot!
[07:27:00] <ScottG489> Its probably a simple mistake but im new to applets and I dont totally understand them yet.
[07:27:32] <r0bby_> ScottG489: read the topic
[07:27:47] <ScottG489> Oh
[07:27:52] <ScottG489> Damnit
[07:27:54] <r0bby_> you've been here for months now
[07:28:02] <r0bby_> you should have read this when you got here.
[07:28:15] <ScottG489> I have but...wait how do you know that I never ask questions here.
[07:28:30] <r0bby_> uhm.. I'm not blind
[07:28:36] <ScottG489> Btw, whats wrong with applets? I mean they arent my favorite but...?
[07:28:37] <r0bby_> and yes you have asked questions here
[07:29:10] <ScottG489> Well not that many questions and not in a while. Guess im just surprised anyone remembered me
[07:29:15] <r0bby_> well post java 6u10? not much. But most problems stem from browser issues
[07:29:19] *** Nebulam has joined ##java
[07:29:47] <r0bby_> ScottG489: what is the problem?
[07:29:51] <ScottG489> r0bby_: Well I'm not running this in a browser yet. Its just running as a straight applet out of eclipse. Do you think you could just take a quick look at it?
[07:30:04] <ScottG489> Its a really straight forward program and its really short
[07:30:29] <r0bby_> ScottG489: make this into a swing app
[07:30:41] <r0bby_> actually
[07:30:44] <r0bby_> take your logic here
[07:30:56] <r0bby_> put it in a small test app
[07:30:58] <r0bby_> run it
[07:31:03] <r0bby_> does it output correctly?
[07:31:09] <ScottG489> I dont follow what you mean.
[07:32:10] <r0bby_> ScottG489: public class Foo { public static void main(String... args) { /* put the code you're having a problem w/ here */ } }
[07:32:33] <ScottG489> I mean I put all of the getTexts into each part of the array. Then i accumulate the values of each into "average" then i set averages value to the answer label
[07:32:48] <r0bby_> ok
[07:33:05] <r0bby_> is your event being fired?
[07:33:27] <r0bby_> ScottG489: add the actionlistener to your Submit button
[07:33:32] <r0bby_> NOT every text field.
[07:33:43] *** HideousNashimoto has joined ##java
[07:33:48] <r0bby_> there's your problem.
[07:33:51] *** bindaas has joined ##java
[07:34:10] <r0bby_> got it?
[07:35:53] <r0bby_> ScottG489: problem fixed?
[07:36:05] *** CrypticSquared has joined ##java
[07:36:12] <ScottG489> r0bby_: Yes. Thanks :)
[07:36:27] <ScottG489> I need to write my own program in an app to really get this down
[07:36:41] <r0bby_> you add the listener to your buttons
[07:36:48] *** epalm has quit IRC
[07:36:48] <r0bby_> action listeners anyways
[07:37:12] <ScottG489> hm, i think i got confused from an example i was looking back at
[07:37:25] <ScottG489> it seems my teacher had an actionlistener on a text box
[07:37:32] <ScottG489> now that I think about it i think I know why
[07:37:46] <pilkarn> so is jmf a media playe? <- hello that was a joke
[07:38:02] <r0bby_> pilkarn: it's kind of hard to guage this
[07:38:03] <ScottG489> r0bby_: Which acually comes right to my next question on how to be able to hit enter when the user is on the last text box and be able to submit it
[07:38:15] <r0bby_> FocusListener.
[07:40:21] <ScottG489> r0bby_: addActionListener works too
[07:40:47] <ScottG489> thats why i was confused. Because the user can hit enter when they are on the final field and it will calculate it for them
[07:41:50] <ScottG489> I'm still pretty impressed I was able to figure all of this out. I don't like how I got the input for the array which kind of defeats the purpose but I have a feeling that doing it the correct way is more advanced
[07:42:23] *** phyburn has quit IRC
[07:43:18] <ScottG489> r0bby_: How can I make things be on their own line?
[07:44:18] *** HideousNashimoto has quit IRC
[07:44:33] *** Wicked has quit IRC
[07:45:23] *** amz has joined ##java
[07:45:45] *** woogley has quit IRC
[07:46:01] *** Wicked has joined ##java
[07:48:33] *** Bevin has joined ##java
[07:48:40] <r0bby_> what?
[07:48:59] *** immortalfire has joined ##java
[07:49:16] <r0bby_> the correct way would be to use a List
[07:49:33] *** casmo has quit IRC
[07:49:38] <r0bby_> List<Double> list = new ArrayList<Double>();
[07:49:41] <r0bby_> but i have to go to bed
[07:49:52] *** systat has quit IRC
[07:51:24] *** vix85 has quit IRC
[07:52:20] *** casmo has joined ##java
[07:52:28] <ScottG489> r0bby_: Ok thanks a ton for the help
[07:53:06] <r0bby_> no problem
[07:53:42] *** sebr is now known as sebr_afk
[07:57:45] *** mele- has quit IRC
[08:00:37] *** asap18 has quit IRC
[08:01:03] *** cybereal has joined ##java
[08:03:57] *** HockeyInJune has quit IRC
[08:03:58] *** Daniel_G has quit IRC
[08:03:58] *** tag has quit IRC
[08:03:58] *** alg0rithm has quit IRC
[08:03:58] *** LouisJB has quit IRC
[08:03:58] *** genesiss has quit IRC
[08:03:58] *** Noya has quit IRC
[08:03:58] *** Resistance has quit IRC
[08:03:58] *** FauxFaux has quit IRC
[08:03:58] *** tote has quit IRC
[08:03:58] *** Sid23 has quit IRC
[08:03:58] *** adaro has quit IRC
[08:03:58] *** reisi has quit IRC
[08:03:58] *** ferret_ has quit IRC
[08:03:58] *** Gambaroni has quit IRC
[08:03:58] *** Partyzant has quit IRC
[08:03:58] *** Obeliks has quit IRC
[08:03:58] *** theatrus has quit IRC
[08:03:58] *** Zharf has quit IRC
[08:03:59] *** iksik has quit IRC
[08:03:59] *** letfunbegin has quit IRC
[08:04:13] *** woogley has joined ##java
[08:04:48] *** HockeyInJune has joined ##java
[08:04:48] *** Daniel_G has joined ##java
[08:04:48] *** tag has joined ##java
[08:04:48] *** alg0rithm has joined ##java
[08:04:48] *** tote has joined ##java
[08:04:48] *** LouisJB has joined ##java
[08:04:48] *** genesiss has joined ##java
[08:04:48] *** Noya has joined ##java
[08:04:48] *** Resistance has joined ##java
[08:04:48] *** Gambaroni has joined ##java
[08:04:48] *** FauxFaux has joined ##java
[08:04:48] *** Sid23 has joined ##java
[08:04:48] *** adaro has joined ##java
[08:04:48] *** reisi has joined ##java
[08:04:48] *** ferret_ has joined ##java
[08:04:48] *** iksik has joined ##java
[08:04:48] *** Obeliks has joined ##java
[08:04:48] *** Partyzant has joined ##java
[08:04:48] *** theatrus has joined ##java
[08:04:48] *** Zharf has joined ##java
[08:04:48] *** letfunbegin has joined ##java
[08:06:06] *** asap18 has joined ##java
[08:07:25] *** xabbuh has joined ##java
[08:08:36] <pilkarn> so let me get this straight: jmf is not an audio player, not a video player but a general framework for playign stuff in java? does it support any fileformats by default? if so, which?
[08:09:06] <pilkarn> (tihihihihihihihii r0bby)
[08:09:33] <jcp> pilkarn: pretty much
[08:09:42] <jcp> If you're trying to play sound, take a look at the javax.sound packages
[08:09:43] <pilkarn> i was joking
[08:09:49] <jcp> Or java.applet.AudioClip
[08:09:52] <pilkarn> i aldready use JLayer
[08:09:53] <jcp> heh, ok
[08:10:11] <pilkarn> trying to trim r0bby by asking st0pid questions
[08:10:14] *** jcp has quit IRC
[08:10:53] *** jcp has joined ##java
[08:10:58] *** gandalfcome has joined ##java
[08:12:06] <gandalfcome> I have a program that requires java1.5 but accesses the java under /usr/bin/java and complains that that is not 1.5. Can I set Java 1.6 in compatibility mode or something. (my os is ubuntu 8.04). thanks in advance
[08:12:45] <AlanasAnikonis> what does "java -version" output, gandalfcome
[08:13:05] *** pilkarn has left ##java
[08:13:09] <r0bby_> i smell gcj
[08:13:28] <gandalfcome> AlanasAnikonis: java version "1.6.0_07"
[08:14:33] <r0bby_> that should work
[08:15:30] <dangertools> could be some runtime check
[08:15:46] *** bungrudi has quit IRC
[08:15:57] <gandalfcome> AlanasAnikonis: I know this is the wrong version but can I set an environmental variable that would make 1.6 act as 1.5. the program complains: The /usr/bin/java command is not Java 1.5: exiting
[08:16:01] *** deepjoy has joined ##java
[08:16:14] <AlanasAnikonis> what program might you be running then
[08:16:33] *** yellowtape has quit IRC
[08:16:51] <gandalfcome> its p2pp an ESO program.
[08:16:57] <AlanasAnikonis> i know java has the startup switch -version:value
[08:17:24] <deebo> gandalfcome: update-alternatives --config java
[08:17:30] <AlanasAnikonis> check that the startup scripts or whatever don't include that parameter
[08:17:49] <deebo> if you only have one java installed, install java5 too
[08:17:57] *** TrentCreek has quit IRC
[08:17:59] <deebo> then set that as the active jre
[08:18:15] *** Ben_Cs has joined ##java
[08:18:19] <Ben_Cs> hello
[08:18:27] *** mgenov has joined ##java
[08:18:39] <gandalfcome> deebo: Okay I know that was dirty but I commented out the line that checks for the version and it seems to work
[08:18:52] <deebo> well whatever works :P
[08:19:07] <deebo> ive just stumbled onto some stuff that actually doesnt work crossjre
[08:19:13] <deebo> so there might be an actual reason for it
[08:19:16] <gandalfcome> thanks AlanasAnikonis and others
[08:19:20] <Ben_Cs> does the garbage collector destry a Vector object, when all references to that object point to null. or is it required for the Vector object to be empty also?
[08:19:35] <deebo> Ben_Cs: it will be gc'ed when nothing references it
[08:19:53] <Ben_Cs> deebo: even if it's not empty?
[08:19:57] <AlanasAnikonis> there is a big chance it will be gc:ed
[08:20:04] <deebo> doesnt matter
[08:20:13] <gandalfcome> deebo: well i hope it works, I just need to use it for a little while
[08:20:15] <Ben_Cs> ok, thanks
[08:20:15] <deebo> or well, actually im nto sure if something INSIDE it is referenced
[08:20:26] <AlanasAnikonis> well I was gonna say just that
[08:20:33] <AlanasAnikonis> if it has elements that are referenced....
[08:20:54] <AlanasAnikonis> then the vector must exist somewhere
[08:20:54] <deebo> so lets rephrase: it will get gc'ed if it and its contents are not referenced
[08:21:02] *** LostMonarch has joined ##java
[08:21:09] <AlanasAnikonis> sounds better
[08:21:31] *** Ben_Cs has quit IRC
[08:21:39] <AlanasAnikonis> vector.clear() and vector = null and everything else pointing at vector = null
[08:21:48] <AlanasAnikonis> that would be overkill
[08:22:04] <AlanasAnikonis> and System.gc() ten times in a row? :P
[08:22:41] *** asap18 has quit IRC
[08:22:44] <cybereal> er the vector's contents can be referenced, that won't stop the unreferenced vector from being collected
[08:24:08] <svm_invictvs> No such thing as ownership in Java
[08:24:21] *** LouisJB has quit IRC
[08:24:30] *** LouisJB has joined ##java
[08:24:39] *** jcp has quit IRC
[08:26:27] *** linxuz3r has quit IRC
[08:27:12] *** dmiles has joined ##java
[08:28:11] *** amz has quit IRC
[08:28:45] *** dmiles_afk has quit IRC
[08:33:24] *** nocture has joined ##java
[08:36:00] *** gdoko has joined ##java
[08:40:31] *** shundread has joined ##java
[08:40:44] *** shundread has left ##java
[08:41:01] *** bas-i has quit IRC
[08:44:50] *** mattorantimatt has quit IRC
[08:45:41] *** casmo has quit IRC
[08:45:56] *** meanburrito920_ has quit IRC
[08:46:52] *** jhujhiti has joined ##java
[08:46:55] *** [[thufir]] has quit IRC
[08:48:10] <jhujhiti> how can i check the actual type of a generic type? i find myself needing to make a descision based on it
[08:48:32] <jhujhiti> i've tried something like Class<T> c = null; if(Byte.class.equals(c))
[08:48:49] <pr3d4t0r> jhujhiti: if (c instaceof Whatever)
[08:49:11] <pr3d4t0r> jhujhiti: And you don't check the type of T directly. That's the whole point of having parameterized types.
[08:49:11] <jhujhiti> pr3d4t0r: the problem is i don't actually have a reference to anything of that type
[08:49:14] <jhujhiti> all i have is the type
[08:49:34] <jhujhiti> i'm trying to use the type as a hint for how large to make an array
[08:50:09] <jhujhiti> so since i don't have a reference, i can't use instanceof
[08:50:23] *** asap18 has joined ##java
[08:51:04] *** casmo has joined ##java
[08:51:17] *** triptik has joined ##java
[08:51:30] <jhujhiti> unless you have a better way to do this?
[08:51:33] *** geaaru has joined ##java
[08:51:37] *** KristopherWindso has joined ##java
[08:51:50] <KristopherWindso> hi; how can i fix this line? public class RBTree<T implements Comparable>
[08:52:04] *** triptik has left ##java
[08:52:13] <KristopherWindso> i think it's obvious what i'm trying to do; i need to make sure T implements comparable
[08:52:22] <pr3d4t0r> jhujhiti: Don't use parameterized types for this (generics).
[08:52:32] <jhujhiti> pr3d4t0r: how else can i accomplish it?
[08:52:41] <pr3d4t0r> jhujhiti: Those are only known at compile time. If you don't know, then there's no point in using them.
[08:53:42] *** Bollinger has joined ##java
[08:53:55] *** steve-e has joined ##java
[08:54:08] <jhujhiti> pr3d4t0r: i'm trying to write a generalized container for a type-length-value sort of thing. the length is, of course, determined by how long the value is, but i still want the class to know how big the length parameter should be (i'm turning the whole thing into a byte[]_
[08:54:23] *** AlanasAnikonis has quit IRC
[08:54:30] *** Mkop2 has quit IRC
[08:54:48] <pr3d4t0r> jhujhiti: So that goes back to what I said at first.
[08:55:06] <pr3d4t0r> jhujhiti: If you yourself don't know at compile time what you're passing to your objects, neither does the compiler.
[08:55:23] <jhujhiti> pr3d4t0r: *I* know
[08:55:32] <pr3d4t0r> jhujhiti: The only way of checking types, then, is to add instanceof or a similar check.
[08:55:57] <jhujhiti> pr3d4t0r: i have the generic Length parameter there so i can pass it, for example, a Byte. so the length should be one byte long in the array
[08:56:39] <pr3d4t0r> jhujhiti: Read what I said. Read about parameterized types in Java (generics). Then decide if it can be done or not.
[08:56:52] <KristopherWindso> anyone? :(
[08:56:54] <pr3d4t0r> jhujhiti: Last time: if the compiler doesn't know, then it doesn't matter.
[08:56:56] *** ridoo has joined ##java
[08:57:43] <dangertools> ~~ KristopherWindso generics
[08:57:56] <dangertools> mhm, bot?
[08:58:01] *** Epcylon has joined ##java
[08:58:10] <KristopherWindso> public class RBTree<T implements Comparable<T>> isn't working either :o
[08:58:18] <pr3d4t0r> KristopherWindso: You gave your answer. Whatever T is, it must implement comparable. So in your object definition, use something that implements it.
[08:58:39] <pr3d4t0r> dangertools: The 'bot is constipated :(
[08:58:57] *** ldam has quit IRC
[08:58:57] <pr3d4t0r> dangertools: cheeser will be up in about 4 hours. Hopefully he'll notice and re-start the 'bot :)
[08:59:01] <KristopherWindso> are you saying i should just use public class RBTree<T> ?
[08:59:23] <pr3d4t0r> KristopherWindso: No. I said that you should use something that implements comparable, if that's what you want.
[08:59:35] <pr3d4t0r> KristopherWindso: Or something that uses the parameterized type, if that's what you want.
[08:59:36] <dangertools> pr3d4t0r: k. and i think KristopherWindso just has compile errors due to "implements", but he doesn't tell us
[08:59:43] <pr3d4t0r> dangertools: Yeah.
[08:59:50] <pr3d4t0r> dangertools: He just needs to do a bit of reading :)
[08:59:58] <KristopherWindso> RBTree.java:1: > expected
[08:59:58] <KristopherWindso> public class RBTree<T implements Comparable<T>>
[08:59:58] <KristopherWindso> ^
[08:59:59] <pr3d4t0r> dangertools: May I leave you with him?
[09:00:10] <pr3d4t0r> dangertools: It's kinda late and I'm sleepy and grouchy.
[09:00:11] <KristopherWindso> i still don't get what this line should be?
[09:00:16] <dangertools> KristopherWindso: read the tutorial on generics
[09:00:21] <pr3d4t0r> KristopherWindso: Did you go read about generics yet?
[09:00:24] <dangertools> pr3d4t0r: you are always grouchy
[09:00:30] <pr3d4t0r> dangertools: Heh - nah.
[09:00:33] * pr3d4t0r hugs dangertools.
[09:00:37] <dangertools> :)
[09:00:39] <pr3d4t0r> dangertools: Only with morons.
[09:00:49] <KristopherWindso> yes; but it works as public class RBTree<T>
[09:01:03] <pr3d4t0r> dangertools: And these kids are misinformed or ignorant of some things, not malicious. That's why I don't want to snap at theml.
[09:01:06] <pr3d4t0r> Er, them.
[09:02:21] <dangertools> KristopherWindso: i'm afraid no one will spoonfeed you. read the tutorial and find out about the right syntax. you are already pretty close ;)
[09:02:58] <KristopherWindso> is it public class RBTree<T> implements Comparable<T> ?
[09:03:19] *** dpy has joined ##java
[09:04:17] <cybereal> bwahaha my apartments they have this online billing portal you can optionally use, and they want to charge a "Tenant convenience fee" of USD$91.72 to take rent via visa
[09:04:23] *** pierrep has joined ##java
[09:04:35] * cybereal baffles at the idiot who would pay that
[09:04:54] <cybereal> it would cost half as much to be a day late on rent
[09:07:24] *** shadewind has joined ##java
[09:07:42] *** trustin has joined ##java
[09:07:52] *** asap18 has quit IRC
[09:09:07] *** skoskav has joined ##java
[09:14:49] *** KristopherWindso has quit IRC
[09:15:17] *** ridoo has quit IRC
[09:18:45] *** jhujhiti has left ##java
[09:20:10] *** ridoo has joined ##java
[09:24:00] *** trustin has quit IRC
[09:24:21] *** trustin has joined ##java
[09:25:47] *** jivedude has joined ##java
[09:28:34] *** ldam has joined ##java
[09:29:16] *** bhz- has quit IRC
[09:29:31] *** shervin_a has joined ##java
[09:40:20] *** DiMMaN has joined ##java
[09:41:18] *** dandre has joined ##java
[09:41:52] <DiMMaN> Hello. Within a servlet there is an init/destroy method that starts something so that it can be reused several times without initiating it everytime the servlet starts. Is it possible to do something like that with a bean?:/
[09:44:47] *** cher has quit IRC
[09:44:58] *** trustin has quit IRC
[09:45:23] *** bas-i has joined ##java
[09:47:26] *** staykov has joined ##java
[09:49:00] <dandre> hello,
[09:54:36] *** deSilva has joined ##java
[09:54:59] *** murz has joined ##java
[09:57:00] <murz> hi, i'm trying to use java NIO to do some simple reading/writing of files. I have a file that has a bunch of data in it already. I want to write to a specific position in the file without overwriting all of the data before it. I've been tring to just do channel.write(buffer,position) but it overwrites all of the data before position with a null byte. any advice is appreciated
[09:57:25] <gandalfcome> /join #python
[09:57:42] *** orgy` has joined ##java
[09:57:52] *** keks_ has joined ##java
[09:58:22] <murz> >_>
[09:58:26] *** ridoo has quit IRC
[09:58:28] *** valcker has joined ##java
[09:59:10] *** marvi has joined ##java
[09:59:29] <dandre> I am using BufferReader class to read text files and when I read a line of text I don't have the End Of Line terminator. I want to know weather the file is in Unix, DOS or MAC format. How can I do
[10:00:40] *** cyzie has quit IRC
[10:01:13] *** DiMMaN has quit IRC
[10:02:00] *** immortalfire has quit IRC
[10:02:47] *** ankylose has joined ##java
[10:03:05] *** adi112358 has joined ##java
[10:04:36] *** teralaser has joined ##java
[10:05:41] *** neurodamage has joined ##java
[10:05:49] *** doc`` has quit IRC
[10:07:35] <mztriz> How can I calcualte the lowest and highest amounts in my code? http://pastebin.com/d6a385a7f I have the lines highlighted.
[10:09:07] *** doc`` has joined ##java
[10:11:15] <marvi> mztriz: You can't, since you don't save the input. You only save the number of inputs and the total sum.
[10:11:54] *** guille_ has joined ##java
[10:12:14] <guille_> hi
[10:12:39] <mztriz> marvi, how do I save the input?
[10:13:01] <marvi> mztriz: In general, you are abusing the Java language pretty hard..
[10:13:08] *** KermitTheFragger has joined ##java
[10:13:24] <mztriz> I know I should put it in the loop similarly to how I had dAmount2 but I don't really know how to define and or use it
[10:13:27] <deufrai> mztriz: put amounts in some sort of container. See Collections
[10:13:34] <mztriz> Yeah, I don't know anything about java.. :(
[10:13:39] <mztriz> Okay
[10:14:34] <deufrai> mztriz: to start simple, you could consider using an array
[10:15:57] <mztriz> deufrai, can you give me an example?
[10:16:26] *** zipito has joined ##java
[10:17:20] <deufrai> mztriz: google points me to this for example -> http://www.tutorialhero.com/tutorial-76-java_arrays.php
[10:18:14] * mocas hi!
[10:18:15] <marvi> mztriz: I would recommend going through the Java tutorial from Sun: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[10:18:25] *** ldam has quit IRC
[10:19:45] *** bas-i has quit IRC
[10:19:59] *** casmo has quit IRC
[10:21:28] *** Duesentrieb_ has joined ##java
[10:21:38] <Duesentrieb_> hi all.
[10:21:43] *** musically_ut has joined ##java
[10:22:31] <Duesentrieb_> what's the *best* way of making a tokenizer that can chop a stream at ocurrances of ";" but considering line and block comments as well as quoting (with escapes).
[10:22:49] <Duesentrieb_> basically, i need to püick apart a bunch of sql queries from a file.
[10:23:18] <Duesentrieb_> i *could* code it by hand, but i was hoping there's somethign generic byx now. StreamTokenizer doesn't seem to cut it,.l
[10:23:34] *** ldam has joined ##java
[10:24:08] *** kungen has joined ##java
[10:24:39] <marvi> Duesentrieb_: I would use regexp.
[10:25:26] <Duesentrieb_> marvi: i wouldn't. getting this right with regex is *really* hard in my experience. and messy. butg maybe you are better with regex than me. how would you do it, exactly?
[10:25:36] <mztriz> deufrai, I tried to use the array. http://pastebin.com/d2a517667 variable dAmount might not have been initialized
[10:25:47] *** LouisJB1 has joined ##java
[10:25:58] <marvi> Pastebin a sample.
[10:25:59] *** trustin has joined ##java
[10:26:24] <dandre> I am using BufferReader class to read text files and when I read a line of text I don't have the End Of Line terminator. I want to know weather the file is in Unix, DOS or MAC format. How can I do
[10:26:55] <Duesentrieb_> marvi: it should work for *any* valid sql query.
[10:26:58] *** sphenxes has joined ##java
[10:27:18] *** bindaas has quit IRC
[10:27:20] <Duesentrieb_> marvi: and support the extensions mysql adds to the syntax, like /* block comments */.
[10:27:34] *** rainmann has quit IRC
[10:28:19] <guille_> a state machine?
[10:29:11] <Duesentrieb_> well yes. that's how to make a parser for anything regular. i know how to code that. i have done it before. too often :) I was hoping to use somethign like StreamTokenizer or Scanner.
[10:29:28] <Duesentrieb_> but i can't find anything that does it. or i'm too stupoiod to find out how to use them properly.
[10:29:47] *** seejay has quit IRC
[10:30:05] <push[EAX]> Duesentrieb_, you obviously need more practice with your design patterns :)
[10:30:15] <guille_> sorry, i've never used that
[10:30:29] *** Bevin has quit IRC
[10:30:38] <Duesentrieb_> push[EAX]: patterns like "always re-invent the wheel, libraries are crap anyway"?
[10:30:56] *** Duesentrieb_ is now known as Duesentrieb
[10:31:25] <mztriz> http://pastebin.com/d2a517667 variable dAmount might not have been initialized
[10:32:01] <push[EAX]> Duesentrieb, i'm not the one trying to re-invent the wheel here :)
[10:32:13] <Duesentrieb> StreamTokeniozer is *really* close. it supports line comments starting with a single char, like #,. or with //. I need to start them with --. ugh.
[10:32:24] <push[EAX]> precisely what patterns do avoid
[10:32:29] <Duesentrieb> push[EAX]: well, tell me what to re-use, then :)
[10:33:29] <push[EAX]> something like little language would be your best fit pattern
[10:33:45] <deufrai> mztriz: if you're using arrays, you need to specify their size
[10:34:10] *** m4rtijn has joined ##java
[10:34:21] <m4rtijn> hi all
[10:34:26] <deufrai> mztriz: on the line 6 of your pastebin, you simply declare dAmount to be a reference to a array of double
[10:34:40] <deufrai> mztriz: you're not really initializing the array
[10:35:04] *** lolipop has quit IRC
[10:35:12] <Duesentrieb> push[EAX]: duh. and how to *parse* my little language?
[10:35:56] <deufrai> since you cannot tell how many amounts will be entered ( defined at runtime, according to user replies ), you should use another type of container that can grow in size (ex. ArrayList)
[10:36:05] <deufrai> mztriz: ¨
[10:36:10] <push[EAX]> Duesentrieb, i'm not going to chew it for you
[10:36:24] <push[EAX]> you've obviously lots to learn about parsing a language
[10:36:27] <push[EAX]> have fun
[10:36:33] *** shadewind has quit IRC
[10:37:10] <Duesentrieb> push[EAX]: dude, i have written parsers before. both regular and context free. with tokenizer pass and without. that is not the problem.
[10:37:20] *** Greyhound_ has quit IRC
[10:37:31] *** Greyhound- has joined ##java
[10:37:36] <Duesentrieb> i can do it agaion if need be.
[10:37:51] <Duesentrieb> it's just that STreamTokenizer *nearly* does what i need
[10:38:02] <Duesentrieb> and i was hoping there's somethign more flexible that would suit my needs.
[10:38:05] <Duesentrieb> but apparently there isn't.
[10:38:07] <push[EAX]> lol
[10:38:13] <push[EAX]> right
[10:38:17] *** casmo has joined ##java
[10:38:22] <push[EAX]> So you've written j33t parsers
[10:38:29] <push[EAX]> and yet fail to figure how to derive a class
[10:38:32] <push[EAX]> hmm hmmm
[10:38:51] * push[EAX] swims away from the trolls
[10:38:59] <cybereal> unpossible, you ARE the troll
[10:39:34] <Duesentrieb> hehe.
[10:39:58] *** staykov has quit IRC
[10:40:26] <Duesentrieb> extensiong StreamTokenizer is, uh, rather tricky. it happens to be a convoluted piece of cardcoded cruft. at least it was when i last looked into it.
[10:40:26] *** n3llyb0y has joined ##java
[10:40:35] <Duesentrieb> anyway, i'll do it by hand.
[10:41:08] *** mztriz has quit IRC
[10:44:11] <marvi> Duesentrieb: how about using something like JavaCC? They have parsers for SQL.
[10:45:19] <Duesentrieb> yes, it's an option. though still pretty heavy, considering i don't need most if the statement structure,. i only need to find where the statement ends. I was hoping to fdind simething i could rig in 20 minutes.
[10:46:00] <Duesentrieb> looking at JEP now - http://www.singularsys.com/jep/doc/html/confparser.html
[10:46:07] <Duesentrieb> could be it, don't know yet
[10:46:21] *** fr0ggler has joined ##java
[10:47:01] *** zerobytes is now known as twobytes
[10:47:37] *** staykov has joined ##java
[10:47:48] <Duesentrieb> looks like it's geared too much towards expression parsing (which if what jep is for, of course)
[10:48:55] *** push[EAX] has quit IRC
[10:50:11] *** elmomalmo has joined ##java
[10:51:18] *** SaEeDIRHA has joined ##java
[10:51:30] *** woogley has quit IRC
[10:51:42] *** bitshuffler has joined ##java
[10:54:23] *** justafish has joined ##java
[10:56:33] *** mmc has joined ##java
[10:57:07] *** KikiJiki has joined ##java
[10:58:51] *** EspenG has joined ##java
[10:58:55] *** buntfalke has joined ##java
[10:59:48] *** aleksei has joined ##java
[11:01:16] *** CrypticSquared has quit IRC
[11:01:40] *** CrypticSquared has joined ##java
[11:02:06] <m4rtijn> what is a more conventional method for testing unassigned vars in a custom class?
[11:02:24] <m4rtijn> I could just set them to null.. in the main constructor
[11:02:30] <m4rtijn> and test for == null
[11:02:38] <m4rtijn> or should I use class forname
[11:03:18] <fr0ggler> use null - forname is usually only for reflection stuff
[11:03:51] <m4rtijn> so thats a common method?
[11:03:55] <m4rtijn> setting to null
[11:04:05] <fr0ggler> if you're just checking if an object has been instantiated, then checking for null will suffice
[11:04:28] <m4rtijn> but I do have to set it before.. or not
[11:04:50] <dangertools> m4rtijn: fields of reference types are always initialized to null. no need to do that again in the constructor
[11:04:52] <fr0ggler> so something like ArrayList<String> stringList;
[11:05:04] <fr0ggler> what dangertools just said :D
[11:05:19] <m4rtijn> thanks dangertools
[11:07:13] <m4rtijn> and u too fr0ggler
[11:07:19] <m4rtijn> :).. oops .. you!
[11:07:25] *** w0lfshad3 has joined ##java
[11:08:11] <fr0ggler> np ;)
[11:08:24] *** guille_ has quit IRC
[11:13:10] <m4rtijn> one more.. bit noobie question..
[11:13:40] <m4rtijn> If I know I need some kind of array or List in my class.. and I know this List won't be searched often and wont get very big
[11:13:56] <m4rtijn> is it better to use a normal array instead of List or Vector?
[11:14:08] <cybereal> better for what?
[11:14:33] <cybereal> without a more specific scenario a real answer can't be made, however, a generalization can be and that would be "Use List"
[11:14:47] <fr0ggler> if you're doing search operations on a data structure, then list is probably better
[11:15:20] <fr0ggler> the search methods are optimised quite well for Lists, and have nicer convenience methods than standard arrays
[11:15:22] <m4rtijn> okay
[11:16:19] *** sphenxes has quit IRC
[11:16:21] *** CrypticSquared has quit IRC
[11:16:43] *** FMJaguar has joined ##java
[11:19:59] <tajen> is there any channel on this server for JSP?
[11:20:45] *** sphenxes has joined ##java
[11:24:56] *** gandalfcome has quit IRC
[11:25:47] *** Bevin has joined ##java
[11:29:25] <tajen> does any of you know a good Eclipse plugin for JSP?
[11:31:41] *** wokawaka has joined ##java
[11:32:00] <wokawaka> hey. anyone whom can point me in right direction for how to capture images from a usb webcam?
[11:32:24] <fr0ggler> tajen: sorry i use IntelliJ Idea
[11:33:22] <fr0ggler> wokawaka: have you looked at JMF? http://java.sun.com/javase/technologies/desktop/media/jmf/
[11:33:23] *** squi has quit IRC
[11:33:40] *** squi has joined ##java
[11:34:23] <wokawaka> lookin gnow ;=)
[11:35:24] *** doc`` has quit IRC
[11:39:27] *** w0lfshad3 has quit IRC
[11:41:30] *** thpar has joined ##java
[11:43:24] *** asap18 has joined ##java
[11:47:29] *** skoskav has quit IRC
[11:49:57] *** ryman has joined ##java
[11:50:50] *** squi has quit IRC
[11:51:01] *** squi has joined ##java
[11:53:56] *** shervin_a has quit IRC
[11:55:53] *** wokawaka has quit IRC
[11:57:00] *** gfather has joined ##java
[11:57:15] *** SaEeDIRHA has quit IRC
[11:57:31] *** adi112358 has quit IRC
[11:57:37] *** ankylose has quit IRC
[11:57:41] <gfather> guys any one has info on the book ( big java ) any good ?
[12:00:28] *** asap18 has quit IRC
[12:02:42] *** casmo has quit IRC
[12:03:17] *** ryman has quit IRC
[12:07:48] <gfather> seems no :)
[12:14:46] *** magentar has joined ##java
[12:15:29] *** casmo has joined ##java
[12:17:03] *** indeterminatus has quit IRC
[12:18:11] *** staykov has quit IRC
[12:19:20] *** ciphergoth has joined ##java
[12:19:39] *** hrehf has joined ##java
[12:20:49] <ciphergoth> I've got Tiles working very well to arrange my page layout, but now I want something like a macro or little function I can call in several places. Do I have to include the function as an attribute of every page that calls it, or is there a more straightforward way?
[12:23:04] *** systat has joined ##java
[12:26:52] *** Greyhound- has quit IRC
[12:27:26] <ciphergoth> this is Tiles 2.0
[12:27:31] *** Greyhound- has joined ##java
[12:28:18] *** shervin_a has joined ##java
[12:30:53] *** riotz has joined ##java
[12:31:05] *** dv_ has joined ##java
[12:34:18] *** Daniel_H has joined ##java
[12:38:11] <ciphergoth> Possibly the answer is nothing to do with tiles, this might just be a general JSP thing
[12:38:51] *** staar2 has joined ##java
[12:40:13] <fr0ggler> ciphergoth: why not write a java class that you can just include in your JSP?
[12:40:36] <ciphergoth> fr0ggler: I could but it's so much more heavyweight than seems appropriate for the problem
[12:40:45] <fr0ggler> depends what the problem is :D
[12:40:57] <fr0ggler> jsps are meant to be written in that way
[12:41:12] <ciphergoth> All I want to do is <img width="12" height="12" src="thingy.png" title="<insert title here somehow>"/>
[12:41:25] <ciphergoth> so it's just got one parameter, the title, and it spits out that little bit of URL
[12:41:37] *** DragonLord- has joined ##java
[12:41:40] <ciphergoth> I can't believe the cleanest, neatest solution that makes the best use of my tools is to write that in Java
[12:41:40] <fr0ggler> and where do you want to get the title from?
[12:41:46] <ciphergoth> it's a string when I call it
[12:42:11] <ciphergoth> so I'll want to say <something:insertsomething text="use this title at this point"/> in various places
[12:43:19] <fr0ggler> so write your own tag that insert the image with your desired text? i don't really see where you're getting your dynamic title text from...
[12:43:52] <ciphergoth> it's a literal in the JSP that's calling my thingy
[12:43:57] *** cher has joined ##java
[12:44:30] <fr0ggler> ok so you have a member variable in your JSP?
[12:45:01] <fr0ggler> like String myText = "blah"; and then you do ...title="{myText}" ?
[12:45:13] <ciphergoth> fr0ggler: not yet (I tried a different approacj that didn't work) but that's probably part of the right solution
[12:45:46] <ciphergoth> if I did that, what would I do next to call it?
[12:45:55] <fr0ggler> you do realise that JSPs get compiled into servlets, so using Java inside them isn't considered "dirty" ;D
[12:46:02] *** ircozzy has joined ##java
[12:46:06] <fr0ggler> how do you meant "call it"?
[12:46:16] <ciphergoth> use it, reference it, have it do its thing
[12:46:43] <ciphergoth> I consider using Java inside JSPs dirty anyway
[12:46:55] <ciphergoth> I like my Java where Eclipse can see it
[12:47:15] *** casmo has quit IRC
[12:47:54] <ciphergoth> what you're saying about member variables sounds promising
[12:47:56] <fr0ggler> JSPs are Java.... but anyway...
[12:48:18] <ciphergoth> JSPs are compiled into Java, sure
[12:48:59] <fr0ggler> you can use member variables in script by doing something like ...title="<%= variableName %>"
[12:49:34] <fr0ggler> so you're just using inline Java scriptlets
[12:50:19] *** casmo has joined ##java
[12:50:28] *** ries has joined ##java
[12:51:14] <fr0ggler> i really really don't understand your problem... if you're using Tiles, can't you just specify properties in your tiles.xml definition?
[12:51:53] *** magentar has quit IRC
[12:52:16] <ciphergoth> fr0ggler: none of my JSPs contain <%= ... =%>
[12:52:20] <ciphergoth> it's all done with taglibs
[12:52:23] <fr0ggler> and then access them in your JSP like ... <tiles:getAsString name="title"/> ...
[12:52:42] <ciphergoth> fr0ggler: I want to call this several times in the same place with different titles
[12:53:03] <fr0ggler> well sure you can do it with taglibs, you can do it with inline scriptlets, whatever
[12:53:10] *** skoskav has joined ##java
[12:53:39] *** ipsnap has quit IRC
[12:54:19] <ciphergoth> so there'll be one JSP that says <some:tag ... title="this"/> and later <some:tag ... title="that"/>
[12:54:51] <ciphergoth> and my thingy should be called twice, with a different parameter at each point. (I know that "call" and "parameter" isn't the right vocab here but not sure what is)
[12:57:22] *** dnmo has joined ##java
[12:58:15] <fr0ggler> ok so are these tags your own custom ones? attributes in tags relate to getters and setters in your tag definition
[12:58:42] <ciphergoth> I don't mind whether the tag is custom by me or from a taglib that does what I want
[12:58:44] <gfather> do u think reading more books will improve your java skills , or practicesing more will do that ?
[12:58:50] <fr0ggler> so title="this" would refer to your tags setTitle method
[12:59:46] <ciphergoth> that's one way forward, but it sounds like I'd have to write my own taglib in Java to do that
[12:59:47] <fr0ggler> it totally depends on how you want to populate the title attribute, e.g. from a backend database, from a tiles definition, from a data object method...
[12:59:57] <ciphergoth> none of the above
[13:00:02] <fr0ggler> ok, from where then?
[13:00:03] <ciphergoth> from a literal in the calling JSP
[13:00:30] <fr0ggler> and where do you set that literal?
[13:00:34] <ciphergoth> it's as simple as this: I've got the same thing repeated in this one JSP fiile over and over again
[13:01:17] <ciphergoth> there's one point where the JSP file says <img width="12" height="12" src="long/path/name/thingy.png" title="title of the first instance">
[13:01:30] <ciphergoth> and then later on it says <img width="12" height="12" src="long/path/name/thingy.png" title="title of the second instance">
[13:01:38] <ciphergoth> and there's a third, a fourth, a fifth instance
[13:01:43] <ciphergoth> so that's a lot of repetition in my JSP
[13:01:48] <fr0ggler> sure
[13:01:55] <ciphergoth> and I want to work out how not to repeat myself. That's all
[13:02:09] <fr0ggler> so i refer back to my very very first suggestion of writing a java method
[13:02:17] <ciphergoth> seriously?
[13:02:28] *** hoerup has joined ##java
[13:02:51] *** mmc has left ##java
[13:03:20] <ciphergoth> there's no taglib that makes this easy for me already? It doesn't seem like such an unusual or strange need/
[13:03:28] <fr0ggler> so <% getImgWithTitle(String title) { out.write("<img ........ title="+title+"/>"); } %>
[13:03:40] <fr0ggler> yeah there probably is - im not going to go look for that for you :)
[13:03:57] <fr0ggler> (i don't know if out.write is correct, but you get the idea)
[13:04:49] <ciphergoth> fr0ggler: if you've any suggestions on where to look I'm happy to do the looking ;-)
[13:05:18] <fr0ggler> without sounding harsh, Google would be a good place to start. Seriously.
[13:06:08] <ciphergoth> oddly enough, I tried that :-) but maybe I chose the wrong search terms? What search terms might you suggest?
[13:06:15] *** Ven]n has joined ##java
[13:06:17] <fr0ggler> although why you'd want a taglib outputting a simple html fragment with a per-use defined string is beyond me
[13:06:42] <fr0ggler> when you can do it in "normal" java
[13:06:48] <fr0ggler> but hey, each to their own :)
[13:07:15] <fr0ggler> http://struts.apache.org/1.x/struts-taglib/tlddoc/html/img.html
[13:07:22] <fr0ggler> ok the struts taglib has something similar
[13:07:44] *** jo4 has joined ##java
[13:09:09] *** cybereal has quit IRC
[13:10:00] <jo4> i'm trying to install jogl here. i gave up on windows, so i'm doing it on a linux system. i've extracted the jars to a dir and set CLASSPATH to the jars. but right now i got "so gluegen-rt in java.library.path" so where do i have to put the lib files?
[13:15:03] *** immortalfire has joined ##java
[13:15:32] *** musically_ut has quit IRC
[13:16:49] *** genesiss has quit IRC
[13:21:25] *** genesiss has joined ##java
[13:22:38] *** h-kan has joined ##java
[13:22:57] *** jonh has quit IRC
[13:22:57] *** sphenxes has quit IRC
[13:24:06] *** sphenxes has joined ##java
[13:24:21] *** Duesentrieb has quit IRC
[13:27:32] *** riotz has quit IRC
[13:29:30] *** giupo has joined ##java
[13:29:37] *** giupo has left ##java
[13:34:48] *** cyzie has joined ##java
[13:35:36] *** cyzie has quit IRC
[13:35:52] *** multi_io has quit IRC
[13:37:06] *** vyoman has joined ##java
[13:37:15] *** cyzie has joined ##java
[13:37:56] *** dv_ has quit IRC
[13:38:07] *** deepjoy has quit IRC
[13:38:10] *** systat is now known as java_
[13:38:33] *** eidolon has left ##java
[13:38:52] *** java_ is now known as OxDEADED
[13:42:03] *** shadewind has joined ##java
[13:42:40] *** EspenG has quit IRC
[13:47:18] *** bitcrave has joined ##java
[13:47:27] *** kane77 has joined ##java
[13:47:29] *** paulweb515 has joined ##java
[13:48:06] *** le_biloute has joined ##java
[13:48:12] *** gdoko has quit IRC
[13:50:18] *** le_biloute has left ##java
[13:50:24] *** milligan_ has joined ##java
[13:50:36] <milligan_> Stupid question, but what's the difference between extends and imeplements ?
[13:50:42] *** ankylose has joined ##java
[13:50:49] *** indeterminatus has joined ##java
[13:50:50] <FauxFaux> One is for classes, the other is for interfaces. Normally.
[13:51:04] *** blankthemuffin_ has joined ##java
[13:51:21] <milligan_> ah, ok.
[13:51:34] <milligan_> And what differs an interface from a class ?
[13:51:42] *** Level1 has joined ##java
[13:51:53] <FauxFaux> It can't have method bodies or member variables. Your book probably tells you this.
[13:52:04] <elmomalmo> jo4: You might find this codeswarm wiki page useful. http://code.google.com/p/codeswarm/wiki/RunOpenGL
[13:52:05] *** |sanchez| has quit IRC
[13:52:07] *** deepjoy has joined ##java
[13:52:14] <fr0ggler> milligan_: interfaces are for describing just that - an interface for implementing classes to adhere to
[13:52:38] <Level1> hi, I'm trying to use a gridlayout, but when I have enough columns or rows, it seems to force it to one less column than I specified, creating this weird diagonal effect
[13:53:01] <elmomalmo> jo4: Especially the bit about LD_LIBRARY_PATH
[13:53:52] <milligan_> fr0ggler, so an interface will just a collection of classes that it extends?
[13:54:03] <fr0ggler> FauxFaux: interfaces can have member variables, but they are implicitly final
[13:54:37] <FauxFaux> fr0ggler: Not very variable. >.<
[13:54:43] <fr0ggler> milligan_: no, classes will implement interfaces so you know that those classes must implement some base functionality as set out by the interface
[13:55:01] <fr0ggler> FauxFaux: no, but you can still have them
[13:55:19] <fr0ggler> FauxFaux: useful for constants or enums etc
[13:55:43] <benJIman> I believe it's referred to as an antipattern.
[13:55:52] <FauxFaux> I don't see how it's useful for enums, unless you mean pre-java5.
[13:56:30] *** Greyhound- has quit IRC
[13:56:34] <fr0ggler> FauxFaux: you can specify an enum that will be accessible for all implementing classes
[13:56:38] *** cyzie has quit IRC
[13:56:59] <benJIman> fr0ggler: It's a very bad idea for several reasons, and why import static was introduced (so you don't need to do it)
[13:57:30] *** Greyhound- has joined ##java
[13:57:50] <fr0ggler> they aren't mutable, so are fine as final member variables in interfaces - true benJIman, but FauxFaux was wrong is saying that you CAN'T have member variables in interfaces
[13:57:59] <fr0ggler> but anyway, this isn't helping milligan_ at all is it
[13:58:12] <FauxFaux> HEavily depends on your definition of VARIABLE.
[13:58:12] <benJIman> http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
[13:58:38] <fr0ggler> christ - don't get all lexically facetious on me
[13:59:34] <milligan_> hehe - quite a bit of meat on that bone to chew, that's for sure.
[13:59:58] <fr0ggler> milligan_: so for example, say you write an interface Inflatable that says that all implementing classes have to have an "inflate(int amount)" method
[14:00:27] <fr0ggler> then you write a Balloon implements Inflatable class
[14:00:33] <milligan_> So .. an interface will be a description of "stuff" that is required.. and if my class implements the interface, it won't compile unless I have the methods the interface describes ?
[14:00:39] <fr0ggler> exactly ;)
[14:00:48] <milligan_> yeah .. nice :)
[14:02:16] <paulweb515> milligan_: yes, an interface is a contract ... any class that implements the interface (correctly) fulfills the contract, and can be used where that interface is needed
[14:02:22] *** juc0 has quit IRC
[14:02:48] *** neurodamage has quit IRC
[14:03:22] <milligan_> I suppose an interface could be partially compared to header files in C++ ...
[14:04:22] *** CaptainMorgan has quit IRC
[14:04:28] <fr0ggler> milligan_: yeah i guess so
[14:05:04] *** ircozzy has quit IRC
[14:09:20] *** LordMetroid has joined ##Java
[14:12:42] *** isr` has joined ##java
[14:16:59] <isr`> howdy
[14:18:21] *** CaptainMorgan has joined ##Java
[14:20:02] *** jabalsad has quit IRC
[14:20:33] *** chetnick has joined ##java
[14:21:45] *** gdoko has joined ##java
[14:25:30] *** hrehf_ has joined ##java
[14:25:48] <jottinger> morning
[14:26:02] <waz> g'morning
[14:26:09] *** tom17bombadil_ has joined ##java
[14:26:46] <m4rtijn> hmm, if I write an app on a 32-bit system which uses Date.. I can only use that app without errors until 2038 ?
[14:27:28] *** cyzie has joined ##java
[14:27:53] *** kushal_12_27_200 has joined ##java
[14:28:04] <jottinger> m4rtijn: errrr
[14:28:18] <jottinger> with Java?
[14:29:02] <m4rtijn> yes
[14:29:21] <jottinger> why would the 32-bit system matter?
[14:29:25] <m4rtijn> ah, no.. I misread
[14:29:30] *** toader has joined ##java
[14:29:56] <toader> HI, anybody use IDEA here? Can IDEA profile java?
[14:30:14] <m4rtijn> the 32 bit representation on unix will overflow in 2038
[14:30:23] <toader> I want to see how much memory consumed when i runing java
[14:30:28] <jottinger> m4rtijn: yes... but the JVM defines the sizes of types explicitly.
[14:30:40] <m4rtijn> the 64 bit float of Date() will go on for 18billion more years
[14:31:06] <m4rtijn> I guess I dont have to change my app in 18 billion years anymore..
[14:31:19] <jottinger> Well, you will, but not because of THAT
[14:31:38] <m4rtijn> heh
[14:31:48] <reverend> hopefully mostly everything will be rewritten in a billion years or so
[14:32:11] <m4rtijn> I guess programs will be able to write themselves till then ;)
[14:32:23] <reverend> that will give us 17 billion years to plan for Y18B
[14:32:36] *** [S^K] has joined ##java
[14:32:36] <m4rtijn> hehe
[14:32:48] <f3ew> you hope
[14:33:20] * jottinger will still have his cobol skillz then
[14:33:33] <jottinger> ... having been encoded into a mainframe, spouting bitter sarcasm over the intertubes
[14:34:17] <toader> hi which tools can be use to see the profile of JVM
[14:34:33] <jottinger> toader: there are lots of profilers.
[14:34:35] <m4rtijn> hmm.. Im not sure yet what to use in my classes.. either I use Date and in my GUI convert it to gregorianCalender.. or use the Calender directly in my class
[14:34:38] <jottinger> Netbeans has one built in
[14:34:51] <jottinger> ~joda-time
[14:34:54] <m4rtijn> I guess theres some advantages to both
[14:35:06] <jottinger> toader: is the JVM using too much memory?
[14:35:40] *** Frostix has joined ##java
[14:36:29] *** tomekw has joined ##java
[14:36:30] <toader> jottinger: yes, i am loading the data. It becomes more and more slowly
[14:36:38] <jottinger> you are... what?
[14:36:43] <jottinger> it becomes what more slowly?
[14:36:47] *** asap18 has joined ##java
[14:36:48] <jottinger> loading what data?
[14:36:53] <toader> jottinger: loading speed
[14:37:02] <tomekw> what is the best environment to create GUIs in Eclipse?
[14:37:15] <tomekw> what is the best environment to create GUIs in Eclipse in Swing?
[14:37:18] <toader> jottinger: i have java program to load data between database
[14:37:48] <toader> jottinger: at the beginning, it is fast but later it becomes very slow
[14:38:18] <toader> jottinger: i want to see if there is large memory is not gc
[14:38:44] *** ttmrichter has quit IRC
[14:38:59] <jottinger> toader: which version of Java?
[14:39:08] <toader> jottinger: JDK1.6
[14:39:16] <jottinger> which specific version?
[14:39:31] <Ven]n> tomaw, if you mean layout manager id recommend BorderLayout for something easy
[14:40:06] *** bitcrave has quit IRC
[14:41:01] <toader> jottinger: jdk1.6.0_12
[14:41:02] <jottinger> toader: just /exec -o java -version, dude... the specific version is relevant here
[14:41:06] *** gfather has left ##java
[14:41:06] <jottinger> okay, good!
[14:41:09] <jottinger> ~jvisualvm
[14:41:20] <jottinger> and no javabot.
[14:41:30] <jottinger> anyway, use jvisualvm - it's part of 1.6.0_12
[14:41:39] <jottinger> and can profile memory for you
[14:43:05] <jottinger> ls
[14:44:33] <Ven]n> any ideas how to fetch out media information of loaded videos in JMF?
[14:44:41] <Ven]n> like framerate, codec used, bitrate etc
[14:45:02] *** hrehf has quit IRC
[14:45:03] *** hrehf_ is now known as hrehf
[14:45:23] *** nocture has quit IRC
[14:46:25] <OxDEADED> Hello, can I use java webstart to access the registry on local computer(if it's running windows)
[14:46:35] <Ven]n> information like this: http://bildr.no/view/352401
[14:46:38] <OxDEADED> or is it sandboxed
[14:47:01] <waz> ~tias
[14:47:12] <waz> damn bot
[14:47:12] *** vijay_ has quit IRC
[14:47:21] <waz> still off on the romantic getaway with Cheeser
[14:47:26] <aleksei> OxDEADED: sign the jars
[14:47:31] *** Copter has joined ##java
[14:47:34] <OxDEADED> hihihi
[14:50:07] <jottinger> I can never tell what "hihihi" means
[14:50:57] <jottinger> is he saying "hello, hello, hello" very informally?
[14:51:08] <jottinger> or laughing? (it seems like an odd place to laugh)
[14:53:07] <isr`> when an object is serialized and dumped to a file, is the file flat text?
[14:53:13] <isr`> or is it binary.
[14:53:14] *** asap18 has quit IRC
[14:53:18] <fr0ggler> isr`: binary
[14:53:37] *** TooAngel has joined ##java
[14:53:37] <isr`> ok
[14:54:06] <jottinger> ~tias
[14:54:07] <jottinger> darn it!
[14:54:19] <isr`> muahaha
[14:54:23] <jottinger> the serialized form is not only easy to LOOK AT, it's easy to find documentation for
[14:54:27] <isr`> javabot is laying waste to your plans.
[14:54:36] <isr`> i have been googling for it
[14:54:42] <jottinger> why didn't you just try it?
[14:54:49] <isr`> i've only found info on how to serialize, not what the serialization looks like
[14:54:55] <jottinger> cat output.ser
[14:54:59] <jottinger> works wonders.
[14:55:07] <fr0ggler> Java serialises your objects to bytestream
[14:55:12] *** blahjake has joined ##java
[14:55:19] <isr`> but if its binary it will be a bunch of garbage in cat
[14:55:28] <fr0ggler> garbage to you maybe :D
[14:55:29] <jottinger> then use od
[14:55:51] <aleksei> isr`: of course, why do you need text?
[14:56:19] *** TooAngel has left ##java
[14:56:31] *** cybereal has joined ##java
[14:57:10] *** ciphergoth has left ##java
[14:57:43] <isr`> aleksei: supposed to be able to save things as text or xml.
[14:58:11] <isr`> i was just looking at serialization as an alternative for storing to text, but apparently i am not going to be able to do that.
[14:58:28] <isr`> well, not as an alternative, but as a way to store data to text
[14:58:46] <jottinger> isr`: sure it is. It's just not TEXT.
[14:58:58] <isr`> yea
[14:59:00] *** ExtremeDevilz has joined ##java
[14:59:06] <isr`> its binary.
[14:59:28] <ExtremeDevilz> Hi guys i got a source code but i get some funny error
[15:00:04] <jottinger> that's good.
[15:00:22] <ExtremeDevilz> for (Iterator i$ = bookDrops.iterator(); i$.hasNext(); ) { Integer itemDrop = (Integer)i$.next();
[15:00:33] <ExtremeDevilz> how did my is became to i$
[15:00:45] <jottinger> then you don't have actual source code, huh?
[15:00:45] <reverend> indeed, how did it
[15:00:47] <ExtremeDevilz> i decompiler from a jar file
[15:00:48] <ExtremeDevilz> yeah
[15:00:58] <ExtremeDevilz> i cant find source code
[15:01:17] <ExtremeDevilz> >_> o well let me replace
[15:01:24] *** mbroeker has joined ##java
[15:02:02] *** javabot has joined ##java
[15:02:22] *** le_biloute has joined ##java
[15:02:25] <cheeser> ~ping
[15:02:25] <javabot> You rang, m'lord?
[15:03:02] <isr`> nice
[15:03:12] <ExtremeDevilz> anyone know what this is ?
[15:03:21] <ExtremeDevilz> switch (1.$SwitchMap$net$sf$odinms$exttools$dropspider$ItemType[itemClass.ordinal()])
[15:03:23] <aleksei> isr`: encode in base64 or something then
[15:03:27] <ExtremeDevilz> my java not good :(
[15:03:35] <cheeser> a switch statement.
[15:03:46] <ExtremeDevilz> how do i define it?
[15:03:51] <cheeser> ~switch
[15:03:51] <javabot> cheeser, switch is http://java.sun.com/tutorial/java/nutsandbolts/switch.html
[15:03:57] *** giaco has quit IRC
[15:04:00] * fr0ggler spies code-pilfering
[15:04:04] <cheeser> ExtremeDevilz: you should probably just ask the vendor of that code for help
[15:04:12] *** giaco has joined ##java
[15:04:14] <ExtremeDevilz> lawsuit o.o
[15:04:20] <cheeser> eh?
[15:04:39] <ExtremeDevilz> the vendor got lawsuit for recreating the game aka private server
[15:04:56] *** le_biloute has quit IRC
[15:05:10] <cheeser> ok... and so you can't talk to them? or are you trying to rip off their code that they ripped off from someone else?
[15:05:14] *** le_biloute has joined ##java
[15:05:28] <ExtremeDevilz> o.o they did not ripped off
[15:05:36] *** zipito has quit IRC
[15:05:47] <ExtremeDevilz> there are computer science student and they coded it from scratch
[15:05:59] <ExtremeDevilz> but they shut down the svn before more probelm
[15:06:25] <reverend> you should consider that you're just plain not qualified to do his
[15:06:29] <fr0ggler> so what's the problem with asking them for the code? or are you trying to prove that this other guy ripped it off the students?
[15:06:36] <cheeser> well, if that code has already generated legal problems don't come dragging it in here.
[15:06:42] <ExtremeDevilz> and they there was source but i think extools source was missing
[15:06:42] <reverend> and find a new game to bypass vendor regulations for
[15:06:49] <fr0ggler> in which case, they were pretty dumb to put it on unsecured svn
[15:07:02] <ExtremeDevilz> ahh no you guys dont understand
[15:07:24] <ExtremeDevilz> when they made the game and they run it.for past 7 months nothing happend and game company knew about it
[15:07:48] <jottinger> we understand, we just don't care
[15:08:01] <ExtremeDevilz> :/ so i am asking how to correct this
[15:08:04] <waz> ~be jottinger
[15:08:04] <javabot> Darn you all to heck!
[15:08:10] <ExtremeDevilz> cause all i need is there exttools
[15:08:11] <reverend> ExtremeDevilz: hire someone who knows java
[15:08:15] <ExtremeDevilz> not to play the game
[15:08:17] *** bindaas has joined ##java
[15:08:43] <ExtremeDevilz> switch (1.$SwitchMap.net.sf.odinms.exttools.dropspider.ItemType[itemClass.ordinal()]),$ that what do i replace with ?
[15:08:55] *** rollins has joined ##java
[15:09:03] <reverend> other code
[15:09:08] *** Dracofodder has joined ##java
[15:09:33] *** deepjoy has quit IRC
[15:09:59] <ExtremeDevilz> nvm man i will take my leave
[15:10:12] <ExtremeDevilz> since non of you are interested to help me in my last error
[15:10:23] *** bitcrave has joined ##java
[15:10:57] *** spathi has joined ##java
[15:10:59] <reverend> okay, bye!
[15:11:11] <cheeser> let me be a bit more explicit, i don't want to be dragged into a lawsuit for bringing that here. so take it somewhere else.
[15:11:48] <ExtremeDevilz> o.o why would you be
[15:12:32] <fr0ggler> we aren't interested, because asking for help in dechiphering decompilation of someone else's compiled bytecode is dumb
[15:12:45] <ExtremeDevilz> i told you the source code went missing
[15:12:53] <ExtremeDevilz> not that i want it
[15:12:59] <cheeser> because when the copyright holders come to ream out your ass, they'll collect all the evidence of infrigement they can. and that includes chat transcripts.
[15:12:59] <ExtremeDevilz> i tried to search like mad
[15:13:08] *** skoskav has quit IRC
[15:13:13] <fr0ggler> so you search like mad for source code you don't want?
[15:13:27] <fr0ggler> seems a little futile to me
[15:13:31] <ExtremeDevilz> o.o
[15:13:43] <ExtremeDevilz> no you dont understand
[15:13:45] <ExtremeDevilz> >_>
[15:13:50] <cheeser> you clearly don't either
[15:14:03] <ExtremeDevilz> i just want some of the tools
[15:14:17] <ExtremeDevilz> like HexTools Etc .
[15:14:31] <fr0ggler> then speak to the original developers
[15:14:33] <cheeser> so email one of those students.
[15:14:39] <ExtremeDevilz> ok i think i will
[15:14:46] <fr0ggler> (i sense a cyclical situation arising here)
[15:14:56] *** teralaser has quit IRC
[15:15:09] <ExtremeDevilz> :/ but i doubt they will reply to get them more legal issue
[15:15:14] <fr0ggler> not our problem
[15:15:23] <ExtremeDevilz> yup true.
[15:15:42] <ExtremeDevilz> anyway thanks alot :)
[15:15:50] <ExtremeDevilz> for your kind understanding
[15:16:08] *** jdolan_ has joined ##java
[15:18:21] *** seen_ has joined ##java
[15:19:06] *** seen_ has left ##java
[15:20:15] *** njan has left ##java
[15:21:07] *** eidolon has joined ##java
[15:22:09] *** le_biloute has joined ##java
[15:22:36] *** JordanG has joined ##java
[15:24:17] *** henry_r has joined ##java
[15:24:39] *** keks_ has quit IRC
[15:24:42] *** teralaser has joined ##java
[15:24:44] *** le_biloute has quit IRC
[15:25:01] *** le_biloute has joined ##java
[15:25:55] *** geaaru has quit IRC
[15:26:16] *** juc0 has joined ##java
[15:26:31] *** mele- has joined ##java
[15:27:37] *** geaaru has joined ##java
[15:30:20] *** jdolan_ has quit IRC
[15:32:26] *** skoskav has joined ##java
[15:32:47] <isr`> okay, so this is a design question. if i have some class, Model that i want to flatten to text to save to/open from a text file, does it make more sense to create one helper class that provides static methods to save a Model instance and to open a Model instance from a text file
[15:32:58] <isr`> or would it make more sense to split those operations into two separate helper classes.
[15:34:14] *** fanti has joined ##java
[15:34:15] <isr`> so, TextModel.save(Model m, File f) and TextModel.open(File f), or ModelToText.doIt(Model m, File f) and TextToModel.doIt(File f)
[15:35:00] <isr`> i think perhaps because i am using the same delimiters in either case, it might be better just to use one class to perform both operations
[15:35:26] *** h-kan has left ##java
[15:35:39] *** riotz has joined ##java
[15:35:42] <fr0ggler> either way sounds fair enough really
[15:35:51] <fanti> hello! i like to know whether the jdbc mysql-connector driver releases the CPU in a multithreading system so that other threads can run while waiting for a query answer?
[15:36:17] <jottinger> fanti: if it's in java, it doesn't have much of a choice
[15:36:34] *** waz has quit IRC
[15:37:06] <dmlloyd> yeah, you have to go out of your way to write something that comsumes CPU needlessly
[15:37:09] <dmlloyd> consumes*
[15:38:51] <fr0ggler> isr`: it's probably just down to taste - you could have a ModelIOFactory class with a member Model variable that gets set on construction telling the factory what type of model you want to perform operations on (TextModel in this case). The saveModel and loadModel methods would call model.save and model.load
[15:39:00] <fr0ggler> something like that would be nice and easy to understand
[15:40:08] <isr`> fr0ggler: yeah, but the model is put together in a non-trivial way during run time sometimes.
[15:40:17] <isr`> i see what you are saying though.
[15:40:40] <isr`> basically this app is using the java compiler to reverse engineer java code.
[15:40:56] <isr`> pretty useless really, but it is interesting
[15:41:21] <fr0ggler> well that should still work. construct your model, init your ModelIOFactory with the completed model, and call factory.save
[15:41:52] <isr`> word
[15:42:01] <fr0ggler> but as i say, it's totally down to taste - there's no real "right" way of doing what you want
[15:45:38] *** Dracofodder has quit IRC
[15:47:08] *** Dracofodder has joined ##java
[15:48:09] *** alek_b has quit IRC
[15:49:19] *** mele- has quit IRC
[15:50:02] *** sanity has joined ##java
[15:50:03] *** UT2K3 has joined ##java
[15:50:39] <sanity> I'm experiencing a tricky garbage collection issue, and could really use some help if anyone has experiencing with tracking down the reason for long pauses. I've describe the problem here: http://budurl.com/gc02
[15:51:21] *** hoerup has quit IRC
[15:51:40] <jottinger> sanity: obvious problem
[15:52:04] <jottinger> you need to find a different way to manage the hashmap
[15:52:09] <jottinger> use a distributed heap
[15:52:16] <cheeser> like terracotta
[15:52:17] <cheeser> 8^)=
[15:52:22] <jottinger> like terracotta, sure
[15:52:22] * cheeser eyes jottinger
[15:52:24] <jottinger> or hadoop
[15:52:54] *** giaco has quit IRC
[15:53:13] <jottinger> cheeser: I figured my $SOLUTION_OF_CHOICE was obvious
[15:53:21] <jottinger> but it probably would be really good for this
[15:53:30] *** alek_b has joined ##java
[15:53:32] <sanity> well, if you look at the logs the problem seems to be with resizing ParNew, not the tenured objects - which would be where the HashMap would be
[15:53:44] <jottinger> sanity: a 9G heap is madness
[15:53:54] <sanity> jottinger: why?
[15:54:21] <jottinger> GC times!
[15:54:32] <cheeser> jottinger: yeah. which is why i mentioned TC first
[15:54:33] <cheeser> 8^)=
[15:54:44] <sanity> jottinger: look at the logs, the problem is resizing ParNew, which is only 153MB
[15:54:45] <jottinger> cheeser: *shrug*
[15:54:50] *** juacom99 has joined ##java
[15:56:05] *** ExtremeDevilz has quit IRC
[15:56:24] *** giaco has joined ##java
[15:57:42] *** tomekw has quit IRC
[15:58:49] *** blankthemuffin_ has quit IRC
[15:59:23] *** kushal_12_27_200 has quit IRC
[16:00:13] *** juacom99 has left ##java
[16:00:22] *** jdolan_ has joined ##java
[16:01:20] *** dnmo has quit IRC
[16:02:55] <csgeek> I have a JFrame with default close operation set to DO_NOTHING_ON_CLOSE.. and i'm handeling the windowClosing event... (basically a confirm you want to exit), but the window still closes before the JOption is displayed..
[16:03:00] *** Angel-SL has quit IRC
[16:03:18] <csgeek> do I need to do anything else, I'm missing?
[16:03:27] <cheeser> mmmm. handel.
[16:04:22] *** Hink has joined ##java
[16:05:13] <m4rtijn> ~joda-time
[16:05:14] <javabot> m4rtijn, joda is an excellent date/time implementation for Java. http://joda-time.sourceforge.net - also JSR 310 - https://jsr-310.dev.java.net/
[16:05:36] *** immortalfire has quit IRC
[16:07:03] <csgeek> I'm handeling the event... it is calling the method I need that pops the confirmation dialog...
[16:08:22] <m4rtijn> stupid dates
[16:08:28] *** jnvilo has joined ##java
[16:08:58] <jnvilo> hi, is there any way to make a java applet connect to another server other than where it was downloaded from? All docs seems to say it is not possible
[16:09:02] *** casmo has quit IRC
[16:09:09] <m4rtijn> who was so stupid to make dates a non-decimal system
[16:09:13] <jottinger> jnvilo: sign it.
[16:09:27] <m4rtijn> I need a timemachine to kill him/her
[16:09:38] <cheeser> m4rtijn: well, Caesar tried to fix that.
[16:09:38] <cheeser> 8^)=
[16:09:54] <m4rtijn> smart dude
[16:10:01] <jottinger> All you people need to use Hebrew calendars
[16:10:09] <jottinger> then you'd appreciate the simplicity of the gregorian system :)
[16:10:12] <_W_> I was about to say "blam that Gregor guy"
[16:10:13] <jnvilo> jottinger: thank you
[16:10:13] <m4rtijn> are they logial?
[16:10:16] <_W_> *blame
[16:10:28] <m4rtijn> hehe
[16:10:33] *** murz has quit IRC
[16:10:34] <m4rtijn> logical*
[16:11:18] *** AdrienC has joined ##java
[16:11:32] <AdrienC> hi
[16:11:43] <m4rtijn> I never used Date before and was reading the API today for the first time.. when it said: time in milisecond from 1970 till now.. I knew something was wrong :)
[16:12:16] <fr0ggler> csgeek: pastebin up your code and we can have a look
[16:13:00] *** DJGummikuh has joined ##java
[16:13:02] <DJGummikuh> Hey
[16:13:25] <DJGummikuh> is there a way in java to give a "method" to another method as a parameter?
[16:13:44] <jottinger> yes
[16:13:52] <DJGummikuh> where do I have to look for that?
[16:14:01] <jottinger> java.lang.reflect
[16:14:22] <reverend> or just use an interface
[16:14:33] <cheeser> that's not *exactly* what he's looking for
[16:14:34] <cheeser> 8^)=
[16:14:43] <jottinger> reverend: well, suggesting that he use an interface is suggesting that he doesn't understand his problem very well
[16:14:53] <jottinger> or java, for that matter, and he clearly understands java well
[16:15:19] <reverend> if you say so
[16:15:25] *** arpu has quit IRC
[16:15:27] <DJGummikuh> interfaces are out of the question.. I'm trying to build a starter wrapper for programs that are already written
[16:15:46] <csgeek> fr0ggler, http://pastebin.com/m42ceafdb
[16:15:49] <DJGummikuh> plus not all programs are written by us so I don#t have access to all the sources
[16:16:31] <DJGummikuh> what I would like to do now is to tell a thread which method it has to call WITHOUT having to rely on interfaces.. my belly says that reflect is the right corner to look in here but I never played with reflection before
[16:16:37] <reverend> i'm not sure that you're getting my meaning
[16:17:24] <cheeser> j.u.l really *is* a shitty API
[16:17:35] <jottinger> cheeser: just outdated
[16:18:22] <cheeser> jottinger: funny that considering log4j predates it
[16:18:37] *** alg0rithm has quit IRC
[16:18:37] <cheeser> logger.sever("message", exception); // doh!
[16:18:46] <cheeser> *severe*
[16:19:10] <jottinger> well, I use a proxy in front of j.u.l that provides better category instantiation and varargs, too, so...
[16:19:11] *** radixor has joined ##java
[16:19:14] <cheeser> logger.log(Level.SEVERE, "message", exception); // dumb
[16:19:36] <cheeser> jottinger: somehow I doubt that bill shannon would appreciate me bringing slf4j into glassfish
[16:19:40] <cheeser> 8^)=
[16:19:45] <jottinger> I really wish that the java api people thought more about typical use and not "here're the tools people can write functional wrappers to use"
[16:19:48] <dmlloyd> jottinger: that's what I do too. works great
[16:20:06] <dmlloyd> I prefer to use a String.format()-type message format anyway
[16:21:25] <csgeek> fr0ggler, I think i got it.. thanks..
[16:21:25] <jottinger> javamail, j.u.l, XML... all retarded APIs that provide what you *need* but with no consideration at all for the people who have to use them
[16:21:29] *** mohax has joined ##java
[16:21:44] <dmlloyd> java.xml.stream is nice imo
[16:21:45] <fr0ggler> csgeek: ah ok - sorry hadn't had a chance to look yet
[16:21:57] <jottinger> STaX isn't bad, no
[16:22:12] <jottinger> the rest of it is pukeworthy
[16:22:14] *** mohax has quit IRC
[16:22:16] <cheeser> that's one of my big complaints about the JCP in general.
[16:22:20] <jottinger> I'm pretty sure W3C had nothing to do with STaX
[16:22:45] <dmlloyd> probably not :)
[16:23:11] <csgeek> it's fine.. it's a goof up on my part... works fine now.
[16:23:19] *** Varox has joined ##java
[16:23:36] <jottinger> sanity: yo
[16:23:47] *** elmomalmo has quit IRC
[16:23:54] <dmlloyd> cheeser: hopefully jsr-310 will be a good counterexample. it is very well thought-out at least. my only criticism might be that it is overly complex...
[16:24:03] <jottinger> ~jsr 310
[16:24:04] <javabot> 'JSR 310: Date and Time API' can be found at http://www.jcp.org/en/jsr/detail?id=310
[16:26:19] *** gdoko has quit IRC
[16:28:10] <DJGummikuh> jottinger btw that was a cool idea.. I just managed to call my first application via reflection *woohoo*
[16:28:13] <DJGummikuh> learn something new every day .D
[16:28:47] <jottinger> DJGummikuh: just keep in mind that it's usually the wrong solution
[16:29:27] <DJGummikuh> well as said, I don't really have a choice (or at least I don't think I do) since I don't have access to all the sources of the programms of which I want to wrap the starts
[16:32:17] <DJGummikuh> ahh and I just verified that you cannot place static methods in interfaces which makes interfaces for me even more worthless
[16:33:08] *** ramdam has quit IRC
[16:34:12] <jottinger> trying to fit your problem into java is almost always going to hurt
[16:34:26] <jottinger> think in java, things are easy. Think in C and try to do 'em in Java...
[16:35:09] <DJGummikuh> it's all java...
[16:35:37] <jottinger> of course
[16:35:45] <jottinger> but the solution you're trying to use is suboptimal
[16:36:47] *** rlubke has joined ##java
[16:37:27] <DJGummikuh> yes it seems that way... all with Class[] and Object[] and generally a lot of [],{} and () and such.. pretty ugly to read :D
[16:37:46] <fr0ggler> depends on what you're used to ;)
[16:37:55] <fr0ggler> i really like Java syntax
[16:37:56] <DJGummikuh> no, I'm no brainfuck developer ^^
[16:38:13] <cheeser> DJGummikuh: more of a whitespace kinda guy, eh?
[16:38:19] <DJGummikuh> yes so do I.. but reflection syntax is highly ugly compared to average java syntax
[16:38:19] *** Duesentrieb has joined ##java
[16:38:26] <DJGummikuh> cheeser absolutely !
[16:38:32] <cheeser> http://compsoc.dur.ac.uk/whitespace/
[16:38:42] <Duesentrieb> hi all. hoiw can i check if i'm using a 64bit version of java?
[16:38:47] <Duesentrieb> from the command line, i mean
[16:38:50] <cheeser> Duesentrieb: java -version
[16:38:51] <fr0ggler> java -version
[16:39:06] <Duesentrieb> hm... ok... what should that say?
[16:39:18] <Duesentrieb> Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
[16:39:29] <Duesentrieb> i suppose that's not 64bit, is it?
[16:39:32] <DJGummikuh> fr0ggler but take this line for example ...
[16:39:33] <DJGummikuh> (ConnectorServer.class.getDeclaredMethod("main", new Class[]{ String[].class})).invoke(new Starter(), new Object[]{new String[]{"8888"}});
[16:39:40] <DJGummikuh> this is NOT beautiful
[16:39:56] <cheeser> Duesentrieb: doubtful
[16:40:21] <Duesentrieb> file /usr/bin/java
[16:40:22] <Duesentrieb> /usr/bin/java: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available
[16:40:24] <Duesentrieb> gnarf.
[16:40:29] <marvi> Duesentrieb: Mine says Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)
[16:40:30] *** hrehf_ has joined ##java
[16:42:52] <fr0ggler> DJGummikuh: you're using java 1.5?
[16:46:28] *** thpar has quit IRC
[16:47:01] *** ScottG489 has quit IRC
[16:48:20] *** romanb has joined ##java
[16:49:09] *** Seldon75 has joined ##java
[16:50:38] *** arpu has joined ##java
[16:51:41] *** IceMuppet has quit IRC
[16:52:22] *** _acid__ has joined ##java
[16:53:02] *** geaaru has quit IRC
[16:53:17] *** DJGummikuh has quit IRC
[16:53:29] *** chanux has joined ##java
[16:54:23] *** morkar- has joined ##java
[16:55:12] <chanux> I get "cannot find symbol" error when I try to comile my code. I'm somewhat blind to any possible errors now. tried googling but no help. Any one free to help me please?
[16:55:48] <jottinger> chanux: $75/hour
[16:55:49] *** toader has quit IRC
[16:55:58] <fr0ggler> chanux, pastebin your code
[16:56:11] *** elmomalmo has joined ##java
[16:56:25] *** xabbuh has quit IRC
[16:56:26] <chanux> jottinger, I'm a poor student sir
[16:56:31] <chanux> fr0ggler, will do sir
[16:56:35] <vol> ~pastebin
[16:56:35] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[16:56:36] <jottinger> I'm a poor non-student with a family
[16:57:39] *** hrehf has quit IRC
[16:58:28] <fr0ggler> i live on a lily-pad
[16:59:04] *** kab has joined ##java
[16:59:09] *** sidelil has joined ##java
[16:59:58] <chanux> fr0ggler, http://pastebin.com/d77a924af here it is
[17:00:31] <vol> now, did this error message give you a LINE it was on?
[17:00:55] <sidelil> Is it possible to store an object (or some sort of pointer to it) in a place where it can be accessed from every class (like the System properties)? Thanks
[17:01:11] <vol> Yes, use a static object.
[17:01:14] <vol> ~static
[17:01:14] <javabot> vol, static is a keyword which indicates that a member is scoped to a class rather than an object instance. Members of interfaces (except methods) are always static. Nested interfaces and enums are always static. See http://tinyurl.com/3q7oc and http://tinyurl.com/34vr3u for more information.
[17:01:15] *** squi has quit IRC
[17:01:26] <vol> this may or may not be a good idea depending on your implementation.
[17:01:29] <letfunbegin> it's wonderful!
[17:01:34] <letfunbegin> oh, wrong argument
[17:01:49] <vol> chanux: did the error message give you a line?
[17:02:07] <chanux> yeah
[17:02:09] <vol> also, spotted this
[17:02:15] <vol> static int usigDoWhile(int value){
[17:02:16] <chanux> 56
[17:02:20] <vol> factorial = usingDoWhile(num); break;
[17:02:23] <vol> yep.
[17:02:33] <vol> try using an ide, it will usually alert you to these things pretty quickly
[17:02:35] <fr0ggler> ah the old typo
[17:03:00] <fr0ggler> rears it's misshapen head yet again to flummox the most astute of pasty developers
[17:03:06] <cheeser> a compiler is even better at checking typos
[17:03:07] <cheeser> 8^)=
[17:03:27] *** cyth has joined ##java
[17:04:33] *** NevroPus has joined ##java
[17:05:14] <sidelil> vol, no I mean, I am creating an object in a class, and doing some stuff with it. Then somewhere else in the program I need to access that object and get some informations from it. But at that point i dont know where the object I created is, I cant reference it. Does this make any sense? (it may not :p)
[17:05:23] <chanux> vol, I'm coding in VIM. On the other hand my lecturer do not recommend IDEs since I'm still new to these stuff
[17:06:30] <fr0ggler> sidelil: well you should know where you created the object :D i.e. in which class...
[17:06:50] <vol> chanux: I use eclipse. You might prefer netbeans.
[17:06:53] <sidelil> fr0ggler, i do, and then how do I access it from somewhere else?
[17:07:01] <m4rtijn> chanux: did your lecturer recommend #java ?
[17:07:03] <vol> vim is perfectly fine, it just doesn't compile as you type and alert you to mistakes :P
[17:07:23] <chanux> m4rtijn, I'm only new to java :D
[17:07:57] <vol> sidelil: class Foo { public static Object myobj = new Object(); } class Bar { void foo() { Object o = Foo.myobj; /* do stuff */ } }
[17:08:10] <chanux> vol, netbeans for GNU/Linux?
[17:08:29] <chanux> Eclipse is available for linux though.
[17:08:37] <fr0ggler> chanux: i use IntelliJ Idea, and that's available for Linux
[17:08:47] <deufrai> sidelil: maybe consider using the Singleton design pattern
[17:09:17] *** yellowCub has joined ##java
[17:09:37] <deufrai> or simply provide accessors to it, depends on your design
[17:09:44] *** Aquanox has joined ##java
[17:10:11] *** kungen has quit IRC
[17:10:17] <vol> chanux: I think so
[17:10:19] <sidelil> vol, deufrai ok thank you both. I'll have a look and give it a try
[17:11:53] <chanux> vol, fr0ggler thanx alot for helping. I'm getting ready for the exam day after tomrrow :)
[17:11:54] *** Junior has quit IRC
[17:12:00] *** juacom99 has joined ##java
[17:12:17] <juacom99> Hi
[17:12:33] <juacom99> AMcBain: rememaber the porblem i got yesterday?
[17:12:45] <AMcBain> er sorta.
[17:12:55] <AMcBain> (you caught me while I was actually here, wow)
[17:12:55] <juacom99> AMcBain: i think i found the porblem...
[17:13:04] <juacom99> lol
[17:13:37] <AMcBain> well, are you going to finish your thought?
[17:13:44] <juacom99> http://paste.ubuntu.com/121924/
[17:13:53] <juacom99> tht's the porblem
[17:13:56] <fr0ggler> chanux: good luck then ;)
[17:14:05] <juacom99> is parsing my < quotes and >
[17:14:14] *** prgrmr has quit IRC
[17:14:45] <AMcBain> huh? what? *what* "is parsing [your] < quotes and >"?
[17:15:13] *** zophy has quit IRC
[17:15:42] *** shadewind has quit IRC
[17:15:56] <juacom99> when i insert ( i can'r use setText cos' it append the text afther the </body> tag) the document change my " for $quote; for example
[17:16:04] <juacom99> that's why is not parsing it
[17:16:07] *** cyzie has quit IRC
[17:16:24] *** repnop has joined ##java
[17:16:33] <juacom99> *can't
[17:16:59] <AMcBain> well, you *could* just do setText(getText().replace(endingStuff) + newStuff);
[17:17:03] *** nocture has joined ##java
[17:17:16] *** zophy has joined ##java
[17:17:33] *** tag has quit IRC
[17:17:40] *** cyzie has joined ##java
[17:17:43] <AMcBain> replace(endingStuff) could take the form of replaceAll("</body>\\s*</html>$","")
[17:17:59] *** steve-e has quit IRC
[17:19:09] <juacom99> how much oveheas will add that ?? :S
[17:19:14] <AMcBain> (it seems stupid from an efficiency point of view to get the text, remove something you didnt' want it to add in the first place (the remaning closing tags) add your stuff to it, then send it all back in ... but what can you do? they want you to have proper html)
[17:19:23] <AMcBain> remaining*
[17:19:29] *** genesiss has quit IRC
[17:19:58] *** casmo has joined ##java
[17:20:29] <AMcBain> personally though, I'd just do it and not worry about any "overhead" or slowdowns until you actually see some and can trace it back to that.
[17:21:04] <AMcBain> so basically, go for it, then fix efficiency concerns *later* /after/ they appear (because they might not, and in which case, you don't need to do anything)
[17:21:35] *** riotz has quit IRC
[17:22:04] <juacom99> ok
[17:22:09] <juacom99> i'll try that
[17:23:07] <AMcBain> I mean, you saw the output for my client ... I do a regex and loads of parsing on each incomming line. if I'd thought "this could be inefficient" and tried to fix it before I even figured out if it really cost anything, I'd have ended up with something that was probably twice as complicated and doesn't work/.
[17:23:20] *** chanux has quit IRC
[17:23:41] <AMcBain> (in the end, each line is a max of 255(?) characters or less, so I really don't have to worry so much per line)
[17:25:30] *** factor has quit IRC
[17:27:11] *** Ivellina has joined ##java
[17:31:13] *** hrehf has joined ##java
[17:31:15] *** conan has quit IRC
[17:32:06] *** conan has joined ##java
[17:32:59] *** dpy has quit IRC
[17:33:40] *** epalm has joined ##java
[17:34:16] *** riotz has joined ##java
[17:34:54] *** BlindHunter has joined ##java
[17:35:15] *** Yustme has joined ##java
[17:38:27] *** conan has quit IRC
[17:38:29] *** henry_r has quit IRC
[17:38:33] *** deSilva has quit IRC
[17:42:32] *** jerkface03 has quit IRC
[17:42:42] *** cyth has quit IRC
[17:42:42] *** casmo has quit IRC
[17:43:09] *** jerkface03 has joined ##java
[17:43:44] *** cyth has joined ##java
[17:45:13] *** sphenxes has quit IRC
[17:45:52] <isr`> the singleton pattern should be avoided
[17:45:58] <jottinger> depends
[17:45:59] *** OxDEADED has quit IRC
[17:46:00] <isr`> woops, that was up there a bit
[17:46:10] <fr0ggler> delayed reactions
[17:46:19] <isr`> lol
[17:46:32] <isr`> fr0ggler: got my model to text and text to model working
[17:46:33] *** OxDEADED has joined ##java
[17:47:02] *** tom17bombadil_ has quit IRC
[17:47:15] <fr0ggler> isr`, cool ;)
[17:47:46] <isr`> yu[
[17:47:48] <isr`> yup*
[17:48:04] *** prgrmr has joined ##java
[17:48:28] *** Frostix has quit IRC
[17:49:02] *** prgrmr has quit IRC
[17:49:08] *** boobsbr has joined ##java
[17:49:24] *** Niike has joined ##java
[17:49:33] *** teralaser has quit IRC
[17:49:34] *** PuffTheMagic has quit IRC
[17:50:28] <boobsbr> hi, what is the difference between Glassfish and Glassfish Enterprise?
[17:51:48] <boobsbr> and which one should I install on a debian etch server to run a webapp with about 100 customers?
[17:52:16] *** PuffTheMagic has joined ##java
[17:52:26] *** LordMetroid has quit IRC
[17:52:57] *** bindaas has quit IRC
[17:53:47] *** bindaas has joined ##java
[17:54:40] <Niike> hmm, what is a subclass in compare with a normal class?
[17:55:23] *** Bevin has quit IRC
[17:55:32] <vol> ~subclass
[17:55:32] <javabot> vol, subclass is http://java.sun.com/docs/books/tutorial/java/IandI/subclasses.html
[17:55:40] <letfunbegin> it's just a class that inherits from another class (which is essentially every class but Object)
[17:56:20] <Niike> aa, now i remember something like that! thanks
[17:56:41] *** jeremy_c has joined ##java
[17:57:35] *** eidolon has left ##java
[17:58:11] <jeremy_c> I am using JavaMail API and connecting to a SSL SMTP server. Is there a way I can tell Java not to validate the SSL cert?
[17:58:34] *** hrehf_ has quit IRC
[17:58:34] *** Carnage\ has joined ##java
[17:59:17] *** mztriz has joined ##java
[17:59:44] *** audriusz has joined ##java
[18:00:03] *** derrick-- has joined ##java
[18:00:16] *** zophy has quit IRC
[18:00:30] <mztriz> what would you guys say is the best/most informative tutorial on understanding how to use number formatting. Specifically getCurrency()
[18:00:42] *** zophy has joined ##java
[18:00:56] *** ramdam has joined ##java
[18:03:04] *** runev has quit IRC
[18:03:42] *** ankylose has quit IRC
[18:03:45] *** spal has joined ##java
[18:04:08] *** mgenov has quit IRC
[18:04:42] *** fridim_ has joined ##java
[18:04:54] *** boobsbr has quit IRC
[18:05:32] <derrick--> what do you prefer for acceptance testing: Concordion OR Fitnesse ?
[18:05:50] <derrick--> or some other choice
[18:06:08] *** Junior has joined ##java
[18:08:07] *** convivial has quit IRC
[18:08:09] *** ml` has joined ##java
[18:08:26] *** mztriz has quit IRC
[18:08:37] *** convivial has joined ##java
[18:09:30] *** amz has joined ##java
[18:09:55] *** ldam has quit IRC
[18:10:07] <Sou|cutter> derrick--: I hate fitnesse
[18:10:21] <derrick--> Sou|cutter oh :)
[18:10:34] <derrick--> Sou|cutter did you tried many times?
[18:10:56] <derrick--> or you saw others trying?
[18:11:03] <cheeser> derrick--: no. that's why he's a fatty.
[18:11:06] <cheeser> fatty mcfatterson.
[18:11:36] <fr0ggler> *guffaw*
[18:11:43] *** bas-i has joined ##java
[18:11:47] *** dmiles_afk has joined ##java
[18:12:13] <derrick--> Sou|cutter do you recommend concoridon?
[18:12:15] <Sou|cutter> derrick--: I used it at one job. The wiki format is kinda ugly to work with. It's pretty limited, we had to write a lot of stuff just to get it to work at all for us
[18:12:24] <Sou|cutter> no, I don't know anything about it
[18:12:53] <derrick--> Sou|cutter did you work with other accept-tools?
[18:13:17] <Sou|cutter> Not really, I'm not a QA expert
[18:13:27] <Sou|cutter> I do more unit testing than anything
[18:13:33] <derrick--> ok, thanks
[18:13:41] *** The_Birdman has joined ##java
[18:14:21] *** elmomalmo has quit IRC
[18:14:55] <Seldon75> jeremy_c: are you sure you mean NOT to accept it? dont you mean you want it to accept automatically?
[18:15:37] <Seldon75> im guessing you mean blindly accept all certs
[18:15:41] <jeremy_c> Seldon75: I use a self-signed cert. I want to accept it even though it is not technically valid.
[18:15:43] <Seldon75> which you can do
[18:15:47] <Seldon75> right
[18:15:50] <Seldon75> in that case:
[18:16:27] <Seldon75> http://www.howardism.org/Technical/Java/SelfSignedCerts.html
[18:16:32] *** nocture has quit IRC
[18:16:59] <jeremy_c> Seldon75: thank you, that's just what I needed.
[18:17:04] <Seldon75> you're welcome
[18:17:18] *** fr0ggler has quit IRC
[18:19:08] <yellowCub> I am trying to learn Java coming off of a Flex/AS3 background. I am coding in Eclipse. I am working with a test application (TestApp.java) , but I would like to run another application in the same package called TestApp2.java. I can only 'run' TestApp.java and changing some configuration options does not seem to change the class that is running. How can I change my main class so that I can run TestApp2.java?
[18:19:33] <Seldon75> ~~newbies ide
[18:19:33] <javabot> The user newbies is not on ##java
[18:19:43] <Seldon75> whats the factoid for that
[18:19:43] <cheeser> ~newbies ide
[18:19:43] <javabot> cheeser, I have no idea what newbies ide is.
[18:19:48] <cheeser> ~newbie ide
[18:19:48] <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.
[18:19:51] <Seldon75> thx
[18:19:54] <dmlloyd> ~newbies ide is <see>newbies ide
[18:19:54] <javabot> Okay, dmlloyd.
[18:19:55] <dmlloyd> :)
[18:19:57] <derrick--> Is there a good site for Java QA ppl ? can seomone recommend me such a site?
[18:19:58] <dmlloyd> er
[18:20:03] <dmlloyd> ~newbies ide is <see>newbie ide
[18:20:04] <javabot> I already have a factoid named newbies ide, dmlloyd
[18:20:05] <dmlloyd> arg
[18:20:09] *** teralaser has joined ##java
[18:20:09] <cheeser> ~forget newbies ide
[18:20:09] <javabot> I forgot about newbies ide, cheeser.
[18:20:10] <dmlloyd> ~forget newbies ide
[18:20:10] <javabot> I never knew about newbies ide anyway, dmlloyd.
[18:20:12] <cheeser> 8^)=
[18:20:12] <dmlloyd> ~newbies ide is <see>newbie ide
[18:20:12] <javabot> Okay, dmlloyd.
[18:20:16] <Seldon75> sheesh
[18:20:19] <dmlloyd> hi!
[18:20:22] <cheeser> i have that "no" bug fixed, locally, btw.
[18:20:28] *** shadewind has joined ##java
[18:20:29] <cheeser> mostly anyway.
[18:20:40] <cheeser> just trying to tighten up a bit and get decent testing done
[18:21:03] *** UT2K3 has quit IRC
[18:21:11] *** HockeyInJune has quit IRC
[18:21:37] *** HockeyInJune has joined ##java
[18:22:15] *** _Maru_ has quit IRC
[18:22:34] *** nocture has joined ##java
[18:22:46] *** dmiles has quit IRC
[18:25:04] <csgeek> I have a... design issue... if I have a form that waits for an event to occur in another form.. or another thread.. what's the proper way to send it that info....
[18:25:13] *** shervin_a has quit IRC
[18:25:26] <letfunbegin> csgeek: event listeners I believe
[18:25:27] *** mattis_ has joined ##java
[18:26:40] <mattis_> What technology stack is my best bet if I want to do develop an enterprise application in TDD? I am looking at JBoss seam which offers a microcontainer that I can run in tests.. but I'm kind of outdated on the tech
[18:27:13] *** b3nn3tt has joined ##java
[18:27:30] <Seldon75> mattis_: JBoss is fine
[18:27:36] <cheeser> glassfish is better!
[18:27:36] <cheeser> 8^)=
[18:27:39] * cheeser eyes em
[18:27:41] * cheeser eyes dmlloyd
[18:28:17] <csgeek> okay.. that sounds right..... can Evens be used across threads? anyone know?
[18:28:26] <cheeser> uh....
[18:28:48] *** dogmeat has joined ##java
[18:28:51] <dmlloyd> ~~csgeek jcip
[18:28:51] <cheeser> you know swing is multithreaded, right?
[18:28:51] <javabot> csgeek, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[18:28:55] <dmlloyd> maybe start there
[18:29:00] *** amz has quit IRC
[18:29:08] <mattis_> So is JBoss Seam the closest I will get to a Ruby on Rails way of developing in Java today?
[18:29:09] *** amnesiac has joined ##java
[18:29:14] <csgeek> thanks all..
[18:29:19] *** amz has joined ##java
[18:29:29] <dmlloyd> mattis_: you can use ruby in jbossas
[18:29:36] *** fanti has quit IRC
[18:29:43] <dmlloyd> mattis_: http://oddthesis.org/
[18:29:44] <cheeser> and glassfish and ...
[18:29:56] * amnesiac shakes dmlloyd and cheeser
[18:30:11] <cheeser> there's grails, too, if you want something more java-ish than ruby.
[18:30:14] <cheeser> and who doesn't?
[18:30:15] <cheeser> 8^)=
[18:30:20] <mattis_> dmlloyd: oh thanks, I'll look at that. I'm just struggling with the initial setup of my AS and seam and everything.. it's kind of a pain to get everything cooperating
[18:30:24] <cheeser> charles nutter, i'd suspect...
[18:31:36] <svm_invictvs> *yawn*
[18:31:38] <svm_invictvs> What's up.
[18:31:44] <svm_invictvs> Charles Nutter?
[18:31:48] *** ridoo has joined ##java
[18:31:52] <svm_invictvs> Why does that name soudn afmiliar.
[18:32:00] *** BeholdMyGlory has joined ##java
[18:32:26] <cheeser> he's the jruby guy
[18:32:31] <csgeek> didn't realize it was multithreaded... but that's great.. that's one thing that seems to be lacking in just about every other GUI toolkit I've touched
[18:32:42] <cheeser> which thankfully is not called juby
[18:32:45] * cheeser eyes jython
[18:33:16] *** jivedude has quit IRC
[18:33:53] *** amz has quit IRC
[18:33:57] <juacom99> ~JtextPane
[18:33:57] <javabot> juacom99, how to use text panes is http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
[18:34:08] *** amz has joined ##java
[18:34:08] *** Seldon75 has quit IRC
[18:34:19] <sproingie> i wonder how many times he was called "chuckernutter" at school
[18:34:30] <cheeser> probably never.
[18:34:30] <marvi> mattis_: Take a look at Appfuse too. It's a kickstart project where you can chose web framework. Look at the screencast. http://appfuse.org
[18:34:30] <cheeser> 8^)=
[18:34:38] <BeholdMyGlory> if you're making an IRC client, how do you make sure all characters are shown as they should (including forein characters)? since a lot of people use different character encodings.
[18:34:41] <sproingie> my name's chuck and i got called something like that and my last name isn't even nutter
[18:34:42] *** LordMetroid has joined ##Java
[18:34:50] *** tag has joined ##java
[18:34:57] <cheeser> BeholdMyGlory: by specfying an encoding to use, of course.
[18:35:10] *** Sagi22 has joined ##java
[18:35:11] <BeholdMyGlory> cheeser: and how do you do that?
[18:35:38] <cheeser> ~encoding
[18:35:38] <javabot> cheeser, encodings is http://java.sun.com/docs/books/tutorial/i18n/text/convertintro.html
[18:35:44] <mattis_> marvi: thanks!
[18:36:39] *** tchalvakspam has joined ##java
[18:37:14] *** justafish has quit IRC
[18:37:25] *** tchalvakspam has quit IRC
[18:37:36] *** pandora-- has joined ##java
[18:37:41] *** Aquanox has quit IRC
[18:41:20] *** genesiss has joined ##java
[18:41:58] <BeholdMyGlory> cheeser: that just seems to be for one enconding type per InputStream, but in this case both ASCII and UTF-8 characters may pass through the same InputStream
[18:42:02] *** KikiJiki has quit IRC
[18:42:17] <blahjake> are objects created by the Ant DynamicElement.createDynamicElement(String):Object method preserved somewhere I can access them or do I need to implement the reference holding myself?
[18:42:18] *** waz has joined ##java
[18:42:23] *** [S^K] has quit IRC
[18:42:46] *** sidelil has quit IRC
[18:42:57] *** yellowCub has quit IRC
[18:43:27] *** ankylose has joined ##java
[18:43:27] *** jnvilo has quit IRC
[18:43:32] *** djp[mbp] has joined ##java
[18:43:35] *** mengu has joined ##java
[18:43:38] *** hrehf_ has joined ##java
[18:43:41] *** Sonderblade has joined ##java
[18:44:31] <svm_invictvs> kind of like junit
[18:44:39] <svm_invictvs> I pronounce it like it's spelled
[18:44:55] <mattis_> Is there a site I can read a recent comparison of web frameworks in Java? It is very important that it is as easy as possible to TDD in it
[18:44:59] <Sonderblade> what class can you use if you want a pair?
[18:45:14] <waz> mattis_: then use wicket :)
[18:45:24] <svm_invictvs> Sonderblade: like C++ std::pair?
[18:45:34] <Sonderblade> svm_invictvs: yes
[18:45:38] <svm_invictvs> hm...
[18:45:52] <Sou|cutter> wicket is pretty well-designed for testing
[18:46:04] <svm_invictvs> Sonderblade: the *closest* thing is Map.Entry but it's probably not at all what you want.
[18:46:14] <svm_invictvs> Sonderblade: just write one really quick.
[18:46:35] <mattis_> waz: thanks I will read up on Wicket :-)
[18:46:52] <Sonderblade> svm_invictvs: Map.Entry looks like what i want
[18:47:09] <svm_invictvs> Sonderblade: really only use it if you're writing a Map, tho.
[18:47:17] <Sou|cutter> Just make your own Tuple class
[18:47:22] <Sou|cutter> all the cool kids are doing it
[18:47:34] *** casmo has joined ##java
[18:47:43] <Sonderblade> Sou|cutter: it is not cool
[18:47:55] *** derrick-- has left ##java
[18:48:49] <Sou|cutter> Sonderblade: *shrug* It works. Beats whining about the lack of something like that. Personally I never need them
[18:48:57] <svm_invictvs> Sou|cutter: Yeah, your own tuple or pair class.
[18:49:09] *** DjZemich has joined ##java
[18:49:16] <BeholdMyGlory> what's the best way to copy an object? that is, not just have two references to the same object.
[18:49:35] <svm_invictvs> class Pair<T1, T2> { public T1 o1; public T2 o2; }
[18:49:36] <svm_invictvs> done
[18:49:45] <ernimril> BeholdMyGlory: there is no best way...
[18:49:59] <ernimril> BeholdMyGlory: a copy constructor is usually ok, if you really have to
[18:50:02] <Sonderblade> svm_invictvs: constructor is missing
[18:50:07] <ernimril> BeholdMyGlory: there is clone(), but it is problematic
[18:50:14] <svm_invictvs> Sonderblade: no...it's not.
[18:50:49] <Sonderblade> svm_invictvs: yes it is
[18:50:56] <svm_invictvs> no....it's not missingl.
[18:51:26] <svm_invictvs> It's just a very simple class
[18:51:50] <Sonderblade> and constructor is missing
[18:52:01] <svm_invictvs> No it's not "Missing"
[18:52:13] <svm_invictvs> Not all classes need constructors.
[18:52:48] <Sonderblade> it is, now be quiet
[18:52:56] <svm_invictvs> No...it's not.
[18:53:05] <svm_invictvs> Paste that into your ide.
[18:53:07] <svm_invictvs> It will compile.
[18:53:48] <marvi> mattis_: Matt Raible's has compared a lot of frameworks: http://raibledesigns.com/rd/tags/webframeworks
[18:54:58] *** factor has joined ##java
[18:55:06] *** Zhig has joined ##java
[18:55:38] <_W_> Sonderblade, in general, I would advice against using a generic class like Pair, rather create a specific class with more meaningful semantics
[18:55:41] <blahjake> Sonderblade: an empty, no-arg constructor is put in automatically if no other constructor is specified in a class declaration
[18:55:50] <mattis_> marvi: thanks again marvi, appreciate the help
[18:56:05] <svm_invictvs> blahjake: Can I get an "amen"!
[18:57:02] <Sou|cutter> _W_: yup
[18:57:05] <jottinger> marvi: of course, raible's a bit of an idiot
[18:57:05] <dmlloyd> zoltan!
[18:57:32] <svm_invictvs> jottinger: So did I tell you layoffs are all the rage right now. All the cool kids are doing it.
[18:57:57] *** fugolini has joined ##java
[18:58:04] <jottinger> svm_invictvs: So I've heard. Any change for you?
[18:58:20] <svm_invictvs> Friday.
[18:58:44] <Sonderblade> _W_: that advice is not good, generic classes like Pair are very useful which is why they exist in virtually all languages, it is just java that is lacking in this.
[18:58:49] <jottinger> Coming this friday? or last friday?
[18:59:00] <svm_invictvs> last friday
[18:59:08] <svm_invictvs> The only thing I was really pissed about is that I had to go in.
[18:59:15] *** lem has joined ##java
[18:59:27] <lem> aloha
[18:59:41] <fugolini> Hi, a big question, why I'm able to edit file (e.g. xml) while I'm working on NB and then when I jarred it, I get a lot of exception like I didn't find the file (i'm using getresource() to retrieve resources)
[18:59:43] <fugolini> ?
[18:59:57] <Sou|cutter> Sonderblade: Actually I think that advice is good
[19:00:16] <svm_invictvs> I was sitting there with the HR lady, and I just wanted to break out in the "Carl" voice and say, "So...uh...Are we done here? Is that all you had to say?"
[19:00:33] <_W_> Sonderblade, they're useful if you've got something which does something with generic pairs... which you almost never do
[19:00:41] <Sou|cutter> Sonderblade: And, as demonstrated, writing your own is pretty trivial
[19:01:13] <_W_> instead you have something that does something with key-value pairs, or that does something with coordinates, or that does something with a base number and a power, etc
[19:01:33] <fugolini> Is there any possibility to let jar working like a normal file directory or, have I to move to another Planet (maybe Mars)?
[19:02:17] *** KermitTheFragger has quit IRC
[19:02:24] *** bas-i has quit IRC
[19:02:35] <fugolini> I don't know if this the right solution, I'm just wondering about the possibilities. I've tried googling (I've spent the past 2days) but from the hundreds of page read I found really few interesting things :/
[19:02:54] <fugolini> That's it, if you want to give me a hand, I'm here. Thanks
[19:03:18] *** genesiss has quit IRC
[19:03:25] *** mengu has quit IRC
[19:04:19] *** selocol has joined ##java
[19:04:27] <jottinger> Sonderblade: you realise that Pair is so easy to write that there's no point in putting it in the general API
[19:04:34] <Sonderblade> _W_: it's hard to explain, but if you have had experience with languages more expressive than java you'd see how powerful generic 2-tuples are
[19:04:44] <jottinger> svm_invictvs: I'm sorry to hear it :(
[19:05:01] *** SJr|Work has quit IRC
[19:05:26] <marvi> fugolini: you write like you're already on Mars.
[19:05:28] *** genesiss has joined ##java
[19:05:37] <svm_invictvs> I knew it was coming.
[19:05:39] *** JordanG has quit IRC
[19:05:52] <isr`> Sonderblade: like python?
[19:05:57] <svm_invictvs> I was constantly playing catch up with my coworker and my project kept getting sidelined by everything else more infinitely important
[19:05:59] <Sonderblade> @jottinger: you could say the same thing about _any_ class or method
[19:06:13] *** ankylose has quit IRC
[19:06:14] <lem> how can I influence a widget, defined in another class than the class where the event handling takes place?
[19:06:24] *** monkeycid has joined ##java
[19:06:34] <jottinger> Sonderblade: i dunno, lots of classes are nontrivial
[19:06:39] <isr`> lem there are a bunch of ways.
[19:06:45] <fugolini> marvi: I'm going to be crazy if I can't solve the problem. BTW, my english is really terrible, I'm sorry for this :)
[19:07:01] <lem> isr`, I'd appreciate a pointer where to read about it
[19:07:01] <isr`> lem, an accessor function in the enclosing class of the widget perhaps
[19:07:40] *** snikker has joined ##java
[19:08:00] <isr`> lem i had some similar issues, its hard to find a good tutorial on how to organize large graphical user interfaces
[19:08:24] <isr`> lem, but if you follow the MVC pattern, it should become pretty clear how to do things
[19:08:28] *** monkeycid has quit IRC
[19:08:34] <isr`> i think java calls MVC something else
[19:08:57] <lem> isr`, ok, an accessor in the enclosed class sounds feasible to me
[19:09:00] <lem> isr`, thx
[19:09:15] *** boringwall has joined ##java
[19:09:19] <isr`> np
[19:09:44] *** genesiss has quit IRC
[19:10:11] *** hrehf has quit IRC
[19:10:12] *** genesiss has joined ##java
[19:10:13] <snikker> can i don't show the 'Error: java.lang.Exception: ' when i use: ' throw new Exception("My custom message"); ' ?
[19:10:22] <jottinger> can... what?
[19:10:31] <blahjake> Sonderblade: what exactly are you trying to do?
[19:10:44] <isr`> lol
[19:10:48] <isr`> snikker: e.what()?
[19:10:59] *** DragonLord- has quit IRC
[19:11:08] <fugolini> Maybe I don't express correctly my problem. I try to explain: I have a NetBeans project XXX that contains some XML/XSL files. When I run it in the IDE all works fine, but when I try to use the build it starting say that some resources are missing.
[19:11:11] <Sonderblade> blahjake: storing key-value pairs in a list
[19:11:18] *** elaltaico has joined ##java
[19:11:20] <elaltaico> hello
[19:11:39] <snikker> jottinger, isr`: i don't want show 'Error: java.lang.Exception: ' when i use: ' throw new Exception("My custom message")' Is possible?
[19:11:43] <fugolini> *when I try to use the XXX.jat (compile file)
[19:11:43] <isr`> woops. snikker e.getMessage();
[19:11:54] <isr`> well
[19:11:57] <blahjake> Sonderblade: any reason you do not want them to be key-value pairs in a map?
[19:11:57] <elaltaico> i do try to make runnable jars by netbeans and i can do it...but the problem is runnable jars works inside /dist folder..if i copy paste it to desktop they do not work
[19:12:00] <isr`> yeah you should probably subclass Exception
[19:12:14] <Sonderblade> blahjake: the keys arent unique
[19:12:17] <elaltaico> anyone knows a way to make runnable jars which works at everywhere not only inside /dist folder ?
[19:12:23] *** hoban has joined ##java
[19:12:44] <svm_invictvs> elaltaico: You need to learn how to use a build system that can package your jar and set up its manifest properly.
[19:12:50] *** giaco has quit IRC
[19:13:01] <Ven]n> any ideas how to fetch out media information of loaded videos in JMF? information like this: http://bildr.no/view/352401
[19:13:09] <blahjake> Sonderblade: the values could be lists then
[19:13:23] <snikker> isr`: thank you
[19:13:43] <Sonderblade> blahjake: what?
[19:14:12] <blahjake> Sonderblade: Map<String, List<MyValType>>
[19:14:52] <lem> isr`, is it possible to access a class that was instantiated by the class the class with the event handling instantiated?
[19:14:54] *** DragonLord- has joined ##java
[19:15:10] <hoban> hey all. I'd like some suggestions for applications (any that provide a .war file would be best) that I could use with tomcat. I just want one that provides some useful role (site search, webmail, groupware, mapping a-la google maps, etc.) but easy to configure. The basic is that I'm writing up some informative documentation about how to deploy tomcat and don't want to just simply run a "hello world" app once my students have tomcat up and runn
[19:15:10] <hoban> ing.
[19:15:15] <Sonderblade> blahjake: keys not unique
[19:15:18] <isr`> lem, what?
[19:15:23] *** giaco has joined ##java
[19:15:24] <hoban> is this the right place to ask that question?
[19:15:43] <elaltaico> svm_invictvs how i can set up manifest file ?
[19:15:52] <elaltaico> i need to make some configurations in the manifest file to do that ?
[19:15:56] <lem> isr`, class1 (event handling) ---instantiates--> class2 --instantiates--> class2
[19:16:06] <lem> isr`, I want to access a widget that is defined in class 2
[19:16:33] <spal> hoban, I can suggest you to try deploying Apache Roller blogging software
[19:16:46] <mattis_> marvi: what about using GWT?
[19:16:47] <isr`> have you thought about having class2 implement the ActionListener interface
[19:16:48] <lem> isr`, oops ... wrong
[19:16:52] <lem> isr`, class1 (event handling) ---instantiates--> class2 --instantiates--> class3
[19:16:56] *** toytoy has quit IRC
[19:17:04] <lem> isr`, I want to access a widget that is defined in class 3 (!)
[19:17:14] *** pusling has left ##java
[19:17:24] <mattis_> marvi: I'm just trying to figure out what people are doing to tie GWT with the ORM layer
[19:17:27] <isr`> you mean you want to add class1 as a listener for the widget in class3?
[19:17:38] <marvi> mattis_: never played with it. I think you really have to love Javascript...
[19:17:41] *** timte has joined ##java
[19:17:46] *** monkeycid has joined ##java
[19:18:13] <blahjake> Sonderblade: if you don't need the pair ordering, instead of "key1" => val1, "key2" => val2, "key1" => val3, same info could be held as "key1" => (val1, val3), "key2" => val2
[19:18:17] *** BeholdMyGlory has quit IRC
[19:18:42] <lem> isr`, class1 has a toolbar, and class2 has a treeview, but instantiates a class3 for definining the widget to display some other stuff in a JPanel. So when I choose an item in the treeview AND choose new... from the toolbar, I want a change to take place in the JPanel (class3)
[19:19:39] <Sonderblade> blahjake: could yes, but your solution is more complicated
[19:19:41] <isr`> yeah
[19:19:54] <isr`> lem im not sure why you are separating it like that.
[19:20:13] <isr`> rather, why class2 is instantiating class3
[19:20:20] *** hrehf_ has quit IRC
[19:20:40] <lem> hmm
[19:21:17] <lem> isr`, I thought a class should do something good and just that, so I splitted it
[19:22:10] <svm_invictvs> grumble
[19:22:40] <svm_invictvs> I wonder if there is a specific option I can pass to proguard to remove all calls to a particular method.
[19:23:50] *** waz has quit IRC
[19:23:54] <fugolini> No problem. I'll try to solve it on my own. BTW, thank you for your patience :)
[19:24:10] <svm_invictvs> fugolini: Hm?
[19:24:42] *** ramdam has quit IRC
[19:24:42] *** OxDEADED is now known as SlumdogMillionar
[19:24:56] <fugolini> svm_invictvs: about my question some lines above, but, absolutely no problem. Maybe this is a dummy question, and learning more I'll find the solution.
[19:24:56] *** Infinito has quit IRC
[19:24:59] *** BeholdMyGlory has joined ##java
[19:25:10] *** robot_jesus has joined ##java
[19:25:25] <robot_jesus> Hmm I can't think today, how do I get the last day for a given month ?
[19:25:27] <svm_invictvs> elaltaico: It's in the really big index. A tutorial on making manifest files.
[19:25:38] <svm_invictvs> fugolini: You need to package the resources directly in the jar.
[19:26:03] <svm_invictvs> fugolini: and you can read them with getClass().getResourceAsStream()
[19:26:14] *** snikker has quit IRC
[19:26:24] <fugolini> svm_invictvs: thank you
[19:26:53] <fugolini> you helped me a lot, and, once again, sorry for my dummy questions
[19:26:57] *** Infinito has joined ##java
[19:27:02] *** dandre has left ##java
[19:27:40] <svm_invictvs> np
[19:28:21] <robot_jesus> oops nm
[19:28:21] *** robot_jesus has left ##java
[19:28:56] *** valcker has quit IRC
[19:28:56] *** pgib has joined ##java
[19:28:58] <fugolini> Bye
[19:29:15] *** fugolini has left ##java
[19:29:55] *** tauren has joined ##java
[19:29:55] *** romanb has quit IRC
[19:30:01] *** SlumdogMillionar is now known as TopShop
[19:30:24] *** DjZemich has quit IRC
[19:30:46] *** TopShop is now known as neckermann
[19:33:04] *** neckermann is now known as facebook
[19:34:35] *** jottinger has quit IRC
[19:35:23] *** joeo has joined ##java
[19:35:31] <pgib> Hello. I have a set of classes where each handles a specific request from a servlet (or possibly any source in the future). We also have an Enumeration that lists all the different Actions.
[19:35:36] *** joeo is now known as jottinger
[19:35:48] *** blipX has joined ##java
[19:35:51] <jottinger> pgib: so you're using Struts?
[19:36:02] <pgib> I'm wanting to map the action to a handler class to delegate the work. I could use a Map at the Servlet level
[19:36:20] <jottinger> but struts already does that...
[19:36:27] <pgib> jottinger, no, this is my own thing. The servlet has grown too large, so I refactored the different actions to different objects
[19:36:32] <jottinger> or you're using spring mvc? No, because HAT already does that too
[19:36:41] <pgib> ok, but we aren't using spring or struts
[19:36:42] <blipX> Trying to figure out why a java app a user is using doesnt appear to be decoding things like return, backspace and delete. Is this a setting that can be passed to apps, has to be done in the app or a jre or similar setting?
[19:36:42] <jottinger> or you're using wicket? No, wicket does that too
[19:36:47] <pgib> ??
[19:36:55] <jottinger> or stripes? or echo? no, those do that sort of thing for you too
[19:36:59] <jottinger> wait, let me get this straight
[19:37:02] <jottinger> you WROTE THIS?
[19:37:03] <jottinger> Yourself?
[19:37:10] <vol> oh god, what a terrible idea
[19:37:12] <vol> writing something
[19:37:14] <pgib> I'm confused
[19:37:17] <jottinger> vol: no
[19:37:21] <jottinger> writing something is no big deal
[19:37:38] <jottinger> writing something that is a poor version of what well-established frameworks do, THAT's a problem
[19:37:48] <vol> you're right, he should refactor his mature codebase to shove in something similar instead.
[19:37:53] <jottinger> anyone who rewrites Struts today ... wrong move
[19:38:08] <jottinger> vol: maybe it's me, but I'm thinking his problem is an indicator of a lack of maturity
[19:38:18] <pgib> I guess my question has no validity due to your opinion on architectures
[19:38:20] <jottinger> of the codebase, that is
[19:38:24] <vol> or an old codebase, from before when struts/etc were popular?
[19:38:27] <pgib> we aren't using struts, sorry
[19:38:31] <pgib> oh well. I was going to ask for an opinion on where to put the actual mapping of action -> handler.
[19:38:34] *** ofl_ has joined ##java
[19:38:35] <jottinger> vol: that'd be back in 1999 or so :)
[19:38:44] <vol> yeah, which is pretty much what the code at my last company was.
[19:38:47] <jottinger> pgib: depends on how the servlet's invoked.
[19:38:47] <pgib> I could create a map or similar factory at the servlet level
[19:39:05] <jottinger> pgib: use a context listener, store the map in the application context
[19:39:16] <pgib> or, I could perhaps have a boolean handles() function or similar in the handler objects themself
[19:39:17] <vol> moderately mature code in a culture quite averse to sudden radical changes due to a skittish customer list
[19:39:21] <jottinger> but seriously, if this isn't, like, really old and expensive code, use something else
[19:39:29] <pgib> but.. I'm thinking the first alternative would be more flexible
[19:39:38] <vol> the world doesn't always involve best practices : (
[19:39:40] <jottinger> vol: NIH is usually an unwise approach
[19:40:03] <vol> well, more like "invented seperately and we don't want to screw with what works"
[19:40:14] <pgib> It's more of evolution
[19:40:17] <jottinger> "and we like retraining our developers every time"
[19:40:25] *** Spike1506 has joined ##java
[19:40:34] <pgib> it started as a simple servlet to handle requests, it grew and grew, so it is what it is
[19:40:34] <vol> it was also a small company, with only a few developers.
[19:40:46] <hoban> spal: thanks!
[19:40:46] *** ffgeek200 has joined ##java
[19:40:47] <vol> last I heard, they still haven't replaced me (not for lack of trying) in the last year or so
[19:40:56] *** njan has joined ##java
[19:41:12] <vol> to be fair, jottinger is probably right
[19:41:22] <vol> if this is going to continue growing, pgib, you should probably take the plunge
[19:41:32] <pgib> Rather not have to inherit a new framework at this point, especially considering everything works. I was just wondering if it makes sense to glue the action-to-handler at the individual handler level or at a more macro level
[19:41:34] <The_Birdman> pgib: If the codebase isn't huge and you can integrate a framework if it doesn't take much time. Here I'm dealing alone with an application which is big and 10 years old. Migration and refactoring isn't much an option
[19:41:36] *** Bevin has joined ##java
[19:42:17] <pgib> We use wicket for our pages, but this is for a highly-specialized webservice that interfaces to a javascript widget we have
[19:42:41] <The_Birdman> ah
[19:43:14] <The_Birdman> If I could use wicket here, I would be happy, I am dealing with that plain old struts
[19:43:45] *** blipX has left ##java
[19:43:47] <The_Birdman> and 200 000 lines of code, it's ugly
[19:43:51] <pgib> yes.. but from what I understand about struts, it isn't really what we need. not for this anyways
[19:44:10] <The_Birdman> it wasn't really related to your problem, just speaking my mind :-)
[19:44:11] <pgib> the problem I'm solving right now doesn't involve pages or view really. It is all RPC
[19:44:22] <pgib> The_Birdman, understood
[19:45:12] <juacom99> argg i hate JEditorPane :@
[19:45:21] <pgib> Anyways, since I can't get a straight answer regarding the actual design of the system I'm going to be working with: I'm going to handle the mapping at a level macro to the Handlers themselves:
[19:45:48] <pgib> I.e: A map of Actions to Handlers instead of looping over the Handlers calling handler.handles(action);
[19:47:11] <vol> probably reasonable
[19:47:29] <svm_invictvs> hm
[19:47:31] <The_Birdman> pgib: Why would you loop over handlers?
[19:48:12] <pgib> I mean, it is Java's Listener layout for the most part
[19:48:16] <The_Birdman> I also deal with RPC and I don't loop over handlers, at some places we have classes with handlers' constants for names and some maps
[19:48:47] <pgib> We have around 30 different actions
[19:48:58] <The_Birdman> I am dealing with about 100
[19:49:09] <pgib> OK cool. So, we have a handler-per-action
[19:49:43] <pgib> The thing is, the requests comes in with a parameter, action=createUser for example. We get the enum for this action
[19:50:07] <pgib> Then need to execute the proper handler. Either, at this level, we have a map or a big if/else to call the proper handler
[19:50:20] <pgib> Or, the list of handled actions can be stored in the Handler itself
[19:50:34] <pgib> How do you delegate to the proper handler?
[19:50:43] <jottinger> use a map
[19:50:45] <The_Birdman> Using a map
[19:50:53] <vol> hardcode the class name with the action.
[19:50:56] *** prgrmr has joined ##java
[19:51:01] <vol> :D
[19:51:18] <pgib> vol, interesting, a forward lookup instead.
[19:51:28] <vol> (I keed)
[19:51:48] *** tauren has left ##java
[19:51:50] *** b3nn3tt has quit IRC
[19:52:07] <pgib> So the consensus is: Do the mapping independantly of the Action or Handler themselves
[19:52:27] <pgib> Do it at the layer that receives the inital response
[19:52:30] <pgib> Thanks
[19:53:12] <snodnipper> Hi guys, can anyone explain why '@Resource UserTransaction utx' is null whilst 'ctx.lookup("java:comp/env/UserTransaction")' in GlassFish?
[19:53:27] <snodnipper> it just fails to inject
[19:53:33] *** ShadowHntr has joined ##java
[19:53:48] *** Infinito has quit IRC
[19:53:51] <snodnipper> ctx works fine
[19:54:36] *** prgrmr has quit IRC
[19:55:30] *** Infinito has joined ##java
[19:55:50] *** Junior has quit IRC
[19:58:23] *** Frederick has joined ##java
[19:59:10] *** jtheuer has joined ##java
[20:02:04] *** selocol has quit IRC
[20:02:11] *** kercyr has quit IRC
[20:03:11] *** Daniel_G has quit IRC
[20:04:03] *** Daniel_G has joined ##java
[20:05:48] *** doc`` has joined ##java
[20:06:47] *** prgrmr has joined ##java
[20:07:24] *** prgrmr has quit IRC
[20:08:00] *** Seldon75 has joined ##java
[20:09:38] *** dmlloyd_ has joined ##java
[20:09:54] *** jbwiv has joined ##java
[20:10:07] *** zophy has quit IRC
[20:10:37] *** Sonderblade has quit IRC
[20:11:58] *** ShadowHntr has quit IRC
[20:12:03] *** TryNiX has joined ##java
[20:13:16] *** dmlloyd has quit IRC
[20:13:19] *** dmlloyd_ is now known as dmlloyd
[20:13:32] *** zelnick has joined ##java
[20:13:45] <aleksei> hello
[20:13:53] <vol> hi
[20:13:53] <Seldon75> OFFTOPIC quick poll: what would be the best (easiest setup) O/S for a source code repository / bug tracking software? Centos 5, Fedora 9, Debian 4 or Ubuntu 8
[20:14:07] <vol> DOS 4
[20:14:09] *** ffgeek200 has quit IRC
[20:14:11] <Seldon75> hehe
[20:14:21] *** ffgeek200 has joined ##java
[20:14:28] <aleksei> is there a way to generate a self-signed certificate in java, from scratch and without using the sun.* proprietary package?
[20:15:26] *** AdrienC has quit IRC
[20:15:42] <ernimril> aleksei: yes...
[20:15:53] *** _Maru_ has joined ##java
[20:16:10] *** zophy has joined ##java
[20:16:16] <ernimril> aleksei: you can find examples on this page http://wiki.jmol.org/index.php/Java_Web_Start
[20:16:49] *** srart has joined ##java
[20:17:16] *** tds5016 has joined ##java
[20:17:20] <TryNiX> hi all. I have a problem, where basically I got a quad tree, and I need to 1) store a value related to leaf nodes (i.e. a value that is calculated through the 4 leafs), and (2) once all of these values are calculated, values are then sorted, and the parent nodes which have 4 leaf child nodes having the least value, is deleated
[20:17:36] <srart> why would this fail? test=Integer.parseInt(serverInput.substring(0,4));
[20:18:01] <vol> serverInput is null
[20:18:06] *** DjZemich has joined ##java
[20:18:09] <vol> or ""
[20:18:10] <dangertools> the substring is not an Integer
[20:18:13] *** timte has quit IRC
[20:18:24] <TryNiX> I am thinking of using two linked lists, one to hold the values and the other to hold the arrangement of objects that the values corrsepond to, but when sorting the values, how can I sort both the values arrangement linkedlist, and the corresponding object arrangement linkedlist?
[20:18:24] <vol> java is not installed
[20:18:26] <tds5016> hello all. I am running tomcat, and it won't allow me to write a file using File's createNewFile() method.
[20:18:27] <letfunbegin> the string is too short
[20:18:31] <marvi> test is not an Integer.
[20:18:33] <tds5016> the director I am trying to write to is 777
[20:18:33] <dangertools> srart: in any case, the exception will tell you
[20:18:36] <tds5016> and it's still not letting me
[20:18:41] <srart> nope, and nope again. Exception in thread "main" java.lang.NumberFormatException: For input string: "200"
[20:18:47] <letfunbegin> tds5016: try #tomcat
[20:19:02] <tds5016> java.io.IOException: Permission denied that's the error.
[20:19:09] *** Seldon75 has quit IRC
[20:19:09] *** BeholdMyGlory has quit IRC
[20:19:11] <tds5016> so it's not an issue with java? that would be a tomcat error?
[20:19:13] <srart> enlightening as the inquisition
[20:19:18] <vol> 200 is too large for java, sorry.
[20:19:21] <ernimril> tds5016: you are running tomcat with a security manager, that is a tomcat setting
[20:19:21] <vol> use numbers 0-99
[20:19:22] <letfunbegin> lol
[20:19:23] *** timte has joined ##java
[20:19:35] <tds5016> I'm thinking I may have issues with my code.
[20:19:46] <tds5016> ernimril: I'm using mac osx 10.5
[20:19:47] *** vix85 has joined ##java
[20:19:48] <dangertools> srart: you get a substring with 5 characters, your exception only prints out 3. whitespace?
[20:19:49] <vol> srart: you did ask us.
[20:19:52] <marvi> tds5016: or it could be SELinux if you are running on Linux.
[20:20:00] <tds5016> that shoulnd't have any security managers installed that I'm aware of...
[20:20:02] <vol> what dangertools said, try .trim()
[20:20:11] <tds5016> does it?
[20:20:32] <ernimril> tds5016: did you consider checking the tomcat startup scripts/config files?
[20:20:38] <aleksei> ernimril: thanks, actually I was thinking of doing it completely programmatically, but since the keytool is distributed with java, I should be able to rely on that to do it
[20:20:52] *** isr` has left ##java
[20:21:09] <srart> 0,4 is 5? 0,3 prints 20, something at the begining maybe? I wrote the server, so there shouldn't be (this is on the client side and I'm not much of a java writter as you can see)
[20:21:20] <aleksei> just wonder if other JVMs include the keytool program
[20:21:54] *** gigo has joined ##java
[20:22:25] <vol> srart: sounds like there's whitespace at chars 0 and 1
[20:22:31] <jottinger> aleksei: jrockit does
[20:22:49] <vol> try .substring(2,4) or .substring(0,4).trim()
[20:23:20] <vol> actually, shoot, is that up to or including 4 in substring? :<
[20:23:21] * vol checks
[20:24:09] <vol> up to, ok.
[20:24:15] <dangertools> right, yet too less
[20:24:23] <vol> try .substring(1, 4) then
[20:24:39] <srart> thanks, that was it, had a \n in the buffer, 1,4 was it. You guys rock.
[20:25:44] <srart> kind of fragil, any better way to get a match for a substring? (find I would imagine)
[20:26:26] <letfunbegin> srart: I don't know what it's for (what you need exactly), but I've always found regular expressions to be the more stable solution
[20:26:35] <letfunbegin> it certainly gives you more control at least
[20:26:42] <tds5016> File fpSDPFile = new File(filePath);
[20:26:42] <tds5016> fpSDPFile.createNewFile();
[20:26:48] <tds5016> is that valid syntax?
[20:26:53] <tds5016> I just want to make sure of that first.
[20:26:59] <letfunbegin> what does your compiler tell you?
[20:27:11] <tds5016> permission denied...
[20:27:24] <letfunbegin> well, not about the syntax I should hope?
[20:27:47] <srart> Just a super simple match on the return code to a socket, without the human freingly numbers.
[20:28:13] <srart> http status code type stuff
[20:28:28] *** vyoman has quit IRC
[20:28:56] <svm_invictvs> Compilerzorz?
[20:29:00] <gigo> how can we get the type of an object?
[20:29:03] <letfunbegin> some might say this is too heavy machinery, but I would use regular expressions for that job.
[20:29:10] <svm_invictvs> gigo: object.getClass()
[20:29:41] <svm_invictvs> gigo: or use something like... (obj instanceof SomeType)
[20:29:46] *** _stijn_ has joined ##java
[20:30:20] *** _stijn_ has quit IRC
[20:30:28] <tds5016> I forgot the trailing / on the file path...
[20:30:34] <tds5016> apparently java doesn't assume there is one.
[20:30:35] <tds5016> haha.
[20:30:40] *** _stijn_ has joined ##java
[20:31:06] *** _stijn_ has quit IRC
[20:31:25] *** _stijn_ has joined ##java
[20:31:49] *** vyoman has joined ##java
[20:31:55] <vol> ..ha.
[20:32:04] <tds5016> I feel dumb...
[20:32:09] * tds5016 hide in corner. Thanks.
[20:32:24] *** BlindHunter has quit IRC
[20:32:27] <vol> srart: you probably ought to use .trim in that case, since that removes whitespace (not sure if \n is included in that)
[20:32:41] <letfunbegin> it is also removed by trim
[20:32:46] <letfunbegin> as well as \r
[20:34:25] *** scott_w has joined ##java
[20:34:28] *** ldam has joined ##java
[20:35:24] *** monstrfolk has quit IRC
[20:37:40] *** monstrfolk has joined ##java
[20:37:45] *** Duesentrieb has quit IRC
[20:38:17] *** Bevin has quit IRC
[20:42:44] *** prgrmr has joined ##java
[20:42:50] *** zophy has quit IRC
[20:43:01] *** ramdam has joined ##java
[20:43:18] *** nocture has quit IRC
[20:43:32] *** giaco has quit IRC
[20:43:58] *** bobbytek has joined ##java
[20:44:24] <bobbytek> Is there a way to do a null-safe get in java / spring / beanutils using reflection?
[20:44:48] <bobbytek> Similiar to groovy's elvis operator and jsp el's property access
[20:45:03] *** giaco has joined ##java
[20:45:25] *** Aquanox has joined ##java
[20:46:26] *** prgrmr has quit IRC
[20:47:02] <bobbytek> er, more like groovy's safe dereference operator (?.)
[20:47:28] <FauxFaux> Yeah, the trick is not to use nulls anywhere, then . is safe.
[20:47:46] *** giaco has quit IRC
[20:48:03] *** madsj has joined ##java
[20:48:25] <madsj> hi; is it possible to have an arraylist of pairs ?
[20:48:26] <bobbytek> that's hard to avoid with typical jpa entities
[20:48:45] <letfunbegin> madsj: sure
[20:49:08] <ernimril> madsj: ArrayList takes any Objects you want to give it
[20:49:52] <madsj> new ArrayList<Pair<Integer,Integer>>() ?
[20:50:16] <letfunbegin> madsj: well, if you make a class Pair, then yes
[20:50:29] <ernimril> ~~madsj tias
[20:50:29] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[20:50:41] <madsj> letfunbegin: I thought Pair was a built-in ?
[20:50:41] <letfunbegin> madsj: or not exactly actually, but that's a minor detail
[20:50:48] <letfunbegin> madsj: no it isn't
[20:51:10] <madsj> hmm, any idea how to do this without having to introduce new classes ?
[20:51:30] <ernimril> madsj: if you do not want classes then you do not want java
[20:51:58] *** EspenG has joined ##java
[20:53:09] <madsj> ernimril: I meant introducing writing new classes; I wanted to know if there's a way to do this using the Java built-in classes
[20:53:24] <vol> There's no real tuple class for java iirc
[20:53:26] <vol> ~tuple
[20:53:26] <javabot> vol, I have no idea what tuple is.
[20:53:28] <vol> ~tuples
[20:53:28] <javabot> vol, I have no idea what tuples is.
[20:53:30] <vol> yeah
[20:53:33] <ernimril> madsj: do you find a "class Pair" in the standard api?
[20:53:33] <letfunbegin> hehe
[20:53:36] <vol> you pretty much get to write this yourself.
[20:53:41] <vol> tbh, not a big deal
[20:53:45] <vol> especially if you use generics
[20:53:48] <madsj> no need to re-invent the wheel, when java contains so many things
[20:53:50] <vol> Pair<?, ?> or something
[20:53:52] <letfunbegin> luckily it's a very simple implementation ;)
[20:54:08] *** fridim_ has quit IRC
[20:54:19] <madsj> ernimril: I'm new to Java, but found some webpages that indicate that there may be such a class
[20:54:28] *** staykov has joined ##java
[20:54:33] *** staykov has quit IRC
[20:54:40] <ernimril> ~~madsj api
[20:54:40] <javabot> madsj, api is http://java.sun.com/javase/current/docs/api/index.html
[20:54:48] <ernimril> madsj: check the api, do you find it?
[20:55:18] *** EdwardIII has joined ##java
[20:55:22] <EdwardIII> hey
[20:55:28] <ffgeek200> I'm on win(blows) and it says java 5.0 or newer could not be found on my 64bit machine yet i just installed the latest java, set JAVA_HOME to it and put the bin directory on my path
[20:55:34] *** bas-i has joined ##java
[20:55:42] <ffgeek200> any clue as to what it's looking for?
[20:55:51] <ernimril> ffgeek200: "it"?
[20:55:58] <letfunbegin> madsj: you could do a Google search if you don't want to write it yourself and get this: http://groups.google.com/group/comp.lang.java.help/browse_thread/thread/f8b63fc645c1b487/1d94be050cfc249b
[20:56:00] *** audriusz has quit IRC
[20:56:03] <ffgeek200> ernimril, sorry visualvm
[20:56:05] <letfunbegin> it looks solid enough
[20:56:25] <ernimril> ffgeek200: can you run it with "c:\path\to\jdk\bin\jvisualvm"?
[20:56:56] <ernimril> ffgeek200: I run visualvm (on linux) from time to time, never been any problems with it finding things
[20:57:00] <ffgeek200> ernimril, i'm running jvisualvm in its own directory after I downloaded it, should it come with the jdk?
[20:57:17] <jottinger> ffgeek200: it comes with 1.6.0_12
[20:57:19] <ffgeek200> ernimril, yeah i use linux mostly unfortantely i have to use windows
[20:57:24] <ernimril> ffgeek200: it does since java 6u7
[20:57:34] <ffgeek200> ffgeek200, that's probably the problem lemme find it
[20:58:24] <ffgeek200> ernimril, thanks found it, ran it and that fixed it, apparently the standalone visualvm is fubared
[20:59:07] *** toytoy has joined ##java
[20:59:47] *** Inhuman has joined ##java
[20:59:52] <madsj> letfunbegin: thanks
[21:00:01] <letfunbegin> you're welcome
[21:00:44] <ffgeek200> ernimril, what does 'profile new runnables' do w/ visualvm?
[21:01:25] <ffgeek200> in the last week i learned to remotely debug programs w/ eclipse, debug deadlock w/ eclipse and now visual vm, wow, i dont miss c++
[21:01:27] <ernimril> ffgeek200: try it and see, or read the user manual
[21:01:51] <ffgeek200> ernimril, kthanks
[21:01:55] <ernimril> ffgeek200: I only try visualvm from time to time to see if it has anything interesting and this far it does not
[21:02:02] <ernimril> ffgeek200: I prefer my own profilers
[21:02:26] *** Mkop2 has joined ##java
[21:03:03] *** djp[mbp] has quit IRC
[21:04:10] <ffgeek200> ernimril, how is tijmp better?
[21:04:28] <ernimril> ffgeek200: it tells _me_ what I want to know
[21:04:39] *** tom17bombadil has joined ##java
[21:04:40] <ernimril> ffgeek200: and it does not take up the whole screen
[21:05:00] <ffgeek200> ahh, well visualvm is not giving me a thing when i profile so perhaps i will try that
[21:05:16] *** shadewind has quit IRC
[21:05:45] *** vyoman has quit IRC
[21:05:46] <ernimril> ffgeek200: what is better depends on what you want to know. tijmp does not do any cpu profiling yet (minimal groundwork for it, but I have not really needed cpu profiling in a long time)
[21:06:20] <ffgeek200> ernimril, ahh, right now i need cpu profiling but i will check out tijmp if i need to do something else
[21:06:44] <ernimril> ffgeek200: why do you need cpu profiling?
[21:06:50] *** amz has quit IRC
[21:07:14] <ffgeek200> ernimril, i need to find the bottleneck that is slowing things down
[21:07:22] <ernimril> ffgeek200: do you understand that cpu profiling tend to make the code a whole lot different from what you run in production (and thus are _very_ hard to interpret correctly)
[21:07:45] *** madsj has quit IRC
[21:07:56] *** gregor_k has joined ##java
[21:07:59] *** prgrmr has joined ##java
[21:08:13] <ffgeek200> ernimril, oh yeah, i used to profile multithreaded C++ code
[21:08:21] <bobbytek> Anyone here know the simplest way to remove all borders from a table using itext?
[21:08:22] *** geaaru has joined ##java
[21:08:26] *** jkriesten has quit IRC
[21:08:29] <ffgeek200> ernimril, i have a huge 8 way system so i can load it decently and profile
[21:08:31] <ernimril> ffgeek200: most modern profilers add a lot of code to your methods which for example leads to hotspot not inlining your small methods, making them heavy, ....
[21:08:55] <ernimril> ffgeek200: C++ code is easier to profile than java
[21:09:01] <ffgeek200> ernimril, yep, it's not as bad as purify for c/c++ apps so relatively speaking it's better than what i'm used to
[21:09:11] *** defenderBG has joined ##java
[21:09:16] <defenderBG> hi everyone
[21:09:19] <ffgeek200> ernimril, ahh, why is that?
[21:09:36] <ernimril> ffgeek200: modern jit:s do a lot of code optimizations that c++ compilers can not do
[21:09:36] <defenderBG> does anyone know a finite state parser (fsp) for java?
[21:09:53] <defenderBG> finite state process parser....
[21:10:12] <ernimril> ffgeek200: hotspot inlines very much, including methods that it may have to un-inline if you load new classes later on
[21:10:31] <ffgeek200> ernimril, ah that complicates things
[21:10:52] <ernimril> ffgeek200: it compilcates the process of interpreting profiler output
[21:11:16] <ffgeek200> one thing that beats the hell out of C++ is leak finding
[21:11:56] *** Mkop2 has quit IRC
[21:12:09] <ernimril> ffgeek200: I find it way easier to 1) know the algorithmic complexity, 2) write a test case that times an operation running X times (1000 or 1000000 or ...)
[21:12:40] *** djp[mbp] has joined ##java
[21:12:45] *** tnks has joined ##java
[21:12:58] <ffgeek200> ernimril, i might do that for step b
[21:13:00] <ernimril> ffgeek200: memory leaks are typically fewer in java than in C, but can still be hard to spot. I will have to look at the eclipse profiler, they had a few interesting pointers
[21:13:38] <tnks> Hi. Does anyone have a good OMPL of Java blogs? Something to help keep up the language, libraries, patterns, etc?
[21:13:44] *** djp[mbp] has quit IRC
[21:13:56] <ffgeek200> well the problem w/ C++ is you can mess around w/ ptrs so you can't walk referenced objects like java to find leaks
[21:14:22] *** Zvpun has joined ##java
[21:14:23] <tnks> Right now, I subscribe to some general stuff, but it gets comingled with C++ and C# stuff.
[21:14:24] <Zvpun> ~pastebin
[21:14:24] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[21:14:28] *** rosh_ has joined ##java
[21:14:28] <ffgeek200> well you can, and purify does it, but it's god awful slow, you maybe run 1 thread slowly and you're happy
[21:15:57] *** DjZemich has quit IRC
[21:17:03] <TryNiX> Hello everyone. I am going to use this method for ?
[21:17:15] <Zvpun> http://rifers.org/paste/show/8831 - If System.console().readline(); is commented out, my program works otherwise it doesnt, how can this be? (works means: the method scrolls the Log to the end, doesnt work means, the scroll bar doesnt scroll to the end
[21:17:16] <TryNiX> err mistake, sec
[21:18:01] <TryNiX> I am planning to use this method for calculating color difference between 2 colors: http://pastebin.com/d5edb8793 , any idea on how to implement it if instead I want to calculate difference between 4 colors?
[21:18:04] *** djp[mbp] has joined ##java
[21:18:20] *** facebook is now known as systat
[21:18:32] <ernimril> TryNiX: what is the distance between 4 points?
[21:19:12] *** zophy has joined ##java
[21:19:33] <ernimril> TryNiX: what is the distance between 4 points? (a color is just a point in a 3 or 4 dimensional space)
[21:19:36] <TryNiX> ernimril: sum of shortest distances between them?
[21:20:14] *** zophy has quit IRC
[21:20:20] <ernimril> TryNiX: that could be one definition, yes, is it your definition?
[21:20:33] <TryNiX> Thats what comes to my mind
[21:20:39] *** zophy has joined ##java
[21:20:39] <TryNiX> but then I will need to know which are the shortest paths
[21:21:31] *** zophy has quit IRC
[21:22:03] *** zophy has joined ##java
[21:23:48] *** TranceControl has joined ##java
[21:25:15] *** ridoo has quit IRC
[21:25:27] *** Copter has quit IRC
[21:28:20] *** Copter has joined ##java
[21:29:10] <Zvpun> Can you please help me understand why line 51 in my paste http://rifers.org/paste/show/8831 changes the scrolling behaviour?
[21:30:00] <ernimril> ~~Zvpun edt
[21:30:00] <javabot> Zvpun, edt is Event Dispatch Thread, the thread that drives the awt/swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1
[21:30:30] *** gigo has quit IRC
[21:30:30] *** spal has quit IRC
[21:30:31] <cheeser> why would you do that there?
[21:30:37] <ernimril> Zvpun: why do you extend JFrame? what functionality do you add to JFrame? (none, just use a plain JFrame)
[21:31:09] <Zvpun> ernimril: okay, I will note that, at the moment I try to understand what you told me above
[21:31:47] *** _acid__ has quit IRC
[21:32:10] *** sepult has joined ##java
[21:33:01] *** zophy has quit IRC
[21:33:12] <TryNiX> ernimril: is there any algorithm you recommend for finding shortest paths? will Dijkstra's algorithm do?
[21:33:35] <ernimril> Zvpun: you may also want to state what you want your program to do, right now we have a question without much context so it is very hard to give any advice
[21:33:46] <ernimril> Zvpun: (more than telling you to learn basic swing handling)
[21:34:17] <ernimril> TryNiX: you have 4 points you can do whatever a brute force check is not expensive with just 4 points
[21:35:02] *** defenderBG has quit IRC
[21:35:05] <ernimril> 4!/2! = 4 * 3 * 2 / 2 = 12
[21:35:09] <Zvpun> My original problem is: creating a TextArea that scrolls when new text is added but doesnt if the scroll bar is not at the end. I thought I could solve this with google, that is how I got the code. But once I tried to udnerstand the code I added the System.console().... and it stoped working, so I am very confused how line 51 can change it.
[21:35:12] *** vinse has joined ##java
[21:35:36] <Zvpun> ernimril: I dont how event dispatched threads can help me answer that.
[21:35:41] *** bitshuffler has quit IRC
[21:35:43] <ernimril> Zvpun: as long as you are not following the edt rules anything can happen
[21:35:50] <Zvpun> ernimril: I see
[21:37:44] *** lokedk has quit IRC
[21:37:55] <ernimril> Zvpun: also note that mixing console reading with swing stuff will give you either 1) a hanging gui when you call read or 2) a gui that can and will crash/hang/behave badly at random
[21:38:25] <ernimril> Zvpun: as the edt tutorial tells you, do not mix slow operations (like io) with swing
[21:38:34] <Zvpun> ernimril: I am still reading the information you gave me, may I ask what rule I broke? calling sytem?
[21:39:16] <ernimril> Zvpun: the thread that calls main(...) is not the edt
[21:39:33] <ernimril> Zvpun: so creating a gui from that thread is a big no-no
[21:39:36] <LordMetroid> Can one use a defined generic to instantiate an object?
[21:40:02] <ernimril> LordMetroid: you can not do "new T()", if that is what you are asking
[21:40:11] <Zvpun> ernimril: that is public main() { new JFrame(); } is very bad?
[21:40:19] <ernimril> Zvpun: yes
[21:40:40] <ernimril> Zvpun: it will randomly crash your jvm or randomly hang it or randomly work
[21:40:41] <Zvpun> ernimril: okay I try to find that in the docs that you gave me.
[21:41:55] <LordMetroid> ernimril, what if T is defined as <T extends Foo> ?
[21:42:00] *** Sagi22 has quit IRC
[21:42:12] <LordMetroid> It doesn't seem to work
[21:42:31] <r0bby_> Zvpun: SwingUtilities.invokeLater(new Runnable() { public void run() { new JFrame(); } });
[21:42:33] <Zvpun> ernimril: I see, " all other swing component methods must be invoked from the edt.
[21:42:37] <Zvpun> ernimril: Thank you
[21:42:44] <LordMetroid> Maybe I need to remake the T class to an interface
[21:42:58] <ernimril> LordMetroid: it can not be done, pass a "Factory<T>" as well (can in a few cases be Class<T>, but typically easier to use a real factory class)
[21:43:44] *** mitchnull has joined ##java
[21:44:17] <r0bby_> Zvpun: replace new JFrame w/ whatever your main class which contains your GUI logic.
[21:44:46] *** Golden|Wolf has joined ##java
[21:44:50] <ernimril> r0bby_: no, why would you want to do that, you just build the gui and _use_ the JFrame, you do not need to extend it
[21:44:50] <r0bby_> i do most work in my constructor, or delegate it out to seperate methods, then construct the class on the EDT using invokeLater()
[21:45:06] <Golden|Wolf> http://rafb.net/p/l3n06X49.html
[21:45:06] <r0bby_> ernimril: see above
[21:45:14] <Golden|Wolf> is there anything wrong with that?
[21:45:24] <r0bby_> I use composition
[21:45:27] <cheeser> Golden|Wolf: yeah. it's not java.
[21:45:29] <ernimril> ~~Golden|Wolf javascript
[21:45:29] <javabot> Javascript has nothing to do with Java, just like sweet breads are neither sweet, nor bread. See ##javascript
[21:45:41] <cheeser> ~topicsmite Golden|Wolf
[21:45:42] <javabot> And the wrath of /TOPIC descended with terrible fury upon Golden|Wolf. And all the people marvelled, saying, Behold, we too should read the /TOPIC, lest we be stricken. And all the people read the /TOPIC, and went away edified.
[21:45:42] <Golden|Wolf> ahh k
[21:45:43] <r0bby_> do people ever read topics
[21:45:46] <r0bby_> christ.
[21:46:00] * cheeser ponders a VoiceUserOperation
[21:46:20] <dmlloyd> going to +m?
[21:46:22] *** jhujhiti has joined ##java
[21:46:32] <r0bby_> cheeser: plug in something to the webapp where a user MUST check a box stating "I have read the channel rules"
[21:46:37] <cheeser> "to get voice type: /msg javabot javascript is no java"
[21:46:38] <dmlloyd> 30-second delay before speaking is allowed? :)
[21:46:42] <dmlloyd> haha
[21:46:52] <r0bby_> add that to the DB so future users dont need to do it again
[21:46:57] <jhujhiti> class a { static { ... } } <- what is the correct name for the block of code after "static"?
[21:47:09] <cheeser> jhujhiti: static initializer
[21:47:12] <jottinger> static initializer
[21:47:15] <jhujhiti> thanks
[21:47:17] <jottinger> congrats on your test grade
[21:47:39] <dmlloyd> cheeser: better add "/msg javabot I will not ask about homework"
[21:47:49] <r0bby_> checkbox
[21:47:52] <cheeser> 8^)=
[21:47:58] <r0bby_> ajax checkbox :)
[21:48:14] <r0bby_> shouldn't be too hard
[21:48:43] <EdwardIII> sweetbreads, that one really caught me out
[21:48:57] <r0bby_> google.
[21:49:10] <r0bby_> o/
[21:49:36] <EdwardIII> hey cheeser was the pure java DB engine you were recommending the other day called HSQL?
[21:50:07] <cheeser> well, i dunno that i *recommended* it but i probably mentioned it, yes.
[21:50:08] <cheeser> 8^)=
[21:50:21] <EdwardIII> heh OK
[21:51:10] <EdwardIII> i'm looking for something really lightweight i can possibly keep when i port my test rss reader to the blackberry
[21:51:19] * EdwardIII is downloading now
[21:53:29] <Zvpun> ernimril: so is this code borken (Listing 16.1) http://openbook.galileocomputing.de/javainsel8/javainsel_16_002.htm#mj4a192039cadfd7a49425907508d1a217
[21:53:55] <ernimril> Zvpun: yes
[21:54:00] <Zvpun> Jesus Christ
[21:54:15] <Zvpun> its a bad thing I started from a broken book
[21:55:06] <cheeser> never trust zee germans
[21:55:25] <Sou|cutter> well, that code will work
[21:55:27] <jhujhiti> i could read it. i'm so proud that i remember high school german
[21:55:44] <Sou|cutter> but it's not good code
[21:55:52] <m4rtijn> hmm, if I want to "add" a number to a int number.. in a way that- 900 + 1 = 9001
[21:55:53] <Zvpun> Sou|cutter: if its broken, how can it wokr?
[21:56:04] <m4rtijn> is there an easier way as.. making it String
[21:56:15] <Sou|cutter> Zvpun: it breaks a contract
[21:56:22] <ernimril> Sou|cutter: as long as you define work as "sometimes crashing, sometimes hanging the jvm, sometimes doing other funky things"
[21:56:26] <cheeser> m4rtijn: that's not adding that's appending.
[21:56:33] <cheeser> m4rtijn: but it's simple math to get what you want
[21:56:36] <m4rtijn> yes.. I mean appending
[21:56:39] <Zvpun> its 10*x+y
[21:56:50] * cheeser kicks Zvpun in the ball.
[21:56:55] <m4rtijn> .. :p
[21:56:57] <cheeser> ~~ Zvpun spoonfeeding
[21:56:57] <javabot> Spoonfeed a newbie for a day and he'll come back with more questions. Teach him to find his own answers and you'll both be better off: you won't get stuck answering the easy questions and he'll be much more productive than before.
[21:56:59] <Sou|cutter> ernimril: With the given code, that "sometimes" is effectively never
[21:57:09] <Zvpun> sry
[21:57:17] <cheeser> Zvpun: 8^)=
[21:57:36] <m4rtijn> my brain stopped working 2 hours ago.. sorry :p
[21:57:47] <ernimril> Sou|cutter: what makes you think that? (I have seen very simple swing programs hang on my computer due to deadlock)
[21:57:57] <Sou|cutter> ernimril: Experience
[21:58:00] *** benny`work has joined ##java
[21:58:16] *** ml` has quit IRC
[21:58:21] <ernimril> Sou|cutter: then your experience is different than mine
[21:58:22] *** _stijn_ has quit IRC
[21:58:34] *** ramdam has quit IRC
[21:58:43] <Sou|cutter> ernimril: well, I started java as a swing programmer
[21:58:45] <Sou|cutter> FWIW
[21:58:53] *** poxus has joined ##java
[21:59:08] <ernimril> Sou|cutter: then you have not been doing java very long ;-)
[21:59:54] <Sou|cutter> ernimril: just giving you the context of my experience
[22:00:14] * Sou|cutter shrugs
[22:00:14] *** elementz has joined ##java
[22:00:29] <ernimril> Sou|cutter: but I agree that the chance/risk of a hang/crash goes up when you start to do more work or start doing your own painting
[22:02:00] *** pierrep has quit IRC
[22:02:46] *** _acid__ has joined ##java
[22:03:00] *** Varox has quit IRC
[22:10:16] *** krad has joined ##java
[22:11:24] *** thpar has joined ##java
[22:12:55] *** thpar has quit IRC
[22:13:22] *** LostMonarch has quit IRC
[22:13:25] *** Laurus has joined ##java
[22:13:48] <Laurus> Is there a way to call getUserPrincipal() from inside a Java class?
[22:14:04] <jottinger> yes
[22:14:28] *** juacom99 has quit IRC
[22:14:29] * teralaser wants getBankBailOutPrincipal()
[22:14:33] <Laurus> jottinger: Do you have a link to some kind of tutorial or something that explains how to do it?
[22:14:33] <teralaser> but ok...
[22:15:20] <TryNiX> how can I check if a variable is not initialised ?
[22:16:02] <krad> if I have many jars on the classpath, what advantages has the first over the others?
[22:17:44] *** BeholdMyGlory has joined ##java
[22:18:28] <krad> is it only that its main file will be read? and not the ones of the others?
[22:18:53] *** djp[mbp] has quit IRC
[22:19:20] *** bindaas has quit IRC
[22:19:20] <ernimril> krad: no
[22:19:35] <ernimril> krad: it has no advantage...
[22:20:04] <ernimril> krad: well, the classloader will look inside it before it check the second jar file, that may be an advantage
[22:20:20] <ernimril> TryNiX: define: initialized
[22:20:44] *** monkeycid has quit IRC
[22:20:56] <krad> yup.. so if the first has a mainfile defined in the second as well.. the first will be loaded.. otherwise i'll have to put the second jar the first on the classpath to make that mainfile loadable
[22:21:13] <ernimril> krad: what mainfile are you talking about?
[22:21:23] <krad> same package
[22:21:30] <TryNiX> ernimril: if for example { double d; } how can I know if d has a value, or not yet?
[22:21:39] <cheeser> all primitives have values.
[22:21:45] <Ven]n> how to grab a frame from mpg in JMF? grabFrame() gives nullpointer when using mpg files, but works on .avi for some weird reason.
[22:21:48] <TryNiX> oo
[22:21:58] <cheeser> all value types have values, strangely enough.
[22:21:59] <cheeser> 8^)=
[22:22:59] *** BSWolf has quit IRC
[22:23:08] *** firen has quit IRC
[22:23:25] <ernimril> TryNiX: class and instance variables are always initialized, method variables can only be used after you have set them (compiler error to try to do otherwise)
[22:23:46] <TryNiX> So if for example I am comparing distances and wanting to store shortest distance in d, is it best to set d as negative in the start, then see if its negative and set it as current distance? otherwise compare if current distance is less than d?
[22:24:19] <cheeser> well, 0 is never less than a negative number.
[22:24:32] <ernimril> TryNiX: I would probably set to Double.MAX_VALUE and just set the value to Math.min(current, newValue)
[22:25:17] *** Spike1506 has quit IRC
[22:25:25] <pgib> TryNiX, I would probably just keep a boolean around if you are trying to determine if the path exists
[22:25:29] <elaltaico> guys
[22:25:33] <pgib> if not, then the MAX_VALUE approach is good
[22:25:42] <jhujhiti> is there any documentation on how Class.hashCode() behaves?
[22:25:44] <TryNiX> cheers guys :) Learning new things every day!
[22:25:56] <elaltaico> anyone know how to make runnable jars in netbeans ? i can do it by shift+11 but it only works under dist directory...is there any other way ?
[22:26:10] <elaltaico> which it can work in other place except dist directory ?
[22:26:34] <ernimril> jhujhiti: Class.hashCode just uses Object.hashCode
[22:26:34] <pgib> elaltaico, it is probably in your best interest to learn how to build jars yourself first if you don't already know that
[22:27:09] <cheeser> ~~ elaltaico newbie ide
[22:27:09] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[22:27:40] <elaltaico> pgib i can build them by shift+11 and it works under dist directory well.but they do not work outsife of dist directory..
[22:27:46] <elaltaico> which configurations i need to do with manifest?
[22:27:56] <pgib> elaltaico, I mean with javac and jar
[22:27:58] <ernimril> ~~elaltaico jar
[22:27:58] <javabot> elaltaico, 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:28:08] <pgib> or at least ant
[22:28:13] <elaltaico> well..
[22:29:13] <jhujhiti> ernimril: so it's based on the address. does that mean that two Class<Byte> will always have the same hash code?
[22:29:22] *** ShadowHntr has joined ##java
[22:29:25] <elaltaico> i know what is jar :) my question is that..my question is i'm able to make runnable jar file on netbans and my desktopallication2.jar works fine under dist directory..but if i copy paste it somewhere it does not work.
[22:29:41] <ernimril> jhujhiti: why do you need to know? and why do you have two Class<Byte>?
[22:29:51] *** monkeycid has joined ##java
[22:29:56] <jhujhiti> Byte was just an example
[22:30:03] <elaltaico> :(
[22:30:08] <jhujhiti> i'm playing with an idea...
[22:30:09] *** elaltaico has quit IRC
[22:30:10] <ernimril> elaltaico: so unpack it, check what is missing and fix the problem
[22:30:16] <pgib> elaltaico, then you would know how to use jar to form a jarfile
[22:30:21] *** djp[mbp] has joined ##java
[22:30:23] <ernimril> elaltaico: but to do that you _need_ to learn the basic tools
[22:30:34] *** poxus has left ##java
[22:31:01] <ernimril> jhujhiti: Byte is in package java.lang so you should not try to load two different versions of it, it will cause problems
[22:31:15] *** yrlnry has joined ##java
[22:31:33] <ernimril> jhujhiti: if you have two different Class<your.own.ClassName> then they have been loaded by two different class loaders
[22:31:44] <jhujhiti> that's not what i'm trying to do
[22:32:05] <ernimril> jhujhiti: consider asking your real question
[22:32:24] <jhujhiti> this all started when i needed an enum that was extended something
[22:32:35] <jhujhiti> which i can't do, as i understand it, because enums already inherit Enum
[22:32:43] <ernimril> jhujhiti: correct
[22:32:43] <cheeser> enums extend Enum
[22:32:55] *** krad has quit IRC
[22:33:06] <jhujhiti> so i'm trying to write a class to model an enum that acts like an enum
[22:33:36] <jhujhiti> i'll pastebin an extremely naive implementation in a few minutes
[22:33:39] <ernimril> jhujhiti: if you want an enum you should use an enum
[22:33:45] *** monkeycid has quit IRC
[22:34:05] <jhujhiti> ernimril: i need a common base class for my enums
[22:34:15] <jhujhiti> and yes, it has to be a "class" not an "interface"
[22:34:37] *** fridim_ has joined ##java
[22:35:05] *** [S^K] has joined ##java
[22:36:04] *** Possible has joined ##java
[22:36:21] *** Possible has left ##java
[22:36:26] *** Possible has joined ##java
[22:36:54] *** elaltaico has joined ##java
[22:37:43] <Possible> anyone know how to get the Driver class from a JDBC driver BEFORE you load it ? Since you need to know the class name to load it in the first place....
[22:37:51] *** charzero has joined ##java
[22:38:34] <cheeser> Possible: by reading the docs for the driver
[22:38:45] <cheeser> you only need to know the name
[22:38:57] <cheeser> ~~ Possible javadoc Class.forName(*)
[22:38:58] <Possible> cheeser: right...but code doesn't read docs....I like toe code to do it
[22:39:01] <javabot> Possible: http://is.gd/kAEB [java.lang.Class.forName(String)]; http://is.gd/kAEC [java.lang.Class.forName(String,boolean,ClassLoader)]
[22:39:12] <cheeser> Possible: you write the code with the name in it.
[22:39:30] <Possible> so there is no way to get the driver class name from a jdbc driver by code
[22:39:39] *** BigAllan has joined ##java
[22:39:51] <jottinger> Possible: why would you want to?
[22:39:55] <cheeser> if your driver is JDBC4 compliant you don't need to worry about the driver at all.
[22:40:03] <yrlnry> I have a question about Spring transaction management at http://pastebin.ca/1345245 , if anyone cares to look. In short, the PROPAGATION_NEVER configuration is not throwing an exception as it is documented to, and I hope someone can tell me what I do not understand.
[22:40:03] *** Thorn has quit IRC
[22:40:20] <Possible> jottinger: I like the app to show the available drivers
[22:40:22] <Sou|cutter> Possible: not really, no. But you shouldn't need to
[22:40:47] <Possible> and I believe netbeans even has a class that does that...so it seems possible
[22:41:06] <Possible> or I am reading the docs wrong..
[22:41:31] <Possible> see http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-db/org/netbeans/api/db/explorer/JDBCDriver.html
[22:42:10] *** monkeycid has joined ##java
[22:43:21] <Possible> come to think of it...they might be doing this for already registred drivers.....sigh
[22:43:23] *** Golden|Wolf has quit IRC
[22:44:01] *** The_Birdman has quit IRC
[22:49:20] <TryNiX> Is this an ok brute-force search for shortest distance between 4 points... http://pastebin.com/d364e671f
[22:50:02] <cheeser> does it work?
[22:50:44] *** monkeycid has quit IRC
[22:51:02] *** benz1ne has quit IRC
[22:51:04] <TryNiX> I am still implementing the other parts of the code, so didn't test it yet.. but some how it looks ugly =p Guess I'll test it and pinpoint the ugliness later
[22:51:18] *** bas-i has quit IRC
[22:51:37] *** ChanServ has quit IRC
[22:51:51] <yrlnry> TryNiX: no, it's dumb. There's no reason to start j from 0 and then later check for i!=j.
[22:52:21] <doc``> it should work tho
[22:52:21] <yrlnry> TryNiX: instead, use for (j=i+1; j<4; j++) { for (k=j+1; k<4; k++) { etc.
[22:53:08] *** srart has quit IRC
[22:53:23] *** mbroeker has quit IRC
[22:53:35] *** lem has left ##java
[22:53:41] *** arakthor has joined ##java
[22:54:06] *** Gracenotes has quit IRC
[22:54:39] <yrlnry> and actually, isn't it the case that there are only three possibilities? you can have (i,j,k,l) = (0,1,2,3), or (0,2,1,3), or (0,3,1,2).
[22:54:52] <yrlnry> So all your complicated for loop stuff is a waste of time. There are only three cases to check.
[22:54:57] <yrlnry> s/time/code/
[22:55:25] <yrlnry> Oh, that's not right. N/m.
[22:56:46] <doc``> nah
[22:57:02] <TryNiX> yrlnry: I actually thought of doing what you mentioned (j=i+1 etc..) but I couldn't see through it well, so I was just worried it wouldn't do what I want. Maybe I'll just try it later on and see what answers I get.
[22:59:39] *** charzero has quit IRC
[23:00:46] <jhujhiti> okay, this is a disaster
[23:00:51] *** Zvpun has quit IRC
[23:01:11] <yrlnry> Yes, there are only 6 possibilities.
[23:01:26] <yrlnry> Because you get 6 choices about which two points are on the ends, and then you have no choice about which 2 points are in the middle.
[23:01:47] <jhujhiti> the problem i'm trying to solve is i want to have a base type of (most) objects. this base type has a static method
[23:01:51] <jhujhiti> so it can't be an interface
[23:02:14] *** Ivellina has quit IRC
[23:02:15] <jhujhiti> is there no way to get a regular enum to inherit that stuff?
[23:03:31] *** ChanServ has joined ##java
[23:03:31] *** irc.freenode.net sets mode: +o ChanServ
[23:03:35] *** BSWolf has joined ##java
[23:04:04] *** IppatsuMan has joined ##java
[23:04:14] *** n3llyb0y has quit IRC
[23:05:05] *** jbwiv has quit IRC
[23:05:22] *** Laurus has quit IRC
[23:05:55] *** genesiss has quit IRC
[23:06:28] *** systat is now known as Amphetamine
[23:07:00] *** hoban has quit IRC
[23:07:29] *** staar2 has quit IRC
[23:08:09] *** genesiss has joined ##java
[23:08:31] <Amphetamine> Hello
[23:09:23] *** BSWolf has quit IRC
[23:09:24] *** BSWolf2 has joined ##java
[23:09:43] *** genesiss has quit IRC
[23:09:56] *** DjZemich has joined ##java
[23:10:14] *** Possible has quit IRC
[23:10:23] *** BSWolf2 is now known as BSWolf
[23:10:49] *** jtheuer has quit IRC
[23:11:09] <dmlloyd> jhujhiti: you don't really want a global base class. If you think you do, you've made a mistake.
[23:11:20] <dmlloyd> Object is as base as you'll ever need, and then some.
[23:11:35] <blahjake> .
[23:11:43] *** genesiss has joined ##java
[23:11:47] *** BlueLaguna has quit IRC
[23:11:57] <dmlloyd> jhujhiti: if you want a static method to be available to a lot of classes, put it on a static-methods-only class and do a static import for the method in any class that wants it.
[23:12:02] *** BlueLaguna has joined ##Java
[23:12:12] *** ahughes has joined ##java
[23:12:21] <BlueLaguna> Does anyone know where I can find a more aesthetically pleasing javadoc?
[23:12:28] <BlueLaguna> Preferably with ajax?
[23:12:46] <dmlloyd> BlueLaguna: what you're looking for will be called a doclet
[23:12:58] <arakthor> what are the possible methods for passing data between threads?
[23:13:00] <dmlloyd> google for "ajax doclet" and I'm sure you'll find something
[23:13:08] <dmlloyd> ~~ arakthor jcip
[23:13:08] <javabot> arakthor, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[23:13:12] <BlueLaguna> dmlloyd: thanks
[23:13:51] <arakthor> thanks dmlloyd \
[23:14:05] *** PhyloGenesis has joined ##java
[23:16:04] *** jdolan_ has quit IRC
[23:16:45] *** shadewind has joined ##java
[23:16:47] *** BigAllan has quit IRC
[23:18:40] *** geaaru has quit IRC
[23:19:02] *** bas-i has joined ##java
[23:19:36] *** Aquanox has quit IRC
[23:20:18] *** Gracenotes has joined ##java
[23:21:29] *** monkeycid has joined ##java
[23:21:53] *** sebr_afk is now known as sebr
[23:22:13] *** arakthor has quit IRC
[23:22:21] *** rollins has quit IRC
[23:24:27] *** m4rtijn has left ##java
[23:26:37] *** DjZemich has quit IRC
[23:26:39] *** claudio_ch has joined ##java
[23:27:31] *** monkeycid has quit IRC
[23:27:35] *** Amphetamine is now known as HideousNashimoto
[23:28:27] *** timte has quit IRC
[23:30:24] *** ChanServ has quit IRC
[23:30:39] *** ffgeek200 has quit IRC
[23:31:10] *** sepult has quit IRC
[23:31:34] *** ChanServ has joined ##java
[23:31:34] *** irc.freenode.net sets mode: +o ChanServ
[23:33:06] *** epalm has left ##java
[23:34:21] *** le_biloute has quit IRC
[23:35:27] *** Frostix has joined ##java
[23:35:30] *** pgib has quit IRC
[23:36:41] *** Yustme has quit IRC
[23:38:03] *** Infinito has quit IRC
[23:38:18] *** aksn has joined ##java
[23:39:58] *** Inc` has joined ##java
[23:40:24] *** Infinito has joined ##java
[23:41:52] *** asap18 has joined ##java
[23:45:13] *** tom17bombadil has quit IRC
[23:46:04] *** smoog has quit IRC
[23:46:11] *** DragonLord- has quit IRC
[23:46:31] *** smoog has joined ##java
[23:47:01] *** ffgeek200 has joined ##java
[23:48:06] *** smoog has quit IRC
[23:48:36] *** smoog has joined ##java
[23:48:40] *** smoog has quit IRC
[23:49:08] *** smoog has joined ##java
[23:50:26] *** marvi has quit IRC
[23:50:40] *** ffgeek200b has joined ##java
[23:51:20] *** whaley has quit IRC
[23:51:35] *** ffgeek200 has quit IRC
[23:51:47] *** smoog has quit IRC
[23:51:50] *** juc0 has quit IRC
[23:51:55] *** henry_r has joined ##java
[23:52:16] *** smoog has joined ##java
[23:53:13] *** vyoman has joined ##java
[23:53:25] *** blahjake has quit IRC
[23:55:55] *** whaley has joined ##java
[23:57:54] *** tds5016 has left ##java
[23:58:20] *** twobytes is now known as zerobytse
[23:58:21] *** theCarpenter has joined ##java
[23:58:22] *** zerobytse is now known as zerobytes
[23:58:44] *** BlueLaguna has quit IRC
[23:59:17] <theCarpenter> i'm trying to setup some basic sniffing/MITM stuff... any suggestions for Java libs that could help me do this?
[23:59:18] *** smoog has quit IRC
[23:59:20] *** whaley has quit IRC
[23:59:47] *** smoog has joined ##java
top

   February 23, 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 | >