Switch to DuckDuckGo Search
   February 15, 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:04:34] *** pstickne has joined ##java
[00:07:23] *** jcp has quit IRC
[00:10:31] *** aknm has quit IRC
[00:11:07] *** SystemWizard has joined ##java
[00:12:10] <inspiron630> public boolean isValidWord(String wordToCheck) ....... another file..... BogglePlayer bp = new BogglePlayerImpl(); bp.isValidWord("hello");
[00:12:15] <inspiron630> and i get an error with no information
[00:12:31] *** bas-i has joined ##java
[00:12:37] *** magcius has quit IRC
[00:13:02] *** Wyzard has joined ##java
[00:13:13] *** magcius has joined ##java
[00:13:13] <inspiron630> *cannot find symbol
[00:13:38] *** kane77 has quit IRC
[00:13:44] *** Spike1506 has quit IRC
[00:13:46] *** _Maru_ has quit IRC
[00:14:07] <inspiron630> nm got it
[00:15:26] *** MetaMorfoziS has quit IRC
[00:16:16] *** latebind has quit IRC
[00:16:42] *** bas-i has quit IRC
[00:16:57] *** sixhat has joined ##java
[00:18:09] *** oxi has quit IRC
[00:18:38] *** sixhat has quit IRC
[00:19:07] *** sixhat has joined ##java
[00:19:07] *** Zvpun has joined ##java
[00:19:13] *** Sulis has joined ##java
[00:19:52] *** Wyzard_ has joined ##java
[00:20:52] <Zvpun> I try to mouseDragged events of a JLabel but the labels setText call from within the event handler is not called: http://www.papernapkin.org/pastebin/view/4437/
[00:21:33] <Zvpun> also I dont understand why I have to final the JLabel Log: "local variable Log is accessed from within inner class; needs to be declared final"
[00:22:06] <kinabalu> Zvpun: maybe you should read a tutorial about inner classes in java. google should help you there
[00:22:34] <ernimril> Zvpun: from what interface does mouseDragged come from?
[00:23:09] <Zvpun> kinabalu: I am reading a book and the chapter on swing talks about that its hard to access data members from the event listeners yet it doesnt teach howto do that so this is probably all my fault and bad style.
[00:23:42] <Zvpun> ernimril: http://java.sun.com/javase/6/docs/api/java/awt/event/MouseAdapter.html says class MouseAdapter
[00:24:01] <ernimril> Zvpun: that is not an answer to the question I asked
[00:24:21] <ernimril> Zvpun: is MouseAdapter an interface?
[00:25:20] <Zvpun> ernimril: mouseDragged in interface MouseMotionListener
[00:25:43] <ernimril> Zvpun: what type of listener do you add to spades10?
[00:26:22] *** beol has quit IRC
[00:26:27] <Zvpun> ernimril: thank you, I should change that to addMouseMotionListener
[00:26:28] *** b0r3d has joined ##java
[00:26:48] * Zvpun is off reading on inner classes
[00:26:50] *** Techdeck has joined ##java
[00:26:57] <Zvpun> to understand the final
[00:28:28] *** squi has quit IRC
[00:28:34] *** delskorch has quit IRC
[00:28:49] <b0r3d> inner
[00:28:56] *** vorpal has quit IRC
[00:28:58] <b0r3d> i hate exmas
[00:29:16] <b0r3d> oh you mean the final keyword used on a clas
[00:30:02] <Zvpun> b0r3d: since I am new and confused its very likely I did something realy stupid while trying to figure out howto access a Label from my main class.
[00:30:36] *** _Maru_ has joined ##java
[00:31:03] *** Wyzard has quit IRC
[00:31:16] *** monstrfolk has joined ##java
[00:31:32] *** Wyzard_ is now known as Wyzard
[00:31:33] <EdwardIII> pr3d4t0r: is #49936 you? http://www.qdb.us/date/20051021
[00:32:25] <pr3d4t0r> LOL!
[00:32:28] <pr3d4t0r> EdwardIII: Yeah, that's me.
[00:32:34] <pr3d4t0r> ~tell EdwardIII about Meghan.
[00:32:34] <javabot> EdwardIII, take a look at this: http://qdb.us/49936
[00:32:48] *** EruditeHermit has joined ##java
[00:33:18] <EruditeHermit> hi, can anyone explain the differences between icedtea and openjdk
[00:33:22] <EruditeHermit> I am really confused
[00:33:23] <EdwardIII> very funny indeed - i'm just about to e-mail it to my friend who works with an indian
[00:33:29] *** Habeeb has joined ##java
[00:33:30] <pr3d4t0r> EdwardIII: Heh.
[00:33:40] <pr3d4t0r> EdwardIII: I'll take the blame, or the glory.
[00:33:45] *** Habeeb has left ##java
[00:37:11] *** kilp has joined ##java
[00:37:31] *** b0r3d has quit IRC
[00:37:43] *** FuZion755 has joined ##java
[00:37:53] *** LH[ has joined ##java
[00:37:54] <kilp> does System.exit(0); kill the whole JVM? all threads etc? do I ever need to expliicitly stop/close/kill a thread if calling System.exit? or shoulnt i call System.exit always?
[00:38:04] *** Sulis has quit IRC
[00:38:05] <LH[> hy
[00:38:17] <FuZion755> If this is my manifest file: Manifest-Version: 1.0
[00:38:17] <FuZion755> Created-By: 1.0 (Me)
[00:38:17] <FuZion755> Main-Class: ImageUploader
[00:38:20] *** aleksei has joined ##java
[00:38:23] <LH[> when installing the java se dev kit
[00:38:33] <LH[> shoudl I install it all or deselect anythign
[00:38:36] <aleksei> so, how many lonely hearts do we have here?
[00:38:41] <FuZion755> Why does my compiled JAR produce an error saying it cannot find the Main-Class file
[00:38:53] <EdwardIII> aleksei: you make me sad
[00:38:54] *** HeatHawk[AP2] has left ##java
[00:38:57] <LH[> 295
[00:39:02] *** HeatHawk[AP2] has joined ##java
[00:39:12] <FuZion755> I apologise for the over the limit paste, I thought I put them on one line before I pasted in here
[00:39:18] <aleksei> FuZion755: you haven't specified a main class in the manifest
[00:39:19] <kilp> i was born with 2 hearts
[00:39:36] <aleksei> kilp: hehe
[00:39:37] <LH[> I counted you, I assumed one guy has a girl lol
[00:39:39] <FuZion755> alksei: its the third one?
[00:39:57] *** sixhat has quit IRC
[00:40:17] <aleksei> FuZion755: the third what?
[00:40:44] <cybereal> ~~ kilp javadoc System.exit(*)
[00:40:44] <javabot> kilp: http://is.gd/jinj [java.lang.System.exit(int)]
[00:40:55] <cybereal> kilp: rtmfm
[00:41:05] <FuZion755> aseksei: doesn't Main-Class: ImageUploader suffice?
[00:41:19] <EdwardIII> rtmfm? there's a new acronym for that now?
[00:41:38] <cybereal> it's the sj version
[00:41:44] <cybereal> SLJ
[00:41:46] <aleksei> FuZion755: if ImageUploader has a main and declared in the correct package then yes
[00:41:46] <cybereal> that is
[00:41:51] *** Copter has joined ##java
[00:42:12] <inspiron630> what is a good way to see if a word is before or after another word alphabetically
[00:42:13] <EdwardIII> SLJ? the school library journal?
[00:42:21] *** pstickne has quit IRC
[00:42:35] <cybereal> Samuel L Jackson
[00:43:05] *** UK-sHaDoW has quit IRC
[00:43:15] <EdwardIII> haha i see
[00:43:17] <FuZion755> aleksei: it has a main method, but no package, none of my classes have a package. When I use winrar to look at the MANIFEST folder of the jar, there is nothing in there about a Main-Class, I don't understand why this would be, I am positive it is in my manifest file
[00:43:41] *** scott_w has joined ##java
[00:44:33] <EdwardIII> cybereal: i started working on my little java rss-reader project today... it's very slow going
[00:46:14] <ernimril> FuZion755: how did you create the jar?
[00:46:41] *** rburton- has quit IRC
[00:46:56] <cybereal> EdwardIII: Ah RSS, everyone's favorite hypocrite acronym
[00:47:21] <EdwardIII> heh
[00:48:00] *** UK-sHaDoW has joined ##java
[00:48:20] <FuZion755> ernimill: jar cvfm ImageUploader.jar manifest.txt *.class
[00:49:05] <EdwardIII> i thought it would be a useful little project - i'm gonna create it in linux for command line initially as a practice run where it can pull down RSS feeds from the web and cache them in SQLite, then once i'm happy with that i'll have a go at porting that onto the phone - the only decent rss reader i've found that works on the blackberry is viigo and it's ad-supported
[00:49:21] *** LH[ has left ##java
[00:49:30] <EdwardIII> so it's a little personal project that might actually be useful
[00:50:40] *** deca has joined ##java
[00:51:01] <FuZion755> ernimril: sorry about the mispell
[00:51:02] *** TranceControl has joined ##java
[00:53:34] *** repnop has joined ##java
[00:54:19] *** convivial has quit IRC
[00:55:55] *** jonbryan has quit IRC
[00:57:46] *** surial has joined ##java
[00:59:19] *** teimu has quit IRC
[00:59:55] *** noobraska has quit IRC
[01:00:23] *** benny`work has joined ##java
[01:00:31] *** noobraska has joined ##java
[01:02:27] *** FuZion755 has left ##java
[01:06:04] *** carranca has joined ##java
[01:06:23] <carranca> hi, how can i specify the working directory when i run java?
[01:06:32] <carranca> is there a -Djava. option?
[01:06:42] *** Mo9a7i has joined ##java
[01:07:08] <carranca> i have something like bin/ where all my .class are located, and i need to find a resource that is one directory back.
[01:07:31] <_W_> carranca, the working directory is a function of your operating system
[01:07:48] <carranca> The other way to do it is to execute java from one directory back, but i dont know how to execute the class
[01:08:07] <EdwardIII> but if you wanna know about the class path, *I'M* your man
[01:08:17] <_W_> why not just have a command line option that specifies the file?
[01:08:18] <carranca> because the class is in a package like org.bla.bla.mainclass and not bin.org.bla.bla.mainclass
[01:09:16] <Mo9a7i> I'm doing this for fun , i have eight eights , i have to add,substract,multiply or divide one with another to achieve a result of 1000 , could some one help me with the logic to do this in Java , let java try ?
[01:09:29] *** inspiron630 has quit IRC
[01:09:39] <carranca> i cannot modify the source now, i just want to run it
[01:10:14] <carranca> in eclipse it works fine, but it runs from the projects root dir
[01:10:24] *** Daniel_H has quit IRC
[01:10:46] *** kilp has quit IRC
[01:10:49] <_W_> carranca, you /can't modify the source/? then you're in the wrong channel, this is the channel for Java programming
[01:12:23] <carranca> sry, found a way around it
[01:12:29] <carranca> using the classpath
[01:12:31] <_W_> seems like a non-problem to me, really. And you're being very vague when it comes to the information that would enable us to give you the best advice
[01:12:54] *** mistik1 has quit IRC
[01:14:13] *** Stef1 has joined ##java
[01:14:33] *** ramdam has joined ##java
[01:16:07] *** genesiss has quit IRC
[01:18:48] <aleksei> join #hacking
[01:19:32] *** mistik1 has joined ##java
[01:20:57] *** Mo9a7i has quit IRC
[01:21:12] *** exbio has joined ##java
[01:23:12] *** Copter has quit IRC
[01:23:40] *** aknm has joined ##java
[01:24:30] *** gregor_k has quit IRC
[01:25:31] *** vesz has quit IRC
[01:25:35] *** deca has left ##java
[01:26:12] *** FuZion755 has joined ##java
[01:28:17] <FuZion755> If I compile a java program with an added JAR file in my class path, does every computer have to have that in its classpath in order to run it?
[01:28:23] *** The_Birdman has quit IRC
[01:28:25] <surial> Yes.
[01:28:31] *** deca has joined ##java
[01:28:35] <surial> It is therefore sensible to package the resulting class file properly.
[01:28:39] <surial> So that the requirement goes away.
[01:28:45] *** jabalsad has quit IRC
[01:28:51] *** Bonix has quit IRC
[01:29:19] *** ttmrichter has joined ##java
[01:30:44] *** garotosopa has quit IRC
[01:33:02] *** FuZion755 has left ##java
[01:34:34] *** Razec has joined ##java
[01:35:18] *** teralaser has quit IRC
[01:38:00] *** Yustme has quit IRC
[01:39:31] *** Vicfred has joined ##java
[01:40:46] *** Stef1 has left ##java
[01:42:06] *** nvictor has joined ##java
[01:42:40] *** nvictor has left ##java
[01:44:10] *** shadewind has quit IRC
[01:48:27] *** magentar has quit IRC
[01:48:33] *** userek has quit IRC
[01:51:27] *** benny`work has quit IRC
[01:54:20] *** EruditeHermit has left ##java
[01:55:59] *** _val_ has quit IRC
[02:00:17] *** _stack has quit IRC
[02:00:28] <kavon> if I return 1 to the system upon exiting, would the system attempt to like send an error report to microsoft or somthing stupid on windows?
[02:00:54] <kavon> my program fails but i don't want anything to happen but for it to quit, return 0 or 1?
[02:01:27] <AMcBain> The OS doesn't really respond to the error messages, that is up to those running your program (if they care)
[02:01:36] <AMcBain> s/messages/numbers/
[02:02:14] <kavon> what does "s/messages/numbers/" mean AMcBain?
[02:02:44] <AMcBain> *facepalm* ... you haven't been on IRC enough ... it means to replace "messages" in my previous statement with "numbers"
[02:02:45] <_W_> he is correct his previous message with a substitution
[02:03:27] <_W_> and no, Windows ignores the return value even more than most other OS'
[02:03:35] <kavon> AMcBain: is "s" some code i should know about ?
[02:03:35] *** zophy[] has quit IRC
[02:04:08] <kavon> _W_: alright, well if there is an OS out there that cares, i'm going to let it know that my program crashed with an error
[02:04:17] <AMcBain> uh, it's just text. I know of no client that actually interprets that.
[02:04:23] * AMcBain heads out.
[02:04:34] * kavon waves bye to AMcBain.
[02:05:02] <armyriad> How would I write a rock paper scissors game in Java?
[02:05:16] <kavon> armyriad: look up Random in the API
[02:05:23] *** carranca has quit IRC
[02:05:55] *** FuZion755 has joined ##java
[02:06:31] <FuZion755> Hi there, can someone please point me in the rigth direction of a tutorial that can explain to me how to reference file that is packaged in my JAR, say an image.
[02:07:10] <kavon> FuZion755: I know how to get a URL for it
[02:07:20] <FuZion755> hows that?
[02:07:32] <kavon> FuZion755: getClass().getResource(path)
[02:07:55] <kavon> path would be the name of the image, or if it is in a package, say project.icons then it would be icons/iconname.png
[02:08:17] <kavon> FuZion755: if you're in a static context, use MyClass.class.getResource(path)
[02:08:29] <FuZion755> and this coudl be in the jar, so path would be image.jpg?
[02:09:07] <kavon> FuZion755: if it is in the same package as the class (right next to the .java file) then yes
[02:09:26] *** userek has joined ##java
[02:09:32] <kavon> FuZion755: if you've got a folder called icons in your source folder, then you'd use icons/image.png
[02:09:49] <FuZion755> great thank you!
[02:09:56] <kavon> FuZion755: yep
[02:10:14] *** Zvpun has left ##java
[02:12:14] <FuZion755> kavon: I have a JAR file with a bunch of class files and two images
[02:12:17] *** The_Birdman has joined ##java
[02:12:27] <FuZion755> could i reference one of the images through getClass().getResource("pic1.jpg")
[02:13:03] <kavon> FuZion755: you'd get a URL, which then can be used to make an ImageIcon, or i think a file etc
[02:13:21] <kavon> FuZion755: essentially, a proper address, from there you need to actually get the image
[02:13:42] <kavon> FuZion755: be aware of an exception, i think MalformedURLException
[02:13:56] <kavon> FuZion755: which means it doesn't exist
[02:14:41] <surial> I don't hink you get a MalformedURLException if it doesn't exist.
[02:14:43] <FuZion755> ok thank you!
[02:14:47] <surial> You get some other exception.
[02:14:58] <surial> after all, just because a URL 404s doesn't mean it's malformed.
[02:15:05] <surial> other than that, good advice :)
[02:15:30] <kavon> surial: http://java.sun.com/javase/6/docs/api/java/net/URL.html#URL(java.lang.String)
[02:15:46] <kavon> surial: sure it does, but i guess it is thrown if the string specifies an unknown protocol
[02:16:01] <surial> which would obviously not happen if you specify a file that isn't there.
[02:16:25] <surial> the URL you get is something like: file:///your/path/to/your/jar/jarfile.jar!/path/in/jar/file/myImage.png
[02:16:37] <kavon> surial: well, my code always threw that exception when an icon was missing
[02:16:46] <surial> which most URL-powered tools don't understand, but java tools usually do.
[02:16:58] <surial> kavon: Really? That'd be a bug.
[02:17:00] <surial> ... of java.
[02:17:25] <kavon> surial: it extends IOException if that means anything
[02:17:47] <kavon> surial: Either no legal protocol could be found in a specification string or the string could not be parsed.
[02:17:47] *** Wyzard_ has joined ##java
[02:18:00] <surial> neither of which apply if the file isn't there.
[02:18:36] <surial> Yes, it extends IOException. A living, breathing, example of the lunacy of the entire IOException hierarchy. Or make that: The entire exception hierarchy in java. Not that any language really gets it right.
[02:18:42] <kavon> surial: i dunno, I think when i do: new ImageIcon(imgURL); it is thrown
[02:19:12] <kavon> surial: not in the construction of the URL, when I use it i guess
[02:20:13] <kavon> surial: interesting, http://java.sun.com/javase/6/docs/api/javax/swing/ImageIcon.html#ImageIcon(java.net.URL)
[02:20:20] <kavon> surial: ImageIcon doesn't throw anything ;z
[02:20:40] <kavon> surial: have I discovered a bug in the holy code of Java?
[02:20:50] <surial> Nothing that drives it home like a testcase.
[02:20:54] <kinabalu> wow, could JSF and even facelets be this backwards and painful to look at?
[02:21:05] <kavon> surial: i'll whip up a test case
[02:21:54] <surial> javac MyFile.java && jar cvf TestJar MyFile.class someImage.gif && java -cp test.jar MyFile <- all you need to test it. Create the code for myFile.java as an exercise for the reader.
[02:22:06] <surial> s/TestJar/test.jar
[02:23:51] *** Thamster has joined ##java
[02:25:49] <dk_schrute> God damnit r0bby
[02:26:04] *** FuZion755 has left ##java
[02:26:24] <kavon> surial: woops, it use to throw NPE not the other one
[02:26:45] <kavon> surial: and only when i attempted to make the ImageIcon from the url
[02:27:18] <kavon> surial: almost thought I was going to be famous, and have a patch named after me
[02:27:58] <armyriad> How do I seed the random number generator with the time?
[02:28:46] *** Wyzard has quit IRC
[02:28:56] *** orgy` has quit IRC
[02:28:57] *** Wyzard_ is now known as Wyzard
[02:31:26] <letfunbegin> trying to figure how to enable marquee selection of elements in a JList for instance. so far my search for already-made solutions has been fruitless, but I guess I'm perhaps not asking Google the right questions. any ideas?
[02:32:38] *** Razec has quit IRC
[02:33:52] *** FuZion755 has joined ##java
[02:34:00] *** convivial has joined ##java
[02:34:24] *** jbalint has joined ##java
[02:34:33] <jbalint> is level on GainControl logarithmic?
[02:35:29] <FuZion755> Guys I'm seriously confused about something. I'm using the MySQL connector/j (its a JAR), that is in my classpath. When I attempt to run the program via the class file (java command), everything works fine. However, when I compile it and run the jar, I cannot connect to the database. Does compiling the JAR interferer with the classpath?
[02:37:09] <jbalint> wtf are you talking about
[02:37:24] *** mosno has joined ##java
[02:38:20] <FuZion755> When I run my program as a bunch of class files NOT in a JAR, everything runs correctly. However, when I try to combine these class files into a JAR and run it, the program functions incorrectly.
[02:38:44] <jbalint> incorrectly how
[02:39:22] <FuZion755> The non JAR version will connect to the database no problem, the JARed version does not. There are no changes at all, just the JAR
[02:39:41] <jbalint> whats the fucking problem!
[02:39:54] <jbalint> doesnt work
[02:39:59] <jbalint> ~tell FuZion755 about doesnt work
[02:40:00] <javabot> FuZion755, 'doesn't work' is not very helpful. What does it do, sit around on IRC all day?
[02:40:26] <aleksei> FuZion755: what's the command you are issuing to run the jar? are you setting the classpath to include connector j and your jar?
[02:40:47] <FuZion755> Tell you what, give me a second, and I'll get the exception stackTrace
[02:41:11] <jbalint> just say what the exception is
[02:41:36] * jbalint is betting it's a MidiUnavailableException
[02:42:21] <letfunbegin> haha :)
[02:42:44] <FuZion755> Its an SQLException
[02:43:30] <jbalint> and the error message?
[02:45:17] *** blbrown has joined ##java
[02:45:33] <blbrown> anyone work with webpshere, know how to read the native_stderr verbose garbage collection logs?
[02:45:53] <jbalint> hey blbrown
[02:46:08] <blbrown> jbalint, hey, long time no see
[02:47:05] <reverend> why would the stack trace and exception detail from an exception be important in solving this problem, clearly it's a bug in the jar format. :)
[02:47:15] <jbalint> yeah, im mostly only in the spring channel
[02:47:22] <FuZion755> jbalint: no suitable driver found
[02:47:26] <jbalint> reverend: then why is it a sqlexception
[02:47:38] <reverend> i dunno, why is it?
[02:47:43] <jbalint> FuZion755: using jdk 6, dont have the spi/manifest crap working, just Class.forName("com.mysql.jdbc.Driver")
[02:48:10] <FuZion755> The driver comes from another jar file, mysql.jar that is included in my comps classpath
[02:48:14] *** riotz has quit IRC
[02:48:17] <FuZion755> I do use that
[02:48:22] <blbrown> jbalint, I am a JVM lang guy (mostly clojure, sometimes scala)
[02:48:23] <jbalint> reverend: if theres a problem with the jar format, a SQLException wouldnt make sense
[02:48:28] *** multi_io has quit IRC
[02:48:45] <reverend> isn't SQLException how you report jar problems?
[02:49:55] <pr3d4t0r> reverend: Yo'.
[02:50:05] <pr3d4t0r> reverend: I needz sum halp, plz. kthx.
[02:50:17] <reverend> what do you need?
[02:50:22] <pr3d4t0r> reverend: Care to eyeball this for me? http://papernapkin.org/pastebin/resource/images/imageEntryId/4439
[02:50:23] <jbalint> blbrown: ah, cool
[02:50:27] <pr3d4t0r> jbalint!
[02:50:29] <jbalint> hey pr3d4t0r
[02:50:36] *** Ven]n has quit IRC
[02:50:41] *** magcius has quit IRC
[02:50:49] <pr3d4t0r> reverend: Conceptual failover, geographically distributed configuration.
[02:50:57] <aleksei> FuZion755: are you including mysql.jar in the class path at compile time *and* runtime?
[02:51:21] <pr3d4t0r> reverend: I think I covered all the components but I may be missing something.
[02:51:22] <reverend> pr3d4t0r: do you have copy to go with it?
[02:51:23] <FuZion755> jbalint: I caught an exception on the class.forName, it was a ClassNotFoundException for the mysql Driver
[02:51:26] <blbrown> jbalint, I am hooked, especially clojure. Scala has that completely different type system, but something I want to get into
[02:51:31] <pr3d4t0r> reverend: Yeah.
[02:51:33] <FuZion755> I dont think i am, I have tried doing it via the manifest
[02:51:43] <FuZion755> using Class-Path: mysql.jar
[02:51:50] <pr3d4t0r> reverend: The copy talks about replication for each cluster, and how the switch over could happen.
[02:52:05] *** riotz has joined ##java
[02:52:08] <pr3d4t0r> reverend: There are a pile of other diagrams that describe A/A, A/P clusters, failover, etc.
[02:52:19] <reverend> so the queue is a transaction log?
[02:52:26] <pr3d4t0r> reverend: Yes.
[02:52:39] <FuZion755> aleksei: what is the best way to to include it at runtime
[02:52:48] <reverend> i'd probably wrap the nodes in the cluster box
[02:52:52] <pr3d4t0r> reverend: The queue replicates the logic for site 1 in site 2, in case site 1 goes down.
[02:53:28] <pr3d4t0r> reverend: So the "green path" is normal ops.
[02:53:35] <reverend> right
[02:53:38] <aleksei> java -cp mysql.jar -jar yourjar.jar
[02:53:53] *** magcius has joined ##java
[02:54:21] <FuZion755> aleksei: what if I'm going to distribute this application to a few other people
[02:54:33] <SystemWizard> jar.jar ..? binks?
[02:54:35] <reverend> pr3d4t0r: how does node 2 know it's the master?
[02:54:53] <reverend> sorry, cluster 2
[02:55:07] <pr3d4t0r> reverend: A/A, grids, A/P, and computational clusters are covered way before this; that's why I didn't put the box. By the time you get here you know the nitty gritty of the A/A cluster + load balancing + algorithms, etc.
[02:55:22] <pr3d4t0r> reverend: It's not covered yet.
[02:55:31] *** riotz has quit IRC
[02:55:39] <reverend> okay, then it's probably just right
[02:55:42] <pr3d4t0r> reverend: The next section is disaster detection.
[02:55:48] <reverend> but thepudding would be in the copy
[02:55:59] *** blbrown has left ##java
[02:56:03] <pr3d4t0r> reverend: There is some copy to go with it :)
[02:56:06] *** blbrown has joined ##java
[02:56:09] <reverend> link? :)
[02:56:09] <pr3d4t0r> reverend: About 3,500 words of it.
[02:56:10] <_W_> aleksei, the -jar option ignores the -cp option
[02:56:14] <pr3d4t0r> reverend: In a few weeks ;)
[02:56:47] *** blbrown has left ##java
[02:56:54] <pr3d4t0r> reverend: It's a similar deal to this: http://eugeneciurana.com/site.php?page=musings&contentTag=SOA-Patterns.html
[02:57:11] <reverend> i've seen a similar architecture to this, i'm curious if the context matches up
[02:57:16] <FuZion755> so how then can I get this .jar included at runtime? What about the Class-Path: in manifest?
[02:57:38] <pr3d4t0r> reverend: It probably does ;)
[02:57:41] <_W_> FuZion755, don't use -jar, use -cp
[02:57:48] *** dunmer has quit IRC
[02:57:54] <reverend> new book?
[02:57:58] <pr3d4t0r> reverend: Booklet.
[02:58:02] <pr3d4t0r> reverend: For DZone.
[02:58:08] <reverend> nice
[02:58:11] *** magcius has quit IRC
[02:58:13] <_W_> java -cp myjar.jar:dependency1.jar:dependency2.jar my.package.MyClass
[02:58:28] <_W_> ~options
[02:58:28] <javabot> _W_, I have no idea what options is.
[02:58:30] <FuZion755> _W_: is it possible to do set this up so I can run the program by clicking on the JAR, though?
[02:58:47] *** magcius has joined ##java
[02:58:50] <_W_> FuZion755, to do that you need all the classes in one jar; yours as well as dependencies
[02:58:59] <FuZion755> I have that set up now
[02:59:19] <FuZion755> All of my classes are in one JAR, and the mysql.jar(the dependencies) are in it as well
[02:59:21] <_W_> (or have your base jar not have hard dependencies, but load other stuff at run time itself
[02:59:46] <FuZion755> _W_: how can I do it with everything in one?
[03:00:05] *** jbalint has left ##java
[03:00:12] <_W_> I thought you said you'd already done it?
[03:00:54] <FuZion755> I'm sorry, I mean that I have all of my dependencies in the JAR that they need to be, but it still isn't functioning
[03:00:59] <_W_> oh, I see. You will note that I said nothing about having one jar inside another
[03:01:08] <FuZion755> Ah, so what did you mean, then?
[03:01:13] <_W_> all the /classes/ inside the jar file
[03:01:49] <_W_> FuZion755, all this is really needless though; if you want ease of distribution, use Java Web Start
[03:03:12] <FuZion755> Ok I'm going to look into that right now, but out of curiosity, could I extract the jar containing my dependencies and put them all in my original JAR (keep in mind I'm using Class.forname, this is JDBC)
[03:04:37] *** Greyhound- has quit IRC
[03:05:02] *** nvictor has joined ##java
[03:05:08] <_W_> FuZion755, you shouldn't use Class.forname to load JDBC drivers either
[03:05:10] <aleksei> FuZion755: in java 6 you dont need Class.forName
[03:05:31] <FuZion755> whats the alternative
[03:05:32] *** nvictor has left ##java
[03:06:25] <aleksei> nothing
[03:06:38] <aleksei> the class will be automatically discovered
[03:06:55] <FuZion755> oh, oh great
[03:10:58] *** karstensrage has joined ##java
[03:12:31] *** magcius has quit IRC
[03:12:52] *** aleksei has left ##java
[03:12:56] *** FuZion755 has quit IRC
[03:14:08] *** Wyzard has quit IRC
[03:14:51] *** dydt has quit IRC
[03:14:57] *** doc`` has joined ##java
[03:15:20] <doc``> http://pastebin.com/m719e5cbb , how do i call that function with an array ? Sorter.insertionSort(array) ?
[03:18:10] *** mistik1 has quit IRC
[03:19:15] <AMcBain> yes.
[03:19:32] <AMcBain> However, you do know there is a sort() method on the Arrays class, right?
[03:19:40] *** josemoreira has quit IRC
[03:20:09] <doc``> i do
[03:20:23] <doc``> but i get error with it
[03:20:42] <AMcBain> okay ... wait, ^.- error with Arrays.sort(*) or in calling yours?
[03:20:52] <doc``> with calling mine
[03:21:00] <AMcBain> What's the Exception?
[03:21:03] <doc``> hold on
[03:21:19] *** LordMetroid has quit IRC
[03:22:14] <doc``> Exception in thread "main" java.lang.ClassCastException: MyData cannot be cast to java.lang.Comparable
[03:22:24] <doc``> i got an array of MyData
[03:22:40] <AlanasAnikonis> ha.. so... how does the class declaration look for MyData
[03:22:48] <AlanasAnikonis> i suppse it's missing an implement Comparable...
[03:22:53] <AMcBain> well, my ... yeah.
[03:23:04] <doc``> ok it doesnt
[03:23:09] <AlanasAnikonis> implements Comparable
[03:23:12] <doc``> but just implements Comparabel?
[03:23:31] <AlanasAnikonis> well, that's what the Arrays.sort( ... ) wants
[03:23:58] <AMcBain> doc``: yeah. You have to implement compareTo as well, but I bet you do.
[03:24:28] <AlanasAnikonis> well before it compiles it would complain loudly about it
[03:24:44] *** mistik1 has joined ##java
[03:24:56] <doc``> http://pastebin.com/m5aef07d8
[03:25:01] *** popcornPanic has joined ##java
[03:25:37] <doc``> Sorting.java:4: MyData is not abstract and does not override abstract method compareTo(java.lang.Object) in java.lang.Comparable
[03:25:38] <doc``> class MyData implements Comparable {
[03:26:24] * AMcBain finally owns a copy of JCIP :)
[03:28:03] <doc``> so how do i solve that?
[03:28:27] <AMcBain> compareTo is not generic.
[03:28:39] <AMcBain> You have a method which takes in MyData ... it should be Object.
[03:28:49] *** MichielH has quit IRC
[03:29:06] <AlanasAnikonis> what IDE or editor are you coding in, doc``?
[03:29:15] <doc``> nedit
[03:29:19] <AlanasAnikonis> why don't everyone just use intellij :P
[03:29:36] <AMcBain> because some people actually like using the editors they currently have? :)
[03:29:41] <AlanasAnikonis> i press Ctrl+I and it implements all the methods I need
[03:29:55] <AlanasAnikonis> doesn't nedit have "implement missing methods"?
[03:30:04] <AMcBain> ah, save yourself like 5 seconds of typing ...
[03:30:04] <doc``> no
[03:30:16] <AlanasAnikonis> typing something incorrectly...
[03:30:19] <doc``> im very new to java and generics tho
[03:30:25] <doc``> learing from the beginning
[03:30:33] <AlanasAnikonis> yea, well a smart ide would probably help :)
[03:30:48] <AMcBain> Once you change MyData back to Object, you'll have to cast and store a local copy of your variable as MyData (so you can access the proper variables)
[03:30:54] <AlanasAnikonis> but with simpler editors I just copy-paste the methods from javadoc or so
[03:30:55] <AMcBain> (for that method)
[03:31:32] <AMcBain> I'd just make the cast and assume that all input is a MyData object, because if it isn't, it's not my job to handle it. That's the fault of the idiot who passed in something not a MyData :)
[03:32:11] <AMcBain> (also, given that compareTo can only return -1 0 1, there is no value that is reasonably returnable for that ... in .equals you can safely return false for an object that isn't of the same type)
[03:32:12] <doc``> ok so public int compareTo(Object m) ?
[03:32:16] <AMcBain> yes
[03:32:37] *** mistik1 has quit IRC
[03:32:48] <AMcBain> well, I'd do "Object d" then right below that have Mydata m = (MyData)d;
[03:32:58] <AMcBain> so that your existing code works.
[03:33:16] <doc``> ah ok
[03:33:47] <AMcBain> but read what I said before, just doing this cast has a chance to fail if d isn't a type of MyObject ... but that's not for you to handle.
[03:33:58] <AMcBain> MyData*
[03:34:01] <doc``> ah yes
[03:35:23] <doc``> ah it might actually work now
[03:35:46] <AMcBain> :)
[03:36:07] *** EdwardIII has quit IRC
[03:36:27] <doc``> ah
[03:36:28] <doc``> awesome
[03:37:44] <doc``> ok some questions on how to build up a project im going to generate different types of arrays like random and sorted
[03:37:50] *** UK-sHaDoW has quit IRC
[03:38:05] <doc``> as it is now i have functions in the MyData class that returns them
[03:38:33] <doc``> however this isnt generic, and best would be if i could write a generic that returns an array of the correct type
[03:38:51] <doc``> so i could return an integer or a MyData array with the same code
[03:39:00] <doc``> however i dont know how i would do this
[03:39:25] *** Goundy has joined ##java
[03:39:38] *** mistik1 has joined ##java
[03:41:10] *** Goundy has quit IRC
[03:41:39] <armyriad> What's the best cross-platform Java debugger?
[03:41:58] <AMcBain> Any IDE you're comfortable working with.
[03:42:59] *** javahorn has joined ##java
[03:44:01] <armyriad> I don't want to download a huge, bloated IDE just to use a debugger.
[03:44:44] *** chameloid has joined ##java
[03:45:12] <AMcBain> but if you're already using the IDE to write code ... let's face it: there's no non-bloated IDE (don't mention Idea, they *all* have way to many features, more than half of us will ever use)
[03:45:21] <AMcBain> too*
[03:45:49] <armyriad> Yeah. I just want a stand-alone debugger.
[03:46:19] <AMcBain> well, let's see what Javabot says :-/
[03:46:23] <AMcBain> ~debugger
[03:46:23] <javabot> AMcBain, I have no idea what debugger is.
[03:46:27] <AMcBain> ~debug
[03:46:27] <javabot> AMcBain, remote debugging is -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
[03:46:44] <AMcBain> how helpful ... guess you'll have to wait.
[03:48:11] <AlanasAnikonis> ~debugging
[03:48:12] <javabot> AlanasAnikonis, debugging is the process of narrowing down the problem scope until it's so narrow the problem is immediately obvious
[03:48:25] <AlanasAnikonis> 'oh
[03:48:32] <doc``> :)
[03:48:33] <AlanasAnikonis> d'oh, even...
[03:48:45] * AlanasAnikonis should debug his keyboard, for it has a stuck d-key
[03:48:54] <doc``> bah need something to eat, thinking of a California burrito
[03:48:55] <AMcBain> screwdriver
[03:50:21] <looner> is every layout manager set up differently?
[03:53:51] *** Goundy has joined ##java
[03:54:50] *** aTypical has quit IRC
[03:54:50] <AMcBain> dependons on what you mean ... most work differently in practice and some have radically different APIs to acomplish various things, however, most try to stay transparent if all you do is add(component, LayoutManagerConstant/Value);
[03:55:03] *** thunderbolt has joined ##java
[03:56:24] *** eidolon has joined ##java
[03:56:31] *** aceofspades19 has quit IRC
[03:57:21] *** boringwall has joined ##java
[03:57:38] <looner> is there a way to stick a scroll bar on a text area?
[03:58:21] *** factor has joined ##java
[03:58:34] <looner> or which component am i supposed to use that would allow me to set text to a textarea like object on the fly, but not have the object editable.... essentially like a chat window / console window found in most games.
[03:58:58] <AMcBain> you can make a JTextArea uneditable ....
[03:59:08] <AMcBain> I believe it also has it's own scrollbar.
[03:59:10] *** cyzie has quit IRC
[04:00:06] *** ttmrichter has quit IRC
[04:01:59] *** cher has quit IRC
[04:03:03] *** ttmrichter has joined ##java
[04:03:17] <The_Birdman> AMcBain:Do you mean that a JscrollPane is magically added?
[04:04:14] <AMcBain> no ... wait ... ah, it's only TextArea, not JTextArea that handles scrolling for you.
[04:04:16] *** pstickne has joined ##java
[04:04:29] <AMcBain> close, but no cigar.
[04:04:37] <looner> boo.
[04:04:58] <AMcBain> what? It's not that hard to add a JScrollPane, plus you have more flexibility there.
[04:05:11] * r0bby cries a river
[04:05:15] *** Goundy has quit IRC
[04:05:21] *** blankthemuffin has joined ##java
[04:05:27] <AMcBain> With the JScrollPane you can set it up so that if a user scrolls up to read previous text, you don't force it down to the bottom the next line (but do so when they are all the way at the bottom already)
[04:05:34] <looner> well i'm kinda green in the swing world.
[04:05:35] <AMcBain> on the next*
[04:05:56] <AMcBain> JScrollPanes are easy ... panel.add(new JScrollPane(myJTextArea)); :)
[04:06:18] <AMcBain> (but, I'd advise doing a /slight/ bit more than that :P)
[04:06:37] *** popcornPanic has quit IRC
[04:10:18] *** josemoreira has joined ##java
[04:11:21] *** epalm has quit IRC
[04:12:13] *** waz has joined ##java
[04:13:43] *** DrHouse__ has quit IRC
[04:14:47] *** rainmann has joined ##java
[04:20:57] <pstickne> how can I make Eclipse stop messing up my lib entries?
[04:21:20] <cheeser> ~eclipse faq
[04:21:20] <javabot> I don't think so. But maybe there's a plugin...
[04:21:27] <pstickne> In particular, it takes "/absolute/" onto the front of them, even though in the .classpath it's just "lib/foo.jar"
[04:21:33] <pstickne> s/takes/tacks/
[04:21:39] <pstickne> I hate Eclipse :(
[04:21:53] <cheeser> ~idea
[04:21:53] <javabot> cheeser, idea is a non-free (as in beer, as in speech) IDE held in high regard by ##java - and by most professional programmers. See http://www.intellij.com/idea . It's worth every penny - and it's also free for participating open source projects.
[04:21:55] <cheeser> 8^)=
[04:22:00] <cheeser> ~netbeans
[04:22:00] <javabot> cheeser, netbeans is Sun's standard Java IDE. Older versions - prior to, say, 5.5 - sucked worse than Eclipse ever has, which is saying a lot. More recent versions are actually pretty good. See http://netbeans.info - free and open source. Netbeans 6 replaces the worst aspect of Netbeans, which is the text editor.
[04:22:15] <pstickne> cheeser: I know, I know, if it was free... and NetBeans makes Eclipse look an Angle :(
[04:22:33] <pstickne> cheeser: or rather, if there were 4-month evaluation versions ;-)
[04:22:36] <cheeser> 6.5 isn't bad at all
[04:22:45] <cheeser> you a student?
[04:22:47] <cheeser> only $99
[04:23:02] <pstickne> cheeser: I know, that /is/ still $99 though.
[04:23:27] <pstickne> cheeser: and there are other people in this project; NetBeans just has the most lack-luster rebuilding :(
[04:24:06] <pstickne> cheeser: but if I was doing this for a living, you can bet I'd shell out for IDEA :p
[04:25:30] *** ttmrichter has quit IRC
[04:25:36] *** phenom9600 has quit IRC
[04:26:01] *** Angel-SL has joined ##java
[04:26:07] *** ttmrichter has joined ##java
[04:27:56] *** marvs has quit IRC
[04:28:03] *** Wyzard has joined ##java
[04:28:50] *** userek has quit IRC
[04:29:02] *** chameloid has quit IRC
[04:37:45] <r0bby> pstickne: netbeans uses ant for its builds if i remember right
[04:38:10] <thunderbolt> I think that's correct.
[04:38:34] <pstickne> r0bby: maybe it works okay with Java ... absolute nightmare with a Java/Scala hybrid project :(
[04:38:47] <r0bby> pstickne: doesn't scala have an ant task?
[04:38:53] <r0bby> (I know groovy does)
[04:39:16] <r0bby> I've never learned scala for the sheer fact the syntax makes me wanna vomit in some respects
[04:39:21] <pstickne> r0bby: it's more than that, it's the dependencies that get all flubber, at least as far as I can tell.
[04:39:36] <pstickne> r0bby: hey, it's nothing like Perl ;-)
[04:39:41] <r0bby> i heard dibblego bitch/whine about IDEA's scala support blowing
[04:39:55] * r0bby reads his blog for kicks sometimes
[04:40:02] <thunderbolt> I thought scala fixed the cross-dependency problems in hybrid projects in the latest version...
[04:40:40] *** kater has joined ##java
[04:40:46] <pstickne> thunderbolt: I think it was just the version/setup of NB I had at the time... but I'm done with that so it's staying a closed box :)
[04:41:00] * thunderbolt nods
[04:43:04] *** Gracenotes has quit IRC
[04:43:32] *** noobraska has quit IRC
[04:44:06] *** Gracenotes has joined ##java
[04:46:11] *** mengu has joined ##java
[04:46:18] *** viperhr has quit IRC
[04:47:05] <cheeser> netbeans can also work of a pom.xml
[04:49:20] *** gantrixx has joined ##java
[04:50:17] <gantrixx> where is the pastebin?
[04:51:35] <gantrixx> Hey, I'm new to Java. I have one of the most basic questions you could ask about CLASSPATH
[04:51:42] <gantrixx> http://eugeneciurana.com/pastebin/pastebin.php?show=40349
[04:51:48] <gantrixx> why am I getting this error?
[04:52:06] <gantrixx> I specify where the class is with CLASSPATH
[04:52:07] <cheeser> ~~ gantrixx class
[04:52:07] <javabot> To run a java class simply give the class name: java com.foo.bar.OmgPonies, not java com.foo.bar.OmgPonies.class
[04:52:07] *** epalm has joined ##java
[04:52:16] <gantrixx> I mean -classpath
[04:52:44] <gantrixx> doh!
[04:52:45] <gantrixx> thanks
[04:52:48] <cheeser> sure
[04:52:49] <gantrixx> my books must be old
[04:52:53] <cheeser> no.
[04:53:07] <cheeser> don't blame the books. no java book has ever told someone to do that.
[04:53:08] <cheeser> 8^)=
[04:53:19] <gantrixx> let me re-read it
[04:53:24] <dk_schrute> ~testcase
[04:53:25] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
[04:54:42] *** Hail_Spacecake has joined ##java
[04:54:54] <Hail_Spacecake> is there an easy way in java to do something for every cell in a multidimensional array?
[04:54:55] *** sYskk has joined ##java
[04:55:14] <Hail_Spacecake> or do you have to write something with nested for loops yourself?
[04:55:25] <karstensrage> for i, for j, for k?
[04:55:45] <AMcBain> Well, Arrays has a fill(), I think, but you'd have to feed it the specific array you want to fill.
[04:57:50] <cheeser> Hail_Spacecake: and java doesn't have multidimensional arrays only arrays of arrays. so you can't assume a rectuangular structure
[04:58:00] *** kater_ has quit IRC
[04:58:11] *** ries has quit IRC
[04:58:27] *** thefalling has joined ##java
[05:00:05] <Hail_Spacecake> cheeser: is it incorrect to call a non-recangular array 'multidimensional'?
[05:00:49] <thefalling> Hey, how do stop a blockin method such as datagramsocket receive after a certain time interval?
[05:00:51] <cheeser> yes
[05:04:15] <surial> thefalling: Virtually all blocking methods have a second version that takes a millis.
[05:04:31] <surial> thefalling: If for whatever reason you can't call that or you didn't, you can always interrupt the thread. Anything that blocks normally responds to this.
[05:05:22] *** cyzie has joined ##java
[05:11:05] <thefalling> kewl thanks just realized there was setSoTimeout
[05:11:33] *** dk_schrute is now known as big_boss1
[05:11:38] <big_boss1> hehe
[05:11:47] * big_boss1 sneaks up behing Hail_Spacecake.
[05:12:12] <Hail_Spacecake> wherefore art thou sneaking up on me?
[05:12:18] *** big_boss1 is now known as svm_invictvs
[05:12:23] <svm_invictvs> Hail_Spacecake: I dont' know.
[05:13:09] <AMcBain> ~info kancho $1
[05:13:09] <javabot> kancho $1 was added by: JavaGeek on 12-13-2005 at 4:06 PM, EST and has a literal value of: <action>teleports silently behind $1, crouches and yells 'A thousand years of pain!'
[05:13:11] <AMcBain> :)
[05:13:24] <svm_invictvs> The Testcase factoid is messed up.
[05:14:28] <cybereal> ~test case
[05:14:28] <javabot> Provide complete, compilable Java source code for a SINGLE class that shows the problem and nothing else. Be as brief as possible. (See http://javafaq.mine.nu/lookup?364 for details and a HOWTO.)
[05:14:38] <svm_invictvs> site doesnt' load
[05:14:48] <cybereal> sometimes it's down
[05:15:02] *** cybereal has quit IRC
[05:16:31] <cheeser> yeah. if it ever comes back up, we should steal the content and put it somewhere else.
[05:16:40] <svm_invictvs> I started writing one.
[05:16:40] <svm_invictvs> heh
[05:16:54] <cheeser> if it doesn't suck, we can link it instead, then.
[05:16:55] <jerkface03> does anyone know how enumerations are handled by javac? do they just get converted to a class with a bunch of static fields that are instances of that class?
[05:17:05] <svm_invictvs> jerkface03: yeah
[05:17:21] *** waz has quit IRC
[05:17:32] <jerkface03> wonderful
[05:17:37] <jerkface03> i just wrote this class for nothing then
[05:17:37] <AMcBain> (I figured as much, but that explains the recursive generics in the JavaDoc page :P)
[05:17:52] <svm_invictvs> jerkface03: it can even implement inerfaces, too.
[05:21:37] *** cactaur has joined ##java
[05:25:16] *** McBainas has joined ##java
[05:25:36] <McBainas> fuck my network
[05:25:44] *** AMcBain has quit IRC
[05:25:46] *** McBainas is now known as AMcBain
[05:32:47] *** FireSlash has quit IRC
[05:36:07] *** baklava has quit IRC
[05:37:01] *** GodTodd has joined ##java
[05:38:48] *** AlanasAnikonis is now known as gone
[05:39:02] *** gone is now known as AlanasAnikonis
[05:40:31] *** asap18 has quit IRC
[05:41:08] *** _Maru_ has quit IRC
[05:42:09] *** Kwitschibo has quit IRC
[05:43:22] *** _Maru_ has joined ##java
[05:44:14] *** waz has joined ##java
[05:46:58] *** zophy has joined ##java
[05:47:52] *** zophy has quit IRC
[05:48:06] *** Woflborg has joined ##java
[05:48:14] *** zophy has joined ##java
[05:54:33] *** javahorn has quit IRC
[05:56:01] *** HockeyInJune has quit IRC
[05:56:16] *** HockeyInJune has joined ##java
[06:01:30] *** SystemWizard has quit IRC
[06:06:57] *** TranceControl has quit IRC
[06:09:05] *** Galik has joined ##java
[06:10:12] *** Adman65 has joined ##java
[06:10:26] *** rdancer has quit IRC
[06:11:18] <Adman65> anyone tell me why the SeatingArea(String name) can't find the other constructor with more arguements? http://pastebin.com/m36f446aa
[06:11:45] <AMcBain> you have to use this(...) to call other constructors within a class.
[06:11:47] *** bashoh has joined ##java
[06:14:14] <Adman65> cool
[06:14:15] <Adman65> thanks
[06:14:20] <AMcBain> np
[06:20:48] *** waz has quit IRC
[06:23:35] *** zophy[] has joined ##java
[06:24:21] *** javahorn has joined ##java
[06:33:11] *** asap18 has joined ##java
[06:33:14] *** zophy has quit IRC
[06:34:44] *** mosno has quit IRC
[06:39:06] *** jcp has joined ##java
[06:40:57] *** bindaas has joined ##java
[06:55:57] *** obnauticus has joined ##java
[07:03:23] *** Sikul has joined ##java
[07:09:13] *** giaco has quit IRC
[07:09:54] *** thunderbolt has quit IRC
[07:10:24] *** obnauticus has quit IRC
[07:10:37] *** zupaxx has joined ##java
[07:10:46] <zupaxx> hi what's the advantage of a build versioning
[07:10:57] <zupaxx> why do i need that
[07:11:03] *** rainmann has left ##java
[07:12:32] <looner> i'd guess that if multiple people have your program, and various versions at that... they can easily see the fixes / new features that have been added since their version. That is assuming your tracking all that stuff.
[07:13:07] <looner> Or if it's a game and everyone needs to be on the same build... it could be the trigger to tell them to get the new version else they can't play.
[07:15:09] *** casmo has quit IRC
[07:17:27] *** kavon has quit IRC
[07:17:58] <zupaxx> i see thanks for that.
[07:18:21] <zupaxx> i was tasked to do build versioning that gives me more insight thanks.
[07:18:22] *** mele- has joined ##java
[07:19:32] <zupaxx> another is if i will save my versioning data in a db
[07:20:07] <zupaxx> i am thinking of an alternative in an mdb file even tho i am a linux and java guy.
[07:20:32] <zupaxx> im sure there are good file storage format other than save it in db.
[07:22:43] *** adi112358 has joined ##java
[07:29:32] *** thefalling has quit IRC
[07:30:42] <reverend> zupaxx: are you not using a source control system?
[07:30:49] <reverend> just tag your releases
[07:31:03] <zupaxx> yes i have cvs
[07:31:20] <zupaxx> but we want a runtime tracking of version
[07:31:34] <zupaxx> lets say build version compared agains the running version
[07:32:23] <zupaxx> as what looner mentioned
[07:32:33] <reverend> oh, i see
[07:32:47] <reverend> cruisecontrol and other build systems track that for you
[07:33:09] <zupaxx> is there a software for that?
[07:33:15] <reverend> and you can just add something into your source at build time
[07:33:31] <zupaxx> i see that is better solution
[07:34:09] <zupaxx> reverend:great im checking out cruisecontrol thanks
[07:34:52] <svm_invictvs> War...has changed.
[07:41:51] *** amz has quit IRC
[07:43:49] <r0bby> zupaxx: one method is appending the revision number from your favorite VCS system
[07:44:02] <r0bby> the other is using ant to increment a build number
[07:44:35] *** sjdurfey has joined ##java
[07:44:45] *** SaEeDIRHA has joined ##java
[07:45:40] <sjdurfey> im baffled with this problem. i am trying to compare to strings, both strings have the same contents, and the same length, yet, the conditional statement always results in false, rather than true
[07:45:45] <zupaxx> thanks r0bby.
[07:46:05] <sjdurfey> im new to java, but ive been using C++ for a few years, so is there something im missing with strings in java?
[07:46:19] <SaEeDIRHA> hi, how can i paint an image on Jframe, so when i maximize and minimize the window , still i can have the image ? because when i use painComponent(g) and paint(g) functions , i can draw an image , but image goes as soon as i min/maxize the window
[07:46:27] <SaEeDIRHA> is there any solution for it ?
[07:46:30] <zupaxx> go for java the ultimate solution
[07:47:02] <r0bby> zupaxx: you can use a property to track the version internally
[07:47:13] *** SystemWizard has joined ##java
[07:47:40] <SaEeDIRHA> ~pastebin
[07:47:40] <javabot> http://www.papernapkin.org/pastebin Paste the final url after you've pasted your stuff there.
[07:47:43] <zupaxx> i see i will just increment the property manually right everytime i do build?
[07:48:02] *** kyr_ has joined ##java
[07:48:05] *** Hail_Spacecake has quit IRC
[07:48:06] <kyr_> hello
[07:48:30] <surial> sjdurfey: how are you comparing your strings?
[07:48:43] <sjdurfey> if(string1 == string2)
[07:48:50] <surial> That's pointer comparison.
[07:48:57] <surial> Not content comparison. Try string1.equals(string2)
[07:49:08] <sjdurfey> alrighty
[07:49:17] <SaEeDIRHA> here is part of my application : http://www.papernapkin.org/pastebin/view/4444/
[07:49:34] <SaEeDIRHA> can someone please help me , it is really frustrating :(
[07:49:55] *** amnesiac has quit IRC
[07:50:44] *** surial has quit IRC
[07:51:06] <sjdurfey> thanks guys, that fixed the issue
[07:51:11] *** blankthemuffin has quit IRC
[07:51:17] <sjdurfey> im so used to using relationship operators
[07:51:24] <sjdurfey> *relational
[07:52:33] <SaEeDIRHA> anyone ?
[07:52:45] *** gdoko has joined ##java
[07:55:00] *** asap18 has quit IRC
[07:56:20] <SaEeDIRHA> no one here ever tried to draw an image on JFrame ?
[07:56:54] *** frosch has joined ##java
[07:57:02] <AMcBain> no, we all use JPanels
[07:57:25] <zupaxx> i still can't understand cruisecontrol
[07:57:41] <SaEeDIRHA> well, would you point me in right direction please then ?
[07:57:45] <AMcBain> (if you want a "JFrame" where you can paint all the decorations, make the JFrame undecorated or use a JWindow)
[07:57:52] <zupaxx> im not sure what the goal is the docs are so confusing.
[07:58:10] <AMcBain> Why not use a JPanel? what's wrong with it?
[07:59:32] <SaEeDIRHA> cuz i am using netbeans for generating Frames
[07:59:42] <SaEeDIRHA> and it uses JFrame as a default
[07:59:43] *** javahorn has quit IRC
[08:00:15] *** sjdurfey has left ##java
[08:00:23] <AMcBain> ~guibuilders--
[08:00:23] <javabot> guibuilders has a karma level of -1, AMcBain
[08:00:43] <AMcBain> hmm.
[08:00:46] <AMcBain> ~matisse--
[08:00:46] <javabot> matisse has a karma level of -3, AMcBain
[08:01:12] <AMcBain> learn to do GUIs the right way, and you won't be hacking around so much.
[08:01:16] <AMcBain> just to do something so simple.
[08:02:34] <SaEeDIRHA> well , generating GUI for heavy application with coding would take ages
[08:03:05] <AMcBain> wrong again
[08:03:17] <AMcBain> you need to know what you are doing first.
[08:03:28] <AMcBain> then using Swing, by hand, is easy.
[08:03:32] <SaEeDIRHA> i can Draw an Image on JFrame , all i want to do is make it stable , so the image wont gone when i maximize or minimize the Frame
[08:04:00] <SaEeDIRHA> well, i want to draw an image on JFrame
[08:04:10] <SaEeDIRHA> there is a JPanel on JFrame
[08:04:28] <AMcBain> you really don't want to draw on the JFrame ... besides the fact that you aren't really drawing it on the JFrame itself, probably the content pane or the root-pane ...
[08:04:43] <SaEeDIRHA> and all the Labels and Buttons are embedded on that JPanel
[08:04:50] <AMcBain> It is much easier to draw on a JPanel and add that to a JFrame.
[08:05:53] <SaEeDIRHA> the JPanel is already on the JFrame, i want to draw an image on window as soon as users click on button
[08:06:11] <rullie> SaEeDIRHA: panel isn't frame
[08:06:24] <rullie> oops, nvm
[08:06:30] <SaEeDIRHA> and i can draw an image , but when i maximize or minimize the the window, the image is gone :(
[08:07:09] <rullie> JLabel is pretty useful for drawing images
[08:07:53] <SaEeDIRHA> do you mean JLable.setIcon?
[08:08:06] <AMcBain> It's a bit of an overkill, but I already wrote it for someone else ... http://pastebin.stonekeep.com/5656 this might help you understand what you can do. You need to override paintComponent on a JPanel ... then add that panel to the JFrame ...
[08:09:15] <AMcBain> Since I call super.paintComponent(g) in that example, you could technically add other components to that content-pane/JFrame and they would get painted as well.
[08:09:17] <rullie> SaEeDIRHA: yes new JLabel( new ImageIcon( BufferedImage ) );
[08:09:23] *** armyriad has quit IRC
[08:09:27] <AMcBain> However, the LightsOutBoard would paint on top of them :P
[08:10:39] *** javahorn has joined ##java
[08:10:47] <AMcBain> line 84 is where you'd put the code to paint your "image" or whatever you have.
[08:10:52] <SaEeDIRHA> if you take a look at part of my code : http://www.papernapkin.org/pastebin/view/4444/
[08:11:19] <SaEeDIRHA> you will see i used a same concept , but the image still goes when i maximize and minimize the Frame
[08:11:56] <AMcBain> that's why I said you might have better luck with a JPanel
[08:12:08] <AMcBain> (instead of JComponent)
[08:12:26] <rullie> SaEeDIRHA: you'd want to tell paint or repaint to call paintComponent
[08:12:34] <rullie> or use JLabel...
[08:12:55] *** cactaur has quit IRC
[08:14:25] <SaEeDIRHA> now when i add the Component it doesnt even Draw, but it calls the Class Constructor :(
[08:14:52] *** boringwall has quit IRC
[08:15:23] *** javahorn has quit IRC
[08:15:53] *** javahorn has joined ##java
[08:16:24] *** ScottG489 has quit IRC
[08:17:21] *** adi112358 has quit IRC
[08:18:15] <SaEeDIRHA> would you tell me what have i dont wrong please ? http://www.papernapkin.org/pastebin/view/4445/
[08:20:22] *** kyr_ has left ##java
[08:22:14] *** bhz- has joined ##java
[08:23:04] <SaEeDIRHA> ?
[08:23:41] *** Carnage\ has quit IRC
[08:24:25] <AMcBain> you shouldn't have to override paint(*) or update(*)
[08:25:38] <AMcBain> my guess is that you never set a preferred size (or similar) for the JPanel so it doesn't alot any size for you. so you're drawing the image at the correct size, but it is clipped to 0x0
[08:26:54] <SaEeDIRHA> in properties for JPanel the preferred size is : [572, 470]
[08:27:16] <AMcBain> you sure that's not the content-pane?
[08:27:29] <AMcBain> I mean the size of the instance of your DrawImage
[08:27:38] *** ScottG489 has joined ##java
[08:28:37] *** javahorn has quit IRC
[08:28:48] *** squi has joined ##java
[08:28:51] <SaEeDIRHA> well the size of Jpanel i have is [572, 470], do i need to setSize DrawImage Class when i call it ?
[08:29:21] <AMcBain> when you create it you need to give it a size, yes, and some layout managers also expect preferredSize instead ...
[08:29:35] <AMcBain> see, you'd know this if you didn't let matisse attempt to do everything for you.
[08:30:31] <SaEeDIRHA> yes, i agree with you, i need to learn it
[08:31:16] <SaEeDIRHA> this NetBeans GUI generator is a mess, do you think the Eclipse GUI generator is better ?
[08:31:59] <AMcBain> no, I don't.
[08:32:33] <AMcBain> However, I do believe the Eclipse one attempts to load up your own code, while Matisse locks the code it generates.
[08:32:40] <SaEeDIRHA> well, thank you for your help, for now i just resize image, and i will use Lable.setIcon
[08:33:43] <SaEeDIRHA> yeah, i have noticed that i cannot change the generated code
[08:34:29] <SaEeDIRHA> however , i think it Sun tires to standardized coding as much as possible
[08:35:02] <AMcBain> no, they just want to make it easier for matisse. It is easier to deal with code you know you wrote as opposed to code that someone else wrote.
[08:35:32] *** mele- has quit IRC
[08:35:50] <SaEeDIRHA> well, yes
[08:36:11] <SaEeDIRHA> thankx for your help and time
[08:38:00] <AMcBain> sure
[08:38:00] *** skoskav has quit IRC
[08:38:57] <SaEeDIRHA> one more thing , any of you ever used JMF for accessing the webcam by any chance ?
[08:39:02] <AMcBain> nope
[08:39:35] <SaEeDIRHA> well, thank you
[08:39:37] <SaEeDIRHA> bye
[08:42:29] *** josemoreira has quit IRC
[08:42:39] *** gionnyboss has quit IRC
[08:44:04] *** SaEeDIRHA has quit IRC
[08:44:38] *** Junior has joined ##java
[08:51:31] <AMcBain> he needs to learn to properly use the caps key ... his nick is hard to look at.
[08:52:28] *** pem3v78 has joined ##java
[08:56:24] *** cybereal has joined ##java
[08:58:09] *** GodTodd has quit IRC
[09:00:46] *** GodTodd has joined ##java
[09:07:19] *** beol has joined ##java
[09:07:23] *** Kwitschibo has joined ##java
[09:08:32] <zupaxx> hi when is JAXB useful in what common situation? thanks
[09:09:20] *** chrismaster1 has joined ##java
[09:13:39] <cybereal> zupaxx: we use it to maintain configuration in xml files
[09:14:14] <cybereal> so we can work with a straight up object model in code instead of getWhateverStupidProperty calls, etc. and not think about how it's persisted
[09:16:16] <zupaxx> i see xml config files creates the objects at runtime based on the xml definition right?
[09:16:32] <pstickne> xml--
[09:16:37] <zupaxx> that's where jaxb is used right?
[09:16:45] <zupaxx> another idea i got from other chan
[09:16:50] <zupaxx> it us used in webservices
[09:17:06] <zupaxx> to return object types
[09:17:44] <cybereal> zupaxx: any time you want to make a direct mapping from some xml document to objects, you use jaxb, it stands for "Java API for XML Binding"
[09:18:18] <cybereal> so you could use it in numerous scenarios... just have to deal with its inherent inflexibility and memory consumption (only an issue for rather large objects/documents though)
[09:18:32] <cybereal> honestly there are easier tools for xml persistence, I didn't pick jaxb, that's just what we use
[09:19:00] <zupaxx> i see like lets say spring beans, properties are set using jaxb or lets say mbeans
[09:19:05] <cybereal> and xml is fine, it's one of the rare document types that covers practically ever necessary base in a standard way but man it's a right pain in the ass if you have to deal with it by hand
[09:19:30] <cybereal> zupaxx: I don't know anything about spring or mbeans
[09:19:34] <zupaxx> yes really xml is painful to do manually
[09:19:44] <zupaxx> your a sun guy i think
[09:19:46] <cybereal> painful and error prone, but at least you *can* do it
[09:19:47] <zupaxx> if you dont do that
[09:20:08] <zupaxx> there are validators
[09:20:15] <zupaxx> but yes its painful to type in manually
[09:20:31] <zupaxx> but there are tools to automate the ending tags
[09:20:51] <cybereal> yes, I realize, but my thoughts are running to idiot third parties
[09:20:55] <cybereal> like customers editing their config files
[09:21:16] <cybereal> not myself, I have plenty of xml related tools in my toolbox, schema supporting auto completing editors, etc.
[09:21:38] <zupaxx> i see your right clients cant enter data in xml
[09:22:08] <zupaxx> maybe csv to xml
[09:22:26] <zupaxx> there's a buzz that json will replace xml
[09:22:34] *** doc`` has quit IRC
[09:23:17] *** durka42 has quit IRC
[09:23:32] <pfn> replacing xml for what?
[09:23:38] <pfn> not going to really happen...
[09:23:41] <zupaxx> json
[09:23:55] <zupaxx> more cryptic
[09:24:05] <zupaxx> json is more cryptic less verbose less typing
[09:24:25] <zupaxx> java will do json parser jsr
[09:27:56] *** Galik has left ##java
[09:30:05] <zupaxx> json has some issues your right its not going to really happen,
[09:31:23] <cybereal> thing is, as annoying as xml can be, it really solves the problem it seeks to solve rather well
[09:31:27] *** Kernel has joined ##java
[09:31:40] <cybereal> So replacing it is not necessary
[09:31:52] <AMcBain> :)
[09:32:00] <cybereal> but in task specific scenarios there are a number of alternatives to consider that might be more effective/efficient
[09:32:15] <cybereal> like protocol buffers, json, yaml, properties files, etc.
[09:32:23] <zupaxx> i dont see compression standards on xml data transfer
[09:32:25] <cybereal> also there's Fast Infoset
[09:32:39] <cybereal> xml is not a data transport solution
[09:32:53] <cybereal> zupaxx: it's not in the realm of xml to deal with compression
[09:32:55] <zupaxx> i mean a compressed transport for xml
[09:33:04] <isr`> it isnt?
[09:33:06] <cybereal> you can gzip your stream over http if you want
[09:33:06] <isr`> what about soap?
[09:33:19] <cybereal> isr`: what about it?
[09:33:21] <zupaxx> is soap compressed i did not know that
[09:33:32] <cybereal> soap is an application of xml, it's broader than xml itself
[09:33:35] <isr`> xml is fine for tranfering data
[09:33:50] <cybereal> xml doesn't transfer anything, it represents it
[09:33:54] <isr`> yeah
[09:33:56] <cybereal> try not to get that confused
[09:33:58] <zupaxx> yes your right but
[09:34:06] *** squi has quit IRC
[09:34:08] <isr`> its a fine representation to transfer data as
[09:34:13] <zupaxx> what if i want to transfer a 100mb of xml to another host
[09:34:18] *** squi has joined ##java
[09:34:19] <cybereal> zupaxx: gzip it?
[09:34:20] <zupaxx> using web services
[09:34:27] <cybereal> http supports transfer encoding
[09:34:31] <isr`> then you're just going to have to wait.
[09:34:36] <isr`> lol
[09:34:51] <isr`> but as far as flexibility, xml is the way to go.
[09:35:03] <cybereal> zupaxx: and as I said, there are definitely scenarios where alternatives would be more efficient but that's hardly a reason to think xml needs to be replaced
[09:35:06] <zupaxx> i dont know if soap compresses xml data it transfer
[09:35:24] <zupaxx> if it did then its good
[09:35:26] <cybereal> soap runs over http, you can specify to compress, assuming both endpoints support it (many support gzip)
[09:35:31] <isr`> yes
[09:35:35] <cybereal> ~fast infoset
[09:35:35] <javabot> cybereal, I have no idea what fast infoset is.
[09:35:43] <zupaxx> i see depends on the web server
[09:35:45] <zupaxx> mod_gzip
[09:35:51] <zupaxx> or mod_deflate do the job
[09:35:53] *** staar2 has joined ##java
[09:35:55] <zupaxx> right?
[09:36:10] <isr`> yeah what does this have to do with java though
[09:36:13] <cybereal> sure, for apache
[09:36:15] <isr`> are you using tomcat or something?
[09:36:33] <zupaxx> tomcat but front end for static html is plain apache
[09:36:45] *** staykov has quit IRC
[09:36:50] <zupaxx> ejb container->tomcat->apache
[09:36:51] <isr`> ah
[09:37:00] <cybereal> in tomcat, if it doesn't support gzip automatically you could intercept the response and request and do it yourself
[09:37:15] <cybereal> wouldn't be hard to wrap, I know jetty comes with a wrapper
[09:37:15] *** toytoy has quit IRC
[09:37:20] <zupaxx> is there are filters
[09:37:52] <zupaxx> filtering http response/request
[09:37:52] <cybereal> I will actually be enabling gzip support for an http based services API (not soap but close enough) in the next week or so
[09:38:01] <isr`> cybereal: do you know any good way of parsing java source code?
[09:38:14] <cybereal> isr`: no, I've never gotten into that kind of thing
[09:38:16] <isr`> i've been looking into using the compiler tool set but that looks very difficult
[09:38:34] <zupaxx> why do you want to parse java code?
[09:38:42] *** TheCastor has joined ##java
[09:39:06] <isr`> i need to extract members fields and methods, class names, classes that are extended, interfaces that are implemented
[09:39:08] <isr`> its for a project
[09:39:21] <zupaxx> there is javadoc
[09:39:22] <isr`> http://today.java.net/pub/a/today/2008/04/10/source-code-analysis-using-java-6-compiler-apis.html
[09:39:26] <zupaxx> annotatiosn to get that i think
[09:39:26] <isr`> zupaxx: you dont get it
[09:39:32] <isr`> i need that information during runtime
[09:39:36] <zupaxx> ahh ic ok
[09:39:45] <isr`> for specified fies
[09:39:48] <isr`> files*
[09:40:03] *** staykov has joined ##java
[09:40:19] <pfn> why do you need it at a language level
[09:40:25] <pfn> why is reflection insufficient?
[09:40:34] <isr`> reflection?
[09:40:47] <cybereal> heh
[09:40:57] <cybereal> ~reflection
[09:40:57] <javabot> cybereal, reflection is http://java.sun.com/tutorial/reflect
[09:41:01] <zupaxx> reflections you can get object status at runtime
[09:41:11] *** gdoko has quit IRC
[09:41:18] <zupaxx> no not really you can check the object structure
[09:41:19] <isr`> on a file of my choice?
[09:41:31] <cybereal> not on files, on objects and classes
[09:41:52] <cybereal> pfn is asking why you can't use reflection, not saying it does what you asked
[09:42:01] <isr`> oh hm
[09:42:08] <cybereal> it can get ALL that info you said, just only on classes that have been loaded one way or another
[09:42:09] <zupaxx> isr wants to get the class info from a java file of his choice
[09:42:26] *** anair has joined ##java
[09:42:33] <isr`> cybereal: that mean's i'd have to compile the .java source files i import anyway
[09:42:36] *** ryuho has quit IRC
[09:42:52] <isr`> so reflection is what say, eclipse uses to extract data about the classes?
[09:43:14] *** anair has quit IRC
[09:43:17] <zupaxx> maybe eclipse has parser for that
[09:43:25] <cybereal> well eclipse uses reflection in some cases but eclipse also has its own entire compiler, etc.
[09:43:26] <zupaxx> since it uses it on its editors
[09:43:54] *** bitshuffler has joined ##java
[09:44:03] <zupaxx> creat your own parser
[09:44:15] *** ridoo has joined ##java
[09:44:22] <isr`> zupaxx: i dont need to, sun has one i can overload
[09:44:36] <zupaxx> i see that's better
[09:44:51] <isr`> its just a pain in the butt
[09:45:19] <isr`> cybereal: so reflection wont work for plain text source files.
[09:45:27] <isr`> they'd have to be .class files?
[09:45:28] *** ryuho has joined ##java
[09:45:53] <zupaxx> got to load the class then do reflection
[09:46:18] <zupaxx> there's no way to reflect an un instantiated class
[09:46:52] <isr`> yeah so i'd have to compile the imported source anyway
[09:47:30] *** Wicked has quit IRC
[09:48:14] <staar2> java3d API is dead ?
[09:48:39] *** yetim_ has joined ##java
[09:49:03] *** beol has quit IRC
[09:49:17] *** jcp has quit IRC
[09:52:02] *** yetim_ has quit IRC
[09:55:42] <cybereal> ~java3d
[09:55:42] <javabot> cybereal, java3d is an API to add an extra dimension to your application, see https://java3d.dev.java.net Also see JOGL for hardcore openGL coders. For a nice alternative see JMonkeyEngine
[09:58:05] <zupaxx> java3d is in jsr right? it cant be unsupported but it can be outdated
[10:01:46] *** ankylose has quit IRC
[10:01:49] *** epalm has quit IRC
[10:02:18] <cybereal> jsr doesn't imply any kind of support
[10:02:45] <cybereal> there are numerous jsr's without even a worthwhile implementation let alone "support"
[10:03:07] <cybereal> and it's not part of the core library so there's no guarantees at all. At any rate, I'm not seeing any reason to believe it's "dead"
[10:05:01] *** The_Birdman has quit IRC
[10:05:40] <cybereal> especially considering the nightly failed on 2/10 and not 2/11 and forward
[10:05:46] <cybereal> obviously someone's working on it
[10:06:08] *** Chipmonk is now known as Gary
[10:06:13] <AMcBain> The JMonkeyEngine looks sweet!
[10:06:39] <AMcBain> (assuming you can code as well as those who made the games they show screenshots of :)
[10:06:42] *** aceofspades19 has joined ##Java
[10:11:13] *** Yustme has joined ##java
[10:11:25] *** vix85 has joined ##java
[10:12:42] *** Afterlawl has joined ##java
[10:14:35] *** Angel-SL has quit IRC
[10:15:54] *** pierrep has joined ##java
[10:16:43] *** zupaxx has quit IRC
[10:18:11] *** bas-i has joined ##java
[10:19:34] *** L-----D has joined ##java
[10:23:07] *** gregor_k has joined ##java
[10:23:40] *** drtroll has joined ##java
[10:24:59] *** Adman65 has quit IRC
[10:29:38] *** chrismaster1 has quit IRC
[10:31:08] *** shadewind has joined ##java
[10:32:16] *** mengu has quit IRC
[10:33:00] *** musically_ut has joined ##java
[10:36:44] *** SaEeDIRHA has joined ##java
[10:37:49] <SaEeDIRHA> hi, how can i kill a thread and release it from memory ? becaus when i use stop and/or interrupt the thread stops working but it doesnt free the resources i want to use , how can i free its resources?
[10:38:59] <SaEeDIRHA> is there anyway that i can destroy it completely
[10:39:02] <SaEeDIRHA> ?
[10:42:45] *** jahid_ has joined ##java
[10:42:58] <Ragnor> Quite probably you still hold some reference to the thread. Otherwise it would be freed by the garbage collector.
[10:43:58] *** woogley has quit IRC
[10:43:58] *** Sikul has quit IRC
[10:45:12] *** MichielH has joined ##java
[10:45:17] <SaEeDIRHA> how can i free them ?
[10:46:13] <SaEeDIRHA> because the thread i am creating , creates some other threads, and they get access to my webcam , and unless i destroy them i cannot use my webcam
[10:46:15] <SaEeDIRHA> :(
[10:48:01] *** morkar- has joined ##java
[10:50:27] *** assertsmart has joined ##java
[10:54:37] <Ragnor> Depends on how you store the references: local variables get freed when the function returns, fields get freed when the object itself is freed. Static fields are never freed (unless you re-assign another value, possibly null). Means: learn how Java works as there is no explicit "free()" operation, just an implicit one that fires when the object cannot be accesses by any means.
[10:57:49] <bhz-> SaEeDIRHA, do you have a loop in a thread? something like while (true) { ... }
[10:57:59] <SaEeDIRHA> yes
[10:59:22] <bhz-> you can do something like this: while (!quit) { ...}
[10:59:31] <bhz-> and set quit to true in the other thread
[10:59:47] <shadewind> Ragnor: wrong. all references get freed when the garbage collector feels like it
[11:00:07] <shadewind> or well, the references are freed but the objects are not
[11:01:52] *** acuster has joined ##java
[11:03:33] <SaEeDIRHA> how can i free the object?
[11:04:04] <SaEeDIRHA> because my program uses the webcam , and if i dont free the object , it gives me the exception that the device is being used
[11:04:10] *** dunmer has joined ##java
[11:04:31] <SaEeDIRHA> i want to pause and resume the live image capturing from Webcam
[11:04:50] <MichielH> SaEeDIRHA, which library are you using?
[11:04:57] <SaEeDIRHA> JMF
[11:10:25] <pstickne> Is there any handy Collections util to test for membership of an item?
[11:11:01] <pstickne> ahh, nvm :(
[11:14:52] <SaEeDIRHA> ?
[11:15:17] <SaEeDIRHA> i really dont know how to release the thread access to the webcam :(
[11:16:00] <SaEeDIRHA> i have set the boolean flag to end the while loop, but even when i end and set the object to null , still it has a access to web cam and it is been used
[11:16:01] <SaEeDIRHA> :(
[11:19:15] <Ragnor> shadewind: Can you a be a little more detailed when you claim somebody is wrong? As I understand your comment as that you claim that only references are freed but never objects? I.e., values passed by value (the "references") are freed but never the actual objects the references point to?
[11:21:59] <shadewind> Ragnor: what I was trying to say is that objects are not freed immediately, they are freed when the garbage collector feels like
[11:22:27] <Ragnor> I see (and agree) :)
[11:23:00] <SaEeDIRHA> ok, in my case how can i convince the GC to collect it ? :D
[11:23:16] *** buntfalke has joined ##java
[11:23:44] <shadewind> SaEeDIRHA: don't reference it
[11:23:57] *** kane77 has joined ##java
[11:24:13] <SaEeDIRHA> well, how can i use it if i dont reference it ?
[11:24:25] <Ragnor> Taking the garbage collector issue in mind: there really should be some kind of "close" operation in the class you're using. Just to make sure the external resource is freed immediately, not at the time when the garbage collector eventually kicks in.
[11:24:42] <shadewind> you want the GC to collect the object but you still want to use it?
[11:24:54] <Ragnor> SaEeDIRHA: This is exactly the issue: if you reference it, you cannot "free" it at the same time.
[11:25:10] <SaEeDIRHA> no, i want to collect it and then when i click on some button , regenerate the object
[11:25:29] <shadewind> I don't think you really know what you want
[11:25:40] * Ragnor agrees
[11:25:58] *** _stack has joined ##java
[11:26:04] <shadewind> there's no such thing as "regenerating" an object
[11:26:11] <r0bby> SaEeDIRHA: are you coming from C++?
[11:26:19] <SaEeDIRHA> yes
[11:26:28] <acuster> =
[11:26:30] <ernimril> SaEeDIRHA: all objects that hold external resources have .close()/.flush()/.dispose() or similar, check if there is such a method you can call
[11:26:46] *** zupaxx has joined ##java
[11:26:59] <zupaxx> hi what will happen if i will include this in javac
[11:27:00] <wlfshmn> if only there was some way to retain access to a singleton resource...
[11:27:19] <r0bby> zupaxx: try it?
[11:28:00] <r0bby> but you probably want to throw @SuppressWarnings({"unchecked"}) at the top of your method right before the declation
[11:28:06] <SaEeDIRHA> let me explain what the application is , it is a JFrame that got JLabel in it , i have 2 different Classes, one is FrameGrabber which gets the image from Webcam , and the other is Loader, which gets the Jlabel from main Frame , and combine it with the Image that it takes from FrameGrabber
[11:29:00] <SaEeDIRHA> and i have 2 buttons, one is stop, and one is start
[11:29:00] *** zupaxx has quit IRC
[11:29:32] *** zupaxx has joined ##java
[11:29:41] <zupaxx> i got dc damn
[11:29:45] <SaEeDIRHA> when i click on start it creates the FrameGrabber and loader objects, and it gains access to webcam
[11:30:09] <zupaxx> robby: putting -Xlint:unchecked will not compile right
[11:30:51] *** squiddle has joined ##java
[11:30:58] <SaEeDIRHA> i want the way that i can destroy the Loader and FrameGrabber objects by clicking on stop, and recreate them when user click on start
[11:31:27] <SaEeDIRHA> because only one object can have access to Webcam at a time
[11:31:44] <r0bby> ~~ zupaxx tooldocs
[11:31:45] <javabot> zupaxx, tooldocs is http://java.sun.com/javase/6/docs/technotes/tools/index.html
[11:31:46] <ssta> set the variables to null when stop is clicked
[11:31:47] <SaEeDIRHA> also i am using JMF for accessing the Webcam
[11:32:31] <SaEeDIRHA> i did, but didnt work, it stops the thread but the values that using the Webcam are not freed, and the webcam is still in use
[11:32:34] <ssta> I suspect there's some confusion about the lifetime of an Object and the lock it holds on an external resource
[11:32:41] <r0bby> ~javac
[11:32:41] <javabot> Here is some information about javac that you may find useful: http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html
[11:32:48] <r0bby> there we go :)
[11:32:50] <r0bby> ~info javac
[11:32:51] <javabot> javac was added by: Levia on 09-05-2008 at 10:29 AM, EDT and has a literal value of: <reply>Here is some information about javac that you may find useful: http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html
[11:33:05] *** LordMetroid has joined ##Java
[11:35:43] <SaEeDIRHA> i can see that there are some synchronized access to the web cam
[11:35:51] <zupaxx> r0bby: thanks
[11:35:56] <SaEeDIRHA> it seems there is a write and read
[11:36:08] <SaEeDIRHA> but i have no idea how to stop them :(
[11:38:42] <ssta> are you using a Player to get the data?
[11:40:44] <ssta> from a quick scan of the JMF api, looks like most things in it use a Controller (or subclass thereof), and Controller has a suspiciously handy looking deallocate() method which might be what you want?
[11:41:11] <ssta> umm, implementor of Controller. It's an interface, not a class. Sorry
[11:41:15] *** gdoko has joined ##java
[11:41:23] <SaEeDIRHA> no , processor
[11:41:32] <AMcBain> okay, I give in ... I'm obviously not getting this by myself, for whatever reason. The solution should just be biting me in the ass, but it's not. Anyways ... I have a variable range, where min < max, and you can set a value such that min <= value <= max ... That's easy. Now, I can have a variable number of "ticks" which split up the interval (the max and min count as ticks). I want it such that when someone enters a value, it is "rounded" to the nearest tick
[11:41:32] <AMcBain> . I've tried everything, and I came close with: Math.floor((min - max) / (ticks - 1)) * Math.round(value / (ticks - 1)) but it doesn't really work well enough.
[11:41:48] <ssta> Processor is a subinterface of Controller, so it has a deallocate() as well I would think
[11:41:51] *** romanb has joined ##java
[11:42:28] <AMcBain> by "well enough" I mean that it gets worse values toward the edges (works best toward the center, like all others I've managed to write ...)
[11:42:36] <AMcBain> s/values/results/
[11:43:00] <cybereal> AMcBain: whole numbers?
[11:43:29] <AMcBain> I'm assuming for the moment my range is from 0 to 100, but it could be specified that it is 0 to 1 ...
[11:43:30] <isr`> i have a member field private Collection<FieldInfo> parameters = new ArrayList<FieldInfo>();
[11:44:02] <isr`> and a method public Collection<FieldInfo> getParameters() that should return the parameters
[11:44:11] <isr`> but dont want to return a mutable object
[11:44:12] <selckin> "Although GUI applications have turned away from MVC in recent years", what are they moving too?
[11:44:17] *** cher has joined ##java
[11:44:19] <cybereal> AMcBain: well with whole numbers youc ould just subtract the modulus of the number of ticks from the selected number after checking that it's within range
[11:44:50] <isr`> oh nevermind
[11:44:53] <isr`> i was trying to use clone
[11:45:07] <isr`> i have to do something like return ArrayList<FieldInfo>(parameters) instead
[11:45:43] <SaEeDIRHA> exception when i tried to use delloactor : javax.media.ClockStartedError: deallocate cannot be used on a started controller.
[11:45:50] <cybereal> or modulus of the distance between ticks, I forget
[11:45:53] <AMcBain> cybereal: modulus of the number of ticks ... modulus of what? "x % ticks" what is the value of x? (min - max?)
[11:45:58] *** TooAngel has joined ##java
[11:46:13] <cybereal> x is the value, modulus the distance between ticks
[11:46:21] <cybereal> x - (x % tickDistance)
[11:46:25] <AMcBain> ah
[11:46:29] *** TooAngel has left ##java
[11:46:45] <ssta> double ticksize=(max-min)/ticks; double tmp=min; while(tmp<value) tmp+eticksize;
[11:46:46] <cybereal> you probably want to normalize x to be value selected minus the min, and add the result back to min, I think
[11:46:54] <ssta> works for doubles I guess
[11:46:58] <cybereal> loop? heh
[11:47:04] <ssta> would need a bit of tweaking if you wanted rounding up
[11:47:14] <AMcBain> ssta: I know I can loop, but that doesn't scale.
[11:47:18] <ssta> true
[11:48:00] <r0bby> i can't believe im still awake
[11:48:01] <AMcBain> cybereal: :o I completely forgot about the min there ... that's what I get for using a test range of 0-100
[11:48:46] *** zupaxx has quit IRC
[11:48:53] <cybereal> another option is to use a scale, where one tick is always 1.0 in your scale then multiple to find the real value, and any selected value can just be truncated to the whole number
[11:49:02] * cybereal supposes there's a number of ways to go about this
[11:50:45] <AMcBain> hmmm. okay, I'll try some stuff and see how it goe.s
[11:50:55] <tazle> AMcBain: let M be maximum, let m be minimum, let x be value, let l = M-m/N, where N is the number of subdivisions indexed with natural numbers from 0 onwards - index to snap to can be calculated as t = (x-m)/l, i = floor(t) + round(t-floor(t))
[11:51:04] <tazle> AMcBain: or rather just round(t)
[11:51:50] *** bas-i has quit IRC
[11:51:58] *** bas-i has joined ##java
[11:51:59] <AMcBain> is l (M-m)/N or M-(m/N) ?
[11:52:07] <tazle> AMcBain: i.e. you just calculate subdivision length and map x to subdivision space
[11:52:22] <tazle> AMcBain: eh right, (M-m)/N - I had written it like that originally
[11:52:30] <AMcBain> heh, okay
[11:53:00] *** SaEeDIRHA has quit IRC
[11:59:32] *** igordcard has joined ##java
[12:01:57] <AMcBain> wow ... that works. now I have to parse it (mentally) and figure it all out.
[12:02:01] <AMcBain> ~tazle++
[12:02:01] <javabot> tazle has a karma level of 26, AMcBain
[12:02:33] <AMcBain> (I took a slight detour to see if I had one last idea ... it was stupid. I did a proportion of value / range = x / ticks ... etc.)
[12:03:57] *** Copter has joined ##java
[12:04:52] *** giaco has joined ##java
[12:05:11] *** Styles_McFee has joined ##java
[12:10:40] *** Styles_McFee has left ##java
[12:10:47] <AMcBain> haha, nice. since my dragging sets the value via my external interface, I don't have to write the snapping code twice.
[12:11:42] <AMcBain> (or rather, I mean, extract it out to another point)
[12:14:56] *** dv_ has joined ##java
[12:21:16] *** Greyhound- has joined ##java
[12:22:40] *** DragonLord- has quit IRC
[12:24:05] *** gdoko has quit IRC
[12:26:44] *** asap18 has joined ##java
[12:29:14] *** asap18 has quit IRC
[12:31:53] *** assertsmart has quit IRC
[12:31:55] *** floating has joined ##java
[12:32:16] <floating> Hi. Im trying to run a java command from a batch file. I made a text file and put this line in: java -jar G:\workspacelinux\kanji\zoro\zorobot0.075f.jar
[12:32:31] <floating> it runs the command but in same second the cmd prompt window closes
[12:36:43] *** TheCastor has quit IRC
[12:37:59] *** bashoh has quit IRC
[12:39:48] *** Resistance has joined ##java
[12:40:40] *** ssta has left ##java
[12:42:52] *** steve-e has joined ##java
[12:54:53] *** Zvpun has joined ##java
[12:56:12] *** riotz has joined ##java
[12:56:59] *** vesz has joined ##java
[12:57:37] <Zvpun> I want a JTextArea spawning the window except for the bottom where there should be two buttons "OK" and "Abort". Is it possible to have more than one layout manager, in that case I would take a flow layout for the buttons?
[12:58:19] <Zvpun> http://www.tinyimage.de/result.php?ip=87.172.62.170&img_id=227172 (illustrates the layout I want)
[12:59:13] *** convivial has quit IRC
[12:59:17] <Zvpun> If "stacking" layout managers is not possible is BorderLayout right choice?
[12:59:40] <AMcBain> uh ... unless there's something special about that, what's wrong with JOptionPane? (non-modal)
[13:01:40] *** Spike1506 has joined ##java
[13:03:10] *** Levia has quit IRC
[13:06:04] *** pstickne has quit IRC
[13:06:22] *** notk0 has joined ##java
[13:07:02] *** Levia has joined ##java
[13:07:43] *** M[]ssad has joined ##java
[13:12:50] <ldamwork> Zvpun, usually you would use a border layout with center for main content and a new panel for buttons in the south. The southpane would be e.g. a flowlayout
[13:13:38] <ldamwork> If you just want one panel use a gridbag layout, but it is perfectly legal to use 'layout' only panels to make a larger layout
[13:15:43] *** riotz has quit IRC
[13:18:59] *** bsund has quit IRC
[13:18:59] *** mitch0 has quit IRC
[13:19:43] <Zvpun> ldamwork: thank you.
[13:20:35] <ldamwork> Zvpun, in fact it is usually easier to break down your layout into smaller panels which you embed in a larger layout.
[13:21:15] <Zvpun> ldamwork: I wanted to make sure that I got that right and one cannot stack layoutmanagers but uses JPanels to that end.
[13:22:12] <ldamwork> Zvpun, yes: one panel can contain only one layout manager; but you can then use each panel as a building block that embeds other panels with different layout managers
[13:30:39] *** mosno has joined ##java
[13:30:49] *** mosno has quit IRC
[13:31:40] <isr`> for clone() to be implemented in my classes, i have to override it right?
[13:32:05] <ernimril> ldamwork: I think it is normally easier to use just one layout (typically GridBagLayout). Using two, one for main content, one for button row, is doable, but for complex layout where you want alignment using several layout managers tend to look ugly
[13:32:24] <ernimril> ~~isr` clone
[13:32:24] <javabot> Making deep copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0410.html#making Cloning Objects: http://java.sun.com/developer/JDCTechTips/2001/tt0306.html#cloning Making defensive copies of objects: http://java.sun.com/developer/JDCTechTips/2001/tt0904.html#tip1 also see: http://mindprod.com/jgloss/clone.html
[13:32:47] <ernimril> isr`: yes, but using clone() is normally not a very good idea
[13:37:09] *** Bonix has joined ##java
[13:37:27] *** trustin has joined ##java
[13:38:27] *** woogley has joined ##java
[13:38:28] <ldamwork> ernimril, true; it all depends on what you want; but trying to squeze everything into one layout may be cumbersome especiallly in cases where combinations are obvious
[13:39:06] <ernimril> ldamwork: I normally work with a sketch first and then draw a grid on it and go for GBL, typically easy, even for large and complex layouts
[13:39:26] <isr`> ernimril: yeah i googled, i wrote a copy constructor instead
[13:39:32] *** notk0 has quit IRC
[13:39:43] <ldamwork> ernimril, :) My preferred LM is GBL; you can do anything with that :)
[13:40:02] <selckin> ~miglayout
[13:40:02] <javabot> selckin, miglayout is "The Java Layout Manager". See http://www.miglayout.com/
[13:40:05] <selckin> imo!
[13:41:45] <ldamwork> selckin, i tend to avoid too many dependencies, so i see no reason to switch to a 3rd party LM, when standard LM's never failed me
[13:42:17] <selckin> GBC just drive me up the wall
[13:42:58] <ldamwork> selckin, i sleep with GLB :)
[13:43:06] <ldamwork> hm GBL
[13:44:54] <AMcBain> yeah, well, beware ... so many people use it, it's probably a carrier.
[13:45:26] <ldamwork> hm :)
[13:45:26] <jottinger> morning
[13:45:46] *** jahid_ has quit IRC
[13:48:03] *** igordcard has quit IRC
[13:49:27] *** igordcard has joined ##java
[13:51:03] *** rdancer has joined ##java
[13:55:01] *** koukos_ has joined ##java
[13:55:10] *** garotosopa has joined ##java
[13:55:11] *** smoog has quit IRC
[13:55:48] <koukos_> hi all
[13:56:34] <koukos_> does anyone know if LinkedBlockingQueue is thread-safe ? It's in java.util.concurrent package
[13:56:54] <jottinger> if it's in javautil.concurrent, it's been designed for threadsafe operation as much as possible, yes
[13:57:22] *** Levia has quit IRC
[13:57:31] <koukos_> jottinger: thnx, I'm new to concurrency and wasn't sure ;-)
[13:57:39] <ernimril> koukos_: an object/class is not thread safe in itself, LBQ is designed so that it is safe to use one such instance over several threads
[13:57:41] <jottinger> new to java?
[13:58:34] *** beol has joined ##java
[13:58:40] <koukos_> ernimril: that's what I meant, thanks for clearing it out ;)
[13:58:50] <ernimril> koukos_: have you read jcip?
[13:58:51] <ernimril> ~jcip
[13:58:51] <javabot> ernimril, jcip is Java Concurrency In Practice, a book focused on implementing threaded and concurrent applications in Java. http://jcip.net/
[13:59:02] <jottinger> it's alwys amusing in a gentle way when hjava programmers are "new to concurrency" since Java uses so many threads
[13:59:15] <koukos_> jottinger: it's the first time I'm using thread
[13:59:16] <jottinger> bah, there's still a seed or something in my keyboard
[13:59:32] <jottinger> koukos_: sure... but java uses seven or eight threads when you start the JVM.
[14:00:04] <ernimril> koukos_: have you never pressed C-\ or Ctrl+Break to get a full thread stack dump on console?
[14:00:24] <koukos_> jottinger: I don't disagree, but still new to concurrency was ment to be new to using thread, synchronization, etc :P
[14:00:25] *** orgy` has joined ##java
[14:02:19] <ernimril> hmmmm, my modified hello world that just waits for a keypress has 13 threads...
[14:02:37] <ernimril> probably depends on the number of cpu cores you have
[14:03:10] <ernimril> I have several CompilerThread and GC task thread
[14:04:33] *** Afterlawl_ has joined ##java
[14:06:06] <jottinger> koukos_: I know :)
[14:06:19] <jottinger> That's why I said "amusing in a gentle way" -- it wasn't an insult to you
[14:07:51] *** Mavrik- has joined ##java
[14:08:59] *** Levia has joined ##java
[14:11:30] <Mavrik-> can anyone tell me why does this give me a ConcurrentModificationException: http://pastebin.ca/1337960 ?
[14:12:01] <ernimril> Mavrik-: you call .remove
[14:12:32] <Mavrik-> ernimril, but shouldn't .remove block the loop until the item is removed?
[14:12:56] <cybereal> you've misunderstood what the exception means
[14:13:09] <ernimril> Mavrik-: you call .remove at the same time as you are iterating over the list
[14:13:12] <cybereal> it's thrown by the Iterator's operations when you change the collection that the iterator came from
[14:13:19] <cybereal> then try to keep using the same iterator
[14:13:27] <ernimril> Mavrik-: use Iterator.remove (that means not using the for-each construct)
[14:13:49] <Mavrik-> oh, I see
[14:13:52] <ernimril> Mavrik-: or create a collection with the elements you want to remove and then call removeAll after the loop
[14:15:24] *** Afterlawl has quit IRC
[14:15:31] <ernimril> hmmm, why does sun release jdk7 builds with release notes that points to bugs that are not available?
[14:16:05] <Mavrik-> Okeh, fixed it. Thanks for help.
[14:18:14] *** riotz has joined ##java
[14:21:22] *** Goundy has joined ##java
[14:21:54] *** funktor has joined ##java
[14:23:02] *** vesz has quit IRC
[14:25:50] *** acuster is now known as avc_work
[14:26:13] *** ries has joined ##java
[14:26:58] *** Carnage\ has joined ##java
[14:27:17] *** bhz- has quit IRC
[14:35:02] <pem3v78> ernimril: because sun sucks
[14:35:46] *** TooAngel has joined ##java
[14:37:06] *** TooAngel has left ##java
[14:37:08] *** woogley has quit IRC
[14:39:56] *** adi112358 has joined ##java
[14:41:35] *** adi112358 has quit IRC
[14:42:22] *** Zvpun has left ##java
[14:42:55] *** musically_ut has quit IRC
[14:43:21] *** musically_ut has joined ##java
[14:43:31] *** pem3v78 has quit IRC
[14:44:37] *** cybereal has quit IRC
[14:46:30] *** McBainas has joined ##java
[14:47:13] *** Stef1 has joined ##java
[14:49:21] <Stef1> What is the use of a singleton when you can use static field/methods? ie Cache.getSingleInstance().getVal() and Cache.getVal() both having a private constructor?
[14:49:35] *** AMcBain has quit IRC
[14:49:38] *** McBainas is now known as AMcBain
[14:50:18] *** Zvpun has joined ##java
[14:50:18] <ernimril> ~~Stef1 singleton
[14:50:19] <javabot> In most cases singletons should be avoided, they often make non-trivial programs clunky and difficult to maintain. If you really are considering using a singleton, you should first read http://www.ibm.com/developerworks/library/co-single.html and http://www.ddj.com/cpp/184401625 before doing so to ensure using a singleton is absolutely, positively necessary.
[14:51:03] <Zvpun> new JLabel("an image", new ImaceIcon("foo.jpg")); how can I resize the image lets say to 0.5 height?
[14:51:17] *** aje has joined ##java
[14:51:21] <aje> hi there
[14:51:33] <ernimril> Zvpun: you can not do that with ImageIcon directly...
[14:51:39] <aje> i have trouble serializing a javax.mail.internet.MimeMessage to a jboss queue
[14:51:48] <aje> i just get: java.lang.RuntimeException: javax.mail.internet.MimeMessage at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
[14:51:58] <ernimril> Zvpun: load the image hold on to it and resize it and create a new ImageIcon when you need different sizes
[14:52:10] <aje> it should be serializable, right?
[14:52:24] *** LordMetroid has quit IRC
[14:52:27] <ernimril> aje: do you get a "Caused by: ..."?
[14:53:03] <aje> no
[14:53:45] *** jkriesten has quit IRC
[14:53:49] <ernimril> aje: are you sure? you really should get something more than just one line, consider pasting the _full_ stack trace to a pastebin
[14:54:13] <aje> just a sec.
[14:54:14] <isr`> ernimril: so this is bad? SourceModel.getInstance().addClassInfo(classInfo);
[14:54:26] <Zvpun> ernimril: what does hold on to it mean? do I have to call some member function of Image to do so?
[14:54:36] <isr`> thats called from within a subclass of AbstractProcessor
[14:54:37] <ernimril> isr`: I do not like singletons so yes, that is pretty bad
[14:54:40] *** barbarian-irc has joined ##java
[14:54:50] <barbarian-irc> hello
[14:54:50] *** Mavrik- has quit IRC
[14:54:52] <ernimril> Zvpun: just store a reference to it
[14:54:57] <aje> here it is: http://pastie.org/389717
[14:54:59] *** Mavrik- has joined ##java
[14:55:00] *** ATF3 has joined ##java
[14:55:01] <barbarian-irc> int a = 00332211;
[14:55:01] <isr`> hm, but then i have to keep a copy of a reference in several classes that dont actually use the reference.
[14:55:02] <barbarian-irc> System.out.println(a);
[14:55:05] <barbarian-irc> 111753
[14:55:10] <isr`> unnessesary aggregation.
[14:55:12] <isr`> i dunno
[14:55:31] *** bhz- has joined ##java
[14:55:49] <ernimril> barbarian-irc: yes, why do you find that odd? 00332211 is an _octal_ literal
[14:55:51] <barbarian-irc> int a = 00332211; System.out.println(a); // result: 111753
[14:56:02] <barbarian-irc> oh!
[14:56:12] *** TheCastor has joined ##java
[14:56:15] <ATF3> Someone said you shouldn't use == to compare string values, but as I see it only one object exists for any string value at any given time. Thoughts?
[14:56:30] <isr`> == compares the reference
[14:56:30] <letfunbegin> == compares identities
[14:56:40] <Stef1> == compares memory not the string value
[14:56:45] <ATF3> Yes but there is only 1 object with that value
[14:56:46] <isr`> identity, reference, i meant the same thing
[14:56:49] <ATF3> so they will be equal
[14:56:52] <letfunbegin> sure, agreed :)
[14:56:58] <Zvpun> ernimril: so I do: new JLabel("foo", new ImageIcon("foo.jpg").getImage().getScaledInstance(x,y,h), JLabel.CENTER);
[14:57:04] <ernimril> ATF3: if you create strings from things you read from file/network you will have several strings with same content
[14:57:18] <isr`> use someString.equals(someOtherString);
[14:57:26] <ATF3> hmm ok, they should have operator overloading like c#
[14:57:29] <ATF3> that's rediuclous
[14:57:35] <AMcBain> no, it's not.
[14:57:39] <aje> this is very odd :(
[14:57:48] <ernimril> ATF3: == and .equals do two very different things, operator overloading would not change that
[14:57:49] <Stef1> Zvpun: load an image scale it and display it on a frame, when you have that pass it to the JLabel
[14:57:50] *** factor has quit IRC
[14:57:51] <aje> ernimril: did you see the stacktrace?
[14:58:02] <ernimril> ATF3: if you prefer c# then go and use it
[14:58:05] <ATF3> yes it would because == would be used as equivalent
[14:58:08] <letfunbegin> it's common java practise to distinguish between values and pointers :)
[14:58:11] <ATF3> like it is in every other language
[14:58:26] <ernimril> aje: yes and it seems like someone has swallowed the root cause, that is too bad...
[14:58:29] *** bas-i has quit IRC
[14:58:34] <ernimril> aje: try a test case and see what you get
[14:58:45] <ernimril> aje: (just serialize such an entry to a file)
[14:59:49] *** Zvpun has quit IRC
[14:59:59] <isr`> ATF3: java isnt every other language.
[15:00:04] <ATF3> lol
[15:00:09] *** majyk has joined ##java
[15:00:14] <aje> hrmmm
[15:00:26] *** Frostix has joined ##java
[15:00:43] <ATF3> perl makes you use eq instead of == but at least you don't have to muddy the code with a function call
[15:00:57] <AMcBain> perl = line-noise
[15:01:02] <ATF3> hehe
[15:01:06] <_W_> yeah oh my god, a method call!
[15:01:14] <ernimril> ATF3: if you do not like java then go and use some other language. We are not sun, we do not influence the language development any more than you can do, go write your jsr
[15:01:17] <_W_> what's next, having to put all your functions in classes?
[15:01:27] <letfunbegin> lol
[15:01:34] <isr`> lol
[15:03:27] *** factor has joined ##java
[15:03:56] *** otep has joined ##java
[15:04:02] *** barbarian-irc has quit IRC
[15:04:17] <isr`> ernimril: so if i want to get rid of this singleton, i'd pass a reference to the constructor, but i am extending an AbstractProcessor
[15:04:22] <isr`> so how do i do the constructor?
[15:04:25] *** squiddle has quit IRC
[15:04:36] <isr`> SourceProcessor(SourceModel model) {
[15:04:37] <ernimril> isr`: I have no idea what you are trying to do
[15:04:53] <ernimril> isr`: I just told you that I do not like singletons
[15:04:54] *** L-----D has quit IRC
[15:05:07] <letfunbegin> I concur
[15:06:07] <isr`> in class SourceProcessor, I'd have a member field private SourceModel model; and a constructor like SourceProcessor(SourceModel model) { this.model = model; } but do i have to call the super class constructor or something
[15:06:39] <ernimril> isr`: all constructors starts with a call to the superclass constructor
[15:06:51] <isr`> oh alright, so i dont need to worry about it then
[15:06:52] <isr`> thanks
[15:07:07] <isr`> wait, is that an implicit call?
[15:07:35] *** avc_work is now known as acuster
[15:07:39] <ernimril> isr`: the compiler will add a "super()" if you do not start with some other "super(arg1, arg2, ...)" call, yes
[15:07:57] <letfunbegin> or this-call
[15:08:10] <ernimril> or that, yes
[15:08:13] *** musically_ut has quit IRC
[15:08:17] <isr`> cool
[15:13:38] <Stef1> you don't like singleton, but my question was why not use static methods instead of the getInstance() approuch?
[15:13:40] *** Goundy has quit IRC
[15:14:08] <Stef1> SingleTon.getVal() instaed of SingleTon.getInstance().getVal()
[15:14:09] <letfunbegin> it has the same disadvantages
[15:14:42] <selckin> http://www.youtube.com/watch?v=-FRm3VPhseI
[15:15:01] <ernimril> Stef1: when you make a static call you select the method at compile time, with a singleton call you can change the singleton at runtime, so you have more options with a singleton
[15:15:12] *** Daniel_H has joined ##java
[15:15:31] *** Goundy has joined ##java
[15:16:06] *** LordMetroid has joined ##Java
[15:16:32] <Stef1> I see
[15:18:37] *** TheCastor has quit IRC
[15:19:25] *** Frostix has quit IRC
[15:21:01] *** marvs has joined ##java
[15:22:01] *** majyk has quit IRC
[15:22:54] *** M[]ssad has quit IRC
[15:22:57] *** M[]ssad_ has joined ##java
[15:23:17] *** bas-i has joined ##java
[15:24:29] *** Goundy has quit IRC
[15:32:42] *** vesz has joined ##java
[15:34:23] *** magcius has joined ##java
[15:35:05] *** ankylose has joined ##java
[15:35:07] <ankylose> hi
[15:35:49] *** AlanasAnikonis has quit IRC
[15:37:57] *** frosch has quit IRC
[15:40:28] *** spuz has quit IRC
[15:40:35] *** spuz has joined ##java
[15:42:28] *** Varox has joined ##java
[15:44:29] *** koukos_ has left ##java
[15:46:49] *** ankylose has quit IRC
[15:49:18] *** genesiss has joined ##java
[15:51:02] <Stef1> ~anyone
[15:51:02] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[15:52:07] *** eradicus has joined ##java
[15:55:20] *** eradicus has quit IRC
[15:55:22] *** Stef1 has quit IRC
[15:55:31] *** smoog has joined ##java
[15:56:41] *** factor has quit IRC
[15:58:56] *** gdoko has joined ##java
[16:00:12] *** UK-sHaDoW has joined ##java
[16:02:44] *** dunmer has quit IRC
[16:03:05] *** clever has quit IRC
[16:03:42] *** bas-i has quit IRC
[16:05:22] *** abruptus has joined ##java
[16:05:32] *** Razec has joined ##java
[16:05:39] *** assertsmart has joined ##java
[16:06:38] *** Varox has quit IRC
[16:07:16] *** Varox has joined ##java
[16:07:16] *** rvvs89 has joined ##java
[16:07:23] <rvvs89> Hi there ##java
[16:08:42] <rvvs89> Can anyone recommend a good book for a beginner to Java?
[16:08:53] <ernimril> ~book
[16:08:53] <javabot> Download these two beginners' bibles free of charge: 1) Sun Java Tutorial at http://java.sun.com/docs/books/tutorial 2) Bruce Eckel's "Thinking in Java" at http://www.mindview.net/Books/TIJ
[16:08:55] *** bdbdbd has quit IRC
[16:09:09] <rvvs89> Thank you very much
[16:09:55] *** Ven]n has joined ##java
[16:10:05] <Ven]n> how to set space between JButtons? i cant really find it in the api
[16:10:15] <AMcBain> using what layout manager?
[16:10:23] <Ven]n> swing and borderlayout
[16:10:32] <ernimril> Ven]n: you do not, you let the layout manager handle it
[16:10:34] *** xxxxshame has joined ##java
[16:10:41] <ernimril> Ven]n: what constructors do you have for BorderLayout?
[16:11:06] <Ven]n> what do you mean?
[16:11:49] <ernimril> ~~Ven]n javadoc BorderLayout
[16:11:51] <javabot> Ven]n: http://is.gd/jB7R [java.awt.BorderLayout]
[16:11:55] <ernimril> Ven]n: what constructors do you have for BorderLayout?
[16:12:06] *** rvvs89 has left ##java
[16:12:19] *** clever has joined ##java
[16:12:20] *** xxxxshame has quit IRC
[16:12:38] *** deca has quit IRC
[16:13:31] <Ven]n> like mainPanel.setLayout(new BorderLayout()); ?
[16:13:38] *** xxxxshame has joined ##java
[16:13:52] *** Varox has quit IRC
[16:13:53] <ernimril> Ven]n: can you look in the api and check the constructors for BorderLayout?
[16:14:14] <ernimril> Ven]n: why ask questions when you do not bother to listen to the responses?
[16:14:18] <xxxxshame> hallo when I started netbeans I getted this exception > http://www.pastebin.sk/sk/11273/ . Where is the problem ?
[16:14:43] *** cybereal has joined ##java
[16:14:52] *** Varox has joined ##java
[16:15:08] <Ven]n> ernimril, im not following, thats all.. i dont think ive set constructors for BorderLayout :)
[16:15:31] <ernimril> Ven]n: ok, I give up, find someone else to try to help you
[16:15:39] <Ven]n> sorry
[16:15:53] <ernimril> xxxxshame: "java -version"? are you running sun java?
[16:16:17] <ernimril> xxxxshame: I would suggest #netbeans (or ##netbeans?) on whatever channel they are on
[16:16:24] *** morkar- has quit IRC
[16:17:06] <Ven]n> ernimril, but i reckon you were talking about public BorderLayout(int hgap, int vgap) ?
[16:17:22] <Ven]n> problem is i want the gap between just a part of my borderlayout
[16:17:37] <Ven]n> in one specific JPanel
[16:17:38] *** Inhuman has joined ##java
[16:18:53] *** drtroll has quit IRC
[16:19:36] *** Inhuman has quit IRC
[16:19:50] *** Inhuman has joined ##java
[16:20:13] *** SystemWizard has quit IRC
[16:22:41] *** _val_ has joined ##java
[16:23:50] *** magcius has quit IRC
[16:27:21] *** aTypical has joined ##java
[16:27:38] *** kane77 has quit IRC
[16:27:55] *** igordcard has quit IRC
[16:29:47] *** deca has joined ##java
[16:31:18] *** emzic has joined ##java
[16:31:18] *** assertsmart has quit IRC
[16:31:40] <emzic> hi, how can i convert a byte-array with 4 elements to an integer?
[16:31:57] <ernimril> emzic: what type of conversion do you want?
[16:32:09] *** M[]ssad_ is now known as M[]ssad
[16:32:27] <ernimril> emzic: "public int convertByteArryToInt(byte[] buf) { return 42; }" ?
[16:32:40] <emzic> ernimril: yeah, something like this
[16:32:55] <ernimril> emzic: you probably want ByteBuffer.wrap(byteArray).getInt()
[16:33:18] <ernimril> emzic: you realize that my "return 42;" will only give you 42 and nothing else
[16:33:32] <ernimril> emzic: what do the different bytes represent?
[16:34:09] <ernimril> emzic: what about endianess?
[16:34:28] <emzic> well, for example my 4-bytearray contains 26 0 0 0
[16:34:28] <emzic> then it should give me an integer with 26
[16:35:01] <ernimril> emzic: and if you have {0x12, 0x34, 0x56, 0x78} you get what?
[16:35:36] *** igordcard has joined ##java
[16:35:53] <emzic> ernimril: good question ;)
[16:36:32] <ernimril> emzic: it looks like you want to go with my ByteBuffer version, but you may have to check and/or set the endianess of it
[16:36:34] *** MichielH has quit IRC
[16:36:42] <emzic> it probably needs a shift by 256 times the position
[16:37:00] <emzic> ok, i will look into the bytebuffer wrap
[16:37:16] *** nor3 has quit IRC
[16:37:20] <xxxxshame> ernimril: version : 1.6
[16:37:32] *** FireSlash has joined ##java
[16:37:48] *** MichielH has joined ##java
[16:39:39] *** Absolute0 has joined ##java
[16:40:13] <Absolute0> I am trying to get a scrollable JTexArea, no matter what i try i get weird results. http://rafb.net/p/DleSFo63.html
[16:40:27] <Absolute0> setting the vertical horizontal policies doesnt help
[16:40:34] <Absolute0> and the scrollbars are non functional
[16:40:40] *** Johnny_vd_Laar has joined ##java
[16:41:02] <Absolute0> I tried using both JOptionPane.showMessageDialog and a plain JFrame with the textARea in it.
[16:41:08] <Absolute0> am i doing something wrong?
[16:47:54] *** elementz has joined ##java
[16:48:16] *** eidolon has left ##java
[16:49:46] <rullie> Absolute0: http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html ?
[16:49:51] *** s1kx has joined ##java
[16:50:00] *** Resistance has quit IRC
[16:50:31] <letfunbegin> Absolute0, it seems you don't actually add the JScrollPane to anything
[16:50:34] *** clever has quit IRC
[16:52:08] *** geaaru has joined ##java
[16:53:15] <geaaru> hi, is there a way to cancel property set for ssl.SocketFactory.provider to default value?
[16:53:59] *** scott_w has quit IRC
[16:54:37] <geaaru> coud be a valid solution instead of use Security.setProperty("ssl.SocketFactory.provider") create a new
[16:55:04] <geaaru> Provider class and call insertProviderAt(newProvider, 0)?
[16:55:10] *** genesiss has quit IRC
[16:55:57] <M[]ssad> guys, if anyone could use tim-quartz with Terracotta? If yes then could you provide a simple how-to somewhere?
[16:56:30] <Absolute0> letfunbegin: look at line 71
[16:56:41] <Absolute0> oh shit
[16:56:42] <Absolute0> :)
[16:56:53] <Absolute0> text area is returned//
[16:57:07] *** vesz has quit IRC
[16:57:30] *** ATF3 has quit IRC
[16:59:05] *** Tankado has joined ##java
[17:05:03] *** igordcard has quit IRC
[17:06:57] *** buntfalke has quit IRC
[17:07:02] *** waz has joined ##java
[17:07:18] *** gionny has joined ##java
[17:08:16] *** Vantaa has joined ##java
[17:08:31] *** bas-i has joined ##java
[17:08:37] *** _stack has quit IRC
[17:09:13] *** gdoko has quit IRC
[17:10:24] *** {g} has joined ##java
[17:10:29] <{g}> Hey People! What name would you give a class that handles various http related tasks. "Http" or "HTTP"?
[17:11:45] <ernimril> {g}: either, the one you are comfortable with, I think it looks too much like a constant if I use HTTPFoo or similar, so I use HttpFoo nowdays
[17:12:36] <{g}> foo? there is no foo. I want to name the class just Http.
[17:13:09] <AMcBain> He's making an example. You can extrapolate, right?
[17:13:40] <letfunbegin> I'd go with Http as well (in fact I did recently)
[17:15:02] *** emzic has quit IRC
[17:15:36] *** Goundy has joined ##java
[17:15:49] <{g}> I will use "Http".
[17:17:30] *** morkar- has joined ##java
[17:19:57] *** bas-i has quit IRC
[17:22:20] *** Bonix has quit IRC
[17:22:38] *** AlanasAnikonis has joined ##java
[17:23:17] *** aleksei has joined ##java
[17:24:05] *** clever has joined ##java
[17:24:39] *** abruptus has quit IRC
[17:25:14] *** Absolute0 has quit IRC
[17:26:06] *** steve-e has quit IRC
[17:26:13] *** Varox has quit IRC
[17:29:27] *** spuz has quit IRC
[17:31:54] *** EruditeHermit has joined ##java
[17:32:34] *** Goundy has quit IRC
[17:32:35] *** dv_ has quit IRC
[17:35:20] *** NevroPus has joined ##java
[17:35:51] *** epalm has joined ##java
[17:36:21] *** abruptus has joined ##java
[17:38:54] *** convivial has joined ##java
[17:45:30] *** magcius has joined ##java
[17:49:38] <gionny> is there a way to write an XML schema so that JAXB will generate a Map and not a List, please?
[17:49:55] *** aTypical has quit IRC
[17:50:10] <gionny> I am trying to search this on google, I found that there are some map concepts in xml schema, but I am not finding anything useful
[17:50:12] *** clever has quit IRC
[17:50:24] *** staar2 has quit IRC
[17:50:31] <gionny> it would be very nice if you could have maps generated by JAXB... very useful
[17:51:03] *** bas-i has joined ##java
[17:53:33] *** gdk has joined ##java
[17:53:47] *** deca has quit IRC
[17:55:43] *** geaaru has quit IRC
[17:55:48] *** Mavrik- has quit IRC
[17:57:10] *** DCPom has quit IRC
[17:58:08] *** Daniel_H has quit IRC
[17:58:45] *** josemoreira has joined ##java
[17:58:53] *** deca has joined ##java
[17:59:54] *** le_biloute has quit IRC
[18:00:43] *** clever has joined ##java
[18:02:00] *** Frostix has joined ##java
[18:05:32] *** Daniel_H has joined ##java
[18:06:27] *** toehio has joined ##java
[18:06:37] <pr3d4t0r> Goor modning.
[18:07:08] *** ankou has joined ##java
[18:07:31] <ankou> hi, how can I check if the program is running on windows?
[18:07:49] <_W_> open your task manager and look for the image name?
[18:07:56] <pr3d4t0r> ankou: Alt-Ctrl-Del, Task List
[18:08:19] <ernimril> ankou: you really can not, you can try to check the system properties and sniff the os.arch/os.name/os.version
[18:08:33] <ernimril> ankou: why do you want to do it?
[18:08:58] <ankou> because I would like to have another font on windows then on linux(or all other platforms)
[18:09:19] <ernimril> ankou: that sounds silly, why?
[18:09:27] *** aksn has joined ##java
[18:11:12] <ankou> because the default font which swing choses looks ugly on KDE it's big and ugly.
[18:12:25] *** drtroll has joined ##java
[18:12:28] <letfunbegin> this is fool-proof :) if ('\'==File.separatorChar) { //windows! }
[18:12:30] *** asap18 has joined ##java
[18:12:43] <gionny> I am trying to let JAXB generate code with HashMap instead of lists... I found this page but I don't understand how I have to do it: https://jaxb.dev.java.net/guide/Mapping_your_favorite_class.html
[18:12:55] <gionny> can please someone help me a little bit understanding this, please?
[18:13:07] <ernimril> letfunbegin: that is proof that you are a fool who does not know java, yes ;-)
[18:13:16] <letfunbegin> it was a joke yes :)
[18:13:16] <ernimril> letfunbegin: (compilation error that is)
[18:13:36] <ernimril> letfunbegin: '\\'
[18:13:55] <letfunbegin> oh that wasn't intended :) but you're right
[18:14:09] *** amz has joined ##java
[18:14:50] <gionny> \j #netbeans
[18:14:55] <gionny> ops, sorry
[18:15:08] <gionny> wrong slash
[18:16:30] *** xxxxshame has left ##java
[18:17:21] *** romanb has quit IRC
[18:21:11] *** durka42 has joined ##java
[18:25:06] *** dunmer has joined ##java
[18:25:27] *** AskHL has quit IRC
[18:25:52] *** jabalsad has joined ##java
[18:27:14] *** snikker has joined ##java
[18:28:31] *** TooAngel has joined ##java
[18:29:18] <snikker> how can i list all files in a ftp directory?
[18:29:40] <ernimril> snikker: what does that question have to do with java?
[18:30:25] <ernimril> snikker: there is no built in ftp library in java, there are a few of 3:rd partly libraries to handle ftp. I think apache-commons-net have one.
[18:30:32] *** sphenxes has quit IRC
[18:30:47] <pr3d4t0r> snikker: Mule has an FTP connector, I believe.
[18:31:21] *** igordcard has joined ##java
[18:32:15] <pr3d4t0r> snikker: So listing or viewing a file is a matter of doing something like: MuleClient client = new MuleClient(); String list = client.sendMessage(FTP_ENDPOINT, "ls", bSynchronous);
[18:32:55] <snikker> so with the java libraries i can only retrieves one file, but if i want list all files, i need a 3rd partly lib, that's right?
[18:34:15] <snikker> pr3d4t0r: ^
[18:35:49] *** phenom9600 has joined ##java
[18:38:23] *** teralaser has joined ##java
[18:39:59] *** epalm has quit IRC
[18:41:36] *** gdk has quit IRC
[18:42:23] *** KU0N has joined ##java
[18:42:26] *** TheCastor has joined ##java
[18:43:21] *** aksn has quit IRC
[18:44:01] <KU0N> hello
[18:44:03] <KU0N> I work on a project (that is already made in java), and I need to read mp3 files, mix them, and then stream them. Do you know any good library to decode mp3, and then, mix sound samples?
[18:44:20] <ernimril> ~jmf
[18:44:20] <javabot> ernimril, jmf is Java Media Framework. You can find more information at: http://java.sun.com/products/java-media/jmf/index.jsp
[18:44:42] <ernimril> KU0N: I do not use it, do not know if it good or bad, but it is probably what you want ^^^
[18:45:03] <KU0N> I'll have look into it, thanks
[18:46:44] <pr3d4t0r> snikker: I'm not sure.
[18:47:04] <pr3d4t0r> snikker: I believe the Mule FTP connector supports full FTP. You pass the command as a payload to the endpoint.
[18:48:02] <snikker> pr3d4t0r: ok i'll try it... thanks for support
[18:48:17] <pr3d4t0r> snikker: You may also need to pass user ID, password in the payload; maybe you'll have to create a composite payload object, something like: public class FTPCommandPayload { public String userName, password; public byte[] byPayload; } that you can send.
[18:49:00] <snikker> pr3d4t0r: ok, thanks again :)
[18:49:44] *** {g} has left ##java
[18:49:47] <pr3d4t0r> snikker: Or maybe you'll inject those in the payload as dependencies.
[18:50:37] <snikker> pr3d4t0r: ah, ok
[18:50:58] *** cyzie has quit IRC
[18:51:06] <pr3d4t0r> snikker: MuleMessage message = new MuleMessage(); message.setPayload("ls"); message.setAttribute("user", userName); message.setAttribute("password", password);
[18:51:26] <pr3d4t0r> snikker: client.send(FTP_ENDPOINT, message, bSynchronous);
[18:51:39] <snikker> pr3d4t0r: good, wery well
[18:53:20] *** toens has left ##java
[18:53:45] *** cyzie has joined ##java
[18:56:00] <pr3d4t0r> snikker: Hrm... ls would be an attribute, probably something like setAttribute("command", "ls"); with the payload being the path that you want listed.
[18:56:24] <pr3d4t0r> snikker: The MuleClient + FTP connector will tell you how to go about that much better than I can.
[18:56:36] *** peyman_t has joined ##java
[18:58:19] <snikker> pr3d4t0r: ok :)
[18:58:56] *** peyman_t has quit IRC
[19:00:26] *** Razec has quit IRC
[19:01:03] *** snikker has quit IRC
[19:01:25] *** toehio has quit IRC
[19:02:44] *** peyman_t has joined ##java
[19:05:11] *** serrghi has quit IRC
[19:07:01] *** ries has quit IRC
[19:08:18] *** ries has joined ##java
[19:08:27] *** TooAngel has quit IRC
[19:08:47] *** deepjoy has joined ##java
[19:09:41] *** TooAngel has joined ##java
[19:09:59] *** Varox has joined ##java
[19:10:08] *** serrghi has joined ##java
[19:10:53] *** MichielH has quit IRC
[19:11:13] *** MichielH has joined ##java
[19:11:25] *** bindaas has quit IRC
[19:13:17] *** ciaron has joined ##java
[19:13:39] *** vesz has joined ##java
[19:14:11] *** soa2ii has joined ##java
[19:14:54] <soa2ii> Hi there. How do you apply 3rd party applications to files secure? http://rafb.net/p/8AsKls71.html does not work. I think because of the too complicated filenames... or do you see an other error?
[19:14:58] *** factor has joined ##java
[19:16:06] *** yakman_ has joined ##java
[19:16:31] <ernimril> soa2ii: use the exec that takes an array of commands, instead of just one (that is split trivially on " ")
[19:16:53] <ernimril> soa2ii: you also need to add threads that read the process out and error streams
[19:17:07] <ernimril> soa2ii: and you want to have one thread that waits for the process to exit
[19:17:24] <yakman_> im seeing people use SelectorProvider.provider().openSelector(); instead of Selector.open(); is there any difference ?
[19:17:33] <soa2ii> ernimril: Hmm... so what shall I change about the exec-Command?
[19:17:43] <soa2ii> I'm sorry... I think I don#'t get you :S
[19:18:25] <ernimril> soa2ii: what part did you not understand?
[19:18:33] <ernimril> ~~soa2ii javadoc Runtime.exec(*)
[19:18:34] <javabot> soa2ii, too many results found. Please see your private messages for results
[19:20:05] *** josemoreira has quit IRC
[19:20:19] *** josemoreira has joined ##java
[19:20:55] <soa2ii> ernimril: So why shall I use exec(String[])?
[19:21:13] <ernimril> soa2ii: that will handle file names with blanks in them, yes
[19:21:21] *** pstickne has joined ##java
[19:21:24] *** bitshuffler has quit IRC
[19:21:30] <ernimril> soa2ii: you need to add other changes as well if you want your program to really work
[19:23:50] <soa2ii> ernimril: Sorry... I got no idea what's wrong with my code... Do you have examples where one could learn how to usw exec correctly?
[19:24:07] *** notk0 has joined ##java
[19:24:24] <soa2ii> I thought fileList.append("\"" + f.getAbsolutePath() + "\"" + " "); would kill the blank-problems.
[19:26:08] *** chameloid has joined ##java
[19:26:42] <ernimril> soa2ii: it will not
[19:26:56] <notk0> hey huys
[19:26:58] <ernimril> soa2ii: as I said, Runtime.exec(String) does trivial split on blanks
[19:26:59] <notk0> guys*
[19:27:02] <notk0> what program shall i do?
[19:27:10] <ernimril> soa2ii: it calls the exec(String[]) internally
[19:27:24] <soa2ii> ernimril: OK. Shall I use ProcessBuilder instead?
[19:27:43] <ernimril> soa2ii: why do you think that would change anything?
[19:28:03] <notk0> anybody?
[19:28:06] <soa2ii> Don't know. Just found out the ProcessBuilder replaces Runtinme.exec.
[19:28:06] <ernimril> soa2ii: you have a command, what is hard about creating the String[] that has the parts you want?
[19:28:20] *** TooAngel has left ##java
[19:28:27] <soa2ii> ernimril: So you mean smth like
[19:28:44] <soa2ii> cmd = {"metaflac", "file1", "file2"}; or what?
[19:28:54] <ernimril> soa2ii: yes, something like that
[19:29:19] <soa2ii> OK.
[19:29:43] <ernimril> soa2ii: start with fixing this then you can do the other parts later on
[19:29:53] *** Bonix has joined ##java
[19:31:53] <soa2ii> ernimril: http://rafb.net/p/uYxpxN20.html
[19:31:59] <soa2ii> You mena smth like that?
[19:32:29] *** FuZion755 has joined ##java
[19:32:31] *** AskHL has joined ##java
[19:32:57] <ernimril> soa2ii: you need to split the command as well so start with "metaflag", "--add-seekpoint...", "--add-replay...."
[19:33:16] <soa2ii> That's weird... but ok.
[19:33:26] <ernimril> soa2ii: why is it weird?
[19:33:50] *** MichielH has quit IRC
[19:33:54] <soa2ii> ernimril: Because it belongs together :P But OK ;)
[19:34:13] <soa2ii> ernimril: http://rafb.net/p/yyJhRY25.html
[19:34:16] <soa2ii> So that's fine?
[19:34:19] *** KU0N has quit IRC
[19:34:34] *** Goundy has joined ##java
[19:34:45] <ernimril> soa2ii: what happen when you try it?
[19:35:04] <FuZion755> Hey can someone please assist me with this JNLP file: http://pastebin.com/d28159b99 I get this error when I validate it cvc-elt.1: Cannot find the declaration of element 'jnlp'. [2]
[19:35:05] <soa2ii> Let's find out.
[19:36:24] <soa2ii> Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
[19:36:25] <soa2ii> (:
[19:37:24] <ernimril> soa2ii: that is a very different problem...
[19:37:39] <ernimril> soa2ii: why are you using Vector? (normally nowdays you use List/ArrayList)
[19:37:52] <ernimril> soa2ii: what is the return value of List.toArray()?
[19:39:16] <notk0> guys i dont know/have any programming ideas
[19:39:18] <notk0> what to do?
[19:39:20] <notk0> help?
[19:39:33] <ernimril> notk0: go out, meet some friends
[19:39:53] <ernimril> notk0oh, sorry, this is irc, you obviously do not have any friends ;-)
[19:40:08] <notk0> hm
[19:40:11] <soa2ii> ernimril: Hm. So ArrayList.toArray is Object[] too but there is smth with T[] but I don't know what to do with this.
[19:40:13] <notk0> what that has to do with java programs?
[19:40:26] <pstickne> everything!
[19:40:31] <soa2ii> notk0: If you want some cool stuff. Timetable problem.
[19:40:32] <ernimril> soa2ii: do you know generics?
[19:40:39] <ernimril> ~~soa2ii generics
[19:40:39] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics
[19:40:40] <soa2ii> ernimril: Yeah... but not that kind.
[19:40:47] *** dv_ has joined ##java
[19:40:52] <notk0> soa2ii : I don't seem to understand that sorry?
[19:40:53] <soa2ii> Vector<String> is used to me...
[19:41:16] <soa2ii> notk0: Generating a timetable for a school with givenconstraints.
[19:41:41] <ernimril> soa2ii: how do the declaration of Vector (or List) look?
[19:41:49] <soa2ii> Like "All classes need to have sports at the same time" "teacher x does not like wednesday morning" and so on.
[19:41:56] <pstickne> Uhg... people still use Vectors? :(
[19:41:56] <soa2ii> ernimril: mom
[19:41:56] <notk0> soa2ii I already got it on paper the timetable
[19:42:29] <soa2ii> notk0: I don'T think for a whole school... you should GENERATE the timetable... not put it on papre
[19:42:38] <soa2ii> ernimril: rrayList<String> cmd2 = new ArrayList<String>();
[19:42:39] <pstickne> soa2ii: that's not a time-time, just a satisfaction-constraint/fol problem.
[19:42:47] <notk0> soa2ii the timetable isn't generated? it's made by people?
[19:42:48] <pstickne> s/time-time/time-table problem/
[19:42:53] <ernimril> notk0: typical beginner projects: irc client, text editor, graphical calculator, sudoku solver
[19:43:08] <pstickne> ernimril: gotta have irb client/bot first ;-)
[19:43:17] <ernimril> soa2ii: not what I wanted... What does the "<String>" part indicate?
[19:43:17] <pstickne> *irc
[19:43:19] <notk0> ernimril : i see
[19:43:31] <notk0> ernimril anything else?
[19:43:34] <soa2ii> ernimril: That this is an ArrayList of Strings (:
[19:43:51] *** aksn has joined ##java
[19:43:59] <ernimril> soa2ii: if you look in the javadoc for ArrayList, what does it say? "public class Arr..." ?
[19:44:10] <ernimril> ~~soa2ii javadoc ArrayList
[19:44:11] <javabot> soa2ii: http://is.gd/iA8x [java.util.ArrayList]
[19:45:36] <soa2ii> ernimril: You mean this here? ArrayList(Collection<? extends E> c)
[19:45:58] <soa2ii> pstickne: What's so bad about Vector? Shall I just use LinkedList? Or what?
[19:46:00] <ernimril> soa2ii: no, there is no "public class ..." in that line
[19:46:17] <ernimril> soa2ii: in all normal cases you use List/ArrayList nowdays
[19:46:29] <soa2ii> but why?
[19:46:30] <soa2ii> public class ArrayList<E>
[19:46:31] <soa2ii> ?
[19:46:39] <pstickne> soa2ii: Vector is really dated and is synchronized. Use one of the newer Collection classes unless you have a good reason not to.
[19:46:49] <pstickne> soa2ii: it's also a really crappy name.
[19:47:09] <ernimril> soa2ii: yes, but you said you had an "ArrayList<String>" where is the E? (if you think this question is silly, then good)
[19:47:21] *** FuZion755 has left ##java
[19:47:28] <soa2ii> ?? String?
[19:47:36] <soa2ii> I think I don't get you.
[19:48:30] <ernimril> soa2ii: E does not exist until you start to use it and bind it to some class, say "String"
[19:48:43] <soa2ii> yeah
[19:48:46] *** yakman_ has left ##java
[19:48:48] <ernimril> soa2ii: it is the generic type parameter
[19:49:35] <ernimril> soa2ii: if you have a method that talks about a T[] then it is the same, you have to bind that T to whatever you want (and the compiler may not always like what you are trying to do)
[19:49:57] <ernimril> soa2ii: with the method "toArray(T[])" you have to bind the T
[19:50:25] <ernimril> soa2ii: (since T is not bound by the class type parameters, only E for List)
[19:50:58] <ernimril> soa2ii: so how do you call the toArray if you want to get a String[] back?
[19:51:07] <soa2ii> ernimril: Thank you really much for your help but I just got a telephone call... got to go... Maybe we can go on later? (:
[19:51:23] <soa2ii> ernimril: I just thought about.
[19:51:33] <soa2ii> toArray(String) but that seems to be weird :P
[19:54:19] *** The_Birdman has joined ##java
[19:55:28] *** soa2ii has quit IRC
[19:58:33] *** epalm has joined ##java
[19:59:12] *** unop has joined ##java
[20:01:33] *** gdoko has joined ##java
[20:02:32] *** buntfalke has joined ##java
[20:02:35] *** Resistance has joined ##java
[20:03:52] *** Frostix has quit IRC
[20:04:42] *** FuZion755 has joined ##java
[20:04:47] *** elrob has quit IRC
[20:04:52] *** elrob has joined ##java
[20:05:22] <unop> how would I troubleshoot a runtime error loading the com.mysql.jdbc.Driver ?? I've set the CLASSPATH, made sure the mysql-connector.jar file is installed but I still can't seem to get it working
[20:06:49] *** ciaron has quit IRC
[20:08:31] *** mele- has joined ##java
[20:08:48] <dangertools> unop: you shouldn't use $CLASSPATH but -cp/-classpath
[20:09:14] <unop> dangertools, i've used -classpath too but to no avail
[20:09:36] *** adi112358 has joined ##java
[20:09:38] *** bas-i has quit IRC
[20:09:42] <unop> dangertools, thing is the code compiles fine .. but i catch a ClassNotFoundException at runtime
[20:10:02] <dangertools> unop: you are not running a jar using -jar, right?
[20:10:17] <unop> dangertools, right, i'm not doing that.
[20:10:40] <dangertools> good, wouldn't work. show the command you are using
[20:11:17] <unop> dangertools, this is the code http://pastebin.com/d7384f .. commands are simply. javac StudentsSelect.java && java StudentsSelect
[20:12:01] <unop> dangertools, the result for this code is. Error loading driver: com.mysql.jdbc.Driver
[20:14:22] *** garotosopa has quit IRC
[20:14:25] <dangertools> what happens when you do 'java -cp .:mysql.jar StudentSelect'
[20:15:18] <unop> dangertools, is that assuming mysql.jar is in the current directory?
[20:15:23] *** garotosopa has joined ##java
[20:16:30] <dangertools> sure
[20:16:42] *** Inhuman has quit IRC
[20:16:44] <dangertools> fix the path/name if it is somewhere else
[20:16:56] <unop> dangertools, ok. i've changed that to java -cp .:/usr/share/java/mysql-connector-java-5.1.6.jar StudentsSelect # and it connect alright
[20:17:17] <dangertools> so? you said that doesn't work
[20:17:21] <unop> dangertools, but i'd like to have this resolved automatically, do you know what i should do
[20:17:22] <unop> ?
[20:18:01] <unop> dangertools, it doesn't work if i doesn't specify the path to the jar :)
[20:18:14] <dangertools> ship your dependencies with your application
[20:18:22] <dangertools> btw, you should use packages
[20:19:22] <unop> dangertools, errm. all this is is a simple assignment for university
[20:19:48] <dangertools> doesn't matter
[20:19:59] *** epalm has quit IRC
[20:20:11] <unop> dangertools, ok then. where can i read up on packages?
[20:20:42] <dangertools> ~packages
[20:20:42] <javabot> please see http://java.sun.com/tutorial/java/interpack/packages.html and some examples http://javafaq.mine.nu/lookup?254
[20:20:51] <unop> dangertools, many thanks
[20:21:08] *** bas-i has joined ##java
[20:21:22] <dangertools> np
[20:22:00] *** ciaron has joined ##java
[20:23:38] *** i-bas has joined ##java
[20:24:34] *** elementz has quit IRC
[20:24:35] *** notk0 has quit IRC
[20:25:37] <FuZion755> I'm attempting to get a program running with the Java Web Start Technology. It is a swing application that runs without the java web start, however, when I try to load the JNLP file, it downloads everything, and then nothing happens, my form does not show, and no exceptions are thrown(as far as I can tell). I'm completely at a loss, what information would be helpful for you guys?
[20:26:02] *** dnmo has joined ##java
[20:28:59] <ernimril> FuZion755: what happen when you run javaws from console?
[20:31:13] *** asap18 has quit IRC
[20:32:10] *** elbeardmorez has quit IRC
[20:33:00] <FuZion755> one moment
[20:34:58] <FuZion755> ernimril: the java starting... window comes up, it downloads my program, and everything disappears
[20:36:03] *** grnman has left ##java
[20:36:27] *** drtroll has quit IRC
[20:37:15] *** Thamster has quit IRC
[20:37:32] *** dv_ has quit IRC
[20:37:34] *** [[thufir]] has joined ##java
[20:38:00] *** bas-i has quit IRC
[20:38:31] <M[]ssad> guys, if anyone uses tim-quartz with Terracotta? could you provide a simple how-to somewhere? i'm interested in jobs load-balancing but don't know how to achieve it and didn't find appropriate documentation.
[20:38:37] *** ridoo has quit IRC
[20:38:42] <FuZion755> ernimril: could java be chaching an older version?
[20:39:03] <ernimril> FuZion755: what do you see in the console when you run javaws?
[20:39:28] <ernimril> FuZion755: if your program really crashes you should see things in the console
[20:39:45] *** i-bas has quit IRC
[20:40:13] <FuZion755> ernimril: nothing at all
[20:40:37] <FuZion755> ernimril: so if its not crashing, why in the world would the GUI not show when I deploy as a JNLP
[20:41:03] <FuZion755> http://pastebin.com/m2859256f
[20:41:27] <ernimril> FuZion755: that is not enough information
[20:41:36] *** ries has quit IRC
[20:41:39] <FuZion755> ernimril: what else will help?
[20:42:00] <ernimril> FuZion755: why are you loading mysql.jar?
[20:42:13] <ernimril> FuZion755: you realize that webstart applications run inside a sandbox?
[20:42:28] <ernimril> FuZion755: you realize that you do not want to open your database to the whole world?
[20:42:33] <ernimril> s/world/internet/
[20:43:03] <FuZion755> ernimril: I know, this is only distributed to a few people, now what do you mean by a sandbox?
[20:43:23] <FuZion755> I'm loading mysql because the application inserts some info into it
[20:44:13] <ernimril> FuZion755: webstart applications runs inside a sandbox similar to the applet sandbox. Such applications/applets can not open sockets/read files/... as they want, they have to follow the security manager
[20:44:50] <FuZion755> ernimril: Ah yes ok I'm aware of that, but is it not true that they can make connections to the server from which they're downloaded
[20:44:53] <ernimril> FuZion755: trying to open a database connection would very likely lead to a security violation and then your app may die, but you should see that dying on the console
[20:45:27] <FuZion755> see the thing is there is nothing but a blank line after it
[20:46:17] <ernimril> FuZion755: is the java process alive?
[20:46:29] <ernimril> FuZion755: how does your code handle errors/exceptions?
[20:46:35] *** garotosopa has quit IRC
[20:47:21] *** Goundy has quit IRC
[20:47:46] <FuZion755> ernimril: I have about fifteen javaw.exe running, are those my attempts to run this program
[20:47:59] <ernimril> FuZion755: I would guess so
[20:48:12] <ernimril> FuZion755: so it looks like your program swallows exceptions
[20:49:50] <FuZion755> ernimril: Are you talking exceptions in general? Or for specific JNLP oens
[20:49:51] <FuZion755> ones
[20:50:01] *** twolf has quit IRC
[20:50:05] *** TryNiX has joined ##java
[20:50:15] *** _stack has joined ##java
[20:50:38] *** scorchsaber has quit IRC
[20:50:58] *** twolf has joined ##java
[20:52:49] *** scorchsaber has joined ##java
[20:54:55] *** FuZion755 has left ##java
[20:57:52] <gionny> after 3 hours of study, I finally understood how to do a thing with JAXB, but it is not supported right now
[20:57:58] <gionny> this is the issue: https://jaxb.dev.java.net/issues/show_bug.cgi?id=209
[20:58:33] <gionny> does anybody know if there is a workaround for this, please? I don't know, maybe write a custom binding file for JAXB and set there the binding will work, instead of writing it in the XML schema?
[20:58:50] *** acuster has quit IRC
[20:59:11] <ernimril> gionny: I do not think that many people use jaxb
[20:59:20] <ernimril> gionny: personally I do not like xml much
[20:59:29] *** juc0 has quit IRC
[20:59:45] *** garotosopa has joined ##java
[20:59:53] <gionny> ernimril: I understand you perfectly! I was trying to do things with JAXB here now at home to learn something...
[21:00:22] <gionny> ernimril: I don't know if it is the same for you, but when I try these things I usually spend a lot of time to understand a thing, reading a lot of unuseful stuff...
[21:00:44] <gionny> and after hours I realize that it was a very simple thing that I could have learn in 5 mins with a good tutorial
[21:01:02] <gionny> and sometimes, like now, I find that what I want to do is not supported.
[21:01:13] <gionny> it makes me angry! lol
[21:01:17] <ernimril> gionny: I just wanted to say that I do not think you will get an answer from this channel, I may be wrong, but I do not think so. Mailing lists, google and forums may be other options, but not sure how useful they will be
[21:01:41] <gionny> ernimril: ok, thanks
[21:02:20] <ernimril> gionny: downloading the source for jaxb and fixing it and then submitting a patch may be an option as well
[21:02:28] <karstensrage> if what you want to do is not supported maybe you should change what you want to do?
[21:03:15] <gionny> ernimril: yeah, it could... but it would take too much time that I am not sure to have... with work and all other things
[21:03:21] <gionny> anyways I can try it
[21:03:59] <gionny> karstensrage: there is another way of doing it, but I should write my code by hands and not let it autogenerate
[21:04:08] <gionny> so I will loose all the scope of JAXB, I guess
[21:04:37] <karstensrage> if you annotate your domain classes and let jaxb handle it that way you cant get what you want?
[21:04:49] <karstensrage> even with adapters?
[21:04:53] <gionny> karstensrage: I try to explain my problem
[21:05:13] <gionny> I want to bind an XML to java classes and I want a Map instead of a List
[21:05:24] <gionny> I tried doing this with my adapters...
[21:06:01] <gionny> karstensrage: but then I have to say in the xml schema to use my adapter for my complexType that defines a map, and that doesn't work
[21:06:01] <karstensrage> that should be trivially easy, in your adapter, iterate over the map and out put a list
[21:06:12] <gionny> karstensrage: it's not difficult to write an adapter
[21:06:32] <gionny> karstensrage: it's just that JAXB doesn't support the javaType definition of adapter for complexTypes
[21:06:36] <gionny> it just does not work
[21:06:41] <gionny> I don't know if there is an alternative...
[21:06:53] <karstensrage> use annotations rather than schema, its more intuitive and its zero degrees of separation from your domain classes
[21:07:21] <karstensrage> http://java.sun.com/javaee/5/docs/api/javax/xml/bind/annotation/package-summary.html
[21:07:29] <gionny> karstensrage: but then I have to write the classes
[21:07:39] <karstensrage> c'est la vie :)
[21:07:52] *** cmccormick has joined ##java
[21:08:03] <gionny> karstensrage: what I wanted to achieve is to just create an XML schema and let jabx autogenerate classes from it... then just write the adapter for hashmap
[21:08:07] <cybereal> gionny: f*ck jaxb, go look at castor instead
[21:08:48] <gionny> cybereal: is Castor better? but JAXB is included in Java 6, that's why I was trying to use it
[21:09:03] <cybereal> castor's vastly more flexible
[21:09:22] <gionny> I am feeling like I lost 3 hours of my life with this shit
[21:09:24] <gionny> lol
[21:09:36] <gionny> 3 hours to understand a simple thing and then it's not supported
[21:09:49] <cybereal> so... what?
[21:09:55] <cybereal> no use crying over it, if it doesn't work
[21:10:03] <gionny> cybereal: you're right :P
[21:10:03] <cybereal> may as well start looking at other tools heh
[21:11:07] <gionny> cybereal: I go and see what this Castor offers, thanks
[21:15:24] <ldamwork> http://bash.org/?10626
[22:15:50] *** echelog has joined ##java
[22:16:31] *** Akuma has quit IRC
[22:17:19] *** jabalsad has joined ##java
[22:18:32] *** TooAngel has joined ##java
[22:19:10] <cher> ernimril: I make that decision for trunk/. When I copy trunk/ to branches/version I will checkin the libs for keeping at least release branches reproducable. I think in the end for the past that is more important than keeping trunk/ buildable.
[22:19:13] *** mistik1 has quit IRC
[22:19:14] *** mistik1_ is now known as mistik1
[22:20:22] <cybereal> cher: i don't know about ivy but at least with maven it's pretty trivial to get a repository proxy setup which you could set up on a machine that is backed up regularly and that's pretty much as "safe" as your storing of deps in the vcs. Just set it up to keep all the downloaded versions in case you need to roll back or whatever. Also helps guard against internet problems (which I personally ran into one day where apache's dns serv
[22:20:41] <cher> Woah ivy looks much more complex than what I was looking for. But it looks useful.
[22:21:08] <cher> the solution that I look for shall be able to download .jars from downloads.sourceforge.net.
[22:22:32] *** Spike1506 has quit IRC
[22:24:08] *** Tankado has quit IRC
[22:24:22] *** TooAngel has quit IRC
[22:24:38] *** TooAngel has joined ##java
[22:25:08] *** Pred2k5 has joined ##java
[22:25:34] <Pred2k5> hi, can you only instantiate interfaces as anonymous classes?
[22:25:48] <cybereal> you can't instantiate them at all
[22:26:05] <ernimril> Pred2k5: you can only instantiate classes
[22:26:09] <cybereal> an anonymous class isn't an instantiation of an interface, you're just making an anonymous class tha timplements one
[22:26:13] <Pred2k5> but an actionlistener is an itnerface
[22:26:16] <Pred2k5> why can you instantiate it?
[22:26:20] <cybereal> you can't
[22:26:22] <cybereal> you're not
[22:26:36] <cybereal> you're making an *ANONYMOUS CLASS* that implements it, and instantiating it all at once
[22:26:42] <Pred2k5> ah ok
[22:27:13] <svm_invictvs> A class implementing an interface is still an instance of that interface.
[22:27:34] <cybereal> no it isn't
[22:28:14] *** TooAngel has left ##java
[22:28:19] <svm_invictvs> cybereal: foo instanceof Runnable?
[22:28:29] <cybereal> svm_invictvs: don't get confused by that operator
[22:28:46] <cybereal> it's really checking for type compatibility, not the actual type of the lhs
[22:29:21] *** ramdam has quit IRC
[22:29:46] <cybereal> an instance is just one class, but that class's definition may be in part defined by other classes and interfaces
[22:29:51] <r0bby> ew. mixing Hot Tomales and reeses pieces is...interesting
[22:30:26] *** linduxed has quit IRC
[22:30:29] <cher> The unprecise saying "instance of an Interface" is just a short saying for the precise "instance of a class that implements that interface". You could call it direct instance (only 1 for any object), and indirect instance (including all superclasses and interfaces).
[22:30:30] *** linduxed has joined ##java
[22:30:57] *** mengu has joined ##java
[22:31:04] <svm_invictvs> Hm..
[22:31:12] *** Ricket has joined ##java
[22:31:17] <r0bby> cher: do you believe in life after love?
[22:31:18] * r0bby ducks
[22:31:24] <svm_invictvs> An interface is its own type weather or not it can stand on its own.
[22:31:26] *** t0h has joined ##java
[22:31:56] <svm_invictvs> I'm gonna go back to watching CSI
[22:32:00] *** delskorch has joined ##java
[22:32:20] <cher> r0bby: It doesn't get newer by repeating every month, but some comedians believe in humour by repitition, and some jokes implementing that concept are really successful. So keep trying! :-D
[22:32:37] <r0bby> cher: I didn't hear the joke in here
[22:32:44] <r0bby> therefore, I win :-)
[22:32:49] <svm_invictvs> cybereal: you win, I don't wanna argue.
[22:32:52] <cher> r0bby: Okay, you won ;-)
[22:33:01] <r0bby> damn straight
[22:33:10] *** svm_invictvs is now known as svm_absvm
[22:33:52] <svm_absvm> hehe
[22:33:59] <svm_absvm> ~away
[22:33:59] <javabot> We don't care if you're afk, having a shower or doing your wife. If we really want to know, we'll /whois you. So please disable any public messages your client sends when you go /away or come back.
[22:34:02] *** inktri has joined ##java
[22:34:16] <cheeser> ~ridicule r0bby
[22:34:17] <javabot> points at r0bby and laughs
[22:34:27] *** svm_absvm is now known as svm_invictvs
[22:34:28] <svm_invictvs> ugh
[22:34:42] <svm_invictvs> Why are we ridiculing r0bby?
[22:35:37] <cher> r0bby: You really won. Must have been on another channel. Sorry ;-)
[22:35:49] <r0bby> yeh i know.
[22:36:01] <r0bby> having the nick like that you're asking for it
[22:36:09] <svm_invictvs> yeah...
[22:36:14] <cheeser> svm_invictvs: do we really need any extra reasons at this point?
[22:36:21] <svm_invictvs> What was written on the tree that Sunny Bono hit?
[22:36:53] <svm_invictvs> "I got you, babe."
[22:37:01] <inktri> i'm trying to get java to max out my cores (i7, 8 cores with hyperthreading, linux). what's wrong with my simple Threads program? http://pastebin.com/m35728e8f
[22:37:42] <svm_invictvs> you probably want more threads than processors...
[22:37:56] <cybereal> inktri: I'm about to pastebin a very short piece of java code that will max out your cpu (if java is allowed to do so based on your OS's rules, etc.)
[22:38:00] <ernimril> inktri: you realize that writing to console is very slow?
[22:38:13] * cybereal pasted http://pastie.textmate.org/private/gx0hzjlrmvtwywt46p1qw
[22:38:14] *** Dzarg has joined ##java
[22:38:24] <inktri> ok that was it :)
[22:38:27] <cybereal> inktri: you'll need to watch top or similar to see the results
[22:38:39] <inktri> removed print and it maxes
[22:38:40] <inktri> thanks
[22:38:42] *** garotosopa has quit IRC
[22:38:46] <cher> inktri: I guess that System.out is a resource that somehow needs synchronization, so in the end, 7 of your threads will be waiting for the 8th one.
[22:38:57] <cybereal> cher: it's not synchronized, it's just slow
[22:39:54] <cybereal> anyway my no-main-method version is more fun :)
[22:39:58] *** bas-i has quit IRC
[22:39:58] <svm_invictvs> It still blocks.
[22:40:12] <svm_invictvs> and when it blocks the OS will likely give up that thread's time slice.
[22:40:18] *** Yustme has quit IRC
[22:43:01] *** aceofspades19 has quit IRC
[22:43:07] <cher> cybereal: Is it intentional that you start 1 thread less than available processors?
[22:43:58] <svm_invictvs> hm...
[22:44:19] <svm_invictvs> I'd still start one moer than available processors if any of them have to make a blocking call.
[22:45:26] *** pierrep has quit IRC
[22:45:55] <cher> svm_invictvs: I agree. Or to be more general: I'd decide that depending on the nature of the threads. I've written an ant task that performs xslt in parallel, and at least for me it is fastest if I start twice as many threads as Java reports available processors.
[22:46:12] *** inktri has left ##java
[22:46:51] *** _stack has quit IRC
[22:47:31] *** _stack has joined ##java
[22:48:04] *** sebr has joined ##java
[22:50:02] *** pem3v78 has joined ##java
[22:51:00] *** Vantaa has quit IRC
[22:51:18] *** push[EAX] has joined ##java
[22:51:27] *** Ricket has quit IRC
[22:51:46] <push[EAX]> I have a silly question....is it possible to make the System.beep() make different tones ?
[22:52:05] <svm_invictvs> Somehow, not portably, though.
[22:52:19] <push[EAX]> Toolkit.getDefaultToolkit().beep()
[22:52:25] <push[EAX]> sry
[22:52:33] <svm_invictvs> I think it's printing \a to the terminal
[22:52:49] <push[EAX]> ah
[22:52:52] <push[EAX]> danm
[22:52:54] <push[EAX]> damn
[22:53:01] *** UK-sHaDoW has quit IRC
[22:53:08] <push[EAX]> I have an embedded app that beeps
[22:53:13] <svm_invictvs> embedded?
[22:53:16] <push[EAX]> but i want 2 beep tone without having to handle audio streams
[22:53:33] <svm_invictvs> Embedded, as in on an embedded device?
[22:53:43] <push[EAX]> yeah, it's a cash register app running on a dumb terminal
[22:53:48] <svm_invictvs> oh ,well
[22:53:54] <svm_invictvs> What OS is on it?
[22:53:58] <push[EAX]> freebsd
[22:55:00] <push[EAX]> issue is simple, cashiers dont find the current "beeping" indicative of a good scan or not
[22:55:09] <push[EAX]> since the barcode reader also beeps a similar frequency
[22:55:23] <svm_invictvs> So it's bash...
[22:55:24] <push[EAX]> So I'd like a low-tone beep for the bad-scan condition
[22:55:27] <svm_invictvs> Or something
[22:55:32] <push[EAX]> yeah
[22:55:35] <push[EAX]> bash
[22:55:35] <svm_invictvs> Just read about how to set the various parameters of the terminal.
[22:56:29] <svm_invictvs> I know you can print special characters to the terminal which can change its properties, such as color, andyou can seek the cursor, etc
[22:56:35] <svm_invictvs> I bet you could just lookup.
[22:56:53] <push[EAX]> yeah, there's a way to do it at the shell level
[22:56:54] <svm_invictvs> The code to do so would be non-portable, so...
[22:56:58] <push[EAX]> exactly
[22:57:03] <svm_invictvs> Yeah, well, just print those characters to the terminal.
[22:57:09] <push[EAX]> which i'm way trying to avoid
[22:57:37] <push[EAX]> arrr...
[22:57:43] * push[EAX] hates to break the conception design
[22:57:45] <svm_invictvs> But it's an embedded app?
[22:57:50] <push[EAX]> for a beep :(
[22:57:54] <svm_invictvs> Well, do this...
[22:57:55] *** jtheuer has joined ##java
[22:57:55] <push[EAX]> yeah
[22:58:02] *** Gracenotes_away is now known as Gracenotes
[22:58:11] <push[EAX]> but I put it on lots of embedded platforms
[22:58:19] <push[EAX]> which pretty much the ONLY reason why i'm using java :/
[22:58:24] <svm_invictvs> Make an interface like, "interface Beeper { public void sendBeep(int frequency); } then have a "BeeperFactory" or something that selects the specific implementation for that OS.
[22:58:31] <push[EAX]> haha yeah
[22:58:48] <push[EAX]> that's actually very nice :>
[22:58:54] <push[EAX]> patterns++
[22:59:14] <svm_invictvs> You could use classForName("com.myproject.platform.FreeBsdBeeper") or something.
[23:00:00] <svm_invictvs> If you were writing C/C++ you'd use macros or similarly dynamically loaded code.
[23:00:02] <svm_invictvs> Just isolate it.
[23:00:38] <jtheuer> hi, does anyone know a Swing LnF which makes applications feel a bit more like [buzzword]web2.0 applications[/buzzword]
[23:03:14] *** GodTodd has joined ##java
[23:04:06] *** Logi has left ##java
[23:05:43] *** shadewind has quit IRC
[23:06:58] <r0bby> jtheuer: huh?
[23:07:10] <r0bby> web 2.0 refers to AJAX...
[23:07:50] <jtheuer> r0bby: web2.0 is a buzzword it doesn't refer to AJAX IMHO
[23:07:58] <r0bby> yes it does.
[23:08:09] <r0bby> it refers primarily to that.
[23:08:09] <repnop> hard to be 2.0 w/o ajax :p
[23:08:16] <jtheuer> what about JSON?
[23:08:21] <svm_invictvs> I thought "Web2.0" was the user generated web.
[23:08:25] <r0bby> that's AJAX in way.
[23:08:34] <repnop> how do you access the json?
[23:08:41] <r0bby> via jS
[23:08:43] <jtheuer> without "X"
[23:08:47] <repnop> r0bby: i know :)
[23:08:57] <repnop> XMLHttpRequest right?
[23:08:57] <r0bby> but in either way
[23:09:03] <r0bby> yes.
[23:09:07] <repnop> that's web 2.0 in a nutshell
[23:09:19] <r0bby> jtheuer: i just said web 2.0 was ajax
[23:09:28] <r0bby> repnop rather
[23:09:31] <r0bby> tell that to jtheuer
[23:09:32] <r0bby> not me
[23:09:33] <jtheuer> r0bby: please read to topic, this is not about javascript here and so my question has nothing to do with it
[23:09:40] <repnop> r0bby: yeah i know you know :)
[23:09:41] <svm_invictvs> And herein lies the definition of a buzzword...
[23:09:41] <r0bby> jtheuer: i did read the topic
[23:09:47] *** eduardopl has quit IRC
[23:09:48] <svm_invictvs> nobody really knows the fuck it means.
[23:09:57] <r0bby> I was referring to your assertion being wrong
[23:10:08] *** ciaron has quit IRC
[23:10:08] <r0bby> and repnop just confirmed it.
[23:10:27] <r0bby> you can use Nimbus for a LnF that doesn't look like ass
[23:10:29] <push[EAX]> FIR JSON IN FRDY13
[23:10:43] <jtheuer> nimbus? I'll check it
[23:10:46] <jtheuer> thanks
[23:10:49] <svm_invictvs> r0bby: huh, me?
[23:12:50] *** pem3v78 has left ##java
[23:13:11] <r0bby> NOT YOU
[23:13:13] <r0bby> jtheuer
[23:13:26] <r0bby> er not you*
[23:13:36] <r0bby> that not you was for svm_invictvs
[23:14:15] *** vesz has quit IRC
[23:14:35] *** _stack has quit IRC
[23:16:08] <jtheuer> *confused* ;-)
[23:16:19] *** linduxed has left ##java
[23:18:25] <r0bby> jtheuer: it was you i was talking to when i told you about nimbus LnF.
[23:18:52] *** Johnny_vd_Laar has quit IRC
[23:18:54] <svm_invictvs> r0bby: remind me to never comment on your status on fb. I have like a dozen emails in my inbox.
[23:19:21] *** ahughes has joined ##java
[23:19:37] *** _stack has joined ##java
[23:21:32] *** _stack has quit IRC
[23:21:59] *** _stack has joined ##java
[23:23:28] *** bindaas has quit IRC
[23:28:40] <r0bby> set it to not email you
[23:28:48] <r0bby> I just get them when i log in :)
[23:29:09] *** davidc has quit IRC
[23:29:19] <r0bby> LOL damn it
[23:29:26] <r0bby> remind me to not put my cell # on there
[23:29:30] *** buntfalke has quit IRC
[23:29:57] <r0bby> my uncle's gf called
[23:30:46] <svm_invictvs> lol
[23:30:50] <svm_invictvs> I think my cell number is there.
[23:30:58] <svm_invictvs> Why'd she call?
[23:31:02] <svm_invictvs> Give you shit?
[23:32:20] <r0bby> tech support
[23:32:27] <svm_invictvs> ugh
[23:32:28] <svm_invictvs> I hate that.
[23:32:30] <r0bby> i </3 doing tech support when i can't troubleshoot on my own
[23:33:26] <r0bby> I'm an idiot, the faster they realize this, the better!
[23:34:49] <r0bby> this is family i never speak to -- if at all.
[23:34:52] *** rutski has joined ##java
[23:35:08] *** davidc has joined ##java
[23:35:22] <svm_invictvs> r0bby: My ukelele fell on my laptop. And now I can't get to my sites. The uke fell on my laptop and my sites aren't showing up. This is unacceptable.
[23:35:36] <svm_invictvs> Pretty much sums up family tech support.
[23:35:55] *** zok has quit IRC
[23:35:59] <rutski> I don't understand why ArrayList's add(E e) method doesn
[23:36:17] <rutski> I don't understand why ArrayList's add(E e) method does not throw an exception; surely there is some limit to the number of items that can be added, no?
[23:36:36] <ernimril> rutski: the limit is memory
[23:37:02] <svm_invictvs> Integer.MAX_VALUE
[23:37:03] <ernimril> rutski: OutOfMemoryError is an Error, not an Exception
[23:37:17] <rutski> ernimril, isn't the limit ~2,147,483,648 items?
[23:37:34] <svm_invictvs> Yeah...the largest possible array.
[23:37:51] <rutski> ah, right
[23:38:10] <ernimril> does the implementation specify that it may only keep one array in there? (sure, you would not be able to get the other values with get, but still)
[23:38:21] *** vix85 has quit IRC
[23:38:21] <rutski> ernimril, heh, yea; it crossed my mind :)
[23:39:04] *** aceofspades19 has joined ##java
[23:39:12] <rutski> It's just that I'm writing a data structures library in C; for fun and practice I suppose
[23:39:20] <rutski> and when thinking about how to handle exceptions, I look to Java
[23:39:24] <svm_invictvs> Even if it doesn't specify only one array, I dont' htink you could satisfy the time complexity constraints if it was implemented as rope or something.
[23:39:27] <rutski> for obvious reasons
[23:39:33] <isr`> C has exceptions?
[23:39:38] <ernimril> rutski: C is not java
[23:39:39] <svm_invictvs> yes...
[23:39:53] <rutski> isr`, setjmp/longjmp wrapped in a nice interface comes close enough
[23:40:00] <ernimril> rutski: add may throw an OOME, but that is an error and you do not have to specify that in the method signature
[23:40:16] <rutski> ernimril, right, exactly; and users aren't expected to catch that?
[23:40:26] <rutski> having those kill the program is an "acceptable" response?
[23:40:32] *** teralaser_ has joined ##java
[23:40:57] <ernimril> rutski: there is often not much you can do about it
[23:41:05] <svm_invictvs> isr`: Strictly speaking, pretty much every language has "exceptions" in that most provide some sort of facility of dealing with unexpected conditions.
[23:41:09] <rutski> ernimril, heh, yea :(
[23:41:24] <svm_invictvs> in C you use setjmp and longjmp
[23:41:32] <ernimril> rutski: you can include a "try { ... } catch (Throwable t) { ... }" in your program, but doing so is usually a very bad thing
[23:41:42] <Pred2k5> are anonymous classes always interfaces?
[23:41:45] <rutski> heh, yea
[23:41:48] <svm_invictvs> no
[23:41:49] <ernimril> Pred2k5: no
[23:41:51] <rutski> wait... why is it usually a bad thing?
[23:41:53] <Pred2k5> I mean do they implement itnerfaces
[23:42:00] <svm_invictvs> they can.
[23:42:02] <rutski> because an OOME error needs to be handled specially, and not generically?
[23:42:05] <ernimril> Pred2k5: no
[23:42:33] <Pred2k5> if I do a new JButton anonymous class for example I have a class which extends J button?
[23:42:42] <ernimril> rutski: if you get OOME you either: 1) have a memory leak somewhere in your program or 2) run the jvm with too little memory
[23:42:49] <Pred2k5> new JButton(){blubb()}
[23:42:51] <rutski> indeed, yep :(
[23:42:55] <ernimril> rutski: how do you solve either problem with a catch?
[23:42:59] <svm_invictvs> catch it and spam System.gc()...pft
[23:43:00] <svm_invictvs> Oh wait.
[23:43:03] <rutski> exactly my point, yea :)
[23:43:10] *** juc0 has joined ##java
[23:43:12] <Agrajag-> g'day, i'm trying to create an XML document and am having trouble setting a prefix for an element when I do Element.setPrefix(). i get "org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.". if i create the element with doc.createElementNS() and supply a namespace there, it works. but isn't it valid to supply a prefix without a namespace
[23:45:19] *** magentar has joined ##java
[23:47:00] *** teralaser has quit IRC
[23:50:57] *** mosno has joined ##java
[23:51:41] *** vesz has joined ##java
[23:52:33] *** coalado1 has left ##java
[23:57:36] <TryNiX> if I have a Color object, is it possible to retrieve the name of that color? or only RGB values?
[23:58:12] *** Ivellina has quit IRC
[23:59:02] *** jtheuer has quit IRC
[23:59:45] *** mySQLnoob has joined ##java
top

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