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


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:00:20] *** Dragonai has quit IRC
[00:00:21] *** saml has quit IRC
[00:00:24] *** neuro_sys has quit IRC
[00:00:42] *** cbeust__ has joined ##java
[00:00:49] *** neuro_sys has joined ##java
[00:01:14] *** Dragonai has joined ##java
[00:01:46] *** jinky has joined ##java
[00:02:13] *** rjohnson19_ has joined ##java
[00:02:13] *** notcyth has joined ##java
[00:02:22] *** notcyth has quit IRC
[00:02:26] *** JStoker has quit IRC
[00:02:47] *** super__ has joined ##java
[00:03:05] *** sigtau has quit IRC
[00:03:11] *** JStoker has joined ##java
[00:04:26] *** magn3ts_ has joined ##java
[00:04:41] *** queequeg1 has quit IRC
[00:04:46] *** dmb has joined ##java
[00:05:08] *** horte has quit IRC
[00:08:29] *** hex` has quit IRC
[00:08:29] *** jjido has quit IRC
[00:08:29] *** rjohnson19 has quit IRC
[00:08:29] *** kercyr has quit IRC
[00:08:30] *** shaunren has quit IRC
[00:08:30] *** dwayne has quit IRC
[00:08:30] *** barq has quit IRC
[00:08:30] *** c_axis has quit IRC
[00:08:30] *** cbeust_ has quit IRC
[00:08:30] *** epure_ has quit IRC
[00:08:30] *** choongii has quit IRC
[00:08:30] *** ktorn has quit IRC
[00:08:30] *** tokam has quit IRC
[00:08:30] *** jeremylemaire has quit IRC
[00:08:30] *** VJTachyon has quit IRC
[00:08:30] *** cythrawll has quit IRC
[00:08:30] *** arborist has quit IRC
[00:08:30] *** surial has quit IRC
[00:08:30] *** gelignite has quit IRC
[00:08:30] *** psst has quit IRC
[00:08:30] *** mapreduce has quit IRC
[00:08:30] *** krang has quit IRC
[00:08:30] *** cschneid has quit IRC
[00:08:30] *** wyvern has quit IRC
[00:08:30] *** magn3ts has quit IRC
[00:08:31] *** wh1t3 has quit IRC
[00:08:31] *** mdunham918_ has quit IRC
[00:08:31] *** maineac has quit IRC
[00:08:31] *** sproingie has quit IRC
[00:08:31] *** Maro__ has quit IRC
[00:08:31] *** Kuifje111 has quit IRC
[00:08:31] *** grimboy has quit IRC
[00:08:31] *** jink has quit IRC
[00:08:31] *** Xgc has quit IRC
[00:08:31] *** vengeancex32 has quit IRC
[00:08:31] *** drhodes has quit IRC
[00:08:31] *** murr4y has quit IRC
[00:08:31] *** joeytwiddle has quit IRC
[00:08:31] *** cyth has quit IRC
[00:08:31] *** cbeust has quit IRC
[00:08:31] *** HandheldPenguin has quit IRC
[00:08:31] *** svm_invictvs- has quit IRC
[00:08:31] *** karstensrage has quit IRC
[00:08:31] *** joed has quit IRC
[00:08:31] *** oorza has quit IRC
[00:08:31] *** pucko has quit IRC
[00:08:34] *** cbeust__ is now known as cbeust
[00:08:34] *** jinky is now known as jink
[00:08:59] *** arborist has joined ##java
[00:09:29] *** dwayne has joined ##java
[00:09:56] *** surial has joined ##java
[00:10:06] *** Xgc has joined ##java
[00:10:38] *** kercyr has joined ##java
[00:10:52] *** Railgun has quit IRC
[00:11:12] <kba> when I try to use javax.xml.xpath with <w:a xmlns:w=\"http://www.cs.au.dk/dWebTek/2011\"><w:b>foo</w:b></w:a> why won't it work?
[00:11:26] <kba> without a namespace, I can just extract //a/b and get foo
[00:11:38] <kba> but because of the namespace, nothing works - how should I extract this?
[00:11:46] *** epalm has joined ##java
[00:11:50] *** jjido has joined ##java
[00:11:53] <ojacobson> Tell XPath about your namespaces, and use prefixed names in your xpath expression
[00:12:08] <cbeust> I like Nexus
[00:12:23] <ojacobson> kba: see http://download.oracle.com/javase/6/docs/api/javax/xml/xpath/XPath.html -- the section about QNames is relevant
[00:12:55] <kba> before I get working with that, does it matter if the namespace link works?
[00:13:49] *** cyth has joined ##java
[00:13:55] <ojacobson> No, namespace URIs are identifiers only
[00:14:04] <kba> okay, good, thanks
[00:14:09] *** Zta has quit IRC
[00:14:20] <ojacobson> If you have any schema bindings for namespace URIs, those schema bindings should generally work
[00:14:28] <ojacobson> but the namespace URIs themselves don't even need to be URLs
[00:14:31] <ojacobson> they could be URNs
[00:14:41] <ojacobson> or URIs in non-network protocols
[00:14:53] *** c_axis has joined ##java
[00:15:04] *** jeremylemaire has joined ##java
[00:15:34] *** cschneid has joined ##java
[00:15:59] *** tokam has joined ##java
[00:16:25] *** choongii has joined ##java
[00:16:46] <kba> okay
[00:17:56] <kba> is it really the javax.xml.namespace.NamespaceContext I need?
[00:18:07] <kba> because it tells me I need to create an anynomous class and stuff
[00:18:15] *** arborist has quit IRC
[00:18:19] <ojacobson> You'll need *a* namespace context
[00:18:31] <ojacobson> you can create your own (which means implementing the interface), or you can obtain one from a document with namespaces
[00:18:38] <ojacobson> Depending on your needs, either may be appropriate
[00:18:51] <kba> well all my documents will have xmlns:w=\"http://www.cs.au.dk/dWebTek/2011\" in them
[00:18:58] <kba> so.. can't I parse it from them?
[00:19:11] <kba> or how exactly do you mean?
[00:19:42] <ojacobson> If your document has all of its namespace bindings (those xmlns:foo attributes, plus the 'xmlns' attribute itself if it's there) in one place, you can navigate to that node by hand and grab its namespace context
[00:20:28] *** GFXDude has quit IRC
[00:20:32] <kba> would you mind telling me how? :)
[00:21:05] <kba> or I don't really understand what you mean I think
[00:21:27] <kba> I don't understand why I can't just use some xpath.setNameSpace("xmlns:w=\"http://www.cs.au.dk/dWebTek/2011\""); or something
[00:21:46] <kba> or am I totally missing the point here?
[00:21:49] <ojacobson> Because the xpath API isn't designed that way
[00:21:57] <ojacobson> it's designed to take all of the namespace bindings at once, as a NamespaceContext object
[00:22:03] <ojacobson> sometimes APIs aren't designed the way you want :)
[00:22:13] <kba> okay, right
[00:22:13] <ojacobson> How are you parsing your XML document?
[00:22:37] <kba> uhm, like I posted before
[00:22:40] *** djbpython has joined ##java
[00:22:45] <kba> expr.evaluate(new InputSource(new StringReader(data)))
[00:22:46] <ojacobson> I didn't see any code posted that did any parsing
[00:22:52] <ojacobson> ah
[00:23:17] <kba> data is a String with XML dat
[00:24:00] *** cyphorious has joined ##java
[00:24:06] *** frangiz has quit IRC
[00:24:11] <ojacobson> Ok, then you'll either need to set up your own namespace context or you'll need to split parsing and xpath evaluation
[00:24:30] <ojacobson> Namespaces are a good thing, the API is just a little clunky :)
[00:24:32] *** gkmngrgn has quit IRC
[00:24:35] <kba> what do you mean by split it?
[00:24:48] <ojacobson> Right now you're passing an InputSource to the xpath engine to parse
[00:25:07] <ojacobson> which means the xpath engine is in charge of actually parsing it, which means you can't get any information out of the parsing process while that happens
[00:25:11] <ojacobson> (like, say, namespace bindings)
[00:25:20] <kba> okay
[00:25:31] <kba> so what could I do alternatively when my XML source is a String?
[00:25:57] <ojacobson> Personally I'd write a trivial implementation of NamespaceContext and get on with life :)
[00:26:19] <kba> so a new class right?
[00:26:26] <ojacobson> yep
[00:26:38] <ojacobson> read the docs for NamespaceContext, it's not hard to implement but there are some things to be aware of
[00:27:05] *** aLeSD has quit IRC
[00:27:14] <kba> I hate whoever came up with that idea
[00:27:33] <ojacobson> Eh. The XML stuff in the JDK is all designed to allow multiple implementations
[00:27:44] <ojacobson> which is a legacy of its origin in the EE specs, rather than as a freestanding spec
[00:27:53] <ojacobson> as a result, there are a few compromises :)
[00:28:52] *** jjido has quit IRC
[00:29:09] *** Dux has joined ##java
[00:29:48] *** bearded_oneder has quit IRC
[00:30:36] *** jjido has joined ##java
[00:31:58] *** Cymage has quit IRC
[00:32:42] *** neuro_sys has quit IRC
[00:34:33] *** Cymage has joined ##java
[00:35:05] *** NodoLibero has quit IRC
[00:35:06] *** echosystm has joined ##java
[00:35:16] <kba> it works! Thank you.
[00:35:28] <echosystm> i want to use http basic auth, with the user/role/pwd coming from an SQL database
[00:35:33] <echosystm> what should i use for this?
[00:35:34] *** alisalaah has left ##java
[00:37:16] *** ojacobson has quit IRC
[00:37:26] *** joed has joined ##java
[00:38:39] *** ormaaj has joined ##java
[00:39:20] *** Pozejdon has quit IRC
[00:40:14] *** pucko has joined ##java
[00:41:09] *** gelignite has joined ##java
[00:42:17] *** oorza has joined ##java
[00:42:56] *** Ruudjah has joined ##java
[00:44:02] *** mateobur has joined ##java
[00:44:05] <mateobur> Hello
[00:44:31] <mateobur> I'm getting: List<E> should be parametrized and I would like to suppress that warning
[00:45:14] <surial> ~~ mateobur generics
[00:45:34] <surial> Crap, javabot netsplit.
[00:45:55] <surial> mateobur: List<String> is a list of strings. That's what you need to do to make that warning go away. Also, follow a tutorial written in this fucking decade. You're looking at 15 year old shite.
[00:46:05] *** blckcap has joined ##java
[00:46:24] *** blckcap is now known as daveycaKES
[00:46:33] *** daveycaKES is now known as daveycakes
[00:46:34] <surial> echosystm: A webserver, and a SQL driver.
[00:46:50] <mateobur> surial, it's the return type of the library I use, I cannot change it
[00:46:59] <surial> mateobur: @SuppressWarnings("unchecked")
[00:47:14] <surial> mateobur: ... and use libraries written somewhere after 2004.
[00:47:22] <daveycakes> im running a server and client locally (java) and i need to the server to allow a client to download a 3 files when each option, 1, 2, or 3 is selected. what would be the best method?
[00:47:22] <mateobur> :)
[00:47:43] <surial> daveycakes: That was an entirely unclear question.
[00:47:56] <daveycakes> yeah sorry it was, im getting tired :P
[00:48:03] <echosystm> do i write a filter surial ?
[00:48:08] <surial> daveycakes: ... to upload and download stuff? Uh, socket.getInputStream() and socket.getOutputStream(). or if using HTML, those input/outputstreams that you get from HttpServletResponse/Request.
[00:48:09] <echosystm> are there existing things for this?
[00:48:12] <echosystm> etc.
[00:48:30] <daveycakes> im using the Stream method but im getting errors i cant fix
[00:48:30] <surial> echosystm: As in javax.servet.whatsit.Filter? That's one way.
[00:48:40] <surial> daveycakes: Okay.
[00:48:42] <surial> ~~ daveycakes pastebin
[00:48:45] <echosystm> what else is there?
[00:48:52] <surial> Pastebin a test case, including the output you are getting and what you wished happened instead.
[00:49:01] <mateobur> surial, "rawtypes" was the correct 'type'
[00:49:03] <surial> echosystm: google is your friend.
[00:49:04] *** sigtau has joined ##java
[00:49:14] <surial> mateobur: Oh, right. There's a bunch of suppress warnings keys for generics.
[00:49:14] *** wad has quit IRC
[00:49:22] <surial> mateobur: actually, rawtypes is an eclipse invention, IIRC.
[00:49:30] <surial> a rather recent one.
[00:49:51] *** wbooze has quit IRC
[00:49:52] *** homie has quit IRC
[00:50:01] *** forneus_ is now known as forneus
[00:50:09] *** jjido has quit IRC
[00:50:12] <surial> daveycakes: Unfortunately the bot is off snoozing someplace. Try http://pastebin.ca/
[00:52:02] <daveycakes> am doing soz one sec :)
[00:52:04] <daveycakes> http://pastebin.com/nBwYaedL
[00:52:45] <daveycakes> http://pastebin.com/FVg4Bt1G
[00:53:35] <daveycakes> http://pastebin.com/KfHfZDXH
[00:53:49] <daveycakes> ok so those are my 3 classes, sorry for so many pastes
[00:54:08] *** wchun has quit IRC
[00:54:21] *** hyppias has quit IRC
[00:54:24] *** Diogo has quit IRC
[00:54:28] <daveycakes> and i get a method error with getOutputStream
[00:54:44] <daveycakes> i thought i had the correct libraries imported
[00:57:06] <Auv5> daveycakes, What do you mean by "method error". What's the output of the error?
[00:57:57] <daveycakes> cannot find symbol
[00:58:23] <daveycakes> location: java.net.ServerSocket
[00:58:55] <Auv5> I'm pretty sure ServerSockets don't have a getOutputStream method.http://download.oracle.com/javase/6/docs/api/java/net/ServerSocket.html
[00:59:11] <Auv5> Oops, forgot the space ;).
[00:59:11] <daveycakes> now that would make sense
[00:59:33] <Auv5> You can't write to a ServerSocket. All it does it accept connections.
[01:00:23] <daveycakes> http://www.rgagnon.com/javadetails/java-0542.html i was trying to base it on this
[01:00:37] <daveycakes> im not great at programming
[01:00:54] <daveycakes> as you can probably tell :)
[01:01:52] <surial> daveycakes: You need to have the javadocs open so you can look at them as you need to. And have some patience, and browse around. The socket API is easy to understand just by looking at method names and following some links in the docs (such as to java.net.Socket, from the accept() method).
[01:02:02] *** Radu-Mihail has joined ##java
[01:02:13] <Radu-Mihail> Good evening, everyone.
[01:02:16] <Auv5> Yeah. They don't branch off the Socket into another thread.
[01:03:15] <daveycakes> okily thank you
[01:03:40] *** icebrain has joined ##java
[01:04:09] *** jesmon has quit IRC
[01:04:17] <icebrain> "No applets"; where do I go for applets?
[01:04:34] <icebrain> Oh, and Hi, by the way ;)
[01:04:42] <freeone3000> icebrain: Oracle forums.
[01:05:11] *** rjohnson19_ is now known as rjohnson19
[01:05:22] <Auv5> There's a rational on the Wiki if you're interested about why we don't support applets.
[01:05:39] <icebrain> freeone3000: So no IRC channel? Ok, thanks.
[01:05:42] <Radu-Mihail> Can I interrupt with a short question?
[01:05:50] <Auv5> Radu-Mihail, Go ahead :).
[01:05:55] <Auv5> I'll try and answer :P.
[01:06:18] *** daveycakes has quit IRC
[01:06:39] <Radu-Mihail> Are there any *usable* bean binding libraries? I know of the JSR, but that's supposed to be in Java 7. I'm interested into beans binding for Swing work.
[01:07:09] <Auv5> No idea. I really don't do much Swing or Beans :\
[01:07:10] *** eyesUnclouded has joined ##java
[01:07:23] <freeone3000> Then you want java.beans.*. It has extensible inspection and editing options. It's supposedly used behind the scenes of netbeans to get its decent property editor.
[01:07:37] *** javabot has joined ##java
[01:07:39] <freeone3000> (The only issue is that there aren't default editor components. You have to bind all the ones you want yourself. Fun.)
[01:07:40] <Radu-Mihail> Yeah, but it's cumbersome to use.
[01:07:48] <Radu-Mihail> I need automatic property tracking.
[01:08:09] <freeone3000> PropertyChangeListener mixed with PropertyChangeSupport. Possibly mixed with a Proxy.
[01:08:44] <Radu-Mihail> Yup, tons of boilerplate.
[01:08:51] <Radu-Mihail> I was somehow hoping to avoid all that. :D
[01:08:56] <freeone3000> Nope.
[01:09:01] <Radu-Mihail> Sucks.
[01:09:11] <Radu-Mihail> So that's the way to decouple GUI components from the model...?
[01:09:17] *** surial has quit IRC
[01:09:44] *** Dragonai has quit IRC
[01:10:10] <freeone3000> Swing components already are decoupled from the model. They have their own model, which you generally implement (or override) to create a hybrid model that converts data from what The Rest Of Your App likes to something that Swing likes.
[01:10:30] <freeone3000> With the possible exception of JTextComponent, because really, Document's a pain and .setText() works tons better.
[01:10:35] <Radu-Mihail> Indeed.
[01:10:45] <Radu-Mihail> And that's what I need. :)
[01:11:07] <Radu-Mihail> Is there any elegant way to bind several JText* to the same (complex) model?
[01:11:38] <Radu-Mihail> Actually, several JTextField, I'm not interested in the big editors.
[01:11:45] *** Gracenotes has joined ##java
[01:12:47] <Radu-Mihail> Meh, I really should be sleeping.
[01:13:08] <Radu-Mihail> I guess I'll get back here tomorrow, I used to be a really heavy FreeNode user back in the day.
[01:13:14] <Radu-Mihail> Good night, everyone!
[01:13:42] <freeone3000> Radu-Mihail: Yes. Document.
[01:14:13] *** pipeep has quit IRC
[01:14:47] <echosystm> i'm looking at the servlet realm system - it seems the authentication sits outside the war
[01:14:50] <echosystm> is that correct?
[01:15:11] *** Cymage has quit IRC
[01:15:14] *** matsebc has quit IRC
[01:17:14] <echosystm> is there any way to handle authentication within the WAR ?
[01:17:53] *** Cpudan80 has joined ##java
[01:17:57] <Cpudan80> Hello folks
[01:18:29] <Cpudan80> I was hoping you guys could help me ---- Ive setup a UDP listener in Java, and I am bound to a particular IP listening for traffic ---- problem is no traffic ever comes across that socket
[01:18:44] <Cpudan80> I see the data in wireshark, but I dont ever receive anything...
[01:18:53] <echosystm> show us your code
[01:19:26] <Cpudan80> sure
[01:20:45] *** mateobur has quit IRC
[01:21:38] *** oso96_2000 is now known as oso[OuT]
[01:22:22] <Cpudan80> echosystm: http://www.pastie.org/1618880
[01:24:28] *** cbeust has quit IRC
[01:24:35] <Cpudan80> I left out a couple lines about actually calling run - but you get the idea
[01:25:21] <echosystm> pet peve: don't use booleans for success/failure, use exceptions :P
[01:25:54] <Cpudan80> fair enough
[01:26:01] <Cpudan80> Any idea why I dont get any data though?
[01:26:11] <echosystm> what is connectionRunning ?
[01:26:23] <echosystm> this is a single threaded application right?
[01:26:39] <Cpudan80> no the main app basically puts this in a thread
[01:26:52] <Cpudan80> connection running is the flag baically to tell the thread to stop
[01:27:03] <freeone3000> Flags already have a flag to stop - "interrupted".
[01:27:05] <freeone3000> *Threads.
[01:27:08] <Cpudan80> I hit the socket.receive line, but no data ever comes
[01:28:09] *** pipeep has joined ##java
[01:28:16] *** Garibaldi has joined ##java
[01:28:38] <echosystm> i cant see anything blatantly wrong
[01:29:08] <freeone3000> He's doing processPacket() inline, so if that takes a significant amount of time, he'll drop packets, but...
[01:29:18] <Cpudan80> it doesnt
[01:29:25] <Cpudan80> and I dont ever get that far anyway
[01:30:07] <echosystm> your problem must be elsewhere
[01:30:12] <echosystm> firewall?
[01:31:06] <Will123456> Cpudan80: i assume you're setting the length of lastPacket at least once before the first socket.receive
[01:31:28] <Cpudan80> before the first time?
[01:31:37] <Cpudan80> errr no
[01:32:05] *** epalm has quit IRC
[01:32:14] *** ojacobson has joined ##java
[01:32:26] <Cpudan80> now just to clarify my understanding of the API
[01:32:54] <Will123456> Cpudan80: i'm writing some similar code to you, but I create the datagram every time (with a byte array of the length of packets i'm expecting through the socket) every time i do socket.receive(datagram)
[01:32:55] <Cpudan80> when I do --> socket = new DatagramSocket(port, bindingAddr); bindingAddr should be the IP of the NIC I want to bind to right?
[01:33:11] <Cpudan80> Like not the IP I am trying to send to or anything, the IP of my local NIC
[01:33:24] <freeone3000> Yes, that's why it's a *binding* address.
[01:33:59] <Cpudan80> right ok
[01:34:06] <Cpudan80> yeah I turned the firewall off and still nothin
[01:34:21] <ojacobson> Cpudan80: or 0.0.0.0 to bind to all interfaces (this is what the constructor with only one parameter does, too)
[01:34:52] <Cpudan80> well yeah but in this case I only want one interface
[01:35:11] <Will123456> Cpudan80: but does it work with binding to all interfaces?
[01:35:19] <Cpudan80> mmm I dunno
[01:35:21] <echosystm> ojacobson: do you know of any way to do http basic servlet auth within the war?
[01:35:21] <Cpudan80> havent tried
[01:35:34] <Will123456> Cpudan80: i recommend it as part of the debugging process
[01:35:38] <Cpudan80> Will123456: no it doesn't actually - I tried that
[01:35:38] <ojacobson> echosystm: many.
[01:35:40] <echosystm> preferably in a container-agnostic way
[01:35:42] <Cpudan80> I forgot
[01:35:44] <ojacobson> It's baked into the servlet spec
[01:36:04] <ojacobson> (however, deploying login modules is not, but pretty much every container supports at least some kind of DB-backed container auth, as well as other backends like files and ldap)
[01:36:05] <echosystm> all i can find is the web.xml stuff that requires external implementation
[01:36:17] <ojacobson> The "external implementation" is what you're looking for
[01:36:25] <ojacobson> it's the container-specific hooks that allow the WAR to be container-agnostic
[01:36:36] <echosystm> right
[01:36:38] <Cpudan80> Dang it!
[01:36:44] <Cpudan80> It was the stupid firewall this whole time!
[01:36:47] <Cpudan80> *grumbles*
[01:36:56] <echosystm> Cpudan80: :P
[01:36:58] <echosystm> told you
[01:37:00] <ojacobson> Alternately, deploy your own auth and ignore the servlet spec auth
[01:37:15] <echosystm> ojacobson: so basically there is no way to do servlet auth 100% within the war
[01:37:15] <ojacobson> there are plenty of libs for this (spring-security and friends for example)
[01:37:17] <echosystm> ?
[01:37:40] <echosystm> ie. you're always depending on some container-specific implementation outside the war
[01:38:43] <ojacobson> No, inside the WAR
[01:38:43] <Cpudan80> hmm
[01:38:48] *** gelignite has quit IRC
[01:38:48] <echosystm> oh.
[01:38:49] *** nucc1 has joined ##java
[01:38:52] <Cpudan80> So that doesnt explain why Im having problems on android though
[01:39:02] <Cpudan80> The phone sometimes just ... won't receive
[01:39:08] <nucc1> how do i make a class that throws an exception, as well as extends another class?
[01:39:11] <ojacobson> You either use the container support (and therefore need to include container configuration in your deployment instructions) or you don't (and your code is inside the WAR, but you can't integrate with more holistic auth setups like EJB auth)
[01:39:21] <ojacobson> nucc1: Classes don't throw exceptions.
[01:39:31] <nucc1> hmmm
[01:39:33] <Cpudan80> but thats a topic for another day
[01:39:34] <nucc1> checking :p
[01:39:35] <Cpudan80> thanks guys
[01:39:39] <echosystm> what about JAAS ojacobson ?
[01:39:56] <echosystm> can't that be used in a container-agnostic way, within the war?
[01:40:21] *** Cpudan80 has quit IRC
[01:40:24] *** thorat has joined ##java
[01:40:26] <nucc1> ojacobson, thanks :p
[01:40:30] *** rjohnson19 has quit IRC
[01:40:57] *** Radu-Mihail has quit IRC
[01:41:25] <ojacobson> Probably
[01:41:33] <ojacobson> I find JAAS too generalized to really be useful
[01:42:26] <echosystm> what i want to do is have httpbasic auth, with the login module within the war and be able to use the jsr250 annotations
[01:42:44] <echosystm> auth is against an sql databse (jndi)
[01:42:53] <echosystm> what do you recommend?
[01:43:28] *** cyphorious has quit IRC
[01:43:30] *** zatan has quit IRC
[01:44:27] *** Omen_20 has joined ##java
[01:45:22] <ojacobson> Other than the JSR-250 stuff that's pretty much the most common setup ever
[01:45:30] <ojacobson> and it's handled adequately by pretty much every web framework
[01:45:50] <ojacobson> JSR-250 pretty much means you're stuck with container-managed auth, with a dedicated JSR-250 library, or with spring-security if you're already using spring
[01:46:20] *** Error404NotFound has quit IRC
[01:46:28] *** msieradzki has quit IRC
[01:46:41] <echosystm> i'm using jersey, so theres no baked-in auth
[01:46:46] *** senera has joined ##java
[01:47:14] *** msieradzki has joined ##java
[01:47:23] <nmx> interesting. i'm running into the same issue at work... we're currently dependent on the container's auth but we want to rewrite it to be container agnostic
[01:48:35] <echosystm> i think i'm going to have to write a filter and just read the auth credentials off the request
[01:48:38] <echosystm> fml.
[01:48:59] <ojacobson> It's too bad sarcasm doesn't come across in this medium.
[01:49:04] <ojacobson> My gut response to that is "Good plan. *eyeroll*"
[01:49:12] <ojacobson> jersey-spring + spring-security, perhaps
[01:49:28] <ojacobson> "but auth is simple"
[01:49:29] *** cbeust_ has joined ##java
[01:49:31] <ojacobson> no it's not.
[01:49:33] <nmx> ojacobson: what about in my case where we aren't already using jersey or spring? :)
[01:49:38] *** objorn has left ##java
[01:51:54] *** flippo has joined ##java
[01:52:21] *** tewecske has quit IRC
[01:54:02] <ojacobson> nmx: then it's time to survey the other options.
[01:54:24] <ojacobson> I've had a few looks over the last few years but I tend towards stuff that's integrated into the tool ecosystem I'm using
[01:54:35] <ojacobson> which tends to mean spring-the-container
[01:55:42] *** bobbytek has joined ##java
[01:55:42] *** Cher has joined ##java
[01:56:01] *** xiliax has quit IRC
[01:56:55] <nmx> we have toyed with the idea of moving to spring anyway
[01:57:30] <Cher> I've been recently blogging a few things about JDK7. http://www.riedquat.de/blog/ in case someone is interested. Includes walkFileTree example, WatchService example, RFE about try-with-resources, Bug report about -Xlint:try.
[01:57:55] <echosystm> ban.
[01:58:00] <ojacobson> Cher: are the bug and RFE in openjdk's tracker?
[01:58:03] <ojacobson> (What numbers?)
[01:58:32] *** DJClean has quit IRC
[01:58:41] <Cher> Of course they are. The RFE has number 7022744. The Bug report is just a few minutes old and has no number yet.
[01:58:46] *** mrhota has quit IRC
[01:59:13] <ojacobson> Thanks
[01:59:34] <ojacobson> (Just trying to distinguish you from some spammer plugging a useless blog. :)
[02:00:09] <Cher> Hmmm... walkFileTree or WatchService would be pretty concrete for spam, I guess ;-)
[02:00:22] <ojacobson> You'd be surprised.
[02:00:32] *** msieradzki has quit IRC
[02:00:42] <Cher> Wait, does OpenJDK have a different bugtracker than http://bugs.sun.com/bugdatabase/? I filed it to bugs.sun.com / Oracle.
[02:00:42] <Sou|cutter> Cher: sounds interesting though
[02:00:52] <ojacobson> bugs.sun.com will do :)
[02:01:05] <ojacobson> I don't even actually care if it's your bug
[02:01:13] <ojacobson> It was more of a turing test than anything else
[02:01:30] * ojacobson eyes echosystm.
[02:01:42] <Sou|cutter> Cher: your blog has a true programmer's aesthetic
[02:01:49] <ojacobson> haha
[02:01:55] <ojacobson> which is to say, it's ugly as fuck but full of things
[02:02:38] *** belugs has quit IRC
[02:02:45] <ojacobson> /endorsed
[02:03:14] <Cher> I take this as a compliment :) I don't care if people like the style of my blog. But I do care about the quality of its content, as well as the neat things like auto-invoking vim runtime! syntax/2html.vim for included listings.
[02:03:35] <ojacobson> The code samples don't make me itch furiously, so you're up on most people :)
[02:04:03] <ojacobson> You might want to use try-with-resources in Cat1.java
[02:04:16] <ojacobson> (if you're going to show good practice, show all of the good practice :)
[02:04:27] <ojacobson> Oh, you did, disregard
[02:04:42] <Cher> Hehe, that's what Cat1.java vs. Cat2.java is about :)
[02:05:23] <Cher> But I think I should've declared buf final. I'll fix that.
[02:05:24] * ojacobson goes back to upgrading Glassfish before he makes more of a tit out of himself.
[02:05:27] *** ninan has quit IRC
[02:06:00] *** poccha has quit IRC
[02:06:11] *** vengeancex32 has joined ##java
[02:06:39] * nucc1 wonders whether ojacobson's actions would be so bad after all
[02:09:31] *** neuro_sys has joined ##java
[02:11:51] *** Behi has quit IRC
[02:13:45] *** Determinist has quit IRC
[02:15:02] <echosystm> god, servlet authentication is horrible
[02:15:24] <ojacobson> The EE declarative auth stuff is compromises agogo in general
[02:17:14] *** Fanook has quit IRC
[02:17:33] <echosystm> what i dont understand is why you would ever want your container to manage auth
[02:17:41] *** barbaricrunner has joined ##java
[02:18:01] <ojacobson> Uniform authnz across an entire system (web, internal components, messaging/asynch processing, and various backends)
[02:18:23] <ojacobson> In theory, "because it's declarative", but the declarative capabilities are so weak that they're not very useful
[02:18:38] *** L-----D has joined ##java
[02:18:42] *** gigasoft has quit IRC
[02:20:11] *** X-Scale has joined ##java
[02:20:52] *** icebrain has quit IRC
[02:21:21] *** kalio has joined ##java
[02:21:33] *** matsebc has joined ##java
[02:22:14] <kalio> if i have a program that is only 1 class is it good practice to make all variables and methods static?
[02:22:40] <ojacobson> Not generally, no
[02:22:46] <ojacobson> unrelated aspects are unrelated
[02:23:10] <kalio> i'm having a bit of trouble deciding what parts i should declare as static
[02:23:21] *** terranova has joined ##java
[02:23:32] <ojacobson> try just main first
[02:23:35] <echosystm> kalio: jsut because a program is small doesnt mean you should write it as if it was a procedural program
[02:24:26] *** neuro_sys has quit IRC
[02:24:50] *** matsebc has quit IRC
[02:25:27] <kalio> ok thanks. i remember running into an error earlier but i'll make everything except main non-static and see exactly what is causing the error to happen
[02:25:56] <kalio> it was something about calling a non-static method from a static method i think
[02:26:14] <ojacobson> 1. create or obtain instance
[02:26:17] <ojacobson> 2. call instance method
[02:26:28] <Planck_> Even if main is just calling the constructor with parsed args then calling a start() method or something, it's better than making everythign static
[02:26:29] <Cher> kalio: Without knowing your program: Imo, if it shall be good and idiomatic, in general you will not have state in static variables to enable "reentrance" to your class using multiple instances.
[02:26:30] *** placydo has quit IRC
[02:26:44] *** FrozenKnight has quit IRC
[02:26:52] *** teralaser has quit IRC
[02:27:25] *** realtime has quit IRC
[02:28:45] <kalio> thanks guys i will continue with my methods and variable non-static and return if i run into issues
[02:29:19] <bobbytek> Static variables are "cool"
[02:29:36] *** openros has joined ##java
[02:29:42] <Planck_> Simple case: "public static void main(String[] args) { MYClass myObj = new MyClass(); myObj.start(); }
[02:29:53] <bobbytek> cool == roseindia
[02:30:46] <echosystm> ok this authentication shit is driving me nuts
[02:31:26] *** tomvolek has quit IRC
[02:31:41] <echosystm> want to use http basic, using jetty container, salted sha1 passwords in postgres, jersey framework
[02:32:16] <freeone3000> It really may be eaiser to just write a servlet for it. HTTP basic is not hard.
[02:32:18] *** Fanook has joined ##java
[02:32:38] <echosystm> then i will lose the ability to get SecurityContext, right?
[02:32:48] *** sproingie has joined ##java
[02:33:20] <echosystm> or is there some way to set that within the authentication filter
[02:33:37] <ojacobson> the security context identity just looks at the HttpServletRequest
[02:33:55] <ojacobson> if you have a filter in front of jersey which replaces the HttpServletRequest with one with a different principal, that's what jersey will see
[02:33:56] <echosystm> ah
[02:34:01] <ojacobson> this is how spring-security works, for example
[02:34:08] <echosystm> sounds like a plan
[02:34:11] <echosystm> thanks
[02:34:35] <echosystm> do you know of anything like spring-security that wont suck down the entire universe as dependencies?
[02:36:41] <sproingie> if you're using spring havent you already sucked down said universe?
[02:36:48] <echosystm> i'm not using spring
[02:36:51] <echosystm> im using jersey
[02:36:58] <echosystm> jetty, jersey, eclipselink
[02:36:58] *** tokam has quit IRC
[02:37:43] *** ddpanic has joined ##java
[02:37:50] <sproingie> ah. spring-security does tend to assume you're already using spring
[02:37:53] *** tokam has joined ##java
[02:38:01] <cheeser> crazy
[02:38:28] <sheenobu> I was whining about a JSF 1.1 app earlier. Just really code code and very large jsf beans.
[02:38:41] *** openros has quit IRC
[02:38:51] *** tissue has joined ##java
[02:38:58] *** wliao has joined ##java
[02:39:22] <sproingie> if you just need the identity stuff perhaps OAuth?
[02:39:24] <sheenobu> anyway to apply a stateless URL/request model on top of this
[02:41:32] <sheenobu> I was able to do a tiny bit by 1) creating a custom variable resolver 2) creating two different phase listeners
[02:41:58] <sheenobu> but I'm afraid it sucks
[02:43:18] *** tilerendering has quit IRC
[02:45:27] *** tilerendering has joined ##java
[02:45:44] <sproingie> isn't it horrifying?
[02:46:19] <sproingie> one reason i gave up on JSF was how awful it gets when you have to get under the hood
[02:46:42] <sproingie> to be fair that's a lot of frameworks. but doing stuff as simple as stripping whitespace required it.
[02:48:08] *** pyrony has quit IRC
[02:49:04] <sheenobu> sproingie: I know. I want to stop using JSF for this app but it's so many lines of code. I'd have to port the shitty xhtml AND the web bean logic
[02:50:53] <sproingie> well at least it's not struts :)
[02:51:46] *** matsebc has joined ##java
[02:51:57] *** jesmon has joined ##java
[02:52:00] <sheenobu> I've been using spring mvc for new apps and really like it. also developed a template library for it but I haven't used it yet
[02:52:26] *** bobbytek has quit IRC
[02:52:57] <sheenobu> but even spring mvc has it's limits, with the jsp garbage
[02:54:06] <ojacobson> spring-mvc isn't fantastic
[02:54:27] <ojacobson> depending on your attitude towards apps you might have a look at jax-rs (which isn't really intended for user-level webapps, but isn't impossible to abuse that way, either) or wicket
[02:54:31] <paissad> guys, i'm using JavaDB, i would like to create a new database if it does not exist yet, here is what i did http://pastebin.com/GJEXba1x
[02:54:32] <paissad> but i get error http://pastebin.com/N7Juu1m1
[02:54:39] <paissad> i got that idea from this post http://old.nabble.com/Re:-Create-table-if-not-exists--p22132644.html
[02:54:52] <echosystm> i use jax-rs with dojo front-ends
[02:54:54] <echosystm> its awesome
[02:55:02] <sheenobu> ojacobson: I tried wicket. After that and JSF, I /hate/ stateless web frameworks
[02:55:02] <ojacobson> paissad: Use liquibase, move on with life :)
[02:55:12] <paissad> i cannot use the "IF NOT EXISTS", nor "CREATE OR REPLACE TABLE ...3
[02:55:12] <ojacobson> stateful?
[02:55:17] *** barbaricrunner has quit IRC
[02:55:18] *** tokam has quit IRC
[02:56:01] <echosystm> i dont really write traditional MVC apps anymore
[02:56:19] <echosystm> i think its better to just write your entire client in javascript and have it consume a restful web service
[02:56:42] <Fanook> paissad: you didn't include the table creation statement anywhere in your pastebin
[02:56:59] <sheenobu> ojacobson: yeah with a server-side stateful component model that attempts to abstracts out standard web tech.
[02:57:00] <ojacobson> echosystm: hope you don't need to support anything but a desktop web browser, then
[02:57:14] <echosystm> ?
[02:57:18] <ojacobson> (screen readers/other accessibility tools, text-mode browsers for quick hax, some mobile devices)
[02:57:18] <echosystm> what do you mean
[02:57:31] <ojacobson> (all are heavily compromised if you rely too heavily on scripting)
[02:57:49] <echosystm> yeah i dont care about any of that
[02:57:51] <echosystm> :)
[02:58:13] <echosystm> all my apps work on mobiles though
[02:58:23] <nucc1> tough guy
[02:58:28] <echosystm> thats part of the reason i do things this way - reuse the same web service from multiple clients
[02:58:52] <sheenobu> JSF does it, wicket does it but does it a bit better, but they all abstract out the HTTP API in favor of stateful java apis
[02:58:55] <echosystm> if i had to, i would just make HTML representations for the web service
[02:59:13] <ojacobson> sheenobu: So try JAX-RS out
[02:59:25] <paissad> Fanook, http://pastebin.com/q99Q0Dg4 .. line 32 is the interest
[02:59:44] <sheenobu> ojacobson: jax-rs isn't too low-level for interactive web?
[02:59:47] <paissad> i only grabbed some parts of the code
[03:00:00] <ojacobson> sheenobu: I use it.
[03:00:13] <ojacobson> If you think in terms of HTTP methods and URLs, it's a fairly natural way to do it, actually
[03:00:26] <echosystm> sheenobu: do you have requirements for accessibility and so on?
[03:00:31] <ojacobson> Jersey has some nice glue for using JSP as a view layer if you happen to like it, or you can bolt on velocity or freemarker or whatever
[03:01:17] *** Hoverbear has left ##java
[03:01:17] <sheenobu> ojacobson: that's why I like spring mvc, actually. I don't like any of those view layers. I dislike them so much I've ported the django template library to java, but no one cared.
[03:01:37] <ojacobson> YATemplateLibrary is unlikely to get a lot of traction unless it's really novel :)
[03:01:40] <sheenobu> echosystm: old browsers
[03:01:43] <ojacobson> however, that should be usable from JAX-RS, too
[03:01:53] <sheenobu> YATemplateLibrary?
[03:01:56] <ojacobson> Yet Another
[03:02:00] <sheenobu> oh right =)
[03:02:27] <paissad> btw, there is something else i don't understand, when i use -Dderby.system.home=extras/geoip ... i have no problem running the app, ... but when i do System.setProperties("derby.system.home", extras/geoip"); before loading the driver, that does not work
[03:02:50] <sheenobu> any good tutorial for jax-rs websites? I've tried restlet docs before but little luck
[03:02:52] <paissad> before loading the Derby JDBC driver
[03:02:52] <Fanook> paissad: why are you passing the db name as the table name?
[03:03:08] <paissad> Fanook, uhh, no i did not
[03:03:14] <paissad> where ?
[03:03:17] *** jesmon has quit IRC
[03:03:18] <ojacobson> paissad: use liquibase, move on with life
[03:03:19] *** eyesUnclouded has quit IRC
[03:03:24] <Fanook> uhhh, yes. you did. line 30
[03:03:42] <paissad> ojacobson, i'm on the liquidbase website, i take a look
[03:03:59] <ojacobson> paissad: it handles all of the "is the schema set up already?" bits for you pretty effectively
[03:04:21] *** eyesUnclouded has joined ##java
[03:04:37] <paissad> Fanook, right, mistake, i correct that and see
[03:06:15] <ojacobson> sheenobu: I've been thinking of writing one, actually
[03:06:34] <sheenobu> a jax-rs tutorial? nice
[03:06:46] <ojacobson> A JAX-RS tutorial from the point of view of a webapp developer
[03:06:48] <ojacobson> rather than an API developer
[03:07:00] <paissad> Fanook, that works now :D .. stupid mistake, thanks a lot mate
[03:07:01] <ojacobson> If you know HTTP, JAX-RS itself isn't hard to get your head around
[03:07:24] <paissad> Fanook, i knew it had to put the "table name" there, but i did not pay enough attention :)
[03:07:56] <sheenobu> right, yeah. I have the standard restful webservices book so HTTP is fine
[03:07:58] *** Denebola has quit IRC
[03:08:23] *** ab500 has quit IRC
[03:08:54] *** tajen has quit IRC
[03:09:04] *** ab500 has joined ##java
[03:11:27] *** thorat has quit IRC
[03:11:41] *** pyrony has joined ##java
[03:13:16] *** homie has joined ##java
[03:14:56] <sheenobu> http://zenoconsulting.wikidot.com/blog:1 here is one
[03:17:48] <sheenobu> not very extensive
[03:17:48] <sheenobu> but
[03:18:07] *** zamN has joined ##java
[03:18:09] *** matsebc has quit IRC
[03:18:40] <ojacobson> Here's something from a real app: http://pastie.org/1619144
[03:18:59] *** t0rc has joined ##java
[03:19:39] <paissad> ojacobson, hmm, liquidbase is for version control, right ? ... something like svn, git ... not a database
[03:19:46] *** eyesUnclouded has quit IRC
[03:19:54] <ojacobson> paissad: it's a tool for versioning databases
[03:20:03] <ojacobson> which includes upgrading databases to versions
[03:20:36] <paissad> ojacobson, actually, i wonder if i do really need it
[03:20:51] <ojacobson> It handles "do my tables exist already? if not, create them" pretty effectively
[03:21:01] <sheenobu> ojacobson: thanks.
[03:21:14] <paissad> ojacobson, ah ok, i see, yeah cool
[03:21:17] <ojacobson> and more flexibly than anything you bake yourself (what are you going to do if your tables exist, but in an old version? liquibase handles this if you include migrations for the alter table statements)
[03:21:45] <ojacobson> There are other migration tools
[03:21:49] <paissad> ok
[03:21:49] <ojacobson> that just happens to be the one I use :)
[03:26:36] <ztj> ojacobson: does it have any especially onerous limitations or impose any sort of upgrade styles (i.e. copy tables and move data vs. alter only, etc.)
[03:26:45] <ojacobson> ztj: Not really, no
[03:26:53] <ojacobson> It has some magic XML syntax you *can* use, but you can also use SQL
[03:26:56] *** super__ has quit IRC
[03:27:07] <ojacobson> (er, "magic xml syntax" as in structured migrations that are described by XML)
[03:27:10] *** epalm has joined ##java
[03:27:16] <ojacobson> (There's an <sql> migration, though!)
[03:27:26] <ztj> neat, maybe I'll have a look. I just did some db upgrading. It was an almost entirely new schema so I just did it (knowing only one other existed) but wouldn't want to deal with this on a regular basis
[03:27:41] *** Error404NotFound has joined ##java
[03:27:55] <ojacobson> It's not documented well yet (and I've yelled at them for it) but liqubase 2 (which is out) has support for xml-less migration files
[03:27:57] <ztj> actually I hope the next move for this product is away from rdbms entirely but we'll see
[03:28:08] * ztj doesn't mind xml at all
[03:28:27] <ojacobson> http://blog.liquibase.org/2010/05/liquibase-formatted-sql.html is a nice alternative
[03:28:34] <ojacobson> (their blog engine has eaten the -- sql comment delimiter though)
[03:29:08] <ztj> nice
[03:30:09] <ztj> dear behind-the-times web developers: If you're going to put one of those awful floating bars at the bottom of a web page at least make sure it doesn't stick in one spot when scrolling is performed on your page on an iPad or iPhone. KTHXBAI
[03:30:22] <ojacobson> position: fixed works fine
[03:30:27] <ojacobson> javascript scroll detection falls down, goes clong
[03:30:44] <optraz> when we throw exception that is , "throw new Exception()" in a method, do we need to append throws in the method signature?
[03:30:46] <ztj> most often I see it shows up in the right place to start then as you scroll it just... stays wherever it was
[03:30:59] <ztj> blocking text or images or whatever
[03:31:12] <freeone3000> optraz: If it's checked, yes. If it's unchecked, no.
[03:31:14] <sheenobu> huh. jax-rs + xml + xslt transform or am I a masochist?
[03:31:27] <optraz> freeone3000: what is checked and unchecked?
[03:31:28] *** caverdude has quit IRC
[03:31:30] <sheenobu> xsl transform i Mean
[03:31:30] *** dk_schrute has joined ##java
[03:31:37] <freeone3000> ~exceptions
[03:31:38] <javabot> freeone3000, exceptions is http://java.sun.com/docs/books/tutorial/essential/exceptions/ (also see http://billharlan.com/pub/papers/Catching_Exceptions_in_Java.html )
[03:32:08] *** ztj has left ##java
[03:32:12] *** ztj has joined ##java
[03:32:16] *** dk_schrute has quit IRC
[03:32:21] <ztj> focus fail
[03:32:21] <ojacobson> sheenobu: thought about it. don't love xslt enough.
[03:32:32] *** dk_schrute has joined ##java
[03:32:33] <optraz> freeone3000: only uncheck :) http://download.oracle.com/javase/tutorial/essential/exceptions/runtime.html
[03:32:35] <meeper> it's possible to write to a memory mapped file right? Is the ByteBuffer updated to reflect changes? Do read/writes have to be synchronized?
[03:32:37] <ojacobson> Might be worth a try, but I would expect memory use problems: even saxon isn't notorious for being lightweight
[03:32:46] *** dk_schrute is now known as svm_invictvs-
[03:32:51] <ojacobson> Client-side XSLT might work better (<?xml-stylesheet?>)
[03:33:08] <sheenobu> ojacobson: me neither. dislike the alternatives more. yeah I've thought about it, dunno how browser support is, though
[03:33:14] <ojacobson> "good enough"
[03:33:25] *** wolfman2000 has joined ##java
[03:33:26] <ojacobson> the big N (safari, firefox, chrome, opera, IE) support it
[03:33:29] <ztj> sheenobu: I might've missed something but if you're trying to combine your service responses and your browser responses you should look into the new data annotation stuff in html5
[03:33:55] <ojacobson> ztj: yo, dawg, I herd u liek 2.0 so I put some data in your data so you can parse while you parse
[03:34:15] <sheenobu> ztj: Yeah you've missed a bit. My problem is that I've got some legacy apps that are in JSF 1.1 and the codebase is like quicksand
[03:34:19] <ztj> I think of it more like cues for avid screenscrapers :)
[03:34:30] *** lamdk has quit IRC
[03:34:48] <ztj> I'm not really sure how a codebase can be like quicksand
[03:34:50] <sheenobu> I'm really wanting to either 1) re-write the whole thing or 2) be able to port it up to something stateless
[03:36:00] <sheenobu> ztj: big glob of crap that you can't struggle against without causing more problems
[03:36:01] *** matsebc has joined ##java
[03:36:12] <ojacobson> ~g big ball of mud
[03:36:13] <javabot> http://www.google.com/search?q=big+ball+of+mud
[03:36:21] <ojacobson> ~g poltergeists antipattern
[03:36:21] <javabot> http://www.google.com/search?q=poltergeists+antipattern
[03:36:24] *** tokam has joined ##java
[03:36:26] <sheenobu> yeah those are it
[03:36:28] <ojacobson> hth :)
[03:36:37] <ztj> oh well that's my specialty
[03:36:44] <ztj> going on 5 years now
[03:36:51] <sheenobu> resolving or creating?
[03:37:02] <ztj> Um.... tolerating.
[03:37:16] <sheenobu> hah
[03:38:02] <ztj> My approach to—slowly—improving things has mostly been occasional secret surgery.
[03:38:26] *** Auv5 has quit IRC
[03:38:29] <ojacobson> ztj: it should come as no surprise to you, given how long you've known me, that I favour big, flashy surgery
[03:38:43] <ojacobson> rewriting or rearchitecting whole swathes of features at once :)
[03:38:57] <ztj> ojacobson: I do too but sadly it's not my call, no matter how many times I justify it then several years later cough and point to the original worst case timelines that were half as long
[03:39:04] <sheenobu> I've tried the slow surgery, the problem is fixing one part cascades becaues there is no real separation of logic/concerns
[03:39:15] <ztj> I like... moving the baby to a new crib, so to speak. Take the tiny fragments that actually matter and put them in a better place.
[03:39:20] <ojacobson> man
[03:39:25] <ojacobson> y'all are making me feel better about this project
[03:39:37] <ojacobson> personal thing... ripping out ldap support and replacing it with rdbms authentication was a weekend project
[03:39:39] <ztj> sheenobu: sometimes you have to be willing to leave a few scars
[03:39:42] <sheenobu> I thought about picking up the JSF templates and moving them to a new backend, but then I am still stuck with JSF
[03:40:14] <ztj> ojacobson: I turned an unreproducible bug into 3 weeks of entirely refactoring about 15% of the product. That was exciting.
[03:40:22] <sheenobu> ztj: today I broke our "back button". by bcak button I mean a button called "back" that calls a different JSF method per page and grabs fom the session the previous page
[03:40:29] *** djbpython has quit IRC
[03:40:40] <ztj> "Just running more slow... very very slow... performance test." aka rewriting core modules to stop deadlocking under 20% load.
[03:40:49] <sheenobu> but only if that previous page added itself to the session when navigation to the next page
[03:40:52] <ojacobson> convoy? CONVOY
[03:40:55] *** pyrony has quit IRC
[03:41:07] <ojacobson> sheenobu: emulating browser features--
[03:41:29] <sheenobu> that's bad, right? I only rest easy knowing I wasn't involved in that
[03:41:51] <ztj> In my rating-of-your-web-page system, if you ever once cause my browser to warn me after hitting the back button about posting a form, I will instafail you.
[03:42:09] <ojacobson> sessions--
[03:42:28] <ojacobson> Sessions are fine for *per browser* facts like identity and certain kinds of caching
[03:42:30] <sheenobu> ztj: I've never known how to avoid that.
[03:42:34] <ojacobson> but for *per interaction* facts they're failboat
[03:43:04] <ztj> sheenobu: well a modern way is not to navigate and POST together
[03:43:36] <ojacobson> sheenobu: read your HTTP
[03:43:53] <ojacobson> POST -> on success, return See Other with the URL of a GET-able version of the result -> GET
[03:44:04] <ojacobson> you can navigate back or forwards across that without causing a re-post
[03:44:18] <sheenobu> ojacobson: that's a post->redirect? or is post-
[03:44:25] <sheenobu> post->redirect the one that will cause the issue?
[03:44:34] <ojacobson> That's post->redirect
[03:44:44] *** juggling has joined ##java
[03:44:51] <ojacobson> It's when the result of a POST is in the response that you get re-posts on refresh/navigation
[03:44:59] <sheenobu> oh cool. I've done that all along on my spring-mvc apps
[03:45:24] <sheenobu> but the legacy JSF app doesn't do any of that
[03:45:45] *** Gracenotes has quit IRC
[03:46:21] <ztj> This crap I have is so much more legacy that hearing you say "legacy JSF" is like hearing someone say "outdated 1.5tb hdd" to someone who just upgraded from an Apple LISA
[03:46:51] * ztj is depressing himself
[03:47:08] <ojacobson> ztj: you liked FFT, right?
[03:47:13] <ztj> a lot
[03:47:20] <ztj> played for 110 hours.. the second time around.
[03:47:24] * ojacobson files away for later head-hunting.
[03:47:25] <sheenobu> haha, sorry. I just consider it legacy because no one I work with uess it, touched it, etc?
[03:47:30] <ojacobson> ~legacy
[03:47:30] <sheenobu> FFT?
[03:47:31] <javabot> ojacobson, legacy is a derogatory technical term meaning "known quantity"
[03:47:35] <ztj> And plan to play again when it's finally rereleased for iOS
[03:47:35] <ojacobson> sheenobu: yeah
[03:48:02] <sheenobu> whoa final fantasy tactics for the iOS?!
[03:48:30] <ztj> yea, to go along with FF1, FF2, Secret of Mana, and soon FF3 (the ds remake ver. with updated graphics)
[03:48:35] <sheenobu> ah
[03:48:38] <sheenobu> <3 FFT
[03:48:42] *** senera has quit IRC
[03:48:56] * X-Scale got tricked into "Fast Fourier Transform" :o
[03:48:56] <sheenobu> I may just give up and start using python
[03:48:57] *** bolt has quit IRC
[03:49:38] <sheenobu> at least for my front-end aps
[03:49:55] <Planck_> heh, "Fast Fourier Transform" was my first thought too, until ztj said "played for 110 hours"
[03:50:16] <ztj> did python ever get over the whole "we have threads but make them utterly pointless" thing?
[03:50:24] <ojacobson> ztj: pypy is better at it
[03:50:26] <ojacobson> jython is obviously jython
[03:50:34] <ojacobson> python 3's GIL is less onerous but still present
[03:50:42] <ojacobson> (er, cpython3)
[03:51:19] <sheenobu> jython is useless, I believe. Last I heard python GIL and threading was still bad
[03:51:24] *** bkvb has joined ##java
[03:51:36] <ztj> Guido's a nice guy but that GIL shit is rank.
[03:51:40] <ztj> sheenobu: jython has been rebooted
[03:51:46] <ojacobson> Jython's fine if you can deal with python 2.5
[03:52:10] <ojacobson> If you need 2.7 for 3.0 compat you're still sunk, but the psf has been sinking money and brains into jython
[03:52:18] <sheenobu> besides pure python scrpiting, what can I do in jython for my web woes?
[03:52:30] <ojacobson> werkzeug
[03:52:36] <Planck_> Bless you.
[03:52:53] *** juggling has left ##java
[03:52:59] <ojacobson> I cooked up a tiny jaxrs-inspired framework based on werkzeug that should work in jython
[03:53:09] <ojacobson> if you can find a servlet<=>wsgi bridge, which I believe exist
[03:53:23] <sheenobu> Man I never really /got/ werkzeug. I was talking about it today, actually, it seems like an api for building frameworks
[03:53:26] <ojacobson> http://code.google.com/p/python-redfox/
[03:53:31] <ojacobson> That's kind of my take on it too - so I did
[03:53:47] <ojacobson> You can write apps directly in it, but you can write apps directly against the servlet api, too
[03:53:51] <ojacobson> doesn't mean it's really very comfortable
[03:53:54] <ztj> if it's not dead http://opensource.xhaus.com/projects/show/modjy
[03:54:07] <sheenobu> I'd like to use cherrypy. Don't know about it's jython support though
[03:54:51] <ztj> oh it's kind of dead
[03:54:56] <ztj> apparently it's part of jython now
[03:55:46] <ojacobson> It's always weird when my requests complete so fast that I can't even see the browser reload
[03:55:50] <ztj> ojacobson: I have perhaps finally gone mad. I drove ~300 mi. yesterday all for several photos of birds.
[03:56:32] *** Gracenotes has joined ##java
[03:56:52] <ojacobson> wrong channel? :)
[03:56:59] <ztj> they moved
[03:57:12] <ztj> damn draggable tabs :)
[03:57:34] <sheenobu> oi Gracenotes
[03:57:40] <sheenobu> been awhile -_-
[03:58:54] *** keyns has quit IRC
[04:00:15] *** matsebc has quit IRC
[04:00:39] <ojacobson> it's merge o'clock
[04:00:50] *** Wyvern666 has quit IRC
[04:01:28] * cheeser cues Europe
[04:01:45] <echosystm> there seems to be two places to get apache commons from with maven
[04:02:02] <echosystm> group: common-* or org.apache.commons...
[04:02:08] <echosystm> which is correct?
[04:02:10] <ojacobson> Merge ACCOMPLISH.
[04:02:18] <ojacobson> Modern scm tools are great.
[04:02:19] * cheeser spots the git user.
[04:02:23] *** bolt has joined ##java
[04:03:02] <ojacobson> It's protective camoflauge, I'm actually a mercurial nerd
[04:03:15] *** BeholdMyGlory has quit IRC
[04:03:19] *** Matuku has quit IRC
[04:03:46] <ztj> echosystm: I've been using the ones where the group and artifact have the same name
[04:03:55] <ddpanic> I'd like to learn struts2, are there any good books?
[04:03:58] <echosystm> thanks
[04:04:04] <ztj> ddpanic: history books?
[04:04:07] *** digs has joined ##java
[04:04:09] <ojacobson> Most of the commons stuff predates maven's dns-based groupId convention
[04:04:17] <ojacobson> ddpanic: the struts2 wiki is probably the best place to start
[04:04:30] *** djbpython has joined ##java
[04:04:50] <echosystm> is there anywhere else to get a base encode/decode function?
[04:05:00] <echosystm> it amazes me this isnt built into the jvm
[04:05:06] *** Mwa has quit IRC
[04:05:09] <ojacobson> commons-codec is probably the most widely used non-stupid choice
[04:05:13] <ojacobson> (sun.misc is a stupid choice :)
[04:05:15] <ztj> echosystm: it is built into the jvm, just not the JRE proper
[04:05:16] <echosystm> ok
[04:05:36] <ztj> you could also just write your own :)
[04:06:05] * ojacobson smacks ztj.
[04:06:11] <ztj> which was pretty much the first thing I ever did in java... not sure if commons-codec existed then
[04:06:21] <cbeust_> ddpanic: don't bother learning Struts 2 unless you're being paid a lot of money to do so
[04:06:28] <digs> I have a JTextField that I put an action listener on to make it easy for someone to press enter from it and "submit" their answer. If the answer is wrong, it displays a JLabel that says "try again", however, I can't figure out how to make the JTextField clear. Right now they have to hit backspace to clear their answer.
[04:06:54] <ztj> ojacobson: oh come on a base conversion is barely more complicated than a for loop :)
[04:07:09] <ojacobson> base64 involves bit positions within most octets
[04:07:17] <ojacobson> for the efficient implementation anyways
[04:07:26] <ojacobson> My faith in the average developer is lower than that :)
[04:07:33] <ztj> this is java, we don't need no stinkin' efficiency!
[04:07:40] <ztj> java 7 is expected to include it for us
[04:07:55] <ztj> :-D
[04:08:29] *** bolt has quit IRC
[04:09:38] <kalio> when is java 7 supposed to come out anyways
[04:09:43] <ztj> 2008
[04:09:47] <cheeser> july
[04:09:51] <cheeser> ztj: hahahaha
[04:09:55] <cheeser> yeah.
[04:10:14] <ztj> kalio: it's a little passed due
[04:10:28] <ojacobson> There's a developer preview now, isn't there?
[04:10:37] <ojacobson> Or some kind of feature-complete but not extensively bug-tested release, anyways
[04:10:41] <ojacobson> er, version
[04:10:42] <ojacobson> not release
[04:10:48] <cheeser> ojacobson: yeah. just released.
[04:10:50] <kalio> hahaha
[04:10:57] <ojacobson> Does glassfish run on it? :)
[04:11:04] <cheeser> excellent question!
[04:11:09] <ztj> I saw a netbeans 7 download that included it
[04:11:20] <cheeser> i don't think the dev release runs on a mac or i'd check.
[04:12:02] <ztj> Java 7 coming out in July would be appropriate considering $COMPANY has finally relented and will allow moving the java version requirement of our software to 1.6 as of this fall... FML
[04:12:39] <ojacobson> ztj: point, laugh
[04:13:00] * ztj hangs head in shame
[04:13:17] <cheeser> ~hug ztj
[04:13:17] * javabot snuggles up to ztj and strokes ztj's hair affectionately.
[04:13:19] *** pipeep has quit IRC
[04:13:46] <ojacobson> Wonder if maven runs on it
[04:14:04] *** bolt has joined ##java
[04:17:29] <digs> anyone?
[04:17:43] <ddpanic> cbeust_: I won't buy a book about struts 2, I need a book name, and see where I can download its E-Book version
[04:18:17] <ojacobson> ddpanic: how about you *don't* tell a room full of knowledge workers that you plan on not paying knowledge workers for their work?
[04:18:19] <cbeust_> ddpanic: sorry can't help you there. Just wanted to make sure you know that Struts 2 is a dead technology.
[04:18:56] <cbeust_> ddpanic: and... er, yes, if you were planning to download this book illegally, then get lost.
[04:19:41] *** cweagans has joined ##java
[04:20:43] <cweagans> any java developers around that feel like heading up development on a contributed project over at http://drupal.org/? The basic idea is to build a Mylyn plugin that integrates with Open Atrium. Between the mylyn connector and my other project, it would be a very good replacement for Jira, Unfuddle, or even Github.
[04:21:02] <ddpanic> cbeust_: Why struts2 became a dead technology? What replaced it in java world?
[04:21:04] <cweagans> Mylyn = Eclipse plugin
[04:21:07] *** pipeep has joined ##java
[04:21:49] *** sebersole has quit IRC
[04:24:38] <ojacobson> ddpanic: struts2 never really caught on
[04:24:59] <ojacobson> there's a hard core of webwork/struts2 users, though
[04:25:03] <ojacobson> ~web frameworks
[04:25:03] <javabot> Popular web frameworks: JSF, JAX-RS, Struts 2, Stripes, Wicket, Spring MVC, Grails, GWT, Play, and Click. Ask me about each for more info.
[04:25:35] *** ktorn has joined ##java
[04:26:06] *** brig has quit IRC
[04:26:26] <bob2> ~wicket
[04:26:26] <javabot> bob2, wicket is a component based web application framework written in java. See http://wicket.apache.org or ##wicket for more details
[04:26:48] <echosystm> anyone know of a library of simple servlet filters? ie. http basic auth
[04:26:55] *** Bombstone has quit IRC
[04:27:06] *** ojacobson has quit IRC
[04:27:13] <echosystm> google isnt giving me much love
[04:27:30] *** eyesUnclouded has joined ##java
[04:28:00] *** palyboy has quit IRC
[04:28:32] <ddpanic> ,, cs struts2
[04:28:40] *** freeone3000 has quit IRC
[04:29:21] *** ojacobson has joined ##java
[04:30:19] <ddpanic> struts2 offer lots of convenient tags which make your jsp file tidy
[04:30:32] *** ojacobson has left ##java
[04:30:36] *** ojacobson has joined ##java
[04:30:41] <ojacobson> fffff
[04:30:42] *** ojacobson has quit IRC
[04:31:03] *** ojacobson has joined ##java
[04:31:06] <ojacobson> There we go.
[04:31:50] <cbeust_> ddpanic: Short anwer: no. The world has moved on, you should do the same.
[04:33:32] *** palyboy has joined ##java
[04:33:58] *** chomping has quit IRC
[04:36:21] *** freeone3000 has joined ##java
[04:36:22] *** jesmon has joined ##java
[04:36:39] <ddpanic> So If I want to develop an web app based on java, what technologies should I choose? Not "SSH" - Struts, Spring, Hibernate?
[04:37:13] <jesmon> ddpanic: what kind of web application?
[04:37:48] *** Gracenotes has quit IRC
[04:38:50] *** eyesUnclouded has quit IRC
[04:43:29] *** chowder has joined ##java
[04:44:50] <chowder> How can I use regular expressions to find out if a string matches this pattern: 2 characters, first character is in the range (A-F) and the second is either a + or -.
[04:45:45] <cbeust_> [A-F][+-] might have to escape the + or - (but I don't think so)
[04:45:56] <cbeust_> Sorry missed one
[04:46:03] <cbeust_> [A-F][A-F][+-]
[04:46:19] <cbeust_> oh no never mind misread you, take my 1st solution
[04:46:41] <chowder> cbeust_, thanks
[04:47:13] <meeper> if you write to a memory mapped file will the reader immediately pick up on the changes?
[04:47:28] <meeper> man I love how long the android emulator takes to launch
[04:49:43] <ojacobson> [A-F][-+]
[04:49:46] <ddpanic> jesmon: like a online book shop
[04:53:12] *** bkvb has left ##java
[04:54:01] <digs> Okay. This is seriously annoying. I have tried everything I can think of. I have tried field.selectAll(); field.replaceSelection(); -- field.repaint(); and about 10 other combos. Can anyone tell me what I need to do short of removing and adding a JTextField to remove the text entered in it?
[04:54:20] <digs> It has been several hours over a couple days trying to get this right.
[04:54:43] <digs> field.replaceSelection(null);*
[04:55:29] <freeone3000> digs: .setText("");
[04:56:08] * digs sighs.
[04:56:16] <digs> There must be something else going on here. That does not work either.
[04:56:59] <digs> I will figure it out. thanks for responding freeone3000
[04:58:38] *** Gracenotes has joined ##java
[04:59:58] *** Garibaldi has quit IRC
[05:00:24] *** Sliker has quit IRC
[05:01:48] *** kalio has left ##java
[05:03:54] *** cweagans has quit IRC
[05:06:06] *** eyesUnclouded has joined ##java
[05:14:15] *** thelifelessone has joined ##java
[05:15:07] *** sigtau has quit IRC
[05:15:07] *** eyesUnclouded has quit IRC
[05:15:37] *** freeone3000 has quit IRC
[05:16:13] *** freeone3000 has joined ##java
[05:18:12] *** kinks_ has quit IRC
[05:18:52] *** thelifelessone has quit IRC
[05:20:32] *** pyrony has joined ##java
[05:23:34] *** ferret__ has joined ##java
[05:24:01] *** CodeWar has joined ##java
[05:24:03] *** ferret_ has quit IRC
[05:24:07] *** ferret__ is now known as ferret_
[05:26:29] *** homie has quit IRC
[05:26:47] *** openros has joined ##java
[05:27:36] *** ddpanic has quit IRC
[05:28:05] <CodeWar> ProcessBuilder.build() -> Process#destroy wondering if folks have used this successfully in the past
[05:28:13] <CodeWar> seems to be working on Linux/Solaris but not on windows
[05:28:31] *** chowder has quit IRC
[05:32:46] *** jesmon has quit IRC
[05:34:38] *** freeone3000 has quit IRC
[05:35:21] *** epalm has quit IRC
[05:37:14] *** c_axis has quit IRC
[05:38:44] *** freeone3000 has joined ##java
[05:39:53] *** homie has joined ##java
[05:40:11] *** thepro4ever has joined ##java
[05:40:15] *** thepro4ever has left ##java
[05:41:09] *** fuzzygroove has joined ##java
[05:45:36] *** freeone3000 has quit IRC
[05:49:28] *** freeone3000 has joined ##java
[05:50:46] *** Ryan45 has joined ##java
[05:50:48] *** bjornredtail has joined ##java
[05:50:54] <Ryan45> hello
[05:52:24] *** thelifelessone has joined ##java
[05:52:50] <Will123456> hey guys. been puzzling over this one for ages. is there any way at ALL i can have method A call method B passing in object C as an argument, when method B expects object D inherits/implements object C?
[05:53:27] <Will123456> I realise I can do this by doing a type conversion, but that feels so ugly
[05:54:36] <ojacobson> If you have a C reference that doesn't point to a D object, no
[05:54:46] <ojacobson> if it does (reliably), why isn't it a D reference in the first place?
[05:55:10] <ojacobson> There's an underlying principle here of "don't forget the type of a reference until you no longer need that part of its type"
[05:57:24] <Will123456> ojacobson: i'd rather not have method A know about object D, but i'd like method B know everything about object D
[05:57:55] <ojacobson> It can't be avoided, really
[05:58:25] <ojacobson> you can do some "clever" visibility-related tricks using package-visibility interfaces, but really, don't
[05:58:34] <ojacobson> instead of thinking about prevention, think about coherence
[05:58:43] <Will123456> coherence?
[05:58:49] <ojacobson> if method a calls class D-specific methods, why should that be a problem?
[05:58:55] *** Rubarb has joined ##java
[05:59:05] <ojacobson> So long as those methods have clearly-defined semantics, the receiver (the class D instance) shouldn't care *who* calls them
[05:59:15] *** Character7 has joined ##java
[05:59:42] *** CodeWar has quit IRC
[06:00:26] *** bojo has quit IRC
[06:01:13] <Will123456> method A belongs to a networking library i'm writing and i'd rather not have it contain any application specific code, whilst still allowing any application to create custom messages (objects with custom code that have methods called when the netcode works out message it's just received)
[06:01:55] <ojacobson> Generics may help here, depending on the shape of the API
[06:02:07] <ojacobson> you can use type parameters to let clients supply client-specific types
[06:02:08] <Will123456> so in this case method B would be the message's "called" method, object C being some generic "listener" the library knows about and object D being any interesting application-side object that actually does things
[06:02:13] <ojacobson> have a look at my event library, for example
[06:02:16] <ojacobson> ~event dispatching
[06:02:16] <javabot> ojacobson, event dispatching is Generally done with FooListener which implements a fooOccured method which takes a FooEvent. Classes then take a FooListener, adding it to an internal set, then that class calls fooOccured() on each FooListener, or see http://alchemy.grimoire.ca/m2/sites/ca.grimoire/event-dispatching/
[06:02:20] *** tokam has quit IRC
[06:02:25] <Will123456> thanks very much, i'll take a look :)
[06:02:35] <Will123456> i've been puzzling over how to do it with generics (hoping i can)
[06:02:49] <thelifelessone> Can anyone recommend some resources for learning Java? Everything I has taught me nothing so far.
[06:03:00] <ojacobson> You probably don't need two layers of indirection, but that's the basic idea
[06:03:09] <ojacobson> ~~ thelifelessone rbi
[06:03:10] <javabot> thelifelessone, rbi is http://download.oracle.com/javase/tutorial/reallybigindex.html
[06:03:21] <thelifelessone> Thanks.
[06:03:36] <thelifelessone> Does that teach using Eclipse?
[06:03:41] <ojacobson> No, why would it?
[06:03:50] <ojacobson> That's less to do with Java and more to do with your preferred IDE
[06:03:52] <ojacobson> Java itself is IDE-agnostic
[06:03:53] <thelifelessone> Everyone I've talked to says use Eclipse.
[06:04:01] <ojacobson> Let me offer a dissenting opinion, then
[06:04:04] <ojacobson> ~newbie IDEs
[06:04:05] <javabot> Newbies shouldn't start with IDEs. It's important to learn the environment and fundamentals of a language before offloading those to an IDE. Learn about packages and imports and classpaths. Learn how to compile and use the JDK tools. Get some basic grasp of the API layout. Learn how to do things then switch to an IDE to do them faster. See http://tinyurl.com/yvks48 and and http://tinyurl.com/2cpn6o for more info.
[06:04:32] <thelifelessone> Thanks again.
[06:08:48] *** bindaas has joined ##java
[06:09:43] *** mistik1 has quit IRC
[06:10:30] *** Rubarb has quit IRC
[06:10:34] *** Ryan45 has left ##java
[06:12:53] <thelifelessone> Does this (http://download.oracle.com/javase/tutorial/reallybigindex.html) tutorial help at all if I already know programming concepts (I know PHP and JavaScript)
[06:14:01] <ojacobson> "Effective Java" may be useful if you want to pick up some idiomatic style bits
[06:14:01] *** TheBeerinator has quit IRC
[06:14:20] <ojacobson> specific application domains (desktop, webapps, server apps, and so on) are mostly a matter of experience
[06:14:24] *** thelifelessone has left ##java
[06:14:57] *** TheBeerinator has joined ##java
[06:15:03] *** mistik1 has joined ##java
[06:15:25] *** GFlam has joined ##java
[06:16:56] *** bojo has joined ##java
[06:17:21] *** GFlam has left ##java
[06:17:24] *** Ryan45 has joined ##java
[06:19:14] *** lolsuper_ has joined ##java
[06:19:25] <Ryan45> was curious if its possible to open /dev/snd/dsp on a linux device from java and write directly to it
[06:20:33] <freeone3000> Sure. It's a file, treat it like one.
[06:20:54] *** zamN has quit IRC
[06:21:16] <freeone3000> You're probably better off using AudioOutputStream, which has all the same features (it even supports AU in addition to Linear PCM!) but works on other platforms.
[06:22:16] <Ryan45> i got usb audio working on my android tablet , now i am trying to map audio output to it
[06:25:40] *** quest88 has joined ##java
[06:26:13] *** digs has quit IRC
[06:26:58] <echosystm> is it necessary to .close() entitymanagerfactory objects ?
[06:27:07] <echosystm> i'm not using injection
[06:27:29] *** mrhota has joined ##java
[06:28:31] <echosystm> alternatively, how might i use @PersistenceUnit in jetty?
[06:32:10] *** nmx has quit IRC
[06:32:57] *** terranova has quit IRC
[06:33:29] *** ojacobson has quit IRC
[06:36:00] *** opakavic has joined ##java
[06:36:01] *** top^ has joined ##java
[06:38:08] *** nmx has joined ##java
[06:39:55] *** zamN has joined ##java
[06:41:12] *** homie has quit IRC
[06:41:44] *** openros has left ##java
[06:44:25] *** rretzbach has joined ##java
[06:45:10] *** VaNNi has quit IRC
[06:47:14] *** murz has joined ##java
[06:51:38] *** Character7 has quit IRC
[06:52:48] *** oso[OuT] is now known as oso96_2000
[06:53:59] *** devkhadka has joined ##java
[07:03:42] *** devkhadka has quit IRC
[07:04:02] *** supercosmonaut has quit IRC
[07:06:23] <moqq> i've got a java application that's computationally intensive. does anyone know if there are libraries/platforms that will let me run a server on a machine and submit/deploy jar files and have it run them (with some sort of realtime logging/status reporting)? i realize it probably wouldn't be very difficult to wire that up myself but it's rather tangential to what i want to spend my time on
[07:07:20] *** murz has quit IRC
[07:08:43] *** bojo has quit IRC
[07:11:49] *** ExtraSpice has joined ##java
[07:19:24] *** bojo has joined ##java
[07:21:00] *** Omen_20 has quit IRC
[07:22:46] *** zamN has quit IRC
[07:24:07] *** whoever has quit IRC
[07:27:13] *** dborba has joined ##java
[07:27:59] *** fuzzygroove has quit IRC
[07:28:21] *** Ryan45 has left ##java
[07:30:59] *** Glavata has joined ##java
[07:32:59] *** rretzbach has quit IRC
[07:35:48] *** echosystm has quit IRC
[07:46:25] *** glcrazy has joined ##java
[07:51:52] *** homie has joined ##java
[07:53:41] *** talios has joined ##java
[07:53:54] *** bojo_ has joined ##java
[07:56:45] *** bojo has quit IRC
[07:57:08] *** dmiles_afk has quit IRC
[07:57:46] *** dmiles_afk has joined ##java
[08:07:02] *** compengi has quit IRC
[08:07:34] *** plarsen_mtn has quit IRC
[08:09:50] *** Radu-Mihail has joined ##java
[08:10:07] *** djbpython has quit IRC
[08:10:14] *** [[thufir]] has joined ##java
[08:13:05] <Radu-Mihail> Good morning, everyone.
[08:13:42] *** syphar has joined ##java
[08:15:42] *** coalado has joined ##java
[08:17:38] *** wchun has joined ##java
[08:17:48] *** Error404NotFound has quit IRC
[08:18:13] *** zhulikas has joined ##java
[08:21:28] *** Pozejdon has joined ##java
[08:21:50] <svm_invictvs-> moqq: For what kind of computations?
[08:22:49] <moqq> sadly something that wouldn't work well with hadoop
[08:22:55] *** zhulikas has quit IRC
[08:23:14] <moqq> just a lot of math
[08:23:59] *** Radu-Mihail has quit IRC
[08:24:23] <svm_invictvs-> moqq: Yeah :-/
[08:24:36] <moqq> the algorithm parallelizes(sp?) very well, so getting it distributed is also on the roadmap - i was looking into kilim
[08:26:58] *** Niamkik has joined ##java
[08:27:08] *** simoncpu has left ##java
[08:29:21] *** DJClean has joined ##java
[08:29:39] *** devkhadka has joined ##java
[08:29:59] *** sako has joined ##java
[08:30:43] *** lunatik210 has joined ##java
[08:31:56] *** Soliah has joined ##java
[08:32:16] *** tewecske has joined ##java
[08:33:21] *** Error404NotFound has joined ##java
[08:34:24] *** ddpanic has joined ##java
[08:34:37] *** Develman has joined ##java
[08:36:03] *** etpace has quit IRC
[08:36:18] *** Cobi has quit IRC
[08:36:20] *** mrhota has quit IRC
[08:36:40] *** cyphorious has joined ##java
[08:41:04] *** Matic`Makovec has joined ##java
[08:43:21] *** Ch30ps has joined ##java
[08:43:36] *** cyphorious has quit IRC
[08:44:23] *** L-----D has quit IRC
[08:44:48] *** mrhota has joined ##java
[08:48:52] *** ormaaj has quit IRC
[08:50:05] *** surial has joined ##java
[08:50:27] *** ormaaj has joined ##java
[08:51:27] *** maxfreelan has joined ##java
[08:51:51] *** X-Scale has quit IRC
[08:52:16] *** t0rc has quit IRC
[08:52:21] *** homie has quit IRC
[08:54:10] <grug>
[08:54:13] <grug> woops lol
[08:54:22] *** kinks has joined ##java
[08:56:13] *** choongii has quit IRC
[08:58:03] *** Error404NotFound has quit IRC
[09:01:13] *** Matic`Makovec has quit IRC
[09:01:36] *** mazzachre has joined ##java
[09:03:32] *** cbeust_ has quit IRC
[09:05:00] *** mpholt has quit IRC
[09:05:05] *** CodeWar has joined ##java
[09:05:35] *** oso96_2000 is now known as oso[OuT]
[09:05:56] *** youssef has joined ##java
[09:06:15] *** scruz has joined ##java
[09:06:46] <youssef> Good morning. I am trying to download the JDK from http://download.java.net/jdk7/ but it tells me page not found. Can someone recommend me a good mirror?
[09:08:22] *** eitch0000 has joined ##java
[09:08:33] <youssef> I have tried the "Windows X64", the "Windows Platform" the self-extracting JDK, the JRE.... always same reply "Page not Found"
[09:08:47] *** Cobi has joined ##java
[09:08:53] <Cogito> does the java6 work?
[09:09:29] <scruz> hi i'm having an issue with Arrays.asList(). I'm feeding it an array of Strings, and it's separating the strings by character: http://pastebin.com/fmVSB87J
[09:10:28] *** jonkri has joined ##java
[09:10:28] <Cogito> scruz, I think that is the intended behaviour
[09:10:28] <Cogito> you want to split the strings probably
[09:10:28] <scruz> i already did.
[09:10:28] *** dborba has quit IRC
[09:10:34] <scruz> did you look at the pastebin?
[09:10:48] <scruz> line 7
[09:11:16] <Cogito> hmmm yeah
[09:11:35] <youssef> Cogito: I have not tried. I am interrested in Java 7
[09:11:39] <Cogito> only thing I can recommend, as I am not an expert, is to debug
[09:11:41] *** homie has joined ##java
[09:11:50] <Cogito> youssef, only suggested it to see if it is up or down
[09:11:57] *** frangiz has joined ##java
[09:12:41] <scruz> is there a method/constructor that converts an array to a list?
[09:12:57] <scruz> other than Arrays.asList(), that is
[09:13:12] <scruz> youssef: same thing here.
[09:13:13] <Cogito> I think that is the intended way
[09:13:22] *** Error404NotFound has joined ##java
[09:13:30] <CodeWar> write one
[09:14:08] *** Clete2 has quit IRC
[09:15:03] *** nchaimov has quit IRC
[09:15:29] *** shanemcintyre has quit IRC
[09:15:33] *** nchaimov has joined ##java
[09:15:47] *** lunatik210 has quit IRC
[09:16:23] <scruz> the problem seems to be with String.split()
[09:16:59] <youssef> thanks scruz for the info
[09:18:51] *** CodeWar has quit IRC
[09:18:58] <scruz> or specifically, my understanding of how it works
[09:20:11] <scruz> i want to split() specifically on | and ~
[09:20:33] <ztj> split takes a regex
[09:20:36] <Cogito> to make a nested list?
[09:20:41] <Cogito> or to make one list
[09:20:56] <scruz> Cogito: one list
[09:21:06] <Cogito> yeah, then do it in one statment
[09:21:32] <scruz> in the same source string, ~ is a line delimiter, and | is a field delimiter. so i guess it's a nested list
[09:21:40] <scruz> sorry, my bad
[09:21:43] <Cogito> ok
[09:21:45] *** crypto-- has joined ##java
[09:21:53] <Cogito> so you need to do two calls
[09:21:56] <scruz> ztj: i found out later
[09:22:13] <scruz> how can i escape the character i want to split on?
[09:22:19] <ztj> \\
[09:22:24] *** passwordoff has joined ##java
[09:22:32] *** Clete2 has joined ##java
[09:22:37] <passwordoff> Hello, world!
[09:23:35] <scruz> ztj: thanks. works like a charm!
[09:23:55] *** Radu-Mihail has joined ##java
[09:26:00] *** Soliah has quit IRC
[09:26:09] <surial> scruz: If you want to split in one go, try [~|] as a pattern.
[09:26:17] <surial> No need to escape the pipe inside a character set.
[09:26:46] <scruz> surial: won't work. in my source text, ~ is a line delimiter, and | is a field delimiter in each line
[09:26:50] <Cogito> he want to do it nested
[09:26:54] <Cogito> wants*
[09:27:01] <ztj> That's one of those statements that, if read with the intentional exclusion of software development related terminology, sounds really ridiculous
[09:27:06] <ztj> but almost meaningful
[09:27:25] <scruz> :P
[09:27:42] <ztj> (referring to surial's second message)
[09:28:03] *** Soliah has joined ##java
[09:28:53] *** frangiz_ has joined ##java
[09:29:27] *** prc33 has joined ##java
[09:29:30] *** frangiz has quit IRC
[09:29:40] *** prc33 has quit IRC
[09:32:04] *** Soliah has quit IRC
[09:33:04] *** TzilTzal has joined ##java
[09:33:19] *** Kraln has quit IRC
[09:33:36] *** harpal has joined ##java
[09:34:28] <harpal> Is it good practice to thow own exception from function? does exception overhead to program?
[09:34:31] *** Radu-Mihail has quit IRC
[09:35:20] *** Kraln has joined ##java
[09:38:42] <ztj> exceptions represent overhead, yes. Whether it's right to throw your own or a standard one or something is situational as well as philosophical. You'll find varying opinions on that matter.
[09:42:02] *** Radu-Mihail has joined ##java
[09:42:28] <youssef> see you
[09:42:31] *** youssef has left ##java
[09:43:05] <harpal> ztj: Ohh, So try to avoid throwing exception as possible?
[09:43:38] *** Behi has joined ##java
[09:45:40] *** remonvv has joined ##java
[09:47:30] <remonvv> Hi. Given public class MyClass<T> {...} how do I get the class instance representing T? Basically looking for the field.getGenericType() equivalent for this.getClass()
[09:48:54] <DroidAgent> harpal: sure but don't be obsessive about it... there's a lot of cases where an exception makes for cleaner code and the overhead is minimal. But if you find yourself writing huge try/catch blocks, rethink.
[09:50:40] <harpal> DroidAgent: I am executing some commands which returns true false. depend upon that I am replacing files. but there is not clear way which command causes problem
[09:51:05] <DroidAgent> Maybe post a code snippet and some stack traces so people can take a look.
[09:52:46] *** jaykay has joined ##java
[09:54:44] *** top^ has quit IRC
[09:54:45] *** thpar has joined ##java
[09:56:40] *** Denebola has joined ##java
[10:03:13] *** Develman has quit IRC
[10:10:06] *** Sambler has joined ##java
[10:12:46] *** jaykay has left ##java
[10:12:51] *** aLeSD has joined ##java
[10:12:53] <aLeSD> hi all
[10:13:34] <aLeSD> which is the best solution to pass a class n points of m dimensions ?
[10:14:01] <aLeSD> I was thinking of float[][] .. but maybe a Vector<Vector<Float>> is better
[10:14:33] <Cogito> are n and m variable?
[10:14:35] *** ormaaj has quit IRC
[10:14:46] <aLeSD> Cogito, yes
[10:15:27] <Cogito> I would suggest a list of some custom class that you write
[10:16:04] <aLeSD> Cogito : somethign like List<myPoint>
[10:16:08] <Cogito> the class is a point class which has multiple dimensions
[10:16:10] <Cogito> yes
[10:16:16] <Cogito> sorry, variable dimensions
[10:17:01] <aLeSD> np
[10:17:17] <Cogito> the way of storing the dimensions depends on how you wish to use them
[10:17:43] <Cogito> but it will allow you to abstract functions on your points
[10:19:28] *** mah01 has joined ##java
[10:19:36] <aLeSD> Cogito, they are points in n dimension space ... to draw a graph
[10:19:43] <Cogito> sure
[10:19:53] <Cogito> I have done just a little maths ;)
[10:20:01] <aLeSD> lol .. sorry
[10:20:07] <Cogito> what is this graph represantative of?
[10:20:14] <Cogito> oh, I was just informing you
[10:20:26] <Cogito> didn't mean to be abrupt
[10:21:14] <aLeSD> generic .. 3 dimesional sensor or maybe sensor with 3 angles values and the norm
[10:21:42] <Cogito> sure, but do you want to render the points, or some statistic on the point set?
[10:21:54] <aLeSD> Cogito, render
[10:22:12] <Cogito> so, why are you bothering with n dimensions?
[10:22:21] <Cogito> you can only render 3, at tops 4
[10:23:16] <aLeSD> well .. I was wrong before ... tha values aren't 'always' a space dimension
[10:23:40] <aLeSD> maybe I want to draw temperature, xyz position, light intensity
[10:23:53] <Cogito> ok, but are you trying to render all dimensions of the points?
[10:24:00] *** dreamreal has quit IRC
[10:24:10] <Cogito> or just the spatial ones?
[10:24:19] <[[thufir]]> why wouldn't temp be a dimension?
[10:24:19] <aLeSD> Cogito, yes .. in 2d graph
[10:24:34] <Cogito> [[thufir]], it is
[10:24:42] <aLeSD> I will use in x_graph always the timeline
[10:24:45] <Cogito> sorry, yes all dimensions, or yes spatial?
[10:25:24] <aLeSD> Cogoto all dimensions
[10:25:42] <Cogito> ok, but how do you intend to reprresent them?
[10:25:54] <aLeSD> points or lines
[10:26:24] *** xiliax has joined ##java
[10:26:57] <Cogito> sorry, it is not possible to render more than 4 dimensions easily
[10:27:06] <Cogito> I am not sure how you intend to overcome that
[10:27:19] <Cogito> even four dimensions is hard with a static image
[10:27:26] <Cogito> (most people use colour)
[10:28:28] <aLeSD> Cogito, the graph will be 2D . I will have in x the first vector of elements and in y all the other vectors (with different colors)
[10:28:48] <aLeSD> for example
[10:29:10] <Cogito> ok, but still, you will lose some resolution, as you can at most render 3-4 dimensions
[10:29:47] <aLeSD> if I want to draw a 3d point (x,y,z) I will pass to the class (t,x,y,z) ... it will draw a line of a color for (t,x) (t,y) (t,z). 3 lines
[10:30:01] *** mapreduce has joined ##java
[10:30:01] *** sd1074_2 has joined ##java
[10:30:20] <Cogito> hmm ok
[10:30:27] <Cogito> shouldn't be too hard
[10:30:32] <Cogito> the lines coming from origin?
[10:30:50] <Cogito> I guess you are doing one point per graph
[10:31:19] <aLeSD> the lines start with the first element
[10:32:10] <aLeSD> I am only tring to find out the 'best' solution to pass the values to he class
[10:32:53] <Cogito> sure
[10:33:03] <Cogito> I was just interested
[10:33:05] <Cogito> :)
[10:33:36] <aLeSD> :)
[10:35:31] *** supercosmonaut has joined ##java
[10:35:33] *** drindt has joined ##java
[10:35:49] <aLeSD> or maybe I could pass like setValues(int nElem, float[] x, float[] y1, float[] y2, float[] y3 ... )
[10:37:07] <Cogito> if you want to use java, you should really use objects
[10:37:31] <Cogito> otherwise, other languages may be better suited to you
[10:37:41] <Cogito> that being said, its not always an option
[10:37:49] *** icebrain has joined ##java
[10:37:59] <Cogito> however what you suggested is almost certainly the wrong way
[10:38:22] <aLeSD> why? (I really come from c/c++) ;)
[10:39:00] <Cogito> yeah
[10:39:04] <Cogito> I love C
[10:39:12] <Cogito> in fact I am better at it then java
[10:39:18] <Cogito> but for this it is the wrong way
[10:39:23] <Cogito> you want a point class
[10:39:40] <aLeSD> I want a point class
[10:39:43] <Cogito> so that you can send it to a draw function etc
[10:39:53] * Cogito waves hand slowly
[10:40:00] <Cogito> you want to use lists of points
[10:40:08] <ztj> ~javadoc Point
[10:40:08] <javabot> ztj: http://is.gd/gQ7lpV [JDK: java.awt.Point]
[10:40:13] <aLeSD> I want to use list of points
[10:40:25] <Cogito> ztj, he needs multi dimensional points
[10:40:50] <Cogito> you know, you have me interested
[10:41:01] <Cogito> What is this project for?
[10:42:13] *** bobo123 has joined ##java
[10:42:29] <Cogito> also, how generic do you need it to be? for example, will every vector (better word for what we are doing) be a 3-d point with associated data?
[10:42:31] <bobo123> is there a way to get a screenshot from a Swing window in Java?
[10:43:02] <aLeSD> Cogito, sensor on a smatphone
[10:43:08] *** dreamreal has joined ##java
[10:43:32] <aLeSD> acelerometer, magnetometer, orientation sensor, gravitometer, proximity sensor
[10:43:35] <aLeSD> etc etc
[10:44:07] <mapreduce> bobo123: Robot
[10:44:08] <ztj> ~jfreechart
[10:44:09] <javabot> ztj, what does that even *mean*?
[10:44:10] <surial> ~~ bobo123 javadoc Robot.createScreenCapture(*)
[10:44:10] <javabot> bobo123: http://is.gd/De0s4v [JDK: java.awt.Robot.createScreenCapture(Rectangle)]
[10:44:18] <ztj> hm
[10:45:05] <ztj> http://www.jfree.org/jfreechart/
[10:45:17] <passwordoff> ~paste
[10:45:17] <javabot> http://paste.pocoo.org/ - Paste the final url after you've pasted your stuff there.
[10:45:50] <mapreduce> ~jfreechart is http://www.jfree.org/jfreechart/
[10:45:50] <javabot> OK, mapreduce.
[10:46:03] <surial> aLeSD: embrace polymorphism. Make each such unique data point its own class, and have them all implement at least 1 interface, with whatever features you need to be uniform (and uniformly accessible) for all of these data points.
[10:46:50] <mapreduce> I tried to embrace polymorphism, but she told me I was an unwelcome visitor, and she'd prefer to remain a singleton than compose with me.
[10:47:01] <surial> aLeSD: This way, if you want to write code that needs to be able to handle any data, you code to the interface that all of these data classes share. And if you need to write code that is only relevant for, say, acceleration measurements (accelerometer and gravitometer), then you can make an interface for that and code to it. This lets you put code that's specifically for e.g. gravitometer in the gravitometer-related class and not smeared a
[10:47:02] <surial> over your project.
[10:47:03] <aLeSD> lol
[10:47:40] <aLeSD> ok ... thinking
[10:48:10] * mapreduce idly wonders how a gravitometer differs from an accelerometer.
[10:48:10] <surial> aLeSD: Also, a method that takes 8 double[] arrays needs a hell of a lot of documentation to explain properly what each double array is for and exactly what the values for each would look like. Contrast this to a method that takes, say, a List<DataPoint> and then its fairly clear that you can just shove whatever data points you want at this particular methods, as evidently it can handle any of em. Or it's a List<GravityData> and you know yo
[10:48:10] <surial> give this method only gravity data - the types document what the method does.
[10:48:17] <surial> mapreduce: That crossed my mind too :P
[10:48:29] <mapreduce> Ah, it's a type of accelerometer.
[10:48:52] <surial> ... I'm fairly sure phones have only the one accelerometer, which you can use to measure gravity as well. Just hold your phone still.
[10:49:21] <surial> ... and it's the orientation sensor as well, or could be at any rate.
[10:49:38] <mapreduce> No, I think those are generally separate.
[10:49:58] <mapreduce> The gyroscope.
[10:50:27] <ztj> the accelerometer is used to measure gravity and most devices have 3
[10:50:31] <mapreduce> We have a problem with our security cameras that go in buses, they have an accelerometer (from the wii controller or something apparently) but no gyroscope.
[10:50:38] <ztj> (the iphone absolutely definitely has 3, a gyro and a compass)
[10:51:20] <mapreduce> So we end up having to calibrate the thing on a typical road (most roads tilt towards the kerb)
[10:51:20] <ztj> mapreduce: does it cause issues around corners?
[10:51:30] <ztj> ah
[10:51:40] <mapreduce> Yes, but the bigger problem is that the installer doesn't want to install it at a fixed angle.
[10:51:47] <mapreduce> s/fixed/supported/
[10:51:54] <ztj> heh
[10:52:00] <surial> mapreduce: I'd think that with sufficiently smart software and sufficient granularity on the sensor, a single accelerometer can over time tell you acceleration, planet's gravity, and orientation (relative to planet). Assuming this isn't Speed, the Movie, and the bus is swerving all over the place.
[10:52:10] <surial> mapreduce: Oh... yeah. That makes sense.
[10:52:17] <mapreduce> Over time, yes, but it does complicate the software to do that.
[10:52:32] <mapreduce> And if the stuff is used in court it's best kept simple.
[10:52:42] <surial> mapreduce: Big calibrate button somewhere on the top or other hard-to-access place which must be pressed when the bus is stationary?
[10:52:45] <ztj> in the wii dev kit you're actually provided the tools to develop and train neural nets to process accel. data
[10:52:56] <mapreduce> surial: Stationary and *on a typical road*.
[10:53:07] <surial> Well, jesus. I live in flat country.
[10:53:13] <mapreduce> Stationary in the bus depot is probably on a completely flat surface.
[10:53:20] <mapreduce> surial: Does your country have no rain?
[10:53:22] <surial> Which idiot would live in a place with non-flat surfaces anyway?
[10:53:31] <ztj> surial: surely your civil engineers tilt the roads towards the drainage gutters
[10:53:32] <surial> mapreduce: It rains on the plains.
[10:53:40] <mapreduce> surial: As I said earlier, most roads are tilted toward the kerb.
[10:53:45] <surial> Yeah, true.
[10:53:52] <mapreduce> Most bus depots.. aren't.
[10:53:56] <mapreduce> They're flat expanses.
[10:53:58] <Cogito> lol you guys
[10:54:08] *** TzilTzal has quit IRC
[10:54:37] <Cogito> a simple accelerometer is not able to posiiton you correctly, even if perfectly accurate
[10:54:39] <surial> mapreduce: What data are you after?
[10:54:42] <Cogito> is my understanding
[10:54:56] <surial> mapreduce: Presumably you don't actually care if the bus is physically listing to a side, that's not why you have an accelerometer.
[10:54:59] <Cogito> and my typing sucks
[10:55:08] <ztj> there's no sense in using just one these days, they come in units with 3 sensors packed together as it's so commonly used now
[10:55:17] <passwordoff> To any apache VFS coder: http://paste.pocoo.org/show/346222/ at the [8] fc.getOutputStream() shows null pointer
[10:55:27] <Cogito> ztj, that is still an accelerometer though
[10:55:35] <surial> Cogito: You mean GPS-like position? No - errors compound. If it's _perfectly_ accurate you could do it, but no sensor is, obviously, and even the slightest flaw rapidly compounds.
[10:55:36] <Cogito> just it uses multiple internal sensors
[10:55:43] <Cogito> surial, not correct
[10:55:44] <ztj> Cogito: 3 axis, is what I meant
[10:56:01] <Cogito> it relies on intertial frames
[10:56:19] <Cogito> which when you go around a corner on a bus it screws up
[10:56:24] <Cogito> which is why*
[10:56:35] <Cogito> frames of reference*
[10:56:37] <Cogito> gosh
[10:56:41] *** frangiz_ has quit IRC
[10:56:46] <Cogito> I have had a long day
[10:56:52] <Cogito> you need a gravitometer
[10:56:53] *** remonvv has left ##java
[10:56:58] <surial> Cogito: Given a perfect accelerometer along with 100% known starting information, you should be able to track exactly where you are. But, you're using a meter that measures the second derivative to extrapolate the original, so any flaw, even a tiny one, compounds over time.
[10:57:02] <Cogito> acts like a plumbob
[10:57:23] <ztj> surial: right, or you use the right sensor(s) for the job
[10:57:24] <Cogito> surial, the method is itself flawed
[10:57:37] <surial> Cogito: I'm fairly sure you're wrong there. If you know, perfectly, the acceleration of an object, and you knew the position + velocity when you started out, you know exactly where the object is (and how fast it's going).... given a perfect sensor.
[10:57:38] <Cogito> the sensor doesn't catch enough data
[10:57:58] <Cogito> but an accelermoter does not give you the absolute acceleration
[10:58:10] <aLeSD> I could use setValues(List<Point2d>){}; setValues(List<Point3d>); setValues(List<Point4d>) ... etc etc
[10:58:16] <Cogito> for example, it does not tell you the acceleration of the earth about the sun
[10:58:30] <surial> Jesus, am I talking to a fucking wall here? This is theoretic wankery. No sensor is even remotely close to accurate enough to be anywhere near accurate on position for more than a minute or so, because as I said the compounding of the error over 2 derivates is gigantic.
[10:58:52] <Cogito> I am talking about a sensor called an acceleromter
[10:58:53] <surial> Cogito: It does, actually.
[10:58:56] <ztj> surial: right so that would make you the wanker for insisting on talking about non-existent things
[10:59:01] <surial> Cogito: Yes. It measures acceleration. Hence the name.
[10:59:03] *** Radu-Mihail has quit IRC
[10:59:16] <surial> ztj: Cogito started down this path, not me.
[10:59:28] <Cogito> I believe (I am happy to be proved wrong) that the way it does that relies upon an intertial frame of reference
[10:59:40] *** mrnoda has joined ##java
[10:59:47] <Cogito> a sensor that does not rely upon such a thing would not be called an accelerometer
[10:59:56] <Cogito> because we already have a sensor called that
[11:00:02] <ztj> Cogito: intertial isn't a word
[11:00:09] <surial> aLeSD: Not sure you're getting the point, there. If you can support a setValues on any dimension point, then create a superinterface implemented by Point2d, Point3d, etc, and have just the setValues(List<PointAnyD>) method.
[11:00:14] <Cogito> interial frame of reference?
[11:00:18] <Cogito> inertial
[11:00:19] <Cogito> *
[11:00:25] <ztj> there you go
[11:00:40] <Cogito> I am being dyslexic tonight, sorry
[11:00:45] * ztj shrugs
[11:00:50] <ztj> it's all a waste of bytes anyway
[11:01:08] *** frangiz has joined ##java
[11:01:18] <Cogito> anyhow, we have a sensor that does not rely on an inertial frame of reference, it is an accelerometer and a gravomiter
[11:01:21] <Cogito> in combination
[11:01:38] <surial> Cogito: Let me try this again. Given (A) The *EXACT* position *AND* velocity at time t0, and (B) a set of acceleration data that is perfect and complete for the time range between t0 and tX, then (C) You can tell with perfect accuracy the place, speed, and current acceleration at point tX.
[11:02:00] <Cogito> I agree, as so far as we can measure something and know it to be true
[11:02:11] <Cogito> that is, to some level of accuracy
[11:02:18] <Cogito> but that is not my point
[11:02:19] <surial> Cogito: "Inertial Frame of Reference" is basically that initial position and velocity (so if you want to take into account the earth moving through space, you'll need to know the exact velocity of the earth through space as well when you start the measurement).
[11:02:55] *** teralaser has joined ##java
[11:03:04] *** disaster_02 has joined ##java
[11:03:10] <Cogito> the point I was making is the sensor we call an accelerometer can not give accurate absolute acceleration data
[11:03:19] <Cogito> due to its nature
[11:03:28] <surial> However, I think you've got a point: An accelerometer should pick up the acceleration of the earth as it moves through space, but obviously for position, we're probably interested in our position relative to earth, not relative to the sun or our galaxy or whatnot. The meter has no way to account for hte fact that the earth is moving (accelerating), and thus cannot tell you relative to earth where you are over time, even if perfectly accurat
[11:03:29] <surial> Cool.
[11:03:47] <Cogito> and the way we do that is using a gravomiter
[11:03:56] <surial> .... no we don't.
[11:03:59] <Cogito> yep
[11:04:01] <surial> The way we do that is with GPS.
[11:04:04] <Cogito> nope
[11:04:07] <surial> Yep.
[11:04:11] <Cogito> I mean, using sensors
[11:04:18] <Cogito> GPS is not really a sensor
[11:04:23] <ztj> surial: gps won't tell you which way is up or down
[11:04:24] <Cogito> in the sense we are talking
[11:04:33] <surial> By the way, a gravomiter? Is the hat the pope wears when he's got something particularly deep to say?
[11:05:03] <surial> ztj: An accelerometer will tell you which way is up or down. A gps unit will tell you where you are, which I just established an accelerometer, even ap erfect one, just can't do.
[11:05:45] <surial> A gravimeter is just a really accurate accelerometer. Read up.
[11:06:00] <aLeSD> surial, ok .. and in the inteface I have to set a getDimensions() functions to know how many it has ... is it ?
[11:06:02] <surial> (for them to work right, for example, they can't be moved at all while they take a measurement).
[11:06:07] <surial> aLeSD: For example.
[11:06:08] <Cogito> s/gravomiter/gravitometer
[11:06:16] <surial> aLeSD: though in general you don't want to be coding to subinterface.
[11:06:25] <Cogito> or whatever
[11:06:48] <surial> aLeSD: i.e. if your code is a bunch of if (x instanceof Point3D) { .... }, you're doing it wrong. And adding a getDimensions() method, if you use like: if(x.getDimensions() == 3) { ....} or switch(x.getDimensions()), well, that boils down to the same thing.
[11:06:56] <surial> Cogito: It's called a gravimeter.
[11:07:02] <Cogito> really?
[11:07:10] <Cogito> isn't that the combination of both?
[11:07:25] <surial> .... and it's just a name for an accelerometer designed to be very accurate if not moved.
[11:07:27] <Cogito> I should really go read about it
[11:07:35] <surial> Cogito: A miter is a pope's hat.
[11:07:48] <surial> http://en.wikipedia.org/wiki/Gravimeter http://en.wikipedia.org/wiki/Miter
[11:08:00] *** ormaaj has joined ##java
[11:08:52] <mapreduce> I'm glad there's a name for a pope's hat. I keep leaving mine around and never know what to call it.
[11:08:57] <Cogito> <surial> Cogito: It's called a gravimeter. - from the wiki article "A gravimeter or gravitometer..."
[11:09:02] <surial> And a gravomiter is presumably the hat the pope wears when the clergy feel him up to say, in latin of course, "Testiculos habet et bene pendentes".
[11:09:33] <surial> Cogito: Ssh. I'm still giggling at my own infantile humour.
[11:09:43] *** youssef has joined ##java
[11:09:55] *** bjornredtail has quit IRC
[11:10:02] <youssef> Hi. Could someone recommend me a library to draw trees?
[11:10:12] <aLeSD> surial I was thinking in for (int n = 0; n < x.getDimension();n++) { draw(x.getValues(0), x.getValues(n)); }
[11:10:25] <surial> aLeSD: Sure, that's fine.
[11:10:26] <mapreduce> Massachussets Central Library is an appropriate place to draw trees.
[11:10:31] *** ddpanic has left ##java
[11:10:32] <Cogito> you mean mathematical/computer sicence trees, or the natural type?
[11:10:32] <mapreduce> They practically encourage it.
[11:10:46] <aLeSD> surial, I prefer c
[11:10:46] <surial> Though why draw needs the first and Xth value in a point is a bit weird to me, but presumably you thought this trough.
[11:10:49] <aLeSD> :D
[11:10:59] <surial> aLeSD: So you keep saying.
[11:11:24] * mapreduce segfaults
[11:11:37] <surial> aLeSD: And your continued insistence on smearing your code out into a hypothetically optimized (on modern CPUs, it isn't, but hey) but unmaintainable mess o' spaghetti proves it.
[11:11:55] <Candle> youssef: Swing, JTree
[11:12:19] <mapreduce> Spaghetti Madness!
[11:12:38] <surial> youssef: Check a screenshot first, there are at least 15 different concepts I can think of that are totally different, are all related to computer science in some form, and are all termed "tree". Or try and be more specific / mspaint up an example.
[11:12:42] <Candle> ~~ youssef javadoc JTree
[11:12:42] <javabot> youssef: http://is.gd/RbzD59 [JDK: javax.swing.JTree]
[11:12:46] <mapreduce> Archiva seems to have lost some jar files recently.
[11:13:11] <surial> youssef: .... I want the MSpainted example now. Come on! Start your pencils!
[11:13:11] <mapreduce> All the metadata shite is still there (.xml files) but no binary.
[11:13:31] <Cogito> surial, I guess the first paragraph of http://en.wikipedia.org/wiki/Accelerometer sums up what I was saying earlier
[11:13:43] *** FrozenKnight has joined ##java
[11:14:33] <surial> Cogito: But the frame is the bus, which is what we were trying to measure.
[11:15:11] <surial> Assuming the mount doesn't shake at all, which from my experience with busses is a hopless assumption :)
[11:15:13] <Cogito> that is fine - but your assertion that a perfect accelerometer can predict your position exactly is flawed
[11:15:17] <surial> s/hopless/hopeless
[11:15:28] <surial> Cogito: No it isn't.
[11:15:29] <youssef> thanks all. See you
[11:15:32] <Cogito> see oyu
[11:15:33] *** youssef has left ##java
[11:15:49] <Cogito> I mean, insomuch that we call an acceleromter an accelerometer
[11:16:11] <surial> No MSPaint?
[11:16:12] * surial pouts.
[11:16:32] <Cogito> if you talk of a magic device that can measure your exact acceleration, that is a different story
[11:16:43] <Cogito> but what we call an accelerometer is not that device
[11:16:54] <Cogito> or even a crude representation of it
[11:17:19] <surial> The cheap ones we dump all over our smart phones are more properly called weightometers, sure.
[11:17:26] <Cogito> well, I guess it is a very crude representation of it - but it does not measure acceleration
[11:17:40] <Cogito> from the wiki - An accelerometer is a device that measures the proper acceleration of the device.
[11:17:49] <Cogito> not the actual acceleration
[11:17:54] <Cogito> or perfect acceleration
[11:18:32] <surial> Cogito: I believe you forgot the 'usually' that's in there.
[11:20:52] *** magentar has joined ##java
[11:21:59] *** talios has quit IRC
[11:22:01] *** stimpie has joined ##java
[11:25:36] *** bobo123 has quit IRC
[11:27:10] <scruz> thanks for all the fish, everyone. problem solved
[11:27:43] <scruz> aka python code successfully replicated in java
[11:29:03] *** HandheldPenguin has joined ##java
[11:31:00] <Cogito> surial, there is no 'usually' in the version I am reading
[11:31:08] *** frangiz has quit IRC
[11:31:58] *** mrnoda has quit IRC
[11:32:23] *** frangiz has joined ##java
[11:32:33] *** jankoprowski has joined ##java
[11:32:34] <jankoprowski> Hi.
[11:32:55] <jankoprowski> I need include Jython and JRuby jars inside my application (also as jar file).
[11:33:26] <jankoprowski> Is it possible to "include" somehow this two jars inside my application jar to use it?
[11:33:59] <ztj> there are ways
[11:34:09] <ztj> from the simplistic naive merging
[11:34:13] <ztj> to toos like
[11:34:14] <ztj> ~fatjar
[11:34:14] <javabot> ztj, fatjar is a jar file compiled from several other jars, see http://fjep.sourceforge.net/
[11:34:26] <ztj> or shade plugin if you use maven
[11:34:33] <ztj> or jarjar
[11:34:34] <ztj> ~jarjar
[11:34:34] <javabot> jarjar is yet another utility to repackage jars and embed them within your distribution. For more information see http://code.google.com/p/jarjar/
[11:34:49] <jankoprowski> Thanks!
[11:34:59] <jankoprowski> I will check them
[11:35:11] <jankoprowski> :)
[11:35:36] <ztj> I personally use shade with good success
[11:36:00] <Cogito> building with maven can save many headaches :)
[11:36:05] <Cogito> and make many I guess
[11:36:11] <jankoprowski> :)
[11:36:12] <Cogito> but generally its good
[11:36:13] <jankoprowski> Thanks a lot!
[11:36:38] <ztj> I find maven's best if you start with it and do as much as possible in the "maven" way but if you have to migrate a project it can be a serious pain
[11:36:39] *** sebrock has joined ##java
[11:37:59] *** zuxqoj has joined ##java
[11:39:06] *** Develman has joined ##java
[11:42:37] *** |Freeman| has joined ##java
[11:42:42] *** scruz has quit IRC
[11:42:59] *** |Freeman| has quit IRC
[11:43:14] *** Kryigerofe has joined ##java
[11:43:19] <Kryigerofe> Hello.
[11:43:41] <Kryigerofe> Anyone good with Applets here?
[11:44:13] <Kryigerofe> My problem is that I can't get my applet to get keyboard focus in the browser. Not even when the user clicks inside the applet.
[11:44:29] <ztj> Kryigerofe: read the topic, applets are off topic here
[11:44:30] <dreamreal> ~applets
[11:44:30] <javabot> Check the topic, read http://javachannel.net/wiki/pmwiki.php/FAQ/Applets - Basically, we don't support them here. Try the sun forums at http://tinyurl.com/2q2hog; consider the new Windows/OS X/Linux 32/64bit JNLP-compatible "Plugin2" from Java 6u10 (http://java.sun.com/javase/6/webnotes/6u10/plugin2/index.html)
[11:45:13] <Kryigerofe> Whoops, sorry.
[11:45:38] *** ivenkys has quit IRC
[11:46:50] <dreamreal> ztj: migrating to maven's pretty easy unless you have specific steps you need to add to a build
[11:47:06] <ztj> that's a ridiculously huge "unless"
[11:47:22] <dreamreal> i dunno, 99% of java projects don't need to add stuff
[11:47:45] *** ChambreNoire has joined ##java
[11:47:59] *** Simath has quit IRC
[11:48:01] <ztj> I'm sure you did a rigorous study to come up with that number
[11:48:16] <Cogito> the most I have needed to add is a manifest
[11:48:25] <dreamreal> of course. I studied 74.4873920% of all java projects.
[11:48:32] <dreamreal> did you think otherwise?
[11:49:01] <Cogito> but if oyu are a single dev working on a small project, oyu can learn most of what you need along the way
[11:49:24] <ChambreNoire> Question: can one define multiple mappings for a same filter?
[11:50:19] <dreamreal> ChambreNoire: try it and see (yes)
[11:50:32] <ChambreNoire> I have multiple <filter-mapping>s with the same <filter-name> and different <url-pattern>s but it doesn't work
[11:50:51] *** ivenkys has joined ##java
[11:50:52] <ChambreNoire> so I have to duplicate my filter which seems all wrong
[11:51:13] <dreamreal> it does seem wrong
[11:52:05] <ChambreNoire> so how come the multiple mappings aren't working despite what I read online? Any ideas?
[11:52:14] <passwordoff> I have sit near open window, what may happens?
[11:52:15] *** nixness has quit IRC
[11:53:35] <dreamreal> ChambreNoire: dunno, pastebin
[11:53:51] <ChambreNoire> ~pastebin
[11:53:51] <javabot> http://paste.pocoo.org/ - Paste the final url after you've pasted your stuff there.
[11:54:07] *** Simath has joined ##java
[11:54:33] *** magentar has quit IRC
[11:54:44] *** wliao has quit IRC
[11:55:01] <ChambreNoire> http://paste.pocoo.org/show/346254/
[11:55:41] <dreamreal> 2.3? ouch. Which container?
[11:55:53] <ChambreNoire> (I strip the end off the url in order to skin my pages btw)
[11:55:54] <ChambreNoire> tomcat
[11:55:59] <dreamreal> (And why is the document defined with no schema?)
[11:56:10] <dreamreal> tomcat supports 2.5, too, and may support 3 by now
[11:56:15] <ChambreNoire> tomcat 6
[11:56:24] <dreamreal> tomcat 6 definitely supports 2.5
[11:56:42] <ztj> ChambreNoire: pro tip, with web.xml the dtd/schema declared version will change the way a container interprets its contents including exact behaviors of things like multiple filter mappings.
[11:56:51] <ChambreNoire> aha
[11:57:13] <ztj> ensure your web.xml is a match in version with whatever docs/advice you read that said you could do multiple filter mappings
[11:57:29] <ztj> and declare the schema as mentioned
[11:57:43] *** glcrazy has quit IRC
[11:57:56] <dreamreal> also: I might be crazy, but I think you can do multiple url patterns in a single filter mapping
[11:58:13] <ChambreNoire> yes comma seperated I saw that too somewhere
[11:58:54] *** matsebc has joined ##java
[11:59:56] *** devkhadka has quit IRC
[12:00:17] <aLeSD> does exist the implementation of a thread safe list ?
[12:00:48] <dreamreal> aLeSD: threadsafe meaning what? (i.e., yes, there are many, depending on what you need.)
[12:01:16] <aLeSD> dreamreal I have more thread accessing to the same List
[12:01:28] <dreamreal> they can do that with no problem, ever
[12:01:31] <ztj> ChambreNoire: actually the xsd for web.xml in servlet 2.5 suggests you can just have multiple url-pattern elements
[12:01:40] <dreamreal> it's when they modify the list that problems can occur
[12:01:43] <ztj> no need for breaking xml with comma delimited values
[12:01:50] <mapreduce> aLeSD: The only thread-safe list is an immutable list.
[12:02:01] <aLeSD> dreamreal: one of the thread is modifing it
[12:02:05] <mapreduce> Unless you contract your meaning of 'thread-safe'.
[12:02:34] <aLeSD> of ... a mutex protected list ?
[12:02:34] <dreamreal> well, look in java.util.concurrent for various possibilities, also consider Vector or Collections.synchronizedList()
[12:02:35] <mapreduce> aLeSD: Is this a ConcurrentModificationException issue?
[12:02:54] <ChambreNoire> it seems I can't have multiple listener-classes in my listener tag now
[12:03:27] <dreamreal> ChambreNoire: XSDs are really handy :)
[12:03:38] <ztj> ChambreNoire: use multiple listener tags
[12:06:16] <ChambreNoire> hmm still not working (the multiple mappings that is)
[12:06:26] <ztj> do your patterns overlap?
[12:06:57] <ChambreNoire> <url-pattern>/blah/*</url-pattern> and <url-pattern>/somethingelse/*</url-pattern>
[12:07:06] <ChambreNoire> don't think so
[12:07:22] <ztj> do those match servlets?
[12:07:30] <ztj> or the same servlet?
[12:07:37] *** BKD__ has joined ##java
[12:07:38] <BKD__> Hi
[12:07:40] <ChambreNoire> same filter
[12:07:45] <ztj> I didn't ask that
[12:07:48] <ChambreNoire> I don't have any servlets
[12:07:54] <ztj> filters are mapped to servlets either by url-mapping or directly
[12:07:57] <ztj> then you can't use filters
[12:08:14] <ztj> and you can't do anything
[12:08:17] <ztj> so I bet you're wrong about that
[12:08:40] <ChambreNoire> well I don't have any servlet declarations in the web.xml at any rate
[12:09:26] <ztj> Are you using JSP?
[12:09:37] <ChambreNoire> no I use wicket
[12:10:06] <ztj> I don't know wicket but its design could be affecting your filter matching
[12:10:37] <ChambreNoire> ah I assumed wicket wouldn't enter into it
[12:10:46] <ztj> weird assumption
[12:10:57] <ChambreNoire> the mapping I mean
[12:11:00] *** [[thufir]] has quit IRC
[12:11:07] <ChambreNoire> or rather the multiple mapping
[12:11:07] <ztj> servlets are the relevant thing
[12:11:18] <ztj> if you're using wicket it has to be registering servlets or it won't get any http events
[12:11:19] *** [[thufir]] has joined ##java
[12:11:38] <ztj> let's start over, what are you expecting and what is it actually doing
[12:11:51] *** [[thufir]] has quit IRC
[12:12:10] *** [[thufir]] has joined ##java
[12:12:28] *** xianny has quit IRC
[12:12:51] <ChambreNoire> I'm expecting to be able to access my login page via two destinct urls. Why? In order to strip the end off said url and style the login page accordingly
[12:12:54] *** xianny has joined ##java
[12:13:19] <ztj> I didn't ask why
[12:13:35] <ChambreNoire> I know - just giving you some background
[12:13:36] <ztj> Or really what your ultimate goal is
[12:13:43] *** ivenkys has quit IRC
[12:13:43] <ztj> just need to know what you're expecting and what it's doing
[12:13:55] <ChambreNoire> in case there's a better way you may be aware of
[12:14:34] <ztj> most containers have automagical login stuff but it'd be nonstandard
[12:14:37] <ztj> I don't know about tomcat
[12:15:04] *** ptoth has joined ##java
[12:15:30] <ztj> it's important to remember j2ee isn't designed for you to product software that runs across various containers so having container-specific code is not exactly discouraged unfortunately, so sometimes the best way to do these sorts of things is container specific
[12:15:39] <ztj> it might be worth looking into what tomcat offers for security hooks
[12:15:49] *** ivenkys has joined ##java
[12:16:00] <ptoth> anybody here using FEST for swing testing? I am not sure hwo to run test from this tutorial http://www.ibm.com/developerworks/java/library/j-swingtest/?ca=dgr-lnxw03Viriodth-LX&S_TACT=105AGX59&S_CMP=grlnxw03
[12:16:05] <ztj> personally I had to abandon container-specific hooks at one point for an obscure reason and ended up using filters in the end heh
[12:16:13] <dreamreal> why are you not considering something like, oh, spring security?
[12:16:33] <ztj> ChambreNoire: anyway, the important thing here is what are you doing and expecting and what is it actually doing in response?
[12:17:01] <ztj> (I'm expecting something like, "navigating to two different URLs and expecting each to prompt with a login page but one is and one is not" or something)
[12:17:13] <ChambreNoire> well I can connect via the first url but not the second
[12:17:20] <ztj> connect?
[12:17:27] <ChambreNoire> navigating
[12:17:46] <ztj> the first does what, prompt for login? and the second does what... nothing? bypass security?
[12:17:56] <ChambreNoire> as you say - navigating to two different URLs and expecting each to prompt with the same login page but one is and one is not
[12:18:07] <ztj> so what does the second actually do?
[12:18:10] <ChambreNoire> nothing as if the mapping didn't exist
[12:18:21] <ChambreNoire> page not found
[12:18:22] <ztj> then perhaps there is no servlet mapped to that path
[12:18:28] <ztj> and thus no filter will be triggered
[12:18:45] *** topriddy has joined ##java
[12:19:11] <ChambreNoire> so this could be due to the way wicket implements the filter?
[12:19:13] <ztj> because like I said, filters are associated with servlets, selected directly or by url path mapping. If the mapping doesn't match a servlet's mapping, it's just ignored.
[12:19:31] <ztj> it could be due to the way your sevlets are provisioned/mapped by wicket or whatever
[12:19:38] <ChambreNoire> hmm
[12:19:55] <ztj> whatever the case, it sounds to me like the second URL does not map to a servlet, at least not with the pattern you're using
[12:20:03] <ChambreNoire> ok so I guess I need to perster the wicket people
[12:20:30] <ztj> perhaps wicket aficionados (some of which you may find around here at times) will have a better idea on how to accomplish what you want
[12:20:37] <ztj> whether or not it's best to use a filter this way
[12:20:44] * ztj is not a wicket user
[12:20:44] <ChambreNoire> yes
[12:20:51] <ChambreNoire> :)
[12:21:01] *** supercosmonaut has quit IRC
[12:21:08] <ChambreNoire> oh well you've furthered my understanding at any rate
[12:21:09] <ChambreNoire> thanks
[12:21:13] <ztj> yep, good luck
[12:21:30] *** ivenkys has quit IRC
[12:22:06] <ptoth> anybody here using FEST for swing testing? I am not sure hwo to run test from this tutorial http://www.ibm.com/developerworks/java/library/j-swingtest/?ca=dgr-lnxw03Viriodth-LX&S_TACT=105AGX59&S_CMP=grlnxw03
[12:22:11] <ztj> If it makes you feel any better, here are two birds I shot (but did not kill) http://flic.kr/p/9mU6nr
[12:23:48] *** zhen_ds has joined ##java
[12:24:09] *** zhen_ds has left ##java
[12:24:38] *** Error404NotFound has quit IRC
[12:25:39] *** brundlefly has joined ##java
[12:25:48] *** nchaimov has quit IRC
[12:26:06] *** ppdog has joined ##java
[12:26:17] *** Radu-Mihail has joined ##java
[12:26:24] *** ppdog has left ##java
[12:26:38] <Radu-Mihail> Darn, is there any trick to add PropertyChangeSupport automatically to a POJO?
[12:26:41] <Radu-Mihail> And hi, all!
[12:27:48] *** ppdog has joined ##java
[12:30:02] *** FrankLv has joined ##java
[12:32:24] *** hex` has joined ##java
[12:33:40] *** tigger0jk has quit IRC
[12:38:34] *** nchaimov has joined ##java
[12:39:41] *** supercosmonaut has joined ##java
[12:40:35] *** ppdog has left ##java
[12:42:44] *** pen has joined ##java
[12:43:04] *** nchaimov has quit IRC
[12:45:47] *** Error404NotFound has joined ##java
[12:45:50] *** robonobo has joined ##java
[12:46:51] <robonobo> hi, so I hava a jar that's not on my classpath of which the root contains a configfile i need, how do I get at that configfile?
[12:47:23] *** Soliah has joined ##java
[12:48:06] *** Develman has quit IRC
[12:49:35] *** jjido has joined ##java
[12:50:11] <_W_> ~~ robonobo javadoc JarFile
[12:50:12] <javabot> robonobo: http://is.gd/g12K2A [JDK: java.util.jar.JarFile]
[12:50:32] <_W_> alternatively
[12:50:41] <_W_> ~~ robonobo javadoc UrlClassLoader
[12:50:41] <javabot> robonobo: http://is.gd/krdqJK [JDK: java.net.URLClassLoader]
[12:51:03] *** jjido has quit IRC
[12:59:22] <Radu-Mihail> Ah, don't you just love it when Eclipse hangs on code assist?
[13:03:29] <robonobo> _W_: thanks a bunch!
[13:03:52] <mapreduce> Radu-Mihail: Yes, it gives you the perfect reason to close it.
[13:04:24] <Radu-Mihail> Unfortunately, most of the Java shops require Eclipse.
[13:05:05] <stimpie> will a compiler optimize multiple simple gets on a property via function?
[13:05:07] <dreamreal> they... do?
[13:05:12] <dreamreal> stimpie: when?
[13:05:21] <dreamreal> Radu-Mihail: how does a java shop "require" eclipse?
[13:05:46] <stimpie> x=a.getIntA(); y = a.getIntA();
[13:05:53] <dreamreal> stimpie: right, when?
[13:06:00] <Radu-Mihail> I mean, some dev teams use Eclipse so you have to get accustomed to that.
[13:06:11] *** sd1074_2 has left ##java
[13:06:15] <dreamreal> Radu-Mihail: right, you just have to learn to talk down to them and use simple words
[13:06:22] <ptoth> anzbodz using FEst for swing testing here?
[13:06:29] <mapreduce> Radu-Mihail: I think diversity is healthier.
[13:06:35] <dreamreal> I have worked in MANY eclipse shops, my biggest problem was remembering to downshift when showing them things
[13:06:45] <Radu-Mihail> dreamreal, can you elaborate?
[13:06:47] <mapreduce> ptoth: I have done. Your kezboard lazout seems to be set to German.
[13:06:56] <stimpie> stimpie will it enter the function twice? or will a temp=a.getIntA(); x=temp; y=temp; be an optimisation
[13:06:57] <dreamreal> (I got asked questions like "how do I make my eclipse work like that?" and "Why does your eclipse say 'IntelliJ IDEA' on it?"
[13:07:00] <mapreduce> Either that or zour fingers.
[13:07:03] <ptoth> mapreduce actually is Slovak :)
[13:07:07] <topriddy> how do i decode url coded values in this format? http://localhost:8084/xwebservice?cmd=authenticate&phoneNumber=07032314287&secret=test&latitude=43.6775&longitude=-80.7339&address=6600+Sailing+Club+Rd%2C+Mapleton%2C+ON+N0G+2K0%2C+Canada ,
[13:07:28] <dreamreal> topriddy: you do know that url encoding is well known and standardized, of course
[13:08:06] <ptoth> mapreduce anyway I am trying to run test and obviously I am doing it wrong http://pastebin.com/10FmXph0
[13:08:10] <topriddy> or better still what is the standard way of encoding it for GET request...seems the encoding for GET is different from POST (not sure)...and also i am withing the confines of a mobile environment
[13:08:24] <stimpie> topriddy, http://commons.apache.org/codec/apidocs/org/apache/commons/codec/net/URLCodec.html
[13:08:24] <dreamreal> heh
[13:08:34] *** stevenhong has joined ##java
[13:08:51] <ptoth> mapreduce this is simple apllication and what happens it starts to open many Jframes plus I get exception Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.fest.util.Arrays
[13:09:20] <topriddy> stimpie: yeah commons...used that before. but i am avoiding using that at mobile end.
[13:09:37] <dreamreal> topriddy: heh
[13:09:37] <topriddy> my question is address=6600+Sailing+Club+Rd%2C+Mapleton%2C+ON+N0G+2K0%2C+Canada valid?
[13:09:45] <dreamreal> topriddy: yes, it's valid
[13:09:56] <dreamreal> heh
[13:10:06] <topriddy> dreamreal: then guess i have to manually decode that at wicket end :(
[13:10:18] <dreamreal> oh lord. Why?
[13:10:29] <dreamreal> Is wicket being hosted on the mobile app?
[13:10:32] *** Error404NotFound has quit IRC
[13:10:53] <mapreduce> Hi. I've found some information relevant to a ticket. Shall I phone you and describe the information vaguely, or attach it to the ticket?
[13:11:10] <dreamreal> topriddy: you're confusing me badly. You keep asking these ridiculous questions and then changing context on them.
[13:11:45] <ptoth> mapreduce when you will have time please take a look at the code
[13:11:51] <dreamreal> "I'm in a mobile app; is that designed to move from network to network?" "When it sends information to a web server, is there an encoding? How do I decode it?"
[13:11:53] <topriddy> dreamreal: hehe...am sorry.
[13:11:54] *** BeholdMyGlory has joined ##java
[13:12:01] <dreamreal> topriddy: don't be sorry, just STOP
[13:12:24] <mapreduce> ptoth: Your main method starts the app, and then tells ApplicationLauncher to run the main method.
[13:12:25] <dreamreal> ptoth: that exception means your classpath is wrong
[13:12:45] <mapreduce> ptoth: So the main method runs again, starting the app again and tells ApplicationLauncher to run the main method again.
[13:12:52] <mapreduce> ptoth: Imagine I wrote the above line 10000 times.
[13:13:11] <ptoth> yeah I get it
[13:13:19] <ptoth> I just rewrote what I found on Fest website
[13:13:19] <topriddy> dreamreal: my question rephrased is : address=6600+Sailing+Club+Rd%2C+Mapleton%2C+ON+N0G+2K0%2C+Canada valid for a GET request? you answerd yes already. I am wondering if i have to decode it at the servlet end or if that is done automagically.
[13:13:34] <dreamreal> not normally, no.
[13:13:36] <mapreduce> ptoth: No, Alex isn't that dumb.
[13:14:38] <ptoth> mapreduce I did not say he is http://docs.codehaus.org/pages/viewpage.action?pageId=117900196
[13:15:19] <mapreduce> ptoth: Yeah, he didn't use ApplicationLauncher in the app's main method.
[13:15:33] <mapreduce> ptoth: Generally, you either want to run the app, or you want to run tests. Not both at once.
[13:15:34] <stimpie> topriddy, ServletRequest has a getParameterMap
[13:15:49] <ptoth> mapreduce btw I am following his article about fest, the article I gave you link to few dazs ago. http://www.ibm.com/developerworks/java/library/j-swingtest/?ca=dgr-lnxw03Viriodth-LX&S_TACT=105AGX59&S_CMP=grlnxw03
[13:16:43] <ptoth> mapreduce ok that make sense I am just not sure what exactly to do to run tests. I downloaded code used in the article but I didn't find out how to run the tests.
[13:16:53] *** ninan has joined ##java
[13:17:05] *** VJTachyon has joined ##java
[13:17:41] *** barq has joined ##java
[13:22:13] <mapreduce> ptoth: Write a separate class.
[13:22:23] <ptoth> for tests?
[13:22:32] <mapreduce> class SomeTest { public static void main(String[] args) { ApplicationLauncher.whatever } }
[13:22:33] <mapreduce> yes
[13:22:53] <ptoth> ok I got that it is same as in Alexs article on IBM website
[13:22:53] <mapreduce> So you'd pass your main app's class to ApplicationLauncher.
[13:23:03] <mapreduce> Great.
[13:23:04] *** neuro_sys has joined ##java
[13:23:54] *** Noya has joined ##java
[13:24:03] <ptoth> ok and what to write in main method exactly ApplicationLauncher.application(HTMLDocumentEditor.class).start(); would be frist and then?
[13:24:35] <ptoth> btw in that article if you could take a look on listing 3 there is whole test class and as you can see there is no main method
[13:26:10] <mapreduce> ptoth: Yes, that's probably because they're running it from JUnit.
[13:26:24] *** Error404NotFound has joined ##java
[13:26:47] <ptoth> ou ok but I don 't have to use JUnit do I?
[13:26:51] <mapreduce> No.
[13:26:59] <mapreduce> ptoth: The entry points there are methods annotated as @Test.
[13:27:03] <mapreduce> in that article
[13:27:08] <ptoth> yes.
[13:27:36] <mapreduce> It's not a bad idea to use JUnit, though, assuming you have more than one test.
[13:27:53] <dreamreal> ew
[13:27:55] <dreamreal> testng!
[13:28:02] <ptoth> mapreduce yes I think you are right, right now I want to just learn fest
[13:28:11] *** Alvo has joined ##java
[13:28:14] <ptoth> later on I can add Junit
[13:28:17] <dreamreal> heh
[13:28:29] <dreamreal> "I can learn basic arithmetic later, geez"
[13:28:29] <mapreduce> ptoth: It seems an odd order to learn in.
[13:28:33] <ptoth> so what would I have to do to run the tests without JUnut
[13:28:49] <ptoth> *Junit
[13:29:01] <mapreduce> A main method, like what I just showed you.
[13:29:19] <ptoth> ApplicationLauncher.application(HTMLDocumentEditor.class).start() ?
[13:29:21] <mapreduce> You're now repeating yourself, so there's a fundamental you're missing. I don't know what it is.
[13:29:29] <mapreduce> ~~ ptoth tutorial
[13:29:29] <javabot> ptoth, Please see http://download.oracle.com/javase/tutorial/
[13:30:17] <ptoth> mapreduce if I just add ApplicationLauncher.application(HTMLDocumentEditor.class).start() it starts apllication but it wont start the tests
[13:30:52] <mapreduce> ptoth: Pastebin your test class.
[13:30:55] *** Repox has joined ##java
[13:30:56] *** jankoprowski has quit IRC
[13:31:08] *** robonobo has left ##java
[13:31:25] *** bojo_ has quit IRC
[13:31:42] <ptoth> http://pastebin.com/RiAtRe1W
[13:31:49] <ptoth> and thank you already for your time
[13:31:56] *** bojo_ has joined ##java
[13:32:47] <mapreduce> So in main, you have one line of code, and that is being executed.
[13:32:53] *** csaba has joined ##java
[13:32:55] *** brig has joined ##java
[13:33:02] <mapreduce> I don't see the problem.
[13:33:27] <Repox> Hi. I'm trying to extract an attribute from a HTML element. But I can't find any example through google as to how I get the contents into a variabel. My sample code I'm working on: http://pastebin.com/Sz73YEA5
[13:33:27] <mapreduce> Well, I do, it's that you're trying to use JUnit without using JUnit, but let's suspend the disbelief.
[13:34:24] <csaba> any suggestions how to solve this problem? I have two threads, one is reading from stdout, other from stderr, and they are both outputting bytes to stdout as soon as they come... but if both threads run at the same time, then the output in stdout will be mixed (the characters from both streams will be fixed together0
[13:34:28] *** ernimril has quit IRC
[13:34:47] <csaba> I would need somehow to block the access to the stdout for like 1 seconds, while the stdout is used by one of the threads
[13:35:09] <mapreduce> csaba: synchronized (System.out) { write a whole line here }
[13:35:09] <csaba> but I also must release the lock after 1 sec... and this can be a problem, because the thread can be blocked, so it cannot release the lock
[13:35:32] <csaba> mapreduce: the problem is I don't have whole lines... there's no \n coming from the streams I'm reading from
[13:35:32] <mapreduce> So don't write until you have a line to write.
[13:35:51] <mapreduce> Ok, don't write until you have a unit to write, whatever you define a unit as.
[13:36:07] <ptoth> mapreduce so what I would neet to change in order for tests to run without JUNT?
[13:36:11] <csaba> mapreduce: I must write before I get a whole line... let me explain
[13:36:11] <ptoth> *Junit
[13:36:23] <csaba> I get a string like "console>"
[13:36:27] <csaba> without an ending \n
[13:36:41] <csaba> I must print that out, otherwise the user won't know that the console is waiting for his input
[13:36:54] <csaba> so if I'm waiting for a \n it will never get printed out
[13:37:01] <paulweb515> ptoth: my guess is you can't ... FestSwingJUnitTestCase expects the full JUnit lifecycle
[13:37:09] <csaba> which is why I print out every byte as soon as it arrives
[13:37:26] *** topriddy has quit IRC
[13:37:32] <ptoth> paulweb515 but JUUNit are optional so I guess iI just need another calss
[13:37:48] <csaba> what I'd need to do is, lock stdout, and when there's no action for 1 sec (because the thread got blocked), then release the lock
[13:38:00] <paulweb515> ptoth: JUnit is not optional in your HTMLDocumentEditor_Test class
[13:38:18] <ptoth> paulweb515 I mean optional for FEST
[13:38:32] <csaba> and there's no "unit" to wait for, the output can be anything... console> was just an example
[13:38:56] <paulweb515> ptoth: you'll have to work through an example that actually opens a swing frame and links the tester to it ... the code you've shown doesn't help with that
[13:39:04] <Kryigerofe> This should be simple but I can't figure it out: How do I get the path to the root of my application, so I can build relative paths on top of it?
[13:39:05] *** matsebc has quit IRC
[13:39:07] *** teralaser has quit IRC
[13:39:29] <ptoth> paulweb515 what do you mean links the tester to it
[13:39:38] <passwordoff> Why PrintWriter(String fileName) throws FileNotFoundException if it creates file in case one doesn't exist?
[13:39:41] <ptoth> paulweb515
[13:39:42] <paulweb515> Kryigerofe: what's the root of your application? java has a current working directory and an entire classpath full of entries
[13:40:27] <paulweb515> ptoth: I mean instantiate the FEST code so that it can interact with your JFrame ... it is not indicated how to do that in your JUnit test file, so you'll have to go back to reading documents
[13:41:36] <Kryigerofe> paulweb515: Well, preferably it should always point to root of my the directory structure inside the JAR I build out of my project. There's, for example "bin" and "data" folders inside that, where "bin" contains the classes and "data" contains images etc.
[13:41:40] <mapreduce> passwordoff: The directory to place the file in may not exist.
[13:41:53] <Kryigerofe> But anything that stays constant when I move the JAR would do.
[13:42:09] *** Radu-Mihail has quit IRC
[13:42:15] <mapreduce> passwordoff: The documentation for that constructor tells you..
[13:42:39] <paulweb515> Kryigerofe: what are you trying to do? And I mean, what behaviour do you want? Is it simply that you create a Jar and have a number of files you'd like to read out of it at runtime?
[13:42:50] <Kryigerofe> paulweb515: Yes.
[13:42:53] <ptoth> paulweb515 what documents I was looking around but I had problem to find some tutorial about this. It is complicated to rewrite that class so i doesnt need to use JUNIT?
[13:43:03] <Kryigerofe> (That's exactly what I want to do.)
[13:44:04] <Kryigerofe> Oh, and I want it to work with Applet.newAudioClip so I guess I can't use ClassLoader.
[13:44:05] <paulweb515> Kryigerofe: use class.getResourceAsStream("path")
[13:44:06] *** abhijain has joined ##java
[13:44:27] <Kryigerofe> Applet.newAudioClip wants a URL.
[13:44:43] <paulweb515> Kryigerofe: then use getResource(*)
[13:44:43] <Alvo> why not class.getClassloader().getRessourceAsStream()
[13:44:53] *** Luc1fel has joined ##java
[13:45:01] *** r0bby has quit IRC
[13:45:06] *** ab500 has quit IRC
[13:45:14] *** ab500 has joined ##java
[13:45:29] *** r0bby has joined ##java
[13:45:48] <ptoth> paulweb515 does FEST even work without Junit or TestNG?
[13:46:02] <paulweb515> ptoth: that question must be answered by your original link
[13:46:36] <Kryigerofe> Ah, that gives me the URL. Thanks.
[13:46:47] <ptoth> paulweb515 I am looking and fest website and it sayis that it supports so there should be non dependency
[13:47:51] <mapreduce> Yes, FEST works fine without JUnit or TestNG.
[13:48:21] <paulweb515> ptoth: there's lots of documentation http://fest.easytesting.org/ and http://docs.codehaus.org/display/FEST/Swing+Module
[13:49:08] *** fenris has joined ##java
[13:49:33] <ptoth> paulweb515 I have been looking there for two days now and I have to missing information about how to create tests without JUNIT
[13:50:01] <dreamreal> ptoth: it's taken you two days?
[13:50:36] <dreamreal> for one thing, avoiding junit is silly. It makes sense if you're avoiding junit in preference of something good like testng... but avoiding unit testing frameworks like that makes no sense.
[13:50:37] <paulweb515> ptoth: copy all of their Getting Started code into one main(*) method ... then figure out which parts have to be on the EDT and which parts are not
[13:50:52] <dreamreal> for another, if it's taken you two days for this, this is not good.
[13:52:06] <ptoth> paulweb515 ok I will start there
[13:52:18] <ptoth> paulweb515 I will do it with fresh head
[13:53:48]
[13:54:01] <ptoth> dreamreal not good? according to whom? Compared to what or to who? this kind of statements are just wasting time and helping no one ihmo.
[13:54:51] <ChambreNoire> How would one go about writing a redirecting filter that simply redirects requests from alias mappings to a specific mapping?
[13:56:04] <ptoth> paulweb515 btw getting started is using testng
[13:56:13] <cheeser> ptoth: it's only wasting time if you argue about it. just ignore it and move on.
[13:56:18] <ptoth> *TestNG framewoork TestNG
[13:57:01] <ptoth> cheeser true true! I just wanted to point that out to dreamreal because someone other could start arguing about these kind of statements.
[13:58:50] <cheeser> ptoth: while i mostly agree with dreamreal on this one, there are many ways to skin a cat and such statements are intended to be inflammatory so i avoid responding when i'm smart enough to see them for what they are. which isn't very often for me.
[13:58:56] *** arborist has joined ##java
[13:59:44] <paulweb515> ptoth: yes, I saw that ... that's why I used the words "copy" and "main(*)"
[13:59:51] <ptoth> yeah I just realized sorry
[14:00:45] <ptoth> realized it omg damn I feel pretty stupid today :) .... ok I will work on my own for a while from now
[14:00:51] <cheeser> heh
[14:00:55] <cheeser> that was yesterday for me.
[14:01:58] <milligan> From a jboss server, org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:172) .. <- Does that class only allow localhost mysql connections ?
[14:02:45] <ptoth> cheeser sometimes I feel I have stupid life not just a day :)
[14:05:01] <fenris> is it possible to wait for a java.lang.Process for a given time?
[14:05:13] *** lunatik210 has joined ##java
[14:06:32] *** horte has joined ##java
[14:08:10] *** r0bby has quit IRC
[14:09:53] <ptoth> paulweb515 ok I did it! and it worked! :) thx
[14:09:58] *** ninan has quit IRC
[14:12:58] *** ojacobson has joined ##java
[14:13:11] *** hanstech has joined ##java
[14:16:22] *** abhijain has quit IRC
[14:16:29] *** Luc1fel has quit IRC
[14:17:16] *** Error404NotFound has quit IRC
[14:19:04] *** tokam has joined ##java
[14:20:08] *** modernbob has joined ##java
[14:21:49] *** evenflow has joined ##java
[14:23:57] <evenflow> hello, i created in the keystore a certificate for cn=*.w1 and have *.w1 hosts authenticated to it, and now i want the hosts to authenticate against another server which name is bla.b1 but certificate is not working, how can i make it?
[14:26:52] *** terranova has joined ##java
[14:27:01] *** terranova has quit IRC
[14:27:32] *** terranova has joined ##java
[14:27:42] *** ninan has joined ##java
[14:28:34] *** Error404NotFound has joined ##java
[14:29:15] *** Dux has quit IRC
[14:30:22] *** Cogito has quit IRC
[14:35:13] *** eyesUnclouded has joined ##java
[14:35:52] *** frangiz has quit IRC
[14:36:41] *** frangiz has joined ##java
[14:38:14] <dreamreal> reset
[14:39:24] <DroidAgent> password:
[14:39:30] <reisi> does anyone have experience on getting the default jaxp implementation (xerces2 i believe, java-1.6) to actually do *full* validation based on xml schema?
[14:39:48] <ojacobson> Define "full"
[14:39:53] <ojacobson> as distinct from your expectations, I suppose
[14:40:15] <dreamreal> DroidAgent: heh. Windows shut down on me after warning me that the battery was low (for about 500ms), and on restore, ssh restarted. Was a bit of a surprise.
[14:40:25] *** starcoder has quit IRC
[14:40:30] *** freeone3000 has quit IRC
[14:40:45] <reisi> ojacobson: i found that there's feature called '.../schema-full-checking' in xerces2, which should enable expensive checks (e.g. unique checks)
[14:41:12] <ptoth> paulweb515 can you please look here I am getting null pointer expcetion and I am not sure why http://pastebin.com/EJk2HQUC
[14:41:33] <reisi> ojacobson: i, however am not seeing any of checks being made, whether it's using Validator api or DocumentBuilder
[14:41:47] <reisi> ojacobson: correction, any unique checks
[14:42:16] *** starcoder has joined ##java
[14:42:25] *** pen has quit IRC
[14:45:10] *** `moebius` has joined ##java
[14:45:12] *** matsebc has joined ##java
[14:45:54] <paulweb515> ptoth: useless
[14:46:16] *** setmeaway has joined ##java
[14:46:51] *** harpal has left ##java
[14:46:56] <paulweb515> ptoth: 1) since it died in testFile:63 and your pastebin goes up to 37, my guess is you need to add back code so your file compiles
[14:47:22] <paulweb515> ptoth: 2) and then debug ... break up your chains of calls until you find one that is returning null that's not supposed to
[14:48:47] *** RLa has joined ##java
[14:49:19] <RLa> which jvm instruction is used for comparing two references for equality and jumping if so?
[14:50:14] *** genesiss has joined ##java
[14:51:11] <RLa> nvm, found it
[14:51:54] <ojacobson> the if_acmp family, IIRC
[14:55:00] *** realtime_ has joined ##java
[14:55:56] *** lunatik210 has quit IRC
[14:56:25] <aLeSD> what do u think about access the attributes of a class from the methods of the same class directly ?
[14:56:31] *** Radu-Mihail has joined ##java
[14:56:40] *** genesiss has quit IRC
[14:57:06] *** fruitwerks has joined ##java
[14:57:11] *** BKD__ has quit IRC
[14:57:21] *** Garibaldi has joined ##java
[14:57:44] *** fruitwerks has left ##java
[15:00:00] *** thpar has quit IRC
[15:00:26] *** eyesUnclouded has quit IRC
[15:01:24] *** modernbob has quit IRC
[15:01:52] *** ianmarmour has joined ##java
[15:01:55] <ianmarmour> hi
[15:01:58] *** Majin_Buu has joined ##java
[15:01:59] <Radu-Mihail> Hello.
[15:02:11] <Majin_Buu> Hello
[15:02:16] *** gener1c has joined ##java
[15:02:22] *** topriddy has joined ##java
[15:02:25] <topriddy> i understand this error coming from hibernate, but i am not sure how to correct it without enabling global FetchType = Eager or something.
[15:02:26] <realtime_> ~hi
[15:02:26] <javabot> Hello realtime_, and welcome to ##java
[15:02:48] <ianmarmour> I was wondering does anybody here know how to reverse an int array in another mehod if the int array is made in the constructor?
[15:03:19] <ianmarmour> because my compiler is telling me that there is no intArray when it is clearly identified in the constructor
[15:04:11] <Majin_Buu> How often do you guys implement functions before you define them?
[15:04:31] <tjsnell> is it declared in your constructor?
[15:04:38] <ianmarmour> yeah
[15:04:44] <ianmarmour> public IntegerList(int size){
[15:04:53] <ojacobson> Majin_Buu: You asked this in #python, as well, and it didn't make any sense there either
[15:04:54] *** Majin_Buu has quit IRC
[15:04:57] <ojacobson> what do you mean by "implement"
[15:05:04] <tjsnell> that's not a declaration of an array
[15:05:08] <ianmarmour> I know
[15:05:10] <ianmarmour> i put
[15:05:20] <ianmarmour> int[] intArray = new int[size + 1];
[15:05:27] <ianmarmour> then
[15:05:27] <ianmarmour> }
[15:05:38] <topriddy> i am guessing annotating the props with @Basic(fetch = FetchType.EAGER) may be optimal. so does anyone have a suggestion for me please?
[15:06:10] *** frangiz has quit IRC
[15:06:24] *** evenflow has left ##java
[15:06:34] <Radu-Mihail> Darn, Java can sometimes get *so* verbose.
[15:06:52] *** frangiz has joined ##java
[15:06:59] <realtime_> you too
[15:07:13] <ianmarmour> any idea's tjsnell?
[15:07:40] <paulweb515> ~~ ianmarmour pastebin
[15:07:40] <javabot> ianmarmour, http://rifers.org/paste - Paste the final url after you've pasted your stuff there.
[15:07:41] <ojacobson> ianmarmour: Why do you believe that local variables in a constructor would be visible outside of the constructor?
[15:07:46] <Radu-Mihail> realtime :P
[15:07:59] <tjsnell> ianmarmour: yeah, you don't understand java, you need to learn about variable scope
[15:08:20] *** saml has joined ##java
[15:08:28] <tjsnell> any variable defined in a method (including a constructor) goes away when the method exits
[15:08:31] <ianmarmour> tjsnell: its for a class so im still learning and its a online course so I never have any at hand time iwth my teacher
[15:08:41] <ojacobson> ~tutorial
[15:08:41] <javabot> Please see http://download.oracle.com/javase/tutorial/
[15:08:48] *** shervin_a has quit IRC
[15:08:54] *** gener1c has quit IRC
[15:09:33] <ojacobson> ~fields
[15:09:34] <javabot> fields are variables scoped to an object class or instance, also known as "member variables". See http://download.oracle.com/javase/tutorial/java/javaOO/variables.html for more information.
[15:09:43] <ojacobson> ~constructor
[15:09:44] <javabot> ojacobson, constructors is http://download.oracle.com/javase/tutorial/java/javaOO/constructors.html
[15:09:54] <ojacobson> Those should help.
[15:10:09] <Radu-Mihail> The Java Tutorial is really great.
[15:10:22] *** `moebius` has quit IRC
[15:10:31] <ianmarmour> IntegerList(int size) – constructor method that creates a new list of size elements.
[15:10:49] *** PigFlu has quit IRC
[15:10:57] <ianmarmour> wouldent I need to have the array inside the constructor if those were the instructions though?
[15:11:16] <cheeser> ~~ ianmarmour classes
[15:11:16] <javabot> ianmarmour, classes is http://download.oracle.com/javase/tutorial/java/javaOO/classes.html
[15:12:33] <ianmarmour> cheeser I understand what a constructor is.... im just saying the instructions of the assigment were to make a constructor method that creates a new list of size elements :/
[15:13:25] * realtime_ faces his palm with brutality
[15:13:33] *** pen has joined ##java
[15:14:01] <cheeser> ianmarmour: i would suggest that maybe you don't understand them as well as you think you do.
[15:14:45] <ianmarmour> okay well I just read the page as well and it didn't really say anything about the topic?
[15:14:49] <dreamreal> heh
[15:15:02] <dreamreal> ianmarmour: what is the problem?
[15:15:03] *** bn` has quit IRC
[15:15:32] <ianmarmour> dreamreal: one second ill pastebin it
[15:16:24] <ianmarmour> http://pastebin.com/zWDK6X2B
[15:16:54] *** terranova has quit IRC
[15:17:07] *** gentunian has joined ##java
[15:17:11] <ojacobson> ianmarmour: You may want to read that ~fields link
[15:17:20] <ojacobson> it explains the distinction between a field and a local variable
[15:18:50] *** thomasp has joined ##java
[15:18:55] *** fruitwerks has joined ##java
[15:19:12] <ianmarmour> ojacobson wouldent the public modifer for the IntegerList allow me to access it from other methods inside the class?
[15:19:18] <ianmarmour> according to that link you sent me?
[15:19:32] <fruitwerks> can someone tell me more about this error? http://www.gonelately.net/geomajas/
[15:20:08] *** gentunian has quit IRC
[15:20:25] <ptoth> paulweb515 ok I found my mistake I hade to set up robot . BTw FEST should automaticly open and choose file from disk shouldn't it? Now it just open FileChooser Dialog Window and waits for me to choose file from disk
[15:20:39] <ptoth> cheeser how long have you been admin ?
[15:21:09] *** tissue has quit IRC
[15:21:21] *** c_axis has joined ##java
[15:21:21] <cheeser> of this channel? 6, 7 years? maybe more.
[15:21:50] <cheeser> wow. 10 years now.
[15:22:25] <ptoth> lol
[15:22:26] <realtime_> why the channel's founder changed from cheeser to freenode-staff?
[15:22:38] <cheeser> i dunno. i just noticed that, too.
[15:22:43] <ptoth> That is long time :)
[15:22:51] <cheeser> might've happened when they upgraded the infra a while back
[15:23:14] <cheeser> what? Sou|away is listed as the successor
[15:23:16] <paulweb515> it seems to change a number of defaults when they did that
[15:23:19] <ptoth> cheeser and you are doing this for free aren't you :)
[15:23:24] <cheeser> i am, sadly.
[15:23:24] *** eyesUnclouded has joined ##java
[15:23:24] <cheeser> 8^)=
[15:23:38] *** plarsen has joined ##java
[15:23:48] <paulweb515> ptoth: he also delegates some of the crowd-control :-)
[15:23:55] <ianmarmour> ~pastebin
[15:23:55] <javabot> http://pastie.org - Paste the final url after you've pasted your stuff there.
[15:23:57] <ptoth> cheeser and what is your job if I may know
[15:24:06] <ptoth> paulweb515 hh :)
[15:24:08] <cheeser> ~glassfish
[15:24:08] <javabot> cheeser, glassfish is Oracle's open source Java EE application server (https://glassfish.java.net). It's the reference implementation of Java EE 5 and 6, and commercial support is available from Oracle.
[15:24:10] *** gt_jk has joined ##java
[15:24:12] <cheeser> ~grizzly
[15:24:12] <javabot> cheeser, grizzly is a framework to build scalable and robust server applications using nio. Grizzly is used in GlassFish and SJSAS PE 8.1. For more information see https://grizzly.java.net/ or see Jean-Francois Arcand's blog: http://weblogs.java.net/blog/jfarcand/archive/2005/06/grizzly_an_http.html
[15:24:15] <cheeser> i work on those
[15:24:18] *** lhnz has quit IRC
[15:24:45] <realtime_> cheeser: you're a developer on both?
[15:24:49] *** lhnz has joined ##java
[15:24:57] <cheeser> yeah
[15:25:00] <Candle> cheeser: So, from which does your bread come from? :)
[15:25:02] <cheeser> mostly grizzly, though
[15:25:02] <realtime_> very nice
[15:25:28] <fruitwerks> so cheeser - you shoud know the answer to my question
[15:25:31] *** jdolan has joined ##java
[15:25:41] <cheeser> i don't
[15:25:44] <cheeser> P^)=
[15:26:12] <fruitwerks> I'll add that is glassfish via apache mod-proxy
[15:26:43] <ojacobson> fruitwerks: the error message is pretty clear about (a) where to look (it's all GWT-related classes) and (B) what the problem is
[15:26:50] *** horte has quit IRC
[15:26:50] <ojacobson> if you can't figure out (b) from that, ask a GWT group
[15:26:58] *** arborist has quit IRC
[15:27:00] <ojacobson> they're more likely to know the specifics of GWT
[15:27:11] *** horte has joined ##java
[15:27:17] *** BKD__ has joined ##java
[15:27:19] *** ptoth has quit IRC
[15:27:21] *** arborist has joined ##java
[15:27:29]
[15:28:02] <fruitwerks> that was mty next stop, but I couldn't find anything specific on it, so I though it was something too simple and well known to even document :)
[15:28:13] *** plarsen has quit IRC
[15:29:21] <Kryigerofe> Hello. I made a .jar and it works fine when I just double-click on it. However, when I try to run it from Java Web Start, it no longer finds the images and sounds inside the jar. I think it must be changing the default resources root path somehow.
[15:29:28] <Kryigerofe> Here's my JNLP: http://pastebin.com/w5r85pH9
[15:29:41] <cheeser> ~~ BKD__ show us
[15:29:41] <javabot> BKD__, Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options. Also see ~testcase for good examples as to how to help us help you quickly diagnose and solve problems.
[15:30:03] *** eyesUnclouded has quit IRC
[15:30:26] *** hector-home has joined ##java
[15:30:42] *** bn` has joined ##java
[15:31:12] *** r0bby has joined ##java
[15:32:30] *** hanstech has quit IRC
[15:34:17] <surial> ~~ Kryigerofe gRAS
[15:34:17] <javabot> Kryigerofe, getresourceasstream is a mechanism to read files from the same place your class files are stored - i.e. even from jars. You should use it for data files that go with your app, such as images for a GUI app or tabular data. Examples of use here: http://mindprod.com/jgloss/getresourceasstream.html - but note that you should always use the second form of the 3 examples listed at the top.
[15:34:36] <surial> Kryigerofe: You should use that, and not something along the lines of new FileInputStream("LetsJustHopeTheWorkingDirIsCorrect.gif");
[15:35:00] *** Frostix has joined ##java
[15:35:11] <surial> Will guaranteed work no matter how you end up running the jar you produce (after all, your app can find its own class files, and this uses the same system).
[15:35:12] *** ianmarmour has quit IRC
[15:35:29] <Kryigerofe> javabot: I currently use getResource to get a URL for the ImageIcon and AudioClip constructors. Does getResourceAsStream work better?
[15:35:29] <javabot> Kryigerofe, what does that even *mean*?
[15:35:39] <surial> No, getResource is fine.
[15:35:52] <Kryigerofe> What does what mean?
[15:35:57] <surial> Something else must be wrong (i.e. your jar is simply missing these files), if it works when you double-click the jar but not as a jws app.
[15:36:09] <surial> javabot is a bot of course.
[15:36:09] <javabot> no, you are!
[15:36:12] <surial> hence the name.
[15:36:22] <dreamreal> wait, what?
[15:36:58] <dreamreal> You mean *bot might not be a nubile 18yo hottie who's lonely and needs only $1k a month?
[15:37:02] <tazle> hm, apparently selector.select(500) doesn't actually return after 500 ms on Apple JVM
[15:37:04] <Kryigerofe> I tested moving the .jar to a completely different directory and it still works when doubleclicked. So I'm pretty sure it has all those files.
[15:37:14] *** eyesUnclouded has joined ##java
[15:38:26] <surial> Kryigerofe: Nono.
[15:38:32] <surial> Kryigerofe: The files should be _IN_ your jar.
[15:38:35] <surial> As in, packed up with your class files.
[15:38:38] <surial> ~~ tazle xnio
[15:38:38] <javabot> tazle, xnio is an NIO replacement framework, which keeps Channels but does away with Selectors, developed by ##java's very own dmlloyd. The project can be found at http://www.jboss.org/xnio - have fun!
[15:38:48] <Kryigerofe> Yes, that's what I mean.
[15:38:52] <surial> tazle: Just use that. async I/O with java is rocket science.
[15:39:05] <tazle> surial: I'm using netty already
[15:39:10] *** Garibaldi has quit IRC
[15:39:15] <surial> Kryigerofe: Then you've not properly explained the problem. It isn't possible for .getResource() to fail to work if you've packed them in together with your class files.
[15:39:58] <Kryigerofe> Well, all I know is that it works when doubleclicked but not when I run it through Java Web Start...
[15:40:18] <surial> Kryigerofe: Okay. You try being stubborn like this, and let's see how many answers you get.
[15:40:23] <ojacobson> Crystal ball's in the shop, dude. What does the URL from getResource() look like when run under (Web start, freestanding jar)? What does the code look like?
[15:40:28] <ojacobson> What's the internal layout of your JAR?
[15:41:04] <Kryigerofe> surial: Sorry if I sound stubborn. But I don't know what else I can tell you. Is there some way I can investigate this, or explain it better?
[15:41:29] <surial> Kryigerofe: Sure. If you answer ojacobson's questions, we can probably figure this one out.
[15:41:40] <Kryigerofe> OK.
[15:42:02] <surial> I'm particularly interested in the following: What does MyClass.class.getResource("whatever.gif") print when you System.out.println it, and what does: MyClass.class.getResource("MyClass.class") print when you sysout it?
[15:42:07] *** scruz has joined ##java
[15:42:09] <surial> I'm 99.95% sure I can tell you the problem given that information.
[15:42:12] <scruz> hello all.
[15:43:03] <scruz> jetty configuration question: a value like @web.port@ in jetty.xml, for instance, resolves to what exactly? command-line parameter?
[15:43:28] *** Gracenotes has quit IRC
[15:43:55] <Kryigerofe> OK, I'll put in some Sysouts and get back to you.
[15:43:55] <surial> scruz: Eeeeeeeeugh. jetty xml.
[15:43:59] <surial> scruz: Just program it with java.
[15:44:03] *** Garibaldi has joined ##java
[15:44:16] <scruz> hehe
[15:44:26] <scruz> eye can doo that too
[15:44:27] <surial> scruz: I have no idea, but taking a random stab in the dark: System property? Which you can set when running a JVM with: java -Dweb.port=1234 -cp jetty.jar org.eclipse.jetty.Server
[15:44:29] <surial> or whatever.
[15:44:45] <surial> ~~ Kryigerofe pastebin
[15:44:45] <javabot> Kryigerofe, http://paste.pocoo.org/ - Paste the final url after you've pasted your stuff there.
[15:44:56] <surial> You can pastebin the results of both systems when running by double-clicking vs. running with java webstart there.
[15:45:28] <surial> scruz: Was I right?
[15:45:47] <scruz> actually, i'm embedding jetty, so i can't really test that now
[15:45:54] <surial> :(
[15:46:00] <scruz> save i download it and try
[15:46:12] <scruz> i'll do it from code. i understand that more, anyway
[15:46:20] <scruz> the config, that is
[15:46:49] <passwordoff> lol: http://www.bypas.ru/img_patents/310111/2.png
[15:47:19] <surial> Oh, yes, click on shady russian sites.
[15:47:22] <surial> Like I'm going to do that.
[15:47:46] *** pen has quit IRC
[15:47:55] <ojacobson> passwordoff: Stop that.
[15:47:56] <surial> passwordoff: Also, 1995 called. Finish joke as exercise for reader.
[15:48:17] <passwordoff> ojacobson: stop what?
[15:48:31] <ojacobson> This is not a good place for "hey guise here's a funny image I found" links.
[15:48:41] <ojacobson> We have enough noise as it is. Please don't add to it.
[15:48:59] <passwordoff> You are right
[15:50:13] <surial> ~lol
[15:50:14] <javabot> Maybe LOL stands for "Limited Operable Literacy
[15:50:28] <surial> Okay, which idiot can't count quotes?
[15:50:30] <surial> ~info lol
[15:50:30] <javabot> lol was added by: freeone3000 on 12-20-2010 at 11:50 PM, EST and has a literal value of: <reply>(OMGWTF!!!BBQ!!!1111!! - Yeah, you sound like a retard.|Maybe LOL stands for "Limited Operable Literacy)
[15:50:31] <surial> Aha!
[15:50:58] <surial> ~no, lol is <reply>(OMGWTF!!!BBQ!!!1111!! - Yeah, you sound like a retard.|Maybe LOL stands for "Limited Operable Literacy".)
[15:50:58] <javabot> OK, surial.
[15:51:01] *** gremmachook has joined ##java
[15:51:04] <fruitwerks> is http://repo1.maven.org/ working for anyone, or is that no longer a valid url?
[15:51:21] *** jesmon has joined ##java
[15:51:34] <ojacobson> ~down repo1.maven.org
[15:51:34] <javabot> http://downforeveryoneorjustme.com/repo1.maven.org
[15:51:49] *** Luc1fel has joined ##java
[15:52:05] <fruitwerks> lovely.. thanks
[15:52:11] <ojacobson> central clong
[15:52:22] <ojacobson> I bet #maven on irc.codehaus.org hasn't heard yet
[15:52:24] <ojacobson> you should go tell them
[15:52:26] *** Johannes13 has joined ##java
[15:52:36] *** kakashi_ has quit IRC
[15:53:05] *** sbalmos has joined ##java
[15:53:49] *** neuro_sys has quit IRC
[15:54:23] <fruitwerks> good idea, thanks all - in too many chans!
[15:54:26] *** fruitwerks has left ##java
[15:54:59] <BKD__> sorry cheeser
[15:55:05] <BKD__> I was out
[15:55:10] <BKD__> there is no error
[15:55:21] *** gt_jk has quit IRC
[15:55:38] *** Repox has quit IRC
[15:56:07] <surial> Jesus. Maven is down! Oh noes!
[15:56:24] * surial actually was debugging a hanging maven fetch and then belatedly thought... Wait a minute, didn't I just...
[15:56:34] *** devkhadka has joined ##java
[15:56:45] <BKD__> ~pastebin
[15:56:52] <BKD__> ~pastebin
[15:56:52] <javabot> http://eugeneciurana.com/pastebin - Paste the final url after you've pasted your stuff there.
[15:57:23] <BKD__> ~testcase
[15:57:24] <javabot> BKD__, sscce is a minimal independently runnable program, which demonstrates the problem; see http://www.pscode.org/sscce.html for details and a HOWTO
[15:58:09] <surial> And irc.codehaus.org is also down. What the heck?
[15:58:39] <sbalmos> surial: You have reached the end of the Internet. Please turn back... now.
[15:59:34] <surial> sbalmos: Does that mean I defeated the boss battle?
[16:00:03] *** zuxqoj has quit IRC
[16:00:19] <surial> nevermind, irc is up.
[16:00:23] *** linenoise has joined ##java
[16:01:08] <linenoise> So. How bad is it if a servlet has a serialVersionUID=1L
[16:01:20] <cheeser> it's not.
[16:01:23] <ojacobson> None bad.
[16:01:28] <cheeser> it is, however, largely pointless.
[16:01:32] <ojacobson> There are no ordering or format dependencies on serialVersionUID.
[16:02:02] <ojacobson> The default strategy (which produces large random-looking numbers) was chosen to avoid collisions between generated UIDs, not because they have to be that shape
[16:02:07] <linenoise> okay... cool. It looked weird and I didn't know if I neeed to fix it. Going to back away from this one slowly and scratch my head. Thanks!
[16:03:19] *** c_axis has quit IRC
[16:04:08] *** FrankLv has left ##java
[16:04:44] *** opakavic has quit IRC
[16:04:54] <surial> linenoise: Unless you know what you are doing, you shouldn't use serialVersionUID. But as far as style fuckups go, this is a tiny one.
[16:04:55] *** paulweb515 has quit IRC
[16:05:28] <surial> linenoise: Have you released this app into the wild yet *AND* do you use serialization *AND* do you store serialized results long-term? If yes, don't touch it. If no to any part of that, just get rid of it.
[16:05:57] *** maxfreelan has quit IRC
[16:06:31] *** gremmachook has quit IRC
[16:06:52] *** topriddy has quit IRC
[16:07:29] *** BKD__ has quit IRC
[16:07:37] *** SSgtSpoon|work has joined ##java
[16:08:52] <Kryigerofe> surial: Here's a report of what it says on different setups: http://paste.pocoo.org/show/346413/
[16:09:31] <Kryigerofe> I was using the first (Animation.class.getClassLoader().getResource etc). But I tested the alternatives you presented as well.
[16:09:42] *** Sambler has quit IRC
[16:10:00] *** cbeust_ has joined ##java
[16:10:21] <Kryigerofe> It looks to me the URL is different in Java Web Start in that it has a space instead of %20 in the path to the .jar, but otherwise it's the same...
[16:10:31] *** [[thufir]] has quit IRC
[16:10:47] <balou> i'm trying to run my junit tests in parallel, but I haven't been able to control how many classes are tested at any particular time
[16:11:14] <balou> i'm using mvn:test and the maven-surefire-plugin
[16:11:23] <Kryigerofe> The stuff is supposed to be in the /data folder at the root of the .jar. But I copied it to the bin folder as well to test. Seems in Eclipse it's looking for it in the bin folder.
[16:11:50] <balou> i've' tried to set <parallel>classes</parallel> and <threadCount>1</threadCount> , but mvn looks like it's trying to run all the tests at once :s
[16:12:23] *** passwordoff has quit IRC
[16:12:44] <cbeust_> balou: have you tried TestNG if you want to run your tests in parallel?
[16:13:10] <balou> do you know if TestNG is compatible with selenium?
[16:13:28] <balou> I haven't tried it
[16:13:30] <cbeust_> balou: yes, a lot of people use TestNG and Selenium, both for the parallelism and also because of dependent methods
[16:13:51] <cbeust_> balou: http://testng.org/doc/selenium.html
[16:14:13] <balou> awesome thanks
[16:14:32] <ojacobson> That's pretty much the only thing I use testng for, actually
[16:14:45] <ojacobson> predictable ordering matters a lot for integration testing, generally
[16:14:50] <balou> javabot: cbeust_++
[16:14:50] <javabot> cbeust_ has a karma level of 1, balou
[16:16:29] *** platzhirsch has joined ##java
[16:17:40] <surial> Kryigerofe: .getClassLoader().getResource() is *ALWAYS* a bug. Every single time.
[16:17:46] <surial> Kryigerofe: You can write a pattern for pmd if you like.
[16:18:13] <surial> Kryigerofe: You MUST use Animation.class.getResource, and remember that the format of the string is slightly different (either put a slash in front, then it's like the classloader version but not broken, or don't, and it's relative to the class, not the 'root').
[16:18:14] *** OliverTynes has joined ##java
[16:18:49] <OliverTynes> hey, is there a way to see how much ram a VM currently has access to?
[16:18:54] <dreamreal> yes
[16:19:04] <OliverTynes> i'm getting out of memory errors, pondering if my settings are not going in properly
[16:19:23] *** Matuku has joined ##java
[16:19:29] <surial> Kryigerofe: (It's broken, by the way, because implementations are free to return 'null' to indicate system classloader, which would lead to NPEs... but implementations don't have to. Leading to the fun times of something working perfectly well on your machine but breaking on your client's, resulting in hundreds of thousands of dollars in damages).
[16:19:38] <OliverTynes> dreamreal: how?
[16:19:47] <OliverTynes> my google fu is not enough to find it
[16:19:50] <surial> OliverTynes: By default, you get -Xmx64m. If you want to give your JVM more, now you know how.
[16:20:09] <OliverTynes> did you read what i wrote before you answered? :-)
[16:20:14] *** platzhirsch has left ##java
[16:20:21] <OliverTynes> i am wondering if there is a way to see it from inside the VM
[16:21:18] <surial> Kryigerofe: You're gettig 'null' for your class.getResource() variant because you need to fix your strings. If you use com/foo/bar/Baz.png, use /com/foo/bar/Baz.png (slash in front). Or if com.foo.bar is the same package as the class you're in, just "Baz.png" will work fine when using class.getResource().
[16:21:35] <surial> OliverTynes: There isn't.
[16:21:41] <surial> OliverTynes: Meta-VM stuff is done via jvmti.
[16:21:48] <surial> OliverTynes: i.e. jdb, visualvm, etc.
[16:21:52] <OliverTynes> can you access what opts your jvm was started with then?
[16:21:53] <Kryigerofe> surial: Thanks. I'll try that.
[16:21:56] <surial> Those will tell you exactly how much memory you get.
[16:22:01] <surial> OliverTynes: Nope.
[16:22:03] <OliverTynes> hmph
[16:22:09] <surial> OliverTynes: Though teechnically you can connect to your own JVM with jvmti.
[16:22:18] <OliverTynes> will look up on jvmti, thanks
[16:22:34] <surial> Don't tell your own JVM to freeze or you just deadlock yourself. It's complicated shite, it's the API for debuggers. Why do you need to know from inside your own JVM?
[16:22:51] <surial> OliverTynes: ping
[16:22:52] <OliverTynes> how else would i check to see if my params are actually used?
[16:23:03] <surial> OliverTynes: By checking from outside your VM?
[16:23:16] <surial> OliverTynes: Just fire up visualvm, point it at your already running VM instance, and you'll see all you need to know.
[16:23:26] <OliverTynes> visualvm, ok, gimme a few mins
[16:23:36] <surial> OliverTynes: Is your app running? Just type 'visualvm' on the command line right now. Most likely its in your path.
[16:23:47] <surial> unless you're on a mac, in that case, you need to download it.
[16:23:56] <OliverTynes> i'm on a mac :)
[16:24:04] <ojacobson> jvisualvm
[16:24:15] <ojacobson> And: it's installed with the JDK, even on OS X
[16:24:15] *** magn3ts_ has quit IRC
[16:24:17] <OliverTynes> there we go
[16:25:26] <OliverTynes> indeed, none of my settings are actually getting set
[16:25:29] <surial> oh, right.
[16:25:32] <OliverTynes> thanks surial and ojacobson
[16:25:44] <surial> Holy shit! Oracle logos? I guess this got updated somewhere.
[16:26:48] <surial> OliverTynes: You'e welcome. Anytime you need to know what's happening with your VMs, vvm is a good place to start :)
[16:27:29] <OliverTynes> now to figure out why JAVA_OPTS dont work :p
[16:27:36] *** Vorrin has joined ##java
[16:27:40] <Vorrin> hello
[16:28:17] <OliverTynes> just to be sure, JAVA_OPTS="-server -Xmx4096M -XX:MaxPermSize=1024m -Dfile.encoding=UTF-8"
[16:28:28] <OliverTynes> that is syntactically correct, rigth?
[16:28:31] <ojacobson> OliverTynes: For what program?
[16:28:41] <ojacobson> The JVM does not respect JAVA_OPTS, but lots of launcher scripts use similar environment variables
[16:28:54] <OliverTynes> the grails launcher pass those on to tomcat
[16:28:55] <ojacobson> (Or JAVA_HOME - same story)
[16:28:59] <ojacobson> #tomcat
[16:29:00] *** EnginA has joined ##java
[16:29:14] <ojacobson> or start reading the various launcher scripts and triaging it
[16:29:20] <OliverTynes> i'm inside the launcher scripts
[16:29:28] <OliverTynes> just wanted to make sure my arguments are syntactically correct
[16:29:29] <OliverTynes> :)
[16:29:42] <ojacobson> Pass them to a freestanding java invocation and find out :)
[16:29:45] <Kryigerofe> Well, seems it still didn't work after the fix. Turned out Java Web Start just didn't like the spaces.
[16:29:55] <OliverTynes> hah, good idea ojacobson
[16:30:03] <Vorrin> I have a little, possibly simply resolved issue
[16:30:11] <Vorrin> I have created a JLed class, which extends JLabel
[16:30:27] <Vorrin> then I create one instance of such as jLabel3 = new JLed();
[16:30:45] <saml> that's pretty cool Vorrin
[16:30:50] <Vorrin> :(
[16:30:52] <Vorrin> heh
[16:30:55] <saml> keep it coming
[16:31:10] <Vorrin> when calling a method 'TurnOn' for such instance , it claims that such method is not a method of JLabel
[16:31:26] <Vorrin> and requires I cast it as a JLed, whilst the instance already should be one
[16:31:29] <saml> what's visibility of TurnOn?
[16:31:43] <Vorrin> public method of JLed
[16:31:51] <saml> why not final JLed jled = new JLed();
[16:32:00] <saml> what's type of jLabel3 ?
[16:32:13] <Vorrin> jLabel3 = new JLed();
[16:32:37] <saml> Vorrin, type of jLabel3... are you using eclipse?
[16:32:42] <Vorrin> myeclipse yes
[16:32:50] <saml> place your cursor at jLabel3, and press F3 key
[16:33:18] <Vorrin> !
[16:33:28] <Vorrin> I see
[16:33:34] *** BeholdMyGlory has quit IRC
[16:33:46] *** BeholdMyGlory has joined ##java
[16:33:48] <Vorrin> thanks a lot, that solves it, not sure why Matisse did that to me, but it's likely an error on my part
[16:34:05] *** EnginA has quit IRC
[16:34:13] *** hzroot has quit IRC
[16:35:15] <Radu-Mihail> Guys, noob question, can't remember: how can I access enclosing class' member from an anonymous inner class?
[16:36:16] *** brundlefly has quit IRC
[16:37:39] <saml> Radu-Mihail, just access it?
[16:37:53] <cheeser> OuterClass.this.<member>
[16:38:10] *** frangiz has quit IRC
[16:38:22] <Radu-Mihail> cheeser, lovey, thanks!
[16:39:06] *** frangiz has joined ##java
[16:39:07] *** scruz has quit IRC
[16:39:27] <Radu-Mihail> saml, I already had a parameter with the same name as a member of the enclosing's class, so I couldn't just access it.
[16:40:10] *** al80 has joined ##java
[16:40:18] <surial> ~javadoc Calendar
[16:40:18] <javabot> surial: http://is.gd/Xo0B35 [JDK: java.util.Calendar]
[16:41:46] *** t0rc has joined ##java
[16:43:20] <surial> ~fatjar
[16:43:20] <javabot> surial, fatjar is a jar file compiled from several other jars, see http://fjep.sourceforge.net/
[16:43:21] <surial> ~jarjar
[16:43:21] <javabot> jarjar is yet another utility to repackage jars and embed them within your distribution. For more information see http://code.google.com/p/jarjar/
[16:43:31] <surial> which one is better?
[16:43:39] *** crypto-- has quit IRC
[16:43:41] <OliverTynes> jvisualvm says i have plenty heap space when i get the out of heapspace exception, lag in polling information you think surial?
[16:43:45] <al80> Question about Maven: I am on project C (that is child of project B, and A is a brother of B). How to run mvn install on C and A?
[16:43:57] <surial> OliverTynes: I doubt it. Whatever you're doing requires more memory than is left.
[16:44:03] <OliverTynes> yeah thats what i mean
[16:44:10] <surial> OliverTynes: Which line is blowing up?
[16:44:16] <OliverTynes> it says 200mb free, so something maybe tried to allocate 300mb more
[16:44:58] <surial> For example. For some simplistic reverse engineering of a binary format, I was off-by-one somewhere, and I subsequently tried to allocate an array of a few billion entries instead of 5. That kind of thing is going to cause an OOME pretty definitively :) - could be that.
[16:45:06] <OliverTynes> hehe
[16:45:21] <cbeust_> surial: if you're using Maven, I recommend Shade. Seems pretty standard.
[16:45:31] <surial> I'm not.
[16:45:34] <OliverTynes> i'm using xpaths in an xml file, it dies on a base64 decode
[16:45:43] <OliverTynes> and jvisualvm says it has 200mb left when doing said operation
[16:45:45] <OliverTynes> weird
[16:46:00] <OliverTynes> too lazy to investigate that part, i'll just figure out how to slap a few gigs of ram on it :)
[16:46:00] <surial> OliverTynes: It's possible the data is corrupted.
[16:46:22] <OliverTynes> yeah i figured that as well, so i just tried reading only that data into another program, worked just fine
[16:46:26] <surial> OliverTynes: I really, _REALLY_ doubt that's the issue here. I'm fairly sure the base64 decoding is failing, and it is expressing this failure in i.e. allocating a gigantic array, thus, the OOME.
[16:46:57] <OliverTynes> actually, it seems you are right
[16:47:20] <OliverTynes> but its the apache commons codec, and the decode works standalone.. i dont get it
[16:47:27] <OliverTynes> the encoded file is only 3-4mb big
[16:48:36] *** wad has joined ##java
[16:49:39] *** gelignite has joined ##java
[16:49:40] <balou> when switching from JUnit to TestNG, I previously overode the runTest() method in the parent class of all our tests. The main purpose was to generically send announcements to another platform based on whether a test failed of not. From the runTest method, i could access the method/class name and all was good.
[16:49:47] <balou> is there an easy way for me to do that with TestNG?
[16:50:28] <cbeust_> balou: yes, use a listener
[16:50:45] <balou> listening to method invocations, will also give me the result of the test?
[16:50:50] * balou goes to read more
[16:50:59] *** setmeaway has quit IRC
[16:51:02] <cbeust_> balou: Yes http://testng.org/doc/documentation-main.html#testng-listeners
[16:51:13] <cbeust_> More specifically, http://testng.org/javadocs/org/testng/ITestListener.html
[16:51:30] <balou> this is good
[16:51:42] <cbeust_> Feel free to email your questions to testng-users
[16:53:10] *** pyrony has quit IRC
[16:53:15] *** Olathe has quit IRC
[16:54:36] *** RLa has quit IRC
[16:55:09] <dreamreal> bleah, back in eclipse
[16:55:22] *** `moebius` has joined ##java
[16:56:10] *** r0bby has quit IRC
[16:57:02] *** Nikelandjelo has joined ##java
[17:00:21] *** Olathe has joined ##java
[17:00:32] *** SpaceDoG has quit IRC
[17:01:33] *** t0rc has quit IRC
[17:02:54] *** Rubarb has joined ##java
[17:04:18] *** matsebc has quit IRC
[17:04:47] *** `moebius` has quit IRC
[17:07:30] *** coalado1 has joined ##java
[17:08:27] *** cythrawll has joined ##java
[17:09:01] *** SpaceDoG has joined ##java
[17:09:22] *** coalado has quit IRC
[17:10:31] *** mazzachre has quit IRC
[17:10:34] *** VaNNi has joined ##java
[17:11:57] <gwz> how can I access arraylist from another function?
[17:12:57] *** Sliker has joined ##java
[17:13:02] *** OliverTynes has left ##java
[17:13:45] <mapreduce> gwz: Pass it to that method as a parameter.
[17:13:56] <gwz> its a void method
[17:14:04] *** terranova has joined ##java
[17:14:15] <gwz> could I somehow create a instance of class and access it from that?
[17:16:21] <FauxFaux> Parameters are logically passed by reference; you can edit a passed-in arraylist fine.
[17:16:32] *** gtrak has joined ##java
[17:17:28] *** pyrony has joined ##java
[17:18:01] *** FCTW has joined ##java
[17:18:26] <gwz> well the arraylist is declared in the constructor
[17:18:35] *** horte has quit IRC
[17:18:50] *** tyebud has joined ##java
[17:18:52] *** rgr has joined ##java
[17:19:08] *** Coin_Ope_Boy has joined ##java
[17:19:11] *** zemanel has quit IRC
[17:19:46] *** Coin_Ope_Boy has quit IRC
[17:20:20] <tyebud> Hey there java. I was curious if anyone is familiar with web2py, and whether or not there was a Java framework that had similar features - the ability to login to an admin panel and create/edit apps from within the framework?
[17:20:58] *** VJTachyon has quit IRC
[17:22:30] *** NetHawk has quit IRC
[17:23:46] *** mah01 has quit IRC
[17:24:47] *** VJTachyon has joined ##java
[17:25:28] <push[RAX]> tyebud: glassfish has an apps management interface in the admin panel, and you can setup netbeans to autodeply on save
[17:25:50] <push[RAX]> that's as close as "create/edit apps from within the framework" that I know java gets
[17:25:59] <tyebud> Awesome
[17:26:26] <tyebud> Yeah I'm really just looking for something I can work on my projects from anywhere
[17:26:37] *** pyrony has quit IRC
[17:26:55] <surial> tyebud: The normal solution to that problem is a laptop.
[17:26:59] <surial> tyebud: and/or ssh.
[17:27:03] <tyebud> Haha yeah
[17:27:03] <ojacobson> tyebud: the compile stage involved in java development really limits the amount of in-place development you can do
[17:27:08] <push[RAX]> I don't know how glassfish remote support is now but you can run the whole thing in local
[17:27:13] <ojacobson> Laptop + github = you're set, though
[17:27:17] <ojacobson> (or bitbucket, or google code, or...)
[17:27:17] *** platzhirsch has joined ##java
[17:27:17] *** Ch30ps has quit IRC
[17:27:27] <ojacobson> Remote deploying apps into most containers is easy
[17:27:28] <push[RAX]> ^^ what ojacobson said :P
[17:27:32] <ojacobson> or you can use GAE or something
[17:28:33] <tyebud> Definitely. The compile step had me confused, but I figured there had to be something
[17:28:36] *** explodes has joined ##java
[17:28:53] <ojacobson> You may discover you can do your development "live" if you only use JSPs. Professional and personal recommendation: never do this.
[17:29:09] <ojacobson> JSP is as bad a programming environment as PHP is, almost.
[17:29:18] <ojacobson> It's fine for templating, but not for code.
[17:30:13] <tyebud> Got it
[17:30:19] <surial> tyebud: There are a few tools that compile java out of the box - the compiler is essentially pluggable. So what you want can certainly exist. I just don't know of any tool that does it.
[17:30:20] <sproingie> tyebud: take a look at jrebel. you can use your IDE to edit code live
[17:30:22] <surial> For example...
[17:30:28] <surial> ~info pastebin
[17:30:28] <javabot> pastebin was added by: cheeser on 11-16-2010 at 3:04 PM, EST and has a literal value of: <reply>(http://eugeneciurana.com/pastebin|http://rifers.org/paste|http://mysticpaste.com|http://pastie.org|http://ideone.com/|http://paste.pocoo.org/) - Paste the final url after you've pasted your stuff there.
[17:30:35] <ojacobson> ideone
[17:30:41] <surial> tyebud: On ideone.com you can write some java code in a web form and compile + run it off the bat.
[17:31:31] <surial> tyebud: Oh, and, yeah, all you really need, once you've set up either jrebel or some auto-builder like jenkins, is the ability to edit a text file in a web form. You may also be able to set up a bespin server someplace. (bespin is a web-based IDE).
[17:31:38] <ojacobson> ~rfc 1925
[17:31:38] <javabot> ftp://ftp.rfc-editor.org/in-notes/rfc1925.txt or http://www.faqs.org/rfcs/rfc1925.html - depending on your preference.
[17:31:46] *** barq has quit IRC
[17:31:48] <ojacobson> Points 7, 8, 10
[17:31:49] *** pyrony has joined ##java
[17:31:53] <ojacobson> and possibly 11
[17:32:04] <tyebud> Ooh interesting. bespin + jrebel sounds fun
[17:32:29] <surial> tyebud: Heh, yeah. Maybe you can google around for others who might have experimented.
[17:32:38] <tyebud> I'll do that
[17:32:40] * surial has no idea of bespin has any kind of java support at all, such as at least code highlighting.
[17:32:49] <tyebud> Well, thanks guys. You've given me plenty to look in to
[17:33:44] <surial> tyebud: If you remember and have the time, if you succeed I'd love to hear about it.
[17:34:04] <tyebud> Yeah, I'll do a write up
[17:34:44] <tyebud> http://ace.ajax.org/
[17:34:49] <gwz> Hey guys, could you help me with this, http://pastebin.com/iNV3G8ib I get an exception around line #53
[17:34:59] *** chubby has joined ##java
[17:35:02] *** Abhi347 has joined ##java
[17:35:27] <ojacobson> gwz: I don't see you setting this.newArrays to anything other than null
[17:35:31] <ojacobson> Your constructor does not
[17:35:38] <ojacobson> (hint: local variable)
[17:36:40] *** cbeust_ has quit IRC
[17:36:53] <ojacobson> You're also calling repaint() from a thread that's not the EDT - don't do that
[17:36:54] <dmlloyd> all of my variables are loco
[17:37:14] <chubby> I am trying to get a handle on CPU usage in my application. I am using hprof. Whether I do cpu=times or cpu=samples I get pretty much the same thing. And the thing that has me confused is how can this line: java.net.SocketInputStream.socketRead0(SocketInputStream.java:Unknown line) use an appreciable amount of CPU when my network utilization is fairly low?
[17:37:26] <surial> gwz: Wat ojacobson said.
[17:37:39] *** bearded_oneder has joined ##java
[17:37:53] <ojacobson> chubby: lots of ways
[17:37:54] <dmlloyd> chubby: perhaps it's including wallclock time spent blocking?
[17:38:07] <surial> chubby: If you're using NIO and you've fucked up your selectorkey management, that'd do it.
[17:38:16] <surial> chubby: Or just that.
[17:38:16] *** Gracenotes has joined ##java
[17:38:20] <dmlloyd> SocketInputStream is unlikely to be called from NIO
[17:38:23] <ojacobson> Or if you're polling non-blocking socket
[17:38:25] <dmlloyd> an NIO app
[17:38:29] <chubby> this is SocketInputStream from the jTDS driver ...
[17:38:31] <surial> Oh, that's a fair point.
[17:38:34] *** pyrony has quit IRC
[17:38:48] <dmlloyd> SocketInputStreams don't even work in non-blocking mode, you get an exception iirc
[17:38:58] <chubby> the CPU will be pegged 80-100% for 15 minutes ago while it reads database tables ..
[17:39:10] <dmlloyd> I think it must be either (a) including wallclock time or (b) doing something stupid like reading one byte at a time from the socket
[17:39:18] <dmlloyd> (b) will definitely chew up CPU cycles
[17:39:18] <chubby> @dmlloyd: I believe that is correct. I looked at the source code for socketRead0 and it is a regular non-blocking recv()
[17:39:56] <dmlloyd> ok I'm betting on (b) then, they would benefit greatly from using a BufferedInputStream in front of the socket
[17:40:04] <chubby> @dmlloyd: I was wondering if that could possibly be the case too, because the jTDS loop is tight (I looked at their code too).
[17:40:45] <chubby> but the funny thing is that I am on a local gigabit network connected to the database .... it seems like it shouldn't be so bad ....
[17:41:53] *** Radu-Mihail has quit IRC
[17:41:59] <chubby> is there a way for me to check that I am not dealing with wallclock time? because a similar ponderance is how this : sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(WindowsSelectorImpl.java:Unknown line) from the NIO selector could result in appreciable time when there are 0 entries in the selector set ....
[17:42:12] *** chomping has joined ##java
[17:42:13] <ojacobson> Can you show us the profiler results?
[17:42:43] <chubby> (I realize that windows loops and does a poll and doesn't truly use select)
[17:42:54] <chubby> sure. let me pastebin them.
[17:43:05] <ojacobson> I'm surprised the Windows selector implementation doesn't use WaitForMultipleEvents
[17:43:09] <gwz> ojacobson: so have this.newArrays = newArrays; ? seems to give me a infinite amount of frames
[17:43:20] *** pyrony has joined ##java
[17:43:20] *** al80 has quit IRC
[17:44:41] <mapreduce> That line doesn't even mention frames.
[17:45:34] *** optraz has quit IRC
[17:46:25] *** kamoricks has joined ##java
[17:46:28] *** kamoricks has quit IRC
[17:46:46] *** glcrazy has joined ##java
[17:46:57] *** cool123 has joined ##java
[17:47:51] *** pyrony has quit IRC
[17:47:53] <chubby> ok, here is my pastebin: http://pastebin.com/Lh7dCLGY
[17:49:23] *** Phil-Work has joined ##java
[17:49:42] <chubby> when I increased the depth of the stack trace, that top entry is split out into several different stacks with entry into the same area.
[17:50:05] *** eitch0000 has quit IRC
[17:50:41] *** pawan_tejwani has joined ##java
[17:50:53] *** skylord5816 has joined ##java
[17:51:02] *** skylord5816 has quit IRC
[17:51:30] <chubby> I just find the idea of cpu being allocated to socketRead0 funny when by network utilization never climbs to or above 1% ....
[17:51:59] <pawan_tejwani> I have a mobile application .jar I want to run it on my pc using either netbeans or J2ME sdk (sun) on windows, how can I do so ?
[17:52:00] *** tyebud has quit IRC
[17:53:31] *** RLa has joined ##java
[17:54:43] *** csaba has quit IRC
[17:54:58] <RLa> when invoking a constructor, top elements of stack must be arguments and then comes invocation target or the target must be the first?
[17:55:14] *** pawan_tejwani has quit IRC
[17:55:29] <dmlloyd> what?
[17:55:31] <chubby> what is the context of that question?
[17:55:48] <dmlloyd> RLa: invoking a constructor is just: Foo foo = new Foo(args);
[17:56:02] <ojacobson> RLa: It's just an invokemethod op
[17:56:09] <ojacobson> but seriously, start looking at the code javac generates
[17:56:09] <RLa> but in bytecode
[17:56:12] <ojacobson> javap can show you
[17:56:30] <dmlloyd> yeah javap is the best way to learn
[17:56:46] <ojacobson> invokespecial?
[17:56:47] *** Abhi347 has quit IRC
[17:59:08] <jesmon> chubby: it seems as though the SocketStream usage is related to the jdbc driver. Each time it's listed in the profiling info, it's in the context of net.sourceforge.jtds.jdbc.SharedSocket.readPacket()
[17:59:09] <chubby> so on my thing is the best guess that we have a bunch of iterations looping and hitting socketRead0 because recv() inside the native method is only retrieving a small amount of data?
[17:59:31] <ojacobson> chubby: honestly, at this point you might be better off on the jtds mailing list
[17:59:43] <ojacobson> you'll want to identify the actual problem ("a lot of CPU time is spent here" is not, in and of itself, a problem)
[17:59:55] <ojacobson> (but "my app is running slower than N MS per request and here's where the time is going" is :)
[17:59:59] *** matsebc has joined ##java
[18:00:00] *** bojo_ has quit IRC
[18:00:36] *** bojo_ has joined ##java
[18:01:43] <chubby> ojacobson: yeah, I understand.
[18:02:01] *** glcrazy has quit IRC
[18:02:15] <RLa> nice, got some fancy plugin to show bytecode
[18:02:32] <chubby> from a high level, is my thinking right though that in a <1% CPU utilization situation a read wouldn't consume appreciable CPU unless it was called a lot of times ?
[18:02:45] <RLa> anyway, arguments must be on top which sucks a bit for me
[18:02:56] <chubby> I mean as a general starting point ...
[18:03:20] <ojacobson> chubby: You can see how many times it's being called there
[18:03:36] <chubby> yeah, by far more than the others ...
[18:03:36] <ojacobson> The 'count' column
[18:03:50] *** matsebc has quit IRC
[18:04:57] *** bojo_ has quit IRC
[18:05:17] *** c_axis has joined ##java
[18:06:29] *** Sambler has joined ##java
[18:06:32] *** pyrony has joined ##java
[18:08:42] *** Alvo has quit IRC
[18:09:24] *** stevenhong has left ##java
[18:10:44] *** stimpie has quit IRC
[18:11:16] *** frangiz has quit IRC
[18:11:27] *** epure_ has joined ##java
[18:11:28] *** TecladoZurdo has joined ##java
[18:11:38] *** tokam has quit IRC
[18:11:40] *** mapreduce has quit IRC
[18:12:21] *** frangiz has joined ##java
[18:12:37] <TecladoZurdo> saludos alguien sabe como crear una ventana splash en netbeans usando java swing
[18:12:50] *** BooVeMan_work has joined ##java
[18:13:29] *** BooVeMan_work has left ##java
[18:13:55] <cheeser> english please
[18:14:22] <TecladoZurdo> nooo
[18:14:38] <cheeser> si
[18:15:52] *** fenris has quit IRC
[18:16:43] <TecladoZurdo> los que saben español por fa cambiarse a #java_es
[18:16:57] *** irn has joined ##java
[18:17:15] *** fr0gprince_ is now known as Frogprince
[18:17:24] *** jonkri has quit IRC
[18:17:33] <whaley> ~~ TecladoZurdo english
[18:17:33] *** Frogprince is now known as fr0gprince_
[18:17:33] <javabot> TecladoZurdo, english is http://is.gd/3QUyC
[18:17:49] *** c_axis has quit IRC
[18:17:56] *** purestrain has joined ##java
[18:18:33] *** luneff has joined ##java
[18:18:48] *** LouisJB has joined ##java
[18:19:33] *** cbeust_ has joined ##java
[18:20:07] *** bubo has joined ##java
[18:20:53] *** cool123 has quit IRC
[18:22:15] *** wolfman2000 has quit IRC
[18:23:47] *** Cymage has joined ##java
[18:27:19] *** kubaplas has joined ##java
[18:28:59] *** Develman has joined ##java
[18:29:12] *** fuzzygroove has joined ##java
[18:29:34] *** fuzzygroove has left ##java
[18:29:49] *** diegoviola has joined ##java
[18:29:51] <diegoviola> hi
[18:31:21] *** fr0gprince_mac has joined ##java
[18:31:23] *** aLeSD has quit IRC
[18:32:12] *** fr0gprince_mac has quit IRC
[18:34:51] *** kubaplas has left ##java
[18:35:17] <diegoviola> is there any advantage as to using Linux as the primary OS for application development and programming than using OSX? I keep reading people who say "OSX is better, go with OSX", etc. Any suggestions?
[18:35:28] <diegoviola> I'm learning Java.
[18:36:12] *** tyebud has joined ##java
[18:36:29] <dmlloyd> I use both
[18:36:33] <moqq> diegoviola: they'll both work fine
[18:36:35] <dmlloyd> linux is a lot cheaper :)
[18:37:04] *** gtrak has quit IRC
[18:37:04] *** Luc1fel has quit IRC
[18:37:39] *** abhijain has joined ##java
[18:38:05] <cbeust_> What dmlloyd said
[18:38:25] <shiranpuri> windows~
[18:38:36] <cbeust_> The downside of Linux is sometimes having to spend more time figuring out why things don't work the way they should and a lack of apps
[18:38:36] <dmlloyd> no thank you
[18:38:45] <cbeust_> Windows is fine for Java too
[18:38:53] <dmlloyd> I've not really encountered either of those issues personally
[18:38:59] <cbeust_> Windows is probably the platform with the best tooling and JVM for Java actually
[18:39:03] <dmlloyd> granted I've been using linux for years and years
[18:39:04] <diegoviola> Thanks for your advise. Very appreciated.
[18:39:14] <diegoviola> I will go with Linux/Windows and a ThinkPad.
[18:39:49] <cbeust_> diegoviola: sounds like a good combination. Make sure you really need Llinux if you're going to install it, though, no point in making your life harder with two different OS if you don't have to
[18:39:51] <diegoviola> Linux as the main OS, Windows on a VM (just when I need to)
[18:40:57] <TecladoZurdo> yes I do
[18:41:09] <diegoviola> cbeust_: I've been using Linux for 8+ years now. I'm used to it. I mean, I prefer working on a unix-like OS.
[18:41:12] <TecladoZurdo> help help
[18:41:38] <RLa> unless you develop desktop apps you will not need windows most of time
[18:42:01] <cbeust_> diegoviola: Ok fine.
[18:42:08] <Caleb--> i'm a windows user, but if i were to switch to a Unix/Linux flavor, it prolly won't be OSX
[18:42:15] <abhijain> i am beginner for javcc . and i want to learn concept of javacc cany anybody suggest me from where i can learn
[18:42:25] <cbeust_> RLa: Games, games games. Nothing like a Super Meat Boy when you need a 10mn break :)
[18:42:50] <TecladoZurdo> netbeans use somebody
[18:42:54] <abhijain> dmlloyd, hi
[18:42:58] <RLa> hehe
[18:43:06] <abhijain> adimit, hi
[18:43:25] <RLa> abhijain, i just wrote small grammar yesterday using it
[18:43:46] <abhijain> RLa, can you give me such link which are helpful for beginner
[18:43:55] <abhijain> RLa, even i dont know abt syntax
[18:43:58] <RLa> abhijain, i assume you know java well, go look at example of java 1.0 grammar
[18:44:05] <dmlloyd> abhijain: http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=dp_ob_title_bk <- this is a good start
[18:44:35] <RLa> it uses almost same syntax as java
[18:45:24] <abhijain> dmlloyd, i want to create a parser in javacc can you help me
[18:45:38] <RLa> abhijain, go look at java 1.0 example
[18:45:44] <dmlloyd> no, I'm sorry
[18:45:50] <abhijain> RLa, link please
[18:46:05] <abhijain> dmlloyd, do you know anybody here who have knowledge on javacc
[18:46:07] <RLa> it's in examples folder
[18:46:15] <dmlloyd> no I do not
[18:46:18] *** gremmachook has joined ##java
[18:46:51] <RLa> examples/JavaGrammars/Java1.0.2.jj
[18:47:18] <abhijain> anybody have knowledge on javacc . want to learn specification of javacc . want to create a parser on javacc
[18:47:34] *** gremmachook has quit IRC
[18:47:48] *** LouisJB has quit IRC
[18:48:51] *** tokam has joined ##java
[18:49:38] <balou> is there a simple way to make TestNG continue on failure
[18:49:54] <balou> i.e. i'd like all my tests to run regardless of a particular test failing
[18:51:48] <cbeust_> balou: not really, if you're going down that path, maybe you should use your own asserts which will call the real assert but catch the exception?
[18:52:50] *** tokam has quit IRC
[18:53:27] *** tokam has joined ##java
[18:54:01] *** r0bby has joined ##java
[18:54:15] *** Abhi347 has joined ##java
[18:54:30] <Abhi347> in case of implementing two interfaces into a class, where both interface have same name of variable or method, how to implement it?
[18:54:57] <cbeust_> Abhi347: implements I1, I2 and then implement each required method
[18:55:38] <RLa> why the heck type descriptors use / instead of .
[18:55:43] *** bubo has quit IRC
[18:55:54] <Abhi347> yeah but the method names in bot interfaces r same
[18:56:07] <RLa> Abhi347, if signatures match, it's ok
[18:56:16] <RLa> i think it is
[18:56:29] <balou> cbeust_ really? there must be a way. I thought that'd be a common use case
[18:56:37] <Abhi347> so there'll be no problem, right?
[18:56:53] <Abhi347> I am rookie programmer, started learning Java last week lol
[18:57:02] <realtime_> ~lol
[18:57:03] <javabot> Maybe LOL stands for "Limited Operable Literacy".
[18:57:04] <diegoviola> do you recommend that I use a text editor like Vim for learning Java? or a IDE like Eclipse? Vim has always been my preferred editor.
[18:57:12] <RLa> or create one superinterface with the common method and extend it in both interfaces
[18:57:24] <balou> also it seems that when running in parallel calls to onTestSuccess can't be trusted wrt to what result.getName() gives you
[18:57:30] <balou> it just returns me the same name several times
[18:57:44] <cbeust_> ~~ diegoviola ide
[18:57:45] <javabot> diegoviola, ide is Integrated Development Environment, see IDEA, Eclipse or Netbeans. You don't *need* an IDE to use Java, but it helps. Everyone and their brother has an opinion on which is best, but please try them all out and decide for yourself.
[18:58:08] <diegoviola> cbeust_: thanks
[18:58:25] <Abhi347> RLa I have to implement both the interfaces or my teacher will kill me tommorow
[18:58:25] <cbeust_> diegoviola: Once you understand the basics of compiling and running Java programs, I strongly suggest learning Eclipse or IDEA
[18:58:34] *** tokam has quit IRC
[18:58:37] <abhijain> javacc study material help please for parser creation on javacc
[18:58:57] *** rretzbach has joined ##java
[18:59:13] *** teralaser has joined ##java
[18:59:29] *** tokam has joined ##java
[18:59:35] *** bubo_ has joined ##java
[19:00:10] <Abhi347> hey abhijain, i guess we have same name n surname :p
[19:00:36] <abhijain> Abhi347, yeah
[19:01:40] <Abhi347> everyone is java expert here, or there're noobs like me too?
[19:02:24] <cbeust_> Abhi347: probably a good mix :)
[19:02:47] *** chubby has quit IRC
[19:04:27] *** TheSchoolinator has joined ##java
[19:04:38] *** coalado1 has left ##java
[19:04:53] *** bubo_ has quit IRC
[19:05:32] *** ernimril has joined ##java
[19:06:50] *** lunatik210 has joined ##java
[19:08:03] *** abhijain has quit IRC
[19:08:46] *** digs has joined ##java
[19:09:02] *** ztj has quit IRC
[19:09:31] *** xeer has joined ##java
[19:09:32] *** ztj has joined ##java
[19:09:49] <xeer> Do implement base classes allow default member function declaration?
[19:10:33] <digs> I know this a n00b question, but google is confusing me. I am using eclipse and have my class files and resources in my project. I now want to create an executable windows program so that someone doesn't have to run the main class from the command line to start it. Does this funcctionality exist in eclipse?
[19:10:52] <digs> I started netbeans and it has an option to "start a application project" or "a class project"
[19:11:18] <digs> I guess I should have been using netbeans. But I liked learning how to do it from scratch.
[19:11:44] *** Radu-Mihail has joined ##java
[19:12:08] <realtime_> on windows if you install the jre it makes the .jar files behave like executables, you just double click and the app runs
[19:12:32] <digs> So, in effect .jar files are .exe files.
[19:12:47] <Radu-Mihail> No.
[19:13:04] *** mrhota has quit IRC
[19:13:21] <whaley> digs: that assumes they have a class with a main method and a proper manifest file
[19:13:34] <dmlloyd> and a JRE installed
[19:13:39] <digs> Oh.
[19:13:48] <ojacobson> "But I liked learning how to do it from scratch." would imply not using an IDE
[19:14:05] <ojacobson> (And it's a good way to learn how it works - then you can apply that to a real build tool :)
[19:14:12] <ojacobson> ~jar
[19:14:12] <javabot> ojacobson, jar is is Java ARchive. See http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/deployment/jar/ and http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/technotes/guides/jar/jar.html .
[19:14:13] *** Kamaran has joined ##java
[19:14:13] <ojacobson> ~manifest
[19:14:14] <javabot> Manifests are a way of specifying metadata about a jar file inside the jarfile. See http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Manifest%20Specification
[19:14:14] <Abhi347> use notepad or edit plus if you like to work from scratch
[19:14:17] <digs> The IDE is just a glorified notepad.
[19:14:36] <ojacobson> Really? What javac command are you using to compile your code?
[19:14:36] <realtime_> well but without installing the JRE the user wouldn't be able to run the program in any way, no?
[19:14:41] <dmlloyd> notepad is just a glorified edlin
[19:14:45] <ojacobson> If 'none' then your IDE is doing more than being a glorified notepad. :)
[19:14:51] <digs> I could just as well copy the code into editpad and then run it from the command line. Nothing lost in learning doing it in eclipse.
[19:15:12] <Abhi347> @realtime yes, he won't be able to run it
[19:15:51] *** Radu-Mihail has quit IRC
[19:16:07] *** Sambler has quit IRC
[19:16:15] *** r0bby_ has joined ##java
[19:16:17] <digs> The only features I use is the "run" button. and yes ojacobson, you are correct.
[19:16:18] *** r0bby has quit IRC
[19:16:29] <digs> So, there is a way to create an "exe" right?
[19:16:38] <ojacobson> Executable JAR
[19:16:52] <ojacobson> See the links javabot spat out ^ up there about JARs and manifests
[19:16:59] <digs> okay.
[19:17:04] *** RLa has quit IRC
[19:17:06] <digs> Thank you guys.
[19:18:08] *** bojo has joined ##java
[19:21:02] *** robbyoconnor has joined ##java
[19:21:18] *** r0bby_ has quit IRC
[19:21:51] *** Rubarb has quit IRC
[19:24:04] *** riotz has joined ##java
[19:25:26] *** lamdk has joined ##java
[19:26:33] *** platzhirsch has left ##java
[19:28:31] *** Pritchard has joined ##java
[19:28:50] * Pritchard can debug code using pen and paper thanks to identifier prefixes/suffixes
[19:28:55] <Pritchard> ... Sorry :p
[19:29:04] *** LouisJB has joined ##java
[19:29:42] *** freeone3000 has joined ##java
[19:30:09] *** purestrain has quit IRC
[19:30:52] *** matsebc has joined ##java
[19:32:10] *** Behold has joined ##java
[19:36:16] *** BeholdMyGlory has quit IRC
[19:39:13] *** Abhi347 has quit IRC
[19:40:03] *** PigFlu has joined ##java
[19:40:59] *** sebrock has quit IRC
[19:42:58] <digs> May I ask for one more clarification? I am building this and it is ~3.2 MB. I have audio files in the src directory in a subfolder. Are these being included in the jar build? When I run the program, the audio does not work unless I copy the files into the same directory as the jar in a folder /src/audio
[19:43:09] <digs> I know this is because this is the way I have referenced them in the code...
[19:43:13] *** homie has quit IRC
[19:43:22] <digs> System.getProperty("user.dir") + "/src/audio/fail-buzzer-01.mp3" -- for example.
[19:43:57] <digs> so is the audio also bundeled in the jar?
[19:45:34] <freeone3000> No. That's a pretty poor way to do it.
[19:45:38] <digs> Also, what is the "standard" method for including assests such as images and audio for a java program? Just bundle the libraries into an executable jar and then copy the assests into the directory?
[19:45:39] *** staar2 has joined ##java
[19:45:52] <digs> freeone3000, I don't want them bundled in the jar is my point I guess.
[19:46:02] <digs> but it is 3.2MB and that seems too large.
[19:46:07] <staar2> hello
[19:46:09] <digs> makes me think they are.
[19:46:14] <freeone3000> digs: It's going to be 3.2MB whether it's in the JAR or outside of the JAR.
[19:46:37] <digs> I realize that.
[19:46:37] <freeone3000> digs: Standard procedure is to put it in the JAR and access it through Class.getResourceAsStream().
[19:47:00] <freeone3000> digs: The only reason you would have it outside the jar is if you expect users or the program to edit the file.
[19:47:27] <digs> Hm. Interesting. - I will look that up. Does that mean I have to bundle my resources into a jar and import that as a library in my project?
[19:47:32] <digs> instead of just adding them directly.
[19:47:42] <freeone3000> digs: The currently executing JAR is always on the classpath, by reasoning of tautology.
[19:48:00] *** Pritchard has left ##java
[19:48:03] <freeone3000> digs: One JAR, code + resources. Unless your resources end in ".class", they won't get in each other's way.
[19:48:15] <staar2> well i cant figure out how to use correctyl Lists in recrusion http://pastebin.com/ZkTGBnu2
[19:48:31] <digs> freeone3000: Okay.
[19:50:06] <digs> freeone3000: let me clarify my question though. I realize that once I export it, it will be one jar with code and resources all in one. -- However, while I have the project in eclipse...
[19:50:11] <digs> Say starting from scratch, you create a class, and you want to reference 3 audio files. Do you create a jar of those 3 audio files and add the jar to the project as a resource? Then of course when you build teh jar exectutable, it will include this resource.
[19:50:30] *** CoryDambach has quit IRC
[19:51:03] *** CoryDambach has joined ##java
[19:51:04] <freeone3000> I use maven, so I shove it in "src/main/resources".
[19:51:23] *** robbyoconnor has quit IRC
[19:51:31] <digs> Okay.
[19:51:34] <sproingie> i use osgi so i would just make it a fragment
[19:51:39] <digs> I will play around with it. Thanks freeone3000
[19:52:16] <sproingie> i'm pretty much ready to kick pax runner to the curb now
[19:52:40] *** homie has joined ##java
[19:52:45] <sproingie> they just upgraded versions, and it BREAKS pax logging. and the maven pax plugin? it ignores the <version> configuration item
[19:53:27] <sproingie> time to figure out karaf
[19:54:10] *** surial has quit IRC
[19:54:36] *** purestrain has joined ##java
[19:54:39] <realtime_> I have a JTextArea with line wrap enabled. I would like the wrap to count as a new line when retrieving the text. how could I do it?
[19:54:41] *** surial has joined ##java
[19:55:42] *** ioss has joined ##java
[19:56:07] *** ioss has left ##java
[19:57:42] *** gt_jk has joined ##java
[20:00:06] *** gt_jk has joined ##java
[20:00:24] *** digs has quit IRC
[20:00:25] *** gt_jk has left ##java
[20:04:28] <freeone3000> (Question answered in ##swing)
[20:05:32] *** eyesUnclouded has quit IRC
[20:05:44] *** Skull0Inc has joined ##java
[20:05:47] <realtime_> yes, thanks.
[20:06:16] *** Develman has quit IRC
[20:08:28] <homie> do java developers wear glasses ?
[20:08:38] <xeer> Do implement base classes allow default member function declaration? Ex: public void func() = 0; --or-- public void func() { }
[20:08:39] *** Vorrin has quit IRC
[20:08:44] <sbalmos> I don't know. Let me put on my glasses and see.
[20:09:19] <homie> hmmm, why would a game run in virtualbox not get the mouse focus right ?
[20:09:23] <freeone3000> xeer: That syntax is not valid in Java. All Java functions are virtual, so pure virtual are declared using the "abstract" keyword. Only abstract classes and interfaces can contain abstract functions.
[20:09:32] *** wolfman2000 has joined ##java
[20:09:37] <freeone3000> ~abstract
[20:09:37] <javabot> freeone3000, abstract is http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html
[20:09:38] <homie> i hope it's the game not the java behind it...
[20:10:20] <tjsnell> it's a well known bug in java that it can't get focus
[20:10:35] <homie> oh
[20:10:54] *** jesmon has quit IRC
[20:11:12] <xeer> freeone3000: I believe I was asking about abstract functions in java.
[20:11:22] *** rgr has quit IRC
[20:11:41] *** Gracenotes has quit IRC
[20:11:58] <freeone3000> xeer: And I believe I answered that question.
[20:12:10] *** matsebc has quit IRC
[20:12:33] <xeer> So, public abstract then. Okay.
[20:13:06] *** jesmon` has joined ##java
[20:13:08] *** LouisJB has quit IRC
[20:13:16] <xeer> I'm asking because I have an interface that I would like to have default functions set.
[20:13:58] <freeone3000> Then that's an abstract class, not an interface.
[20:13:58] <xeer> From what you explained, only an abstract class can have an abstract function. Still doesn't explain if they can be set to a default scope and then later implemented when deriving.
[20:15:02] <freeone3000> Uh. My C++ vtable is weak, but "default scope" basically means they don't point anywhere? That's what "abstract" does. You can't create an instance of an interface or an abstract class, because they would have methods you can't call. If you have a concrete (non-abstract) class, then all inheirited abstract methods must have a non-abstract implementation. As explained in the link.
[20:16:23] *** Sambler has joined ##java
[20:19:00] *** askhl has quit IRC
[20:19:42] *** navi_sir has joined ##java
[20:20:46] *** navi_sir has quit IRC
[20:20:55] *** Granjow has joined ##java
[20:21:12] <Granjow> Good evening
[20:22:02] <Granjow> I'd like to profile an application with VisualVM. It is a .jar file that I start with java -jar and which terminates after the task is finished. Can I do that?
[20:22:40] <Granjow> Or can VisualVM only catch applications that are already running?
[20:22:46] <pr3d4t0r> cheeser: Ping...
[20:22:47] <Granjow> Mine terminates after a short time.
[20:22:54] <sproingie> visualvm is a separate app. start your app, start visualvm
[20:22:54] <cheeser> pong
[20:22:57] <pr3d4t0r> cheeser: http://i.imgur.com/vgIa9.jpg
[20:23:00] <pr3d4t0r> cheeser: :)
[20:23:17] <cheeser> haha. saw that a few years ago. from you as i recall. P^)=
[20:23:33] *** Behold has quit IRC
[20:23:36] *** BeholdMyGlory has joined ##java
[20:23:55] <pr3d4t0r> cheeser: Heh - I saw it a long time ago but didn't recall if I'd shared it :) Have a nice day.
[20:24:16] <Granjow> sproingie: When I start my app and then start visualvm, than my app has already stopped.
[20:24:17] *** Skull0Inc has quit IRC
[20:24:30] <Granjow> So it is useless for me?
[20:24:36] <sproingie> Granjow: then visualvm won't do it for you. use your IDE's profiler
[20:25:16] <Granjow> sproingie: Uh ... was there one for eclipse? PTPT or so?
[20:25:38] <sproingie> http://stackoverflow.com/questions/4434860/how-to-profile-application-startup-with-visualvm
[20:25:59] <sproingie> netbeans's profiler is visualvm afaik
[20:27:52] *** matsebc has joined ##java
[20:29:25] <Granjow> http://java.net/projects/visualvm/content/eclipse-launcher.html :( What did oracle do ... no links are working.
[20:30:39] *** Scaatis has joined ##java
[20:31:36] <Scaatis> hello. Even after some google searching I could not find an answer to this: how do I load an image that is outside of a jar file from inside said jar file?
[20:32:24] <ernimril> Scaatis: ImageIO.read(someURLToThatImage)
[20:32:34] <Scaatis> so inside my jar file inside the package src is the class TextureLoader. It should load an image that is outside of the jar file but in a subdirectory
[20:32:38] <Scaatis> that is what I do now
[20:32:53] <ojacobson> Scaatis: is it part of the app, or is it the user's data?
[20:33:16] <ojacobson> If it's part of the app, include the directory on your classpath (your manifest can include directories relative to the JAR's location...) and use the normal resource loading glue
[20:33:17] <Scaatis> I'm not sure I understand correctly but the image is distributed with the app
[20:33:21] <ojacobson> If it's user data, ask the user where it is
[20:33:29] <ojacobson> though honestly, why isn't it in your JAR?
[20:33:54] <Scaatis> seemed cleaner to have the jar contain the executable code and have resources such as images and sound outside
[20:34:15] *** surial has quit IRC
[20:34:23] <freeone3000> Because a directory full of loose files is cleaner than one file.
[20:34:47] <Scaatis> the images are in a /gfx directory next to the jar file
[20:35:46] *** rgr has joined ##java
[20:35:53] *** fuzzygroove has joined ##java
[20:35:58] *** Gracenotes has joined ##java
[20:39:13] *** MacGyverNL has quit IRC
[20:39:38] *** c_axis has joined ##java
[20:39:51] *** horte has joined ##java
[20:40:36] *** eyesUnclouded has joined ##java
[20:40:38] *** c_axis has quit IRC
[20:40:41] <horte> Hey guys. When should I consider using a Set<MyObject> instead of an array MyObject[] ?
[20:41:07] <horte> I am fetching Objects from my Database and passing them forward.
[20:41:22] <ojacobson> Wrong way up
[20:41:28] <cbeust_> horte: Prefer collections over arrays. As for whether a Set is what you need, depends.
[20:41:35] <ojacobson> Using an array instead of a collection type (list, set, whatever) is a special case, not the default behaviour
[20:41:42] *** luneff has quit IRC
[20:41:54] <ojacobson> arrays are very low-level tools that require consideration
[20:42:02] <ojacobson> collections are reasonable data structures
[20:42:11] <horte> ojacobson: So basically ArrayList is a List
[20:42:19] <horte> and List belongs to Collections
[20:42:41] *** Gracenotes has quit IRC
[20:42:48] *** surial has joined ##java
[20:43:01] <cbeust_> ArrayList is very close to an array, you will probably never see the difference
[20:43:35] <horte> But if I want to make sure I dont have identical objects I should use a Set, right?
[20:43:51] <cbeust_> horte: correct
[20:44:25] <horte> But since I fetch them from my DB it's always unique. So is one prefered over the other if I wanna iterate or sort them?
[20:44:29] <Scaatis> thank you ojacobson, that works
[20:44:39] *** Scaatis has left ##java
[20:44:55] <freeone3000> A List is more convienent, as items have indexes.
[20:45:10] <ojacobson> horte: you can't sort a set
[20:45:30] <cbeust_> horte: If you need to sort, use a List
[20:45:32] <ojacobson> Since you have a database, you may want to sort them there and then put them into an order-preserving container (list, LinkedHashSet, whatever)
[20:45:33] <freeone3000> But a Set *can* be sorted.
[20:45:34] * ernimril points to the SortedSet
[20:46:56] <horte> And if I want to sort my Set/List based on an Object variable. Is that possible. E.g. myList<Object> and then sort based on Object.name
[20:47:10] <freeone3000> Sure. Just define a Comparator<Foo>.
[20:47:24] <freeone3000> (java.lang.Object is an actual thing, and can't be used metasyntatically)
[20:47:27] <ojacobson> horte: You have a database.
[20:47:34] <ojacobson> It's probably really good at sorting data.
[20:47:38] <ojacobson> You might want to do that there.
[20:48:04] *** devkhadka has quit IRC
[20:48:29] *** barq has joined ##java
[20:48:47] *** immibis has joined ##java
[20:48:47] <horte> Yes ojacobson, though I also have a Memcached layer so I really want to have the layer handling the entities as "blackboxed" as possible. And since I have many different way of sorting I dont really want to make a method in all layers for every way of sorting
[20:49:53] <immibis> is there any way to move classes out of the default package if i don't have the source code?
[20:49:54] *** TheSchoolinator has quit IRC
[20:50:27] <freeone3000> immibis: No.
[20:50:27] <horte> E.g. I have "DBConnectors", "MemcachedConnectors", "EntityManagers" (which handles logic for flushing, getting etc. between DB and memcached)
[20:51:01] <horte> So I really just want to fetch the Set<Objects> and put it in my memcache
[20:52:07] <freeone3000> This sounds like you should be using JPA.
[20:52:46] *** thelifelessone has joined ##java
[20:53:39] <thelifelessone> Are there any recommended text editors (aside from Notepad) to learn Java with?
[20:53:58] <ernimril> thelifelessone: emacs, vim, notepad++, textpad, ...
[20:54:21] <thelifelessone> Okay. Thanks.
[20:54:46] <cbeust_> thelifelessone: Consider using an IDE (Eclipse or IDEA) instead of a text editor to write Java code.
[20:55:38] <thelifelessone> I was told to not use an IDE at first.
[20:56:07] *** alx_ has joined ##java
[20:56:17] *** realtime_ has quit IRC
[20:56:18] <cbeust_> thelifelessone: That's true, not if you're a complete beginner.
[20:56:47] <thelifelessone> Well I'm not a complete beginner. I do have experience with PHP and JavaScript.
[20:57:00] *** TheSchoolinator has joined ##java
[20:57:01] <horte> freeone3000: I am
[20:57:11] <horte> JPA combined with Memcached
[20:57:18] <cbeust_> thelifelessone: Learn how to use javac, packages, source folders. Once you're comfortable compiling and running your programs from the command line, switch to an IDE.
[20:57:19] *** pipeep has quit IRC
[20:57:21] *** alx_ is now known as alx
[20:57:26] <horte> or JPA/hibernate
[20:57:33] <thelifelessone> Okay. I could do that I guess.
[20:57:35] *** surial has quit IRC
[20:57:56] *** Gracenotes has joined ##java
[20:58:02] <pr3d4t0r> cheeser: Ping...
[20:58:36] *** irn has quit IRC
[20:58:43] *** surial has joined ##java
[20:58:47] *** LouisJB has joined ##java
[20:59:47] *** VJTachyon has quit IRC
[21:00:50] <cheeser> pong
[21:01:02] *** tesuki has joined ##java
[21:01:58] *** VJTachyon has joined ##java
[21:02:50] <pr3d4t0r> cheeser: Check your private messages, please.
[21:03:09] *** Zta has joined ##java
[21:05:20] *** tokam has quit IRC
[21:06:11] <Granjow> sproingie: so cool, it's working! http://granjow.net/uploads/temp/visualvm-wiki2xhtml.png :)
[21:07:50] <thelifelessone> Anyone know why the Java compiler won't run from commandline?
[21:08:40] <pr3d4t0r> thelifelessone: PATH?
[21:09:04] <thelifelessone> Alright, I'll check that.
[21:09:26] <thelifelessone> I'm running it from the desktop with the command "javac HelloWorld.java"
[21:09:42] *** eyesUnclouded has quit IRC
[21:09:43] <surial> thelifelessone: ... and what error do yo uget?
[21:10:05] <thelifelessone> "'javac' is not recognized as an internal or external command, operable program or batch file"
[21:10:13] <surial> thelifelessone: Okay. PATH broken.
[21:10:21] <surial> or probably just not set. What's your OS?
[21:10:27] <thelifelessone> Windows XP.
[21:10:31] <VooDooNOFX> I'm getting some warnings in my project that sun.font.fontmanager is a proprietary api and may be removed in a future release. Which package should I be using instead?
[21:10:35] <surial> You can't actually program on that bullshit. But okay.
[21:10:37] *** rgr has quit IRC
[21:10:42] <surial> thelifelessone: control panel, system, advanced, environment.
[21:10:53] <freeone3000> VooDooNOFX: What does that do?
[21:10:54] <thelifelessone> I'm trying to move over to Ubuntu, but alas, not yet. :/
[21:11:03] <surial> thelifelessone: Add ;C:\Program Files\java\jdkwhatnot\bin to the end. No spaces other than between Program and Files, and replace jdkwhatnot with the real dir name.
[21:11:19] *** amphtrox has joined ##java
[21:11:22] <thelifelessone> "C:\Program Files\Java\jdk1.6.0_24\bin"?
[21:11:25] *** madrax has joined ##java
[21:11:28] <surial> thelifelessone: I just turned on a windows 7 machine for the first time in the past 5 years, and the procedure still hasn't changed :P
[21:11:32] *** DJClean has quit IRC
[21:11:38] <freeone3000> Yes, but not in quotes. It doesn't like quotes. Also, make sure it's the global variable, not the local one.
[21:11:42] <surial> thelifelessone: at the end? Yeah, but, semi-colon first. semi-colon is the separator.
[21:11:46] <surial> thelifelessone: And no quotes.
[21:11:47] <thelifelessone> Alright.
[21:11:49] <surial> freeone3000: PATH will already be there.
[21:11:53] <VooDooNOFX> freeone3000: it allows my swt application to use system fonts throughout my program, and in reports generated by iText
[21:12:02] <surial> freeone3000: While you're there you may want to add JAVA_HOME, set to C:\Program Files\Java\jdk1.6.0_24
[21:12:20] <surial> If you're going to install ant (and a few other tools), they want that. Come to think of it, ant also wants ANT_HOME, though I believe it works fine without it usually.
[21:12:41] <freeone3000> surial: Yes. Frequently, you have two - the global one, and the local one. cmd uses the global one when escalated, which'lll... huh, which happens with UAC disabled, but I suppose that's not his case, XP and all.
[21:12:46] <thelifelessone> I added "C:\Program Files\Java\jdk1.6.0_24\bin" to path like you said, and it still isn't recognizing the command.
[21:12:57] <surial> thelifelessone: You need to quit cmd, and restart it.
[21:13:01] <thelifelessone> I have. Twice.
[21:13:08] <surial> thelifelessone: Then you fucked it up.
[21:13:11] <surial> thelifelessone: on cmd, do this:
[21:13:16] <surial> thelifelessone: echo %PATH%
[21:13:19] *** bojo has quit IRC
[21:13:22] <surial> then copy it to your paste buffer, and paste it here:
[21:13:23] <surial> ~pastebin
[21:13:23] <javabot> http://rifers.org/paste - Paste the final url after you've pasted your stuff there.
[21:13:26] <surial> Then show us.
[21:13:36] <freeone3000> VooDooNOFX: Okay. Not familiar with SWT. In Swing, you don't get to do that. You can select a font-family, or you can bundle your fonts.
[21:14:08] <thelifelessone> Just a moment.
[21:14:10] <surial> VooDooNOFX: You're using sun.font.fontmanager in SWT? I highly doubt that's going to work.
[21:14:17] <surial> VooDooNOFX: SWT is an IBM invention. Sun sides with swing.
[21:14:42] *** jor has joined ##java
[21:14:49] <freeone3000> And since it's a sun.* class, Sun doesn't even support that. Likely it's used for the lookup of fonts based on family.
[21:15:00] <thelifelessone> Ah, I found the error.
[21:15:01] <cbeust_> sun.* classes won't work on OpenJDK too
[21:15:09] <thelifelessone> Small typo.
[21:15:14] <freeone3000> cbeust_: Really? It's the same base code, isn't it?
[21:15:25] <freeone3000> Oh, right, they stripped out freetype.
[21:15:52] <surial> thelifelessone: Works now, then, right?
[21:15:55] <thelifelessone> Mhm.
[21:15:56] *** DJClean has joined ##java
[21:16:10] <thelifelessone> Tested the compiled script and all, and the output is correct.
[21:16:16] *** tyebud has quit IRC
[21:16:40] *** krnl_ has joined ##java
[21:16:55] <thelifelessone> Thanks for the help.
[21:17:02] *** thelifelessone has quit IRC
[21:17:30] *** VooDooNOFX_ has joined ##java
[21:17:43] *** the_cyber_guy has joined ##java
[21:18:04] <tesuki> I'm building a RMI application and have tried finding an answer, but I can not seem to do so; The problem are that the client send a message to the server, then the server distributes these messages to all clients (that are in list which clients gets added to by first calling connect to the server), then in the clients getMessage code where the client updates a GUI (using PropertyChangeSupport) throws a nullpointerExcepti
[21:18:06] <paissad> http://bit.ly/fHf7pt
[21:18:21] <paissad> i need some help, i posted that
[21:18:48] *** bojo has joined ##java
[21:19:05] *** konraddo has joined ##java
[21:19:07] *** konraddo has left ##java
[21:19:24] <paissad> the CSVREAD(...) confuses me
[21:19:47] *** zatan has joined ##java
[21:20:03] <freeone3000> paissad: CSVREAD() is the H2-specific way of doing a bulk import from CSV file. It works by magic.
[21:20:33] *** VooDooNOFX has quit IRC
[21:20:34] *** VooDooNOFX_ is now known as VooDooNOFX
[21:20:34] *** veidt has joined ##java
[21:20:49] <freeone3000> Think pg_bulkload
[21:21:33] *** Behold has joined ##java
[21:21:34] <paissad> freeone3000, i understood that but since it is not a sql standard, i don't know how to add directly the IF statements so that it add population only if the content of that field is not empty
[21:22:31] <freeone3000> Treat it like any other stored proc which returns results.
[21:23:12] *** BeholdMyGlory has quit IRC
[21:23:25] <freeone3000> Really though - your algorithm should handle an empty list the same way it handles any other list.
[21:23:27] <veidt> hi, everybody. how can i check the precision of a Double? i need to make sure it has < 3 decimal places
[21:23:27] *** mrhota has joined ##java
[21:23:33] *** sebrock has joined ##java
[21:25:00] <freeone3000> veidt: There are only four two-digit floating point numbers: .25, .50, .75, and .00. If you need precise math, consider fixed-point.
[21:27:43] *** immibis has quit IRC
[21:31:12] <ernimril> veidt: if you want to _format_ a double for user display, then you can use String.format or one of the printf or NumberFormat/DecimalFormat
[21:31:24] *** barq has quit IRC
[21:32:00] *** Quantum_Ion has joined ##java
[21:32:17] *** Sambler has quit IRC
[21:32:28] <dmlloyd> veidt, put another way, a double doesn't have decimal places, it has binary places
[21:33:06] <dmlloyd> veidt, and becuase it's "floating" point, it can have any number of binary places (within its precision, which iirc is typically on the order of 56 bits)
[21:33:30] <dmlloyd> veidt, put another, another way, you probably don't really understand what you're asking
[21:33:31] <ernimril> dmlloyd: 53/11/1
[21:33:48] <dmlloyd> 53 bits, I stand corrected
[21:34:20] <veidt> quite possibly.
[21:35:09] <veidt> basically, i need to make sure the double that gets fed to a method isn't "too precise". what i mean is, "12.42" should pass, but "12.421" should fail.
[21:35:22] *** mhahe has joined ##java
[21:35:50] *** Quantum_Ion has quit IRC
[21:35:59] *** cyphorious has joined ##java
[21:36:25] <ernimril> veidt: a double is always 64 bits, no more no less
[21:36:49] *** whoever has joined ##java
[21:36:56] *** Sambler has joined ##java
[21:38:08] <whoever> in walk() i am geting x cannot be resolved to a variable, and that is the only error, can some one help http://pastebin.com/ZNqaDJ84
[21:38:28] <dmlloyd> veidt: you're going to have problems because 12.42 isn't exactly representable with a double
[21:38:55] <shiranpuri> neither is 0.1, for a simple example
[21:39:04] *** ljc has joined ##java
[21:39:04] *** Gracenotes has quit IRC
[21:39:41] <Granjow> Uh ... new File("abc").getParentFile() == null, but new File("abc").getAbsoluteFile().getParentFile() != null -- does this make sense?
[21:39:43] *** ljc has left ##java
[21:39:46] <dmlloyd> veidt: 12.42 is approximately 12.4199999999999999289457264239899814128876 when stored in a double
[21:41:01] *** staar2 has quit IRC
[21:41:02] <freeone3000> Granjow: Yes, and performs as expected.
[21:41:37] <Granjow> freeone3000: When I think about it, then you're right.
[21:42:03] *** modernbob has joined ##java
[21:42:36] <dmlloyd> veidt: the best you can really do is say, "is the argument within approximately 1/2000 of a whole value" or something like that
[21:43:05] <veidt> so exactly what kind of magic does the jvm do so that when i sysout a new Double("12.42") it doesn't spit out the whole 64 bits
[21:43:28] <freeone3000> It does spit out the entire 64 bits. That's why you format your output.
[21:43:47] <freeone3000> It's 52 bits of data, plus an implied "1", plus 13 bits of exponent, plus one bit of sign.
[21:43:52] <ojacobson> veidt: The magic in Double.toString
[21:44:06] <ojacobson> veidt: it attempts (with pretty good success rate) to pick a short, non-ambiguous decimal representation
[21:44:14] <ojacobson> rather than the precise numerical value
[21:44:25] <dmlloyd> but it is just an approximation, which is important to understand
[21:44:28] *** Pozejdon has quit IRC
[21:44:40] <veidt> ok, i think its getting through my thick head
[21:44:44] <dmlloyd> float/double make a lot more sense when expressed in hexadecimal
[21:44:50] <TecladoZurdo> hi
[21:44:59] <ojacobson> Use BigDecimal, perform tests against number of decimal places and place of the last non-zero digit
[21:45:19] <dmlloyd> interestingly, a decimal floating-point type is on the table for an upcoming ANSI/ISO C spec
[21:45:26] <ojacobson> (Either way, do error analysis so that you can tell how far out of whack your computation's final results will be)
[21:45:28] *** Sambler has quit IRC
[21:45:35] <ojacobson> yeah, but it's still a floating-point type
[21:45:40] <veidt> another way i figured was to parse it to a string and then regex the hell out of it.
[21:45:43] <ojacobson> sometimes you really do want fixed (or controlled, anyways) precision
[21:45:46] <dmlloyd> yeah
[21:45:48] <ojacobson> nnnnno
[21:45:48] <dmlloyd> all true
[21:45:49] *** Nikelandjelo has quit IRC
[21:46:59] *** Nikelandjelo has joined ##java
[21:48:16] *** demifuror has joined ##java
[21:50:39] *** horte has quit IRC
[21:51:47] *** sbyrne has joined ##java
[21:52:03] *** freeone3000 has quit IRC
[21:55:46] *** freeone3000 has joined ##java
[21:55:49] *** pchapman has joined ##java
[21:58:39] *** nchaimov has joined ##java
[22:00:15] *** srm has joined ##java
[22:04:32] *** Johannes13 has quit IRC
[22:05:58] *** xeer has quit IRC
[22:07:36] *** gwz_ has joined ##java
[22:07:47] *** neuro_sys has joined ##java
[22:08:19] <gwz_> hey guys, I was having problem with this program, getting infinite Jframes for some reason, http://pastebin.com/GYC01sW4 any help is appreciated!
[22:08:59] <freeone3000> gwz_: Read line 21. Read line 49.
[22:09:21] <freeone3000> And this is part of the reason we don't create JComponents in a constructor.
[22:10:04] *** pchapman has quit IRC
[22:10:15] *** eyesUnclouded has joined ##java
[22:10:36] *** lunatik210 has quit IRC
[22:10:42] <Planck_> Even better, it creates a thread that repaints every 40-ish mllisecond every paint as well.
[22:11:38] <Planck_> Repainting a possibly not yet fully constructed Chaser.
[22:15:10] <cheeser> gwz_: you create a new Chaser() in paintComponent()
[22:15:18] <cheeser> so, yeah, you're gonna get a lot of JFrames
[22:15:54] *** gtrak has joined ##java
[22:16:58] <gwz_> oh!! wow I didn't even see that
[22:17:00] <gwz_> thanks a lot :)
[22:17:09] <gwz_> and thanks for the problems pointed out earlier too
[22:18:08] <gwz_> is there a way for the paintComponent to loop through arraylist defined in constructor?
[22:19:19] <the_cyber_guy> i am building a jsp page with interleaved html content and i found it a bit painful with lots of illegal state exceptions related to response output stream. can someone please provide or at least link me to some guidelines which can prevent those errors.
[22:19:24] <Planck_> You already have such a loop. You just don't do anything useful with the list elements in it
[22:20:05] *** Auv5 has joined ##java
[22:20:07] <ojacobson> the_cyber_guy: here's a simple one
[22:20:13] <ojacobson> Don't put *code* in your template files (JSPs)!
[22:20:53] <ojacobson> Use EL and JSTL (and other taglibs, including any you write yourself) to handle template flow, and put the heavy lifting (processing data, talking to message queues, writing or reading against databases, talking to external integrations) out in some controller layer before you delegate to JSP to render the results
[22:21:50] *** tigger0jk has joined ##java
[22:21:51] *** Will123456 has quit IRC
[22:22:35] *** mrhota has quit IRC
[22:22:46] *** pchapman has joined ##java
[22:26:10] *** shaunren has joined ##java
[22:27:20] *** tokam has joined ##java
[22:27:22] *** purestrain has quit IRC
[22:33:10] *** horte has joined ##java
[22:33:12] *** gwz_ has quit IRC
[22:35:39] *** BeholdMyGlory has joined ##java
[22:36:39] *** VJTachyon has quit IRC
[22:36:55] *** jbosmans has joined ##java
[22:37:01] *** wad has quit IRC
[22:37:11] *** Behold has quit IRC
[22:37:14] *** SSgtSpoon|work has quit IRC
[22:37:31] <jbosmans> Good evening, looking for the best way to capitalize a string in a JSPX. Is jakarta strings taglib still the best option?
[22:38:07] *** matsebc has quit IRC
[22:38:12] *** gcristian has quit IRC
[22:38:19] *** bindaas has left ##java
[22:39:42] *** matsebc has joined ##java
[22:40:04] *** wolfman2000 has quit IRC
[22:41:25] *** c_axis has joined ##java
[22:44:28] *** Luc1fel has joined ##java
[22:45:21] *** sebrock has quit IRC
[22:45:24] *** TecladoZurdo has quit IRC
[22:45:59] *** matsebc has quit IRC
[22:48:14] *** realtime has joined ##java
[22:48:30] *** Bombstone has joined ##java
[22:48:51] *** palyboy has quit IRC
[22:50:12] *** palyboy has joined ##java
[22:50:12] *** veidt has quit IRC
[22:52:00] *** lhnz has quit IRC
[22:52:13] *** Niamkik has quit IRC
[22:52:37] *** lhnz has joined ##java
[22:52:50] *** icebrain has left ##java
[22:53:14] *** Kyle__ has quit IRC
[22:55:08] *** hyppias has joined ##java
[22:55:54] *** pyrony has quit IRC
[22:56:02] *** matsebc has joined ##java
[22:57:34] *** kermit has quit IRC
[22:58:27] *** pchapman has quit IRC
[22:59:53] *** Frostix has quit IRC
[23:01:12] *** karega has joined ##java
[23:01:34] <karega> I am getting XSS filter warnings in jBoss
[23:01:49] <cheeser> you tried the jboss channels?
[23:02:10] <karega> I am now sir
[23:03:58] <cheeser> 8^)=
[23:04:06] *** dmiles_afk has quit IRC
[23:04:09] *** Kamaran has quit IRC
[23:07:56] <ojacobson> Hmm: http://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Maven+Repository+Server?utm_source=twitterfeed&utm_medium=twitter
[23:08:41] <cheeser> that's very cool
[23:08:52] <_W_> I don't currently use maven for anything, but that sounds _awesome_
[23:09:13] *** rjohnson19 has joined ##java
[23:09:31] <ojacobson> snapshot repo problem: solved
[23:09:34] <ojacobson> including cleanup
[23:09:40] <ojacobson> Going to try it out tonight
[23:09:45] <sbalmos> nice
[23:09:46] <deebo> our ci is still called hudson, but it has issues building a multimodule maven project
[23:09:55] <deebo> because it cant find the module it _just_ built
[23:10:00] <cheeser> hudson
[23:10:04] <cheeser> er, hudson doesn't.
[23:10:14] <cheeser> we do it here
[23:10:16] <ojacobson> hudson (absent plugins) doesn't handle module distribution for maven projects
[23:10:21] <ojacobson> hence the snapshot repository remark :)
[23:10:25] <ojacobson> (jenkins)
[23:10:51] <deebo> does it just just the 'mvn' executable? (or whatever java class it runs)
[23:10:55] <deebo> doesn't*
[23:10:58] <ojacobson> Yes, exactly
[23:11:05] *** pipeep has joined ##java
[23:11:12] <ojacobson> Oh, I see what you're saying.
[23:11:14] *** jdolan has quit IRC
[23:11:18] <ojacobson> Shrug, #jenkins
[23:11:28] <deebo> well wont that have a local repo for builds, or does it use some params that dont publish modules even locally
[23:11:33] <deebo> have to try jenkins
[23:11:42] <ojacobson> reactor builds should handle internal dependencies
[23:11:51] <ojacobson> dependencies between separately-run builds need a repo (possibly local)
[23:12:11] <deebo> yup thats why its weird, we have like proj-core, and proj-somethingelse that depends on core, in the same parent pom build it wont find -core it just built
[23:12:28] *** srm_ has joined ##java
[23:14:01] *** jor has quit IRC
[23:14:23] *** srm has quit IRC
[23:14:23] *** srm_ is now known as srm
[23:14:38] <ojacobson> ... seriously? EE7 has "cloud" features? What marketroid thought that up
[23:14:53] *** belugs has joined ##java
[23:15:09] *** rgr has joined ##java
[23:15:23] <freeone3000> ojacobson: But it leverages middleware platforms for service discovery and device interchangability! ...Wait, didn't it always do that?
[23:15:23] <sbalmos> O_O
[23:15:36] <ojacobson> http://jcp.org//en/jsr/detail?id=342
[23:15:57] <cheeser> saw that.
[23:15:58] <ojacobson> ("Platform as a Service")
[23:16:03] <ojacobson> My eyes can't roll any further back
[23:16:03] <cheeser> yep
[23:16:09] <cheeser> why?
[23:16:12] <sbalmos> w...t...f...
[23:16:19] <ojacobson> I get what it's saying
[23:16:24] <ojacobson> I just don't get how it's saying it
[23:16:43] <deebo> arent webapps already loaded in an isolated way
[23:16:51] <cheeser> standardizing some of the "cloud" stuff. making EE more cloud friendly.
[23:17:00] <cheeser> problems like multitenancy
[23:17:07] <freeone3000> Looking at the JSR, it seems to be a JSR that... requires all the other JSRs that are already there.
[23:17:31] <cheeser> freeone3000: it's called an umbrella JSR. EE6 had one. so did EE5.
[23:18:17] <freeone3000> And adding websockets as optional.
[23:18:19] *** horte has quit IRC
[23:19:21] <freeone3000> Yeah, so it's basically requiring all the bits that are already there to work together better, and maybe adding some minor new stuff that helps out with the marketspeak. *shrug* Doesn't seem like a big deal.
[23:19:54] *** zatan has quit IRC
[23:19:59] *** sbalmos has quit IRC
[23:20:03] *** Flueworks has joined ##java
[23:20:04] <freeone3000> Except that it makes a mention of JSE 8 API in the spec doc, despite JSE 7 not being out yet.
[23:20:42] *** ojacobson has quit IRC
[23:21:27] <cheeser> freeone3000: i'm hoping to be heavily involved in that one.
[23:22:53] <freeone3000> Cool. I'm not an EE developer, so most of it's lost on me.
[23:23:02] *** shaunren has quit IRC
[23:23:14] <whaley> it's for 'THE CLOUD'. what are you getting lost on
[23:24:20] *** Wicked has quit IRC
[23:24:39] <whaley> the new business model, btw, is 1) shit in a box 2) write a product descrioption on the outside of the box where you use the word "cloud" once every 10 words 3) ???? 4) profit!
[23:24:41] *** horte has joined ##java
[23:24:49] *** horte has quit IRC
[23:25:09] <freeone3000> PaaS is defined by interoperable components created and used when needed that can do stuff, plus a buncha settings and discovery stuff to get them from A to B. EE already had that. It's more like labelling a box of power supplies "cold-swap high-performance voltage converters".
[23:25:42] *** choongii has joined ##java
[23:29:31] <whaley> freeone3000: I believe the context being sought after here is that EE servers can become the lowest level in the stack that anyone app developer/deployer needs to worry about it while also supporting multi-tenancy (partitioning off a single app server such that it can be used by multiple users/accounts/groups/etc without one group knowing anything about the components/apps/etc of the other groups) and instant scaling of any applica
[23:29:43] <whaley> in others... GAE but for EE servers
[23:29:49] <whaley> *in other words
[23:30:15] <freeone3000> So basically what it already is plus a few improvements, plus a lot of market speak.
[23:30:45] *** frangiz has quit IRC
[23:30:51] <whaley> I don't know that current EE servers support what I'm talking about with a shit ton of configuration that isn't standard
[23:31:01] <whaley> emphasis on the "standard" part of that statement
[23:31:38] <cheeser> freeone3000: no.
[23:31:44] <freeone3000> Okay.
[23:31:56] *** cyphorious has quit IRC
[23:32:43] *** saml has quit IRC
[23:32:59] <whaley> cheeser: you know more about this proposal than I'll bother to learn - how far off base am I?
[23:33:01] *** hyppias has quit IRC
[23:34:42] <cheeser> i think the GAE comparison is fair to a point.
[23:35:00] <whaley> it's the quickest analogue I can give someone to PaaS, really
[23:35:00] <cheeser> it goes further than that but that's at least part of the idea
[23:35:33] * cheeser nods.
[23:36:06] *** FRSoldier has joined ##java
[23:36:08] <gtrak> does the jdk's built in OCSP support apply to tomcat checking client certificates?
[23:36:19] *** freeone3000 has left ##java
[23:36:23] *** freeone3000 has joined ##java
[23:36:59] <cheeser> unless tomcat provides its own then clearly it'd have to use the JRE's
[23:37:11] <whaley> the problem is, as always, overuse of the horrificly overloaded "cloud" term
[23:37:18] <cheeser> sure
[23:37:37] <cheeser> apart from that, EE7 could be very, very cool.
[23:37:57] *** benoitdo has joined ##java
[23:38:06] <whaley> I think I'm going to drop everything I'm doing and go on a crusade to try and eridicate that word from everything except architectual diagrams (which is where it originated and belongs)
[23:38:23] <gtrak> the question isn't would it pick the JRE's impl, the question is would tomcat check revocation on client certs if I enable it in the java security properties?
[23:39:06] <gtrak> talking about http://goo.gl/6ennq
[23:40:03] *** zemanel has joined ##java
[23:40:06] *** Nikelandjelo has quit IRC
[23:42:10] *** madrax has quit IRC
[23:46:45] *** freeone3000 has quit IRC
[23:50:01] *** KeithChester has joined ##java
[23:50:26] <KeithChester> does anyone know any open licensed encryption libraries I could use that are good for web/mobile development?
[23:50:58] <gtrak> bouncycastle
[23:51:27] <KeithChester> when i googled that just now i really did not know what to expect
[23:51:30] <KeithChester> but thanks, reading up on it now
[23:51:44] <gtrak> haha, yea sounds like a good time
[23:51:49] <gtrak> but it isn't :-)
[23:51:55] <KeithChester> it isnt easy to use?
[23:52:14] *** homie has quit IRC
[23:52:16] <gtrak> I think it's pretty much the best option
[23:52:26] <gtrak> but all that stuff is really annoying
[23:52:33] *** FrozenKnight has quit IRC
[23:52:45] <KeithChester> yeah but i need to hash passwords for login authentication
[23:52:48] <cheeser> what's wrong with the stuff in the JRE?
[23:53:11] <KeithChester> cheeser - im not aware theres stuff in the JRE that i can use as is. im more looking for what libraries/jars/functions/objects i should be looking at
[23:53:23] <KeithChester> so if there already is a library to do this, please share.
[23:53:53] <ernimril> ~~KeithChester javadoc MessageDigest
[23:53:56] <javabot> KeithChester: http://is.gd/KycCrr [JDK: java.security.MessageDigest]
[23:54:16] <ernimril> ~~KeithChester javadoc Cipher
[23:54:16] <javabot> KeithChester: http://is.gd/zRMI2v [JDK: javax.crypto.Cipher]
[23:54:26] <KeithChester> thank you very much - ill read up on these now.
[23:54:32] <cheeser> yeah, those two packages should get you most of it.
[23:54:41] <KeithChester> very cool.
[23:54:44] <KeithChester> any known downsides?
[23:55:07] <ernimril> KeithChester: for a simple example of hashing: http://www.khelekore.org/~robo/MD5.java
[23:55:24] <KeithChester> thanks everyone. this is the first time im doing hsahing/encryption of any kind so its kind of lots to learn for me
[23:55:28] *** homie has joined ##java
[23:55:34] *** Maynel has joined ##java
[23:56:15] *** konr has joined ##java
[23:56:44] <konr> How can I find out what package contains the class org.apache.xerces.parsers.AbstractSAXParser?
[23:57:36] <cheeser> what jar you mean?
[23:57:46] <konr> yes
[23:57:53] <cheeser> ~google org.apache.xerces.parsers.AbstractSAXParser jar
[23:57:53] <javabot> http://letmegooglethatforyou.com/?q=org.apache.xerces.parsers.AbstractSAXParser+jar
[23:57:58] *** homie has quit IRC
[23:58:09] *** KeithChester has quit IRC
top

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