Switch to DuckDuckGo Search
   February 16, 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:01:07] *** GodTodd has quit IRC
[00:01:46] <mySQLnoob> does anybody know how to run a .class for java without using "java" command? that i can run my java program like this: >myProgram and not >java myProgram ?
[00:02:02] <mySQLnoob> or just >alias
[00:02:21] *** reisi has quit IRC
[00:03:57] *** giaco has quit IRC
[00:04:31] *** Pred2k5 has quit IRC
[00:06:06] *** Tempoe has quit IRC
[00:07:01] *** tazle has quit IRC
[00:07:33] *** tazle has joined ##java
[00:09:50] *** lvh has joined ##java
[00:09:50] <lvh> hi
[00:10:07] <r0bby> mySQLnoob: no way
[00:10:19] <r0bby> ~exe
[00:10:20] <javabot> r0bby, I have no idea what exe is.
[00:10:38] <ernimril> mySQLnoob: pack your program into an executable jar and then the user can double click on that jar
[00:10:47] <lvh> I'm looking for the JDK docs for JRE 6 Update 12. http://java.sun.com/javase/downloads/index.jsp -> scrolling down to the docs gets me jdk-6u10-docs.zip, which is for revision 10
[00:10:47] <r0bby> but yeh
[00:10:50] <lvh> any ideas?
[00:10:54] <ernimril> mySQLnoob: the user will need to have java installed first though
[00:11:16] *** ankou has quit IRC
[00:11:17] <r0bby> mySQLnoob: http://www.google.com/search?q=java+exe&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
[00:11:22] <ernimril> lvh:there should be no api changes between them
[00:11:38] <mySQLnoob> ernimril: i have to run it from cmd.. no clicking
[00:11:39] <r0bby> er that works for windows only
[00:11:49] <r0bby> mySQLnoob: use a shell script.
[00:12:02] <ernimril> mySQLnoob: why use java if you are tied to cmd/windows?
[00:12:05] <mySQLnoob> r0bby: excellent, i was just looking into that but doesnt seem to work
[00:12:18] <r0bby> really? groovy uses it for bootstrapping.
[00:12:33] <mySQLnoob> #! /bin/bash
[00:12:35] <mySQLnoob> java myProgram
[00:12:51] <mySQLnoob> that's what i have in a file and try running myPorgram and it just doesnt
[00:12:52] <r0bby> mySQLnoob: and the problem?
[00:13:05] <r0bby> mySQLnoob: what error?
[00:13:08] <lvh> ernimril: well, but that zip file does exist (other sites on the web reference it), and the debian package i'm using to install the jdk wants it. Would it be safe to just rename the zip file?
[00:13:26] <mySQLnoob> 'dpost' is not recognized as an internal or external command, operable program or batch file.
[00:13:28] <ernimril> lvh: most probably, yes
[00:13:29] <lvh> That'd be weird. I'd expect sun to at least bump the version number, even if nothing changed :-)
[00:13:40] <mySQLnoob> dpost is the name the file with the bash
[00:13:41] <r0bby> mySQLnoob: type java w/o the shell script
[00:13:45] <r0bby> what do you get?
[00:13:57] <r0bby> do you have a JRE/JDK installed?
[00:14:17] <mySQLnoob> r0bby: i do, i can run java myProgram very well
[00:14:24] <r0bby> try doing this: $JAVA_HOME/bin/java MyProgram
[00:14:32] <r0bby> assuming JAVA_HOME is specified.
[00:14:35] <mySQLnoob> at java w/o i get "exception i main thread...... NoClassDeffound.."
[00:14:40] <r0bby> oh
[00:14:45] <r0bby> ~~ mySQLnoob classpath
[00:14:46] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[00:14:56] <r0bby> java is case-sensitive
[00:14:59] <mySQLnoob> yeah i've used xp before
[00:15:02] <mySQLnoob> cp*
[00:15:17] <r0bby> then use it here
[00:15:22] <r0bby> where is myProgram located?
[00:15:29] <r0bby> where does the JRE look?
[00:15:36] <mySQLnoob> im running it in my bin folder
[00:15:38] <mySQLnoob> where the .class is
[00:15:39] <r0bby> tell it where it needs to look
[00:15:50] <r0bby> then do java -cp . myProgram
[00:15:55] *** Ven]n has quit IRC
[00:16:04] <r0bby> is myProgram in a package or the default package?
[00:16:14] <mySQLnoob> no wait i think there's a misunderstanding............ if i do "java MyProgram" it runs fine
[00:16:22] <mySQLnoob> i dont have any problem with my classpath
[00:16:34] <r0bby> well your error tells me otherwise
[00:16:47] <mySQLnoob> but the shell scripting is not executing it
[00:17:02] *** Kernel is now known as Wicked
[00:17:54] <r0bby> mySQLnoob: specify the classpath in your shell script
[00:22:40] *** abruptus has quit IRC
[00:23:14] *** selckin has quit IRC
[00:24:03] *** chameloid has left ##java
[00:24:22] *** lvh has quit IRC
[00:25:05] *** riotz has quit IRC
[00:26:17] *** kane77 has joined ##java
[00:27:03] <cybereal> cher: you're mistaken, it is equal threads/processors
[00:27:26] <cybereal> cher: you're forgetting that the entrypoint to that code is already running in its own thread
[00:27:54] <cybereal> cher: in reality the jvm will start a number of other threads but none doing any notable work
[00:29:10] *** jerkface03 has quit IRC
[00:29:46] *** jerkface03 has joined ##java
[00:30:16] *** aksn has quit IRC
[00:30:32] *** Razec has joined ##java
[00:32:28] <isr`> cher? do you believe in life after love?
[00:32:37] *** Copter has quit IRC
[00:32:53] *** Daniel_H has quit IRC
[00:33:11] *** M[]ssad_ has quit IRC
[00:36:05] *** thepointer-work has joined ##java
[00:37:04] *** Meddi has joined ##java
[00:37:22] <cybereal> isr`: r0bby already asked that unfunny witless quip
[00:37:44] <isr`> oh
[00:37:47] <isr`> didnt see that
[00:37:53] <ahughes> see this! http://www.wimp.com/coolbus/
[00:38:31] <Meddi> Hi guys. I've got a question regarding jtable's. Suppose I created a jtable using JTable table = new JTable() and then used this -> DeafultTableModel model = (DefaultTableModel) table.getModel() . Why does table.getRowCount() return a different value than model.getRowCount() ? ? ?
[00:38:50] <r0bby> cybereal: the "do you believe in life after love?" thing :)
[00:39:07] <cybereal> r0bby: obviously
[00:39:16] <r0bby> heh i had him on ignore can't remember why
[00:39:34] <r0bby> it wasn't witless!
[00:40:30] <cybereal> it was like asking santa if he's jolly, it was so painfully obvious
[00:40:54] <r0bby> so he DOES Believe in life after love!
[00:41:12] <r0bby> s/he i should say.
[00:42:39] *** kane77 has quit IRC
[00:43:07] <r0bby> </badjokes>
[00:43:13] <r0bby> wocka wocka!
[00:43:15] <Meddi> lol
[00:46:42] *** LinuS has quit IRC
[00:48:58] *** J0bk has joined ##java
[00:49:20] *** mySQLnoob has quit IRC
[00:50:50] *** r1nu- has joined ##Java
[00:51:04] *** r1nu- has left ##Java
[00:52:56] *** EspenG has quit IRC
[00:53:30] <Meddi> anyone who knows why ?:\
[00:54:12] *** waz has quit IRC
[00:54:23] *** deepjoy has quit IRC
[00:56:19] <cher> cybereal: Ah you're right. I forgot about the main thread.
[00:56:51] *** morkar- has quit IRC
[01:00:14] *** _stack has quit IRC
[01:04:24] *** vinse has joined ##java
[01:05:54] *** waz has joined ##java
[01:06:12] *** cmccormick has quit IRC
[01:08:58] *** riotz has joined ##java
[01:09:20] *** jcrites has joined ##java
[01:09:41] *** magentar has quit IRC
[01:09:55] *** gregor_k has quit IRC
[01:12:59] *** Carnage\ has quit IRC
[01:15:06] *** beol has quit IRC
[01:17:52] *** spiderbyte has quit IRC
[01:18:58] <pstickne> you know the code is just poorly written when the thread names are used...
[01:19:39] *** hoonteke has joined ##java
[01:19:47] <Meddi> http://pastebin.com/d75ed5d3b <--- Line 117 (which calls the method on line 159( gives an "ArrayIndeOutOfBound" exception if table.getColumnCount() is Less than 5, otherwisw it works fine :S:S .. Why does this happen ? I just don't get it.
[01:20:38] *** funktor has quit IRC
[01:21:01] <pstickne> Meddi: you access something out of bounds. oops.
[01:21:19] *** jcp has joined ##java
[01:21:54] <pstickne> Meddi: be aware that multi-threading may come into play
[01:21:54] <Meddi> but why does the method work if getColumnCount() is bigger than 5 ??Because whether it is 3 or 5 it is the same thing as it says that there are 3 or 5 columns accordingly.
[01:22:56] <Meddi> and the method just removes those columns.. i dont see why when it returns 5, the 5 columns are removed with no error whilst if it is 3, which means there are 3 columns, it goes out of bound when it tries to remove them :s
[01:23:48] <hoonteke> ant or javac question, not sure which: how do I make the compiler (or ant, since I'm using that) treat warnings as errors and stop on them?
[01:24:09] <hoonteke> I know how to do this with gcc (-Werror or -Wfatal-errors), but not for javac
[01:25:41] *** darkfrog has joined ##java
[01:25:48] <pstickne> Meddi: put in more debugging output; somewhere in there the data is changing on you and/or not as you expect
[01:25:59] <Meddi> i think i know what it is
[01:26:00] <darkfrog> What is the difference between a "mouse up" event and a "mouse click" event?
[01:26:06] <Meddi> bit i dont know why it happens and how to fix it :S
[01:26:43] <pstickne> Meddi: well, what do you think it is?
[01:27:08] *** unop_ has joined ##java
[01:27:17] <pstickne> darkfrog: it's possible that a mouse up doesn't result in a "click"
[01:27:26] <Meddi> I just tried with 3: There are 3 columns in my table. at that time, table.getColumnCount() returns 3, whilst tableModel.getColumnCount() (tableModel is an object which points to table.getModel() ) Returns 4
[01:27:33] <Meddi> do you know why does this happen ?:S
[01:27:35] <hoonteke> darkfrog: mouse up: push button over another object, move mouse over new object, release mouse. I believe that's a mouse up for the new object.
[01:27:35] <hoonteke> mouse click is when it is both pushed and released over an object. but ... I'm not sure.
[01:27:38] <pstickne> darkfrog: imagine mouse-down off area, move mouse onto area, release mouse
[01:28:10] <darkfrog> pstickne: now, what about "key down", "key up", "key typed"?
[01:28:35] <hoonteke> any word an bailing out on warnings as well as errors for javac?
[01:29:10] <gionny> Meddi: did you write your own table model?
[01:29:28] <pstickne> darkfrog: key-down must be before key-up or key-pressed; I suppose the same thing could apply as with mouse-up vs. mouse-click
[01:30:14] <darkfrog> pstickne: right, but what is the benefit of a "key typed" event over just relying on "key up"?
[01:30:20] <darkfrog> pstickne: type-matic repeat?
[01:30:24] <gionny> Meddi: if you wrote your own table model, be sure to fire the events that you removed something in the code that removes something
[01:30:53] <Meddi> gionny: nop. The way I created the tables, as in http://pastebin.com/d75ed5d3b Was JTable defaultTable1 = new JTable(9,4) . (mind you, the table in the method always uses the defaultTable1 defined above)
[01:31:23] <pstickne> darkfrog: the biggest thing to me is that is cleaner because you defer the logic to somewhere else; let /them/ key track of all the internals (unless you really do need the plain individual events)
[01:31:38] <gionny> Meddi: I saw the problem, line 111
[01:31:45] <gionny> Meddi: you can't iterate and then remove it
[01:32:07] <pstickne> darkfrog: that is, think of it simply as an invent interface with fairly well defined semantics. unless you want to change the "meaning" of mouse-click, just let it be :)
[01:32:14] <pstickne> s/invent/event/
[01:32:15] <gionny> Meddi: if you do an iteration with i from 0 to number of rows -1, once you delete one row, then the total value is number or rows - 2...
[01:32:26] <gionny> Meddi: are you following me? that isn't going to work
[01:32:30] <darkfrog> pstickne: valid point
[01:32:47] <Meddi> gionny, ok, why does it work with anything more than 4 though ?
[01:33:06] <darkfrog> pstickne: using you as a sounding board to the philosophical discussion of the UI framework I'm writing. :o
[01:33:24] <Meddi> btw the problem is on line 117. the rows removal works fine
[01:33:29] <darkfrog> ...or rather, re-writing
[01:33:32] <Meddi> what causes the exception is the column removal
[01:33:37] *** Varox has quit IRC
[01:34:03] <pstickne> \o/
[01:34:11] <gionny> Meddi: line 117 has got the same problem, but for columns. You have to change that code for both
[01:34:31] *** unop has quit IRC
[01:34:40] <gionny> Meddi: I don't know why it works in some cases (I should read all the code to understand that), but however it is not correct the way you do it
[01:34:42] <pstickne> gionny: I'm missing something... because the iterator goes from n-1 to 0... :(
[01:35:10] <gionny> well, even if it is from n-1 to 0, it's a problem
[01:35:21] <pstickne> if you always remove the last item?
[01:35:22] *** funktor has joined ##java
[01:35:44] <Meddi> gionny, how would you recommend i fix it?
[01:35:50] *** yclian has joined ##java
[01:35:58] *** funktor has quit IRC
[01:36:04] <darkfrog> thanks for the opinions guys....l8r
[01:36:10] <gionny> uhm... let me think about that a little, I don't want to say non-senses, but I remember that I had a similar problem
[01:36:15] <Meddi> I tries using int j = tableModel.getColumnCount()
[01:36:23] *** darkfrog has quit IRC
[01:36:32] <Meddi> and then used j in the for ( int i = j.. )
[01:36:33] <Meddi> but i suppose its the same thing
[01:36:47] *** Woflborg has quit IRC
[01:37:25] <gionny> Meddi: but what do you want to do? just remove all rows and all columns?
[01:37:44] <Meddi> basically yes
[01:37:50] <pstickne> Meddi: I think the problem is that there are multiple threads and the dispatch involved; of course I could be wrong
[01:38:18] <Meddi> I just want to clear everything in the table and start constructing it again
[01:38:29] <pstickne> Meddi: that is, I am fairly certain the /model/ updates happen in the sdt
[01:38:36] <gionny> Meddi: are you sure that there isn't a clear() method in the table model?
[01:38:56] <gionny> why complicate your life if a clear method exists... well, maybe it doesn't exist, I don't remember that
[01:39:01] *** josemoreira has joined ##java
[01:39:42] *** funktor has joined ##java
[01:42:30] <Meddi> I found somewhere I clear command but i dont remember it :\
[01:42:42] <Meddi> i tried it actually and i think it removes everything from the model, not the table
[01:43:39] <gionny> Meddi: uhm... if the model is written so that it fires the appropriate events when something is removed, the renderer should re-draw the table to display just what's in the model
[01:44:06] <pstickne> Meddi: try { while (has_columns) { remove_last_column} } ... but this is fugly O.o
[01:44:44] <Meddi> ok let me try
[01:44:45] *** vesz has quit IRC
[01:44:49] <Meddi> gionny i am using the defaulttablemodel
[01:44:56] <pstickne> Meddi: but since you are still split between the EDT and not, it's still prone to be wonky.
[01:45:09] <Meddi> what is EDT?
[01:45:11] <pstickne> (Just suppressed wonkiness)
[01:45:16] <pstickne> Event Dispatch Thread
[01:45:30] <Meddi> ohhok
[01:45:46] <gionny> Meddi: however, something like this should work: for (int i=0; i < numRows - 1; i++) { model.removeRow(0); } ... it's the same that pstickne just said, just that you remove always the first one
[01:46:53] <Meddi> ok i found something easier lol
[01:47:02] <Meddi> table.setModel(new DefaultTableModel());
[01:47:11] <gionny> lol
[01:47:39] <gionny> that works of course, anyways, it should work even in the other way... I'm not sure why it's not working
[01:47:50] *** Vicfred has quit IRC
[01:47:58] <gionny> probably you are missing something... debugging it will help trying to understand
[01:48:03] *** riotz has quit IRC
[01:48:28] <Meddi> i think the reason is because I dont remove them from the model (?) but i aint sure
[01:48:46] *** ries has joined ##java
[01:48:58] <gionny> Meddi: oh! now I see that you just call a removeColumn() method instead of removing them from the model...
[01:49:20] <Meddi> yes, i just didnt know how to remove the column from the model.. couldnt find any command :\
[01:49:46] <gionny> Meddi: but wait... why are you trying to remove columns if you already removed all rows? I mean... the new table will not have the same columns?
[01:50:27] <gionny> usually the columns are always the same for a model... if you are going to change the columns, then you have to change the model and I guess that it's better to do it as you did, creating a new model
[01:50:41] <Meddi> yes thats what i am trying to do
[01:50:49] *** Banke has quit IRC
[01:51:29] <gionny> Meddi: then create a new model
[01:51:46] *** Vicfred has joined ##java
[01:52:01] *** riotz has joined ##java
[01:52:24] *** josip has joined ##java
[01:52:28] <Meddi> yup, thanks btw :)
[01:53:25] <gionny> it's not a "normal" situation to have the same table changing the number of columns... I think that if you want to change it dinamically without removing elements, then you have to implement your own model
[01:53:49] <gionny> it's not a trivial task, though, it's pretty simple to write a model
[01:53:53] <josip> Hello, I'm using log4j as a logger, with the config file pasted here http://pastebin.ca/1338498 Although I see the output on the console, the file janta.log _is_ created by log4j but nothing is ever written to it. Any ideas?
[01:54:30] <aleksei> Anyone has an idea why JDO isn't that widespread?
[01:54:33] <Meddi> basically the table is not editable. it is used to display stuff about Automata. and since each automaton can have different number of states (columns), i have to change the columns each time
[01:54:39] *** boringwall has joined ##java
[01:55:32] <gionny> Meddi: well, if you have to clear the table and do it again, maybe it's faster to create a new model...
[01:55:36] <pstickne> gionny++ (for the immutability suggestion)
[01:55:43] <Meddi> yup I suppose so!
[01:55:51] <gionny> Meddi: anyways, I just found a setColumnCount() method in DefaultTableModel
[01:55:56] <pstickne> speed won't be an issue, but cleanliness will likely be
[01:56:09] <gionny> so you _can_ do it with simple table model, too
[01:56:30] * Meddi would write if he knew and had time :\
[01:56:36] <Meddi> btw thanks a lot gionny, and pstickne
[01:58:46] <gionny> Meddi: it is very simple to write a table model... you can write one in 5 mins and it allows you to do things better in some cases. I suggest you to spend some time learning that, but... do as you whish!
[01:59:01] *** AskHL has quit IRC
[01:59:24] <Meddi> I could try yup - Will have to start reading the java tutorial tomorrow :)
[02:01:35] <gionny> Meddi: once you learn how to write a model and a renderer, you can do whatever you like with tables, combo boxes, etc.
[02:01:39] * r0bby crakcs the whip
[02:01:42] <gionny> and it's very rimple, really
[02:01:47] <r0bby> rimple?
[02:01:47] <gionny> s/rimple/simple
[02:01:59] <gionny> lol
[02:02:27] <gionny> r0bby: crakcs? :P
[02:02:45] *** pchapman has joined ##java
[02:03:41] *** meanburrito920_ has joined ##java
[02:03:53] *** inspiron630 has joined ##java
[02:06:18] *** tissue has joined ##java
[02:06:28] *** Goks has joined ##java
[02:06:38] *** mocas_ has joined ##java
[02:06:48] *** Goks has quit IRC
[02:07:02] *** teralaser_ is now known as teralaser
[02:09:41] *** inktri has joined ##java
[02:10:09] *** xand has joined ##java
[02:10:18] <inktri> can someone see what's wrong with my multi-threaded Matrix multiplication program? it's like 10x slower than my single threaded version.. http://pastebin.com/m73bedb47
[02:10:44] *** Goks has joined ##java
[02:11:02] *** Goks has left ##java
[02:11:02] *** The_Birdman has quit IRC
[02:11:12] *** august has joined ##java
[02:11:22] *** waz- has joined ##java
[02:11:31] *** rutski has quit IRC
[02:13:05] * r0bby sighs
[02:13:12] *** NiSoOo has quit IRC
[02:13:59] *** akempgen has joined ##java
[02:14:07] *** Goks has joined ##java
[02:14:10] <Goks> hi
[02:14:48] <Goks> how are you people??
[02:15:07] <r0bby> evil
[02:15:28] *** akempgen has left ##java
[02:15:45] *** NoOneButMe has joined ##java
[02:16:17] *** ScottG489 has quit IRC
[02:16:42] <Goks> can anybody help me with Exception?
[02:16:57] *** august has left ##java
[02:16:58] *** matsebc has joined ##java
[02:17:12] *** NoOneButMe has left ##java
[02:17:30] *** august has joined ##java
[02:18:15] *** josip has quit IRC
[02:18:35] *** AskHL has joined ##java
[02:19:25] <Goks> I need to know when readLine of BufferedReader throws an IOException?
[02:19:44] <inspiron630> double N = 4.5; can i change N's data type? without creating a new variable?
[02:20:23] *** Ox15 has joined ##java
[02:20:24] <AskHL> inspiron630, you cannot. Also, why would you?
[02:20:49] <inspiron630> i want to use it for my multi demensional array
[02:20:59] *** mocas has quit IRC
[02:21:04] *** orgy` has quit IRC
[02:21:11] <AskHL> That shouldn't require changing the type of N.
[02:21:20] *** august_ has joined ##java
[02:21:21] <AskHL> What you want to do is to put the value of N into your array
[02:21:35] <AskHL> ...in doing so you will convert to whichever data type your array uses
[02:21:56] *** funktor has quit IRC
[02:23:17] *** prgrmr has quit IRC
[02:24:59] *** august_ has left ##java
[02:25:23] *** cher has quit IRC
[02:26:04] *** cher has joined ##java
[02:26:45] *** matsebc has left ##java
[02:27:09] <Goks> can anybody help with an Exception problem, I don't know what to do..
[02:27:57] <reverend> ~anyone
[02:27:58] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[02:28:55] <r0bby> Goks: question is what?
[02:29:17] <Goks> when readLine of BufferedReader throws an IOException?
[02:29:27] <Goks> sorry, is my fist time in #java
[02:29:47] *** teralaser has quit IRC
[02:30:06] *** august has left ##java
[02:30:37] *** dunmer has quit IRC
[02:32:18] <reverend> Goks: try to form an actual question.
[02:34:26] <Goks> i have String line = lector.readLine(); in a for and the second time throw and Exception
[02:34:53] <Goks> lector is an BufferdReader instance
[02:35:13] <reverend> okay, those are still 'statements'
[02:35:19] <EruditeHermit> hi, when I try to load jar files in an applets HTML code, I put them in the archive= line separated by commas. The example I am using is shown here: www.pastebin.com/m78c56603. However, the applet which runs in eclipse appletviewer is not running in my firefox browser. Can anyone help?
[02:35:20] <reverend> we're looking for a 'question'
[02:35:42] <pstickne> "Can anyone help?"
[02:35:56] <Goks> reverend: why throw an Exception?
[02:35:56] <svm_invictvs> ~halp is <reply>Halp halp!
[02:35:56] <javabot> Okay, svm_invictvs.
[02:35:58] <svm_invictvs> ~halp
[02:35:59] <javabot> Halp halp!
[02:36:09] *** Balgan has joined ##java
[02:36:14] <inspiron630> k, there is something small i'm missing? http://rafb.net/p/iePUm717.html
[02:36:22] <reverend> Goks: because an io error has occurred
[02:36:26] *** Inc` has quit IRC
[02:36:35] <inspiron630> i'm trying to put the one dimensional array into two-dimensional array
[02:36:53] <svm_invictvs> EruditeHermit: I'd start by putting the output of the java console in a paste.
[02:37:09] <svm_invictvs> EruditeHermit: You're probably missing a class or doing something that the security manager doesn't like.
[02:37:11] *** ScottishPig has joined ##java
[02:37:11] <pstickne> inspiron630: try a wormhole...
[02:37:20] <inspiron630> ?
[02:37:35] <pstickne> inspiron630: or, simply use a loop and arrayCopy
[02:37:43] <pstickne> inspiron630: which is likely the best you can do
[02:37:55] <EruditeHermit> svm_invictvs: I have tried to access that, but I am unable to find where the java console is. In Linux firefox it is not found in the tools menu like it seems to be on other platforms. I installed firefox web developer addon but when I click the menu item for java console it doesn't come up.
[02:37:57] <inspiron630> what is wrong with my code
[02:38:04] <inspiron630> http://rafb.net/p/iePUm717.html
[02:38:06] <pstickne> inspiron630: "it doesn't work"?
[02:38:21] <inspiron630> why
[02:38:49] <pstickne> inspiron630: why would you think the output is wrong?
[02:38:57] <EruditeHermit> svm_invictvs: any suggestions about how to get it to show up?
[02:38:58] *** Goks has left ##java
[02:39:24] *** sYskk has quit IRC
[02:39:25] <r0bby> inspiron630: learn to trace code
[02:39:45] <r0bby> pencil and paper is the most valuable debugger available to us
[02:40:33] *** Varox has joined ##java
[02:40:37] *** MacFlecknoe_ has joined ##java
[02:40:53] <ScottishPig> inspiron630, looks like the output makes pretty good sense to me... what's it supposed to do?
[02:41:41] <pstickne> ScottishPig: hopefully when he finds out... ;-)
[02:41:42] *** Inc` has joined ##java
[02:41:52] *** Ox15 has quit IRC
[02:43:02] <inspiron630> nm i switch out N-1 to N
[02:47:58] *** popcornPanic has joined ##java
[02:48:21] <pstickne> \o/
[02:50:17] <noobraska> those damn off-by-one errors ;)
[02:51:23] <r0bby> <3 /geek
[02:51:26] <r0bby> er creap
[02:51:38] <noobraska> ...
[02:52:40] <r0bby> noobraska: I refuse to clean up my irc client and use aliases to get around the various channels im in
[02:52:48] <r0bby> irssi ftw!
[02:53:23] <noobraska> oops
[02:55:15] <inspiron630> private boolean test; do booleans in java initialize to false when created
[02:55:28] <inspiron630> well i guess its just null right now
[02:55:49] <inspiron630> because if new isn't called then memory isn't allocated for it yet. am i thinking about that correct
[02:56:36] <noobraska> im pretty sure they initialize to false...
[02:56:44] <noobraska> im probably wrong though
[02:56:48] *** Vicfred has quit IRC
[02:58:29] <pstickne> inspiron630: yes. they are false.
[02:58:36] <pstickne> inspiron630: boolean can never be null.
[02:58:49] *** hoonteke has left ##java
[02:59:16] <pstickne> (all primitives initialize to "false" values; reference variables to "null")
[02:59:31] <pstickne> s/false/zero/ *sigh*
[02:59:36] *** vix85 has joined ##java
[03:00:25] <EruditeHermit> svm_invictvs: www.pastebin.com/m25c71782
[03:02:05] *** Bonix has quit IRC
[03:02:12] *** popcornPanic has quit IRC
[03:02:21] *** factor has quit IRC
[03:04:46] *** MacFlecknoe_ has quit IRC
[03:05:31] <r0bby> pstickne: technically 0 is false
[03:05:47] <r0bby> so your statement is correct in a way
[03:06:06] <pstickne> r0bby: but Java has a very restricted set of what it treats as false expressions...
[03:06:13] *** vix85 has quit IRC
[03:06:15] <r0bby> true
[03:06:37] <r0bby> no pun intended
[03:06:50] *** pstickne has quit IRC
[03:12:26] <jcp> r0bby: in c++, 0 = false. In java, 0 != false
[03:12:36] <jcp> Actually, I think you get a compile-time error if you compare 0 with flase
[03:12:39] <jcp> s/flase/false
[03:13:00] *** inktri has left ##java
[03:13:27] *** noobraska has quit IRC
[03:14:13] *** noobraska has joined ##java
[03:14:13] *** bhz- has quit IRC
[03:14:41] *** Inc` has quit IRC
[03:15:04] <r0bby> jcp: i know
[03:15:17] <r0bby> I was just stating in a semantic sense, not actual
[03:15:21] <jcp> ok
[03:15:33] <r0bby> in java the only truth is boolean
[03:15:52] <r0bby> i mean true/false nothing else
[03:15:53] <jcp> Yeah
[03:15:53] *** yclian has quit IRC
[03:16:05] <jcp> Which reminds me, can you cast from int to boolean?
[03:16:14] <jcp> (and get c++ behavior in the process)
[03:16:21] <jcp> Or does it not allow you to cast between them?
[03:17:14] *** flb has quit IRC
[03:17:52] *** squi has joined ##java
[03:18:12] *** durka42 has quit IRC
[03:19:33] *** gionny has quit IRC
[03:21:00] *** Inc` has joined ##java
[03:21:03] *** da_shadow has joined ##java
[03:21:55] *** gonzaloaf has joined ##java
[03:23:25] *** JustinLei has joined ##java
[03:24:04] <thefalling> is there a way to turn an actionlistener off/on?
[03:24:47] <aceofspades19> jcp: no, java does not allow you to cast from an int to a boolean
[03:25:08] *** marvs has quit IRC
[03:31:35] <r0bby> thefalling: use an ActionMap
[03:31:36] *** JustinLei has quit IRC
[03:31:40] <r0bby> ~~ thefalling javadoc ActionMap
[03:31:45] <javabot> thefalling: http://is.gd/jDW7 [javax.swing.ActionMap]
[03:32:39] <thefalling> thx
[03:33:04] <r0bby> http://java.sun.com/javase/6/docs/api/javax/swing/JComponent.html#setActionMap(javax.swing.ActionMap)
[03:33:07] <r0bby> use that method
[03:33:17] <r0bby> then just remove the Action
[03:33:51] *** cmccormick has joined ##java
[03:35:02] *** factor has joined ##java
[03:35:38] *** Varox has quit IRC
[03:45:57] *** TryNiX has quit IRC
[03:55:24] *** Razec has quit IRC
[03:57:22] *** riotz has quit IRC
[03:57:52] *** langenberg has joined ##java
[03:58:54] <langenberg> I'm trying to scrape data from an html page, and I see text like '&#039;'. How can I convert that back to a '?
[04:00:03] <reverend> there's stuff in commons for that
[04:00:15] <reverend> and i'm pretty sure commons httpclient takes care of it for you anyway
[04:00:52] *** ScottishPig has quit IRC
[04:00:59] *** MacFlecknoe has joined ##java
[04:04:36] *** ries has quit IRC
[04:05:05] *** MacFlecknoe has left ##java
[04:09:55] *** Fosco999 has joined ##java
[04:10:32] *** cmccormick_ has joined ##java
[04:10:50] <Fosco999> How can I create a error-checking loop inside of my mainloop, i tried 'void errorLoop()' but I get errors, can anyone help?
[04:11:50] <AMcBain> details help. I know almost nothing about what you are actually trying to do. Your description isn't very good. Pastebined code helps.
[04:12:02] *** LordMetroid has quit IRC
[04:12:15] *** cmccormick has quit IRC
[04:14:41] <Fosco999> AMcBain, Ill post soon
[04:15:15] *** ramdam has joined ##java
[04:15:20] <Fosco999> err, whats the url for the pastebin, since I'm on a few computers
[04:16:16] <AMcBain> ~~ Fosco999 pastebin
[04:16:16] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[04:16:32] *** linxuz3r has quit IRC
[04:16:40] *** cmccormick_ has quit IRC
[04:19:14] *** optraz has joined ##java
[04:19:46] <r0bby> Fosco999: http://rifers.org/paste
[04:20:04] <r0bby> :)
[04:20:04] *** CSSipi has joined ##java
[04:20:57] <CSSipi> Could anyone tell me why this won't work? http://pastebin.com/d3c20b4a7
[04:21:19] <CSSipi> cannot find symbol method nextInt(int)
[04:21:50] <CSSipi> cus this one is working just fine. http://pastebin.com/d1a4e7d82
[04:22:44] *** Meddi has quit IRC
[04:23:55] <thefalling> r0bby still tryin to figure out how to stop a listener with ActionMap, I created a ActionMap and used the setActionMap, but how do i remove the listener with remove?
[04:24:12] *** das7002 has joined ##java
[04:25:48] *** Kernel has joined ##java
[04:26:46] <r0bby> thefalling: note: JComponent is the super class for most compontents.
[04:26:56] <thefalling> yeah
[04:27:02] <r0bby> ~~ thefalling javadoc JComponent.getUIActionMap(*)
[04:27:02] <javabot> I don't know of any documentation for JComponent.getUIActionMap(*)
[04:27:33] <r0bby> ~~ thefalling javadoc JComponent.getActionMap(*)
[04:27:33] <Fosco999> Let me restate my problem then xD
[04:27:35] <javabot> thefalling: http://is.gd/jE9e [javax.swing.JComponent.getActionMap()]
[04:27:40] <r0bby> there ya go
[04:28:02] <Drone> See Fosco's post at http://rifers.org/paste/show/8791
[04:28:45] <Fosco999> I just need to add my error checking code into an error loop, so that it checks for errors before itmoves the pegs
[04:28:58] <Fosco999> and I don't know who to do that
[04:29:09] <das7002> What is the best way to randomly pick something from an XML file with the following structure <fortunes><fortune>Fortune goes here</fortune></fortunes> and place the output in a text box
[04:29:21] *** EruditeHermit has quit IRC
[04:29:53] *** donavan has joined ##java
[04:30:41] <thefalling> what do i stick in the ActionMap remove method?
[04:32:13] <Fosco999> thefalling, for parameters?
[04:32:22] <thefalling> yeah
[04:33:08] <Fosco999> thefalling, http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/ActionMap.html
[04:33:11] <thefalling> tried getMouseListeners()
[04:35:07] <r0bby> das7002: load each element into a List then randomly select it.
[04:35:48] <das7002> I am having a problem getting it to generate a random number though
[04:38:14] <r0bby> ~~ das7002 javadoc Random
[04:38:15] <javabot> das7002: http://is.gd/jEc1 [java.util.Random]
[04:39:38] *** kater_ has joined ##java
[04:39:46] <das7002> I tried using import java.util.Random;Random generator = new Random(); int i = generator.nextInt();
[04:39:58] <thefalling> How can i find the key for a certain listener?
[04:40:03] <das7002> Netbeans says that is wrong though and won't compile
[04:40:46] <r0bby> das7002: has to be within a method.
[04:40:49] <r0bby> or ctor
[04:40:55] *** kater has quit IRC
[04:41:32] <r0bby> das7002: new Random().nextInt(list.size());
[04:41:38] *** Wicked has quit IRC
[04:42:46] <r0bby> das7002: this is java 101 -- you can't do that unless it's 1) within a class _AND_ within a method, constructor, or initialization block
[04:42:52] <r0bby> imports are at the top
[04:43:55] <das7002> probably has something to do with me still being used to the way PHP does thing
[04:44:04] <das7002> I see why it wasn't working
[04:44:09] <das7002> thanks r0bby
[04:45:29] <r0bby> see, there's your problem :)
[04:45:32] <r0bby> php. :)
[04:45:42] <isr`> php is fine
[04:46:04] *** donavan has quit IRC
[04:46:06] <pfn> ~php
[04:46:07] <javabot> pfn, php is the solution of choice for relaying mysql errors to web users.
[04:46:19] <das7002> Well I am kinda just starting out with GUI building last I ever tried was VB years ago and have done PHP ever since only been messing with Java for about 3 weeks
[04:47:04] <r0bby> DO NOT use the gui builder for netbeans.
[04:47:12] <r0bby> learn swing by hand
[04:47:17] <r0bby> ~~ swing components
[04:47:17] <javabot> The user swing is not on ##java
[04:47:22] <r0bby> ~ swing components
[04:47:22] <javabot> A Visual Index to the Swing Components can be found at: http://java.sun.com/docs/books/tutorial/uiswing/components/
[04:47:25] <r0bby> ~events
[04:47:25] <javabot> r0bby, events is http://java.sun.com/docs/books/tutorial/uiswing/events/index.html
[04:47:28] *** donavan has joined ##java
[04:47:29] <r0bby> ~layout managers
[04:47:30] <javabot> r0bby, layout managers is http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html If the layout managers included with the jdk don't satisfy you, have a look at FormLayout, TableLayout, PercentLayout, HTMLLayout, CentreLayout, or GridLayoutPlus (ask me about each of those to learn more). Book chapter at http://javafaq.mine.nu/lookup?290
[04:47:33] <AMcBain> Swing rocks ...
[04:47:35] <r0bby> what you need to know
[04:47:38] <AMcBain> okay, tat's enough bot-spam
[04:47:43] <r0bby> sorry.
[04:47:59] <r0bby> das7002: read those links over
[04:48:03] <das7002> Why is it ill advised to use NetBeans GUI builder?
[04:48:12] <r0bby> das7002: look at the code
[04:48:45] <das7002> well...
[04:49:08] <AMcBain> That and you don't learn much from it of how stuff really works.
[04:49:19] *** light has joined ##java
[04:49:38] <r0bby> learning to do it by hand, you can see how it all pieces together; plus you can choose how your code is structured and you have far more control
[04:50:01] <das7002> I will read through what you gave me
[04:50:18] *** B|ackPanther has joined ##java
[04:50:46] <das7002> this is a big leap from HTML based GUI's
[04:52:40] *** waz is now known as Guest33209
[04:53:14] *** waz has joined ##java
[04:54:03] *** jcp is now known as javawizard2539
[04:54:24] *** javawizard2539 is now known as jcp
[04:54:42] <Fosco999> woo I think I found my problem.
[04:54:56] *** nvictor has joined ##java
[04:55:13] <Drone> See Anonymous Coward's post at http://rifers.org/paste/show/8792
[04:55:32] *** nvictor has left ##java
[04:56:55] *** cmccormick has joined ##java
[04:59:11] <AMcBain> er wow ... come on.
[05:01:43] <das7002> What does Java FX have that SE doesn't?
[05:02:31] *** adi112358 has quit IRC
[05:02:52] <waz> they are 2 different languages
[05:02:55] *** mosno has quit IRC
[05:03:22] *** gonzaloaf has quit IRC
[05:04:01] *** das7002 has left ##java
[05:04:28] <Fosco999> I need to make a for x to equal all the letters between A and O, can anyone help?
[05:04:39] <Fosco999> in a conditional
[05:04:57] <AMcBain> if they're characters, you can use their equivalent ASCII numbers ...
[05:05:18] <Fosco999> well
[05:05:20] *** ScottG489 has joined ##java
[05:05:21] *** waz has quit IRC
[05:05:32] <Fosco999> isn't there a shortcut or do i have to type it all
[05:06:00] <AMcBain> why is every one intereted in less characters? typing less doesn't == more ... go learn Perl if you want that.
[05:06:44] <cybereal> for (char c = 'A'; c < 'O'; c++) { ... }
[05:06:49] <twobytes> AMcBain: haha
[05:08:14] <Fosco999> cybereal, thanks
[05:08:50] *** [[thufir]] has quit IRC
[05:15:05] *** aleksei has left ##java
[05:15:33] *** toytoy has joined ##java
[05:17:47] *** das7002 has joined ##java
[05:18:01] *** das7002 has left ##java
[05:20:00] *** Vicfred has joined ##java
[05:20:18] *** Csow has joined ##java
[05:20:53] <Csow> ~pastebin
[05:20:54] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[05:21:28] *** J0bk has quit IRC
[05:22:11] <inspiron630> public SortedSet wordsFound; is in one class. in another class wordsFound.size() gives me an error
[05:22:40] <inspiron630> i thought public made the scope viewable to other classes
[05:22:41] *** waz- has quit IRC
[05:26:04] <pfn> it's in scope, just not in the same namespace
[05:27:09] <r0bby> inspiron630: getWordsFound() { return wordsFound; }
[05:27:18] <r0bby> will return the SortedSet
[05:27:35] *** Vicfred has quit IRC
[05:27:36] <r0bby> assuming you specify the type and correct access modifier
[05:27:41] *** waz has joined ##java
[05:28:03] *** yclian has joined ##java
[05:28:45] *** cher has quit IRC
[05:28:52] <pfn> r0bby, you need better comprehension, that is not the question asked
[05:29:12] <Csow> need help here the error is at the buttom of the list http://pastebin.stonekeep.com/5658
[05:29:14] * r0bby sucks
[05:29:18] *** CodeWar has joined ##java
[05:29:56] <r0bby> inspiron630: public means you can do: myClassInstance.wordsFound.size();
[05:30:20] <pfn> Csow, you should read the documentation on what Arrays.asList does
[05:30:58] <CodeWar> I have a set of chunks that are sorted on address ( each chunk has a start address ). that works great for me except at times I want to search based on size it would be great if I could have a second view thats sorted on size
[05:31:00] <CodeWar> any suggestions
[05:31:18] <pfn> so create a list that sorts on size
[05:32:06] <CodeWar> and update it every time the base collection is updated hmm that shoudl work
[05:32:31] <r0bby> inspiron630: and in most cases you don't want to make it public
[05:32:39] <thefalling> ok i finally got it to stop the actionlistener, i called pickShips.removeMouseListener(this); inside the listener, but i cant add the listener with pickShips.addMouseListener(this);
[05:33:13] <r0bby> sorry i couldn't help more
[05:33:33] <Csow> pfn Arrays.asList() does not work here or should not be employed all I want is use an array then use list to add thing in the array
[05:33:43] <r0bby> Csow: it's immutable.
[05:33:52] <thefalling> anyone know a tut for stopping and starting listeners, because the API is just confusing me lol
[05:35:14] <r0bby> Csow: what you CAN do is this: List<String> list = new ArrayList<String>(Arrays.asList({new String[] { "Texas","New York
[05:35:25] <r0bby> Csow: what you CAN do is this: List<String> list = new ArrayList<String>(Arrays.asList({new String[] { "Texas","New York"}));
[05:35:49] <r0bby> NOW you can add/remove elements.
[05:36:09] <r0bby> Csow: what you CAN do is this: List<String> list = new ArrayList<String>(Arrays.asList(new String[] { "Texas","New York"}));
[05:36:14] <r0bby> DOH -NOW- it's right.
[05:36:30] <Csow> ok
[05:36:38] <asap18> 3rd times the charm
[05:36:38] <CodeWar> google collections has useful static methods for constructing Lists with init values
[05:36:50] <r0bby> yeh but this is just as easy.
[05:36:54] <CodeWar> sure
[05:37:05] <r0bby> plus no extra bloat needed
[05:37:53] *** pstickne has joined ##java
[05:38:44] *** Guest33209 has quit IRC
[05:38:56] <CodeWar> actually we could take the RHS part away with a public <T> static T createArrayList(T... input) { ArrayList<T> a = new ArrayList<T>(); for( T temp: input) { a.add(temp);} }
[05:39:15] <CodeWar> forgot the "return a "
[05:40:24] <r0bby> that requires bringing in a dep. why?
[05:40:51] <r0bby> CodeWar: you could even do
[05:41:14] *** Kwitschibo has quit IRC
[05:41:35] <CodeWar> if it was in the Collections class then we wouldnt have required an extra dep the argument in its favour being some people find writing the new ArrayList<Integer>() a pain.
[05:41:38] *** Kwitschibo has joined ##java
[05:41:43] <r0bby> public <T> static List<T> createArrayList(T ... inputs) { return new ArrayList<T>(Arrays.asList(input)); }
[05:41:47] <CodeWar> its easy for this but wiht Map objects it gets long though IDEs do it for you
[05:42:03] <r0bby> one liner.
[05:42:20] <r0bby> your entire method is now one :)
[05:42:25] <r0bby> line
[05:42:58] <AMcBain> fail
[05:42:59] <CodeWar> r0bby, yes I dont insist on asList vs foreach the static part however makes type inference possible and makes RHS easier to write
[05:43:53] <pstickne> CodeWar: why not just use a language that /has/ type inference?
[05:44:44] * CodeWar looks in the other direction while Scala folks beat it
[05:44:50] <pstickne> ^^
[05:45:30] <CodeWar> but frankly I found issues with Scala that dont seem to make daily programming easier. Not all clever type inference is good sometimes it just makes the code less easy to read
[05:45:31] <pstickne> CodeWar: although there are a number of fine statically typed languages with various forms of type inference...
[05:45:51] <pstickne> CodeWar: what clever inference?
[05:46:19] <CodeWar> public final int myVar = 2; now I happened to skim through Scala presentations that say this can be removed by val or var or some such whcih will make it final and public
[05:46:25] <pstickne> CodeWar: I can point out some things that /do suck/ in Scala, but the inference isn't one of them
[05:46:29] <CodeWar> clever yes short yes but doesnt tell a clear story :)
[05:46:48] <pstickne> CodeWar: val myVar = 2 // what is there to talk about?
[05:47:04] <CodeWar> is it public ?
[05:47:07] <pstickne> val myVar: Int = 2 // So what's the problem?
[05:47:08] <CodeWar> is it final?
[05:47:19] <pstickne> CodeWar: do not think in Java syntax.
[05:47:22] *** cactaur has joined ##java
[05:47:36] <AMcBain> but that's just so easy to do! :P
[05:47:37] <pstickne> CodeWar: first off, public only applies to class scope, not method scope
[05:47:38] <CodeWar> doesnt matter which langauge public final quoted side by side tell a clear story
[05:47:49] *** TooAngel has joined ##java
[05:47:50] <hiredman> *snort*
[05:47:55] <CodeWar> well i m biased so what
[05:48:17] *** waz has quit IRC
[05:48:33] <pstickne> CodeWar: so "it depends on if it is in class scope or not"; otherwise, 'public' is the default modifier of all class variables; if it's "val" it means the /variable/ is immutable. if it is "var" it means it is mutable. what is there to talk about?
[05:49:51] <CodeWar> val is immutable vs final is immutable... isnt the later more English
[05:50:03] <pstickne> why don't you use AppleScript?
[05:50:10] <CodeWar> either ways does it add more value to the language
[05:50:24] * CodeWar starts using AppleScript
[05:50:27] <pstickne> CodeWar: val is so easy to use SO IT WILL BE USED
[05:50:59] <pstickne> CodeWar: I would say that at least 9/10 of the variables I use in Scala are val. You /can/ do the same in Java, and I do, but it /adds no clarity/.
[05:51:04] <CodeWar> reminds me of C programmers that till date do this and find it soo cool and easy bool getValue(int a ){ return !!a;}
[05:51:57] <CodeWar> the most elegant one liner code bases are not necessarily the easiest to read or maintain but never mind I m just ranting I havent given Scala a clean try so my judgement doesnt count
[05:52:11] <r0bby> wtf
[05:52:14] <r0bby> double negation
[05:52:17] <pstickne> CodeWar: out of all the problems that Scala has (and it does have some dark corners), this val/var is -not- one of them (well, var might be one of them; some people would preference just references like in SML)
[05:52:22] <pfn> r0bby, simple, returns a 0 or 1
[05:52:29] <CodeWar> pfn, yes
[05:52:33] <pfn> I don't know any c programmers that care to do that, in any case
[05:52:37] <CodeWar> extremely clever and elegant but not clear to read
[05:52:39] <r0bby> if it's 0 then 1 if it's 1 then 0
[05:52:50] <pfn> r0bby, returns a 0 or 1, regardless of the value of a, duh
[05:52:55] <r0bby> hrm
[05:52:57] <pstickne> CodeWar: first off, why would a C programmer do that? do you know what a true value in C is?
[05:52:58] <CodeWar> r0bby, if its 50 it will return 1
[05:53:07] <pfn> because if (a) already treats it as a boolean "correctly"
[05:53:24] * r0bby will NOT admit to know C at _ALL_
[05:53:31] <pfn> CodeWar, and if anything, that should be implemented as a macro, not a function :p
[05:53:33] <r0bby> I know it a basic level and that's about it
[05:53:33] <CodeWar> that instead of getValue(int a ){ if (a == 0){ return FALSE;}else{ return TRUE;}
[05:53:44] <pstickne> CodeWar: WHY?
[05:53:47] <pstickne> CodeWar: C fail
[05:53:50] <pfn> a == 0 ? 0 : 1, duh
[05:54:02] <pstickne> CodeWar: 0 is the only false integer. next.
[05:54:11] <pfn> pstickne, indeed
[05:54:44] <CodeWar> pstickne, sorry I didnt follow much of what you typed but I see you seem to disagree :)
[05:54:52] <pstickne> CodeWar: anyway, start writing code using 'final' as much as possible; it /will/ help you write better code, however it is ungodly unwieldy
[05:55:16] <pstickne> (final for local variables and data members)
[05:55:42] <twobytes> C rulez
[05:55:43] <twobytes> :P
[05:56:13] <twobytes> *( 0x0 + offset ) = 31337;
[05:56:29] <CodeWar> oh yea!! I dont do stuff like that even inside gdb :)
[05:56:29] * pstickne smacks twobytes around
[05:57:17] <twobytes> pstickne: is that to help not write bloated code?
[05:57:46] <hiredman> it helps you write code with less concurrency bugs
[05:58:00] *** Thorn has quit IRC
[05:58:01] <pstickne> twobytes: no; but striving to use final, at least for me, helps to reduce mutable state -- I'm not arguing for complete removal, but it really helps "pull in the scope".
[05:58:07] *** josemoreira has quit IRC
[05:58:20] <twobytes> oh ok
[05:58:43] *** twobytes is now known as zerobytes
[06:00:12] <CodeWar> concurrency bugs :)
[06:00:39] *** durka42 has joined ##java
[06:01:18] <pstickne> threading is such a pita :(
[06:01:31] <hiredman> *cough* clojure *cough*
[06:02:05] <CodeWar> typedef STATUS int; #define STATUS_OK 0 #define STATUS_ERROR 0xffffffffff STATUS someFunction(){ }. We used to have a code base with this in C. suddenly a rebase happened and it became BOOL someFunction. voila passing instances became failing ones and vice versa
[06:02:21] <pstickne> hiredman: it looks promising. I'm still a fan of static typing though...
[06:02:36] <hiredman> *shrug*
[06:02:40] <pstickne> hiredman: but I like how it isn't just-another-precompiled-JVM-language
[06:02:49] *** waz has joined ##java
[06:03:34] <pstickne> CodeWar: well, someone sucked there, no?
[06:03:48] <hiredman> the type hinting you add to get rid of reflection and improve performance is kind of like incremental typing
[06:04:14] <CodeWar> pstickne, actually we didnt have a lot of tests either so we found out after 5 days of the rebase
[06:04:25] <pstickne> hiredman: I just want the compiler to tell me I'm a retard before I run anything if possible :-) [I need all the help I can get...]
[06:04:39] <pstickne> s/retard/problem sitting at a chair/
[06:06:01] <r0bby> pstickne: hack openjdk to call you a douchebag at random times during compilation.
[06:06:35] <pstickne> r0bby++ (all the encouragement I ever need!)
[06:06:37] <hiredman> Hey Douchebag, ClassCastException
[06:06:57] <pstickne> hiredman: I actually borrowed the "rebinding loop" idea of clojure for the language I'm working on at school.
[06:10:41] <r0bby> pstickne: or for all exceptions: "Hey Douche, look what I found wrong with your code:"
[06:10:51] * r0bby giggles
[06:11:06] <joed> ~be r0bby
[06:11:06] <javabot> FileNotFoundException is a subclass of IOException; Exception won't directly catch that.
[06:11:23] <CodeWar> A = array[\ZZ32\](7)
[06:11:26] *** rullie has quit IRC
[06:11:28] <r0bby> why did I not see thathappening
[06:11:44] <joed> r0bby: Because you are an idiot?
[06:11:45] <pstickne> r0bby: would it offer suggestions too? :)
[06:11:54] <r0bby> pstickne: hell no
[06:11:55] *** vulture has joined ##Java
[06:11:58] <r0bby> what's the point of insulting
[06:12:07] <r0bby> joed: I love you too
[06:13:03] *** karstensrage has quit IRC
[06:17:13] *** CodeWar has quit IRC
[06:17:45] *** The_Birdman has joined ##java
[06:17:49] *** staykov has quit IRC
[06:18:14] *** karstensrage has joined ##java
[06:18:52] *** kavon has joined ##java
[06:19:18] <kavon> could one mix strings and bytes in the same file?
[06:20:29] <hiredman> …
[06:20:30] *** noobraska has quit IRC
[06:20:48] <joed> kavon: Huh?
[06:21:08] <AMcBain> you can put anything in a file ... whether or not something can interpret it is a different story.
[06:22:01] <phix> hey, any one experienced with java look and feel stuffs?
[06:22:28] <kavon> AMcBain: hrm, i should try it myself before thinking out loud, hang on lets see if it works
[06:22:34] <phix> I want to use the system look and feel but change the behavour of on focus (atm I just want the background colour to change to something else)
[06:22:49] <phix> could this be done with synth?
[06:23:09] <phix> can synth extend system look and feel and just make the definied changed?
[06:23:12] <phix> chanages
[06:25:08] <pstickne> kavon: what is a string? what is a bunch of bytes?
[06:26:30] <joed> It could be a startup!!@!@!@
[06:26:44] *** f3ew has joined ##java
[06:27:18] <joed> It could also be yet another failed homework..
[06:28:34] *** J0bk has joined ##java
[06:28:48] <phix> ummm any one actually use Java for GUI projects in here?
[06:29:07] <phix> I never seem to find anyone who has a clue about Swing
[06:29:08] <hiredman> GUI?
[06:29:09] <AMcBain> yes.
[06:29:20] *** delskorch has quit IRC
[06:29:21] <AMcBain> but I have no idea about your question, so I didn't reply.
[06:29:23] <AMcBain> try ##swing
[06:29:31] <da_shadow> phix: Yes, but looking back at your previous question, neva played with the l&f
[06:30:15] <phix> AMcBain: ah ok :) well any answer is better than no answer
[06:30:39] <phix> AMcBain: so as I know my Internet connection is working and I havn't been banned or mass ignored in the channel ;P
[06:30:51] <phix> da_shadow: ah ok
[06:31:25] *** FireSlash has quit IRC
[06:31:56] *** Junior has joined ##java
[06:32:01] *** gdoko has joined ##java
[06:32:48] *** f3ew has quit IRC
[06:34:45] *** spiderbyte has joined ##java
[06:38:59] *** Fosco999 has quit IRC
[06:41:01] *** f3ew has joined ##java
[06:42:33] *** blankthemuffin has joined ##java
[06:43:26] *** vix85 has joined ##java
[06:45:10] <r0bby> phix: ##swing has a lot of swing gurus
[06:45:12] <r0bby> and AMcBain is one :)
[06:45:33] <AMcBain> yeah ... save for this issue. I just set the system l&f and let it be :P
[06:46:00] <kavon> woot I figured it out all on my own
[06:46:13] <kavon> DataInput/OutputStream rocks
[06:46:19] * AMcBain loves his stream Widget :)
[06:46:41] <r0bby> kavon: Streams are for binary data; Readers for ascii
[06:46:56] <r0bby> nutjob
[06:47:00] <AMcBain> ?
[06:47:22] <r0bby> AMcBain: you heard me, but i love you :) and in that way too.
[06:47:29] <kavon> r0bby: yea I solved my problems with the magical available() to find out how many more bytes are left
[06:47:43] <joed> Wow
[06:47:45] *** pgib has joined ##java
[06:47:55] <r0bby> reading the api... what a novel idea
[06:48:06] <r0bby> of course this is all cleanly documented too.
[06:48:09] <r0bby> ~Io
[06:48:10] <javabot> r0bby, Io is http://java.sun.com/tutorial/essential/io
[06:48:11] <AMcBain> what? it's a Y!WE Widget someone wrote that reads the index file made by IceCast and has a little window that slides up into view when the song changes.
[06:48:23] <kavon> r0bby: sad thing is my ap comp sci class still doesn't know what an API is, and the course is in Java :x
[06:48:27] <AMcBain> (with the artist and song name)
[06:49:17] <r0bby> kavon: you're being robbed.
[06:49:37] <kavon> r0bby: i came into the course knowing a lot, don't worry about me
[06:49:50] <r0bby> your class doesn't know how to read a book?
[06:49:53] <kavon> r0bby: i feel bad for people who manage to pass the ap test
[06:50:07] <r0bby> I feel bad for the people they'll eventually work for
[06:50:12] <r0bby> and with
[06:50:15] <AMcBain> In my CS classes we rarely crack the the book :P but we've got good classes/courses.
[06:50:29] <joed> Dear lord...
[06:50:38] <kavon> r0bby: well they're all lazy and don't care about anything, copy my code or beg me for help
[06:50:52] <kavon> i hope they all fail the ap test hard
[06:50:54] <r0bby> kavon: shut them out.
[06:50:58] <r0bby> stop helping
[06:51:05] <kavon> r0bby: i really should
[06:51:16] <r0bby> you're only hurting them in the end
[06:51:32] <pgib> yeah, I had to do that. A friend of a friend who was totally incompetant in programming. I tried to help him, but when all he wanted was the answer, I had to shut him out
[06:51:50] *** jorgenpt has joined ##java
[06:52:05] <kavon> r0bby: i get yelled at for doing "fancy stuff" by my instructor too
[06:52:05] *** looner has left ##java
[06:52:11] <ScottG489> aparently i cant wuit because F10 is bound to open up File
[06:52:13] <r0bby> "fancy"
[06:52:32] <r0bby> ScottG489: huh?
[06:52:33] <inspiron630> (Integer)(x*y) can i case as an integer object
[06:52:41] <r0bby> no you can't
[06:52:51] <joed> sigh...
[06:52:56] <r0bby> ~~ inspiron630 switch
[06:52:56] <javabot> inspiron630, switch is http://java.sun.com/tutorial/java/nutsandbolts/switch.html
[06:53:00] <joed> How about you try?
[06:53:01] <r0bby> go read that
[06:53:06] *** traskbt has joined ##java
[06:53:16] <r0bby> and inspiron630 for the love of god try shit before you ask
[06:53:23] <ScottG489> r0bby: well F10 is to quit htop but when i press it it opens up basically the same thing as "Alt + F"
[06:53:32] <r0bby> you can switch only on primitive dtata types and enums as of java 5.
[06:54:07] <pgib> ScottG489, what happens if you clear the listener after the component is initialized?
[06:54:08] <r0bby> data*
[06:54:20] <ScottG489> pgib: uhhh, what?
[06:54:32] *** blankthemuffin has quit IRC
[06:54:36] <r0bby> ScottG489: you have to actually ask a question
[06:54:39] <r0bby> or was there not one
[06:55:04] <pgib> well true, I guess I assumed he wanted to reclaim the F10 key
[06:55:06] <ScottG489> sorry i was sidetracked by tring to figure out what invert does in htop
[06:55:26] <ScottG489> pgib: Whats a listener and what component?
[06:55:38] *** t0h has quit IRC
[06:55:52] <r0bby> ScottG489: swing.
[06:55:55] <r0bby> an event listener
[06:56:11] <r0bby> a component is something like a JLabel, JTextField, etc
[06:56:16] *** beol has joined ##java
[06:56:19] <traskbt> I'm having trouble converting a string to a double.
[06:56:23] <traskbt> http://pastebin.com/m63cea5e1 is my error
[06:56:32] <r0bby> ~~ traskbt java String to double
[06:56:32] <pgib> Scott, Oops, I though you were AMcBain who was asking a JS question
[06:56:32] <javabot> traskbt, I have no idea what java String to double is.
[06:56:36] <r0bby> ~~ traskbt google java String to double
[06:56:37] <javabot> http://letmegooglethatforyou.com/?q=java+String+to+double
[06:56:37] *** TheCastor has quit IRC
[06:56:41] <r0bby> ~next
[06:56:41] <javabot> Another satisfied customer. Next!
[06:56:46] <ScottG489> wo wait how the hell did i get on this channel
[06:56:57] <AMcBain> pgib: what? I haven't asked on in here in forever, and most were jokes!
[06:57:30] <pgib> yeah, I just got your JS topic crossed with Scott's Question
[06:57:38] <pgib> cause I'm 1/2 intoxicated
[06:57:38] *** amz has quit IRC
[06:57:39] *** durka42 has quit IRC
[06:58:01] *** amz has joined ##java
[06:58:03] <r0bby> traskbt: Double.parseDouble(tempF); is what you're looking for.
[06:58:12] <ScottG489> pgib: forget im here, i thought i was on #linux on another server :(
[06:58:13] <traskbt> Just found it, thanks.
[06:58:21] <r0bby> traskbt: consider googling
[06:58:24] <r0bby> you CANNOT do that
[06:58:45] <r0bby> you have to use thw wrapper class
[06:58:46] *** blankthemuffin has joined ##java
[06:59:34] *** f3ew has quit IRC
[07:04:05] *** amz has quit IRC
[07:05:01] *** brady_k has joined ##java
[07:05:32] <traskbt> How do I make a variable equal to an equation? (double tempFtoC = ((5 / 9) * (tempFDouble - 32)); is what I'm trying to do, but the equation doesn't work)
[07:05:36] *** EruditeHermit has joined ##java
[07:06:13] <ernimril> traskbt: "doesn't work"?
[07:06:17] <dangertools> traskbt: what is 5/9?
[07:06:33] <traskbt> ernimril, it returns 0.0 everytime.
[07:06:44] <ernimril> traskbt: yes, that is as expected
[07:07:19] <traskbt> But not intended, what did I do wrong?
[07:07:29] <ernimril> traskbt: what is 5/9?
[07:07:29] *** t0h has joined ##java
[07:08:08] <traskbt> Part of the equation, .55~
[07:08:15] <dangertools> wrong
[07:08:31] <dangertools> 5.0/9.0 is .55, 5/9 is 0
[07:08:44] <ernimril> traskbt: you are doing _integer_ division
[07:08:58] <traskbt> Ah, thank you.
[07:09:01] <traskbt> Just fixed it.
[07:09:12] *** Levia has quit IRC
[07:09:45] <pstickne> I really don't like the promotion of int to a float in any language :(
[07:09:45] <brady_k> exit
[07:09:48] <pstickne> fail
[07:09:49] <brady_k> oops sorry
[07:09:51] <brady_k> haha
[07:09:55] *** brady_k has quit IRC
[07:12:46] *** onats has joined ##java
[07:13:04] <onats> hi, is it possible to dump the core of a jvm to a file for java 1.4?
[07:13:10] *** ahughes has quit IRC
[07:13:52] <ernimril> onats: why do you want to do that?
[07:15:31] *** repnop has quit IRC
[07:15:45] <onats> ernimril, there are threads that are not being closed and i would like to determine the causes
[07:15:56] *** TooAngel has quit IRC
[07:17:38] *** jcp is now known as javawizard2539
[07:19:15] *** traskbt has quit IRC
[07:19:34] *** zophy[] has quit IRC
[07:19:54] *** javawizard2539 is now known as jcp
[07:20:54] <pstickne> onats: and a core would help? :(
[07:21:19] <onats> pstickne, probably.. just looking at my options
[07:21:26] <onats> im not sure though
[07:21:29] <jcp> seriously though, pastebin it again. The last one was awesome.
[07:21:44] <pstickne> jcp: last core?
[07:21:53] <jcp> oh heh
[07:21:54] <jcp> wrong channel
[07:21:57] <jcp> nvm
[07:24:49] *** boringwall has quit IRC
[07:25:28] <onats> any suggestions?
[07:27:54] <hiredman> what do you mean by "not being closed"
[07:28:14] *** Frostix has quit IRC
[07:29:54] *** pgib has quit IRC
[07:30:34] *** meanburrito920_ has quit IRC
[07:31:22] *** selckin has joined ##java
[07:31:23] *** f3ew has joined ##java
[07:31:35] *** Junior has quit IRC
[07:33:06] *** brady_k has joined ##java
[07:33:13] <brady_k> join ##java
[07:33:14] <brady_k> ;-)
[07:33:25] *** beol has quit IRC
[07:34:15] <brady_k> question... if I'm creating a linked list of objects, and i use only next and tail pointers... the constructor for that list would set those as null, right?
[07:34:17] *** Mkop2 has joined ##java
[07:35:34] <r0bby> yes brady_k
[07:35:54] <brady_k> thanks, that's what i thought r0bster
[07:36:03] <r0bby> if there is no data in the list the next and prev pointers would be null
[07:36:21] *** zophy has joined ##java
[07:39:58] *** carrus85 has joined ##java
[07:41:32] *** sebr is now known as sebr_afk
[07:42:30] *** mengu has quit IRC
[07:42:31] <cybereal> ~ping
[07:42:31] <javabot> http://www.nataliedee.com/071405/ping.jpg
[07:47:04] <onats> hiredman, basically the problem is that the java process is growing to gigabytes in size... i need to be able to identify what is causing it...
[07:47:53] *** epalm has joined ##java
[07:48:28] *** deepjoy has joined ##java
[07:49:32] *** epalm has quit IRC
[07:51:14] *** gdoko has quit IRC
[07:54:19] *** trustin has quit IRC
[07:54:40] *** trustin has joined ##java
[08:01:26] *** EruditeHermit has quit IRC
[08:02:59] *** da_shadow has left ##java
[08:04:54] *** vix85 has quit IRC
[08:06:29] <neshaug> ~~ onats profiler
[08:06:29] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169
[08:07:45] <onats> neshaug, thanks!
[08:10:17] <neshaug> onats: yourkit is easy to install but not free, does come with a 15 days trial
[08:10:56] *** xabbuh has joined ##java
[08:13:07] <onats> neshaug, but these seem to support only 1.6 and above?
[08:14:34] <Csow> ~pastebin
[08:14:34] <javabot> http://rifers.org/paste Paste the final url after you've pasted your stuff there.
[08:14:37] *** push[EAX] has quit IRC
[08:17:36] <brady_k> does anybody love linked lists?
[08:18:01] <brady_k> nevermind.
[08:18:26] <letfunbegin> what.
[08:18:50] <brady_k> letfunbegin: don't worry about it. silly question! nobody *loves* linked lists...
[08:19:11] <Csow> error message at end of paste http://rifers.org/paste/show/8797
[08:19:21] *** epalm has joined ##java
[08:20:24] <dangertools> Csow: you cannot cast Object[] to String[]
[08:20:54] <Csow> the string is there a way to make it object
[08:21:05] <letfunbegin> Csow, what's the point of reassigning the parameter newEntry?
[08:21:13] *** brady_k has left ##java
[08:21:47] *** Junior has joined ##java
[08:21:52] <Csow> all i want is an array then use list to add things
[08:22:36] <Csow> so line 37 is not needed
[08:22:49] *** [[thufir]] has joined ##java
[08:23:49] *** morkar- has joined ##java
[08:24:24] *** btb996 has joined ##java
[08:24:25] <Csow> nope i think it is indeed needed
[08:24:28] *** inspiron630 has quit IRC
[08:24:44] *** mgenov has joined ##java
[08:25:52] *** waz has quit IRC
[08:26:44] *** mgenov has quit IRC
[08:26:54] *** pierrep has joined ##java
[08:27:41] *** btb996 has quit IRC
[08:27:55] *** mgenov has joined ##java
[08:32:19] *** Thamster has joined ##java
[08:32:25] <Csow> i guest the solution is to restart from 0
[08:32:32] *** asap18 has quit IRC
[08:32:37] *** Archon has joined ##java
[08:33:07] *** Mkop2 has quit IRC
[08:34:41] *** cactaur has quit IRC
[08:34:50] <letfunbegin> I'd do that. but you got the answer for the error message ^^ :)
[08:36:21] *** geaaru has joined ##java
[08:38:27] *** ldamwork has quit IRC
[08:39:57] <Csow> thanks good night
[08:44:11] *** bindaas has joined ##java
[08:44:55] *** brady_k has joined ##java
[08:45:33] <brady_k> alright. http://pastebin.com/d2ae06954 so if i'm creating a linked list of objects, and trying to traverse them in order to display them (line 22), why does that not work as expected?
[08:45:47] *** steve-e has joined ##java
[08:47:55] *** doc`` has quit IRC
[08:48:49] <brady_k> http://pastebin.com/d507151cd includes input values
[08:51:33] <jorgenpt> So is "MyClass.class.isInstance(some_variable)" the "right" (best?) way to check if some_variable is an isntance of MyClass or a derived class?
[08:51:36] <jorgenpt> instance*
[08:52:57] <neshaug> ~~ jorgenpt instanceof
[08:52:57] <javabot> jorgenpt, instanceof is a way for checking if a given object is of a certain type. See http://mindprod.com/jgloss/instanceof.html for examples.
[08:53:00] <letfunbegin> no
[08:53:05] <letfunbegin> ^ yes :)
[08:53:06] *** mele- has quit IRC
[08:53:23] <jorgenpt> Aha. :-)
[08:53:33] <brady_k> any thoughts on my question, anybody?
[08:53:44] <jorgenpt> Hm, perhaps I'll just use MyClass.class.cast(some_variable) instead. Saves me having to throw an exception myself.
[08:54:00] <letfunbegin> ?
[08:54:15] <letfunbegin> jorgenpt, which exception does that throw?
[08:54:37] *** hoerup has joined ##java
[08:54:48] <jorgenpt> ClassCastException
[08:55:06] <letfunbegin> so does casting via the (MyClass) construct
[08:55:15] <jorgenpt> Ah.
[08:55:20] <jorgenpt> Guess I could just cast it, then. :-)
[08:55:32] <letfunbegin> if you want to test that you can just catch that, but it's not so clean since you won't know where it was thrown from :)
[08:55:40] <letfunbegin> therefore instanceof is the win
[08:55:44] <letfunbegin> :)
[08:56:16] <jorgenpt> Well, I don't need a "pretty error", this is more of an assert-type thing. "What the heck? Mr. Programmer, you've done something wrong."
[08:56:52] <letfunbegin> I see, it's just the control I'm arguing for
[08:57:49] *** Levia has joined ##java
[08:58:07] <jorgenpt> Yeah, I won't be catching it, at least not at a place where I need to know if it's that specific operation or something it indirectly does.
[08:58:29] *** donavan has quit IRC
[09:00:40] <peyman_t> brady_k: what's the output?
[09:01:15] *** Angel-SL has joined ##java
[09:01:35] <brady_k> peyman_t: wrong. http://pastebin.com/d4d643f47 at the bottom
[09:01:58] *** langenberg has quit IRC
[09:02:36] <brady_k> peyman_t: oh shit. nevermind. i needed to do ".data.value" not just ".data"
[09:02:53] <peyman_t> brady_k: good!
[09:03:04] <brady_k> peyman_t: haha yeah
[09:03:54] *** agnul has joined ##java
[09:05:11] *** Archon has left ##java
[09:05:48] *** Bevin has joined ##java
[09:07:40] *** _bugz_ has joined ##java
[09:09:21] *** dpy has joined ##java
[09:10:41] *** doc`` has joined ##java
[09:11:45] <pstickne> When I try to render 800x600 @ 12fps (via repaint), by CPU usage goes up by nearly 50% (about 70% usage). This is just a "scale" from a 320x200 source; any ideas on optimizing this? (I thought the new 1.6 graphics had better hardware support...)
[09:12:13] <pstickne> (It runs at only about 20% CPU when rendering as 100x60ish)
[09:13:28] *** frosch has joined ##java
[09:13:28] *** toader has joined ##java
[09:13:33] <toader> hi, could anybody help me on this problem? thanks! http://rafb.net/p/eo0MFD38.html
[09:13:37] *** dnmo has quit IRC
[09:14:11] <brady_k> toader: even i know that just saying that isn't going to help you.
[09:14:53] *** scizzo- has quit IRC
[09:15:09] <brady_k> question... if you have a public variable in a class, how do you access that variable from within a subclass?
[09:15:50] *** Resistance has quit IRC
[09:16:00] <letfunbegin> via super
[09:16:21] <brady_k> letfunbegin: i tried that. "super(this).theVar" returns an error
[09:16:34] <letfunbegin> super(this) is a constructor call
[09:16:40] <letfunbegin> super.myvar
[09:17:15] *** donavan has joined ##java
[09:18:22] <letfunbegin> brady_k, super.theVar for your terminology
[09:18:37] <brady_k> letfunbegin: yeah i know. thanks for the clarification though ;-)
[09:18:41] <letfunbegin> sure :)
[09:18:43] <brady_k> however, it still throws an error
[09:19:54] *** amitev has joined ##java
[09:20:05] <toader> brady_k: what do u mean
[09:20:44] <brady_k> http://pastebin.com/d3609dc31 line 52 says it's invalid, attempting to reference var declaration on line 2
[09:22:05] <doc``> http://pastebin.com/m23b777a9 wondering why the timing is off, it should be an O(n^2) algorithm any ideas?
[09:22:15] <toader> hi, could anybody help me on this problem? thanks! http://rafb.net/p/eo0MFD38.html
[09:22:51] <brady_k> letfunbegin: that last one was aimed at you, just in case you didn't see it... http://pastebin.com/d3609dc31 line 52 says it's invalid, attempting to reference var declaration on line 2
[09:24:03] <letfunbegin> Entry isn't exactly a subclass of BigMatrix - it's an inner class
[09:24:04] *** arpu has quit IRC
[09:24:14] *** Kernel is now known as Wicked
[09:24:23] *** onats has left ##java
[09:24:26] <brady_k> letfunbegin: oh. sorry, i'm new to java and not fully into the terminology yet...
[09:24:27] <letfunbegin> a subclass would be a class like: class A extends BigMatrix {}
[09:24:28] *** thefalling has quit IRC
[09:25:05] <brady_k> letfunbegin: ok. so if this is an INNER class, how do you access the ... outer?... vars?
[09:26:37] <letfunbegin> now it has no access to the instance of the class, so you need to supply it with an instance. or make the variable 'static' (I'm just saying, now claiming this has anything to do with good design!)
[09:27:34] *** ldamwork has joined ##java
[09:28:21] <brady_k> well... i can't supply it with an instance
[09:28:50] <brady_k> nor can i change it to a static
[09:28:55] <brady_k> are those the only ways?
[09:29:01] <letfunbegin> you could supply the variable
[09:29:07] <pr3d4t0r> :: yawn ::
[09:29:10] <letfunbegin> :)
[09:29:11] <pr3d4t0r> It's almost bedtime...
[09:29:15] <pr3d4t0r> r0bby: So, dude.
[09:29:15] <brady_k> letfunbegin: no but i can't ;-) per spec
[09:29:34] <pr3d4t0r> r0bby: Is there anything else that you may want to keep secret?
[09:29:35] <brady_k> letfunbegin: i could create a "editColVal()" method i guess?
[09:29:44] <brady_k> pr3d4t0r: maybe he hasn't showered in awhile again?
[09:29:56] <pr3d4t0r> r0bby: Nothing like posting a status message to Facebook to ensure that nobody sees it.
[09:30:09] *** geaaru has quit IRC
[09:30:10] <brady_k> pr3d4t0r: hahaha what was that message?
[09:30:18] <tazle> pr3d4t0r: good morning to you too
[09:30:23] <pr3d4t0r> brady_k: It's a secret. It was just amusing.
[09:30:26] <pr3d4t0r> tazle!
[09:30:31] *** Spike1506 has joined ##java
[09:30:31] <brady_k> pr3d4t0r: oh, ok. fine then.
[09:30:32] <letfunbegin> brady_k, you just want to tell the Entry what the variable is? then why not supply it to the Entry in its constructor for instance?
[09:31:28] <brady_k> letfunbegin: i need to to a "if current col value is greater than set column max value, store current as set max" from within Entry, since Entry is what parses the data
[09:31:38] *** thepointer-work has quit IRC
[09:31:46] <brady_k> letfunbegin: however, the parameters of Entry's constructor were spec'd, and i can't add ones when i just feel like it
[09:32:32] *** blankthemuffin has quit IRC
[09:33:23] <letfunbegin> well, without reflection there's just the two options (the way I see it): either supply an instance or the variable, or make the variable static
[09:34:22] <brady_k> letfunbegin: hmmmmm
[09:34:27] *** epalm has quit IRC
[09:34:44] *** koskoz has joined ##java
[09:34:47] <koskoz> hi
[09:34:53] *** jkriesten has joined ##java
[09:35:07] *** vesz has joined ##java
[09:35:10] <koskoz> i'm using swing and i've got some problems with a sub window
[09:35:12] *** donavan has quit IRC
[09:35:21] <koskoz> i've got my main window, a jpanel
[09:35:44] <koskoz> and a sub window, a jframe, but i can't set a title or even a size to this window
[09:36:02] <koskoz> and i can't figure out why
[09:36:24] <AMcBain> uh ... you shouldn't be able to add a JFrame to another top-level component ... or if you can, it's a very bad idea.
[09:36:34] *** blankthemuffin has joined ##java
[09:36:48] <AMcBain> you might want to investigate JDesktopPane and JInternalFrames.
[09:37:04] <koskoz> ok, i'll check this two components, thanks :)
[09:37:10] *** dnmo has joined ##java
[09:38:32] <AMcBain> I will also tell you, right of the bat, that JInternalFrames tend to look kinda shitty with the (current) default L&F ... they can look better with the system L&F, if you have a good one (on linux they are the same, so it doesn't matter)
[09:38:39] <AMcBain> right off*
[09:39:50] <AMcBain> (just my 2¢)
[09:39:50] <koskoz> if i've understood, my main window should extends JDesktopPane et all the other windows JInterlFrame ?
[09:40:10] *** bas-i has joined ##java
[09:40:10] <AMcBain> ah ... no. you can add JDesktopPane as the content-pane to your default JFrame.
[09:40:26] <AMcBain> then when you add stuff to that JFrame, it'll be on the JDesktopPane.
[09:40:46] <koskoz> no more jpanel ?
[09:41:41] <AMcBain> you can still add JPanels to JDesktopPanes ... but if you were just using that to add your JFrame before, you don't need it. you just add the internal frames directly to the JFrame (which will forward to the content-pane, which is now a desktop-pane)
[09:42:07] <AMcBain> (JDesktopPanes are also useful for making application-modal internal dialogs which are trapped within the application window, reducing their evil to an extent)
[09:42:37] <brady_k> letfunbegin: oh i got it. http://pastebin.com/d3609dc31 do it after line 18 because "instance" will have a .col value afterwards... duh!
[09:42:40] <brady_k> letfunbegin: thanks though
[09:42:51] <letfunbegin> sure :)
[09:42:55] <koskoz> hum, i'm realy noob to java, and more to swing :/
[09:44:05] <koskoz> AMcBain : for the moment, i've got this : http://pastebin.com/d89823ba
[09:44:06] <AMcBain> well, what are you trying to do? from my perspective, you want to have a JFrame container with a JFrame-like item inside of that.
[09:44:32] <letfunbegin> koskoz, read the swing tutorials: http://java.sun.com/docs/books/tutorial/uiswing/components/index.html it's time well spent imo
[09:44:32] <koskoz> and in my MenuBar i call my AboutWindow like this :
[09:44:33] <koskoz> AboutBox aboutBox = new AboutBox();
[09:44:34] <koskoz> aboutBox.setVisible(true);
[09:45:06] *** zophy has quit IRC
[09:45:16] <koskoz> letfunbegin : yeah, i know, already started
[09:45:19] *** [[thufir]] has quit IRC
[09:45:30] <AMcBain> okay, so let me get this straight ... you want a normal JFrame (with whatever layout mangers, etc.) for your regular contents, but the ability to have an internal frame for an about window?
[09:45:45] <koskoz> i think so
[09:46:59] *** mazzachre has joined ##java
[09:47:26] <AMcBain> okay, we're going to "cheat" ... you want to set the glass pane of the outer JFrame to be an instance of a JDesktopPane. Don't forget to do setOpaque(false) on the JDesktopPane before adding it, otherwise it'll obsure everything. Then, after you add it, set it visible. Later on, you should be able to add JInternalFrames to the glass pane and not only will they appear on top of everything, you can still have a normal content-pane (JPanel, etc).
[09:48:00] *** brady_k has left ##java
[09:48:10] *** foo-nix has joined ##java
[09:48:12] <AMcBain> Does that make any sense?
[09:48:39] *** jcp has quit IRC
[09:48:46] *** foo-nix has quit IRC
[09:48:59] <koskoz> AboutWindow has to be a separate window, because i'm not rly sure that we want to do the same thing
[09:49:01] *** foo-nix has joined ##java
[09:49:45] <AMcBain> do you, or do you not, want the about window to be *inside* the main window?
[09:50:21] <koskoz> no, i don't, it's an other window
[09:50:43] <koskoz> it's already working, but i can't set its title or even its size
[09:51:13] <AMcBain> you weren't very explicit with your original description then ... you led me to believe that you'd tried to add this window to another JFrame ... which you can't/shouldn't do.
[09:51:38] <AMcBain> (which may result in those problems, I don't know ... I haven't tried)
[09:52:03] <koskoz> yeah, sorry, my english is not very good
[09:52:31] <AMcBain> can you pastebin a test case, the minimal code that causes this issue, so that I can check it out?
[09:53:26] <AMcBain> if the issue doesn't exist, maybe something you didn't add to your test case that's present in your real code is the issue. if it still exists, then I'll take a look.
[09:53:47] *** shervin_a has joined ##java
[09:54:03] <koskoz> AMcBain : my AboutWindow class : http://pastebin.com/d4fe19061
[09:55:09] <AMcBain> That's not really a test case, and just looking at it, I see a JFrame that just sits there. Plus, this looks like some kind of GUI-builder /might/ have made it, given the "initComponent" method.
[09:55:28] <AMcBain> (if you want to change the size of the outer frame, why do you create a new JFrame)
[09:55:31] <koskoz> no, it's just me
[09:56:04] *** NiSoOo has joined ##java
[09:56:38] <koskoz> arf, i don't know what is a test case :/
[09:56:50] <AMcBain> ~testcase
[09:56:50] <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.)
[09:57:11] <AMcBain> (the link may be broken)
[09:57:56] *** convivial has quit IRC
[09:58:23] *** JohnBat26 has joined ##java
[10:01:47] *** mitch0 has joined ##java
[10:02:06] *** gregor_k has joined ##java
[10:03:21] *** JohnBat26 has quit IRC
[10:03:23] <mitch0> if I exectue an sql query from java like "select * from t where id = ?" (and set the param, like new Integer(1)), does that count as a parametrized query, or it still counts as a constant value in the where ?
[10:03:24] *** gfather has joined ##java
[10:03:29] <gfather> hello guys
[10:03:35] *** giaco has joined ##java
[10:03:36] *** JohnBat26 has joined ##java
[10:03:56] <gfather> what linux distro you prefer to develop java ? or to work on java
[10:04:12] <mitch0> I ask because of this: "Constraint exclusion only works when the query's WHERE clause contains constants. A parameterized query will not be optimized, since the planner cannot know which partitions the parameter value might select at run time. "
[10:04:15] *** teralaser has joined ##java
[10:04:25] *** SinisterBen has quit IRC
[10:06:12] <cybereal> mitch0: that depends on the driver's implementation, but chances are it's a parameterized query
[10:06:40] <mitch0> hrmp
[10:06:46] <cybereal> mitch0: if you want to try and make a different query for every value as you encounter it (quite stupid depending on the scenario) then there are other escaping options to keep things safe...
[10:06:53] <cybereal> ~jdbc escape syntax
[10:06:53] <javabot> cybereal, jdbc escape syntax is http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/statement.html#1006519
[10:07:28] <mitch0> cyb: well, I just don't see why can't it do the planning after it sees the actual values...
[10:07:41] <cybereal> because it does the planning before
[10:07:46] <mitch0> I'll take a look into it when I have a bit of time. till then we'll stick with oracle
[10:07:51] *** jabalsad has quit IRC
[10:09:06] *** assertsmart has joined ##java
[10:10:52] *** Levia has quit IRC
[10:11:10] *** Woflborg has joined ##java
[10:12:16] *** Level1 has joined ##java
[10:12:50] <Level1> hi, can NIO be used for network communication as a replacement for sockets, or is that a misunderstanding of NIO?
[10:13:03] <cybereal> it doesn't replace sockets at all
[10:13:07] <cybereal> or any of your basic I/O outlets
[10:13:12] <Level1> ic, my mistake
[10:13:19] *** Levia has joined ##java
[10:13:32] <cybereal> it's just a different API for interacting with it, based on selectors, like basicallye very other language had for years before via support or emulation for c's poll() call :)
[10:13:49] <cybereal> so NIO is ideal when you need to deal with asynchronous I/O
[10:14:12] <Level1> if I want to implement a very exotic network, should I just use sockets or is there a better way?
[10:14:39] <cybereal> Sockets are a high level piece of an already implemented network, so your question doesn't make much sense to me
[10:15:28] <Level1> well, I was refering to application layer
[10:15:29] <mitch0> nio is preferable even if you don't need async operation because of its use of Buffers
[10:17:16] <Level1> is there a class that represents ip addresses?
[10:17:29] <mitch0> InetAddress?
[10:17:31] <AMcBain> ~~Level1 InetAddreess
[10:17:31] <javabot> Level1, I have no idea what InetAddreess is.
[10:17:37] <AMcBain> ~~Level1 javadoc InetAddress
[10:17:39] <javabot> Level1: http://is.gd/jFl3 [java.net.InetAddress]
[10:17:39] <Level1> haha
[10:17:42] <Level1> thanks
[10:21:08] *** valcker has joined ##java
[10:25:08] *** Fox_1_ has joined ##java
[10:25:16] <Fox_1_> Hi all
[10:25:34] <Fox_1_> people how can I get current datetime in greeenwich?
[10:26:15] <cybereal> ~javadoc Calendar
[10:26:15] <javabot> cybereal: http://is.gd/jkEQ [java.util.Calendar]
[10:26:44] <cybereal> get an instance of that, then set the timezone as desired, it should work how you want
[10:27:07] <Fox_1_> ok, thanks. I'll try :)
[10:27:23] *** mknix has joined ##java
[10:28:25] *** carrus85 has quit IRC
[10:30:16] *** Fox_1_ has quit IRC
[10:31:20] *** staykov has joined ##java
[10:33:38] *** staykov has quit IRC
[10:34:25] *** juc0 has quit IRC
[10:35:01] *** Carnage\ has joined ##java
[10:35:03] *** KermitTheFragger has joined ##java
[10:38:02] *** deepjoy has quit IRC
[10:38:41] *** Resistance has joined ##java
[10:39:29] *** Carnage\ has quit IRC
[10:42:19] *** cybereal has quit IRC
[10:42:36] *** pschriner has joined ##java
[10:43:27] *** TooAngel has joined ##java
[10:45:04] <isr`> so if i have an exit menu item, and of course the X box, but If the user clicks either without saving, how can I make sure both methods show a dialog asking the user if he wants to save
[10:45:53] <AMcBain> have them both call a common method.
[10:46:15] <AMcBain> (just make sure the onClosing even is canceled if they haven't saved, so it doesn't close anyways)
[10:46:32] <AMcBain> Plus points to Java for getting the onClosing event right.
[10:47:07] <pr3d4t0r> AMcBain: Yo'.
[10:47:13] <AMcBain> hello
[10:47:15] <pr3d4t0r> AMcBain: Are you on Windows or Linux by any chance?
[10:47:32] <AMcBain> Windows, but I also have a VirtualBox of Linux ... not sure if it has Java on it though.
[10:47:49] <pr3d4t0r> AMcBain: Check in #swing - I'm having an issue that I think is an OS X bug :\
[10:48:02] <AMcBain> Yeah, I saw that ...
[10:48:26] <pr3d4t0r> AMcBain: Would you run a small .jar in your Windows machine for a bit to check if dragging is enabled?
[10:48:34] <AMcBain> sure.
[10:48:36] <pr3d4t0r> AMcBain: The drop isn't enabled either.
[10:48:48] <pr3d4t0r> AMcBain: OKi. I'll upload the file in a second. Stand by.
[10:49:22] *** bas-i has quit IRC
[10:49:31] *** Levia has quit IRC
[10:51:44] *** btb996 has joined ##java
[10:51:59] <btb996> how to change jre version in installanywhere?
[10:55:51] <pr3d4t0r> javabot: AMcBain++
[10:55:51] <javabot> amcbain has a karma level of 28, pr3d4t0r
[10:56:22] <AMcBain> isr`: Is that a workable solution for you? (ping :P)
[10:58:02] <AMcBain> btb996: it appears to me you just have to bundle the correct "VM Pack" as their website says.
[10:58:30] <btb996> where the website says?
[10:58:50] <AMcBain> http://www.acresso.com/products/ia/installanywhere-requirements.htm and http://www.acresso.com/downloads/downloads_7150.htm (at the bottom of the previous page)
[10:59:08] <btb996> let me see.
[11:00:00] <pstickne> heh
[11:00:15] <pstickne> "install anywhere where there is specific software already installed"
[11:00:31] *** Resistance has quit IRC
[11:01:20] <pstickne> "install anywhere where there is specific software already installed"
[11:01:21] <pstickne> doh
[11:01:46] *** Levia has joined ##java
[11:02:36] <btb996> AMcBain: how to add swt support in installanywhere?
[11:03:09] <AMcBain> how should I know? I only found that website via a Google search. I've never used/seen it before in my life.
[11:03:44] <btb996> thanks, if i have any useful info, i will tell you.
[11:04:01] *** vesz has quit IRC
[11:04:20] *** brilliantnut has quit IRC
[11:05:01] *** brilliantnut has joined ##java
[11:05:23] *** Resistance has joined ##java
[11:08:05] <btb996> AMcBain: http://kb.acresso.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q000195&sliceId=
[11:08:27] <btb996> what's the meanning of DO NOT USE COMPRESSION and do not retain full path info...
[11:09:10] *** Jonny_ has joined ##java
[11:09:41] *** arpu has joined ##java
[11:09:43] <AMcBain> I'd think that's pretty obvious (for the compression) ... the path info means they probably don't want the folders "Program Files/Java/xxx" they just want the folder for that particular jre
[11:10:01] <Jonny_> Any SQL exports here? ##sql seems to be fairly empty
[11:10:06] <Jonny_> experts*
[11:10:27] <AMcBain> Zip files normally both group files and compress them, tar files just group things. they probably want you to use a zip file to group them but not with compression.
[11:10:40] <btb996> AMcBain: Is it mean that i shouldn't compress the files.
[11:11:30] <AMcBain> nevermind ... just make a tar file out of it and follow the unix instructions.
[11:12:22] *** etag has joined ##java
[11:12:33] <btb996> ok, thanks. But my platform is windows.
[11:13:01] <AMcBain> I assume the separate directions are due to the fact that on Windows it is easier to make a zip file than it is a tar file.
[11:13:28] <AMcBain> Anyways, I've never used this product before. As such, I can only provide limited help on what I can read ... so you aren't really going to get much out of me.
[11:13:44] <AMcBain> (and you might as well just cut out the middle man and read it yourself)
[11:14:04] <btb996> AMcBain: you're right. I have created a custom vm according to http://kb.acresso.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q000195&sliceId=
[11:14:12] <btb996> Thanks, AmcBain
[11:17:23] *** josip has joined ##java
[11:18:57] <josip> Hello, I can't get log4j writting to a file. I pasted the configuration file here http://pastebin.ca/1338498 . I can see the output in the console, the file janta.log is created, but nothing is ever appended to it. Any ideas?
[11:19:46] <AMcBain> and once again, pastebin.ca never fails to be incredibly slow.
[11:20:12] <josip> http://pastie.org/390564 another paste
[11:20:35] *** shervin_a has quit IRC
[11:21:49] *** light has quit IRC
[11:22:11] *** light has joined ##java
[11:22:28] *** musically_ut has joined ##java
[11:24:26] *** buntfalke has joined ##java
[11:26:03] *** giaco has quit IRC
[11:26:17] <isr`> AMcBain: i ended up extending a WindowAdapter
[11:26:24] <isr`> i just need to connect my exit menu to it
[11:27:23] *** btb996 has quit IRC
[11:27:54] <mknix> josip, try to uncomment #log4j.appender.jantalog.Append=true
[11:28:46] *** giaco has joined ##java
[11:28:55] <josip> tried, doesn't work
[11:29:18] <koskoz> AMcBain : for the title of my other window, I think there is something that i don't understand, because what is easiest than set a size and a title to a window ? oO
[11:30:00] <AMcBain> "because what is easier than setting the ..."?
[11:30:37] <josip> I have really no idea what happens :(
[11:31:41] *** vesz has joined ##java
[11:33:05] *** geaaru has joined ##java
[11:33:32] *** vesz has joined ##java
[11:33:38] <mknix> josip, http://pastebin.ca/1338833 ?
[11:33:59] <josip> yep
[11:34:05] *** hoerup has quit IRC
[11:34:27] *** hoerup has joined ##java
[11:34:39] <josip> the difference being the undocumented line only, right? :)
[11:34:57] <mknix> no
[11:36:12] <josip> still the same
[11:36:20] <mknix> hmm
[11:36:44] <AMcBain> Did you give it something to log, not just run it on something that under normal circumstances outputs nothing?
[11:36:56] *** MacGyverNL_ has quit IRC
[11:37:07] <josip> yes, I said that I get log messages in the console
[11:37:28] <josip> I'm not mentally challenged :D
[11:38:19] <AMcBain> no one claimed you were.
[11:40:45] *** blankthemuffin has quit IRC
[11:41:17] *** Levia has quit IRC
[11:41:24] *** lokedk has quit IRC
[11:41:27] <isr`> doh
[11:41:30] *** MacGyverNL has joined ##Java
[11:41:39] *** mosno has joined ##java
[11:41:41] <isr`> i have to cause a WindowEvent from my exit menu item
[11:41:51] <isr`> but i inherited from JPanel, not from JFrame
[11:42:01] <isr`> so i can't access the processEvent method of JFrame
[11:42:52] *** acuster has joined ##java
[11:43:25] <mknix> josip, http://pastebin.ca/1338846 this 1 taken from my very old project should work )
[11:43:42] *** pingou has joined ##java
[11:43:45] <pingou> Hi
[11:44:01] <pingou> stupid question but how can I set the absolute path of the file I want to read ?
[11:44:10] *** monstrfolk has quit IRC
[11:44:52] <pingou> new File('filename'), I can put File('../../path/to/filename')
[11:45:04] *** monstrfolk has joined ##java
[11:45:11] <pingou> but I can't find the way to say File('/path/to/filename') directly...
[11:46:06] <mknix> pingou, so you want to GET the abs path, no?
[11:46:14] <pingou> no I want to set it :)
[11:46:31] <pingou> I know what's the path and I want to set it to my File()
[11:46:50] <mitch0> your second example Should Work (TM)
[11:47:10] <mknix> it should work with full path as well
[11:47:23] * pingou checks again
[11:47:57] <mknix> under win use \\
[11:48:39] <josip> mknix: works like a charm, thank you !
[11:48:44] <josip> saved my day
[11:48:51] *** foo-nix has quit IRC
[11:48:58] *** musically_ut has quit IRC
[11:49:48] *** harpal has joined ##java
[11:50:16] <harpal> hey can any one have look at this http://paste2.org/p/148151 . Why I am getting error identifier expected?
[11:50:32] <pingou> mitch0, mknix ok thanks :) seems to work
[11:50:40] <pingou> I must have done something wrong earlier...
[11:51:22] <doc``> how do i assign more memory for javac ?
[11:51:28] <doc``> so i can use bigger arrays
[11:51:33] *** TooAngel has left ##java
[11:51:33] *** EspenG has joined ##java
[11:51:39] <doc``> for java, not javac
[11:52:11] <mknix> josip, :) actually i see no difference between these two configs except of using the RollingFileAppender )
[11:53:08] <josip> and rootCategory, which is probably the same
[11:54:24] <mknix> doc``, see -Xms and -Xmx keys
[11:55:16] *** dericku7 has joined ##java
[11:55:20] <dericku7> hy all
[11:55:30] *** squi has quit IRC
[11:55:35] *** dericku7 has left ##java
[11:57:50] *** AskHL has quit IRC
[11:58:25] <pr3d4t0r> Yum.
[11:58:38] <pr3d4t0r> A new comfort food is born. Something that may appeal to the coder in all of us.
[11:59:05] *** Carnage\ has joined ##java
[11:59:11] <pr3d4t0r> Warm tortillas spread with almond butter, blackberry jam, and rolled into a taco. Chase them with some cold soy milk.
[11:59:16] <pr3d4t0r> Anyway peeps, have a good night.
[11:59:46] *** GodTodd has joined ##java
[12:01:26] *** light has quit IRC
[12:02:55] * pr3d4t0r wonders who is pissed at ricky_clarkson again and mailbombing him.
[12:03:18] *** woyle has joined ##java
[12:03:26] *** CaBa has left ##java
[12:04:43] *** acuster has quit IRC
[12:07:02] *** toader has quit IRC
[12:10:05] *** skoskav has joined ##java
[12:12:21] *** deepjoy has joined ##java
[12:13:03] *** TooAngel has joined ##java
[12:13:11] *** Levia has joined ##java
[12:13:34] *** TooAngel has left ##java
[12:13:52] *** jownez has joined ##java
[12:14:21] *** Ububegin has quit IRC
[12:17:12] *** Fox_1_ has joined ##java
[12:17:53] *** sombriks has joined ##java
[12:18:32] *** squi has joined ##java
[12:19:30] *** foo-nix has joined ##java
[12:21:09] *** jorgenpt has quit IRC
[12:21:56] *** FMJaguar has quit IRC
[12:22:10] *** DragonLord- has joined ##java
[12:23:26] *** scizzo- has joined ##java
[12:23:29] <gfather> when i execute a small class file nothing shows up
[12:23:35] <gfather> java file
[12:24:35] <dangertools> should something show up?
[12:24:41] <gfather> yes
[12:24:59] <gfather> small test file with print outs
[12:25:23] <jottinger> then maybe it's not executing. jdb the sucker.
[12:25:57] *** bhz- has joined ##java
[12:26:31] <gfather> im sorry , im noob to java and trying to learn , ;) , jdb ?
[12:26:42] <jottinger> ~jdb
[12:26:43] <javabot> jottinger, jdb is http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/jdb.html
[12:26:52] <jottinger> it's a java debugger. Horribly primitive, but it works.
[12:26:53] <woyle> what are you typing on the command line?
[12:27:19] <gfather> ah thanks :) , nice tool
[12:27:26] <harpal> hey can any one have look at this http://paste2.org/p/148151 . Why I am getting error identifier expected?
[12:27:30] <gfather> woyle java then the file name
[12:27:42] <jottinger> gfather: errrr... example?
[12:27:45] *** b0red has joined ##java
[12:27:53] <gfather> java Shuffle1
[12:28:07] <jottinger> okay. :) That's not the filename. It's also more correct than the filename. :)
[12:28:22] <ilyak> harpal: try dropping that <T> from constructor
[12:28:26] <b0red> Process.waitFor() is returning 1 on FreeBSD.. i think that's normal, but in the doc they say the normal return value is 0..
[12:28:38] <ilyak> it's redundant and it clashes with <T> in class declaration, I think
[12:28:43] <gfather> jottinger ?
[12:28:45] *** assertsmart has quit IRC
[12:28:56] <jottinger> gfather: java foo.class <-- wrong, java foo is right
[12:29:08] <jottinger> was trying to make sure you were describing the right problem
[12:29:20] <gfather> yes , thats what im doing , i didnt put the .class
[12:29:26] <gfather> in terminal
[12:29:29] <tazle> b0red: the number returned by waitFor comes from the actual process, though
[12:30:32] <b0red> tazle: so what does that mean? 1 should be rejected?
[12:30:42] *** pstickne has quit IRC
[12:30:59] <tazle> b0red: it means whatever the program that exited with 1 wants 1 to mean
[12:31:16] *** zophy has joined ##java
[12:31:31] <tazle> b0red: for example it might mean that "You fool, you called me with incorrect parameters!" or "The flux capacitor is not charged yet"
[12:33:18] <harpal> tazle: Ya it works, Thanks a lot :D
[12:34:13] <woyle> gfather: what output do you see in your terminal?
[12:34:24] <gfather> nothing :)
[12:34:40] <gfather> maybe i have something wronge in the file
[12:34:50] *** assertsmart has joined ##java
[12:34:56] *** thpar has joined ##java
[12:35:29] *** shervin_a has joined ##java
[12:35:36] <gfather> becouse im learning without ide @ first
[12:35:59] <dangertools> which is good
[12:36:02] <jottinger> gfather: pastebin it
[12:36:02] <b0red> tazle: ok, so 1 is not normal
[12:36:14] <gfather> oks
[12:36:52] <woyle> If you see nothing, then everything worked. It's just that your class did nothing.
[12:37:14] <gfather> yes
[12:37:17] <gfather> i found the problem
[12:37:26] <gfather> i closed the while }
[12:37:28] *** yclian has quit IRC
[12:37:39] *** koskoz has quit IRC
[12:37:45] <gfather> wich didnt let if statments execute
[12:38:07] <gfather> i must close while after all the if statments
[12:38:08] <gfather> :)
[12:38:10] <tazle> b0red: maybe it is, maybe it isn't - the point is that Java does not specify anything about it
[12:39:49] *** yclian has joined ##java
[12:41:28] <tazle> b0red: anyway, on *UNIX* the convention is that 0 means success and something else means a failure of some kind, but that's as far as UNIX goes
[12:41:58] <jottinger> right, some apps use the high bit to indicate failure, others use it as a count of files handled or whatever
[12:42:16] *** dentoo has joined ##java
[12:42:25] <tazle> b0red: for example, if you see the man page of grep, you'll see that 1 indicates that no matches were found, and 2 that some actual error occurred
[12:42:52] <tazle> (this is on OS X - I'm not sure if POSIX specifies how grep actually should behave in this regard, though)
[12:45:02] *** phix has quit IRC
[12:47:14] *** Spike1506 has quit IRC
[12:52:07] <woyle> 2b|!2b
[12:54:40] <ilyak> woyle: 0xff
[12:55:56] <hoerup> woyle, did Shakespear use logical or or did he use binary or ?
[12:56:01] <woyle> I always thought the answer was 0x2a. O well.
[12:56:55] *** FMJaguar has joined ##java
[12:57:04] *** thpar has quit IRC
[12:57:57] *** squiddle has joined ##java
[12:58:35] <b0red> tazle: it's imagemagick
[12:58:48] *** bhz- has quit IRC
[12:58:49] <jottinger> b0red: so read the imagemagick docs.
[12:58:56] <jottinger> but why not use jmagick?
[12:59:10] <tazle> also, please consider that imagemagick is notoriously buggy
[13:00:04] *** sombriks has quit IRC
[13:00:09] *** ries has joined ##java
[13:00:28] *** thpar has joined ##java
[13:01:04] *** sombriks has joined ##java
[13:02:24] *** sombriks has quit IRC
[13:02:38] <f3ew> It is?
[13:02:50] *** Levia_ has joined ##java
[13:03:10] *** sombriks has joined ##java
[13:03:14] *** Levia has quit IRC
[13:03:19] <jottinger> f3ew: yes :)
[13:03:58] <jottinger> you never EMBED IM into your product, it's like saying "we want pamela anderson on the team because, let's face it, everyone likes sex"
[13:04:07] <f3ew> ah
[13:04:20] <jottinger> and ignoring the fact that everyone - even those only casually attached - are going to get VD now
[13:04:29] *** oxi has joined ##java
[13:05:15] *** Resistance has quit IRC
[13:08:42] *** ramdam has quit IRC
[13:10:32] <Levia_> ~jottinger++
[13:10:33] <javabot> jottinger has a karma level of 237, Levia_
[13:10:40] *** Levia_ is now known as Levia
[13:11:32] *** ffgeek200 has joined ##java
[13:13:22] *** geaaru has quit IRC
[13:13:47] *** bhz- has joined ##java
[13:14:25] *** geaaru has joined ##java
[13:16:50] *** Varox has joined ##java
[13:17:08] *** ffgeek200b has quit IRC
[13:19:24] *** NiSoOo has quit IRC
[13:22:02] <harpal> Hey I have this http://paste2.org/p/148170 which output Alpha:foo Beta:foo Beta:bar Beta:bar now can any one tell me why a.bar prints beta:nbar?
[13:22:02] *** orgy` has joined ##java
[13:22:17] *** assertsmart has quit IRC
[13:23:59] <ldamwork> harpal, because the object that a refers to is an instance of Sample?
[13:24:12] *** mazzachre has quit IRC
[13:25:41] <harpal> ldamwork: so first parent method gets call? Sample bar?
[13:27:00] <ldamwork> harpal, ehm? You call the method on the actual instance, regardles of what your reference is declared as. Since your instance was instantiated as a Sample, then it is Sample.bar() which is called
[13:28:33] <harpal> ldamwork: Ohh Ok. If method is different then Alfa.bar is called. Whats ... is used?
[13:29:21] <harpal> ldamwork: This is program I taken from SCJP exam samples. So dont know more, Sorry for that
[13:29:22] <ldamwork> you are not being clear
[13:29:55] <harpal> ldamwork: In public void foo(String... args) what is String... ?
[13:30:38] <Levia> unlimited amount of String parameters
[13:30:41] <Levia> or something
[13:30:41] <Levia> :P
[13:30:44] <ldamwork> ... denotes an abitrary number of arguments
[13:31:08] <Levia> meaning that foo(new String(), new String(), new String(), new String()); is allowed. but foo(new String()); is too
[13:31:19] *** Blaay has joined ##java
[13:31:21] <harpal> ldamwork: Levia: Ohh Thanks a lot.
[13:32:17] *** ries has quit IRC
[13:33:31] *** ries has joined ##java
[13:33:58] *** chriswk has quit IRC
[13:36:09] *** vezzoni has joined ##java
[13:36:48] *** chriswk_ has joined ##java
[13:36:54] *** AlanasAnikonis has quit IRC
[13:38:12] *** Fox_1_ has quit IRC
[13:38:35] *** Fox_1_ has joined ##java
[13:40:56] *** dangertools has quit IRC
[13:42:08] *** dangertools has joined ##java
[13:42:55] *** Levia has quit IRC
[13:45:48] *** woyle has left ##java
[13:47:05] *** reisi has joined ##java
[13:47:57]
[13:48:33] <reisi> lock is ReentrantLock and myCondition is a Condition made from the lock using Lock.newCondition();
[13:48:49] <dangertools> reisi: notifyAll() needs the monitor. Is this in a synchronized block? Did other threads call wait() on the object?
[13:49:23] <reisi> dangertools: there's a chance that someone is waiting on the condition when my code block is being run
[13:49:42] *** yclian has quit IRC
[13:49:53] <dangertools> waiting on lock.lock() or waiting using myCondition.wait()?
[13:50:02] <reisi> shit.. i'm supposed to signalAll, not notifyAll
[13:50:41] <reisi> dangertools: it's waiting on myCondition.await(long, TimeUnit)
[13:51:07] <reisi> fixing myCondition.notifyAll() -> myCondition.signalAll() fixes this ofc
[13:51:16] <dangertools> wait/notify is a different mechanism. As you already found out, signalAll() is what you want
[13:52:01] <reisi> dangertools: yes.. got confused with the two mechanisms used in the two projects one way in this class, other way in the other..
[13:52:44] *** yclian has joined ##java
[13:54:05] *** mosno has quit IRC
[13:55:26] *** sombriks has quit IRC
[13:56:49] *** mesmer has joined ##java
[13:57:48] *** durka42 has joined ##java
[13:57:49] *** sombriks has joined ##java
[13:58:36] *** geaaru has quit IRC
[13:58:53] *** pingou has left ##java
[13:59:03] *** doc`` has quit IRC
[13:59:23] <mesmer> anyone have a good suggestion on what to use to make UML diagrams?
[13:59:52] <isr`> argoUML, violet, umbrello
[13:59:58] <isr`> there are a ton of UML tools out there
[14:00:03] <ldamwork> mesmer, pencil and paper? Though i did try out argouml a few days back
[14:01:09] <mesmer> isr: thx
[14:04:22] *** mesmer has quit IRC
[14:05:43] *** zophy has quit IRC
[14:06:36] *** zophy has joined ##java
[14:06:46] *** Resistance has joined ##java
[14:07:04] <mitch0> pnp works best
[14:08:25] *** nijm has joined ##java
[14:08:36] *** convivial has joined ##java
[14:09:07] *** mohax has joined ##java
[14:10:16] <r0bby> pr3d4t0r: I severely restrict who can see my status msgs
[14:11:08] <r0bby> so i can vent all i want :-)
[14:12:19] *** oxi has quit IRC
[14:13:29] <jottinger> ~vmware
[14:13:30] <javabot> jottinger, I have no idea what vmware is.
[14:15:25] *** tissue has quit IRC
[14:15:31] *** musically_ut has joined ##java
[14:16:16] *** assertsmart has joined ##java
[14:16:41] *** spuz has joined ##java
[14:17:21] *** kungen has joined ##java
[14:18:30] *** josip has quit IRC
[14:18:39] *** prophet05 has joined ##java
[14:19:22] *** chriswk_ has quit IRC
[14:19:58] *** chriswk_ has joined ##java
[14:21:52] *** durka42 has quit IRC
[14:22:16] *** Junior has quit IRC
[14:22:36] *** Junior has joined ##java
[14:22:53] *** Daniel_H has joined ##java
[14:22:54] *** prophet05 has quit IRC
[14:23:00] *** aleksei has joined ##java
[14:23:01] <Junior> hello
[14:23:09] <aleksei> hi
[14:23:12] <jottinger> hi
[14:24:44] *** prophet05 has joined ##java
[14:25:50] *** bitshuffler has joined ##java
[14:25:52] *** Csow has quit IRC
[14:26:24] *** Tokemi has joined ##java
[14:28:18] *** magentar has joined ##java
[14:29:46] <Tokemi> hello! I have a question I hope someone here will be able to help me with, I am currently working on a project where I am trying to communicate with a serial i2c converter module over a usb to serial adapter. I am using RXTX in java to communicate with the module but the data I am getting back is inconsistent with the data I get back when I try to communicate with a terminal program.
[14:30:03] *** sombriks has quit IRC
[14:31:29] <Tokemi> basicly I am only recieving 255 in the java program although in the terminal program I am seeing the data as I expect
[14:32:46] *** frosch has quit IRC
[14:33:47] *** sombriks has joined ##java
[14:34:00] *** Elvanor has joined ##java
[14:34:12] <Elvanor> How can I convert an Enum value to its "natural" integer value?
[14:34:23] *** frosch has joined ##java
[14:34:30] <jottinger> it doesn't have one
[14:34:35] <jottinger> you can tell the ordinal value though, IIRC
[14:34:43] *** FireSlash has joined ##java
[14:34:44] <jottinger> enums in java aren't ints, they're types
[14:35:10] <Elvanor> I know this.
[14:35:20] <Elvanor> How do i get the ordinal value then?
[14:35:31] <jottinger> ~enum
[14:35:32] <javabot> jottinger, enum is http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html or http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9 (JLS 3rd Edition 8.9)
[14:35:36] *** wokawaka has joined ##java
[14:35:46] *** das7002 has joined ##java
[14:36:11] <wokawaka> hey. anyone know any library for java in which i can extract the equaliser values at any point in an .mp3 song?
[14:36:50] <das7002> jTextField1.setText(varname); what is wrong with that?
[14:37:23] <Elvanor> jottinger: that is not explained in those links
[14:37:59] <Elvanor> Ha, it seems ordinal() would work
[14:38:01] <jottinger> Elvanor: I got the links for my own information, not yours
[14:38:01] <jottinger> Elvanor: I got the links for my own information, not yohold on a bit
[14:38:24] <Infinito> das7002, apparently nothing
[14:38:29] <jottinger> Elvanor: va
[14:38:35] <jottinger> which has the information I was looking for
[14:38:46] *** das7002 has left ##java
[14:38:53] <jottinger> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html
[14:39:22] <jottinger> sorry, i have a VMWare session screwing things up
[14:39:46] *** gdoko has joined ##java
[14:40:02] <wokawaka> i want to create some sort of visualizer for songs. that is if i can extract the values of all channels in the mp3 i can then figure out when there is a base beat and make animations accordingly. any ideas of how to figure such things out?
[14:41:00] <wokawaka> im not even sure what that data is called, if they are called equaliser values or what
[14:42:39] *** Junior has quit IRC
[14:43:45] <wokawaka> i finally found something you know-it-all's dont know ;)?
[14:43:55] *** Junior has joined ##java
[14:44:11] <jottinger> wokawaka: ? It's not that hard
[14:44:21] *** prophet05 has quit IRC
[14:45:07] *** b0red has quit IRC
[14:45:33] <wokawaka> well could you point me in the right direction please? how would i extract the channel data? once i can extract that i can get its averages and easily check when its hitting a beat.
[14:45:57] *** frosch has quit IRC
[14:46:02] <jottinger> mp3 format would be the place to start
[14:47:00] <jottinger> but I'd be truly surprised if you needed ##java to tell you that
[14:47:25] <wokawaka> googling on the subject, things like "java mp3 channel data" or "java mp3 visualisation" has given no good results at all
[14:47:37] <reisi> shouldn't all changes to the object pointed by my volatile reference be visible for all threads when the first read happens to that field?
[14:47:51] <jottinger> wokawaka: how about googling mp3 channel data, leave java out of it
[14:48:13] *** flb has joined ##java
[14:50:01] *** FireSlash has quit IRC
[14:50:13] *** riotz has joined ##java
[14:50:18] <wokawaka> ill check if i find anything on that
[14:50:45] *** dmlloyd_ has joined ##java
[14:51:30] *** assertsmart has quit IRC
[14:51:46] *** dunmer has joined ##java
[14:53:06] *** AskHL has joined ##java
[14:54:24] *** convivial has quit IRC
[14:55:43] *** gdoko has quit IRC
[14:56:25] *** nijm has quit IRC
[14:57:07] *** _bugz_ has quit IRC
[14:58:37] <aleksei> Why is it that JDO isn't that widespread.. any ideas?
[14:59:34] *** Spike1506 has joined ##java
[14:59:42] <mitch0> I personally never heard of it
[15:01:56] *** _bugz_ has joined ##java
[15:02:00] *** OsAC has joined ##java
[15:02:33] *** factor has quit IRC
[15:03:59] <ldamwork> aleksei, jdo is old now, replaced by jpa, which is a merging (simplified soup) of hibernate and jdo and some other stuff. I guess hibernate shortcircuited jdo vendors which is why it's not so widespread
[15:05:25] <ldamwork> another reason could be that afaik there is no free jdo implementations, and companies who pays for persistence probably goes the full entity bean way
[15:05:29] *** ScottG489 has quit IRC
[15:05:45] *** dmlloyd has quit IRC
[15:05:56] *** Junior has quit IRC
[15:05:56] *** kungen has quit IRC
[15:07:51] *** kungen has joined ##java
[15:09:22] *** beol has joined ##java
[15:09:35] *** foo-nix has quit IRC
[15:10:04] *** corpxicle has joined ##java
[15:10:07] <corpxicle> hello
[15:10:09] *** rollins has joined ##java
[15:10:26] <jottinger> why, oh why does VMWare use the SYSTEM BELL?!
[15:10:38] <corpxicle> i get "BitMap index out of bounds" when i try to run jmap on a process
[15:10:43] <jottinger> there are free JDO impls, IIRC
[15:10:45] <jottinger> jpox is one
[15:10:45] <corpxicle> why would this happen
[15:11:40] <jottinger> and JDO never really went anywhere because hibernate was too popular to give it room, plus JDO was trying to be more OO than a normal ORM would be
[15:11:48] *** Spike1506 has quit IRC
[15:12:00] <jottinger> developers are fairly normal; they want to use something as simple as possible, and Hibernate was simpler and easier to understand
[15:13:32] <jottinger> and it didn't help that the JDO vendors - the people who benefited the most by widespread adoption - were like "WTF can't you grok this disruptive tech that does things you wouldn't normally expect? I mean, come on, you retards, USE OUR STUFF even though we can't explain it to you"
[15:13:43] *** deepjoy has quit IRC
[15:14:00] <jottinger> I know a lot of ex-JDO vendors but I have little pity for them
[15:14:44] *** das7002 has joined ##java
[15:15:08] <jottinger> the JDO book is almost as good as the javaspaces book: it tells you how to do stuff once you grok the technology but it doesn't do much to, like, get you started even though that's presumably why you'd buy the book in the first place
[15:15:13] *** hoerup has quit IRC
[15:15:18] *** woogley has joined ##java
[15:15:36] <das7002> how do I pick a specific node from an XML file like this <fortunes><fortune>This is fortune 1</fortune><fortune>This is fortune 2</fortune></fortunes>
[15:15:47] *** Spike1506 has joined ##java
[15:15:54] <jottinger> das7002: iterate over the nodes
[15:16:41] *** morkar- has quit IRC
[15:17:17] *** monkeycid has joined ##java
[15:17:33] <das7002> since the XML file has 14361 values would it be a better idea to get the value from a server that has the data and PHP gives it the requested data?
[15:17:56] <jottinger> What does PHP have to do with this?
[15:18:22] <das7002> the XML files is huge and I am worried performance of with that much data will really suck
[15:18:28] *** magentar has quit IRC
[15:18:30] <das7002> file*
[15:18:41] <jottinger> that won't change when you get it to be processed with PHP instead of something else
[15:18:54] <jottinger> you're just sucking up the performance on the server instead of the client
[15:19:17] <jottinger> why not read it with a streaming API and spit out a matching fortune after a random selection
[15:19:26] <jottinger> or why not use a DB instead of an XML file
[15:19:26] *** lhogie has joined ##java
[15:19:38] <das7002> what would perform the best?
[15:19:42] <jottinger> a DB
[15:19:53] <jottinger> or maybe a memory-persistent map
[15:19:57] *** magentar has joined ##java
[15:19:58] <das7002> Does Java have SQLite support?
[15:20:00] <jottinger> or list
[15:20:03] <jottinger> das7002: gee
[15:20:07] <jottinger> let me google that for you
[15:20:14] <jottinger> or not, since I don't care and you might :)
[15:21:12] *** dentoo has quit IRC
[15:21:47] *** dentoo has joined ##java
[15:24:09] *** durka42 has joined ##java
[15:26:11] *** tranceNRG has joined ##java
[15:27:43] *** riotz has quit IRC
[15:27:57] *** das7002 has left ##java
[15:29:17] <aleksei> thanks, ldamwork
[15:30:14] <csgeek> eclipse keeps saying that JForm.show() is depreciated, is there a better way of displaying a form?
[15:30:31] <jottinger> What does the javadoc say?
[15:32:16] <csgeek> nothing about it being depricated.. as far as I can tell
[15:32:54] <jottinger> then eclipse shouldn't say it's deprecated.
[15:34:01] *** DCPom has joined ##java
[15:34:04] *** eidolon has joined ##java
[15:35:25] <csgeek> scratch that..... was looking at the wrong class... says it's replaced by setVisible();
[15:37:11] *** deepjoy has joined ##java
[15:37:47] *** OsAC has quit IRC
[15:42:37] *** ^Cheeky has joined ##java
[15:43:59] *** crowbar has joined ##java
[15:46:13] *** Hink has joined ##java
[15:49:14] * cheeser bows.
[15:49:25] *** foo-nix has joined ##java
[15:51:18] <jottinger> hey
[15:51:40] *** wokawaka has quit IRC
[15:53:09] *** dnmo has quit IRC
[15:55:16] <jottinger> dammit, WHY does vmware use the system bell?!
[15:55:41] <^Cheeky> has anyone used the latest version of eclipse with ubuntu 8.10
[15:56:28] *** nnc has joined ##java
[15:56:47] *** flb has quit IRC
[15:57:42] *** corpxicle has quit IRC
[15:58:42] *** jabalsad has joined ##java
[15:58:51] *** durka42 has quit IRC
[15:59:13] *** zophy has quit IRC
[16:02:37] *** sombriks has quit IRC
[16:03:09] *** Elvanor has left ##java
[16:06:40] *** deepjoy has quit IRC
[16:07:17] *** Thorn has joined ##java
[16:08:03] *** romanb has joined ##java
[16:11:30] *** genesiss has quit IRC
[16:12:12] *** woogley has quit IRC
[16:12:51] *** kungen has left ##java
[16:13:45] *** aTypical has joined ##java
[16:14:12] *** Angel-SL has quit IRC
[16:14:38] *** cybereal has joined ##java
[16:14:49] <mitch0> jottinger: disable system bell on the host OS? (or whoever it's called that's running vmware)
[16:14:49] *** genesiss has joined ##java
[16:15:11] <jottinger> mitch0: I have no idea how to do that on vista
[16:15:16] <mitch0> (or disable the system bell hardware with a pair of scissors)
[16:15:16] <jottinger> I have no other apps that use it
[16:15:27] <jottinger> mitch0: and it's a laptop, or I'd have done the latter already
[16:15:47] *** nijm has joined ##java
[16:16:04] <mitch0> jott: afaik you need to enable system sounds, then the OS won't use the hardware bell
[16:16:20] *** UT2K3 has joined ##java
[16:17:16] <mitch0> (at least a co-worker had a similar problem (although not with vmware))
[16:17:44] *** waz has joined ##java
[16:18:16] <jottinger> I have system sounds enabled. Yet VMWare's XP image is using the system bell. >:(
[16:18:48] *** rajesh has joined ##java
[16:18:54] <kavon> jottinger: did you enable an audio "device" on it?
[16:18:55] <mitch0> switch to linux as host OS. I can provide a patch for that :)
[16:18:58] *** monestri has quit IRC
[16:19:29] <jottinger> kavon: VMWare player doesn't give me such an option that I've found
[16:19:31] <kavon> jottinger: once I enabled the generic AC 97 audio on the virtual machine i had good sounds
[16:19:35] <jottinger> mitch0: sorry, I need to be able to run stuff :)
[16:19:42] <jottinger> kavon: I don't want *any* sounds :)
[16:19:44] <kavon> jottinger: oh wait there is your problem, vmware
[16:20:01] <kavon> jottinger: use VirtualBox, open source and much better... seamless mode is pretty awesome
[16:20:09] <kavon> and its from sun!
[16:20:18] <jottinger> kavon: I don't have a virtualbox image for XP
[16:20:27] <kavon> jottinger: make one? ;0
[16:20:37] <jottinger> kavon: Requires having XP install disks
[16:20:44] <kavon> jottinger: requires a good torrent
[16:20:47] *** ryuho has quit IRC
[16:20:56] <jottinger> kavon: THAT requires a good connection :)
[16:21:31] <kavon> jottinger: i have 90KB/s download, unless you have dialup you can't really go less then that
[16:21:58] <jottinger> kavon: I can get good download speeds, but then the router owner decides that something's wrong with his router and reboots the darn thing
[16:22:00] *** waz has quit IRC
[16:22:09] <jottinger> I have, er, an "inconsistent" connection right now
[16:22:10] <kavon> jottinger: ahh, the moocher
[16:22:28] <jottinger> never! hardly! imposterous!
[16:22:33] <kavon> jottinger: lol
[16:22:55] <kavon> hrm, i wonder if I can get virtualbox to run an OS X image
[16:22:59] *** MigoMipo has joined ##java
[16:23:22] *** ttmrichter has quit IRC
[16:23:29] <mitch0> jott: http://ars.userfriendly.org/cartoons/?id=20090105
[16:23:36] *** produx has joined ##java
[16:23:55] <deufrai> kavon: from my last investigation, last month, no way to run OS X inside VirtualBox
[16:24:03] <jottinger> mitch0: haha
[16:24:12] <deufrai> license + BIOS/EFI issues
[16:24:16] *** thpar has quit IRC
[16:24:37] <kavon> deufrai: couldn't one use one of those hacked intel ones?
[16:24:48] <kavon> deufrai: might be too much trouble to test my program
[16:25:04] <kavon> deufrai: oh crap hold on, i have a freaking iBook somewhere in my room i can use
[16:25:23] *** magentar has quit IRC
[16:25:26] <deufrai> kavon: read a lot about it and got discouraged by the announced performance slowdown
[16:26:13] <kavon> deufrai: i remember somthing about SSE3 being required or it is slower than anything
[16:27:15] *** harpal has quit IRC
[16:27:35] *** zophy has joined ##java
[16:28:05] *** ridoo has joined ##java
[16:28:27] *** zophy has quit IRC
[16:28:51] *** ryuho has joined ##java
[16:28:52] *** zophy has joined ##java
[16:29:54] <isr`> is there any good way to split this string... Container<foo, Container<foo, bar>, foo> around "," resulting in an array with the elements {foo, Container<foo, bar>, foo }
[16:30:14] *** zophy has quit IRC
[16:30:31] <isr`> without ending up with {"foo", "Container<foo", "bar>", "foo"}
[16:30:58] <isr`> sorry my first example wasnt good. i want to end up with {"foo", "Container<foo, bar>", "foo"}
[16:31:36] *** Resistance has quit IRC
[16:32:05] *** zophy has joined ##java
[16:32:33] *** l3ns has joined ##java
[16:32:40] <l3ns> hi everyone! =)
[16:32:53] <isr`> hey l3ns
[16:32:58] <isr`> are you good with strings?
[16:33:12] <l3ns> how good is good? :)
[16:33:19] <isr`> okay heres my problem
[16:33:42] <isr`> is there any good way to split this string... Container<foo, Container<foo, bar>, foo> around "," resulting in an array with the elements {"foo", "Container<foo, bar>", "foo" }
[16:33:42] <cheeser> ~~ isr` ask
[16:33:42] <javabot> The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
[16:34:01] <isr`> without ending up with {"foo", "Container<foo", "bar>", "foo"}
[16:34:11] <isr`> cheeser, scroll up like 10 lines...
[16:34:29] <isr`> l3ns wasn't here when i asked.
[16:34:38] <cheeser> you'll have to parse that string. regex won't do it.
[16:35:00] *** vrv has joined ##java
[16:35:12] <isr`> yarghh
[16:35:16] <isr`> that is weak.
[16:35:16] <isr`> lol
[16:35:19] <jottinger> and the likelihood that l3ns is THE ONE GUY who has the answer who cares is... very very likely I suppose
[16:35:30] <jottinger> ~optimism++
[16:35:31] <javabot> optimism has a karma level of 0, jottinger
[16:35:42] <jottinger> reality FTW
[16:35:53] <l3ns> lol jot
[16:36:26] <l3ns> anyway, isr`, yes you can do that with java.
[16:37:02] <kavon> I'm pretty good with String, I'm one of the best knitters in the state
[16:37:06] <jottinger> you can do anything you want to with Java
[16:37:19] <isr`> you cant get laid with java.
[16:37:46] * kavon realizes how late his joke was.
[16:37:49] <l3ns> jot 0 isr` 1
[16:38:19] <ldamwork> l3ns, proper blend of java could make a difference...
[16:38:39] <l3ns> isr`, look at the string api
[16:39:09] <isr`> l3ns: yea i think i figured out a way to do it
[16:39:26] <l3ns> good for you =)
[16:39:35] <isr`> using indexOf(ch c, int i) and lastIndexOf(ch c, int i)
[16:39:49] <isr`> er, String ch, whatever
[16:40:11] <jottinger> isr`: I dunno, depends on the chick and how you use Java.
[16:40:22] *** J0bk has quit IRC
[16:41:03] *** convivial has joined ##java
[16:44:24] *** Stiny has joined ##java
[16:44:50] *** LordMetroid has joined ##Java
[16:47:17] *** Levia has joined ##java
[16:47:57] *** Bevin has quit IRC
[16:48:43] *** Stiny has quit IRC
[16:48:44] *** DCPom has quit IRC
[16:51:02] <mocas_> hi there
[16:51:06] *** lem has joined ##java
[16:51:13] <mocas_> can anyone help me to create a jar?
[16:51:26] <lem> do you know the command "jar" ?
[16:51:33] <mocas_> yah
[16:51:43] <lem> so?
[16:51:47] <mocas_> I do jar -cvf myjar -c ./
[16:51:54] <mocas_> ops -C caps
[16:51:54] *** latebind has joined ##java
[16:51:57] <mocas_> but fail
[16:52:04] <mocas_> whats wrong
[16:52:31] <mocas_> no
[16:52:43] <mocas_> jar -cvf myjar.jar -C ./
[16:52:54] *** welp has joined ##java
[16:52:58] <mocas_> my compiled files are in sub directories in ./
[16:53:34] <lem> just do: jar -cvf myjar.jar .
[16:54:23] <mocas_> worng syntax :(
[16:54:25] <dmlloyd_> could try actually reading the directions too
[16:54:27] <dmlloyd_> type "jar"
[16:54:32] *** dmlloyd_ is now known as dmlloyd
[16:54:34] <lem> to mention . (this is the actual dir) with -C doesn't make sense to me
[16:55:11] <dmlloyd> yeah, and in addition you're clearly not reading the instructions which states that you must specify the FILES you want to jar up as well
[16:55:14] <mocas_> ok its working with jar -cvf myjar /home/......
[16:55:40] <lem> naughty naughty naughty
[16:55:42] *** rajesh has quit IRC
[16:55:51] <lem> you will be punished for not reading the manual
[16:56:07] <lem> but for now ... here's a cookie! ... get outta here
[16:56:13] <mocas_> but I read
[16:56:34] <lem> yeah, but it doesn't make sense with .
[16:56:34] <mocas_> It should work bu dind'nt :(
[16:56:44] <mocas_> why not?
[16:56:47] <lem> since you are already in .
[16:57:07] *** gfather has quit IRC
[16:57:08] <mocas_> lol, you are right
[16:57:13] <mocas_> sorry :S
[16:57:21] <lem> btw, actually, I think it should handle such kind of usage...
[16:57:38] *** Blaay has quit IRC
[16:57:48] *** juc0 has joined ##java
[16:58:19] <mocas_> this is slow :S
[16:58:22] *** phenom9600 has joined ##java
[16:58:29] <mocas_> a lot :(
[16:58:41] <lem> it depends
[16:58:45] <mocas_> 300kbs
[16:58:46] *** vesz has quit IRC
[16:58:46] <isr`> this is turning into a monstrocity
[16:58:50] <isr`> there has to be an easier way
[16:58:52] <mocas_> it still compressing
[16:58:57] <lem> isr`, for what?
[16:59:02] <lem> isr`, tell me quick
[16:59:03] <isr`> for parsing this thing
[16:59:12] <lem> what kind of thingy is it?
[16:59:49] <isr`> is there any good way to split this string... Container<foo, Container<foo, bar>, foo> around "," resulting in an array with the elements {"foo", "Container<foo, bar>", "foo" }
[16:59:55] *** xabbuh has quit IRC
[17:00:07] <mocas_> the file hava 4gb :S something is worg here
[17:00:08] <isr`> without ending up with {"foo", "Container<foo", "bar>", "foo"}
[17:00:12] *** nor3 has joined ##java
[17:00:13] *** cyth has joined ##java
[17:00:58] <cheeser> isr`: it's clear no one here has an answer that satisfies you. time to google.
[17:00:58] <vol> isr`: write a simple parser yourself?
[17:01:05] <lem> sure, a < should be closed with a >, check it
[17:01:16] <cheeser> funny. seems like i mentioned having to parse it ...
[17:01:18] <cheeser> weird.
[17:01:32] <isr`> cheeser: chill out he was curious
[17:01:34] <isr`> i know what i have to do
[17:01:38] <isr`> ts just a pain in the rump
[17:01:40] <cheeser> i am chill.
[17:01:44] <nor3> i have one .jar with package structure org.A.*, and another with org.B.*; which ever package i reference first seems to hide the other (so i get 'cannot find package org.B, or whatever)
[17:01:48] <nor3> how do i deal with this?
[17:01:53] *** bas-i has joined ##java
[17:01:54] <isr`> you are quite possibly the least chill head in here
[17:01:56] <lem> yeah, it was my fault. I was curious. damn I feel so guilty
[17:01:59] <cheeser> ~~ nor3 classpath
[17:02:00] <javabot> The classpath tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the classpath. Also see http://is.gd/j4gM [sun.com] for more info.
[17:02:07] <cheeser> isr`: you are quite mistaken
[17:02:24] <nor3> cheeser: i do use classpath to specify both jars!
[17:02:34] <cheeser> ~~ nor3 show us
[17:02:34] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[17:02:53] <lem> nor3, org.A and org.B are unique package names, so what you describe should not happen
[17:03:12] *** stork has joined ##java
[17:03:13] <stork> yo.
[17:03:20] <nor3> cheeser: javac -classpath ./A.jar:./B.jar src.java
[17:03:29] <lem> stork riesen
[17:03:43] <nor3> i get: src.java:29: package org.B does not exist
[17:03:45] <cheeser> nor3: you don't need the ./ stuff
[17:03:52] <lem> i love those thingies. In german we say Plombenzieher to that kind of candy.
[17:04:00] <stork> I love you.
[17:04:09] *** tunk has joined ##java
[17:04:11] <lem> stork, hmm, are you a woman?
[17:04:21] <stork> if you want me to be.
[17:04:21] <nor3> cheeser: ok, but i get the same error
[17:04:26] <stork> </off-topic>
[17:04:45] <lem> stork, so you're a nerd hiding behind a false identity, get off of me
[17:04:59] <cheeser> nor3: pastebin the actual compiler output and the output of jar -tf for both A.jar and B.jar
[17:05:05] <stork> I'm out of your league anyhow lem.
[17:05:18] <stork> I was just wondering, in the context of a java database, what does 'static schema' mean? Does it mean the structure of the data doesn't change?
[17:05:34] <lem> stork, you're damn right, coz I prefer the cheap girls
[17:05:40] <tunk> Does ReentrantReadWriteLock unlock itself on finalisation?
[17:05:41] <nor3> ok
[17:05:41] <cheeser> what is a "java database" ?
[17:05:50] *** Techdeck has joined ##java
[17:06:19] <stork> that was me kinda half-arsedly choosing a context in the hope that you wouldn't read it anyway, I meant the Berkley Database, Java Edition documentation.
[17:06:21] <lem> a java database is a database where I put all my experiences with hot girls from java in it
[17:06:32] <cheeser> stork: you'll have to read their docs.
[17:06:34] <dmlloyd> lem: so you mean, like, /dev/null?
[17:06:43] <cheeser> javabot: dmlloyd++
[17:06:43] <javabot> dmlloyd has a karma level of 104, cheeser
[17:06:43] <lem> dmlloyd, you got me
[17:07:20] <stork> burn.
[17:07:36] <stork> I figured 'static schema' was a general database term, oh well. Thanks cheeser.
[17:07:46] <dmlloyd> I was more referring to the fact that in this channel of 304 people, there are zero women
[17:07:57] *** dpy has quit IRC
[17:08:01] <cheeser> stork: i've not heard it, fwiw
[17:08:03] <dmlloyd> if he had left off "from java", then sure
[17:08:23] <lem> dmlloyd, how can you be so sure dude?
[17:08:46] <kavon> omg a question about Java: If I make an Object[], I know I can put Strings in, but can I put a primitive type like int or must I cast it to the wrapper Integer?
[17:08:50] <dmlloyd> lem: I just am.
[17:09:02] <stork> you must use Integers, kavon.
[17:09:12] <dmlloyd> kavon: primitives aren't objects, so you have to wrap them.
[17:09:13] <hiredman> ints are not Objects
[17:09:31] <dmlloyd> kavon: thus, int[], byte[] etc do not extend Object[].
[17:09:37] <kavon> stork: good, now I fully understand wrapper classes
[17:09:39] <dmlloyd> ~arrays
[17:09:39] <javabot> dmlloyd, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
[17:09:41] <lem> make an Integer of the int
[17:09:55] <cheeser> dmlloyd: String[] doesn't extend Object[] either
[17:09:56] <cheeser> 8^)=
[17:10:08] <vol> autoboxing might take care of int -> Integer for you, though.
[17:10:11] <lem> i.e. new Integer(myGoodOleIntValueMotherFucker);
[17:10:12] <cheeser> it will
[17:10:19] * jottinger eyes lem
[17:10:24] <cheeser> ~~ lem obscenity
[17:10:24] <javabot> lem, obscenity is the crutch of inarticulate motherfuckers.
[17:10:32] *** UK-sHaDoW has joined ##java
[17:10:36] <lem> oh I'm sorry
[17:10:41] <kavon> lem: Can't I use (Integer) and then to go back (int) ?
[17:10:48] <jottinger> yeah, we hate cursing here, damn you to hell
[17:10:50] <cheeser> lem: it's a joke
[17:10:59] <kavon> jottinger: lol
[17:11:07] <dmlloyd> cheeser: I thought it did... Object[].class.isAssignableFrom(String[].class) == true
[17:11:16] *** donavan has joined ##java
[17:11:25] <lem> kavon, sure, you can do whatever you want. your mother told you that already, didn't she?
[17:11:36] <jottinger> lem: but only behind closed doors
[17:11:46] *** kulhas has joined ##java
[17:11:47] <kavon> lem: she said I can't talk to strangers still :(
[17:11:50] <kulhas> hello
[17:11:54] <dmlloyd> cheeser: (new String[0]) instanceof Object[] == true
[17:12:04] <kavon> lem: its risky that I'm even here
[17:12:09] <lem> jottinger, I have to rephrase ... mother use to say: you can BECOME whatever you want!
[17:12:16] <dmlloyd> cheeser: (new byte[0]) instanceof Object[] == doesn't even compile :)
[17:12:18] <jottinger> she was clearly lying
[17:12:21] <kulhas> i am working with struts , and i want to get a session var , from a get method , how can i do it ?
[17:12:30] <lem> kavon, you're right. that reminds me of ...
[17:12:31] <cheeser> dmlloyd: oh, interesting. they must've changed that
[17:12:36] <dmlloyd> I doubt it
[17:12:43] <cheeser> i don't think that used to work.
[17:12:45] <dmlloyd> arrays have always been the odd man out
[17:12:55] <lem> jottinger, sure she was lying. all mothers lie to their kids.
[17:13:04] <deufrai> kulhas: you have access to the seesion via the request
[17:13:14] <dmlloyd> java serialization code implies that you've always been able to use an Object[] to hold any object array type
[17:13:15] <jottinger> ... and to themselves
[17:13:24] <dmlloyd> at least, since 1.1 :)
[17:13:34] <lem> obama's mom said: kid, you can become the vice president of the united states of america, if you just want it
[17:13:47] <lem> but that's soooo off-topic
[17:13:53] <kulhas> but my getther methods dont pass a request arg , or they do ?
[17:13:54] <lem> back to java
[17:13:56] <jottinger> I'm actually proud of obama
[17:14:16] <lem> I am too, even though I'm not from america
[17:14:17] <deufrai> kulhas: what's the context, you're inside a bean ?
[17:15:08] <kulhas> i am insied a form
[17:15:17] <deufrai> kulhas: you have access to the request from an Action's doExecute(...) method and that's it
[17:15:17] *** sombriks has joined ##java
[17:15:59] <lem> ~pastebin
[17:15:59] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[17:16:33] <deufrai> kulhas: besides implementing validate(), no logic is to be coded inside a formbean
[17:17:55] <kulhas> i doing a jsp form bean using multibox, i need to pass a String [], so that all my boxes start checked, and i need to acess my session var collection to check the size and other stuff to retrive a good String []
[17:18:01] <kulhas> so i need to acess to session
[17:18:03] <lem> I have a question to all javafx gurus out there: How did you solve this? http://pastebin.stonekeep.com/5659 I'm sure you had this
[17:18:21] *** tunk has left ##java
[17:18:28] *** Resistance has joined ##java
[17:18:45] <deufrai> kulhas: don't you have some sort of initializing Action that forwards your user to said jsp ?
[17:20:26] <deufrai> One way to do it is : Using an init Action that gets values from the session, populates your Struts formBean and then forwards user to the jsp
[17:20:59] <nor3> cheeser: sorry this took forever: http://pastebin.com/m5ee1fd95
[17:21:16] <lem> it throws the nullpointerexception when I want to run a javafx app. but the exception is out of my responsibility
[17:21:33] <lem> it throws it when I want to start ANY javafx app.
[17:21:36] <lem> to be precise
[17:22:40] *** riotz has joined ##java
[17:22:42] *** nnc has quit IRC
[17:23:55] *** casmo has joined ##java
[17:26:31] <cheeser> nor3: are those jars all in the current dir?
[17:28:00] <lem> da... you didn't have to paste all of it in there
[17:28:06] <lem> jk
[17:28:25] *** waz has joined ##java
[17:28:30] <lem> it should find the jbox2d package
[17:28:34] <lem> kinda funny
[17:30:23] *** ries has quit IRC
[17:30:50] <lem> maybe it's better to extend the CLASSPATH env-variable. and it's easier to start because the command is shorter
[17:31:17] <nor3> cheeser: yes
[17:31:41] <nor3> :\
[17:31:58] <nor3> i don't see why it would make a difference
[17:32:10] <lem> it always makes a difference my son
[17:32:21] <nor3> how so?
[17:32:34] <lem> nah, it's just a good practice maybe?
[17:32:55] <lem> I don't care, but it's some kind of naughty error and I'm trying to get something moving for ya
[17:34:05] <cheeser> oh. i see the problem.
[17:34:16] * lem looks at cheeser.
[17:34:29] <cheeser> when you import org.jbox2d.*, what do you expect to happen, nor3 ?
[17:34:32] * nor3 looks at cheeser too
[17:34:41] *** donavan has quit IRC
[17:34:59] <cheeser> were you expecting to import all the classes in that jar?
[17:35:13] <nor3> yar, i guess so
[17:35:22] <cheeser> * imports don't work that way.
[17:35:22] *** donavan has joined ##java
[17:35:28] <nor3> d'oh
[17:35:32] <cheeser> my advice is to not use them at all.
[17:35:35] * nor3 wants to go back to python
[17:35:35] *** Thing`e` has joined ##java
[17:35:38] <cheeser> explicitly import the classes you want
[17:36:00] <cheeser> * imports aren't recursive like that as packages aren't really hierarchical.
[17:36:29] *** ldamwork has quit IRC
[17:36:47] <nor3> erm
[17:36:47] <lem> but the org.jbox2d package isn't that big
[17:36:50] <nor3> so why doesn't this work?
[17:36:52] <nor3> p5py.java:1: package org.jbox2d does not exist
[17:36:52] <nor3> import org.jbox2d.dynamics;
[17:36:55] <lem> but give it a try
[17:36:58] <Thing`e`> hey, in junit testing, how do you make it so the tearDown method literally does just that? because its an ordering system & there's no method to wipe all orders, the orders aren't reset for each method
[17:37:01] <cheeser> you don't import packages, nor3
[17:37:12] <nor3> oh
[17:37:14] <nor3> you know
[17:37:17] <nor3> that makes sense, lol
[17:37:27] <Thing`e`> if I do a test, it'll work, but if I try again it won't work until I recompile
[17:37:45] <nor3> seriously, why doesn't everyone just adopt python import system?
[17:38:01] <cheeser> nor3: seriously, because java isn't python
[17:38:06] *** zophy has quit IRC
[17:38:14] <nor3> ah it works now
[17:38:20] <lem> lol
[17:38:21] <nor3> cheeser: well it should be D:
[17:38:24] <cheeser> funny how that works out.
[17:38:35] <cheeser> nor3: yeah. all our code should run much more slowly. i agree.
[17:38:37] <cheeser> 8^)=
[17:38:51] <nor3> i'm not asking you to compile to .pyc
[17:38:57] <nor3> just the syntax, etc
[17:38:58] <nor3> hehe
[17:39:33] <cheeser> i don't find anything that compelling about python's approach
[17:39:50] <cheeser> it has its own warts. you just happen to prefer those particular warts
[17:40:44] <pr3d4t0r> Hello.
[17:40:57] *** squi has quit IRC
[17:41:21] <lem> Are you interested in our Apples, say Apples. Are you interested in your Bananas, say Bananas.
[17:41:23] <nor3> pr3d4t0r: howdy
[17:41:24] <stork> hey pr3d how's the book?
[17:41:39] <pr3d4t0r> stork: Hej.
[17:41:41] <pr3d4t0r> nor3: Hej.
[17:41:44] <Thing`e`> can anyone help me with my junit problem?
[17:41:49] <pr3d4t0r> stork: It's going well - which one? ;)
[17:41:59] <stork> there's more than one?
[17:41:59] <lem> any javafx programmers around?
[17:42:03] <cheeser> bbl
[17:42:08] <lem> cya cheeser
[17:42:16] <pr3d4t0r> stork: Sure.
[17:42:28] <pr3d4t0r> stork: I just finished writing another booklet last night.
[17:42:30] <lem> Thing`e`, you want tearDown() to teardown what?
[17:42:43] <stork> I was only aware of the one with the Tesla coils
[17:42:46] <pr3d4t0r> stork: So to give you a full status I need to know which one :)
[17:42:47] <stork> and world domination plot
[17:42:48] <pr3d4t0r> stork: Ah.
[17:42:50] <pr3d4t0r> stork: :)
[17:43:05] <stork> which I still haven't gotten round to reading
[17:43:07] <pr3d4t0r> stork: OKi, that one was a 2007 Amazon best-seller, it's sellling so-so, it's a fun project.
[17:43:14] <stork> nice :O
[17:43:18] <pr3d4t0r> stork: Then I have the first App Engine book.
[17:43:24] <pr3d4t0r> ~tell stork about GAE book.
[17:43:24] <javabot> stork, I have no idea what GAE book is.
[17:43:30] <pr3d4t0r> ~tell stork about app engine book.
[17:43:30] <javabot> stork, I have no idea what app engine book is.
[17:43:32] <Thing`e`> well what I need to do is reset an arraylist in the junit test, but the arraylist is in the actual method its testing
[17:43:33] *** agnul has quit IRC
[17:43:34] <pr3d4t0r> Hrm...
[17:43:35] <Thing`e`> is this possible?
[17:44:08] <lem> Thing`e`, that's not possible since tearDown() will be called AFTER the test method
[17:44:25] <lem> Thing`e`, you could call it, but that's out of order
[17:44:49] *** prgrmr has joined ##java
[17:44:49] <Thing`e`> since when I run my tests, it works fine the first time I run the tests
[17:44:53] <lem> Thing`e`, why can't you just add a line to reset it in the testing method?
[17:44:56] <Thing`e`> but the second time I run them, it fails
[17:45:03] *** mgenov has quit IRC
[17:45:09] *** epalm has joined ##java
[17:45:15] <Thing`e`> because there's no reset method in the class its testing
[17:45:27] <lem> Thing`e`, how can this happen? in a complete new test run it doesn't work? are you working with a database?
[17:45:33] <pr3d4t0r> ~app engine book is <reply>$who, here's a reference for writing Google App Engine applications: http://is.gd/jHKj
[17:45:33] <javabot> Okay, pr3d4t0r.
[17:45:37] <stork> hrm.
[17:45:41] <Thing`e`> nope
[17:45:44] <Thing`e`> I'm not
[17:45:57] <Thing`e`> it works when I re-compile
[17:45:57] <pr3d4t0r> ~GAE book is <see>app engine book
[17:45:57] <javabot> Okay, pr3d4t0r.
[17:46:01] <pr3d4t0r> ~gae book
[17:46:01] <javabot> pr3d4t0r, here's a reference for writing Google App Engine applications: http://is.gd/jHKj
[17:46:02] *** Blaay has joined ##java
[17:46:05] <Thing`e`> but if I don't, it won't work again
[17:46:13] <pr3d4t0r> ~tell stork about GAE book.
[17:46:13] <javabot> stork, here's a reference for writing Google App Engine applications: http://is.gd/jHKj
[17:46:19] <stork> good show.
[17:46:24] <lem> Thing`e`, that is odd
[17:46:37] <Thing`e`> yeah, you'd think if I ran a test once and it worked
[17:46:39] <Thing`e`> it would work always
[17:46:41] <pr3d4t0r> stork: How've you been?
[17:46:48] <Thing`e`> but it doesn't :
[17:46:51] <Thing`e`> :/*
[17:46:52] *** wlfshmn has quit IRC
[17:46:54] <pr3d4t0r> stork: Right now I'm finishing a little personal project I haven't played with in a while, in Java.
[17:47:14] <stork> same old, really. Started my CS course at uni Sept last year, just been ploughing on with that.
[17:47:15] <lem> Thing`e`, my advice: add a line to reset the arraylist in the testing method or write a second test method so tearDown() will reset between these these test cases.
[17:47:20] <stork> oh, what is it pr3d4t0r ?
[17:47:21] *** docmorb has joined ##java
[17:47:40] <lem> 2nd these == two
[17:47:45] <pr3d4t0r> stork: A touch took with a Java GUI.
[17:47:50] *** vrv has quit IRC
[17:47:59] *** deca has quit IRC
[17:48:02] <Thing`e`> can I tell the testing method to reset the arraylist though? since the arraylist is defined and used in the main class rather than the junit class
[17:48:11] *** josemoreira has joined ##java
[17:48:18] <stork> pr3d4t0r: what's a touch took?
[17:48:31] <AMcBain> like the unix touch command.
[17:48:47] <lem> Thing`e`, google how to reset an arrayList
[17:48:58] <AMcBain> update a file to a given date (or current date), iirc.
[17:49:07] <AMcBain> s/like//
[17:49:16] <pr3d4t0r> AMcBain: Heh -- you *do* know :)
[17:49:22] <pr3d4t0r> javabot: AMcBain++
[17:49:22] <javabot> amcbain has a karma level of 29, pr3d4t0r
[17:49:32] <Thing`e`> I mean, I know how to
[17:49:41] <Thing`e`> but can I reset it from the testing class?
[17:50:18] <Thing`e`> and its set to private in the main class
[17:50:37] <Thing`e`> which makes me think the test won't be allowed to reset it
[17:50:49] <lem> Thing`e`, I guess you were the one who set it to private, so you can change it
[17:50:51] *** yclian has quit IRC
[17:50:58] <Thing`e`> I didn't
[17:51:04] <Thing`e`> its part of a project
[17:51:22] <pr3d4t0r> stork: AMcBain helped me troubleshoot an OS X GUI bug for jtouch recently.
[17:51:22] <Thing`e`> I mean I could set it to public, but the test should work around my original code
[17:51:26] <Thing`e`> not the other way round
[17:51:39] <stork> cool.
[17:51:46] <Thing`e`> I just thought the junit test would reset everything every time it was run, but it doesn't :/
[17:51:48] <lem> I think it's better to write a 2nd test case and let tearDown() reset the arrayList.
[17:52:18] <lem> usually it does
[17:52:29] <Thing`e`> I can't tell it to reset the arraylist though
[17:52:31] <lem> how do you start the unit tests?
[17:52:57] *** donavan has quit IRC
[17:53:21] *** DjZemich has joined ##java
[17:53:26] <Thing`e`> through BlueJ (yes, I know :P)
[17:53:41] <AMcBain> er BlueJ? yuck.
[17:53:48] *** PuffTheMagic has joined ##java
[17:53:53] <Thing`e`> the project wouldn't work in Eclipse
[17:53:58] *** mengu has joined ##java
[17:54:07] <Thing`e`> and I wasn't overly fussed about trying to get it to work in it either
[17:54:38] *** squi has joined ##java
[17:55:42] <lem> why do you need the main class involved in testing?
[17:55:44] *** lhogie has quit IRC
[17:56:18] <lem> you should test a unit which is a small part (usually one class) of your system.
[17:56:42] <Thing`e`> the class isn't very big, and the work tells us to do a unit test on it
[17:57:00] <lem> the work?
[17:57:38] *** mfdavid has joined ##java
[17:57:39] <Thing`e`> the assignment
[17:58:36] <lem> so you call a main class out of the test method?
[17:58:51] <mfdavid> hi all. Is there a lib for image recognition? Like, I take a picture of something and I would like to compare it with a base of images, and if its similar to one of those, something should happen. Is there a lib to help me with this image comparation (im not saying 2 identical images, just similars)
[17:59:42] *** resmo has joined ##java
[17:59:55] <lem> hmm, there was an ibm-funded open source projects once. I don't know if it still exists. that one dealt with image recognition too
[18:00:30] <lem> I can't recall the project name
[18:00:40] <mfdavid> :(
[18:00:46] <lem> just google it
[18:00:46] *** LordMetroid has quit IRC
[18:00:49] <lem> damn it
[18:00:54] <lem> jk ;)
[18:01:17] <mfdavid> im trying hehe
[18:01:31] *** waz is now known as Guest20644
[18:01:56] *** waz has joined ##java
[18:02:38] <Thing`e`> <lem> so you call a main class out of the test method? - sorry, what do you mean? :o
[18:02:54] <Thing`e`> in the test class I have a few methods which call some methods from the class its teseting
[18:03:01] <Thing`e`> testing*
[18:03:10] *** ldamwork has joined ##java
[18:03:17] *** donavan has joined ##java
[18:03:23] *** boringwall has joined ##java
[18:03:42] <lem> Thing`e`, a unit tests usually runs like this: you setup a murder... uh no .. you setup the test and then actually do the test by creating objects and doing something with them ... and then you tear down everything so it looks like it looked before.
[18:04:05] *** squi has quit IRC
[18:04:05] <lem> Thing`e`, so tell me just why a main class is involved in a unit test.
[18:04:10] *** elrob has quit IRC
[18:04:12] *** Towny has joined ##java
[18:04:32] *** elrob has joined ##java
[18:04:34] <mfdavid> probably there is something in the main class witch should not be there.
[18:04:51] <l3ns> in using JDialog, do I always create another instance outside the parentframe?
[18:05:41] <Thing`e`> yeah that's what I'm doing except for one thing
[18:05:48] <Thing`e`> I call a method "order1.newOrder ( sb3 );"
[18:06:01] *** conan has quit IRC
[18:06:02] <Thing`e`> so its creating an order using the main class
[18:06:07] <Thing`e`> not as an object within the unit test
[18:06:18] <Towny> anyone know of a good resource on how to do DnD for JTable rows?
[18:06:25] <Thing`e`> and I need those 'orders' to be removed from the system
[18:06:30] *** dunmer has quit IRC
[18:06:41] *** docmorb has quit IRC
[18:06:43] <lem> mfdavid, the name of the project is opencv
[18:06:52] *** conan has joined ##java
[18:07:14] <mfdavid> lem: cool :) thanks
[18:07:30] <lem> mfdavid, you're welcome, just look if it has what you need
[18:07:41] <mfdavid> :)
[18:07:59] *** mk has joined ##java
[18:08:12] <lem> hmm... can't recall if it's a java project ... argh
[18:08:23] <lem> just google
[18:10:22] *** dunmer has joined ##java
[18:11:49] *** Yustme has joined ##java
[18:12:12] *** charzero has joined ##java
[18:12:30] *** NiSoOo has joined ##java
[18:12:49] *** PuffTheMagic is now known as PuffTheMagic_
[18:13:02] *** PuffTheMagic_ is now known as PuffTheMagic
[18:13:21] <lem> gotta go
[18:13:26] *** lem has left ##java
[18:13:50] <giaco> how can I create the clone method of one class? Myclass copy = (Myclass) this.clone(); ??!?!
[18:13:56] *** nijm has quit IRC
[18:14:24] <jottinger> giaco: just create it
[18:14:50] *** teralaser has quit IRC
[18:15:00] <giaco> for example? I've to create the clone method inside Myclass
[18:15:07] <jottinger> yes
[18:15:13] <giaco> that should return an Object
[18:15:17] <jottinger> yep
[18:15:21] <jottinger> thus te cast
[18:15:28] <cheeser> well, it should return MyClass actually
[18:16:07] <giaco> yes but it says that this.clone() is an infinite loop
[18:16:13] <jottinger> heh
[18:16:21] <cheeser> ~show us
[18:16:22] <javabot> Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[18:16:25] <charzero> Is there a way to associate a java.net.Authenticator with a single URLConnection? I may have multiple threads accessing the same URL with multiple logins; I do not want to do Authenticator.setDefault()
[18:16:42] *** UT2K3 has quit IRC
[18:17:20] *** hoens has joined ##java
[18:17:48] *** KingBilly has joined ##java
[18:18:04] <giaco> http://pastie.org/390852
[18:18:32] *** TheCastor has joined ##java
[18:18:36] *** eidolon has quit IRC
[18:18:40] <KingBilly> hi im trying to use java to connect to a MySQL database but im not sure what URL to use to connect to the database? im using an example from someone elses code and it simply says localhost, what should i change it to?
[18:18:54] <cheeser> giaco: yeah. you're calling your clone from inside clone
[18:20:03] <giaco> so? how to create a clone method? it's requested inside my project, and it says that it should return an Object (but I know that it would be better a Myclass object, but that's not the point, the point is how to clone itself)
[18:20:19] *** isr` has left ##java
[18:20:31] <cheeser> well, what should a clone method do do you think?
[18:21:43] <KingBilly> anyone have any ideas to help me out a little?
[18:21:43] <giaco> copy my object and return, not as a reference
[18:22:03] <cheeser> right. but what does it mean to copy an object?
[18:22:23] <charzero> KingBilly: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html
[18:23:29] <giaco> create a new, use new, fill up some memory
[18:23:32] *** mknix has quit IRC
[18:23:44] *** Niike has quit IRC
[18:23:56] *** idea4good has joined ##java
[18:24:06] <KingBilly> [,failoverhost...] << must i have a failoverhost, if so what should it be?
[18:24:20] <giaco> cheeser, how about this? http://pastie.org/390855
[18:24:26] <charzero> KingBilly: If you do not have a failover host, you can leave that out.
[18:24:36] <cheeser> ~~ giaco tias
[18:24:37] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[18:25:32] *** asap18 has joined ##java
[18:26:01] *** docmorb has joined ##java
[18:26:06] *** pschriner has quit IRC
[18:26:46] <docmorb> ~pastebin
[18:26:46] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[18:27:45] <KingBilly> charzero: could you take a look at this and tell me if you see any problems: http://pastie.org/390858
[18:27:56] <KingBilly> when i run it, it says it cannot connect
[18:27:56] *** Towny has left ##java
[18:27:56] *** produx has quit IRC
[18:28:37] *** abruptus has joined ##java
[18:28:45] *** valcker has quit IRC
[18:29:32] <cheeser> KingBilly: try printing out the exception message
[18:30:05] *** Goundy has joined ##java
[18:30:16] <idea4good> exception.getmessage()
[18:30:19] *** kReepicheep has quit IRC
[18:30:37] <tieTYT2> http://news.ycombinator.com/item?id=60357
[18:30:44] <KingBilly> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
[18:30:45] <KingBilly> hmmm
[18:31:05] <KingBilly> so i have to download the "Driver" class?
[18:31:11] <joed> ...
[18:31:12] <KingBilly> then import it?
[18:31:16] <idea4good> import that particular class
[18:31:17] *** yclian has joined ##java
[18:31:31] <charzero> KingBilly: You have to download the mysql jdbc jar and include it in your classpath.
[18:32:56] *** EnderMB has joined ##java
[18:33:08] <KingBilly> ahh crap i forgot to do it in this project, i created a new one to test it and forgot to add it
[18:33:15] *** genesiss has quit IRC
[18:33:23] *** bhz- has quit IRC
[18:33:37] <cheeser> KingBilly: lesson learned: log your exceptions
[18:34:28] *** hse-hoens has quit IRC
[18:34:31] <KingBilly> seems like a wise thing to do :)
[18:34:50] *** Tokemi has quit IRC
[18:35:08] <cheeser> 8^)=
[18:35:37] *** lunk has quit IRC
[18:35:38] *** gcarrier has quit IRC
[18:36:37] <idea4good> i need a suggestion form you guyz
[18:36:47] <idea4good> in my job i am the most junior person
[18:36:51] *** morkar- has joined ##java
[18:36:58] <idea4good> and i am not given much imp tasks
[18:37:09] *** mele- has joined ##java
[18:37:37] <idea4good> i mean opeople are working on spring frameworks hibernate auditing Jboss security and all stuff
[18:38:03] <joed> The work on XML?
[18:38:19] <idea4good> and all crap is dumped at my desk obvisouly i ma the most junior so how do i improve my learning curve
[18:38:50] <cheeser> by doing what they give you
[18:39:05] <cheeser> and talk to your manager about stretching a bit.
[18:39:09] <cheeser> anyway. gotta run
[18:39:10] <idea4good> i believe unless and untill we get hands duirty with any technology we cant have cmd of that
[18:39:48] <waz> get your tasks done well and fast, ask for more work
[18:39:59] <waz> show interest in stuff
[18:40:34] <joed> Do something on the side? In the evenings, then you can say - yeah, I know how to do that.
[18:40:59] <idea4good> ok
[18:41:13] *** genesiss has joined ##java
[18:42:17] *** vix85 has joined ##java
[18:43:01] *** latebind has quit IRC
[18:44:20] *** LordMetroid has joined ##Java
[18:45:59] *** J0bk has joined ##java
[18:47:09] *** langenberg has joined ##java
[18:47:16] *** ^Cheeky has quit IRC
[18:48:39] *** Thamster has quit IRC
[18:48:40] *** tieTYT2 has quit IRC
[18:49:31] *** Xianny has quit IRC
[18:50:14] *** Blaay has quit IRC
[18:50:15] *** magentar has joined ##java
[18:50:46] *** squi has joined ##java
[18:50:53] *** Blaay has joined ##java
[18:52:08] *** KermitTheFragger has quit IRC
[18:57:57] *** ankylose has joined ##java
[18:59:02] *** nDuff has quit IRC
[18:59:32] *** Fox_1_ has quit IRC
[18:59:51] *** Andrew`_ has joined ##java
[18:59:56] *** UT2K3 has joined ##java
[19:00:06] <Andrew`_> Is anyone aware of a Java API for the analysis of stock market trends?
[19:00:07] *** acuster has joined ##java
[19:00:19] <Andrew`_> google isn't being too helpful but i'm sure something exists
[19:00:49] *** cybereal has quit IRC
[19:02:02] *** Johnny_vd_Laar has joined ##java
[19:03:26] *** Absolute0 has joined ##java
[19:03:29] <KingBilly> does anyone know where i can download the com.mysql.jdbc.Driver class? i cant seem to find it...
[19:03:54] <FauxFaux> It's called "Connector/J" on mysql's website.
[19:04:05] <Absolute0> When I call JTextArea.setFont(someFont); nothing is rendered in the textarea, should I use another method to change the default textArea font?
[19:04:15] *** scorchsaber has quit IRC
[19:04:23] *** foo-nix has quit IRC
[19:05:32] *** Mkop2 has joined ##java
[19:05:37] *** vesz has joined ##java
[19:05:46] *** Willow has joined ##java
[19:06:26] *** fragalot has joined ##java
[19:10:02] *** boringwall has quit IRC
[19:10:10] *** boringwall has joined ##java
[19:10:53] *** Andrew`_ has quit IRC
[19:11:45] <selckin> what would be easier/faster to learn spring ioc or guice?
[19:12:18] *** NiSoOo has quit IRC
[19:12:31] *** NiSoOo has joined ##java
[19:12:32] <docmorb> Sorry to bother you with this problem, but i can't find a solution. I'm fighting with this problem for hours now. I'm trying to create a c header file using javah, but I always get some error, no matter how I invoke it. Here is a link to the howto I'm using. The problem is that the part where it says to use "javah Happy" to create a h file. I't just doesn't work. I tried a bunch of variations, read the manual file, googled it. Nothing. I' wou
[19:13:06] <docmorb> Here is the link to the howto: http://www.javaworld.com/javaworld/javatips/jw-javatip23.html
[19:13:17] <fragalot> 'sup Willow
[19:13:32] <Willow> hey fragalot ^_^
[19:13:34] <selckin> docmorb: "By John D. Mitchell, JavaWorld.com, 01/01/97" maybe try something writen in this decade
[19:14:23] *** Absolute0 has left ##java
[19:15:16] <selckin> docmorb: http://java.sun.com/docs/books/jni/html/jniTOC.html
[19:15:31] <docmorb> Ummm... I have this book (http://www.amazon.com/Core-Java-II-Advanced-Features/dp/0130927384) which is old about a year or so, and it has the same instructions, that still dont work.
[19:15:53] *** wad has joined ##java
[19:15:57] <dangertools> docmorb: so, what output do you get?
[19:16:16] *** rajesh has joined ##java
[19:16:35] *** Frostshock has joined ##java
[19:17:02] *** squi has quit IRC
[19:17:20] <Frostshock> anyone here know how to get xmlpullparser to get the exact text instead of converted escaped character (&amp; turns into &)
[19:17:22] <docmorb> http://pastebin.stonekeep.com/5660 - this is the output
[19:17:50] <dangertools> docmorb: the output is quite clear, isn't it?
[19:18:10] <dangertools> javah wants a class file using the class' fully qualified classname
[19:18:46] <vol> docmorb: default package?
[19:18:58] <vol> if your class Foo is in com.bar
[19:19:05] <docmorb> No, the package is called testirajmo.nejtiv
[19:19:07] <vol> you would type "javah com.bar.Foo"
[19:19:07] <dangertools> vol: look at the output he pasted
[19:19:17] *** jcp has joined ##java
[19:19:58] <vol> dangertools: reading error descriptions is for losers. I shoot from the hip.
[19:20:15] <dangertools> :P
[19:20:50] <docmorb> I tried to solve this by using Copy qualified classname in Eclipse and pasting it in the terminal, with variations. Didn't help. Sorry if it looks like I didn't try solving the problem myself, i really did. Nothing helped, and Im lost in all the ways i tried...
[19:20:53] *** teralaser has joined ##java
[19:21:01] *** musically_ut has quit IRC
[19:21:13] <vol> docmorb: go to the bin directory, not the directory with the class file. Make sure that the directory structure is testirajmo/nejtiv/HelloNative.class .
[19:21:15] <dangertools> docmorb: you have to run javah from the base directory
[19:21:26] <vol> Type "javah testirajmo.nejtiv.HelloNative"
[19:21:30] *** wad has quit IRC
[19:21:55] <vol> running javah from the directory with the class file only works if the class has the default package (which is another nono)
[19:22:13] <docmorb> OMG. Thank you very much. Works.
[19:22:23] <vol> you're welcome
[19:22:30] <vol> enjoy the terror and pain that is jni
[19:22:30] *** musically_ut has joined ##java
[19:22:44] <fragalot> Hi, I would like to know how to build/deploy an ear file on the commandline in a local jboss installation, without using ant or seam.. Is there anyone here that could help me with that?
[19:23:43] *** Goundy has quit IRC
[19:24:58] *** vulture has quit IRC
[19:25:18] <fragalot> (I can't use ant because i'm "not allowed to" :( )
[19:25:55] *** waz has quit IRC
[19:26:02] <dangertools> ~homework
[19:26:02] <javabot> Homework is meant to be done by YOU so that YOU learn something. Stop cheating. We didn't like doing our own, why should we bother with yours? Besides, we'd rather you failed so we have less competition. Have a nice day!
[19:26:18] *** timte has joined ##java
[19:26:44] <fragalot> this isn't for homework... i'm /AT/ work.
[19:27:01] <vol> Ah, so instead of doing your homework, we're doing your work.
[19:27:05] <vol> ;)
[19:27:09] <dangertools> oh, sounds like homework because why would work not allow you to use ant?
[19:27:09] <fragalot> bastard :p
[19:27:11] <vol> Sorry, I really don't know or I'd help : )
[19:28:01] *** elindio has joined ##java
[19:28:07] *** idea4good has quit IRC
[19:28:44] <fragalot> I know how to do it in ant, it's just, the guys at work here are wankers and they're forcing me not to use ant
[19:28:45] *** kulhas has quit IRC
[19:28:47] <fragalot> :/
[19:29:07] *** Ivellina has joined ##java
[19:31:00] <cyth> use bash lol
[19:32:49] *** [Steffy] has joined ##java
[19:32:59] <cyth> i dunno nothing about jboss tbh, but if it's like other servlet containers you can deploy through a web interface?
[19:33:01] <cyth> wget :p
[19:33:26] *** mknix has joined ##java
[19:33:46] <fragalot> Hmm. I'll try that
[19:33:48] <fragalot> thanks
[19:34:25] *** rullie has joined ##java
[19:34:32] *** slonkko has joined ##java
[19:36:05] <The_Birdman> fragalot:an ear is just a jar with deployment descriptor and other things inside. to deploy it on jboss, you could just move the ear or exploded ear to the "jboss profile" deploy directory
[19:36:54] <fragalot> oh
[19:36:56] <fragalot> thanks The_Birdman :D
[19:37:24] *** Xianny has joined ##Java
[19:37:31] *** acuster has quit IRC
[19:38:02] <slonkko> could someone help me with strange error while creating FilterChain?
[19:38:04] <slonkko> http://pastebin.com/d1b982d80
[19:38:36] <slonkko> line 40 is line 55
[19:40:44] <fragalot> The_Birdman: also. had fun with ctcp? :p
[19:41:08] <The_Birdman> :-) I could have more fun with telnet or some other stuff :-)
[19:41:24] <The_Birdman> I was just wondering that's all, that's it
[19:41:24] <fragalot> lol, if you have to know, irssi :)
[19:41:42] <The_Birdman> fragalot:who are you? I want to know everything about you! :-)
[19:42:00] <fragalot> ^_^ I am everything and nothing.
[19:42:00] *** mesmer has joined ##java
[19:42:23] <The_Birdman> I guess I'll be looking for that answer all my life!
[19:42:52] <welp> o.O
[19:43:14] * welp thinks everyone should /ctcp The_Birdman version
[19:43:14] <welp> :P
[19:43:50] <fragalot> shut up welp :p
[19:43:59] * welp whistles
[19:44:39] *** _stack has joined ##java
[19:45:50] <welp> &
[19:45:59] <welp> o.O
[19:46:04] * welp didn't press that
[19:46:20] <Willow> laptopjacked? :P
[19:46:30] *** EnderMB has quit IRC
[19:46:52] *** magcius has quit IRC
[19:47:14] *** JohnAds has joined ##java
[19:47:24] <jcp> This is probably the wrong place to ask about this, but it's related to a Java program that I'm writing...
[19:47:41] <fragalot> jcp: we don't do hava here.
[19:47:43] * fragalot runs
[19:47:47] <fragalot> java*
[19:48:08] *** staykov has joined ##java
[19:48:12] <jcp> If you have an algorithm who's execution time is dependant on not just the data set that it's working on but on additional arguments, how would you express that in Big-O notation>
[19:48:14] *** Luminari has joined ##java
[19:48:14] <jcp> ?
[19:48:27] <jcp> For example, getting an element from a linked list by it's index
[19:48:42] <jcp> This is dependant on the index you're after, not the amount of items in the linked list
[19:49:04] <Luminari> if I have one element of an enum like enum.myItem, how to do I get the next element in the enum in order?
[19:49:49] <mesmer> how can I control a do-while loop if the control variable is inside the loop?
[19:49:59] <welp> o.O
[19:50:00] <JohnAds> I have a TAG input type=file in my index.JSP name = "upfile", but when I wrote this "" request.getParameter("upfile"); "" at the servlet the return is the name of the file, but I need the path.. What I'm doing wrong?
[19:50:43] <dangertools> Luminari: ordinal() and values()
[19:50:43] *** dmlloyd_ has joined ##java
[19:50:44] <AskHL> jcp, O(i), i.e. the time it takes is proportional to i.
[19:50:45] *** magcius has joined ##java
[19:51:02] <Luminari> dangertools: thanks
[19:52:01] *** dmlloyd has quit IRC
[19:52:05] <jcp> ok, thanks
[19:52:07] *** dmlloyd_ is now known as dmlloyd
[19:52:40] <AskHL> jcp, in general, if things are proportinal, each thing is O(the other thing)
[19:54:32] <squiddle> JohnAds: you can't get the path if you want to have the file you have to do multipart handling, because fileuploads are kind of alien to the servlet spec :o but there are tutorials for this if you just search for multipart and servlet
[19:55:02] <JohnAds> squiddle: tnks!
[19:55:09] *** mfdavid has quit IRC
[19:55:48] *** airshipworld has joined ##java
[19:56:36] <airshipworld> Since it's dead quiet at the JavaFX channel I am reposting here. I just heard that Palm is going to include Flash in their new Palm Pre, and I think they should also include JavaFX Mobile. It would be a fantastic Platform for JavaFX. Palm needs to have Java support again. What do you think?
[19:56:54] *** vix85 has quit IRC
[19:58:30] *** cppexpert has joined ##java
[19:58:34] <jcp> AskHL: Yeah
[19:58:45] <jcp> but I only knew of N, the length of the set you're operating on
[19:58:55] <cppexpert> Hello :)
[19:59:36] *** Guest20644 has quit IRC
[20:04:04] <svm_invictvs> HOla
[20:04:09] <svm_invictvs> **Hola
[20:04:24] *** EdwardIII has joined ##java
[20:04:25] *** Greeny_ has quit IRC
[20:05:16] <JohnAds> squiddle: have another way to catch the path of a file ?
[20:05:49] <squiddle> JohnAds: what path?
[20:09:40] <JohnAds> squiddle: the path of the file... <input type="file">
[20:11:02] <squiddle> JohnAds: on the client? it is not possible. some browsers do send the full path, some the filename, whatever. why would you need the path anyway? for fileuploads -> http://www.ietf.org/rfc/rfc1867.txt
[20:11:24] *** cppexpert has quit IRC
[20:11:55] <JohnAds> squiddle: ok, tnks again
[20:19:10] *** Galik has joined ##java
[20:20:27] *** vesz has quit IRC
[20:21:35] *** waz has joined ##java
[20:21:59] *** elindio has quit IRC
[20:23:05] *** noobraska has joined ##java
[20:27:19] *** anklav has joined ##java
[20:30:05] *** JohnAds has quit IRC
[20:31:16] *** teralaser_ has joined ##java
[20:31:37] *** omaru has joined ##java
[20:31:37] *** mengu has quit IRC
[20:32:20] *** jZep has joined ##java
[20:33:06] <jZep> Hi, Is there an easy way to convert System.currentTimeMillis(); to time format (hh:mm:ss)?
[20:33:24] *** s9 has joined ##java
[20:33:43] <ldamwork> jZep, SimpleDateFormat
[20:34:00] <jZep> ty ldamwork :)
[20:35:10] <ldamwork> jZep, use new Date() instead of System.currentTimeMillis() to get your formatted output
[20:35:26] <dmlloyd> soon: jsr-310 :)
[20:36:23] * ldamwork feels far from updated
[20:36:31] <jZep> ldamwork: This is perfect :) (http://javatechniques.com/blog/dateformat-and-simpledateformat-examples/) thnx a lot :D
[20:37:10] *** Inhuman has joined ##java
[20:38:08] <ldamwork> are there relations to joda in jsr-310?
[20:39:08] <ernimril> ldamwork: if jsr-310 is the date/time update planned for java/7 then, yes a big relation
[20:40:01] <ldamwork> what i meant: are joda concepts built into jsr-310, or is it made from scratch. Just curiousity
[20:40:26] <ernimril> ldamwork: I think they more or less take joda as the reference implementation of it
[20:41:22] <ldamwork> ok, thanks. I assume this is good as i have heard good of joda
[20:41:38] *** steve-e has quit IRC
[20:45:16] *** teralaser has quit IRC
[20:47:09] <dmlloyd> no
[20:47:10] *** flb has joined ##java
[20:47:13] <dmlloyd> it's from scratch
[20:47:21] <dmlloyd> but the spec lead is the author of joda
[20:47:45] <dmlloyd> the 310 API is probably quite a bit more comprehensive
[20:48:15] *** MigoMipo has quit IRC
[20:48:38] *** cirwin has joined ##java
[20:48:50] *** KingBilly has quit IRC
[20:48:56] *** [Steffy] has quit IRC
[20:52:15] *** mesmer has quit IRC
[20:52:44] *** NiallC has joined ##java
[20:53:36] *** Luminari has left ##java
[20:53:46] *** wokawaka has joined ##java
[20:53:47] *** Varox has quit IRC
[20:53:58] *** eidolon has joined ##java
[20:54:41] <eidolon> there will come a time when i find the person responsible for making two seperate date processing libs and putting them in the jdk, under the same base class name. and there shall be pain and wailing will be heard.
[20:54:42] <eidolon> java.util.Date cannot be cast to java.sql.Date
[20:55:13] *** _acid__ has joined ##java
[20:55:39] <ernimril> eidolon: "two men enter, only one may leave"?
[20:55:51] *** FriedCPU has joined ##java
[20:55:56] <eidolon> nnggg.
[20:56:18] <vol> So what you're saying is, Sun Microsystems is ruled by tina turner.
[20:56:41] <FriedCPU> hey guys, wondering if anyone got any ideas on how to time a thread? easiest/best way, down to milliseconds on how long it took it to execute
[20:56:51] *** aTypical has quit IRC
[20:56:56] <vol> System.currentTimeInMillis
[20:57:11] <vol> get the value at the start of run, and at the end of run.
[20:57:15] <vol> Output said value somehow.
[20:57:17] <ernimril> FriedCPU: do you have an OS that give you millisecond precision?
[20:57:57] <ernimril> FriedCPU: the best way is probably to change the source, in a way that vol suggest, you can try profilers if you want, but they tend to change the code you run a lot and your timing may no longer be valid
[20:58:55] <airshipworld> FriedCPU: Which requirement are you trying to solve? Why do you need to know this number ?
[21:00:07] <FriedCPU> would just like to know how long it takes to execute, then i can work on making it faster (quite abit of data analsys inside the thread, so if the thread executes quicker, then i know i have done something right, and when i add things, i can see how much it is slowing it down by)
[21:00:10] *** freeone3000 has joined ##java
[21:00:16] *** bindaas has quit IRC
[21:00:55] <ernimril> FriedCPU: "long startTime = System.currentTimeMillis(); runSlowTask(); long endTime = System.currentTimeMillis();" then
[21:01:20] <vol> System.out.println("Took us " + (endTime - startTime));
[21:01:25] <airshipworld> FriedCPU: If you are trying to make things faster you don't need to know the time it takes, you need to know hwere the cpu takes most of the cycles. I think you should then really profile your app.
[21:01:33] <vol> ^^
[21:01:38] <vol> A profiler would really help in this case.
[21:02:00] <eidolon> also, the natural baseline question. "Are you sure you want to use threads to do what you're doing?"
[21:02:18] <ernimril> a profiler _may_ help, but only if you know enough already and method profiling in java have too many problems to be very useful
[21:02:43] <airshipworld> FriedCPU: Netbeans has one build in and there is also one for Eclipse if I remember right. Both free both open source
[21:03:24] <ernimril> when you run method profiling the profiler will _change_ the code you run a lot, so things like method inlining will not happen as much as it will in production, be very careful when you evaluate the profiler output
[21:03:26] *** vesz has joined ##java
[21:03:28] <ernimril> ~jvisualvm
[21:03:29] <javabot> JVisualVM is a tool supplied with recent editions of the JVM that exposes the internal workings of the JVM aurally. No, that's "visually." Sorry. http://java.sun.com/javase/6/docs/technotes/tools/share/jvisualvm.html
[21:03:48] <ernimril> that is a profiler that is part of the jdk nowdays ^^^
[21:04:10] <ernimril> ~profiler
[21:04:11] <javabot> a profiler is a tool to find performance bottlenecks. VisualVM is included in JDK nowadays and is great for a free profiler; jprofiler and jprobe cost money (jprofiler has a free eval period). Some more are listed here: http://javafaq.mine.nu/lookup?169
[21:04:17] <EdwardIII> ernimril: thanks for your help with all java trickery up until this stage - i'm starting to make some progress now i'm over the first hurdles. very, painstakingly slow progress but progress nontheless
[21:04:42] <ernimril> EdwardIII: ok, glad that you make progress :-)
[21:06:19] <airshipworld> ernimril: something wrong with the javafaq link ?
[21:06:27] <airshipworld> gives me a time out
[21:06:38] <ernimril> airshipworld: then it is probably bad...
[21:06:39] *** foo-nix has joined ##java
[21:07:21] *** foo-nix has quit IRC
[21:07:30] <ernimril> airshipworld: http://java-source.net/open-source/profilers
[21:08:05] *** Willow has left ##java
[21:09:35] <airshipworld> ernimril: thanks
[21:09:57] *** roue has joined ##java
[21:09:59] <ernimril> airshipworld: probably easiest to start with jvisualvm since it is part of the jdk and it is good enough for many things
[21:10:17] <roue> ~pastebin
[21:10:17] <javabot> http://pastebin.stonekeep.com Paste the final url after you've pasted your stuff there.
[21:11:11] <roue> hola.
[21:12:17] <ernimril> ~~roue hi
[21:12:17] <javabot> http://i38.tinypic.com/25aopzn.jpg
[21:12:47] * eidolon plays with jvisualvm
[21:12:57] *** bas-i has quit IRC
[21:12:59] <eidolon> does this do any more or less than jconsole did / does?
[21:13:04] *** The_Birdman has quit IRC
[21:13:13] <roue> I'm a Java novice trying to write a simple httpd log parse to help learn the language. I'm running into "warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList" trying to populate a HashMap <String, ArrayList>. Here's the code: http://pastebin.stonekeep.com/5661 . I'm trying to append values to the ArrayList in the HashMap, but don't know how to get rid of the warning.
[21:13:18] <ernimril> eidolon: play with it some more and find out
[21:13:28] <eidolon> yeah, i am :)
[21:13:45] *** morkar- has quit IRC
[21:13:59] <ernimril> eidolon: I have not used jconsole much, I write my own profilers to find out the things I find interesting
[21:14:06] <eidolon> :)
[21:14:28] <freeone3000> roue: One of your arraylists doesn't use generics. That's the cause of the problem.
[21:14:30] <roue> the problem is triggered by lines 70,71
[21:14:41] <roue> freeone3000 ah. thanks.
[21:14:48] <eidolon> ~next
[21:14:48] <javabot> Another satisfied customer. Next!
[21:15:39] *** bas-i has joined ##java
[21:16:01] *** cybereal has joined ##java
[21:16:36] *** rawbk has joined ##java
[21:17:05] <roue> freeone3000 -- I tried "ArrayList <String> append = collectedIPs.get(getIP(elements));" before, and it says " warning: [unchecked] unchecked conversion" so I tried casting with "ArrayList <String> append = (ArrayList) collectedIPs.get(getIP(elements));" but it still throws a warning.
[21:17:13] <docmorb> Another question. This little thing I'm trying to build has a library that should be loaded. When I try to build it Eclipse says it can't find the library in the java.library.path. What would be the proper way of adding the library? Can I edit the .classpath file in the project directory?
[21:17:56] *** bas-i has quit IRC
[21:18:20] *** karstensrage has quit IRC
[21:18:24] <ernimril> roue: ArrayList is generic, you must specify the type in all places, including in the HashMap<Foo, ArrayList<Type>> declaration
[21:18:38] <roue> ahh
[21:18:39] <mknix> roue, ArrayList <String> append = (ArrayList<String>) collectedIPs.get(getIP(elements));
[21:18:43] *** magentar has quit IRC
[21:18:51] <ernimril> mknix: That is the wrong thing to do
[21:18:52] <roue> did not know that. thank you for the clarification.
[21:19:02] <ernimril> ~~roue generics
[21:19:02] <javabot> For a tutorial on generics, please see http://javachannel.net/wiki/pmwiki.php/Main/Generics
[21:20:56] <josemoreira> you can checkout my TweetIRC (alpha) for 30m at http://93.102.67.27:8001/ :p
[21:21:15] <ernimril> josemoreira: why would we want to?
[21:21:23] *** Ivellina has quit IRC
[21:21:46] <josemoreira> that why i said you can
[21:21:48] *** mitchnull has joined ##java
[21:21:54] <josemoreira> you can see or you cant :)
[21:21:57] *** fatefree has joined ##java
[21:22:22] <fatefree> what would be the best approach for getting the time from one day or one week before a given time
[21:22:35] <freeone3000> Calendar.
[21:23:18] <eidolon> ~javadoc calendar
[21:23:18] <kavon> fatefree: Date / Calendar
[21:23:19] <javabot> eidolon: http://is.gd/jkEQ [java.util.Calendar]
[21:23:33] * eidolon actually doesn't like the link shortener in javabot :-/
[21:23:53] *** kane77 has joined ##java
[21:24:03] * kavon would be afraid of clicking it, and being rickrolled or meatspinned
[21:24:38] <eidolon> dunno what meatspinning is, but doesn't like the even loose image that implies.
[21:25:42] <kavon> can I wrap/cast a byte[] like this? (Byte[])someByteArray[]
[21:25:50] <eidolon> ~tell kavon about tias
[21:25:50] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[21:26:00] *** bas-i has joined ##java
[21:26:20] <cybereal> kavon: no
[21:26:25] <freeone3000> kavon: No. Because a byte[] is not a Byte[].
[21:26:35] <freeone3000> The data type is array, not byte.
[21:26:52] <cybereal> kavon: you're casting an array type so it won't get any autoboxing
[21:27:04] *** rullie has quit IRC
[21:27:14] <kavon> freeone3000: so should I just make a for loop and go manually add each byte to a Byte[]?
[21:27:30] <ernimril> kavon: why do you need to go from one to the other?
[21:28:02] *** foo-nix has joined ##java
[21:28:03] <kavon> ernimril: I need to return multiple objects from a method: two Strings, an int, and a byte[]
[21:28:22] <kavon> ernimril: I'm returning an Object[] and then recasting the pieces back when I get it
[21:28:29] <kavon> somewhere else
[21:28:40] *** Thing`e` has quit IRC
[21:29:03] *** EruditeHermit has joined ##java
[21:29:17] <kavon> ernimril: oh hell I thought of a better way to do this nvm
[21:29:22] *** das7002 has joined ##java
[21:29:27] <kavon> ernimril: scratch all of that
[21:29:52] <das7002> I am having trouble converting a string from a text box (numberic) to an integer
[21:30:16] *** Absolute0 has joined ##java
[21:30:23] <fatefree> Integer.parseInt(String string)
[21:30:28] <Absolute0> Is java file seeking fast?
[21:30:46] <Absolute0> I have 300 meg files which i want to seek to arbitrary positions.
[21:30:52] <das7002> fatefree:That is what I was using netbeans says can not find symbol
[21:31:07] <ernimril> Absolute0: that depends on how you seek, but yes, it is fast enough
[21:31:28] <cybereal> Absolute0: I have situations where I'm seeking around a 2gb file
[21:31:28] <ernimril> Absolute0: the limiting factor is harddrive (or whatever media/hardware) you have
[21:31:31] <fatefree> you might have to surround it with a try catch block
[21:31:32] <cybereal> and never noticed any slowdown from it at all
[21:31:43] <cybereal> (vs. a smaller file, that is)
[21:32:12] <EruditeHermit> hi, I have an applet that works in appletviewer but when I try to run it in a browser, it is not working. Can anyone help me to get it working in the browser? The HTML I am using is at: http://rafb.net/p/btmLMo14.html
[21:32:19] <cheeser> ~applets
[21:32:19] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog
[21:32:32] <Absolute0> ernimril: cybereal, the reason why i am asking is because i was thinking of placing the entire file into a DB which can be indexed and retrieved in a more elegant way
[21:32:41] <Absolute0> but if a file is faster than i won't need to do this.
[21:32:54] <cybereal> ~~ Absolute0 derby
[21:32:54] <javabot> Absolute0, derby is Apache Derby, an Apache DB subproject, is a relational database implemented entirely in Java and available under the Apache License, Version 2.0. Small, embeddable, client/server. http://db.apache.org/derby
[21:33:27] <ernimril> Absolute0: how could the db be faster? if you store your whole file in a db the cost to access a part of it is (database connection+query time + file seek time)
[21:33:28] <EdwardIII> hrm i was thinking about using sqlite for my little app but maybe i should check out apache derby
[21:33:35] <fatefree> has anyone used squirrel as an sql client? im wondering if theres something out there better than heidisql
[21:33:46] *** das7002 has left ##java
[21:33:50] <cheeser> ~~ fatefree tias
[21:33:50] <javabot> Try it and see. You learn much more by experimentation than by asking without having even tried.
[21:33:59] <Absolute0> ernimril: exactly.
[21:34:00] <cybereal> EdwardIII: it's great, and properly indexed it's rather fast (in embedded mode anyway)
[21:34:22] <cybereal> EdwardIII: we use it in production, at large scale too, it has proven stable
[21:35:01] *** TryNiX has joined ##java
[21:35:21] *** doc`` has joined ##java
[21:35:48] <Absolute0> cybereal: why did you suggest that derby link?
[21:36:03] <Absolute0> cybereal: i am using mysql for my DB.
[21:36:11] <cybereal> Absolute0: why? use derby
[21:36:16] *** cirwin has left ##java
[21:36:19] <TryNiX> for a quad tree, where the nodes are called (topLeft, topRight, bottomLeft, bottomRight), and a node has children if its singleColor is false, would this be an efficient way of conducting a breadth search and printing the colors of the leaf nodes? http://pastebin.com/d116a20fb
[21:36:24] <cybereal> no external dependency
[21:36:39] *** teralaser_ is now known as teralaser
[21:36:42] <Absolute0> cybereal: you mean no mysql JConnector?
[21:36:57] *** eidolon has quit IRC
[21:37:12] <cybereal> Absolute0: I mean use derby instead, it's embedded, you don't have to run a separate server for storing your data and you still get that nice querying capability of an rdbms
[21:37:35] <cybereal> Absolute0: you are talking about deciding between using a flat file and a db, derby's a nice in-between, since it's embedded in your same process as your app
[21:37:45] <Absolute0> oh ok
[21:37:50] <ernimril> TryNiX: why do you think that is a breadth search?
[21:38:01] <Absolute0> but i already have an entire schema and a filled up mysql db
[21:38:08] <vol> TryNiX: Personally, I'd use a queue of some sort, but that's me. Also, this looks a lot like depth first.
[21:38:09] <Absolute0> switching to derby only for files?
[21:38:11] <cybereal> you're the one asking about this
[21:38:22] <cybereal> you need to use your own brain to answer these questions
[21:38:31] <Absolute0> :)
[21:38:43] <Absolute0> fine i'll go turn on my brain processor
[21:38:56] <TryNiX> ernimril, well I go down to each specific deapth and print the colors of that level only
[21:39:19] *** Inhuman has quit IRC
[21:39:24] <Absolute0> whats the difference between derby and hsqldb?
[21:39:25] <TryNiX> unless I screwed it up =p but it printed right values
[21:39:45] <TryNiX> vol, hmmm, how would I incorporate a queue for a quad tree?
[21:39:47] <cybereal> Absolute0: they are two entirely different projects with similar goals, but derby tends towards data reliability and hsqldb towards more features
[21:39:56] <Absolute0> oh ok
[21:40:05] *** slonkko has quit IRC
[21:40:06] <cybereal> Absolute0: I've used both over the years and found hsqldb to be less reliable but a little faster especially with poorly defined schemas
[21:40:20] <vol> TryNiX: Probably the same way you would do it for any N sized tree.
[21:40:21] <ernimril> TryNiX: ah, yes you do, you will visit some nodes a lot of times...
[21:40:38] <airshipworld> Absolute0: You speak of indexing and searching, have you thought of Using Lucene ?
[21:40:48] <airshipworld> It's build to search
[21:40:55] <ernimril> TryNiX: so depending on your definition of effiecient it may or may not be, it will not be the fastest one, it will use very little memory
[21:40:56] *** freeone3000 has left ##java
[21:41:19] <EdwardIII> cybereal: ultimately i'm looking to roll out on a mobile though so i guess it depends er, how that all works heh. my knowledge of mobile apps is very very weak
[21:41:20] *** monkeycid has quit IRC
[21:41:26] <EdwardIII> just like my knowledge of java! happy days!
[21:41:46] <TryNiX> ernimril, just for sake of understanding I am wondering how to use a queue for it, as this is basically my first ever tree implimentation
[21:41:52] <cybereal> EdwardIII: derby scales down quite a lot
[21:42:07] <cybereal> EdwardIII: I'm not sure if it goes allll the way down to midp (cldc) but at least cdc, I'd check on cldc
[21:42:07] <EdwardIII> cybereal: cool
[21:42:12] <TryNiX> I read about breadth-search on wikipedia, but my dull brain couldn't comprehend it to be honest =p
[21:42:17] <ernimril> TryNiX: keep a queue of nodes to visit
[21:42:19] <TryNiX> the example code they posted there that is
[21:42:23] <Absolute0> airshipworld: no so much as searching but seeking :)
[21:42:24] <ernimril> TryNiX: start by adding the root node
[21:42:39] <vol> TryNiX: Do you understand the difference between breadth-first and depth-first?
[21:42:55] <ernimril> TryNiX: then you pick one node from the queue and put all child nodes at the end of the queue
[21:42:55] *** The_Birdman has joined ##java
[21:43:08] <ernimril> TryNiX: continue until you have emptied the queue
[21:43:19] <vol> ^ (or found what you're looking for)
[21:43:41] *** kane77 has quit IRC
[21:44:08] *** shadewind has joined ##java
[21:44:20] <airshipworld> Absolute0: I see.
[21:44:23] <cybereal> EdwardIII: yeah it doesn't go down below CDC/Foundation
[21:44:25] <TryNiX> oh interesting
[21:44:30] *** airshipworld has left ##java
[21:44:31] <TryNiX> I'll try it now and see how that turns out to be =p
[21:44:34] <cybereal> EdwardIII: so good for PDA's, not for "feature" phones
[21:45:04] *** The_Birdman has quit IRC
[21:45:14] *** kane77 has joined ##java
[21:45:20] <cybereal> ugh the environment available to midlets is so abysmal
[21:45:27] <cybereal> and the market is wretched
[21:45:35] * cybereal wouldn't waste any time with it at all these days
[21:45:37] *** orange80a has joined ##java
[21:46:01] *** The_Birdman has joined ##java
[21:48:07] *** mk has quit IRC
[21:48:20] *** DjZemich has quit IRC
[21:49:40] *** orange80a has quit IRC
[21:54:55] <TryNiX> ernimril, that was so much neater!! thank you very much for your explaination!
[21:54:58] *** The_Birdman has quit IRC
[21:55:05] *** Absolute0 has left ##java
[21:56:18] *** KingBilly has joined ##java
[21:56:50] *** das7002 has joined ##java
[21:56:56] <das7002> System.out.println(fortid.toString()); gives me javax.swing.JTextField[fortid,86,329,55x19,layout=javax.swing.plaf. etc etc etc I want the value of the textbox fortid why is that not working?
[21:57:53] *** raboof has joined ##java
[21:58:39] *** Spike1506 has quit IRC
[21:58:58] <ernimril> das7002: why do you think that toString() would give you that?
[21:59:13] <ernimril> das7002: what would you name the method to get the text of a text field?
[21:59:29] <KingBilly> getText!
[21:59:35] *** EruditeHermit has quit IRC
[21:59:42] *** mknix has quit IRC
[21:59:51] *** t0th_- has joined ##java
[21:59:52] <t0th_-> hello
[21:59:54] <t0th_-> can help
[22:00:00] *** mocas has joined ##java
[22:00:01] *** elindio has joined ##java
[22:00:02] <t0th_-> javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: Cannot open connection
[22:00:10] <das7002> oh I see silly me
[22:00:14] <mocas> hi
[22:00:15] <das7002> getText() fixed it
[22:00:24] <cybereal> it wasn't broken
[22:00:28] <cybereal> you just did it wrong :P
[22:00:29] <raboof> i'm writing a desktop application in java, where I'd like to show a somewhat timeline-like view with several draggable horizontal 'strips' that allow viewing and browsing at various scales
[22:00:32] <KingBilly> :) i was looking a little help getting java to connect to my MySQL database, i appear to have the correct code i just dont know how to get the "driver" to run it or however it works
[22:00:46] <raboof> what would be a natural choice to build such a component in?
[22:00:46] <das7002> cybereal: it happens in all languages
[22:00:47] <cybereal> t0th_-: that error seems rather clear, what could you possibly need help with?
[22:01:06] <t0th_-> i try connect a postgres with hibernate
[22:01:09] <t0th_-> i got tath error
[22:01:13] *** das7002 has left ##java
[22:01:15] <mocas> I have a problem running a jar file because they are trying to find reference class in file system. How can I do to the jar file search for another jar file that is in the same thir?
[22:01:19] <cybereal> well you probably configured it wrong, try again
[22:01:22] <t0th_-> java.sql.SQLException: Connections could not be acquired from the underlying database!
[22:01:47] <cybereal> maybe you have the wrong address, port, username, etc. or maybe the server isn't running
[22:03:31] *** wokawaka has quit IRC
[22:03:33] <t0th_-> cybereal for me?
[22:03:33] *** sean` has joined ##java
[22:03:51] <cybereal> yes
[22:03:52] <cheeser> t0th_-: can you connect with psql? if so, talk to ##postgresql about how to configure jdbc/port access.
[22:04:06] <KingBilly> anybody have any suggestions for what i asked?
[22:04:18] <cheeser> ~~ KingBilly mysql jdbc driver
[22:04:19] <javabot> KingBilly, I have no idea what mysql jdbc driver is.
[22:04:24] <cheeser> ~~ KingBilly google mysql jdbc driver
[22:04:25] <javabot> http://letmegooglethatforyou.com/?q=mysql+jdbc+driver
[22:04:46] *** Techdeck has quit IRC
[22:05:02] *** Wyzard has quit IRC
[22:05:07] *** rhsanborn has joined ##java
[22:05:33] <t0th_-> cheeser i can connect to pstgres server with pgadmin III
[22:05:35] <KingBilly> i looked through the pages earlier, but i couldnt understand what to download, or where to download it
[22:05:43] <cheeser> t0th_-: then talk to the pgsql channel
[22:05:58] <rhsanborn> I have a question that came up as a result of programming homework, but the question has to do with how java implements io, and isn't the crux of the homework, I hope you guys may be willing to help.
[22:06:09] <t0th_-> my error is in java
[22:06:11] <KingBilly> uh well i think i found the download :)
[22:06:13] <t0th_-> not with server
[22:06:19] <cheeser> t0th_-: no, it's probably not
[22:06:47] <t0th_-> i connect with psql
[22:07:53] <rhsanborn> I haven't used generics before, but I'd like to for this. I am reading number values from a text file that can be either float or int values. Sounds like a generics problem. Normally I'd read the line, trim it, and cast it as the type I want. readLine is deprecated for datainputstream though. They want you to use readInt, etc. Is there a way to make this generic friendly?
[22:08:26] <cheeser> rhsanborn: no, it's not a generics thing at all.
[22:09:12] <rhsanborn> cheeser, no? Two possible types and just propergate the types throughout since all the math operations will work on either?
[22:09:28] <t0th_-> tanks
[22:09:33] <cheeser> you could use Number...
[22:10:27] <rhsanborn> cheeser, I think I see where you are going, I'll run with it for a bit, thank you.
[22:10:41] <cheeser> but that's still not really a generics thing
[22:10:43] *** Frostshock has quit IRC
[22:11:06] *** l3ns has quit IRC
[22:12:07] *** casmo has quit IRC
[22:12:16] *** flb has quit IRC
[22:12:17] <rhsanborn> cheeser, it doesn't have to be generics, I just thought using generics would be appropriate and easier since I could write everything without a type as the math operators will work with both possible inputs.
[22:12:25] <rhsanborn> I think using Number will work just as well though.
[22:12:55] *** casmo has joined ##java
[22:15:10] *** Galik has left ##java
[22:15:54] *** flb has joined ##java
[22:15:58] <TryNiX> I would appreicate it if anyone could take a look at this min and max depth finding methods (for a quad tree, of which the nodes are called topLeft, topRight, bottomLeft, bottomRight), and if you reckon it's not a good algirthim, to give me pointers on what to improve :) http://pastebin.com/d3483770e
[22:16:33] *** indeterminatus has joined ##java
[22:17:04] *** vix85 has joined ##java
[22:17:31] *** FormicAcid has joined ##java
[22:17:55] *** [Steffy] has joined ##java
[22:18:03] <t0th_-> ecllipse cache
[22:18:09] <ernimril> TryNiX: "return Math.max(current, maximum);" would shorten your code but not change what it does
[22:18:11] <t0th_-> myy xml file are cached
[22:18:12] <FormicAcid> Hi, there I read the API about pixelGrabber, i'm a bit confused how a simple grab on a 30x30 .gif return false :(
[22:18:18] *** eidolon has joined ##java
[22:18:48] <FormicAcid> Just want to know the colormodel but it return null, which is bad for my little life
[22:19:20] <ernimril> TryNiX: I also strongly disslike the copy paste you have in your max/min methods
[22:19:58] *** zerobytes is now known as twobytes
[22:20:15] <TryNiX> ernimril, I did feel that was wrong too to be honest! thanks for confirming it
[22:20:47] *** ramdam has joined ##java
[22:21:02] *** pstickne has joined ##java
[22:22:50] *** scorchsaber has joined ##java
[22:23:04] *** Thorn has quit IRC
[22:23:06] *** pierrep has quit IRC
[22:24:03] <TryNiX> ernimril, but I'm not sure how to handle that, since the values change within each method too, and I want to make sure when a recursion occurs, the values are copied as well
[22:24:06] *** NiSoOo has quit IRC
[22:24:15] <FormicAcid> Bah i see the image loaded is in ERRORED status... great now i need to figure out why
[22:25:39] *** vezzoni has quit IRC
[22:26:43] <FormicAcid> I knew Image img = java.awt.Toolkit.getDefaultToolkit().getDefaultToolkit().createImage(url); would be wayyy to easy to simply download a pix from the net...
[22:27:06] *** skoskav has quit IRC
[22:27:08] <FormicAcid> cant beleive im still that naive...
[22:27:20] *** Blaay has quit IRC
[22:28:29] *** kater_ has quit IRC
[22:29:24] *** morkar- has joined ##java
[22:30:08] *** elementz has joined ##java
[22:30:53] *** sean` has quit IRC
[22:31:19] * eidolon is tryignt o figure out how to do a simple redirect in struts2 without resorting to a scriptlet.
[22:31:23] *** jcrites has quit IRC
[22:32:14] *** rdancer has quit IRC
[22:32:21] *** mistik1_ has joined ##java
[22:32:24] <elindio> somebody knows the javastates library ?
[22:32:34] *** convivial has quit IRC
[22:32:45] <cheeser> ~~ elindio anyone
[22:32:45] <javabot> Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.
[22:33:04] <FormicAcid> perhaps not in my case
[22:33:11] <elindio> sorry i'm not totaly fluent in english
[22:33:37] *** mistik1 has quit IRC
[22:33:42] *** mistik1_ is now known as mistik1
[22:34:08] *** hoens has quit IRC
[22:35:21] * dmlloyd puts elindio, eidolon, and ernimril in a box and shakes, and pours out a bunch of e, n, and i
[22:35:50] <ernimril> you missed a few "r"
[22:39:58] *** EruditeHermit has joined ##java
[22:40:24] *** isr` has joined ##java
[22:42:55] *** carignanboy has joined ##java
[22:43:01] <isr`> I have this in main: javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { GUI.createAndShowGUI(); } }); but another class created in main needs a reference to the JFrame instance that createAndShowGUI creates.
[22:43:11] <isr`> now, i've been told the singleton pattern is bad.
[22:43:18] <isr`> i'm open to ideas of how to resolve this.
[22:43:20] *** ramdam has left ##java
[22:43:21] <cheeser> well, it's "bad"
[22:43:43] *** aje has left ##java
[22:43:50] *** tieTYT has joined ##java
[22:44:03] <isr`> cheeser: i cant think of any other way to get a reference when creating the window that way
[22:44:31] *** stork has left ##java
[22:44:34] *** skoskav has joined ##java
[22:44:46] <cybereal> isr`: let createAndShowGUI() return an instance of some object that represents your application-accesible GUI pieces perhaps
[22:45:00] <isr`> tried that, error
[22:45:05] <cybereal> try harder
[22:45:10] <cybereal> and more specifically
[22:45:11] <isr`> cybereal: its a scope problem
[22:45:15] <isr`> look at the call
[22:45:15] <cybereal> so fix it
[22:46:23] *** rohan has joined ##java
[22:46:43] <rohan> can someone please help me implement this pattern in java? http://rafb.net/p/5Li4my29.html
[22:46:48] *** sebr_afk is now known as sebr
[22:47:07] <isr`> cybereal: if i wanted to do something like myGui = GUI.createAndShowGUI(), myGui would have to be final. I tried that already.
[22:47:14] <isr`> i suppose i could use a mutable object.
[22:47:27] <cybereal> One example of a solution, instead of making an anonymous class for that Runnable, define a real class that implements Runnable and also has a getter for that GUI root node I mentioned, then in the run() method in that class, it can call that GUI.whatever() call, set a field to the return value, and be accessible later. Instantiate that class and pass it to invokeLater and then access the class's getter...
[22:47:36] <isr`> like someClass.setGui(GUI.createAndShowGUI());
[22:48:03] <isr`> thats a good idea too
[22:48:06] <isr`> thanks for the tip dude
[22:48:33] <cybereal> call it Application, give it a start() method that does the invokeLater stuff itself, and then from your main POV it's entirely encapsulated the GUI part of your app into one conveniently creatable/usable class
[22:49:08] <cybereal> anyway I'm sure there are numerous ways to go about this that's just what comes to mind
[22:49:26] <cybereal> don't let a little boilerplate stand between you and a usable API :)
[22:49:45] *** dmlloyd has quit IRC
[22:49:52] *** EnderMB has joined ##java
[22:49:57] *** rohan has quit IRC
[22:50:19] *** dmlloyd has joined ##java
[22:51:09] *** _acid__ has quit IRC
[22:51:20] <EnderMB> Hey all. Is there any real preferred variable naming conventions for Java development? I understand that Sun has some but a number of developers I work with claim that they are stupid and unfavourable for real use.
[22:51:24] *** The_Birdman has joined ##java
[22:51:49] <cybereal> uh
[22:51:54] <cybereal> yes, and they are not stupid at all
[22:52:07] <cybereal> EnderMB: are you talking about formatting the names or actually coming up with them?
[22:52:10] <vol> EnderMB: Do you work for any site with code samples available at thedailywtf.com ?
[22:52:14] <cybereal> hehe
[22:52:19] <cybereal> ~conventions
[22:52:19] <javabot> cybereal, conventions is http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html , or "ThisIsAClassName, thisIsAVariableOrMethodName, THIS_IS_A_CONSTANT_NAME"
[22:52:31] *** buntfalke has quit IRC
[22:52:50] <vol> EnderMB: It sounds dangerously like they follow the "These convesions served us well enough when we coded C, why should we change them for Java?" trap.
[22:53:17] <cybereal> vol: how did you extrapolate that?
[22:53:19] <EnderMB> Most of them are pretty old, so that'd probably explain it.
[22:53:47] <cybereal> Aged minds are rigid, like the bark of an aged tree
[22:54:00] *** dmlloyd_ has joined ##java
[22:54:03] <vol> cybereal: it sounded a bit like my last job.
[22:54:10] <cybereal> But that's to be expected from a neural net that's been repeatedly reinforced for a long time
[22:54:11] <vol> (and to a very small extent a bit like here)
[22:54:34] <cybereal> vol: yes, we have similar such legacy nonsense in my codebase... it's been around for a while
[22:54:52] <cybereal> it's really obvious that the original developers were C guys thrown into a java world unwillingly
[22:55:16] <cybereal> java's cruel to C or C++ programmers because it looks similar, but really ... not so much actual similarity :)
[22:55:54] <cybereal> Sometimes I think programmers may actually be weirder than birds, as unlikely as that sounds.
[22:55:58] <vol> EnderMB: Anyway, ask them to find a decent sized, respected java project that flaunts sun's coding convention. Tell them when they do that you'll change your mind.
[22:56:05] <EnderMB> Right. Well, one of the developers that is supposed to be mentoring me has complained about me using naming conventions like "int i" for temporary variables, even though the Sun documentation is right and others have different opinions on the subject. Do I call him on it or use some other convention?
[22:56:33] <cybereal> EnderMB: 'i' doesn't mean anything, is he suggesting you use a longer word?
[22:56:39] <reverend> what variable name is he suggesting?
[22:56:46] *** durka42 has joined ##java
[22:56:48] <vol> EnderMB: That depends. int i as in "for(int i = 0; i < foo; i++)" ?
[22:57:05] <vol> it's somewhat reasonable in that I'm not the first person to transpose i and j in my loops.
[22:57:13] <cybereal> I never use single letter variables anymore, far too many stupid errors caused by that.
[22:57:17] <EnderMB> If I remember he uses underscores to begin with and the same variable as one he's using in a getter, if that makes sense
[22:57:40] <EnderMB> So if he were making a getter for a car variable he'd use _car.
[22:57:43] <vol> I do that as well
[22:57:53] <cybereal> I've seen that convention, kinda pointless but it helps some people immediately see that it's a field
[22:57:53] <EnderMB> Is that not more confusing?
[22:58:08] <cybereal> it makes using code generation tools less appealing :) but not confusing
[22:58:10] <vol> EnderMB: again, it depends :P
[22:58:12] <ldamwork> EnderMB, that sounds even more stuped; home made convention instead of defacto convention. It would be acceptable if a meaningfull name was to be used
[22:58:22] <vol> do you mean the member var starts with _ ?
[22:58:37] <vol> or do you mean something like "void setCar(int _car) { car = _car; }"
[22:58:44] *** The_Birdman has quit IRC
[22:58:48] <ldamwork> afaik, suns convention disapproves names starting with underscore
[22:59:00] <EnderMB> Yes, the latter
[22:59:04] *** The_Birdman has joined ##java
[22:59:15] <cybereal> so it's the parameter to the setter
[22:59:27] <EnderMB> Yes
[22:59:29] <cybereal> avoiding name shadowing is a "Good Thing (tm)"
[22:59:30] <vol> ok, you said getter, so that confused me.
[22:59:38] <indeterminatus> void setCar(int car) { this.car = car; }
[22:59:46] <cybereal> using underscore to start a variable name is generally not great
[22:59:49] <ldamwork> "Variable names should not start with underscore _ or dollar sign $ characters, even though both are allowed." -> http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html#367
[22:59:55] *** musically_ut has quit IRC
[23:00:30] *** jZep has left ##java
[23:00:32] <cybereal> starting a variable name with a symbol is indicative of some language level meaning beyond just being a name
[23:00:42] <vol> Hmm, I do that, I guess I should change :)
[23:00:56] <cybereal> so avoiding it is a best practice
[23:01:15] <EnderMB> Although in that same part it claims that temporary variables like int i are okay.
[23:01:36] <vol> for throwaway variables, yes.
[23:01:39] <cybereal> I'm one of those jerks who likes wordy names, so for parameters I'll do something like setCar(int carParam) { car = carParam; } unless something more specific makes sense when "speaking" the terms
[23:01:50] <indeterminatus> I don't even accept those, but I'm a bit strict in that respect.
[23:01:55] <cheeser> cybereal: yeah. i never shadow my fields with variables
[23:01:56] <cybereal> EnderMB: int i is a special case because it's easy to mistaken it for other letters
[23:02:35] <indeterminatus> There is no such thing as "throwaway variables", or "temporary variables".
[23:02:57] *** rollins has quit IRC
[23:03:03] <cybereal> EnderMB: and besides, it's nice to read code that you don't have to do as much work to figure out its intention, using the word index instead of i or even idx, I find results in code that you can grok faster upon your first read
[23:03:42] <EnderMB> So in the case of a setter which is the ideal convention? at the moment I just use i for int, c for char, etc.
[23:03:56] *** UT2K3 has quit IRC
[23:04:02] <vol> indeterminatus: I'll bang out "for(int i = 0; i < foo.length; i++) { foo[i] = myVal++; }"
[23:04:05] *** beol has quit IRC
[23:04:10] <vol> I consider that entirely reasonable.
[23:04:12] <cybereal> you should use names that describe the use/purpose of the value not the type, java maintains what type it is for you
[23:04:29] <indeterminatus> What cybereal said, can't stress that point enough.
[23:04:30] <vol> I COULD type index for all of these, but that's a slowdown, and I understand intuitively what "i" means
[23:04:38] <cybereal> though sometimes those recommendations blend, especially when the only purpose of a variable is to hold a type specific representation of another one
[23:05:16] <ldamwork> old for() style can be replaced with for each and thus you dont need a 'tmp' variable. If you DO need it, it would have a purpose and can thus be named reasonably, like 'row', or 'line'...
[23:05:20] <cybereal> if you think typing a few more letters is a slowdown then I imagine you've never worked on large projects (or just haven't been smart enough to figure out why they are hard)
[23:05:56] <cybereal> i|j|l
[23:06:34] <vol> for each is great unless you actually need the index value, or what you're iterating over doesn't have an iterator.
[23:07:01] <ldamwork> vol, exactly. And if you DO need it, then you have a purpose for it, and you can name it in that respect...
[23:07:11] *** dmlloyd has quit IRC
[23:07:39] <vol> ldamwork: In that case I'm just a terrible, lazy programmer, more suited to perl.
[23:08:22] <reverend> laziness is a virtue for a programmer, as long as it's productive laziness :)
[23:08:24] <ldamwork> :) (well, i do use i,j in loops as long as the scope level is not more than just a few lines (<~10))
[23:08:51] <kavon> i use d, b, p, and q to annoy the hell out of people
[23:08:52] <vol> ldamwork: heretic!
[23:09:00] <ldamwork> shame on me...
[23:09:00] *** FormicAcid has quit IRC
[23:09:07] *** The_Birdman has quit IRC
[23:09:14] <indeterminatus> vol: I don't want to argue about 'i' as name for index variables. I don't like one-lettered names or any other kind of non-speaking names ('temp' being the worst of that kind that comes to my mind). But it always takes me a while to decipher statements with side effects, like "foo[i] = myVal++;" -- I always like to keep side-effects out of assignments, thus making it "foo[i] = myVal; ++myVal;" which is much easier on the eyes, methinks
[23:09:33] *** DragonLord- has quit IRC
[23:09:44] *** Wicked has quit IRC
[23:09:45] <ldamwork> i suggest that we should use i,ii,iii,iiii,iiiii,... instead. It is so much easier to identify scopelevel by the count of i's
[23:09:54] <EnderMB> Would you ever consider it good practice to give both variables (global and local?) the same name, even though they're different variables?
[23:09:57] <indeterminatus> That's an awesome idea!
[23:09:59] <vol> indeterminatus: that was just a sample. It could well be "foo[i] = myObj.getSomethingSpecific(i);"
[23:10:11] *** resmo has quit IRC
[23:10:16] <vol> EnderMB: define "global"
[23:10:28] <ldamwork> a[iii][iiii]=b[i][ii]; :)
[23:10:36] <EnderMB> i.e. this website: http://mindprod.com/jgloss/setter.html
[23:10:41] <vol> ldamwork: you're doing it wrong. if you're going to go this route, just use roman numerals.
[23:10:52] <EnderMB> Like how they've used "this.height = height" inside the setter
[23:10:57] <kavon> ldamwork: good idea but it would fail once you have to sit there and poke the letter i while counting out loud to make sure you don't mess it up
[23:10:58] <indeterminatus> ldamwork: a[++ii][iii++] = b[++ii][++ii]; :) :P
[23:11:02] <vol> Ah, that's not global, that's a member variable.
[23:11:08] <kavon> ldamwork: better one is a, b, c, d, e
[23:11:10] <kavon> etc
[23:11:39] <EnderMB> Ah, so member variables and local variables?
[23:12:04] <vol> EnderMB: in that example, you're setting the member variable for that object to be the variable you've just passed in
[23:12:38] <vol> iirc this is an acceptable naming scheme
[23:12:49] *** charzero has quit IRC
[23:13:24] <vol> for example, you may have a constructor like Box(int width, int height) { this.width = width; this.height = height; } Your IDE will generally color these differently, so you can pick up a mistake (forgetting this, for example) more easily.
[23:13:26] *** crowbar has quit IRC
[23:13:52] *** giaco has quit IRC
[23:13:56] <ldamwork> vol, a proper IDE would also warn you if you forget 'this.'...
[23:14:05] *** The_Birdman has joined ##java
[23:14:12] <indeterminatus> "Warning: assignment has no effect"
[23:14:13] <cheeser> vol: better yet, don't use variable names that shadow field names. then there's 0 ambiguity
[23:14:28] <EnderMB> ldamwork: NetBeans doesn't.
[23:14:35] <ldamwork> EnderMB, i said a proper IDE
[23:15:03] <EnderMB> It's my fault for working at a university...
[23:15:12] <cheeser> netbeans is a proper IDE
[23:15:25] <ldamwork> cheeser, room for improvement then...
[23:15:56] <indeterminatus> EnderMB: If you want to read up on the topic, "Code Complete" is a pretty good source to get you started
[23:15:58] <ldamwork> idea reports 'variable is assigned to itself',
[23:16:06] <cheeser> probably. but at least it's no eclipse. *shudder8
[23:16:12] <vol> ldamwork: that's what I said.
[23:16:16] <vol> What's wrong with eclipse? : (
[23:16:22] <cheeser> everything
[23:16:34] <vol> ... : (
[23:16:42] <EnderMB> I have that book somewhere in my big pole of 30-something books that I need to read sometime soon...
[23:17:33] <indeterminatus> Nothing's wrong with Eclipse, and neither is with NetBeans IDE. Use the right tool for the job.
[23:17:48] <ldamwork> indeterminatus, exactly
[23:17:52] *** donavan has quit IRC
[23:17:56] <TryNiX> hmm, would the easiest way to find out how similar two colors are (vs. other combincations) by finding the differences between their RGB values, and taking the sum of that?
[23:18:11] *** meanburrito920_ has joined ##java
[23:19:10] <vol> TryNiX: not sure if it's the easiest, but it's easy.
[23:19:21] <squiddle> TryNiX: depends for what you need the difference, regarding human perception RGB is your worst friend
[23:19:22] *** ttmrichter has joined ##java
[23:19:37] <indeterminatus> TryNiX: That could work for very simple applications. It doesn't account for luminance or similar things, so there are other algorithms that'd give you better results.
[23:20:01] <TryNiX> cheers all :)
[23:20:16] <TryNiX> indeterminatus, can you name me some of these algorithms ? I would be grateful
[23:20:25] *** ridoo has quit IRC
[23:20:25] <aleksei> EnderMB: NetBeans 6.5 at least, does warn you
[23:20:59] *** Mkop2 has quit IRC
[23:21:04] <indeterminatus> TryNiX: http://www.ctr.columbia.edu/~jrsmith/html/pubs/acmmm96/node8.html (first result on google for "color similarity")
[23:21:15] *** magcius has quit IRC
[23:21:26] <EnderMB> How long has that been out for? I swear I only updated mine the other day (6.0.1)
[23:21:48] <TryNiX> indeterminatus, I used a different search sentence and got totally crap results =p my bad! and thanks!
[23:22:32] <aleksei> don't know.. but i just catched a bug that way the other day
[23:22:37] *** bimbo has joined ##java
[23:22:41] <indeterminatus> EnderMB: A while now, but it's been in beta state. Haven't checked for a bit, maybe it's already stable.
[23:23:04] <EnderMB> Oh yeah, one more question. I'm reading through UML Distilled and it mentions UML modelling programs that can generate UML Class Diagrams purely from code, but I've only been able to find one for Java. Are these kind of things any good?
[23:23:09] *** bimbo has quit IRC
[23:23:18] *** pilkarn has joined ##java
[23:23:25] <pilkarn> is javax.media == jmf?
[23:23:36] <selckin> nobody uses uml
[23:23:58] <EnderMB> I work in an academic department, so we do...
[23:24:13] <indeterminatus> EnderMB: I had many problems "round-trip engineering" UML and code, so I basically don't do that (anymore).
[23:24:17] <tieTYT> cybereal uses uml
[23:24:22] *** magcius has joined ##java
[23:24:36] <aleksei> actually even I rarely use it, UML is quite usefull to communicate design to other developers
[23:24:42] *** timte has quit IRC
[23:24:44] *** bimbo has joined ##java
[23:24:52] *** bas-i has quit IRC
[23:24:58] <tieTYT> i think that's debateable
[23:25:03] <tieTYT> it's advantage is that it's a standard
[23:25:06] <aleksei> NetBeans has an UML plugin, but it feels kind of heavy.. too slow
[23:25:10] <aleksei> exactly
[23:25:13] *** bas-i has joined ##java
[23:25:23] <EnderMB> I tried to use the UML plugin and it killed NetBeans, so never again.
[23:25:35] <aleksei> and is easier than trying to understand a system just by looking at its code
[23:25:38] <indeterminatus> I didn't find a truly usable (free) tool, and I haven't looked in a while
[23:25:47] <indeterminatus> so if someone knows one, I'd be happy to know about it ;)
[23:25:55] *** JavaGeek has quit IRC
[23:26:15] <pilkarn> is javax.media == jmf?
[23:26:18] <EnderMB> I've been pointed to ArgoUML a couple of times, but I've never had the chance to try it out and see if it works.
[23:26:18] <reverend> as with most things: free, quality, well-performing - pick two
[23:26:25] <aleksei> indeterminatus: do you need code generation or reverse engineering?
[23:26:36] *** tranceNRG has quit IRC
[23:26:53] *** skypce has joined ##java
[23:27:21] <indeterminatus> aleksei: Code generation is no problem for most tools (that I had tried), but for the long run, reverse engineering would be quite important. It's just so tedious to maintain two different models (code and UML) that describe the same thing.
[23:27:22] *** bas-i has quit IRC
[23:27:42] <bimbo> pilkarn: no, jogl uses javax.media.opengl
[23:27:50] <skypce> i have a jTexTField in a JDialog Form, i want do a setText to a jTextField from a JFrame, how can do it?
[23:27:50] <bimbo> and it doesn't belong to jmf
[23:28:42] <EnderMB> I don't know why, but UML just...angers me.
[23:28:57] *** omaru has quit IRC
[23:29:09] <EnderMB> I started out with SSADM and that was simple enough, but I just can't get into UML no matter how hard I try.
[23:29:11] <bimbo> skypce: expose the jtextfield from jdialog and call keep a reference to that dialog in the jframe
[23:29:38] *** fridim_ has joined ##java
[23:29:47] <skypce> thank you bimbo XD
[23:29:53] *** The_Birdman has quit IRC
[23:30:09] <fridim_> elindio, let's program swing applications ! :)
[23:30:14] *** JavaGeek has joined ##java
[23:30:30] *** The_Birdman has joined ##java
[23:30:32] <indeterminatus> EnderMB: Then don't use it, if you don't have to. The way I see it, UML is here to support the programmer, and not to put another burden on him. If you can't get any gain, screw it.
[23:30:49] *** cher has joined ##java
[23:30:50] * cybereal doesn't use UML for anything but documentation snippets
[23:30:56] * cybereal eyes tieTYT
[23:31:50] <reverend> uml sucks
[23:31:56] <reverend> well, that's not true
[23:31:59] <EnderMB> I typically just use a pen and paper/whiteboard to describe things, but I've been told to provide a UML diagram so that my mentor doesn't have to "read through the code".
[23:32:03] <reverend> it's a great way to represent a disposable idea
[23:32:12] <cybereal> as I said, snippets in documentation
[23:32:17] <reverend> or at least, something with a short lifespan
[23:32:26] <reverend> or extremely high level
[23:32:28] <cybereal> I'll use it to make dumb people ask fewer questions about what I'm changing in a portion of an object model, for example, in change specifications
[23:32:37] <aleksei> I think it's good to use at a general level.. don't document even the smalles class in your source
[23:32:45] <vol> Oh god UML : (
[23:32:53] <cybereal> I never use it to design the actual code or anything like that though
[23:33:07] <indeterminatus> Yeah, what aleksei said. Great to give an overview, and many people "understand" it (due to its standardization).
[23:33:13] <reverend> at my current gig we're forced to include sequence, class and system diagrams in our LLDs
[23:33:17] <reverend> it's pointless
[23:33:26] <EnderMB> Ouch.
[23:33:41] <reverend> none of those models are accurate by the time implementation is underway
[23:33:47] <aleksei> also draw use cases at without much detail.. it's pointless
[23:34:20] <reverend> i honestly didn't believe people still did waterfall implementations anymore until i got here
[23:34:46] <indeterminatus> Oh, you'd have been in for a good surprise, reverend :P
[23:34:48] <aleksei> reverend: that's right.. when one has to synchronize the model with reality for documentation sake.. use reverse engineering =)
[23:34:52] <cher> To me what sucks most about UML is that I do not know a tool that follows the spec.
[23:34:56] *** vix85 has quit IRC
[23:35:35] <reverend> aleksei: i'd rather read code than a class diagram and you can't reveng a sequence diagram
[23:35:39] <reverend> or a system diagram
[23:35:53] <EnderMB> cher: If I remember rightly (I only read it 3 hours ago) UML Distilled claims that there are no full implementations of it.
[23:35:59] <reverend> the only people who care about class diagrams seem to be the people who can't understand them anyway
[23:36:05] *** Yustme has quit IRC
[23:36:09] <reverend> BAs and the like
[23:37:23] <cher> EnderMB: Interesting. I mean, two weeks ago I wanted to add a package to a component. In UML afaik 100% valid, but Enterprise Architect, which we use at work, doesn't support that.
[23:38:21] <cher> We're now evaluating IBM Rational Software Modeller, for the sake of DOORS integration, but at least EA knows all diagram types, while SM lacks some. *sigh*
[23:38:21] *** waz has quit IRC
[23:38:37] <indeterminatus> Alright, going to bed. See ya!
[23:39:03] *** indeterminatus has quit IRC
[23:39:07] <Apocalisp> reverend: so true!
[23:39:55] *** Balgan has quit IRC
[23:40:16] *** anklav has quit IRC
[23:40:22] <carignanboy> hey, does anyone know how to implement a good RMI ( remote method invocation)
[23:40:34] <Zharf> erm
[23:40:46] <Zharf> how about using java's rmi?
[23:40:54] <carignanboy> theres classes for that?
[23:41:18] *** matsebc has joined ##java
[23:41:48] <Zharf> http://java.sun.com/docs/books/tutorial/rmi/index.html
[23:41:51] * pr3d4t0r wonders if r0bby is around.
[23:42:14] <carignanboy> thanks Zharf
[23:42:19] <carignanboy> ^_^
[23:42:22] <matsebc> Hello, I have a question, I have a jni method that if it is called from a class (from its main method) runs fine, but if I call it from an event on a button the c part of the jni method craps out, any ideas on what can that be?
[23:42:40] *** bas-i has joined ##java
[23:43:06] <vol> matsebc: do you mean you're calling the jni function from a C function?
[23:43:13] *** dmlloyd_ is now known as dmlloyd
[23:43:16] <vol> if so, what are you passing for JNIEnv* and jobject?
[23:44:29] <matsebc> vol: nope I am calling the jni method from a standard java class, well the other way I am calling it is from a gui, which is a standard java class as well, but gives the idea tho
[23:45:13] *** shadewind has quit IRC
[23:45:24] <carignanboy> matsebc, make a button that makes a thread to run the app
[23:45:28] *** Epitaph64 has joined ##java
[23:45:47] <matsebc> carignanboy: ouch?
[23:46:02] <vol> matsebc: Wait, is this a static native method or something?
[23:46:13] *** ramdam has joined ##java
[23:46:16] <ramdam> onnnn
[23:46:23] <vol> and yeah, don't block the UI thread if you can help it.
[23:46:58] <cybereal> s/if you can help it//
[23:47:04] *** casmo has quit IRC
[23:47:09] <matsebc> anyways I just discovered that if i actually instantiate the API class (where the jni methods are declared) inside the event handler, it sort of works, else it craps out, that's weird
[23:47:28] <tieTYT> i have no idea what you guys are talking about but use SwingWorker
[23:47:54] *** Bonix has joined ##java
[23:48:08] <vol> ... wait, so you're trying to call non-static methods of a class whose instance you don't actually have?
[23:48:21] <matsebc> that wouldn't compile
[23:48:22] * vol hears the faint sound of a null pointer exception
[23:48:31] *** convivial has joined ##java
[23:48:42] *** abruptus has quit IRC
[23:50:36] *** NiallC has quit IRC
[23:53:11] *** bas-i has quit IRC
[23:53:22] *** TheCastor has quit IRC
[23:56:48] *** scorchsaber has left ##java
[23:58:33] *** EnderMB has quit IRC
top

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