NOTICE: This channel is no longer actively logged.
[00:00:34] *** OMFG_ has quit IRC[00:01:01] <Stork> agreed[00:02:07] <glen_quagmire> java3d looks nice[00:02:11] *** Clackwell has quit IRC[00:02:22] *** Penggu has joined ##java[00:02:38] *** kinabalu has joined ##java[00:02:50] <Penggu> hi all.[00:03:45] <Penggu> regarding java applets, and jar caching - is there any way (or does anyone know of) to stop a particular jar from caching? im working on an applet, and each time have to press 'x' int the console, despite browser cache being off..[00:04:08] <ernimril> Penggu: use appletviewer instead[00:04:09] *** Blackwell is now known as Clackwell[00:04:50] <Penggu> ernimril: i need the browser for this cuz it works with web requests and stuff, and uses the web page's session cookies, etc[00:05:36] <glen_quagmire> can I customize swing loook?? can I create a theme for swing gui?[00:05:41] <Penggu> if there is a way.. if not.. ah well[00:06:06] *** djib has quit IRC[00:07:33] *** IseeIsee has quit IRC[00:08:14] <cheeser> glen_quagmire: yes[00:08:45] <glen_quagmire> cheeser, which document should I search for?[00:08:53] <cheeser> javabot: laf[00:08:54] <javabot> I guess the factoid 'default laf' might be appropriate:[00:08:56] <javabot> cheeser, default laf is java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp[00:08:58] <cheeser> hrm.[00:09:00] <ernimril> ~synth[00:09:01] <javabot> ernimril, synth is a flexible new Look and Feel used to make custom interfaces, http://www-106.ibm.com/developerworks/java/library/j-synth/[00:09:06] <cheeser> google for java look & feel[00:09:51] <FaeLLe> or 'java look n feel'[00:10:04] <glen_quagmire> ok i found an article[00:12:24] *** Penggu has quit IRC[00:20:58] <gabb> How do you guys display a 2-dim matrix of boolean values? Obviously CheckBoxes are a good choice for the cells, but do you embed them in a TableModel or just use a LayoutManager ?[00:29:24] *** dover has joined ##java[00:31:08] <cheeser> yes[00:31:30] <cheeser> it's probably easier to use a LayoutManager, though, depending on your data model[00:31:55] *** deedaw has joined ##java[00:32:13] *** snooplsm has joined ##java[00:32:31] <Stork> anyone know how to set your own javadoc styles?[00:32:52] <cheeser> you can either use CSS to style the generated code, or write your own doclet[00:33:12] *** vakYpollo has joined ##java[00:34:53] <Stork> i see[00:34:55] <snooplsm> whats the free java applet signer?[00:34:55] *** Ryugi has joined ##java[00:34:57] <Ryugi> hello[00:35:15] <Ryugi> are there any good books on java server pages[00:35:15] *** tvn has quit IRC[00:35:24] *** ijoyce has quit IRC[00:42:39] *** lasala has joined ##java[00:42:57] <lasala> is there a string method to count the occurences of characters ?[00:43:31] <Honk^away> just do it yourself, it's pretty trivial =)[00:43:39] <lasala> ok[00:43:59] <ernimril> lasala: for one character or all of them?[00:44:50] <lasala> for all of them[00:45:19] <lasala> i can just explode the string put the characters in an array and run a for loop[00:45:24] *** omry has quit IRC[00:45:31] <lasala> thought there was a method for it[00:45:32] <ernimril> lasala: then no there is no such method in the standard api, but as Honk^away said, it is trivial[00:45:32] *** Ryugi has quit IRC[00:45:48] <ernimril> lasala: explode it? String has a method charAt(int)[00:46:24] <Honk^away> explode is php =)[00:46:26] <ernimril> lasala: homework? then tell us the whole task...[00:46:32] <lasala> thats what i meant :)[00:46:43] <lasala> its homework[00:47:06][00:47:19] <lasala> i can do it though[00:47:22] <lasala> not that hard[00:48:17] <ernimril> ok, so you do not want to have the count for each character (that is a: 3, b: 1, d: 2...)[00:48:26] <ernimril> you only want 'a'[00:48:44] *** djib has joined ##java[00:48:57] <lasala> yep[00:49:38] <Honk^away> well.. just loop and count :)[00:49:43] <ernimril> lasala: then this is truly trivial, you will need one loop. Please do this yourself and understand what you do.[00:50:02] <Honk^away> ernimril: you need only 1 loop for the other stuff too[00:50:13] <Honk^away> if your alphabet is somewhat limited that is[00:50:27] <ernimril> Honk^away: 1 for counting, 1 for writing it out or something like that...[00:50:30] <Honk^away> (and if done nicely, even if it's not :P)[00:50:34] <Honk^away> ernimril: heh[00:50:52] <lasala> i can do it[00:50:55] <Honk^away> he didnt ask for output =D[00:51:02] <ernimril> Honk^away: of course, TreeMap is sorted and has a nice toString...[00:51:19] <Honk^away> ernimril: urrh :)[00:51:31] <Honk^away> i thought about a simple array actually :)[00:51:32] <ernimril> Honk^away: no, and I did not say what was needed for the slightly more complicated case[00:51:48] <Honk^away> count[char-'a']++; :)[00:51:56] <ernimril> Honk^away: how many characters are there? (hint: char in java is 16 bits unsigned)[00:52:07] <Honk^away> <Honk^away> if your alphabet is somewhat limited that is[00:52:16] <ernimril> Honk^away: but in some cases characters use 2 or more chars[00:52:20] <Honk^away> it usually is for homework :)[00:52:28] *** |Agent has quit IRC[00:52:31] <Honk^away> ernimril: they dont[00:52:35] <ernimril> Honk^away: depend on what part of the world you live in[00:52:43] <ernimril> dont?[00:52:47] <Honk^away> nah[00:52:50] <Honk^away> they use 2 or more bytes[00:52:53] <Honk^away> not chars =)[00:52:59] <ernimril> Honk^away: yes, chars[00:53:15] <ernimril> Honk^away: java/5 was updated to handle extended unicode[00:53:22] <Honk^away> *sigh*[00:53:40] <Honk^away> there's no chars in use in 65k+ range anyway :P[00:53:40] <ernimril> Honk^away: so it may happen, depending on what part of the world you live in[00:54:46] <Honk^away> gotta be a really strange part of the world *lol*[00:55:04] <Honk^away> japan? =)[00:55:35] <ernimril> Honk^away: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html[00:56:50] <ernimril> Honk^away: "Character.isLetter(0x2F81A) returns true... (a CJK ideograph)"[00:58:02] <Honk^away> *sigh*[00:58:15] <Honk^away> lets not overcomplicate this :][00:58:19] <Honk^away> it's homework...[00:58:21] <lasala> ok done ... i used the charAt[00:58:43] <slava> are strings in java 5 int[] now?[00:58:46] <slava> internally[00:58:48] <ernimril> lasala: good for you...[00:58:50] <ernimril> slava: no[00:58:54] *** Kallistor has quit IRC[00:59:00] <slava> ernimril: how are they stored then?[00:59:05] <ernimril> slava: they are char[], but have complicated methods...[00:59:10] <slava> gross[00:59:13] <ernimril> slava: yes[00:59:38] <ernimril> too much lugage that use the char[] internally I guess...[01:00:40] <Honk^away> 0x10000+ chars are simply 2-chars :][01:00:58] <Honk^away> urrh 2 chars =)[01:01:37] <ernimril> oh well, time to sleep. Have fun.[01:03:24] <slava> man i just spent about 20 seconds puzzling over a compile error in obj-c, i wrote Math.max instead of fmax and i was not sure why it was failing[01:03:30] <slava> that's when you know you're retarded[01:04:41] * Twiun hears no-one arguing[01:13:36] *** shad0wcat has joined ##java[01:16:42] *** rogue-kun{B}|Awa is now known as rogue-kun{B}[01:17:23] <rogue-kun{B}> slava whats the differnace betwn Math.max and Math.ceil ?[01:17:34] <cheeser> rogue-kun{B}: rtfm[01:17:45] <cheeser> they're very plainly described.[01:18:11] *** kaka has joined ##java[01:19:15] <rogue-kun{B}> cheeser: not that important, as i was only wonderind what slava was useing[01:19:32] <slava> max(a,b) returns the higher of a and b[01:19:42] <slava> ceil(x) is the lowest integer greater than or equal to x[01:19:45] <slava> yes, rtfm :)[01:20:31] <rogue-kun{B}> do'd it the which is bigger ofcour 8/[01:22:25] *** kaka has quit IRC[01:25:25] *** qFox has quit IRC[01:25:25] *** keyhack has quit IRC[01:28:58] *** gabb has quit IRC[01:32:58] *** kaka has joined ##java[01:33:04] *** ruben- has joined ##java[01:33:18] <ruben-> How can I execute the command "uptime" in java and print the output?[01:36:32] *** dover has quit IRC[01:38:26] *** kaka has quit IRC[01:42:06] <slava> http://keithschofield.com/pi/std.html[01:43:05] <vakYpollo> ruben-, look at java.lang.Runtime.exec() methods.[01:43:30] <ruben-> Thanks![01:43:42] <vakYpollo> ruben-, then at java.lang.Process... you will see you can get a InputStream mapped to stdout, another for stderr, etc.[01:44:50] *** asac has quit IRC[01:44:52] <slava> use a file stream to read /proc/uptime[01:45:06] *** asac has joined ##java[01:46:07] <ruben-> slava: I don't only need the uptime.[01:46:20] <ruben-> And I'm not going to analyze all the data in /proc/[01:48:43] <slava> i just went for a dump, it was good[01:51:24] *** vakYpollo has quit IRC[01:52:02] *** kaka has joined ##java[01:55:47] *** Stork has quit IRC[01:56:24] *** LLyric has joined ##java[01:57:40] *** bobgray has joined ##java[01:57:54] <bobgray> will cloning a vector, clone the objects in it too?[01:58:15] <FaeLLe> anyone here use JXTA ?[01:59:36] *** Storkme has joined ##java[02:03:58] <LLyric> bobgray: do an experiment, find out yourself[02:04:09] <Twiun> ~tias[02:04:09] <javabot> Try It And See. You look silly asking if something will work when you can just try it and see.[02:04:39] * MacIver mudders deep clone[02:05:02] <LLyric> 99% of the time, clone() is evil and wrong[02:05:15] <LLyric> 95% of the time, Vector is wrong too :)[02:06:15] *** ThinkNOLA has joined ##java[02:06:38] *** gverig has left ##java[02:07:04] <slava> clone() is fine[02:07:34] <Storkme> crypto is fun: http://storkme.com/JavaDocs/index.html[02:08:04] <MacIver> i learned the other day that StringBuffer.append(StringBuffer) is not thread safe as it says ;-)[02:09:55] *** kaka has quit IRC[02:14:10] *** Job1 has quit IRC[02:15:13] *** Esaj has quit IRC[02:19:15] *** vinse has joined ##java[02:19:40] *** Storkme has left ##java[02:19:44] *** Storkme has joined ##java[02:20:02] *** Storkme is now known as Stork[02:20:11] *** Stork has quit IRC[02:25:28] *** Mazon is now known as mazon[02:25:49] *** rogue-kun{B} is now known as rogue-kun{B}|Awa[02:26:00] *** Storkme has joined ##java[02:26:22] <Storkme> PLEASE consider making this channel not for registered nicks only[02:26:36] <Storkme> it's really hard for me to get in, my default nick is registered by someone else[02:26:53] <Storkme> whenever i disconnect it doesn't let me back in unless i change nick and id[02:27:06] * Storkme goes to sleep[02:27:09] <Storkme> please think about it[02:27:24] * MacIver thinks about it[02:27:36] <bobgray> Storkme: you can reclaim the nick through nickserv[02:33:21] *** kaka has joined ##java[02:36:34] *** Honk^away has quit IRC[02:36:48] *** Honk^away has joined ##java[02:45:23] *** djib has quit IRC[02:50:00] *** Astinus has quit IRC[02:53:29] *** Beached has joined ##java[02:54:44] *** wig has joined ##java[02:54:55] <wig> hi, does anyone know a good IDE to make object models with?[02:54:57] <wig> for linux[02:55:00] *** Astinus has joined ##java[02:56:24] *** fandeholly has quit IRC[02:57:22] *** snoopdave has left ##java[02:57:49] *** Astinus has quit IRC[02:57:57] *** Storkme has quit IRC[03:00:13] *** JeffAMcGee has joined ##java[03:05:23] *** franl has joined ##java[03:05:27] <mohadib> ~evil[03:05:27] <javabot> only morons use the word "evil" to describe something like a programming practice, IDE choice, etc.[03:05:34] <mohadib> ~evil[03:05:34] <javabot> only morons use the word "evil" to describe something like a programming practice, IDE choice, etc.[03:05:44] <mohadib>[03:05:47] *** etech has quit IRC[03:05:50] *** shad0wcat has quit IRC[03:07:03] <MacIver> wig: have you tried omondo for eclipse?[03:07:26] <wig> i'm downloading eclipse right now[03:07:29] <wig> i'll check that out.[03:07:35] <wig> wait[03:07:45] <wig> do these thigns build object models by themselves?[03:08:16] <MacIver> it can[03:08:32] <wig> sweet.[03:09:00] <mohadib> clone() once stoll change off my dresser[03:09:43] <MacIver> mohadib: i beleive it[03:09:50] <mohadib> ;)[03:10:13] *** CBTCWwW has quit IRC[03:19:37] *** Buckster has joined ##java[03:20:24] * mohadib counts slava's spokes[03:20:34] *** pulaski has joined ##java[03:21:38] *** pulaski has left ##java[03:24:33] * mohadib has 20s on his trailor house[03:28:30] *** HelloWorld82 has quit IRC[03:29:52] *** amorph has quit IRC[03:34:09] *** bobgray has quit IRC[03:41:14] *** dover has joined ##java[03:41:17] *** Geren has joined ##java[03:41:35] <Geren> what happens if i try to close an inputstream buffer variable that still has stuff in it?[03:42:46] <jwormy> Geren, TIAS![03:42:52] <Geren> huh?[03:43:01] <jwormy> ~TIAS[03:43:02] <javabot> Try It And See. You look silly asking if something will work when you can just try it and see.[03:45:02] <Geren> ok[03:45:14] <Geren> is there a way to test if an input stream variable is closed or not[03:49:05] *** enervate has joined ##java[03:49:44] *** ramza3 has quit IRC[03:50:19] <Twiun> Hrmph. Why do I get the feeling that draw3DRect has a set of arbitrary colour choices?[03:50:26] * Twiun pokes Graphics[03:51:34] *** mohadib has quit IRC[03:51:35] *** Astinus has joined ##java[03:51:35] * Twiun fixes a synchronisation issue[03:52:06] *** enmand has joined ##java[03:52:30] *** watzlaf has quit IRC[03:53:37] *** pavlicek has joined ##java[03:54:05] *** FaeLLe has quit IRC[03:54:58] *** FaeLLe has joined ##java[03:58:02] *** FaeLLe has quit IRC[04:00:32] *** mohadib has joined ##java[04:06:41] *** Beached has quit IRC[04:07:11] *** Chang_Wufei has joined ##java[04:09:40] *** vate has quit IRC[04:13:50] *** vincenz has quit IRC[04:17:47] *** Geren has quit IRC[04:18:26] *** omoore has joined ##java[04:18:58] <omoore> i am using log4j.. within a static method, how do I log an event that will show the method accurately? ie...[04:20:17] *** octoberdan has joined ##java[04:20:21] <octoberdan> Hello everyone[04:21:36] <omoore> in this clas.. public class MyClass { public static doSomething() { Logger.getLogger(MyClass).info("This works"); } } ...if i call MyClass.doSomething(); from another class...[04:22:00] <omoore> it does work.. but.. the class and method display as MyClass (class) and main (method)...[04:22:27] <omoore> i'd like to log such that it shows the class as MyClass and method as doSomething[04:24:10] *** Azrael_- has quit IRC[04:24:25] <octoberdan> Where within the jdk directory structure would I be able to add additional jars full of classes/[04:24:35] <octoberdan> erhm ?[04:25:07] <omoore> anywhere.. you just need to reference them in either...[04:25:16] <omoore> your environmental CLASSPATH variable or .. better...[04:25:45] <octoberdan> omoore: Is there a an option besides -cp and CLASSPATH?[04:25:45] <omoore> when you launch.. add them to the classpath using -cp[04:26:35] <omoore> ie for unix.. java -cp ".:/path/to/jarfile/thirdparty.jar:/path/to/another/thirdparty2.jar" com.acme.CoolApp[04:26:49] <omoore> or for windows.. replace ":" with ";"[04:27:23] <omoore> octoberdan, i guess you could do dynamic class loading from within your app[04:27:32] <omoore> (prolly not correct terminology)[04:27:39] <omoore> also.. if your building a web app...[04:27:57] <octoberdan> omoore WEB-INF/lib[04:27:59] <omoore> using tomcat for example, you can drop the jars in one of the lib dirs that are parsed on startup[04:28:11] <omoore> well.. . that or the common lib folder[04:28:19] <octoberdan> oh, yeah[04:28:28] <octoberdan> Alright, thanks for the help[04:34:28] *** hatOFF has joined ##java[04:38:00] *** CyberMad has quit IRC[04:40:39] *** Buckster has left ##java[04:41:18] <hatOFF> someone awake?[04:41:32] *** glen_quagmire has quit IRC[04:42:35] *** cored has joined ##java[04:43:58] *** YD has joined ##java[04:46:19] *** franl has quit IRC[04:51:55] <hatOFF> then WAKE UP GUYS!!![05:01:05] *** wcstok has quit IRC[05:01:19] <MacIver> Zzzz[05:04:19] *** teralaser has quit IRC[05:04:33] *** Chang_Wufei is now known as Wufei|sleep[05:04:37] *** vate has joined ##java[05:08:46] *** tvn has joined ##java[05:17:44] *** Astinus_ has joined ##java[05:17:56] *** Astinus has quit IRC[05:19:41] *** Astinus_ is now known as Astinus[05:21:26] *** enervate has quit IRC[05:26:38] *** Twiun is now known as Twiun[Zzzzz][05:39:35] <kinabalu> in a webapp if using commons-logging (not by choice) .. how do you configure log4j for a configureAndWait so it reloads any changes without reloading the webapp?[05:51:31] *** synic has joined ##java[05:52:14] *** Nippa has joined ##java[05:52:34] *** adante_ has joined ##java[05:53:13] <synic> yo[05:58:16] *** The_Ball has joined ##java[05:58:50] <The_Ball> to get the width of a string to be printed I can use "width = g.getFontMetrics().stringWidth(s);" but how can I find the height for the same string?[06:02:25] *** Nippa has quit IRC[06:03:46] *** Azrael_- has joined ##java[06:06:41] *** snooplsm has quit IRC[06:13:18] *** adante has quit IRC[06:13:18] *** adante_ is now known as adante[06:18:04] *** mohadib has quit IRC[06:25:04] *** Guess9999 has joined ##java[06:25:49] <Guess9999> hi, any 1 available for a simple question?[06:25:58] <MacIver> no[06:26:08] *** Cow_woC has quit IRC[06:26:10] <Guess9999> hmm..[06:26:18] <MacIver> i only like complex questions[06:26:34] <MacIver> and lots of them[06:26:54] <MacIver> if it's simple, then you haven't read the docs ;)[06:27:06] <Guess9999> ok its like this..[06:27:23] <Guess9999> I created a JDialog and run it from main()[06:27:25] <MacIver> wow, it's blank![06:28:00] <Guess9999> and inside the JDialog, I have a windowclose listener, and call for dispose..[06:28:17] <Guess9999> somehow the program is hanging after dispose[06:28:29] <Guess9999> got any idea?[06:28:53] <MacIver> does JDialog even use window listeners? Do you add the listener to the dialog?[06:29:07] <Guess9999> I can send u the source code..[06:29:27] <MacIver> just use pastebin[06:30:10] <MacIver> didn't i say to use pastebin?[06:30:17] <MacIver> not priv msg me[06:30:40] <Guess9999> pls hav a look on my sample[06:30:42] <Guess9999> oops..[06:30:59] <MacIver> you need to System.exit, not dispose[06:31:00] <MacIver> next![06:31:33] <Guess9999> System.exit is not a clean solution[06:31:34] <Siph0n_> How would one convert a char array to a byte array?[06:31:43] <Guess9999> it force the system to exit[06:32:10] <MacIver> Siph0n_: look at the string methods[06:32:16] <Siph0n_> No strings.[06:32:21] <Siph0n_> This is for crypto :P[06:33:42] <Siph0n_> Memory dumps are the devil![06:34:12] <MacIver> * EXIT_ON_CLOSE (defined in JFrame): Exit the application using the System exit method. Use this only in applications.[06:34:13] <MacIver> The value is set to HIDE_ON_CLOSE[06:34:13] *** eidolon has quit IRC[06:34:24] <MacIver> Guess9999: that's how the frame does it[06:34:36] <MacIver> if you want to stop the VM, you must exit[06:35:02] <MacIver> Siph0n_: well then, does Byte have a char construtor?[06:35:02] <Guess9999> but if I use JFrame, I don't need to issue system.exit[06:35:08] <MacIver> or are you not allowed to use objects[06:35:15] <MacIver> Guess9999: read what i wrote[06:35:23] <MacIver> the frame uses System.exit[06:35:30] <MacIver> Guess9999--[06:35:31] <Siph0n_> Not allowed to use Strings. They hang around in memory[06:35:51] <MacIver> Siph0n_: can you use other objects?[06:35:59] <Siph0n_> Like?[06:36:59] *** rizzo_ has joined ##java[06:37:38] <MacIver> Siph0n_: what do the format of these bytes have to be? you could always cast char to int or byte and do whatever[06:37:39] *** kinabalu has quit IRC[06:38:07] <Siph0n_> They have to be the byte representation of those characters.[06:38:32] <MacIver> in ascii?[06:38:40] <Siph0n_> preferably[06:38:42] <Siph0n_> or Unicode[06:38:48] <Siph0n_> UTF8 is fine[06:38:55] *** Astinus is now known as Z[06:39:29] <Guess9999> anyway thanks for ur help, MacIver[06:39:56] <MacIver> well i'd suggest looking at the java language spec to see how chars are stored (if they are ascii) and then cast them and do whatever you need[06:40:06] <MacIver> Guess9999: np[06:40:11] <Siph0n_> I found it[06:40:21] <Siph0n_> java.io.CharToByteConverter[06:40:27] <Siph0n_> convertAll() method[06:40:35] <MacIver> ha[06:40:42] <MacIver> does it make a string?[06:40:49] <MacIver> better make sure ;)[06:41:33] <Siph0n_> nah it doesn't appear to...otherwise there'd be no point, one could just do String.valueOf(char[]).getBytes()[06:41:52] <Siph0n_> I wonder how it's used o.0[06:41:56] <MacIver> well it may just wrap that ;)[06:42:06] <Siph0n_> CharToByteConverter.convertAll(char[]) you think?[06:42:22] <Siph0n_> true it might[06:42:36] <MacIver> i don't even see that class in the api?[06:46:29] *** Guess9999 has quit IRC[06:50:49] <Garibaldi> MacIver: it isn't[06:51:08] * MacIver wonders what special jdk Siph0n_ has[06:51:25] <Siph0n_> Apple JDK[06:51:36] <Garibaldi> lol[06:51:38] <Siph0n_> http://tns-www.lcs.mit.edu/manuals/java-api-1.1beta2/api/java.io.CharToByteConverter.html[06:51:43] <Siph0n_> i'm kidding[06:52:10] <Siph0n_> I am using the default Java install from Apple though...[06:52:14] <Siph0n_> And it's a bit different[06:52:26] <Siph0n_> Like it runs classes within jars within jars[06:52:29] <Siph0n_> it's nice[06:52:45] *** Z is now known as Astinus[06:53:12] <Garibaldi> eh, someone wrote some general-purpose tool that will do that[06:53:45] <Garibaldi> seems crappy though that they'd give you some non-standard feature[06:54:53] <Garibaldi> I mean, it's a nice feature, but your application will break if you try to run it somewhere else[06:56:23] <cybereal> it might be more related to their transport support for zips than a java feature[07:03:43] <Garibaldi> ahh[07:04:00] <Garibaldi> that's a more reasonable explination[07:04:29] <Garibaldi> s/explination/explanation/[07:05:19] *** rizzo_ has quit IRC[07:07:22] *** Cow_woC has joined ##java[07:07:24] <Cow_woC> hi[07:07:32] <Cow_woC> if I open an OutputStream to a file, does it guarantee a write lock?[07:07:39] <Cow_woC> even if I never write anything into it?[07:08:26] <Garibaldi> this is in Windoze?[07:08:46] <Cow_woC> it should be cross-platform[07:09:12] <Cow_woC> personally I'm not familiar with an operating system that allows concurrent writes to a file..[07:09:19] <Cow_woC> but the Javadoc hints that there are[07:09:25] <Garibaldi> you'd have to use FileLock[07:09:33] * MacIver opens a file in linux ;)[07:09:35] <Cow_woC> FileLock is advisory[07:09:36] <MacIver> woah[07:09:38] <Cow_woC> not manditory[07:10:03] <Garibaldi> well, if you were on a *nix machine, you wouldn't get an automagic lock when you open the file[07:10:06] <Cow_woC> is there a guaranteed way to lock other threads/processes from opening a file?[07:10:20] <Cow_woC> Garibaldi: so you'd only get the lock once you write the first byte?[07:10:23] <MacIver> deleting it?[07:10:29] <Garibaldi> Cow_woC: now even then[07:10:39] <Cow_woC> Garibaldi: when then?[07:10:42] <Garibaldi> never[07:10:46] <Cow_woC> MacIver: I either modify a file, or delete it[07:10:47] <Garibaldi> you'd have two different files[07:10:56] <Garibaldi> one linked to the filesystem, the other not[07:10:57] <Cow_woC> Garibaldi: I'm not sure I understand[07:11:12] <Cow_woC> Garibaldi: if two processes write to the same file on the FS, how could there be two?[07:11:15] <Cow_woC> two files that is[07:12:29] <Garibaldi> process1 opens the file for writing[07:12:46] <Garibaldi> it associates that file with an inode and start writing[07:12:56] <Garibaldi> (and maps the fs entry to the inode)[07:13:11] <Garibaldi> process2 opens the file for writing[07:13:18] <Garibaldi> it associates that file with an inode and starts writing[07:13:22] <Garibaldi> (and maps the fs entry to the inode)[07:13:32] <Garibaldi> so now process1 is writing to the file it created[07:13:37] <Garibaldi> process 2 is writing to the file it created[07:13:48] <Garibaldi> and the filesystem has a link to process2's file[07:14:10] <Cow_woC> Garibaldi: I'm not talking about creating two files at the same time[07:14:18] <Cow_woC> Garibaldi: I'm talking about writing to a preexisting file[07:14:34] <Garibaldi> appending to an existing file?[07:14:46] <Cow_woC> Garibaldi: not necessarily appending, random access[07:15:05] <Cow_woC> (and in your example what would happen? you end up with two identical files? which one does the FS keep?)[07:15:43] <Garibaldi> well, once process1 terminated, it's file would go away[07:15:54] <Garibaldi> and process2's file would be seen from the fs[07:16:03] <Cow_woC> ok, sounds good[07:16:10] <Cow_woC> so what about my question writing to a preexisting file?[07:16:51] <Garibaldi> you'd get interlacing[07:16:58] <Garibaldi> you really need an explicit lock[07:16:58] *** cored has quit IRC[07:17:29] <Garibaldi> http://java.sun.com/developer/JDCTechTips/2002/tt0924.html#1[07:17:48] <Cow_woC> Hibernate question: Is it possible to have an Interceptor only execute code after a successful commit()? afterTransactionCompletion() catches rollback() as well. Any ideas?[07:18:11] <Cow_woC> Garibaldi: thanks for the link, reading[07:18:22] *** dover has quit IRC[07:18:47] *** YD has quit IRC[07:18:59] *** YD has joined ##java[07:24:24] *** Garibaldi has quit IRC[07:31:16] *** pavlicek has quit IRC[07:34:59] *** JeffAMcGee has quit IRC[07:36:57] *** adante has quit IRC[07:37:41] *** Garibaldi has joined ##Java[07:39:19] <hatOFF> http://pastebin.com/402619[07:39:33] <hatOFF> line 182, writing into the name[07:39:41] <hatOFF> line 199 still returns null though[07:40:27] *** Tirlas is now known as Tirlasmisu[07:46:29] *** ^cool^tom^ has joined ##java[07:46:57] <^cool^tom^> Hi[07:49:09] *** slava has left ##java[07:57:23] *** mazon is now known as Mazon[08:01:19] *** Astinus has quit IRC[08:04:36] *** euvitudo has joined ##java[08:05:22] *** enervate has joined ##java[08:07:05] *** Astinus has joined ##java[08:08:01] <The_Ball> how can i find the count/size of a String[]?[08:10:19] <cybereal> all arrays have .length[08:12:47] *** ThinkNOLA has quit IRC[08:14:40] <The_Ball> cybereal, public String[] ordreringStartegies = { "FCFS", "SSTF", "Bla", "Foo", "Bar" }; then ordreringStartegies.length() ?[08:14:52] *** Geren has joined ##java[08:14:59] <Geren> hi guys[08:15:00] <Geren> i[08:15:10] <Geren> i have a thread, in which a socket listens for connections[08:15:20] <Geren> but i want it to stop listening for connections if a certain condition is met[08:15:29] <Geren> but the listening for connections statement is blocking[08:15:33] <Geren> so what am i supposed to do?[08:15:48] <Geren> i can't suspend that thread, cause suspend is deprecated[08:17:39] *** snooplsm has joined ##java[08:17:43] <snooplsm> help![08:17:53] <The_Ball> Geren, can't you cancel the listening socket?[08:18:00] <Geren> The_Ball, what do u mean cancel?[08:18:25] <Geren> like i have this line in my thread: " Socket tempsocket=socket.accept();[08:18:26] <Geren> "[08:18:34] <cybereal> The_Ball: just .length no parens[08:18:41] <cybereal> The_Ball: it's a static final variable[08:18:46] <Geren> and during run time, this line will keep listening until there's a connection[08:18:50] <Geren> so how can i cancel it?[08:18:56] <Geren> i want it ot stop listening on some condition[08:19:08] <The_Ball> cybereal, ah, thanks![08:19:12] <snooplsm> http://mindprod.com/jgloss/keytool.html ; control f this: or possibly into c:\Program Files\java\jre1.5.0_05\lib\security\cacerts ; right above it[08:19:22] <Geren> anyone?[08:19:23] <snooplsm> can't get this last step to work[08:20:54] *** Parisi has joined ##java[08:21:02] *** vinse has left ##java[08:22:06] <Geren> hellllooooo?[08:23:03] *** adante has joined ##java[08:23:09] <Parisi> Hi[08:25:11] <Garibaldi> try interrupting the thread[08:25:12] *** vate has quit IRC[08:26:29] *** tvn has quit IRC[08:34:33] *** ractrev has joined ##java[08:35:17] *** Budward has joined ##java[08:35:21] *** ractrev has quit IRC[08:37:32] *** The_Vulture has joined ##java[08:40:03] *** NOthsouth has joined ##java[08:40:27] *** octoberdan has quit IRC[08:41:13] *** alex_f has quit IRC[08:41:45] <NOthsouth> hello, I`m noob in java, I`m trying to make a program read a number(inputed by user) and print this number .. but when I type in nubem 1 , it show me 49... I know i need parse this, but i`m not sure how..[08:43:06] <The_Vulture> NOthsouth: how's about you pastebin the code in question..[08:43:43] <snooplsm> why is it so hard to sign an applet[08:44:29] <NOthsouth> x = System.in.read();[08:44:31] <NOthsouth> System.out.println(x);[08:44:35] <snooplsm> no[08:44:42] <snooplsm> www.pastebin.com[08:44:45] <snooplsm> paste the url[08:44:48] <NOthsouth> ho[08:44:48] <NOthsouth> ok[08:45:04] <The_Vulture> NOthsouth: perhaps you should read more about what read() actually does[08:46:16] <NOthsouth> hum[08:46:23] <NOthsouth> http://pastebin.com/402674[08:46:44] <NOthsouth> i`ll[08:46:56] *** hatOFF has quit IRC[08:47:37] <NOthsouth> snooplsm, i need do everything in console..[08:48:00] <The_Vulture> NOthsouth: have you read the documentation for the method you are calling?[08:48:18] <The_Vulture> and do you have some sort of book you'd be learning from?[08:48:56] <NOthsouth> The_Ball, i`m learning from deitel book[08:49:20] <NOthsouth> =][08:49:27] *** alex_f has joined ##java[08:50:18] *** euvitudo has quit IRC[08:50:23] <NOthsouth> hum[08:50:41] <NOthsouth> what method should I use in this case?[08:51:34] *** IMTheNachoMan has joined ##java[08:51:46] <IMTheNachoMan> yahh!! i finally get to write something usefull in java for work[08:52:05] *** Honk^away has quit IRC[08:52:23] <The_Vulture> NOthsouth: Doing reasonably sane stuff with standard input in Java's not particularly simple..[08:52:43] <NOthsouth> hum[08:52:48] <NOthsouth> :S[08:52:51] *** Honk^away has joined ##java[08:53:43] <pr3d4t0r> NOthsouth: JCurses[08:53:49] <pr3d4t0r> NOthsouth: Google that.[08:53:56] <IMTheNachoMan> quesiton bout writing to a file, persay i open a file and start writing to it, program then crases (or something) and the file is never 'closed' the stuff i wrote to it should still be there right?[08:54:09] <NOthsouth> I just want to read a number/letter and print this on screen[08:54:23] <snooplsm> Nothsout, how do you get user input in java?[08:54:45] <IMTheNachoMan> heh[08:54:54] <IMTheNachoMan> i remember when i asked a question like that[08:55:05] <IMTheNachoMan> pr3d4t0r actually i think u even helped me with that[08:55:08] <NOthsouth> snooplsm, x = System.in.read();[08:55:10] <NOthsouth> ?[08:55:20] <The_Vulture> IMTheNachoMan: if you flush the streams..[08:55:38] <snooplsm> http://www.javaworld.com/javaworld/javaqa/1999-07/02-qa-shell.html[08:55:40] <IMTheNachoMan> The_Vulture so after every write flush[08:55:47] <IMTheNachoMan> The_Vulture ok thx that aughta work[08:56:07] <IMTheNachoMan> im just checkin cuase i gota write a chat prog for work and i was gonna have a back up, well a log but needed to figure out a good way to do it[08:56:10] <snooplsm> have you learned about parsing?[08:56:17] <IMTheNachoMan> gota make sure it works if the prog crashes[08:56:20] <snooplsm> IMTheNachoMan, have you signed java applets ever?[08:56:31] <IMTheNachoMan> snooplsm havent done much with applets YET[08:56:42] <IMTheNachoMan> but im sure there is a prety good doc on it somewher on line[08:56:46] <NOthsouth> snooplsm, a little bit[08:57:10] <snooplsm> ok[08:57:52] <IMTheNachoMan> although i might not[08:57:59] <IMTheNachoMan> my prog wont need access to the individuals computer[08:58:00] <IMTheNachoMan> persay[08:58:01] <NOthsouth> snooplsm, thx for the url..[08:58:04] <IMTheNachoMan> il have to see[08:58:06] <IMTheNachoMan> well night fokes[08:58:11] <IMTheNachoMan> and HI pr3d4t0r[08:58:14] <IMTheNachoMan> hi The_Vulture[08:58:23] <IMTheNachoMan> havnet spoke to yall in a while (yall prob forgot me :-P)[08:59:18] <IMTheNachoMan> peace everyone[09:01:21] <snooplsm> hope it helps[09:01:26] <snooplsm> i don't even know how to do that shit[09:01:35] <snooplsm> and i wrote an image manipulation program, haha[09:01:52] <snooplsm> im used to cin>>[09:03:59] *** Esaj has joined ##java[09:13:04] *** YD has quit IRC[09:14:18] *** spektr has joined ##java[09:16:04] *** YD has joined ##java[09:30:04] *** Budward has quit IRC[09:30:35] *** Geren has quit IRC[09:30:39] *** Baloogan_ has joined ##java[09:30:45] <Baloogan_> How do I make RMI work?[09:30:49] *** adante has quit IRC[09:31:24] <Baloogan_> I get[09:31:25] <Baloogan_> java.security.AccessControlException: access denied (java.net.SocketPermission 1[09:31:25] <Baloogan_> 27.0.0.1:1099 connect,resolve)[09:31:31] <Baloogan_> When I try to run my server[09:31:32] <Baloogan_> :([09:34:47] <The_Vulture> Baloogan_: I guess you need to read a tutorial explaining how to specify security stuff..[09:34:52] <The_Vulture> Sun's RMI tutorial covers all that.[09:35:08] <Baloogan_> I'm reading it now.[09:35:20] <Baloogan_> it tells me to run[09:35:21] <Baloogan_> start rmiregistry[09:35:27] <Baloogan_> and I can't run that[09:35:38] *** ^cool^tom^ has left ##java[09:35:41] <snooplsm> do a full run threw again[09:35:50] <snooplsm> line by line, character by character[09:36:05] *** Geren has joined ##java[09:36:10] <Geren> hi[09:36:17] <Geren> can someone tell me how to write a simple makefile for java ?[09:36:28] <Geren> all i want is the equivalent of javac myFIle.java myFile2.java[09:36:29] <The_Vulture> Geren: Most people use "ant" instead of Make[09:36:37] <Geren> but my assingment requires me to use makefile[09:36:43] <Geren> and i looked online everywhere[09:36:49] <Geren> and cannot fine any info on makefile for java[09:36:49] <The_Vulture> Geren: So shouldn't you read some intro to Make?[09:37:00] <Geren> well that's not the point of the assignment[09:37:01] <The_Vulture> You don't need any info on Makefiles for Java - just Makefiles in general.[09:37:05] <Geren> i just spent 12 hours writing my code[09:37:12] *** Sancezz has joined ##java[09:37:14] <Geren> i want to just get this makefile done with and over[09:37:15] <Geren> please!![09:37:17] <Geren> god[09:37:27] <Geren> soemtimes i just want to commit suicide[09:37:35] * The_Vulture hands Geren some weaponry[09:37:36] <Geren> i just put javac myFile.java into my makefile[09:37:37] <Geren> and it doesnt work[09:37:44] <The_Vulture> take your pick :)[09:37:48] <Geren> are there some syntax i'm missin;g?[09:37:53] <Geren> please, i'm not asking mukch[09:37:54] <The_Vulture> of course it doesn't.. yes - the syntax of Makefiles.[09:37:58] <Geren> just give me the quick synx[09:38:00] <Geren> syntax[09:38:13] <The_Vulture> http://www.gnu.org/software/make/manual/html_chapter/make_2.html#SEC5[09:38:24] <snooplsm> geren, paste it[09:38:36] <Geren> paste what[09:38:44] <Geren> see, i was reading the tutorial[09:38:45] <Geren> and it[09:38:48] <Geren> it's all about c!!![09:38:57] <Geren> java doesn't even have .o files![09:39:00] <The_Vulture> Geren: No you prat - it's about Makefiles. It's merely using C as an example.[09:39:04] <Geren> yea[09:39:08] <Geren> but how do u morph it into java?[09:39:09] <Geren> i mean[09:39:12] <The_Vulture> 2.1 - What a Rule Looks Like.[09:39:13] <Geren> i dont really get it[09:39:14] <The_Vulture> Make a rule.[09:39:25] <The_Vulture> target name, prerequisites, commands.[09:39:31] <Geren> it starts with edit[09:39:34] <The_Vulture> none of these are specific to any language, they are general concepts.[09:39:37] <Geren> do i need "edit" ?[09:39:45] <Geren> and why is it cc instead of gcc?[09:39:48] <Geren> so confusing[09:39:49] <The_Vulture> smeg, read 2.1[09:39:51] <Geren> i dont even know c[09:40:17] <Geren> i dont want to use any shortcut or variables[09:40:22] <Geren> just a very very very basic and plain makefile[09:40:26] <Geren> please?!?!?![09:40:27] <Geren> wtf!!1\[09:42:11] <Geren> are there automatic makefile generators?[09:42:54] *** watzlaf has joined ##java[09:42:56] <axxo> x/1[09:43:00] <The_Vulture> Geren: Seriously. Stop and think for a moment. Have you read section 2.1?[09:43:22] <The_Vulture> What is your target? what are your prerequisites? what is the command that takes the rerequisites and produces the targets?[09:43:29] <Geren> what the hell are targetrs?[09:43:34] <Geren> what are prerequisites???[09:43:41] <Geren> all i know is that i want to do javac myFile.java@!!![09:43:43] <The_Vulture> Read section 2.1 for fucks sake.[09:43:45] <Geren> is tha tso hard?!?!?!![09:43:47] <Geren> FUCKKNG SGOD32[09:43:48] <The_Vulture> "A target is usually the name of a file that is generated by a program; examples of targets are executable or object files. A target can also be the name of an action to carry out, such as `clean' "[09:43:49] <Geren> 2gesal;fvbadvvav:"D[09:43:51] <Geren> ok i'm sorry[09:43:52] <Geren> its just that[09:43:59] <Geren> i just spent 10 hours writing this piece of code[09:44:00] <The_Vulture> So, what are your targets?[09:44:05] <Geren> and i need it submit it in 15 mins[09:44:11] <Geren> and i really really worked hard on this[09:44:22] <Geren> and i dont want to be fucked up by a makefile which i never learend and have no time to learn right now![09:44:24] <Geren> god![09:44:26] <Geren> jessus[09:44:28] <Geren> please!!![09:44:41] <Geren> my targets are myFile.class, no?[09:44:45] <Geren> i mean thats the final results of my java[09:44:47] <The_Vulture> if you'd stop ranting and read 4 paragraphs you'd be well on your way by now.[09:44:57] <The_Vulture> Right, ok. So your targets are a bunch of class files.[09:45:08] <The_Vulture> In fact you can put them all on the same line, rather than having multiple targets[09:45:12] <The_Vulture> Foo.class Bar.class:[09:45:19] <The_Vulture> now you need your prerequisites[09:45:27] <The_Vulture> they go after the ':'[09:45:31] <The_Vulture> What are your prerequisites?[09:45:43] *** |Agent has joined ##java[09:46:00] <|Agent> Hey, wasn't there a class with set operations like union and intersection?[09:46:14] <The_Vulture> |Agent: the Set interface perhaps, and any implementation thereof[09:46:24] <The_Vulture> as for those operations, you'd implement them with addAll/removeAll[09:46:54] <Geren> ok[09:46:55] <Geren> let me try[09:47:47] *** poiuyt has joined ##java[09:48:17] *** JViz has joined ##java[09:48:29] <|Agent> The Set interface and concrete classes do not seem to have those operations. Intersection, in particular, could be hard to pull off.[09:48:54] <The_Vulture> |Agent: retainAll.[09:49:03] <The_Vulture> not hard, trivial[09:49:21] <|Agent> Ah! Cool.[09:49:30] <The_Vulture> R.T.F.M. - it's fun like that :)[09:49:35] <|Agent> Would have been nice if they used standard names. *sigh*[09:49:49] <Geren> ok i got my makefile to work[09:49:55] <The_Vulture> Geren: fun isn't it?[09:49:55] <Geren> thanks[09:49:58] <The_Vulture> enjoy[09:50:00] <Geren> sorry about earlier[09:50:05] <Geren> i was just frustrated[09:50:19] <Geren> also, i can't generate executables from .java files right[09:50:24] <Geren> i can only generate .class files[09:50:39] <The_Vulture> Geren: you could make an executable jar file. But if you mean a native executable - not traditionally, no.[09:50:44] <The_Vulture> There are some non-standard tools that can do it.[09:50:46] <cybereal> executable is such a vague term anymore[09:50:50] <snooplsm> how can i POST data from an applet?[09:50:55] <Geren> The_Vulture, what is an executeable jar file?[09:51:15] <Geren> it will run automatically without the user having to type "java MyProgram" ?[09:51:18] <snooplsm> an executable jar file is a zip file with classes inside it[09:51:21] <cybereal> Geren: java -jar myjar.jar[09:51:22] <The_Vulture> Geren: JAR files, or Java Archives are basically enhanced Zip files for containing Java classes. They can contain a little extra information about which class to run inside them.[09:51:37] <The_Vulture> so you execute an executable jar as cybereal showed, with "java -jar foo.jar"[09:51:38] <cybereal> snooplsm: use a socket; learn http 1.1[09:51:41] <cybereal> snooplsm: it's easy[09:51:53] <snooplsm> cybereal, can i post to aphp file?[09:51:57] <Geren> The_Vulture, ok, but the what if i have two files that must be run sperately?[09:51:58] <The_Vulture> snooplsm: Could probably use a URLConnection, or a 3rd party networking lib[09:52:02] <Geren> like client.class and server.class[09:52:08] <cybereal> snooplsm: you can post to anything on any web page; whether the server handles it is its own business[09:52:15] <The_Vulture> snooplsm: what you post to is irrelevant - an HTTP client couldn't care less what handles the request[09:52:39] <The_Vulture> Geren: Then you'd have two separate executable jars, but if each application only has a single class file there's not much point making jars of them..[09:52:55] <cybereal> most of the time if you POST to something that doesn't handle post data but it's a CGI or script of some kind, it'll just go on like normal[09:52:59] <The_Vulture> or you could have one non-executable jar containing everything which would be executed as "java -cp foo.jar your.fully.qualified.ClassName"[09:53:44] *** |sToNe has joined ##java[09:53:44] <snooplsm> this sucks, i'm very confused[09:54:00] <cybereal> snooplsm: learn about HTTP 1.1[09:54:15] <cybereal> snooplsm: in our web-centric world, you can't possibly be hurt by knowing abou tit[09:54:17] <snooplsm> its 4 in the morning almost i have a headache[09:54:23] <The_Vulture> snooplsm: so get some sleep[09:56:16] <|sToNe> hey any idea about this: Oct 23, 2005 5:11:25 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent[09:56:16] <|sToNe> INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path:[09:56:31] *** poiuyt has left ##java[09:56:55] <Clackwell> hallo everyone[09:57:24] *** cybereal has quit IRC[09:57:43] *** cybereal has joined ##java[09:57:52] <Clackwell> |sToNe: maybe it means what it says.[09:58:05] <|sToNe> ya that i kno[09:58:18] <|sToNe> but how can i resolve that[09:58:20] <Clackwell> |sToNe: so put the APR into the java.library.path and move on.[09:58:20] <|sToNe> :P[09:58:21] *** enervate has quit IRC[09:59:43] <Clackwell> |sToNe: sorry, misread your question. here is my answer: yes.[09:59:59] <|sToNe> man im just started with tomcat... dont kno much ... can u plz tell me wat that apr means or wat actually that does?[10:01:21] <Clackwell> |sToNe: APR is has been developed for and is mostly used by the apache web server, as far as i know. it is written in c or c++ and compiled to native code. it seems that your tomcat version somehow wants to utilize that stuff, for whatever reason.[10:02:43] <Clackwell> |sToNe: maybe you grabbed the wrong tomcat version? maybe it is preconfigured differently than the original one from the official website? maybe you changed the configuration and thus made it look for the APR?[10:03:13] <Clackwell> |sToNe: besides, the above seems to be an informational message only, not an error.[10:03:30] <|sToNe> ya...[10:04:32] <|sToNe> if i remove this line from server.xml: <Listener className="org.apache.catalina.core.AprLifecycleListener" /> thm it doen't show that info message[10:04:58] <Clackwell> |sToNe: excellent[10:05:35] <|sToNe> do i need that apr to run my server?[10:06:09] <|Agent> I am writing a layout manager. Anybody know what getLayoutAlignmentX(Container target) and getLayoutAlignmentY(Container target) are for?[10:06:18] <pr3d4t0r> |Agent: Please, no aolbonics.[10:06:22] <pr3d4t0r> Sorry,[10:06:28] <Clackwell> hi pred[10:06:29] <pr3d4t0r> |sToNe: Please, no aolbonics.[10:06:32] <pr3d4t0r> Clackwell![10:06:32] *** Tartaros has joined ##java[10:06:55] <|Agent> Are they called by Container's getAlignmentX and getAlignmentY?[10:07:15] <Clackwell> |sToNe: i guess the apache java folks (catalina, tomcat) like to see people using apache web server as a frontend for tomcat, as it may cope better with heavy lifting, and since tomcat does web serving too, people probably seem to automatically try to use it for that purpose without apache.[10:07:42] <Clackwell> |sToNe: does "lomboz" ring a bell?[10:08:52] <|sToNe> hmm[10:10:18] <|sToNe> don't ya think tomcat good one as jsp server? or if u want to tell me some other...i may look at[10:11:00] <Clackwell> i take that as a "no". and i assume that you have some problem with tomcat that you don't want to tell us about.[10:11:02] <Clackwell> male pride? :)[10:11:04] *** Parisi has left ##java[10:11:16] <Baloogan_> how can I force java RMI to be unsecure?[10:11:24] <Baloogan_> I don't want to fuck around with allowing stuff?[10:11:24] <|sToNe> lol nah[10:11:27] <Baloogan_> I just want it to wrk[10:11:29] <Baloogan_> work[10:11:39] <Clackwell> Baloogan_: and it doesn?[10:11:42] <Clackwell> doesn't, rather[10:12:11] <|sToNe> Clackwell thn can you plz tell me which i should try[10:12:14] <Baloogan_> Clackwell: it doesn't work[10:12:29] <Baloogan_> java.lang.ClassNotFoundException: xcomserver.MsgInterface (no security manager: RMI class loader disabled)[10:12:42] <cybereal> |sToNe: tomcat is good; also jetty is popular as it can be embedded easily[10:13:10] <|sToNe> kool[10:13:41] <Clackwell> Baloogan_: lack of information, sorry. perhaps do the sun java tutorial on rmi. if that works for you it could mean that you are currently doing wrong currently.[10:15:00] *** Tirlasmisu is now known as Tirsleep[10:15:07] <Clackwell> Baloogan_: the specifics of your setup matter when analysing problems. i suspect that you are not "just using rmi and it doesn't work", but that it is more complicated at closer look.[10:16:11] <Drone> View Baloogan's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8546[10:16:12] *** Bevin has joined ##java[10:16:20] <Drone> View Baloogan's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8547[10:16:29] <Baloogan_> Clackwell: First is my server[10:16:32] <Baloogan_> second is client[10:16:42] <|Agent> Answer is, getLayoutAlignmentX is called by getAlignmentX to get the alignment. Whatever alignment is used for...[10:16:44] <Bevin> hi[10:16:45] <Baloogan_> client gives[10:16:45] <Baloogan_> java.rmi.UnmarshalException: error unmarshalling return; nested exception is:[10:16:45] <Baloogan_> java.lang.ClassNotFoundException: xcomserver.MsgInterface (no security manager: RMI class loader disabled)[10:16:45] <Baloogan_> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)[10:18:35] *** terence_ has joined ##java[10:18:55] <Clackwell> Baloogan_: no clue about rmi itself, sorry. i would try using examples that are claimed to work, which may be a bit tough since your seem to do something very specific already.[10:19:32] <The_Vulture> what Clackwell said - do a complete well documented example, make sure that works before trying to do something yourself[10:19:40] <terence_> hi[10:19:49] <The_Vulture> but it seems you just don't have the MsgInterface class available to the client..[10:20:13] <terence_> is here any dirstributed system expert, has an idea of wave/echo algorithms?[10:20:58] <Clackwell> terence_: perhaps the question can be decomposed. what do you mean by wave/echo algorithms?[10:21:52] <Clackwell> The_Vulture: hey there, long time no see. are you back in java land some more?[10:23:09] <terence_> Clackwell: .. at least is has more to do with tree algorithms, but i would use the 2 second wave of the wave algo to traverse a tree bottom-up, add the childs value to its aprents in root direction, such any node has sum of its complete subgraph downwards, later[10:23:41] <Clackwell> terence_: gesundheit.[10:23:50] *** skylan has quit IRC[10:23:55] <terence_> Clackwell: i the wave algo the nodes which have been visited by all its childs , travervse up to its parents then ( you need a counter per node)[10:24:47] <terence_> Clackwell: Geundheit?[10:24:55] <terence_> Gesundheit?[10:25:23] <|sToNe> where else i can get help regarding tomcat/webserver problems?[10:25:30] <Clackwell> terence_: you seemed to speak in a foreign language all of a sudden.[10:25:35] * Clackwell waits for the answer to his question.[10:26:00] <terence_> Clackwell: pah[10:26:40] <Clackwell> |sToNe: you do have tomcat problems? go ahead and state them?[10:27:42] <Baloogan_> is there something like RMI that doesn't need to have a daemon running in the background?[10:27:49] <terence_> Clackwell: if you don't know what a wave algo is, we don't have to discuss this futher, this is basic[10:28:06] <Clackwell> terence_: ok[10:28:37] * Clackwell just wanted to sort out the relevant portion of the question, to possibly refer to some of the guys knowing about distributed computing[10:28:58] <Clackwell> (if that would have been the relevant part, that is.)[10:29:39] <terence_> it has nothinh to do with distributed at the end. because i converted it tia tree algo, however if you have another solution, i desribed what i need[10:29:42] <Clackwell> Baloogan_: you want a server component but you don't want to run a server process?[10:30:01] <Clackwell> terence_: ok, not my area then, sorry.[10:30:15] <Baloogan_> Clackwell: I want to run a java server. I don't want to run rmiregistry[10:30:25] <Baloogan_> I want RMI without rmiregistry[10:30:28] <Baloogan_> How can I do that?[10:30:31] <Clackwell> Baloogan_: aha[10:30:38] <Baloogan_> ?[10:30:43] *** Bevin has quit IRC[10:30:46] <Clackwell> Baloogan_: i see[10:30:55] <Baloogan_> So please tell me :([10:31:56] <Clackwell> Baloogan_: i don't know about rmi. you tried "LocateRegistry.createRegistry(port);" already, didn't you? (trying to remember your code)[10:32:02] <Baloogan_> yeah[10:32:31] *** Geren has quit IRC[10:33:07] <Baloogan_> I get[10:33:07] <Baloogan_> java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3440 connect,resolve)[10:33:19] <Baloogan_> I want to give access to every goddamn thing :([10:33:52] <Clackwell> Baloogan_: did you not claim to get a different error message before?[10:34:07] <Baloogan_> yeah[10:34:13] <Baloogan_> I've changed my code[10:34:15] <Baloogan_> a bit[10:34:25] <Clackwell> so we have a new problem to consider now.[10:34:29] <Clackwell> Baloogan_: consider providing a test case (avoids having to guess what you are *really* doing): http://javafaq.mine.nu/lookup?22 Also provide any error messages that you might be getting. typically paste to http://pastebin.com[10:34:30] <Baloogan_> I added a security manager[10:34:34] <|Agent> This is interesting. If I declare a method that takes (Container, Object) and another one that takes (Container, Object[]), and I pass (Container, Object[]), the (Container, Object) method is the one called.[10:34:54] <Clackwell> Baloogan_: maybe your security manager gets a request for socket related stuff and denies access?[10:35:03] <Baloogan_> Clackwell: This _is_ a test case :P[10:35:14] <Baloogan_> This is basically as simple as RMI gets :P[10:35:19] <Baloogan_> And I suck at it :([10:35:36] <snooplsm> good night cruel world[10:35:41] <Clackwell> bye snoop[10:36:02] <Clackwell> Baloogan_: you provided the test case with the security manager? i must have missed that.[10:36:23] <Drone> View Baloogan's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8548[10:36:30] <Baloogan_> Thats my client.[10:36:35] <Baloogan_> My server, I think, works.[10:36:37] <Clackwell> Baloogan_: the client gets the error?[10:36:39] <Baloogan_> Yesh[10:36:45] <Baloogan_> The server is fine (I think)[10:36:51] <Baloogan_> Wait[10:36:55] <Baloogan_> thats my server's code[10:37:06] <Drone> View Baloogan's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8549[10:37:10] <Baloogan_> thats my client[10:37:22] <Baloogan_> and I get this[10:37:23] <Baloogan_> java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3440 connect,resolve)[10:38:38] <Clackwell> humor, work safe: http://cheblogs.com/roller/page/damien/20050403#like_a_bunch_of_teenagers[10:38:39] <Baloogan_> My problem is now figuring out how to allow access[10:40:21] <Baloogan_> Any ideas?[10:40:52] <Clackwell> Baloogan_: no. i am in the middle of trying, most of my ideas come to me while or after trying.[10:41:01] <Baloogan_> Ok.[10:41:47] *** Storkme has joined ##java[10:43:53] <Clackwell> Baloogan_: possibly related: http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20009760.html[10:44:07] <Clackwell> Baloogan_: found via: http://www.google.com/search?complete=1&hl=en&q=locateregistry.getregistry+AccessControlException%3A+access+denied&btnG=Google+Search[10:44:17] <Storkme> how can i get a nick if it's registered by someone else? they haven't used it for over a year[10:44:30] <Clackwell> Storkme: get over it[10:44:36] <Clackwell> ask freenode?[10:44:51] <Storkme> kay[10:46:17] *** Bevin has joined ##java[10:48:13] *** AllenJB has quit IRC[11:00:42] <Clackwell> Baloogan_: out of ideas, besides that permissions/policy stuff.[11:02:21] *** fuso has quit IRC[11:03:03] <Baloogan_> Clackwell: Well, I've fixed that problem now :([11:03:05] <Baloogan_> And I got more.[11:03:18] <Clackwell> Baloogan_: how did you fix it?[11:03:31] <Baloogan_> Clackwell:[11:03:39] <Baloogan_> java.policy[11:04:11] <Clackwell> Baloogan_: by providing a policy file? can you pastebin the contents of that please?[11:04:28] <Baloogan_> SURE[11:04:30] <Baloogan_> sure[11:04:43] <Drone> View Baloogan's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8550[11:04:48] <Baloogan_> there ya are[11:04:54] <Clackwell> i have never seen that stuff, i would like to at least glance at it, never know when it's required.[11:04:58] <Clackwell> Baloogan_: thank you.[11:05:58] <Baloogan_> welcome[11:06:14] *** LLyric has quit IRC[11:06:27] <Clackwell> Baloogan_: how do you make java use the policy file?[11:08:24] <Clackwell> Baloogan_: aha. so if you have an end user application you would have "java -Djava.security.policy=FILENAME etc.pp." in a script file to launch the application. aside of having documented what access the application may do in that policy file, i wonder how that gives the end user any kind of security.[11:09:10] <Clackwell> i mean, it will be launched like that right away anyway. no user will look for a policy file, he will assume that an application started by himself is allowed to do anything it wants anyway. futile exercise?[11:09:12] <Baloogan_> I think its just designed to piss me off.[11:09:17] <Clackwell> Baloogan_: :)[11:09:43] <Clackwell> Baloogan_: you might want to state your new problem perhaps[11:09:53] <Baloogan_> okay[11:10:16] <Baloogan_> I odn't even pretend to know whats wrong[11:10:16] <Baloogan_> java.rmi.UnmarshalException: error unmarshalling return; nested exception is:[11:10:16] <Baloogan_> java.lang.ClassNotFoundException: xcomserver.MsgInterface[11:11:34] <Clackwell> Baloogan_: that seems related to the first url (or so) that i posted, where they talked about class path, when and how it doesn't work for looking up stuff via rmi, etc.[11:12:00] <Baloogan_> eh?[11:17:05] <Clackwell> Baloogan_: hm, sorry, i didn't seem to have posted that url. i stumbled over the discussion while scanning the net for your first problem i think.[11:18:01] <Baloogan_> ok[11:18:20] <Clackwell> Baloogan_: possibly related: http://www.google.com/search?complete=1&hl=en&q=java.rmi.UnmarshalException%3A+error+unmarshalling+return%3B+nested+exception+is%3A+java.lang.ClassNotFoundException&btnG=Google+Search[11:20:29] <|Agent> Is there a way to distinguish an Object[] from an Object?[11:21:03] <cybereal> instanceof Object[] ?[11:21:21] <|Agent> Duh. Thanks.[11:21:41] <cybereal> dunno if that works or not[11:28:15] <|Agent> Seems to do the trick.[11:28:21] <cybereal> cool good to know[11:39:35] *** Manny has joined ##java[11:47:31] *** ruben- has left ##java[11:49:24] *** Sancezz has quit IRC[11:55:28] *** Trixsey|Laptop has quit IRC[11:55:51] *** Trixsey|Laptop has joined ##java[12:03:20] <|sToNe> hmm[12:03:53] <|sToNe> Clackwell[12:05:37] *** deedaw has quit IRC[12:08:35] *** Stigma has joined ##java[12:13:10] *** eeaaxx has joined ##java[12:14:07] <Storkme> grr, jad crashed[12:14:13] <Storkme> and it wont work ;([12:15:13] <ernimril> Storkme: what are you using jad for?[12:15:29] <Storkme> decompiling a program that i just obfuscated[12:15:42] <eeaaxx> what is the bean value on the java.util.collection on the ejbFind on a entity(bmp) bean?[12:15:42] <Storkme> to see if it worked/how well it worked[12:15:59] *** ^cool^tom^ has joined ##java[12:16:24] <ernimril> obfuscation is rarely worth it...[12:16:43] *** DocTomoe has joined ##java[12:17:00] <ernimril> if you do dynamic class loading or reflection you have to make sure that thoose methods are not changed...[12:17:29] <ernimril> it can probably be good for size reduction on j2me...[12:18:22] *** OleMoudi has joined ##java[12:18:23] <DocTomoe> Can someone please help me fix a problem with my java installation? This is an ubuntu system, with java installed as a package. compiler runs fine, but any bytecvode I try to execute gives me errors like "Exception in thread "main" java.lang.NoClassDefFoundError: ". CLASSPATH is however set to where the java libraries are. anny suggestions?[12:18:41] <NOthsouth> Hey..Why when I choose option 1.. it`s show me Game Started AND Invalid Option ???? and when I choose option 2 it`s only show me See ya?????[12:18:42] <NOthsouth> http://pastebin.com/402763[12:18:44] <The_Ball> How is this possible: http://rafb.net/paste/results/DplBBV76.html the line above the nullPointerExeption does the same opperation[12:19:16] <eeaaxx> anybody here knows EJB?[12:20:56] <^cool^tom^> A little bit.[12:21:16] <^cool^tom^> Just got through the first tutorial of JBoss.[12:21:57] *** IseeIsee has joined ##java[12:22:16] <eeaaxx> ^cool^tom^: may i ask, do u know how to create an ejbFind that returns a collection?[12:22:19] <IseeIsee> if I want a JFrame to always open centred, what should I do ?[12:22:51] <^cool^tom^> Just a sec.[12:23:52] <NOthsouth> http://pastebin.com/402763 Hey..Why when I choose option 1.. it`s show me Game Started AND Invalid Option ???? and when I choose option 2 it`s only show me See ya?????[12:23:57] *** wilx has quit IRC[12:24:14] <The_Vulture> Clackwell: (excuse the delay) - sort of. Came on yesterday/today to get a few ideas about my upcoming interview with Microsoft (tomorrow). Actually I reallly need to get going on my thesis (due in under two weeks)[12:25:27] <Storkme> ew, microsoft :P[12:25:53] <The_Vulture> Storkme: *shrugs* money, good work envorinment (if a little high-stress), etc.[12:26:06] <Storkme> high stress is bad[12:27:37] *** DocTomoe has left ##java[12:27:50] <IseeIsee> if I want a JFrame to always open centred, what should I do ?[12:28:35] <^cool^tom^> eeaaxx: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/BMP2.html#wp79725[12:28:58] <^cool^tom^> There is one heading called The Finder Methods[12:29:15] <Storkme> what does native mean?[12:29:36] *** terence_ has quit IRC[12:30:57] <^cool^tom^> Storkme: It means that the method is implemented in a native language like c, c++. For a particular platform.[12:30:57] <|sToNe> javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"[12:30:58] <|sToNe> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)[12:30:58] <|sToNe> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)[12:31:10] <Clackwell> ~flood[12:31:11] <javabot> Please don't flood, it's irritating. We *do* have a pastebin or two.[12:31:18] <|sToNe> :$[12:31:23] <Clackwell> The_Vulture: ah, i see. what position is that about?[12:31:23] <Storkme> i see ^cool^tom^, thanks[12:31:45] <|sToNe> Clackwell help me plz[12:31:47] <eeaaxx> ^cool^tom^: thanks. i tried it but i get a NullPointerException in my client class?[12:31:57] *** terence_ has joined ##java[12:31:59] <Clackwell> |sToNe: seems your JDBC url is incorrect, or there is no driver feeling responsible for it is in the class path.[12:32:16] <^cool^tom^> Where is the null pointer exception thrown?[12:32:27] <terence_> is i+=j; same as i=i+j; ?[12:32:36] <^cool^tom^> Are there any records in your database?[12:32:37] <Clackwell> eeaaxx: you don't know wether you get a nullpointerexception?[12:32:47] <Clackwell> ^cool^tom^: who are you talking to?[12:32:53] <Clackwell> ~tell eeaaxx about npe[12:32:53] <javabot> eeaaxx, npe is http://www.tmorris.net/pubs/npe/ or alternatively http://lavender.cime.net/~ricky/java-errors/NullPointerException.html[12:32:55] <Drone> That URL gave the following error: java.net.ConnectException, Connection refused[12:33:07] *** hashman has joined ##java[12:33:14] *** Mc_Fly has joined ##java[12:33:29] <^cool^tom^> Clackwell: eeaaxx.[12:33:49] <Clackwell> ^cool^tom^: ah, could have been |sToNe too, hence my asking.[12:34:12] *** ocx32 has joined ##java[12:34:18] <Mc_Fly> Why can I not do this, and what do I do instead? int[] arr; arr = {12,32,432,56,4}; ?[12:34:32] <Clackwell> Mc_Fly: see sun java tutorial, arrays trail?[12:34:33] <ocx32> where can i read about he observer/observable class[12:34:38] <ocx32> and how it works[12:34:46] <eeaaxx> ^cool^tom^: the message is "Caused by: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: null"[12:34:55] <Clackwell> ocx32: api docs, possibly somewhere on sun's site, google has it indexed.[12:35:27] *** Ulgar has joined ##java[12:35:29] <Mc_Fly> Clackwell: Do I really need to do: arr[0] = 12; arr[1] = 32; ... ?[12:35:59] <^cool^tom^> eeaaxx: Are you getting a reference to the remote object? Can you do a getByPrimaryKey?[12:36:05] * Clackwell ignores Mc_Fly as he ignores him.[12:36:26] <The_Vulture> Clackwell: General graduate position. ("Software Design Engineer" & "Software Design Engineer in Test")[12:36:36] <Mc_Fly> Clackwell: Not ignoring u :-) just looked allready[12:36:41] <The_Vulture> They're mainly looking for people for the Windows Server group[12:36:50] <The_Vulture> though I'd like to do some stuff in Windows Media Center[12:37:18] <Clackwell> The_Vulture: aha, cool :) i assume they have a truckload of smart folks in their "core" development groups.[12:37:22] * pr3d4t0r 's eyeballs hurts.[12:37:25] <pr3d4t0r> Er, hurt.[12:37:32] * The_Vulture hands pr3d4t0r a spoon[12:37:37] <The_Vulture> here, take them out - that'll solve it[12:37:40] <pr3d4t0r> I don't know if it's lack of sleep, or dumbasses writing "u" instead of "you".[12:38:00] <eeaaxx> ^cool^tom^: it is a remote. i cannot also do the getByPrimaryKey?[12:38:04] <pr3d4t0r> The_Vulture: Nah.[12:38:13] <The_Vulture> pr3d4t0r: aww.. but it'd be fun :)[12:38:14] <pr3d4t0r> The_Vulture: I'll peg it on need to sleep :)[12:38:15] <Clackwell> pr3d4t0r: the good part is that you can do something about both.[12:38:23] <Storkme> people that say 'u' need to be shot[12:38:23] <pr3d4t0r> Clackwell: Yeah. Good night.[12:38:28] <The_Vulture> g'night pr3d4t0r[12:38:29] <Clackwell> pr3d4t0r: <wave>[12:38:29] <pr3d4t0r> Storkme: Indeed.[12:38:34] <eeaaxx> ^cool^tom^: can u tell me what is the problem?[12:38:36] <pr3d4t0r> javabot: Storkme++[12:38:37] <javabot> storkme has a karma level of 0, pr3d4t0r[12:38:38] *** ChanServ sets mode: +o pr3d4t0r[12:38:41] *** eeaaxx was kicked by pr3d4t0r (pr3d4t0r)[12:38:50] <Storkme> haha :P[12:38:51] <Clackwell> when my eyes ick me, i typically didn't drink enough water.[12:38:53] <pr3d4t0r> One down.[12:39:00] <^cool^tom^> U accessing the entity bean directly or U using a session bean?[12:39:01] <Storkme> pr3d4t0r: make a script :)[12:39:09] <pr3d4t0r> Storkme: He, he, he...[12:39:12] *** eeaaxx has joined ##java[12:39:13] <Clackwell> and another bites the dust, oh yeah.[12:39:13] *** ^cool^tom^ was kicked by pr3d4t0r (pr3d4t0r)[12:39:17] <Storkme> make an irc bot that warns people if they say " u "[12:39:24] <Clackwell> Storkme: what for?[12:39:27] <pr3d4t0r> ~aolbonics[12:39:28] <javabot> pr3d4t0r, aolbonics is talking using numbers, or using single letters for you, are, you are, you're, etc. Examples are: Hey evry1; howz it goin?; how r u; ur teh suckz. Talking like this is frowned upon in ##java, and may result in you being silenced. See this for more detail: http://ars.userfriendly.org/cartoons/?id=20041201[12:39:34] <Clackwell> pamper them all day? naw, it's more fun to kick them. :)[12:39:35] <Storkme> because it's annoying[12:39:39] <Storkme> heh[12:40:02] <pr3d4t0r> ~u[12:40:02] <javabot> pr3d4t0r, u is Dutch for "you" or an aolbonic meaning "I am stupid".[12:40:09] <Clackwell> besides the human participants already make very sure that everyone gets the aolbonics warning...;)[12:40:19] <Storkme> :)[12:40:33] *** ChanServ sets mode: -o pr3d4t0r[12:40:35] <pr3d4t0r> Good night.[12:40:36] <Storkme> topic.append("No aolbionics please!");[12:40:42] <Storkme> :)[12:40:45] <pr3d4t0r> javabot: Watch the channel.[12:40:45] * javabot watches the channel for trolls and will call an op if you guys misbehave.[12:40:46] <Clackwell> "what are aolbonics?"[12:40:51] *** IseeIsee has quit IRC[12:40:53] <Clackwell> "who reads topics anyway..."[12:40:56] <Storkme> good point[12:41:03] <Storkme> fiends! they've won[12:41:06] <Baloogan_> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG @ RMI[12:41:20] <pr3d4t0r> . z Z[12:41:21] <Clackwell> Baloogan_: was that an aolbonic?[12:41:24] *** ^cool^tom^ has joined ##java[12:41:25] <Clackwell> bye pred[12:41:31] <pr3d4t0r> . z Z[12:41:38] <Storkme> bye pred[12:41:38] <Storkme> sleep well[12:41:45] <Clackwell> "and dream of me"[12:41:49] <^cool^tom^> Is there a rule that you should not use u?[12:41:52] <Storkme> i was going to say that[12:41:57] <Clackwell> ~aolbonics[12:41:58] <javabot> Clackwell, aolbonics is talking using numbers, or using single letters for you, are, you are, you're, etc. Examples are: Hey evry1; howz it goin?; how r u; ur teh suckz. Talking like this is frowned upon in ##java, and may result in you being silenced. See this for more detail: http://ars.userfriendly.org/cartoons/?id=20041201[12:41:59] <Storkme> ^cool^tom^: not officially, but it's frowned apon[12:42:26] <pr3d4t0r> ^cool^tom^: Officially you're hurting our eyeballs.[12:42:34] <Clackwell> being in an irc channel is like driving a car. it just isn't enough to just watch what you are doing, you have to watch what the others are doing, too.[12:42:34] <Storkme> sleep![12:42:42] <pr3d4t0r> ^cool^tom^: If you want to talk like that, go to AOL or Dalnet.[12:42:50] <^cool^tom^> Ok. I think there should be a link to the rules on the topic.[12:42:55] <Storkme> sweet, a whole network dedicated to aol'ers[12:43:06] <terence_> does keys in SortedMap have to be unqiue?[12:43:08] <Clackwell> ^cool^tom^: paying attention is the alternative. :)[12:43:21] <Clackwell> terence_: no idea. try it and see? possibly answered at google, too.[12:43:25] <pr3d4t0r> ^cool^tom^: In case you haven't noticed, only you and your buddy were using "u", etc.[12:43:32] <ernimril> terence_: keys in a map are always unique[12:43:49] <pr3d4t0r> ^cool^tom^: Most others at least pretend to be literate. Even the non-native English speakers.[12:43:50] <^cool^tom^> Noticed it after i got kicked.[12:43:58] <terence_> well i wopuld need a sorted list where items don't have to be key.. but mapped to any object[12:44:09] <Clackwell> ^cool^tom^: excellent, so you got the message. :)[12:44:13] <pr3d4t0r> ^cool^tom^: It's never too late. It would've sucked to find out after getting banned.[12:44:20] <ernimril> terence_: Map<SomeKey, List<SomeValue>>[12:44:24] <pr3d4t0r> Anyway...[12:44:28] <pr3d4t0r> Good night.[12:44:30] <pr3d4t0r> Z z .[12:44:31] <Clackwell> bye bye[12:44:36] <Storkme> go to sleep :p[12:44:50] <terence_> enmand: sorted![12:45:12] *** eythian has joined ##java[12:45:18] <eythian> join #eclipse[12:45:23] <eythian> oops :)[12:45:44] <terence_> id> weight sort ids descending from weight[12:46:03] <terence_> sorted set is also key[12:46:11] <ernimril> terence_: Map is an interface, you can use TreeMap if you want it to be sorted[12:46:17] <eythian> How do you find out the size of a file? the File class doesn't seem to have a method for it (to my surprise)[12:46:32] <ernimril> eythian: File.length()[12:46:40] <ernimril> eythian: not very hard to find...[12:46:50] <Storkme> i say otherwise[12:46:54] <Storkme> it's not that hard[12:46:55] <Storkme> i mean[12:46:59] <Storkme> it's not that easy*[12:47:19] <terence_> ernimril: again i onlöy can sort the keys and my weights can have same values![12:47:24] <ernimril> sun has always been confused about size/length, learn that and live with it[12:47:26] <eythian> doh. I don't know how I missed it. I guess I was looking for .size() or something[12:47:34] <ernimril> terence_: ?[12:48:02] <terence_> ernimril: the sorted map inertface sort the keys! not the values[12:48:04] <eythian> ernimril: yeah, ain't that the truth[12:48:35] <ernimril> terence_: so you want Map<KeyType, SortedList<Value>> or something like that?[12:48:42] <terence_> ernimril: and my weights- i want to be sorted are not unique[12:49:13] <terence_> i want a list where items are sorted descending by weight mapped to their ids[12:49:23] <ernimril> terence_: you are not making sense and I have to go and fix some lunch...[12:49:23] <terence_> but weights are to unique![12:49:29] <terence_> are not[12:50:09] <terence_> ernimril: it makes completly sense, yeah better eat stgh..[12:50:55] *** ^cool^tom^ has left ##java[12:58:39] *** Job1 has joined ##java[13:07:11] *** leahpar_on has joined ##java[13:08:33] <Storkme> can the switch statement be used with Strings ?[13:11:08] *** YD has quit IRC[13:11:48] <Baloogan_> What the hell does[13:11:49] <Baloogan_> java.rmi.UnmarshalException: error unmarshalling return; nested exception is:[13:11:49] <Baloogan_> java.net.MalformedURLException: no protocol: and[13:11:51] <Baloogan_> Mean?[13:11:57] <ocx32> is the update method of the observer class called automatically when notifyupdates on observable class is called?[13:12:32] <The_Vulture> Baloogan_: looks like you have a broken URL of some kind..[13:13:02] <Baloogan_> I don't have ANY urls.[13:13:05] <Baloogan_> In my program.[13:13:17] <Storkme> ~continue[13:13:18] <javabot> Storkme, continue is http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#6122[13:14:12] <Storkme> love you lots javabot[13:14:32] <The_Vulture> Storkme: in general you might be better off with the tutorials instead of (or in addition to) the JLS[13:14:57] <Storkme> it wasn't for me, for a friend[13:14:58] <|sToNe> if i want to get access mysql database from jsp page running under tomcat should i install mysql under tomcat root dir ?[13:15:16] <The_Vulture> |sToNe: doesn't matter where you install it.[13:15:52] <|sToNe> where im showing : url="jdbc:mysql://localhost:3306/own?autoReconnect=true" />[13:16:24] *** Tartaros has quit IRC[13:17:15] <|sToNe> where im showin thn how to connect to my sql database?[13:18:37] <|sToNe> i put a context under META-INF under root dir like this :[13:18:38] <|sToNe> <Context path="/ROOT" docBase="ROOT"[13:18:39] <|sToNe> debug="5" reloadable="true" crossContext="true">[13:18:39] <|sToNe> <Resource name="jdbc/testdata" auth="Container" type="javax.sql.DataSource"[13:19:31] <|sToNe> Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"[13:20:19] <|sToNe> i put the java connector under the server/common/lib[13:20:59] <|sToNe> wats wrong in there?[13:21:03] *** shad0wcat has joined ##java[13:22:04] *** cybereal has quit IRC[13:25:23] *** cordor has joined ##java[13:32:14] *** teralaser has joined ##java[13:35:23] <ocx32> whats the main advantages of using packages?[13:35:45] <ocx32> scalability?[13:36:29] <teralaser> namespace[13:36:39] <ocx32> what do you mean[13:36:56] <Baloogan_> FUCK[13:37:00] <Baloogan_> RMI[13:37:02] <teralaser> com.ocx32.myGraphics.setXY(...,...) is pretty unique[13:37:08] <Baloogan_> Any RMI gurus out there?[13:37:18] <Baloogan_> There is something GODDAMN SIMPLE I cannot do![13:37:30] <Baloogan_> AND I BLOODY NEED SOME HELP :([13:37:43] <The_Vulture> Baloogan_: no need to shout - have you actually got one simple example of RMI to work properly yet?[13:37:51] <The_Vulture> if not, I'd suggest you try Sun's worked tutorial example[13:37:54] <Baloogan_> The_Vulture: No![13:37:59] <Baloogan_> Including Sun's tut.[13:38:23] <The_Vulture> so, following Sun's tutorial, where did you get to and what happened?[13:38:37] <The_Vulture> (and I mean following it _exactly_, not following some of it with a different example, or something just slightly different)[13:39:06] <Baloogan_> Well, my problem is in the -D defines.[13:39:16] <Baloogan_> I just need a couple of pointers on them.[13:39:38] <The_Vulture> is the tutorial unclear on something?[13:40:21] <Baloogan_> Yes.[13:40:54] <The_Vulture> where exactly?[13:42:05] <Baloogan_> Argh nevermind. Too difficult to explain.[13:42:06] <Baloogan_> :([13:42:45] *** eeaaxx has quit IRC[13:42:49] <The_Vulture> out with it. You follow the instructions, at some point you do what you think they tell you to and then the result is somehow different from what is documented in the tutorial[13:43:03] <The_Vulture> where exactly does this occur. What do you see that's different from what the tutorial documents?[13:44:00] *** shad0wcat has quit IRC[13:45:02] *** [TartY] has joined ##java[13:45:36] *** Vspirit has quit IRC[13:45:52] *** synic has quit IRC[13:51:31] *** Baloogan_ has quit IRC[13:53:48] *** omay has joined ##java[13:59:10] *** horros has quit IRC[14:01:13] *** terence_ has quit IRC[14:03:59] *** bauerbob has quit IRC[14:06:24] *** |sToNe has quit IRC[14:10:47] *** Storkme is now known as Stork[14:21:28] *** [TartY] has quit IRC[14:22:25] *** Lorini has joined ##java[14:23:33] *** Lorini has left ##java[14:25:40] *** Kallistor has joined ##java[14:26:44] <Mc_Fly> How do I find the index of the higes value in my array? do I need to loop through it?[14:26:51] *** PPSD has joined ##java[14:26:53] <PPSD> hi[14:27:09] <PPSD> is there any way to create an array of arrays of int in java?[14:27:31] <ernimril> PPSD: yes...[14:27:37] <ernimril> ~tell PPSD about arrays[14:27:37] <javabot> PPSD, arrays is http://java.sun.com/tutorial/java/data/arrays.html[14:27:46] <ernimril> Mc_Fly: is your array sorted?[14:27:49] <PPSD> no[14:27:54] <PPSD> oh sry ;)[14:27:57] <Mc_Fly> ernimril: no[14:28:22] <PPSD> ernimril: will something like Array[] a = new Array[x]; work?[14:29:00] <NOthsouth> Can someone help me with that?[14:29:01] <NOthsouth> http://pastebin.com/402763[14:29:27] *** vvenk2004 has joined ##java[14:29:37] <ernimril> Mc_Fly: then you have to loop[14:29:49] <NOthsouth> the option 1.. show the Game started, and Invalid Option .. WHy???[14:30:07] <ernimril> NOthsouth: m is not == 2[14:30:13] *** jor has joined ##java[14:30:15] <ernimril> NOthsouth: so the else runs..[14:30:30] <The_Ball> weeeeee, the fruits of my labor is finished. http://wigen.net/ass2gui.png One question though, I have used gridbag layout and weighting for the for main squares, why can the first cell steal space from the two bottom ones when it has the same weight?[14:30:37] <NOthsouth> ernimril, HUM[14:30:41] <NOthsouth> great[14:30:44] <PPSD> use "else if (m==2)" instead of "if "..[14:30:52] <vvenk2004> hi everyone[14:31:04] <NOthsouth> PPSD, Yeh.. thx :D[14:31:08] <ernimril> NOthsouth: reread your if/else/else-if tutorial[14:31:12] <vvenk2004> i am using the java communications api , to read and write to and from my serial por[14:31:18] <vvenk2004> i am able to write fine[14:31:23] <NOthsouth> thx guys[14:31:25] <vvenk2004> and it also reads all the characters[14:31:27] <vvenk2004> however[14:31:33] <vvenk2004> i am getting blocks in between my characters[14:32:04] <vvenk2004> i am using the source code from the java sun site for SimpleRead[14:32:27] <vvenk2004> can someone please help me[14:36:14] *** veep has joined ##java[14:43:43] <The_Ball> has anybody experienced that using "ImageIcon CPUimage = new ImageIcon("6510.png");" skews gridbag layout?[14:43:59] *** PPSD has quit IRC[14:44:28] <NOthsouth> DId I always need a break; for get out a loop ?[14:44:46] <Epesh> NOthsouth: no[14:50:37] <eythian> Is there a nice way to save the state of part of my program, or should I just do it manually using the XML DocumentBuilder stuff? Serializable doesn't really suit what I want.[14:50:57] <The_Vulture> eythian: why doesn't it suit?[14:51:32] <eythian> because I want it to be robust across changes in the class.[14:52:07] <The_Vulture> Depends how robust you want it to be. You can actually use Serializable with your own logic for serializing/deserializing objects..[14:52:30] <The_Vulture> or you could use XMLEncoder, again giving you control over the serialisation process - depends on the API of the objects in question and how robust you need things to be[14:53:43] <eythian> hmm, that's true. The objects are pretty simple, its basically a handful of fields (at this stage). Writing to XML is good, too. I'll look into XMLEncoder. Is it not part of the normal DocumentBuilder stuff?[14:54:22] *** djib has joined ##java[14:54:26] <eythian> (which I've used before, but for reading/writing things that needed to XML)[14:54:37] <The_Vulture> No, it's a more specific XML system for serialization. Really you could probably work quite well with just plain Serializable. Just create your own serialVersionUIDs and override read/writeObject so as to write the state that you want to, rather than relying on the brittle defaults[14:56:30] <eythian> hmm. I'd rather use XML, just to give other programs access to it. Is XMLEncoder an almost-pluggable alternative to ObjectOutputStream (or whatever it's called)?[14:57:58] <The_Vulture> No, not really. It's too high level for that. You can write objects to it, but it's not a stream. I think you can pass it some arbitrary Writer to write to though.. maybe.[14:58:15] <The_Vulture> To customize it to support your own types you have to write PersistenceDelegates.[14:58:43] <The_Vulture> Simple bean-like objects with a default constructor and bean properties (get/set methods) will be handled by default, and there are standard delegates for most classes (containers and the like)[14:59:02] *** deedaw has joined ##java[14:59:10] <The_Vulture> PersistenceDelegates should in theory allow you to encode your objects with any Encoder but I think the only one that exists at the moment is XMLEncoder[14:59:12] <eythian> OK. I'll look into it, cheers.[14:59:21] <The_Vulture> (in theory someone could invent a binary Encoder of some kind, or other such things)[15:05:30] *** omay has joined ##java[15:08:04] * ricky_clarkson salutes The_Vulture.[15:09:15] <The_Vulture> g'day ricky_clarkson - I'm just about to head off to get some rest actually[15:09:19] <The_Vulture> how's things over your way?[15:09:32] *** grifis has joined ##java[15:12:03] <ricky_clarkson> In a word: cold.[15:12:22] *** djib has quit IRC[15:12:42] *** djib has joined ##java[15:12:43] <ricky_clarkson> Central heating broke, we're sat in the lounge near the gas fire.[15:12:55] <The_Vulture> right, it'd be getting a tad chilli over there I'd imagine. My step sister's actually back over there working somewhere in/near London[15:13:17] *** Baloogan has joined ##java[15:13:23] <The_Vulture> Bugger. Well huddle around, share body heat, etc. Don't die or anything[15:13:29] <ricky_clarkson> Probably doesn't help that I'm wearing shorts right now.[15:14:13] <The_Ball> why is the function Vector protected void removeRange(int fromIndex,[15:14:13] <The_Ball> int toIndex) protected? and can i get access to it?[15:14:20] <The_Vulture> hehe - no, perhaps not. I'm wearing hemp pants. Slightly too warm for some of the weather today, but they're nice and relaxed :)[15:14:32] <ricky_clarkson> The_Vulture: Use subList.[15:14:36] <The_Vulture> what ricky_clarkson said[15:14:38] <ricky_clarkson> The_Ball: Use subList.[15:14:39] <The_Vulture> except to The_Ball[15:14:46] <The_Ball> ah, thank you[15:15:30] <ricky_clarkson> Or remove(int) with a for loop, I suppose.[15:15:39] <The_Vulture> ick[15:15:43] <The_Vulture> on a Vector that'd be costly[15:15:43] <ricky_clarkson> I don't think List has a remove(int from,int to)[15:15:52] <The_Vulture> subList().clear() would be the best[15:16:10] <ricky_clarkson> Hah.[15:16:14] <ricky_clarkson> Would that work as expected?[15:16:18] <ricky_clarkson> "I expect so." ;)[15:16:36] *** omay has quit IRC[15:17:40] <The_Vulture> I'd bet some small sum that it would.[15:18:33] <The_Ball> why whould subList().clear() be the best?[15:19:04] *** diro has joined ##java[15:24:37] *** tezem has joined ##java[15:25:10] <tezem> What is the simplest way to filter html tags from a String?[15:25:31] *** YD has joined ##java[15:25:40] <ernimril> tezem: depends...[15:25:43] <The_Ball> Does this seem sane? if (trailLength != 0 && traveled.size() > trailLength) traveled = new Vector(traveled.subList(0, traveled.size() - trailLength));[15:25:51] <ernimril> tezem: get a html parser[15:25:51] <The_Ball> seems to create an empty list each time[15:27:03] <The_Vulture> The_Ball: How's about you print out the indecies..[15:28:01] <tezem> ernimril: I thought it should work with string.replaceAll("<.+>", ""); but it doesn't[15:28:31] <ernimril> tezem: depends on what you want to do, if you get html from the net then regexps will not be very good...[15:28:45] <The_Ball> The_Vulture, what do you mean?[15:28:52] <ernimril> tezem: if it is html from one page then you can sometimes use a regexp[15:29:27] <tezem> ernimril: Only one html file from any URL.[15:29:35] <The_Vulture> The_Ball: I mean if you find you are getting a zero-sized Vector, how's about yo uprint the value of "trailLength" and "traveled.size()" so you can see what's going on[15:29:46] <ernimril> tezem: any url?[15:29:58] *** gabb has joined ##java[15:30:24] <ernimril> tezem: you can try: replaceAll("<.*?>", "")[15:30:51] <ernimril> tezem: but that will not handle broken html very well, nor will it handle tags with parameters with '>' in them...[15:30:52] <tezem> ernimril: well it should be possible to put in one URL and then the contents without the tags should be written.[15:30:56] <The_Ball> The_Ball, a yes... must stop thinking "it HAS to be right"[15:30:58] <ernimril> tezem: and there are lots of both[15:31:18] <gabb> Hi, when implementing a own TableModel and create the JTable like = new JTable(tableModel); - how do I pass it the data as Object[][] ?[15:31:24] <tezem> ernimril: I see[15:31:41] <ernimril> tezem: + is greedy so your original will remove everything from the first '<' to the last '>'[15:32:22] <ernimril> tezem: the '?' make * or + non-greedy[15:32:56] <vvenk2004> hi[15:32:58] <ernimril> tezem: but still if you have to handle html from all over the net, you better get a html parser instead[15:33:05] <ernimril> ~tell tezem about html parser[15:33:06] <javabot> tezem, I guess the factoid 'html layout' might be appropriate:[15:33:08] <javabot> tezem, html layout is http://braindamage.org/htmllayoutdocs/[15:33:11] <vvenk2004> can anyone see me,[15:33:12] <ernimril> gah[15:33:22] <ernimril> vvenk2004: no[15:33:28] <vvenk2004> thanks[15:33:31] <The_Vulture> gabb: you pass the TableModel the Object[][]..[15:33:35] <ernimril> ~tell tezem about htmlparser[15:33:36] <javabot> tezem, htmlparser is http://htmlparser.sf.net - it parses HTML.[15:33:36] <vvenk2004> :)[15:33:37] <The_Vulture> then you pass the TableModel to the JTable[15:33:45] <vvenk2004> can you please help me erni[15:33:59] <gabb> The_Vulture, so I write a own constructor for that? Since I couldn't find a default method for it.[15:34:16] <ernimril> gabb: the jtable tutorial have examples that do just that[15:34:23] <ernimril> gabb: did you try reading it?[15:34:26] <The_Vulture> gabb: you wrote your own TableModel, it's up to you to keep track of the data in whatever way you see fit, pass it to the ctor, a method, construct it internally, whatever you want[15:34:37] <gabb> ernimril, yes - multiple times[15:34:57] <gabb> The_Vulture, ok thanks - was just wondering if there is some standard way or something[15:35:32] <tezem> ernimril: Stuff like "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">" remains with this filter. Is it because of the '.'?[15:35:52] <ernimril> tezem: ?[15:35:56] <ernimril> tezem: testcase?[15:36:33] *** The_Vulture has quit IRC[15:38:12] <tezem> ernimril: I just tried replaceAll("<.*?>", "") but the tag pasted above remains.[15:39:03] <ernimril> tezem: put a testcase in pastebin and I can look at it...[15:39:52] *** ulver has joined ##java[15:39:55] <ulver> wella all[15:40:28] <ulver> i'm setting this chan in ajoin[15:41:06] <tezem> ernimril: This was generated from the URL http://members.chello.at/ezechiel[15:42:14] <ernimril> tezem: That is not what I asked for...[15:42:28] <Stork> Error occurred during initialization of VM[15:42:28] <Stork> java.lang.OutOfMemoryError: unable to create new native thread[15:42:32] <ernimril> tezem: but as you can see the style data is in the text and you probably do not want that...[15:42:37] <Stork> any ideas anyone :\[15:42:55] <ernimril> Stork: use less memory or give the vm more memory[15:43:05] <Stork> how do i do that :)[15:43:12] <ernimril> ~tell tezem about testcase[15:43:12] <javabot> tezem, testcase is a minimal independently runnable program, which demonstrates the problem; see http://www.physci.org/codes/sscce.jsp for details and a HOWTO[15:43:50] <ernimril> Stork: profile and find out why you are using much memory or give the vm more memory with "java -Xmx512m ..." (for some value of 512)[15:44:15] <Stork> works now :|[15:44:23] <Stork> random thing[15:45:09] <tezem> ernimril: exaclty, I don't want this <! stuff in it but I thought "<.*?>" is able to filter this also?[15:45:41] <ernimril> tezem: it ought to remove that as well, but since I have not seen your code I can not say what error you make...[15:45:44] *** sublime has joined ##java[15:46:20] *** joaopaulo has joined ##java[15:47:23] <tezem> ernimril: http://www.rafb.net/paste/results/MwYu6D20.html[15:48:25] *** firestorm has joined ##java[15:48:33] *** Ulgar has quit IRC[15:48:33] *** firestorm has left ##java[15:49:00] *** depaulis has joined ##java[15:49:04] *** RedEyess has joined ##java[15:49:06] <RedEyess> Hello[15:49:12] <RedEyess> I am using images in a jar file[15:49:22] <Stork> getResourceAsStream[15:49:33] <RedEyess> I am using the code ".... getClass().getResource( "file.gif" )[15:49:37] <RedEyess> shouldn't that work?[15:49:48] <RedEyess> why getResourceAsStream?[15:50:05] <Stork> gives you a stream[15:50:10] <Stork> what are you doing with the image[15:50:14] <RedEyess> let me try my friend[15:50:38] <Stork> what are you doing with the image?[15:51:14] <ernimril> tezem: ok, you have multiline tags...[15:51:16] <RedEyess> using it for an icon[15:51:17] <RedEyess> that's it[15:51:24] <ernimril> tezem: and '.' does not match newline[15:51:28] <RedEyess> with the ImageIcon class[15:51:47] <Stork> hm[15:51:57] *** Fox_1_ has joined ##java[15:52:14] <Stork> aha[15:52:24] <depaulis> I am using Math.random do generate some integers, and then put them into a Set. I have 2 sets and both should contain integers with value range from 0,20 but when fill them up I get the same series on both. I am using iterator to go through them.[15:52:44] <tezem> ernimril: so activatin DOTALL[15:53:00] <Stork> RedEyess: methinks you should use getResourceAsStream, and read the image into a byte array[15:53:09] <Stork> then do new ImageIcon(byte[])[15:53:37] <Stork> it's a little long - winded, i'm not sure if there's a better way[15:53:38] <ernimril> tezem: something like that yes...[15:54:18] *** YD has quit IRC[15:54:22] <RedEyess> Stork: Let me see[15:55:51] <RedEyess> Ok[15:55:56] <RedEyess> I need some more help with this.[15:56:19] *** horros has joined ##java[15:56:32] <Stork> i'd also like to know how to do this[15:57:41] *** Cpt_Blackbeard has joined ##java[15:57:57] <grifis> why i cannot receive bytes correcly when using in.read(buffer, 0 , 100) ? my client sent '133' ... i received only '13'[15:58:10] <paulweb515_> ImageIcon takes a URL, what's wrong with getClass().getResource("file.gif")?[15:58:12] <Drone> View grifis's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8551[15:58:43] <Stork> oh[15:59:07] <grifis> in.read(buf,0,2); is ok ...when i'll try to in.read(buffer,0,100) again...i cannot receive correct data[15:59:10] <Stork> ImageIcon ii = new ImageIcon(this.getClass().getResource("File.gif"))); ?[15:59:36] <paulweb515_> yup[15:59:49] <tezem> ernimril: doesn't work. I think the problem is that I have to convert the pattern into a string and there I will loose the DOTALL.[15:59:52] <Stork> RedEyess ^^[16:00:01] <Stork> sorry for the bad advice :p[16:02:16] <RedEyess> Stork: I tried that[16:02:21] <Stork> oh?[16:02:26] <RedEyess> when I have images in a separate jar[16:02:33] <RedEyess> and for some reason it doesn't work[16:02:38] <Stork> no idea then :([16:03:08] <ernimril> tezem: doesn't work does not tell me what you tried to do now...[16:03:18] <paulweb515_> Are they in the same package as the class?[16:03:19] <RedEyess> getClass().getResource() works if I have files in a directory[16:03:25] <ernimril> tezem: for dotall to work you need to use pattern/matcher directly[16:03:26] <RedEyess> but not if I am importing the files from a jar file[16:03:37] <ernimril> tezem: but I still suggest that you drop the regexp approach[16:03:58] <paulweb515_> getClass().getResource() should work if you have the files in the same directory as the class, whether they are in a jar or not.[16:04:01] <ernimril> tezem: and get a real html parser instead, that way you will be able to remove html comments and scripts and styles[16:04:51] <tezem> ernimril: a lighter solution would be better. Don't want to import a hole parser API only for this.[16:06:23] <ernimril> tezem: define lighter, regexps are not light in cpu or memory[16:07:08] *** leahpar_on has quit IRC[16:07:14] <ernimril> tezem: the html parser/lexer I have in my proxy is ~1200 lines of code, it is fast and works on blocks...[16:07:23] <ernimril> tezem: it was written before regexps...[16:12:15] *** chippy has joined ##java[16:13:04] <ocx32> anyone familiar with Observer/Observable claases?[16:13:23] *** goon12 has joined ##java[16:13:42] *** Fox_1_ has quit IRC[16:15:46] <RedEyess> Stork[16:15:53] <Stork> yep?[16:16:11] <RedEyess> URL imageURL = getClass().getClassLoader().getResource( "file.gif" );[16:16:22] <RedEyess> Image image = ImageIO.read( imageURL );[16:16:28] *** maroffo has joined ##java[16:16:29] <Stork> that works?[16:16:30] <RedEyess> those two lines helped me out.[16:16:32] <RedEyess> yeah...[16:16:33] <RedEyess> crayz[16:16:35] <RedEyess> crazy[16:16:41] <Stork> doesn't make any sense to me :|[16:16:52] <Stork> oh well[16:17:06] <Stork> cool, i'll note that down[16:17:13] *** maroffo has left ##java[16:17:50] <tanq> ocx32: google it...[16:18:03] *** sublime has quit IRC[16:18:24][16:18:31] <ocx32> hard to understand[16:18:36] *** shad0wcat has joined ##java[16:18:40] <ernimril> grifis: different encodings?[16:18:46] <tanq> its like a publish subscribe pattern[16:19:57] <tanq> one class wants to know when something has changed in another. so when the other class gets updated it notifies all of the classes that want to know[16:20:16] <grifis> ernimril: it's a c client that send this string... but how can i force right encoding?[16:20:51] <tanq> ocx32: but you have to extend Observer and implement Observable in the correct classes[16:21:10] <tanq> i bet javaworld has something about this.[16:21:11] <ernimril> grifis: ask the c programs developer what encoding they send data in[16:21:20] <grifis> ok[16:21:32] <ernimril> grifis: then you open the stream with the right encoding (InputStreamReader)[16:21:35] <ocx32> my problem is that i have 2 frames, and i want one of the frame to update the other when i click on a certain button on the first frame[16:21:58] <ocx32> i am implementing observable in the frame i am clickin in and observer in the other[16:22:06] <ocx32> correct?[16:22:21] <ocx32> so that updates are sent to the observer[16:22:30] <pr3d4t0r> ocx32: That ought to work just fine.[16:22:42] <pr3d4t0r> ocx32: The corollary would be: don't make the frame itself the observer.[16:22:44] <ocx32> ok now my problem is in the update method[16:23:05] <pr3d4t0r> ocx32: The model for that frame should be the observer, and that should dispatch the events to the frame itself.[16:24:05] <ocx32> whats the alternative[16:24:12] <ocx32> if i dont implement observero nthe frame[16:24:16] *** chadwick has joined ##java[16:25:06] <ocx32> i understood the concept , but i am having dsifficulties implementing[16:25:06] <pr3d4t0r> ocx32: Unless your frame its trivial, it probably has a business object of some sort behind it that the frame's widgets display, right?[16:25:12] *** ulver has quit IRC[16:25:27] <pr3d4t0r> ocx32: So you make that business object the observer. That's all.[16:25:29] <ocx32> right[16:25:39] <chadwick> How can I preselect a row in JTable?[16:27:13] <pr3d4t0r> ocx32: If your secondary frame is just something like a progress bar, then you may get away with making it the observer.[16:28:31] <ocx32> i made the second frame an observer[16:28:40] *** omay has joined ##java[16:29:03] <ocx32> i am not able to have the update method work correctly[16:29:07] <ocx32> i am confused in implementing it[16:29:12] <pr3d4t0r> ocx32: Is the observable in frame A running on its own thread?[16:29:18] <ocx32> yes[16:29:23] <pr3d4t0r> ocx32: OKi.[16:29:40] <pr3d4t0r> ocx32: If it's not long, please put the observer in the pastebin; let me look at how you implemented.[16:29:47] <ocx32> k[16:30:42] <ocx32> http://pastebin.com/402933[16:31:46] <pr3d4t0r> ~tell ocx32 about pastebin[16:31:46] <javabot> ocx32, Paste your code, preferably a test case, any errors, and any other relevant information into the pastebin and tell us the URL: http://eugeneciurana.com/pastebin[16:31:56] *** goon12 has quit IRC[16:32:40] <pr3d4t0r> ocx32: What's obs supposed to be?[16:34:20] *** ocx32 has quit IRC[16:34:40] *** ocx32 has joined ##java[16:34:45] <ocx32> sorry dc[16:34:50] <ocx32> http://pastebin.com/402933+[16:34:53] <ocx32> http://pastebin.com/402933[16:35:22] <pr3d4t0r> ocx32: Yeah, I'm looking at it.[16:35:25] <ocx32> i know public void run is gibberish[16:35:29] <pr3d4t0r> ocx32: What's the obs object supposed to be?[16:36:38] <ocx32> BarCodeReaderEvent[16:36:38] *** ^^ulVer^^ has joined ##java[16:36:49] <pr3d4t0r> ocx32: OKi.[16:37:01] *** Bluelive has joined ##java[16:37:25] <ocx32> what are the classes exchanging[16:38:05] *** joaopaulo has left ##java[16:38:25] *** bogonflux has joined ##java[16:38:34] <Drone> View pr3d4t0r's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8552[16:38:43] * pr3d4t0r wants to smack ocx32 for using tabs instead of spaces.[16:38:56] <IMTheNachoMan> pr3d4t0r whats wrong with tabs?[16:39:00] <pr3d4t0r> ocx32: Look at the change I made. First, check if the object that sent the message is accurate.[16:39:07] *** omay has quit IRC[16:39:10] <pr3d4t0r> IMTheNachoMan: They don't display the same way across editors.[16:39:15] <IMTheNachoMan> true[16:39:48] <IMTheNachoMan> well i have my editors set to use spaces for tabs 8 or 4[16:39:57] <IMTheNachoMan> but sometimes tab is just faster when ur not using an edito[16:40:10] <pr3d4t0r> ocx32: I suspect that your event should be obj, not obs. obs should be the observable object.[16:40:17] *** ChanServ sets mode: +o pr3d4t0r[16:40:24] <IMTheNachoMan> oh oh[16:40:32] *** IMTheNachoMan was kicked by pr3d4t0r (No aolbonics.)[16:40:36] <pr3d4t0r> He, he, he...[16:40:37] *** IMTheNachoMan has joined ##java[16:40:42] * pr3d4t0r eyes IMTheNachoMan[16:40:44] *** ChanServ sets mode: -o pr3d4t0r[16:40:46] <ocx32> got an error compiling[16:40:55] *** ^^ulVer^^ has quit IRC[16:40:55] <pr3d4t0r> ocx32: What's the error?[16:40:58] <ocx32> CounterFrame.java:39: inconvertible types[16:40:59] <ocx32> found : java.util.Observable[16:40:59] <ocx32> required: BarCodeReaderEvent[16:40:59] <ocx32> if (obs instanceof BarCodeReaderEvent)[16:41:01] <ocx32> oups[16:41:03] *** ulver has joined ##java[16:41:19] <ocx32> oh wait[16:41:25] <pr3d4t0r> IMTheNachoMan: Any half arse editor lets you substitute tabs for spaces automagically, as you type.[16:41:39] <ocx32> ignore my previoius msg[16:41:51] <IMTheNachoMan> pr3d4t0r i know you have told me that before but you sould relly put that in the topic or somekinda rules or something[16:42:05] <IMTheNachoMan> cause otherwise its not fair tell people how to talk unless there ussing bad language[16:42:29] <IMTheNachoMan> although i dont agree with it i will abide by it, but u should put in rules[16:42:57] <pr3d4t0r> IMTheNachoMan: This is not about being fair or not.[16:43:12] <pr3d4t0r> IMTheNachoMan: IRC, by nature, isn't fair. Channels develop unique cultures.[16:43:13] <IMTheNachoMan> im pretty sure the owners freenode think it is[16:43:32] <pr3d4t0r> IMTheNachoMan: And you've been around for at least two years, so this isn't news to you.[16:43:39] <IMTheNachoMan> either way this arguemnt is rather stupid so im just gonna give in[16:43:41] <ocx32> CounterFrame.java:39: inconvertible types[16:43:42] <ocx32> found : java.util.Observable[16:43:42] <ocx32> required: BarCodeReaderEvent[16:43:46] <ocx32> got that error[16:43:56] <IMTheNachoMan> pr3d4t0r true but its not something i remember, this is the ONLY channel that doesnt like it[16:44:06] <pr3d4t0r> IMTheNachoMan: Feel free to bring this up to lilo or alindeman. alindeman is here, in channel, if you want to address that with him. He's one of the staff.[16:44:08] <IMTheNachoMan> and im not gonna change my life for one channel[16:44:17] <IMTheNachoMan> heh[16:44:20] <IMTheNachoMan> naw dont care nuff[16:44:22] <IMTheNachoMan> lifes to short[16:44:23] <pr3d4t0r> IMTheNachoMan: Well, feel free to leave any time.[16:44:28] <IMTheNachoMan> haha[16:44:32] <IMTheNachoMan> im not leaving[16:44:43] <IMTheNachoMan> but il shut up now[16:44:45] *** omay has joined ##java[16:44:48] <pr3d4t0r> IMTheNachoMan: Then please respect our culture.[16:44:48] *** omay has quit IRC[16:45:16] <IMTheNachoMan> hey anyone remember the name for some library a guy made using a layout manager, something botu percent cant remember[16:45:25] <pr3d4t0r> ocx32: Weird. What is your line 39 (in your editor)? I don't believe it matches the one in the pastebins.[16:45:33] <IMTheNachoMan> i had it bookmarked but xp kinda screwed it self up on my computer[16:45:35] *** omay has joined ##java[16:45:43] <ocx32> if (obs instanceof BarCodeReaderEvent)[16:46:44] <pr3d4t0r> ~tell IMTheNachoMan about percent[16:46:45] <javabot> IMTheNachoMan, I guess the factoid 'percent layout' might be appropriate:[16:46:46] <javabot> IMTheNachoMan, percent layout is http://lavender.cime.net/~ricky/percentlayout.html[16:46:50] <IMTheNachoMan> thx[16:46:56] <pr3d4t0r> IMTheNachoMan: You're welcome.[16:46:56] <Stork> thanks*[16:47:10] <pr3d4t0r> IMTheNachoMan: I'm backing up so lavender will be a bit slow to respond.[16:47:17] <Stork> predator, i thought you went to sleep[16:47:22] <pr3d4t0r> Stork: Never did.[16:47:26] <Stork> oh, why[16:47:36] <pr3d4t0r> Stork: I went for some food, then to dance for a couple of hours, then I just got back.[16:47:41] <pr3d4t0r> Stork: I don't know. I'm amped.[16:47:47] <Stork> fair enough :p[16:47:58] <pr3d4t0r> ocx32: Let me make a slight change.[16:48:16] <IMTheNachoMan> later guys[16:48:28] <Stork> this is so odd :\[16:48:42] <Stork> i keep getting OutOfMemory errors while compiling :\[16:48:55] <IMTheNachoMan> pr3d4t0r no i just needed to read something, but got it thx[16:48:56] <Stork> but running applications works fine[16:49:05] <pr3d4t0r> ocx32: Java 1.4 or Java 5? What are you using?[16:49:06] *** omay has quit IRC[16:49:10] <ocx32> 1.4[16:49:13] <IMTheNachoMan> cuase i made my own (wasnt allowed to use someone elsess for work) and i wanted to see something[16:49:14] <pr3d4t0r> ocx32: OKi.[16:49:39] <ocx32> pr3d4t0r: when updateObservers is called is an object sent to the obeserver run method?[16:49:49] <IMTheNachoMan> pr3d4t0r i was having that small resize problem too didnt know if urs had the same prob[16:49:54] <IMTheNachoMan> il have to figure out a way around that[16:49:56] <IMTheNachoMan> thx peace[16:51:39] <Drone> View pr3d4t0r's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8553[16:51:41] <pr3d4t0r> ocx32: ^^^[16:51:47] *** Flice has joined ##java[16:51:49] <Flice> hi[16:51:50] *** ChanServ sets mode: +o pr3d4t0r[16:51:56] *** pr3d4t0r sets mode: +b %IMTheNachoMan!*@*[16:52:02] *** ChanServ sets mode: -o pr3d4t0r[16:52:07] <pr3d4t0r> Flice: Good morning.[16:52:29] <Flice> how can I dynamically obtain the context root for my servlet?[16:52:35] <Flice> pr3d4t0r: hiya[16:52:49] <pr3d4t0r> ocx32: Let's find out what you're catching on input.[16:53:18] <Flice> if I have a url as following: http://bar.com/foo/myServlet, how can I obtain the "/foo" part in my servlet code?[16:53:37] *** tezem has quit IRC[16:53:59] <ocx32> ok it compiled fine[16:54:20] <pr3d4t0r> ocx32: Run it and tell us what it spits out :)[16:54:44] <pr3d4t0r> ocx32: Ensure that you run it from a console :)[16:55:33] <Stork> i get this error while compiling:[16:55:35] <mheath> Flice: I believe thats information included in the request[16:55:35] <Stork> Error occurred during initialization of VM[16:55:35] <Stork> java.lang.OutOfMemoryError: unable to create new native thread[16:56:35] <ocx32> 5min please[16:56:50] <Flice> mheath: but how can I extract it, if I don't know, which page exactly was requested?[16:57:28] <Flice> mheath: say, I can fetch the full URL for some resource that belongs to my app from the request, but I don't know, what is that resource called. doesn't help me much[16:57:47] *** ChanServ sets mode: +o pr3d4t0r[16:57:53] *** pr3d4t0r changes topic to "Welcome! API doc: http://java.sun.com/j2se/1.5.0/docs/api/index.html | tutorials: http://java.sun.com/docs/books/tutorial/reallybigindex.html | Don't flood; more than 2 lines: http://eugeneciurana.com | It's "you", not "u" - no aolbonics or you'll be silenced | Javascript questions belong in #web, not here. Cheers!"[16:58:17] *** ChanServ sets mode: -o pr3d4t0r[16:58:50] <mheath> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html[16:58:57] * Stork wonders what was channged[17:00:25] <mheath> Flice: what you're going to want to do is...[17:00:39] <mheath> HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest)[17:01:19] <ocx32> pr3d4t0r: here is my observable class[17:01:21] <ocx32> http://pastebin.com/402971[17:01:22] <mheath> That gives you a StringBuffer that includes the full URL[17:01:37] <mheath> (Don't ask me why it gives you a StringBuffer)[17:01:50] <ocx32> i want the first class to be notified when set() is called from this second class[17:02:00] <ocx32> setCode();[17:02:34] *** Cpt_Blackbeard has quit IRC[17:03:15] <Flice> mheath: thanks. going to try that[17:03:45] <mheath> Flice: the HttpServletRequest's getRequestURI() might work for you to[17:04:39] *** Wufei|sleep is now known as Chang_Wufei[17:06:21] *** Ulgar has joined ##java[17:06:29] <pr3d4t0r> ocx32: Wr... what was the output from the program with the changes I gave you?[17:06:44] <pr3d4t0r> ocx32: I want to see what both objects that you pass are (and you should too).[17:07:02] <pr3d4t0r> ocx32: So please run it; either your debugger or those println() methods will tell us what's up.[17:07:50] <ocx32> pr3d4t0r: ok i ran it[17:07:53] <ocx32> i am getting nothing[17:07:55] <ocx32> from console[17:08:37] <pr3d4t0r> ocx32: OKi, that means that update(); is not being dispatched at all.[17:08:45] <pr3d4t0r> ocx32: Let me look at your observable object now.[17:08:48] *** gelignite has joined ##java[17:09:50] <pr3d4t0r> ocx32: Bingo.[17:10:01] <pr3d4t0r> ocx32: You must register the second object with the first.[17:10:24] *** fandeholly has joined ##java[17:10:26] *** ramza3 has joined ##java[17:10:36] <pr3d4t0r> ocx32: Somewhere in your code you must have counterView = new CounterFrame();[17:10:49] <ocx32> counterview?[17:11:00] <ocx32> ok[17:11:11] <ocx32> bCounterFrame frame1 = new CounterFrame();[17:11:15] <ocx32> i have that in the main[17:11:18] *** Stork has quit IRC[17:11:53] <ocx32> no output[17:11:53] <pr3d4t0r> ocx32: You need to pass that to the Ugh, that looks ugly... but OKi, I'll go with frame1.[17:11:59] <The_Ball> line 21 -> http://rafb.net/paste/results/rQhByA87.html how can the drawImage affect the bufferedImage? when redrawing the traceImage the old trace is left in the backgroundImage[17:12:00] <pr3d4t0r> ocx32: Not yet.[17:12:09] <pr3d4t0r> ocx32: You need to register that with the observer.[17:12:15] <ocx32> http://pastebin.com/402971[17:12:21] <ocx32> this is my observable class[17:13:10] <ocx32> do you want me to create an BarCodeReaderEvent in the CounterFrame?[17:13:22] <pr3d4t0r> ocx32: Your design is wrong, by the way.[17:13:36] <pr3d4t0r> ocx32: You're creating those BarCodeReaderEvent objects when you need them, right?[17:13:55] *** Lars_G has joined ##java[17:13:58] <pr3d4t0r> ocx32: So if you get 10 reads, you create 10 of them, independent of one another.[17:13:58] <Lars_G> pr3d4t0r: ping[17:14:03] <pr3d4t0r> Lars_G: Busy.[17:14:04] <pr3d4t0r> Lars_G: Pong.[17:14:14] <Lars_G> pr3d4t0r: Just dropped to say I hope all your relatives and friends are ok.[17:14:33] <pr3d4t0r> ocx32: Whoever creates those BarCodeReaderEvent objects should be the observable object, not the event itself.[17:14:40] <pr3d4t0r> Lars_G: Thanks, yeah.[17:14:49] <Lars_G> pr3d4t0r: Good to hear, that's all for now.[17:14:53] <pr3d4t0r> Lars_G: They're about 3,000 km away from the hurricane area.[17:14:56] <pr3d4t0r> Lars_G: Cheers.[17:15:13] <ocx32> pr3d4t0r: so u mean i create a listener and i make it observable?[17:15:24] <pr3d4t0r> ocx32: Anyway, the observable object should somewhere say: this.addObserver(frame1);[17:15:33] * pr3d4t0r eyes ocx32 about the "u" shit.[17:15:43] <ocx32> you :)[17:15:46] <ocx32> sorry[17:16:08] <pr3d4t0r> ocx32: Yeah, maybe the listener. But most likely, the object that registers the listener.[17:16:20] <ocx32> i get it[17:16:29] <ocx32> and inside that listener i invoke a method to call the event[17:16:29] <pr3d4t0r> ocx32: Listeners are (gasp!) just observers. With another name.[17:16:30] <ocx32> s?[17:17:02] <pr3d4t0r> ocx32: Inside the "listener" you would say this.setChanged(); this.notifyObservers();[17:17:05] *** solus has left ##java[17:17:15] <pr3d4t0r> ocx32: Don't forget the this.setChanged(); :)[17:17:45] <pr3d4t0r> ocx32: And do us all a favour and don't do it on the listener but on the business object. This observable object should be at the same level as other event listeners.[17:18:21] <pr3d4t0r> ocx32: It's OKi to do it on the listener but that's a bit fugly ;)[17:18:39] *** geli has quit IRC[17:18:47] *** spektr has quit IRC[17:19:51] *** MindZEye has joined ##java[17:19:55] <ocx32> any nice paper explaining this concept?[17:20:00] <ocx32> pr3d4t0r[17:20:05] *** Twiun[Zzzzz] is now known as Twiun[17:20:37] <pr3d4t0r> ocx32: "Design Patterns" by Gamma et. al. Addison-Wesley.[17:20:55] <ocx32> i meanon the web[17:20:57] <ocx32> to read now[17:21:04] <pr3d4t0r> ocx32: Or read anything that describes the observer pattern, or the publish/subscribe pattern. Same thing, different name.[17:21:09] *** Stork has joined ##java[17:21:11] <pr3d4t0r> ocx32: http://google.com[17:21:18] <pr3d4t0r> Hrm...[17:21:21] <pr3d4t0r> ~observer[17:21:21] <javabot> pr3d4t0r, I have no idea what observer is.[17:21:26] <pr3d4t0r> javabot: You suck.[17:21:26] <javabot> A tool is only as good as its user. Tool.[17:22:13] <ocx32> ok thank you pr3d4t0r you have been really helpfull[17:22:14] <pr3d4t0r> ~bomb javabot[17:22:14] * javabot drops a humongous exploding turd on javabot[17:22:19] <pr3d4t0r> w00t![17:22:20] <Stork> woot!! i've got my nick done[17:22:34] * pr3d4t0r eyes Stork[17:22:41] <Stork> i registered the nick!![17:22:48] <pr3d4t0r> Stork: Yey![17:22:49] <Stork> no more trouble joing ##java :D[17:22:56] * Twiun applauds Stork[17:24:57] *** ThinkNOLA has joined ##java[17:25:31] <pr3d4t0r> javabot: Observer is <reply>The observer pattern (also known as publish/subscribe) is a powerful way of dispatching events from one to one or more objects (i.e. Swing/AWT listeners are implementations of this pattern). You can find more information at: http://sern.ucalgary.ca/courses/SENG/609.04/W98/lamsh/observerLib.html[17:25:32] <javabot> Okay, pr3d4t0r.[17:25:37] <pr3d4t0r> javabot: Thank you.[17:25:37] <javabot> You're welcome.[17:25:56] <pr3d4t0r> ocx32: You're welcome.[17:26:00] <pr3d4t0r> ocx32: Happy coding.[17:26:17] <Lars_G> pr3d4t0r: JavaBot is only as good as the men who feed it.[17:26:30] <Lars_G> ~patterns[17:26:30] <javabot> Lars_G, patterns is http://c2.com/cgi/wiki?PortlandPatternRepository[17:26:34] <pr3d4t0r> ocx32: You're in the right neighbourhood, you just haven't arrived at the right house. You'll have a eureka! moment soon and implement this.[17:26:40] <Lars_G> I think it's time I learn my patterns[17:26:49] <pr3d4t0r> Lars_G: He, he, he....[17:26:56] <pr3d4t0r> Lars_G: I haven't slept all night.[17:27:13] <pr3d4t0r> Lars_G: I even did the taco run and went dancing from 0500 until 0700 and I still can't sleep.[17:27:29] *** ramza3 has quit IRC[17:27:53] <Lars_G> pr3d4t0r: Mental or phisical agitation?[17:28:01] <pr3d4t0r> Lars_G: Excitement.[17:28:11] <Stork> :o[17:28:13] <Lars_G> pr3d4t0r: Por cierto, decidi no buscar mas tu aprovacion, :)[17:28:30] <Stork> pr3d4t0r: look at a vb tutorial, that should put you down pretty fast[17:29:01] <Lars_G> Stork: Worse, VBScript, if it doesn't sends you into a coma, it'll get you into a frenzy until you faint.[17:29:16] <Stork> nasty stuff is vb[17:29:46] <Lars_G> pr3d4t0r: Eres una buena persona y te aprecio como amistad, pero no debo buscar la aprobacion en los demas si no en mi mismo, y sobre todo, es peligroso buscar aprovacion en alguien tan elitista ;) no es nada personal.[17:29:57] <Lars_G> Stork: Yoda you speak like.[17:30:20] <Stork> thehil: i'm listening to Pretty fly for a jedi - weird al[17:30:24] <Stork> i mean[17:30:39] <Stork> thehil: weird al - pretty fly for a jedi[17:30:42] <Stork> what?![17:30:45] <Stork> heh, weird al - pretty fly for a jedi[17:31:00] <Stork> eurgh, auto complete[17:31:17] <Lars_G> pr3d4t0r: What's the excitement for btw?[17:32:14] <pr3d4t0r> Lars_G: I'm working on the marketing strategy for one of my novels.[17:32:26] *** ocx32 has quit IRC[17:32:28] <pr3d4t0r> Stork: He, he, he...[17:32:31] <pr3d4t0r> javabot: Stork++[17:32:32] <javabot> stork has a karma level of 1, pr3d4t0r[17:32:43] <pr3d4t0r> Lars_G: Thanks.[17:32:45] <Stork> :p[17:33:02] <pr3d4t0r> Stork: Only one? What's up with that?[17:33:05] <pr3d4t0r> javabot: Stork++[17:33:06] <javabot> stork has a karma level of 2, pr3d4t0r[17:33:19] <pr3d4t0r> ~karma pr3d4t0r[17:33:19] <javabot> pr3d4t0r, you have a karma level of 130.[17:33:20] <Lars_G> pr3d4t0r: for?[17:33:24] * pr3d4t0r flex0rs.[17:33:31] <Stork> lol[17:33:31] <pr3d4t0r> Lars_G: Huh?[17:33:44] <pr3d4t0r> 20 more points and I can cash my karma points in.[17:33:44] <Lars_G> pr3d4t0r: <pr3d4t0r> Lars_G: Thanks.[17:33:56] <Stork> pr3d4t0r: i guess it's because i used the nick storkme as well as stork :p[17:33:58] <Lars_G> Ah like google ads? ;)[17:34:06] <Stork> but that'll soon change![17:34:06] *** ThinkNOLA has quit IRC[17:34:10] <pr3d4t0r> Lars_G: Por no ser gallina y dejar de buscar la aprobación de los demás.[17:34:21] <pr3d4t0r> Lars_G: That, among many other things.[17:34:26] <Lars_G> pr3d4t0r: That might be a good idea, since you've getting high hits on the sushi howto, add a google ads to the howto, might get a little petty cash.[17:34:47] <pr3d4t0r> Lars_G: Marketing a book is an exciting project.[17:35:10] <Lars_G> pr3d4t0r: Hahaha, ok. De paso, lamento no estar mas activo en LogCop pero estoy muy full con trabajo, peor luego si voy a contribuir por que hay algunas cosas con las que no estoy de acuerdo.[17:35:11] <pr3d4t0r> Lars_G: I'm working on covers, layouts, author tour, etc.[17:35:22] <Lars_G> pr3d4t0r: So you're finally going thorough with the book? nice.[17:35:29] <pr3d4t0r> Lars_G: That's why we put it on SourceForge.[17:35:37] <pr3d4t0r> Lars_G: It'll be fun.[17:35:48] <Lars_G> pr3d4t0r: k[17:35:53] <Lars_G> pr3d4t0r: Add me as a devel ;)[17:36:10] <pr3d4t0r> Lars_G: Sure.[17:36:18] <pr3d4t0r> Lars_G: Let's get it approved firs.t[17:36:19] <Stork> might i ask what the book's about?[17:36:21] <pr3d4t0r> Er, first.[17:36:21] <Lars_G> sure[17:36:29] <Lars_G> Stork: Java 5[17:36:37] <Stork> cool :)[17:36:44] <pr3d4t0r> Stork: http://eugeneciurana.com/tesla_testament/[17:36:44] <Stork> i'll buy it :)[17:36:49] * pr3d4t0r smacks Lars_G[17:36:58] <Lars_G> Ahhh that one, sorry pr3d4t0r, tought it was the other book.[17:37:05] <pr3d4t0r> Stork: The Java 5 stuff will be out for free soon, under the Commons License.[17:37:22] <Lars_G> Stork: Sorry, that one is pr3d having flights of fancy[17:37:32] <pr3d4t0r> Lars_G: There's nothing in Java that can get me excited anymore, short of actually implementing changes in the language, JVM, and overall platform.[17:37:37] <Lars_G> pr3d4t0r: Soon(tm) ??[17:37:38] <The_Ball> any ideas for to transform a bufferedImage to 50% opaque?[17:37:56] <pr3d4t0r> Lars_G: Which will never happen. I heard that from Mark Reinhold himself.[17:38:09] <pr3d4t0r> Lars_G: I trolled the hell out of him when he came to visit :)[17:38:16] <Stork> heh[17:38:23] <Lars_G> hahaha[17:38:26] <pr3d4t0r> Lars_G: Ruby, on the other hand... gets me very, very, very excited :)[17:38:34] <Stork> evil!![17:38:36] * pr3d4t0r has a Ruby hard-on.[17:38:44] <ernimril> The_Ball: Graphics2D.setComposite?[17:38:50] <Lars_G> pr3d4t0r: Well I must admit the changes in Java are turning me off, I'm thinking of limiting my Java experience to J2ME and relatives.[17:39:01] <pr3d4t0r> Lars_G: Good move.[17:39:10] <Twiun> Lars_G: quit while you're ahead[17:39:16] <Lars_G> pr3d4t0r: Ruby's not bad. But personally on "exotic" languages I preffer Python, Icon, and I'm investigating Lua[17:39:39] <pr3d4t0r> Lars_G: Good, don't know, sucks.[17:39:49] <pr3d4t0r> Lars_G: Ruby is very well designed.[17:40:01] *** cored has joined ##java[17:40:06] <Lars_G> pr3d4t0r: Icon is pretty interesting but it's better suited for scientific applications.[17:40:06] <pr3d4t0r> cored![17:40:13] <pr3d4t0r> Lars_G: Ah.[17:40:23] <Lars_G> pr3d4t0r: Several mature developers have said the same. I'll wonder into it someday.[17:40:48] <Twiun> Lars_G: my only experience with Lua is as used in World of Warcraft (for their UI mods) and there seems to be a certain lack of tools[17:40:57] <Lars_G> pr3d4t0r: On the web side, I'm thinking that the tool is not all, so until I make a huge project I'll keep doign php, just code php in a good manner using proper OOP and patterns instead of sloppy coding.[17:41:26] <The_Ball> ernimril, ernimril not sure if that can do what i want, i want to fade a picture out 50% at a time, so first time i do it on the image everything goes 50% more dim, then i draw on the image and do the opaue thing again, leaving a shadowing trail of the previous drawn stuff[17:41:43] <Lars_G> pr3d4t0r: Give it a quick review, you might find it usefull in the future. http://www.cs.arizona.edu/icon/docs/ipd266.htm[17:41:49] *** Teckla has quit IRC[17:42:17] *** Teckla has joined ##java[17:42:20] <Lars_G> The_Ball: It's not clear whether you're looking to alter the alpha channel, or the palette.[17:42:34] <pr3d4t0r> Lars_G: OKi.[17:42:38] <pr3d4t0r> Lars_G: Remember that I don't do web shit.[17:42:54] <pr3d4t0r> Lars_G: One of the reasons I'm leaving Java is because it keeps getting polluted with more and more web shit.[17:42:55] <cored> lo pr3d4t0r[17:43:13] *** eythian has quit IRC[17:43:47] <Lars_G> pr3d4t0r: Web shit, is saddly how I earn my living. And conformign to web shit is good since web shit will stay for a long while, but what is being done to Java is not conforming, it's destruction.[17:43:50] <The_Ball> Lars_G, i would like to alter the alpha channel for the existing pixels before i draw on the image with zero alpha i guess[17:43:55] *** djib has quit IRC[17:44:25] <The_Ball> Lars_G, so can i draw a rectangle over the image to alter the alpha?[17:44:40] <ernimril> The_Ball: clear the background, set the composite, draw your background image, set the composite, draw your other stuff[17:44:45] <Lars_G> The_Ball: Ok, now it's clearer. Saddly I can't help you, since I only do web shit right now, and my swing/awt is so rusty that a cut is deadly.[17:45:20] *** doc|home has quit IRC[17:45:41] <Stork> lol[17:45:46] <Stork> nice expression :)[17:51:08] *** cordor has quit IRC[17:52:24] <Lars_G> Ahh nice ruby is a full OOL[17:55:12] <Lars_G> Hmmm the idea of modules is nice.[17:55:35] <Stork> are there many java-based jobs in the uk?[17:55:55] <Stork> i want a career as a programmer when i'm older, but my father keeps insiting it's a waste of time[17:57:14] *** Tartaros has joined ##java[17:57:51] <Teckla> Is it possible to have a "per-thread" System.in and System.out? For example, having thread #1's System.out and thread #2's System.out go to different output streams?[17:58:15] *** comradevik has joined ##java[17:59:56] <Lars_G> pr3d4t0r: So, if I do web shit on Ruby, will I send you into spasms?[18:00:41] <comradevik> hi, i wrote a program with a GUI.. is it easy to change it into an applet[18:01:32] <ernimril> comradevik: look at webstart[18:01:51] <ernimril> Teckla: no[18:02:06] <Teckla> comradevik: Take a peek at: http://mindprod.com/jgloss/applet.html#HYBRID[18:02:30] <The_Ball> ernimril, im sorry, im having a hard time getting my head around the composite stuff, what are the steps to make one bufferedImage 50% more opaque than it is now?[18:02:34] <Teckla> comradevik: Search for "Switch Hitter". It describes how to make a Java program both an applicatio and an applet.[18:02:46] <Teckla> ernimril: D'oh. That sucks. Thanks.[18:02:55] *** Flice has quit IRC[18:03:05] <ernimril> The_Ball: 50% more transparent you mean[18:03:09] <comradevik> Teckla: wow thanks you[18:03:23] <The_Ball> ernimril, yes, sorry it's 0200 here[18:03:39] <comradevik> i wrote a rather helpful physics program and i wanted to share it with my classmates[18:03:49] <Teckla> comradevik: You're welcome.[18:04:05] <ernimril> The_Ball: you either modify the images palette or filter it.[18:04:10] <Teckla> Unlike most Java developers, I still think applets have a lot of potential.[18:04:17] <ernimril> The_Ball: or you paint it on another image with a composite[18:05:00] *** chadwick has left ##java[18:05:22] <Stork> java.lang.reflect problems: http://rafb.net/paste/results/Tbs0Or97.html (it says: java.lang.NoSuchMethodException: Methods.Display(null))[18:06:41] <ernimril> Stork: that is not a testcase, nor do we get the exception[18:06:45] *** RedEyess has quit IRC[18:07:09] <Stork> what else would you like to know[18:07:59] <Stork> i thought it was testcase :\[18:08:02] <Stork> ~testcase[18:08:02] <javabot> Stork, testcase is a minimal independently runnable program, which demonstrates the problem; see http://www.physci.org/codes/sscce.jsp for details and a HOWTO[18:08:21] <ernimril> Stork: can I compile and run your code?[18:08:28] <Stork> good point[18:08:47] <ernimril> Stork: yes: then it may be a testcase, no: then it is no testcase[18:09:13] <ernimril> Stork: what are you trying to do?[18:09:28] <Stork> experiment with java.lang.reflect[18:09:40] <ernimril> Stork: what are you trying to do?[18:09:49] <Stork> so i can invoke methods by doing something like, Print(1)[18:10:03] <ernimril> ?[18:10:22] <Stork> experiment with java.lang.reflect[18:10:41] *** ulver has quit IRC[18:10:42] *** grifis has quit IRC[18:11:04] *** ulver has joined ##java[18:11:21] <The_Ball> ernimril, so are you saying it's possible to make a image more transparent by painting a blank 100% transparent picture on top of it with composite?[18:11:25] *** doc|home has joined ##java[18:11:38] <ernimril> The_Ball: no[18:11:51] <ernimril> The_Ball: an image that is 100% transparent is pointless to paint[18:12:05] <ernimril> The_Ball: because you will not see any difference[18:12:45] *** comradevik has left ##java[18:13:06] <The_Ball> doh. that's my problem, because i need the picture that im trying to make more transparent to be completely transparent except a few lines[18:13:46] <ernimril> The_Ball: you are not making sense...[18:14:03] *** shad0wcat has quit IRC[18:14:27] <ernimril> The_Ball: take a few steps back and tell us more about what you try to do..[18:15:07] <ernimril> The_Ball: a picture in memory is no good by itself, you either paint it on a component or write an image to disk...[18:15:29] *** ulver has quit IRC[18:15:30] <The_Ball> if you look at this image: http://wigen.net/ass2gui.png the yellow lines are stored in a bufferedImage[18:16:26] <The_Ball> and i only draw the last three lines in traceImage, then I paint that on top of traceShadow, and I want traceShadow to fade out as thee trace continues[18:16:38] <ernimril> The_Ball: seems that I can not connect to that site[18:16:42] <Lars_G> Ass 2 gui?[18:16:44] <The_Ball> so the forth line will be 50% transparent, then the fith is 75% transparent[18:16:52] *** diro has quit IRC[18:17:37] <Stork> ernimril: here's my testcase: http://rafb.net/paste/results/PXdEQZ44.html[18:18:24] <The_Ball> ernimril, really? what error do you get? that site receives hits as we speak[18:18:58] <The_Ball> Lars_G, assignment two gui[18:19:00] <ernimril> The_Ball: resolve fails[18:19:36] <The_Ball> ernimril, thats weird, it's hn.org but this is it http://84.234.148.2/ass2gui.png[18:19:51] <ernimril> The_Ball: hmmm, I got it now (using the name)[18:20:59] <The_Ball> did i manage to explain what im trying to do?[18:21:51] *** |sToNe has joined ##java[18:22:00] <ernimril> The_Ball: are only the yellow lines on the image? not the grid?[18:22:46] <The_Ball> ernimril, the grid are stored in bacgroundImage, the three yellow lines in traceImage and the rest of the yellow lines are painted on traceShadowImage, but they do not fade out[18:24:02] <The_Ball> the code might help http://rafb.net/paste/results/SE9rNt47.html[18:24:45] <Stork> My java.lang.reflect troubles: http://rafb.net/paste/results/duQxTR53.html[18:26:01] <ernimril> Stork: args[i] = cl; at the end of the for loop[18:26:15] <Stork> rofl!!![18:26:17] <Lars_G> http://www.thedailywtf.com/forums/47608/ShowPost.aspx[18:26:22] <Stork> i can't believe i forgot that!!!![18:26:40] <ernimril> The_Ball: 1) swing is already double buffered. Are you sure you want to double buffer it more?[18:26:49] <Stork> thanks ernimril![18:28:02] <The_Ball> ernimril, this is my first swing image experience so i have no idea, i probably don't. but i would like to not have to regenerate the background for each movement of the disk drive head, which is drawn on the image[18:28:18] <ernimril> The_Ball: 1) I would draw the yellow lines on g2 directly, using correct composite, instead of drawing them on an image and then blitting the image[18:28:53] <Baloogan> Is there anything else than RMI that does RMI like things?[18:29:19] <ernimril> Baloogan: lots of things, specify more what you want...[18:29:47] <ernimril> Baloogan: Corba might be what you want, if you talk to different systems written in java/C/C++/<whatever>[18:29:52] <Baloogan> I want to call methods remotly?[18:29:57] <Baloogan> And send data around[18:30:05] <Baloogan> without fucking around with packets[18:30:07] <Baloogan> and such[18:30:34] <horros> SOAP?[18:30:40] <Baloogan> ~SOAP[18:30:40] <javabot> Baloogan, SOAP is SOAP (Simple Object Access Protocol) is a protocol standard managed by W3C. Microsoft, IBM and Apache have all implemented it. SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol[18:30:47] <Baloogan> Ooooooooooooh.[18:30:52] <The_Ball> ernimril, ok, would that allow me to draw the three latest yellow lines and let the other lines "fade" out?[18:30:57] <ernimril> but there is nothing simple about it anymore...[18:31:04] *** Gavrila has joined ##java[18:31:10] <ernimril> The_Ball: tias[18:32:40] *** chippy has quit IRC[18:32:51] <BULLE> Baloogan: RMI/SOAP/CORBA[18:32:57] <Baloogan> Thats it?[18:33:02] <Baloogan> ~CORBA[18:33:02] <javabot> Baloogan, CORBA is Common Object Request Broker Architecture. www.omg.org[18:33:15] *** chippy has joined ##java[18:33:26] <The_Ball> ernimril, ok, T?as is a Canarian municipality, that's probably not what you ment, what does it mean?[18:33:30] <BULLE> Baloogan: SOAP is a pita, basicly, there is no small free client/server library to use, all seem to focus on pretty big stuff, so the server side wants a servlet engine etc[18:33:51] <BULLE> Baloogan: or, pita was not the right word, i guess, it all depends on what you want[18:33:54] <Baloogan> I want something simple.[18:34:05] <Baloogan> RMI made me cry and lose 12 hours of my life.[18:34:05] <BULLE> Baloogan: its pretty nice for kind of classical lightweight client, big server, setup[18:34:10] <BULLE> Baloogan: why ?[18:34:10] *** Lars_G has quit IRC[18:34:23] <Baloogan> BULLE: Wierd ass java.rmi.UnmarshalException errors[18:34:43] <BULLE> Baloogan: RMI is so extremely easy to use, its just about extending the right interface for the class, and then one or two lines to push the interface to the registry[18:34:52] <Baloogan> And I hate the rmiregistry[18:34:55] <Baloogan> program[18:35:14] <BULLE> Baloogan: well, you will need some way of finding the other side of the comunication you know[18:37:17] <Baloogan> Does SOAP and COBRA have shit like rmiregistry?[18:37:30] <Baloogan> Do I need to run a program in the background?[18:38:04] <BULLE> Baloogan: you dont need that for rmi either , as i said, you just need some way for program A to find program B[18:38:14] <BULLE> Baloogan: but the rmigregistry simplifies this a lot[18:38:21] <BULLE> Baloogan: corba makes use of a similar thing, called orbd[18:38:28] <Baloogan> Well fuck corba then.[18:38:48] <BULLE> Baloogan: the SOAP stuff that is around, relies on a servlet container, so thats an external program aswell[18:38:58] <Baloogan> Well fuck[18:39:15] <Baloogan> So I will need to write some packet shit :([18:39:34] <BULLE> just serialize some standardised object and push it down a socket ?[18:39:40] <Baloogan> Yes.[18:39:41] <BULLE> it isnt that hard you know[18:39:45] <Baloogan> Packet shit. :([18:39:59] <BULLE> or just use rmi, its most likely much easier[18:42:21] <Baloogan> RMI gave me errors when I followed the tutorial directly[18:47:19] *** vvenk2004 has quit IRC[18:47:52] *** Coffman has joined ##java[18:49:05] <Coffman> hi, why this work : if (myvar.equals("hi")) and this dont work : if (myvar=="hi") ??[18:49:28] *** tbfg has joined ##java[18:49:43] *** noDLL has joined ##java[18:50:07] <tbfg> java.net.URL can resolve http:// but no file:// what could be the problem ?[18:50:14] <paulweb515_> ~identity[18:50:14] <javabot> paulweb515_, I have no idea what identity is.[18:50:43] <noDLL> hi, does somebody knows if exists a mozilla plugin for java 1.6?[18:50:47] <paulweb515_> Coffman: .equals() is equality and == is identity[18:51:01] <ernimril> noDLL: java 1.6 is not out yet...[18:51:34] <tbfg> noDLL 1.5 plugins exists[18:51:35] <ernimril> Coffman: both works, but they may not do what you want..[18:51:45] <noDLL> well it has early access releases (snapshots) and the problem is that i have problems running java 1.5[18:52:17] <ernimril> noDLL: the 1.6 early access most probably have a plugin in it that you can use...[18:52:33] <ernimril> noDLL: what problem do you have with 1.5 that you hope is fixed in 1.6?[18:54:08] <noDLL> ernimril: im using e17 as my default WM, and when compilled as a 64bit app java cant run if it use any object from awt or swing libs[18:54:26] <noDLL> i have tested with java 1.6 and it works[18:54:43] <noDLL> the bug is not 100% solved but it runs at least[18:55:01] *** tezem has joined ##java[18:55:25] <ernimril> noDLL: ok..[18:55:33] <ernimril> noDLL: what does e17 have to do with it?[18:55:55] <Coffman> paulweb515_, idont understand the difference[18:56:20] <noDLL> i dont know exactly what is the problem but it has something to do with the way sun's jvm try to guess what WM is running[18:56:34] <Coffman> i have a string with value "hi" , and equals works nice , but == does not work[18:56:36] *** miketech has joined ##java[18:56:38] <miketech> Hi[18:56:50] *** keyhack has joined ##java[18:56:53] <keyhack> pr3d4t0r: :-)[18:56:56] <tezem> I have a ArrayList<E> in my class and get it from a InputStream. Therefore I have to cast it with (ArrayList) but I get Warnings because of the Generic Type. (ArrayList<E>) results also in a warning. What can i do?[18:57:23] <Baloogan> Can someone name a good networking wrapper?[18:57:36] *** depaulis has quit IRC[18:57:36] <ernimril> Coffman: what do you mean that it does not work? equals and == are not the same thing, they do different checks[18:57:42] <noDLL> ernimril: when it try to guess what WM is running, and I'm running e17 it returns a nullpointerexception[18:57:44] <Baloogan> So I don't need to deal with sockets and suchs?[18:57:54] <miketech> I wanna have a string array as class constants. i tried it that way:[18:57:57] <noDLL> which makes jvm to end[18:57:57] <miketech> public final static String[] ALL_ROLES = {"2", "3"} this is working, but in my program i need arrayLists.[18:58:02] <Baloogan> Muli perople using one port[18:58:03] <paulweb515_> String h1 = new String("hi"); String h2 = new String("hi"); ... h1.equals(h2) is true, h1==h2 is false[18:58:06] <ernimril> tezem: no easy way around it...[18:58:18] <miketech> How can i do static constants with arrayLists?[18:58:20] <ernimril> paulweb515_: that is correct behaviour[18:58:29] <miketech> Or how can i cast the string[] to arrayList?[18:58:37] *** Manny has quit IRC[18:58:42] <paulweb515_> Like ernimril said, they do different things[18:59:10] <Coffman> paulweb515_, ok and why ? ... i dont understand why ?[18:59:11] <ernimril> paulweb515_: == checks that the objects are the same object, .equals checks that the objects have the same value[18:59:42] <paulweb515_> ernimril: I know, I was trying to give a concrete example for Coffman :-)[18:59:59] <ernimril> paulweb515_: ops, sorry, that was for Coffman[19:00:02] <Coffman> thanks .... now i think i understand it[19:00:26] <Coffman> and how can i do to make the 2 objets the same object ?[19:00:33] <ernimril> Coffman: and in java you should not do 'new String("hi");' you should just use the String '"hi"'[19:00:36] <Coffman> its for curiosity on the use of "=="[19:01:01] <ernimril> Coffman: "String s1 = "hi"; String s2 = s1; "[19:01:21] <Coffman> ahh ok, i understand ;) thanks a lot[19:01:31] <ernimril> Coffman: are you used to C++?[19:01:39] <tezem> ernimril: why there is no easy way? It must work somehow.[19:02:05] <Coffman> ernimril, yes on the past i use c++ , but long time ago ;)[19:02:06] <ernimril> tezem: read each object by itself, get a List and get all objects and add to your list...[19:02:10] *** miketech has left ##java[19:03:00] <ernimril> Coffman: then you can note that in java you pass around references[19:03:48] <keyhack> Kinda odd, javax.servlet.Filter doesn't exist[19:10:02] *** Tubbi3 has joined ##java[19:10:34] <tezem> ernimril: I'm not sure If I understood you right but I made a second list und go through this list to add each element to the generic list. But then I get the Warning on casting the object in the add to the generic list -> Type safety: The cast from Object to E is actually checking against the erased type Serializable[19:11:45] *** terence_ has joined ##java[19:14:20] <tezem> ernimril: When I'm serious I don't understant the meaning of the warning. Why is Serializable erased?[19:14:34] <ernimril> tezem: that is the way generics work..[19:15:24] <Drone> View ernimril's post at: http://eugeneciurana.com/pastebin/pastebin.php?show=8554[19:15:34] <ernimril> tezem: ^^that works for me without errors[19:15:46] <ernimril> s/errors/warnings/[19:17:50] <tezem> ernimril: yes thats also my second try but I still get warnings. I think there is no way to get around it with the current implementation of generics in Java[19:19:01] *** omoore has quit IRC[19:19:21] *** pavlicek has joined ##java[19:20:09] <ernimril> tezem: @SuppressWarnings[19:20:22] <ernimril> tezem: but that works in 1.6 and eclipse only[19:21:08] <tezem> ernimril: ok thx very much[19:21:12] <tezem> bye[19:21:18] *** tezem has quit IRC[19:23:32] *** franl has joined ##java[19:28:13] *** joered has joined ##java[19:28:18] *** ulver has joined ##java[19:28:35] <ulver> wella all![19:29:00] <pr3d4t0r> Hello again.[19:29:27] <ulver> we pr3d4t0r[19:29:50] * pr3d4t0r sniffs ulver[19:29:58] <ulver> mmm[19:30:17] * ulver go to have a shower[19:30:22] * pr3d4t0r doesn't recognize the foreign scent.[19:30:29] <Drone> View tbfg's post at: http://www.eugeneciurana.com/pastebin/pastebin.php?show=8555[19:30:44] <tbfg> any ideas to above backtrace ?[19:31:02] <ulver> gh![19:33:33] *** terence_ has quit IRC[19:36:58] *** CrewdenX has joined ##java[19:37:26] *** cored has quit IRC[19:37:40] <keyhack> pr3d4t0r: Hey[19:50:16] *** shyfx has joined ##java[19:50:56] *** Bevin has quit IRC[19:51:27] <Baloogan> Could someone send me a simple project using RMI that _works_?[19:51:39] <Baloogan> I've copied tutorials and examples word for word and they don't work.[19:51:55] *** cowbud has joined ##java[19:51:55] <shyfx> the java.sun.com tutorials?[19:52:00] <Baloogan> I get errors.[19:52:10] <Baloogan> java.rmi.UnmarshalException[19:52:17] <Baloogan> On the client connecting to the server.[19:54:18] *** Ulgar has quit IRC[19:54:43] *** Tirsleep is now known as Tirlasmisu[19:55:04] <cowbud> what is the best way to go for a sort on insert tree in java?[19:56:19] <ernimril> cowbud: ?[19:56:40] *** Tubbi3 has quit IRC[19:57:25] <cowbud> ernimril: is there a way I can say insert(obj,number) where the number decides in the tree where it is inserted depending on the data? so if I have a tree with 1 2 4 6 and I insert three next time I traverse it will be in 1 2 3 4 order?[19:58:31] <ernimril> cowbud: building a sorted tree is standard algorithms, check any algorithm/data structures book[19:59:09] <shyfx> cowbud: just used a SortedTree or some shit?[19:59:42] <shyfx> TreeSet sorry[20:00:04] <shyfx> or TreeMap for mapped key->value pairs[20:00:43] <cowbud> thanks ill look around[20:00:48] <cowbud> in the documentation that is..[20:02:33] <shyfx> http://java.sun.com/docs/books/tutorial/collections/ that covers it[20:02:47] <shyfx> Tree(Set|Map) you just instantiate it like[20:03:00] <shyfx> TreeMap<KeyClass, ValueClass>[20:03:11] <shyfx> then just insert willy nilly, and it will be in order[20:04:17] *** diro has joined ##java[20:10:11] <Cow_woC> hi[20:10:12] <Cow_woC> If I create a custom <generator> and it produces an ID which is already in use, will Hibernate request a new ID from the generator or will it die horribly?[20:10:25] *** poiuyt has joined ##java[20:11:14] *** xsross has joined ##java[20:11:39] <shyfx> How is Hibernate?[20:11:49] *** yoda- has joined ##java[20:12:03] <Cow_woC> How = What?[20:12:15] <Cow_woC> ~hibernate[20:12:16] <javabot> Cow_woC, hibernate is a nice ORM [see orm] tool and can be found at http://www.hibernate.org/ and #hibernate[20:13:39] <shyfx> I know but is it any good, I never used something of it's natre yet but have been meaning to give one a try[20:14:11] *** poiuyt has left ##java[20:16:37] <Cow_woC> shyfx: I've had quite a bit of bad experiences with it, but it's one of the better options at there[20:16:47] *** yoda- has quit IRC[20:16:50] <Cow_woC> there doesn't seem to be a really good ORM[20:17:25] <shyfx> while not really an ORM, I have looked at Ozone[20:17:36] <shyfx> that seems nice[20:20:32] <shyfx> anyway adios@![20:20:33] *** shyfx has quit IRC[20:21:05] *** xsross has quit IRC[20:22:49] <Epesh> ORMs are really hard to do well, because they're always written for specific cases[20:24:43] *** Stork has quit IRC[20:24:53] <BULLE> Epesh: only somewhat sane thing i have seen is Objectivity[20:25:06] <BULLE> argh, no, its not an ORM, sorry[20:25:13] <Epesh> BULLE: I haven't heard of that myself.[20:25:13] <BULLE> its a pure objectified thingy[20:25:27] <Epesh> Lots of ORMs are "sane" but they are, like I said, written for specific cases.[20:26:10] <Epesh> and it's fairly easy to step outside of the boxes they expect. There's nothing really wrong with that, although IMO users should be aware of their weaknesses.[20:26:27] <Cow_woC> Epesh: can you help with Hibernate custom generators?[20:26:37] <Epesh> Cow_woC: not right now.[20:26:42] <Cow_woC> :([20:26:42] <Cow_woC> k[20:26:52] <Epesh> I'm not actually here, I'm off in about five seconds.[20:27:15] <Cow_woC> just a simple question[20:27:26] <Cow_woC> if my generator returns an ID which already exists, will Hibernate ask me for a new one?[20:27:35] <Cow_woC> or will it try inserting with a preexisting ID and die horribly?[20:27:47] <Epesh> dunno, probably die horribly.[20:27:57] <Cow_woC> ok, thanks[20:29:32] *** OleMoudi has quit IRC[20:29:39] *** OleMoudi has joined ##java[20:32:50] <keyhack> What is usually the best way to merge two arrays of your custom type? ie, I have multiple AlarmSet[] objects, and I need to merge them into one AlarmSet[]. (Side note, this is restricted by XSD, and I cannot use ArrayList or Vector, etc as a final object)[20:33:00] <keyhack> Just looking to see what some experienced Java developers recommend[20:33:37] <Garibaldi> make the new array the appropriate size and use System.arraycopy twice[20:42:37] *** leahpar_on has joined ##java[20:43:25] *** asac_ has joined ##java[20:45:16] *** Honk^away has quit IRC[20:46:01] *** Beached has joined ##java[20:46:57] *** hashman has quit IRC[20:47:49] *** Honk^away has joined ##java[20:49:13] *** hzsp has joined ##java[20:50:42] *** |Agent has quit IRC[20:51:08] *** FaeLLe has joined ##java[20:51:31] *** spyromus has joined ##java[20:51:35] <spyromus> hi[20:53:14] <hzsp> lo[20:53:29] <The_Ball> ernimril, I decied to redo the trace drawing function and have that use the alpha channel, this is pretty close to what i wanted it to do: http://84.234.148.2/ass2gui-rev2.png[20:54:19] <spyromus> The_Ball, still fighting with transparence?[20:54:21] <spyromus> :)[20:54:35] <The_Ball> spyromus, yeah i had to give up[20:54:51] <spyromus> The_Ball, why? something really complex?[20:55:12] <hzsp> oh, pwetty[20:55:28] *** asac has quit IRC[20:55:28] *** asac_ is now known as asac[20:56:17] <The_Ball> spyromus, probably not, just trying to make a transparent image more transparent, like the trail you can see in that gui, that was stored in a bufferedimage that i tried to draw on and make more transparent for each pass, so it would create a wanishing trail[20:57:14] <spyromus> The_Ball, so what's the problem? Why give up?[20:58:07] <spyromus> The_Ball, btw, go into private if you wish.[21:07:31] *** solus has joined ##java[21:08:47] *** zackk has quit IRC[21:09:17] *** kasper has quit IRC[21:13:43] *** DemisM has joined ##java[21:14:51] <DemisM> I have to implement a sparsepolynomial class and I'm told to create a seperate class for the degree and coefficients should this class be within my SparsePolynomial class or outside?[21:22:35] <ernimril> DemisM: yes[21:22:47] <DemisM> yes?[21:22:52] <ernimril> DemisM: why do you need a separate class?[21:23:06] <DemisM> well he said each term should be discrete[21:23:25] <ernimril> DemisM: use a Map<Integer, Double>. (degree, coefficient)[21:23:55] <DemisM> coefficients are integers :)[21:23:56] *** The_Ball has left ##java[21:23:59] <ernimril> DemisM: but if you want a separate class you can put it either inside or outside your class, it does not really matter[21:24:07] <DemisM> use discrete objects to represent each term[21:24:34] <ernimril> DemisM: homework?[21:24:46] <DemisM> I'm just wondering in general when you create abstract data types should they be inside outside[21:25:12] <ernimril> DemisM: and the answer is "yes either inside or outside", depends on the situation.[21:25:25] <ernimril> DemisM: you probably want an interface on the outside[21:26:40] *** pavlicek has quit IRC[21:27:11] <spyromus> And if you don't need them in other places, except for your main class, it will work good as inner static class (inside). :)[21:28:09] *** spyromus has left ##java[21:28:48] <hzsp> the nesting of classes is determined by your belly button, clearly[21:30:09] *** hatOFF has joined ##java[21:30:23] *** cybereal has joined ##java[21:34:18] *** Ulgar has joined ##java[21:34:34] *** zackk has joined ##java[21:34:37] *** Kallistor has quit IRC[21:37:14] *** chippy has quit IRC[21:42:01] *** franl has quit IRC[21:42:36] <snooplsm> in order to post an image file, i have it buffered but how do i use io, as to where it is a file in memory[21:43:00] *** IseeIsee has joined ##java[21:43:30] <IseeIsee> I'm using the intersects method of the Rectangle class, but I'm having some problems, its not returning me true as soon as my rectangle hit each other ?[21:43:34] *** menace has joined ##java[21:43:45] <IseeIsee> one of the rectangle is fixed on the JPanel, the other Rectangle is moved with the keyboard[21:43:56] *** |sToNe has quit IRC[21:46:28] <IseeIsee> any idea what can be the problem ?[21:46:58] <ernimril> snooplsm: ?[21:47:04] <Trixsey|Laptop> Anyone got time to look at an UML I made?[21:47:07] <Trixsey|Laptop> See if its ok?[21:47:12] <ernimril> IseeIsee: you do something buggy?[21:47:45] <IseeIsee> well I don't know where the problem[21:48:04] *** bpalmer has joined ##java[21:48:55] <Trixsey|Laptop> http://www.animania.nu/uml_test.jpg[21:48:59] <Trixsey|Laptop> is this uml correct?[21:49:04] <Trixsey|Laptop> or am I stupid?[21:49:08] <Trixsey|Laptop> does it look crappy or something?[21:50:01] <hzsp> och![21:50:06] <hzsp> my eyes are bleeding[21:50:09] <Trixsey|Laptop> hahahhahaha[21:50:10] <snooplsm> ernimril, i want to use a java program to post an image of which i have created.[21:50:19] <snooplsm> how would i allow for that image to be posted?[21:50:35] <hzsp> Trixsey|Laptop: looks okay, except you need to move <<creates>> and others onto the line itself[21:50:47] <hzsp> Trixsey|Laptop: not inside the boxes[21:50:57] <hzsp> then lose the << >> brackets[21:51:08] <bpalmer> snooplsm: posted?[21:51:14] <bpalmer> as in, http POST?[21:51:22] <IseeIsee> ernimril: please suggest something[21:51:22] <snooplsm> yes, using java.net w/o sockets, only URL[21:51:59] <bpalmer> snooplsm: you're not going to be able to do that (or, at least, I'm fairly sure on that)[21:52:14] <bpalmer> why such an odd and arbitrary constraint?[21:52:21] <snooplsm> applet[21:52:48] <snooplsm> I have a BufferedImage[21:52:53] <bpalmer> applets can use sockets[21:52:57] <ernimril> IseeIsee: write a testcase and see if it works or not...[21:52:59] <bpalmer> they're just limited to where they can connect to[21:53:00] <snooplsm> yes, but i don't want a socket[21:53:13] <snooplsm> because firewalls and all other kinds of stuff block it[21:53:35] <ernimril> snooplsm: http requests are made on top of sockets[21:53:41] *** IseeIsee has quit IRC[21:54:02] <snooplsm> yes, but according to sun, a socket is...[21:54:05] <ernimril> snooplsm: you can not post if you do not have a socket. If you use HttpUrlConnection you may not see the socket, but it is there[21:55:03] *** devman has joined ##java[21:55:09] <snooplsm> ernimril, i'm trying to post to a php file i have not made yet, and the php file will return a url[21:55:22] <hatOFF> how do I convert an int to a string?[21:55:31] <snooplsm> .toString[21:55:38] <hatOFF> hi snooplsm :)[21:55:41] <snooplsm> ((Integer)variablename).toString();[21:55:42] <hatOFF> doesn't work[21:55:47] <hzsp> Integer.valueOf(3).toString();[21:55:59] <hatOFF> Cannot invoke toString() on the primitive type int[21:56:06] <hatOFF> okay[21:56:08] <snooplsm> gotta cast it to an Integer[21:56:11] <snooplsm> yea do it his way[21:56:16] *** Trixsey|Laptop has quit IRC[21:56:21] <hzsp> heh ;)[21:56:25] <snooplsm> to get it back to an int, do Integer.parseInt(string);[21:56:33] *** Trixsey|Laptop has joined ##java[21:56:57] <ernimril> snooplsm: return an url? what url?[21:57:16] <ernimril> snooplsm: do you mean that you are trying to do a PUT instead of a POST?[21:57:21] <snooplsm> i have given too much information[21:58:42] <snooplsm> i'll talk later, i have to go my german lab[21:58:56] <bpalmer> too much information? Have you compromised mission security?[21:59:36] *** tempest1 has joined ##java[22:00:28] <gabb> Is there something like the column header but for rows in JTable ?[22:00:36] *** Trixsey|Laptop has quit IRC[22:00:45] *** Trixsey|Laptop has joined ##java[22:01:29] *** Trixsey|Laptop has quit IRC[22:01:39] *** Trixsey|Laptop has joined ##java[22:05:15] <Trixsey|Laptop> rogue-kun{B}|Awa[22:05:15] <Trixsey|Laptop> hey :D[22:06:21] <Baloogan> I'M GOING TO LEARN RMI ONE DAY FUCK RMI[22:06:39] <Mazon> java library for creating torrent files ? (excluding Azureus)[22:08:34] *** diro has quit IRC[22:09:11] <cowbud> in java regex what are the semantics for am|pm ? so that a line can have am there or pm there?[22:09:24] *** tempest1 is now known as Amarillo_Slim_2[22:09:45] <ernimril> cowbud: did you try: "am|pm" ?[22:10:27] <cowbud> yes I did[22:10:37] <cowbud> but it looks like I have another issue :)[22:10:37] *** Amarillo_Slim_2 is now known as tempest1[22:10:59] <hatOFF> is there a way to shuffle (randomize) the contents of a vector?[22:11:03] <ernimril> cowbud: good guess, did you try find instead of match? (match will match all of the string)[22:11:21] <Honk^away> hatOFF: use the shuffle method in collections :)[22:11:45] <hatOFF> uhm, throw me a link with a documentation please[22:12:06] <tempest1> hatOFF, sure thing: www.google.com[22:12:30] <ernimril> hatOFF: if you think that the method should be called shuffle, you open the javadoc index, select "S" and then do a search for "shuffle"[22:12:33] <cowbud> I am using match and with: Pattern.compile("\\d{1,2}/\\d{1,2}/\\d\\d\\d\\d \\d{1,2}:\\d{1,2} pm|am"); it doesn't want to match either am or pm[22:13:05] <ernimril> cowbud: it is not only matching am|pm, there may be other problems there[22:13:19] <cowbud> alright im digging through :) be back later eheh[22:13:34] *** delvinj has joined ##java[22:13:42] <ernimril> cowbud: might want to look at SimpleDateFormat[22:15:30] *** franl has joined ##java[22:17:40] *** gothtec has joined ##java[22:17:54] <hatOFF> StdIn cannot be resolved[22:17:56] <hatOFF> any ideea?[22:18:08] <hatOFF> where does that belong? to which import?[22:18:23] <cowbud> ernimril: alright thanks for the tips[22:18:24] <hzsp> StdIn? there's no such thing[22:18:45] <gothtec> I'm trying to make an irc bot, for educational purposes. I'd like to be able to write some kind of plugins for it, so I can add, say, 8ball, as a plugin. Any ideas on the easiest way to support "plugins"?[22:19:07] <cheeser> javabot: tell gothtec about source[22:19:08] <javabot> gothtec, My subversion repository can be found at http://www.cheeseronline.org/svn/repos/javabot[22:20:42] *** Mc_Fly has quit IRC[22:20:48] <Honk^away> omg, that bot's using finalize =9[22:21:54] *** menace has quit IRC[22:22:07] *** Bevin has joined ##java[22:22:48] <Bevin> hi[22:25:50] *** djib has joined ##java[22:27:18] *** Bluelive has quit IRC[22:28:11] *** ulver is now known as lorenzo[22:28:19] *** lorenzo is now known as ulver[22:30:34] <Logi> <yawn size="massive"/>[22:30:47] <ulver> Logi, lol[22:31:43] <hzsp> Logi: deary me, using the default namespace ;)[22:32:59] <Logi> hzsp: obviously my default namespace has yawns in it[22:33:22] <Logi> hzsp: alternatively, when you need a yawn you're not really up for the whole name space thing[22:33:31] <hzsp> that is true[22:34:49] * Logi prepares himself for popcorn, whiskey and a film containing, nay, revolving around pointless nudity[22:35:08] <ernimril> yawning ought to be a crime, it is contaiguous..[22:35:13] *** devman has quit IRC[22:35:27] <Logi> ernimril: just apply a tranformation to my output[22:35:37] <Logi> that joke should carry a penalty too...[22:36:05] <Logi> is there no java stuff happening tonight?[22:36:13] * bpalmer applies a transformation to the film ... "let's put everybody in a pinafore!"[22:36:36] * Logi looks that word up[22:36:46] <hzsp> hah[22:36:50] <hzsp> apron[22:36:57] *** djib has quit IRC[22:37:18] *** Dakrone has joined ##java[22:37:22] <doc|home> or a skirt that school girls wear[22:37:28] <jwormy> mmmm school girls[22:37:35] <jwormy> whatsup doc?[22:37:48] <doc|home> nothing much :)[22:37:49] <doc|home> you?[22:37:57] <bpalmer> vicious schoolgirls who won't go away until you buy a year's supply of cookies[22:38:12] <jwormy> thinking aobut installing freeBSD on my 'linux' machine[22:42:10] <Clackwell> jwormy: around you boredom i sense. :)[22:42:26] <doc|home> heh[22:42:27] <jwormy> Clackwell, ye is correct[22:42:54] <Clackwell> ;)[22:45:03] *** djib has joined ##java[22:45:50] *** o|neill has joined ##java[22:47:02] <Dakrone> is there a simple way to draw 1 pixel in Java2d graphics?[22:47:17] <Cow_woC> Dakrone: draw a line of length 1[22:47:17] <o|neill> hi, want to know if there's a way to insert a link in an applet's shape [like a rectangle shape], so that whenever a user clicks on the rectangle, the web page will change..? anyone familiar with applets who could help me? =)[22:47:39] <Cow_woC> Dakrone: or if you've got a BufferedImage I believe you can use setPixel() or something[22:47:40] <ernimril> Dakrone: BufferedImage.set[22:48:47] *** Stork has joined ##java[22:49:12] <Dakrone> Cow_woC: thanks[22:49:44] <o|neill> how would you insert a link into an applet?[22:51:08] <ernimril> o|neill: normally I would not...[22:51:27] *** lasala has quit IRC[22:51:30] <ernimril> o|neill: AppletContext.showDocument[22:51:31] * Cow_woC is extremely frustrated[22:51:36] <bpalmer> o|neill: so you want your applet to communicate with the browser?[22:51:43] <o|neill> correct[22:51:45] <Cow_woC> Netbeans + Tomcat's colorful bugs = unusable... I keep on getting ThreadDeath[22:51:47] <bpalmer> ah, sounds like ernimril has the suggestion to listen to[22:51:59] <o|neill> specifically with a separate frame[22:52:03] <Cow_woC> which is actually coming from a log4j bug and the log4j team has not even bothered looking at the bug report for 2 months now[22:52:37] <o|neill> i just want to open a url in a separately created frame...[22:52:42] <Clackwell> Cow_woC: it's open sores, go cure them yourself :)[22:53:07] <ernimril> o|neill: and I just told you how you do it...[22:53:25] <o|neill> gotcha ernimril, busy google-ing it now =)[22:53:39] <o|neill> sorry for the delay, got some serious lag where i'm at[22:54:07] <Clackwell> [22:51] [o|neill PING reply]: 8secs[22:54:17] <Cow_woC> Clackwell: It's some ClassLoader bug in log4j...... I have no clue nor interest in doing everything myself[22:54:27] <o|neill> [Clackwell]: thanks for the PING[22:54:30] <Cow_woC> Clackwell: It just pisses me off that this thing has been around for so long ....[22:54:42] <hzsp> night folks[22:54:43] <Cow_woC> Clackwell: every time I make a change to my webapp I have to restart the entire server (!!)[22:54:47] <Cow_woC> Clackwell: it's very slow[22:55:13] <Clackwell> Cow_woC: <nod>[22:55:13] *** hzsp has quit IRC[22:55:21] <keyhack> Cow_woC: You don't have to[22:55:30] <keyhack> Cow_woC: You can set an option in the web.xml file[22:55:50] <o|neill> how would I implement something like an "onclick" function for an applet shape, such as a rectangle?[22:56:27] <Clackwell> o|neill: what the heck is an applet shape?[22:56:43] <ernimril> o|neill: 1) use a button and an ActionListener, 2) use a panel a KeyListener[22:57:10] <o|neill> like a rectangle the Graphics2D object would create[22:57:34] <o|neill> thanks ernimril[22:57:34] <Cow_woC> keyhack: how?[22:58:15] <keyhack> Cow_woC: Theres an option, look it up[22:58:21] <keyhack> Cow_woC: I believe its called a <Context> tag[22:58:30] <keyhack> Cow_woC: With some parameter like autoReload="true"[22:58:31] <Cow_woC> keyhack: you're been too vague... there's an option to do what?[22:58:38] <Cow_woC> ok, I remember that one[22:58:40] <Cow_woC> hold on :)[22:58:44] <keyhack> [16:54:41] <Cow_woC> Clackwell: every time I make a change to my webapp I have to restart the entire server (!!)[22:59:00] <Cow_woC> keyhack: not for the reason you think[22:59:09] *** Chang_Wufei is now known as Wufei|food[22:59:12] <Cow_woC> keyhack: in Netbeans, if I modify my webapp, it updates its files and redeploys it[22:59:27] <Cow_woC> Netbeans has an embedded Tomcat server[23:00:11] <Clackwell> Cow_woC: you do not have to use that combo though.[23:00:14] *** dingo001 has joined ##java[23:00:24] <Cow_woC> Clackwell: what do you mean?[23:00:39] <dingo001> hey all[23:00:51] <keyhack> Cow_woC: No one is making you use the embedded Tomcat[23:01:15] <dingo001> i am trying to search into a 20Mb xml file and i can do it in about 2 seconds, is there any chance that this can go faster?[23:01:28] *** RedEyess has joined ##java[23:01:31] <RedEyess> Hello[23:01:33] <Cow_woC> keyhack: regardless of whether I use an embedded one or external one, it's going to issue a redeploy command to it[23:01:52] <Clackwell> Cow_woC: no[23:01:55] <RedEyess> How do I use a JDBC mysql driver with Java Web Start?[23:01:56] <keyhack> Cow_woC: Right, and be default its not going to load the new .class file because it was already loaded into memory, therefore, you have to restart it[23:02:07] <Clackwell> RedEyess: same way you do without using web start?[23:02:13] <RedEyess> nope[23:02:13] <keyhack> Cow_woC: But if you researched into what I had told you to do with the settings file, you can make it an option that it'll check to see if the .class file is newer ornot[23:02:22] <RedEyess> Doesn't work that way when importing .jar files[23:02:30] <bpalmer> and it often sort of works[23:02:37] <Cow_woC> keyhack: yes, I know I can set redeployable=true but my guess is that Netbeans will *still* redeploy[23:02:42] <keyhack> Cow_woC: it's not a redeploy command, its a deploy command, and if its already deployed and was running on the server, it won't auto-reload the newer class file[23:02:49] <Clackwell> RedEyess: you do not "import .jar files".[23:02:54] <keyhack> I'm not talking about redeployable=true[23:03:14] <Cow_woC> oh, so I misunderstood you then[23:03:17] <Cow_woC> sorry[23:03:30] <RedEyess> I didn't say you did[23:03:36] <keyhack> This has nothing to do with deployment, it has to do with the fact that for the first request the class is loaded into memory. Even if you replace the .class file by "redeploying", I'm telling you that the server won't load the newer version automatically[23:04:54] <Cow_woC> <Host> has autoDeploy ... but this simply auto-deploys webapps when you drop them into the webapp directory[23:04:58] <Cow_woC> I don't see how that helps[23:05:06] <keyhack> I'm not talking about <Host>[23:05:08] <keyhack> I said <Context>[23:05:14] <keyhack> Cow_woC: If you had done the research from my information (rather me having to do it for you), then you would have found that you add <Context path="/servlets" reloadable="true">[23:05:22] <Cow_woC> keyhack: context does not have autoDeploy[23:05:38] <keyhack> "The Context component in Tomcat supports auto-reload. When this feature is enabled, the WebappLoader's modified method gets called regularly. This method checks if any class under WEB-INF/classes or any JAR file under WEB-INF/lib has been changed. If it has, the modified method returns true and the Context is reloaded"[23:05:39] <Cow_woC> keyhack: <keyhack> I'm not talking about redeployable=true[23:05:50] <Cow_woC> keyhack: I guess this was a typo, I meant reloadable[23:05:54] <keyhack> Cow_woC: Why are you arguing with me when I'm trying to help you?[23:06:07] *** RedEyess has quit IRC[23:06:15] <Cow_woC> keyhack: my point still stands, if redeployable=true, then Tomcat will check for changes[23:06:24] <Cow_woC> keyhack: but Netbeans still won't know not to redeploy[23:06:40] <keyhack> Cow_woC: lol, I've told you what to do, I cannot help you any further[23:07:05] <Cow_woC> From Netbeans point of view, it wants some guarantee that once it drops new files into the webapp directory, they will be synched. Is there a way for Netbeans to wait for a sync to occur?[23:07:21] <keyhack> Cow_woC: Then do what I had said.[23:07:22] <Cow_woC> Because Netbeans doesn't want to trigger a HTTP hit until the changes have been synched by Tomcat[23:07:48] *** znoG has joined ##java[23:08:13] *** rogue-kun{B}|Awa is now known as rogue-kun{B}[23:08:15] <keyhack> Cow_woC: Either stop/start the server like you have been doing, or add the appropriate <Context> tag that would inform the server to reload the newer classes once it knows it hass been modified[23:08:15] <znoG> hi. does anyone else find it somewhat strange that the Bruce Eckel Java 3rd edition book doesn't (seem to) cover the topic of MVC design?[23:08:27] *** jor has quit IRC[23:08:51] <Cow_woC> keyhack: reloadable=true checks every X seconds right?[23:09:10] <keyhack> Cow_woC: Research it, I gave you more than enough information to answer the question[23:09:26] *** cowbud has quit IRC[23:09:52] <o|neill> thanks for the help guys[23:09:53] <o|neill> later[23:09:57] *** o|neill has quit IRC[23:10:19] *** keyhack has quit IRC[23:10:26] *** joered has quit IRC[23:14:05] <Clackwell> znoG: he knows better than adding an MVC wank to his decent book, i guess.[23:14:17] <Clackwell> read the mvc wanks on the net, i guess.[23:14:49] <jwormy> znoG, does his book cover design?[23:14:51] <znoG> Clackwell: why is MVC a wank?[23:15:33] *** franl has quit IRC[23:16:48] <Clackwell> znoG: to me it is just another design pattern. why read up on mvc but not on all of the other 1001 design patterns?[23:17:01] <bpalmer> mvc is the Pattern to rule them all[23:17:16] <Clackwell> oh. in that case, go learn it. :)[23:17:22] <znoG> Clackwell: i'm pretty new to java, i don't know about the other design patterns[23:17:27] *** alex_f has left ##java[23:17:44] <Clackwell> znoG: if i recall correctly eckel also has a book about object-oriented design or design patterns.[23:18:33] *** veep has quit IRC[23:18:49] <Clackwell> znoG: in that case don't bother with mvc, i think. and never assume that the "mvc" takes implies any qualities. a framework implementing/following mvc can be good, or can suck without end. the mvc bit doesn't help.[23:19:14] <bpalmer> seriously, MVC is a common pattern with clear benefits in readability and flexibility, that's a pain to redesign and recode around later, and is not tremendously obvious[23:19:28] <znoG> Clackwell: in my java class at uni, they focus on MVC, hence why I wanted to learn about the classes involved with MVC[23:19:42] *** tbfg has left ##java[23:19:48] <Clackwell> znoG: aha, i see.[23:19:49] <jwormy> znoG, you're gonna find that a lot of stuff you learn at uni isn't the best answer you your problems[23:19:56] <znoG> jwormy: very true[23:20:04] <Clackwell> bpalmer: mvc implies better readability?[23:20:04] <jwormy> bpalmer, suggest a pattern maybe?[23:20:38] <bpalmer> Clackwell: I think so[23:21:13] <Clackwell> bpalmer: wouldn't i be completely lazy i would sit down and write you a horrible mvc hello world framework that is completely unreadable.[23:21:50] <Clackwell> i think it is a major misconception to assume that implementing mvc implies anything like that. or even good design.[23:21:55] *** idpromnut has joined ##java[23:22:06] <bpalmer> I'm sure unreadable code could be done with anything, but I think (smaller self-contained classes) imply (better readability)[23:22:22] <bpalmer> and mvc suggests (smaller self-contained classes)[23:22:42] <Clackwell> if you think like that, you may pick the bad, ugly, misdesigned and hard to use mvc-implementing framework over the well designed framework that is easy to use.[23:22:51] <Clackwell> bpalmer: you mean like swing? :)[23:23:02] <Clackwell> in swing, rather[23:23:10] <jwormy> bpalmer, so suggest a cool design pattern already[23:23:32] <Clackwell> there are those who claim that swing as it is wasn't ever designed to be let lose on application developers...[23:24:03] *** silasj has joined ##java[23:24:35] <bpalmer> I rather like Swing[23:24:47] <bpalmer> (except for GridBagLayout)[23:26:04] <Cow_woC> bpalmer: GBL is fine if you use the Netbeans Layout Manager[23:26:12] <Cow_woC> Layer Manager -> Form Editor rather[23:26:52] <Honk^away> gbl isnt all that bad :p[23:27:04] <jwormy> Netbeans, ACK[23:27:13] <Clackwell> ~gbl[23:27:14] <javabot> Clackwell, I have no idea what gbl is.[23:27:18] <Clackwell> <groan>[23:27:31] <Clackwell> ~gridbaglayout[23:27:32] <javabot> I guess the factoid 'gridbaglayout humor' might be appropriate:[23:27:34] <javabot> Clackwell, gridbaglayout humor is at: http://madbean.com/anim/totallygridbag[23:28:40] <znoG> jwormy: i guess you learn the better way of doings things experimenting[23:28:47] *** hAt0ff has joined ##java[23:28:51] <hAt0ff> how can I get out of a method ? break cannot be used outside of a loop or a switch[23:28:53] <hAt0ff> any ideea?[23:29:10] *** Dakrone has quit IRC[23:29:10] <Honk^away> return[23:29:13] <bpalmer> return[23:29:18] <Clackwell> hAt0ff: did your "return" statement vanish or something?[23:29:26] <Clackwell> still allergic to reading the sun java tutorial?[23:30:19] <hAt0ff> okay :)[23:30:21] <ernimril> ahh :-)[23:30:36] <ernimril> my nio http reader seems to be working :-)[23:31:24] * Clackwell sticks ernimril into the "nio wizard" drawer[23:31:59] <ernimril> Clackwell: I am building the next generation of my proxy, full switch from mixed thread/nio to full nio...[23:32:22] *** RaggedJack has joined ##java[23:32:25] <Clackwell> ernimril: i see. not configurable? APR style?[23:32:41] <Trixsey|Laptop> http://www.animania.nu/uml_test.jpg[23:32:44] <Trixsey|Laptop> Is this UML ok?[23:32:59] <ernimril> Clackwell: ?[23:33:25] <ernimril> Clackwell: no, not like apache...[23:33:48] <ernimril> Clackwell: but it will use thread for calling external processes, no way to select on Process[23:34:03] *** silasj has quit IRC[23:34:14] <Clackwell> ernimril: what does "select on Process" mean?[23:34:18] <Clackwell> oh, nevermind, got it[23:34:29] <Clackwell> ernimril: yeah, that runtime.exec issue...:|[23:34:33] <ernimril> Clackwell: but I may make number of selectors configurable in the config[23:35:11] <gabb> Is there something like the column header but for rows in JTable ?[23:35:14] <ernimril> Clackwell: and get a number of threads that way... last I heard windows was really bad when you got huge amounts of channels in a selector[23:35:20] <ernimril> gabb: ?[23:35:21] *** everwicked has joined ##java[23:35:25] <everwicked> hello[23:35:26] <Clackwell> ernimril: yeah, might want to let everyone screw up their config individually. :)[23:35:27] <ernimril> gabb: use a cell renderer[23:35:52] <ernimril> Clackwell: "here is the gun, there is your foot, do as you like" :-)[23:36:08] <everwicked> suppose I have a String s that contains a date in a particular format (e.g. dd/mm/yyyy). I am trying to make a method that verifies that s is indeed in that format. any suggestions?[23:36:20] <ernimril> everwicked: SimpleDateFormat[23:36:20] <Honk^away> dateformat[23:36:30] <Clackwell> ernimril: yeah ;)[23:36:35] <Xgc> gabb: Also see TableModel.[23:36:35] <Stork> java.text.SimpleDateFormat[23:37:00] <Trixsey|Laptop> Xgc: http://www.animania.nu/uml_test.jpg this UML ok?[23:37:03] <ernimril> Clackwell: but I still think less threads might be good for the people that have around 10k modems in their pool...[23:37:30] <gabb> Xgc, reading http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender atm[23:37:39] <everwicked> hrm. so I create a SimpleDateFormat("mm/dd/yyyy") and ask it to parse s?[23:37:42] <ernimril> Clackwell: its not like I can test that configuration myself...[23:37:51] <gabb> I knew I could do it with a CellRenderer, just thought there is something read-to-use available.[23:37:52] <Stork> everwicked: check the javadocs[23:38:16] <Bevin> 'night[23:38:21] <Clackwell> bye bevin[23:38:27] *** Bevin has quit IRC[23:38:36] <everwicked> Stork: I just did. I'm verifying I understood correctly[23:38:42] <ernimril> gabb: you have not told us what you want...[23:38:51] <Stork> why ask then :\[23:38:55] <everwicked> to verify?[23:38:59] <ernimril> gabb: the table headers are painted with a normal cell renderer[23:39:00] <Clackwell> gabb: cared to google? google suggest completes "row hea" to "row header jtable" all by itself...[23:39:02] <Stork> ...[23:39:40] <Honk^away> Clackwell: it doesnt do that on all browsers[23:39:41] <Trixsey|Laptop> http://www.animania.nu/uml_test.jpg[23:39:43] <Trixsey|Laptop> Is this UML ok?[23:39:57] <gabb> ernimril, I got a 2-dim array, I just want the columnheaders to display the array-index+1, as well as a "rowheader" that acts and looks just like the columnsheaders.[23:40:13] <gabb> It's for a adjacency matrix if that helps to understand what I need.[23:40:22] <Clackwell> Honk^away: so throw your stupid browser away.[23:41:25] <Honk^away> Clackwell: no?[23:41:28] <Honk^away> i hate that featur[23:41:29] <Honk^away> e[23:41:38] <Honk^away> if i google, i know what i'm gonna google for[23:41:53] <ernimril> gabb: so first row is like: " ", "A", "B", ... and first col is like: " ", "1", "2", ...[23:41:54] <Honk^away> i dont need some stupid auto-completion to tell me what i might want to write :)[23:42:19] <Clackwell> Honk^away: well sure, stick to broken tools, but don't use that as an excuse to abuse communities like this one.[23:42:29] <Clackwell> or to split hairs...:>[23:42:40] <ernimril> gabb: and as I said, the normal header renderer is available, just use it. I do not remember exactly how you get it, but it is not very hard to find.[23:42:42] <Honk^away> Clackwell: "broken"?[23:42:47] <Honk^away> i can enable it, if i want to[23:42:49] <Honk^away> it sucks bad[23:43:12] <gabb> ernimril, ok, will do - thanks. I also assume I can clone the appearance attributes of the columnHeader for that too.[23:45:07] *** Blackwell has joined ##java[23:45:31] *** shad0wcat has joined ##java[23:45:56] *** deedaw has quit IRC[23:46:01] *** hatOFF has quit IRC[23:48:33] *** everwicked has quit IRC[23:49:51] *** {darktux} has joined ##java[23:51:25] *** gabb has quit IRC[23:52:21] *** dudes has joined ##java[23:52:46] *** watzlaf has quit IRC[23:52:52] *** ulver has quit IRC[23:53:25] *** dudes has left ##java[23:58:53] *** Olathe has joined ##java