if an object of class A needs to have a reference to an object of class B and that is required and should not

Cheeser, true.

ignorance is a bit difference from just being wrong

not public?

for the base class

should it be protected all the way up
oh

deep complex data structure are not really going to be cloned if you do it manually, unless you really know hwat you're doing in your copy constructor.
sleepster, you have to understand about shallow and deep object copy.
but no… it is not a bad thing, just a thing you have to implement carefully (if not implemented).

dude come on

meeper, yes?

I have a factory class that generates these classes.. would it be better to add a method in my factory that takes in the object and creates a duplicate copy?

there is no reason to ever use clone()

or would it be more intuitive for the copy constructor approach

meeper, YOU tell me why not..

if you want to indicate an object is copyable create a ctor that takes the same class.
why would I do that?

you're too dumb to understand.

meeper, then don't tell me that clone is useless.

not a base class, or a child class, the exact same class

if you have no valid reason to prove so

amnesiac++

amnesiac has a karma level of 2, cheeser

from that you can figure out the rest
yeah, that works for me
of course I'm not telling you anything, I'm telling sleepster

good.

good!
hehe

good!!

Meh.

Hola, Dalila.

public myClass( myClass A) { super(myClass); // assign fields here }

*sam*son

stop asking stupid questions

okie
I like asking stupid questions
people pay attention to me that way
WOAH!

Sanson lol hello

meeper is gone!
forever?

just muted

ugh.. thank god…

oh, why muted?

Sanson i love long haired men though

maybe if he stays here without talking he'll finally learning something.

Damn.

are we muting him for being mean to me?

What if the hair is on my chest and I'm in good shape? Does that count/
?

Sanson i wouldn't cut your hair if you had

sleepster, no, you have to learn as well..

haha

sleepster, read why Josh Bloch says clone is BAD if it is implemented in the wrong way…

pr3d4t0r WOW.. that's so hot ( hair on the chest )

Ah, mis esperanzas se esfumaron.

well I read his book and I recall that he says people don't always obey the contract so it stinks

nah. we're muting him for being an all-around dick.

oh.. but also for being mean to me

sleepster, that's the thing, now… he tells you that there are properly clone methods implemented in several Java classes and frameworks
sleepster, for example, he mentions (for obvious reasons) the java servlet hosting Collections Framework

http://eugeneciurana.com/galereya/view_album.php?set_albumName=baby_pr3d4t0r - that's what a pr3d4t0r looks like when he's got hair on his head but not elsewhere.

oh I see..

Anyway.

~javadoc JFrame

I don't know of any documentation for JFrame

Nos vemos, Dalila.

tee hee hee

pr3d4t0r i don't speak spanish …

sleepster, now, his words are not the final veto on Java development, but he's wise when he tells you about CAREFULLY do whatever you're doing..

Aw?
Where are you from, with that spelling?

he works for Google now I believe

pr3d4t0r i'm an arab girl my name's Dalila

Ah.
~tell Dalila about welcome.

Dalila, http://eugeneciurana.com/galereya/view_photo.php?set_albumName=Humor&id=welcome

pr3d4t0r, nomas andas viendo dónde picas :P

pr3d4t0r Dalila is an arab word ( adj )

Te da envidia, güey.

hahahah, right.

What does it mean?
OKi, SP2 is installing.

pr3d4t0r a "dalila" woman is the woman that knows how to seduce her man or BF in a classy way, it means also that she is a very loved and sexy woman. ( hell, what's this channel about ? java or what ? lol

:O

Dalila++

dalila has a karma level of 1, pr3d4t0r

Dalila++

dalila has a karma level of 2, pr3d4t0r

Dalila++

dalila has a karma level of 3, pr3d4t0r

pr3d4t0r loool

ora ora barbero…

That was one karma point for classy, one for love, and one for sexy.

pr3d4t0r thank you so much :P

Dalila, that it easy, those guys see girl one time by yeard
*take

pr3d4t0r, tendrías que ir hasta su país árabe a chingartela…
pr3d4t0r, plus… quien sabe como esté :P

Ah, te dicen el fino…

hahahah

joaop well i don't know if i'm supposed to laugh or cry when i hear a such thing :P lol

I actually have a tendency to have several girls around, usually models or artists of some sort; I'm not as starved for female companionship as these kids.

pr3d4t0r i like spanish and italian but i still can't learn some of them, would you teach me ?

So my interest is purely linguistic about the Dalila word.

pr3d4t0r well take it easy man, we' ve been kidding

Sure!
:*
I'm going to take a nap now and leave you with the usual suspects.

pr3d4t0r, es tornillo… hahahaha

amnesiac sort of speaks Spanish too.
He attended a bad school but otherwise is a nice guy.
.. o O o .
Don't tempt me. censored will get jealous

pr3d4t0r censored ? who is that ?

http://eugeneciurana.com/galereya/view_album.php?set_albumName=owned
She's a ##java regular that hasn't been here for a while; she now hangs in our private channel.
We hung out the last time I was in London
Anyway.

pr3d4t0r you're brit ?

No, Mexican.
I get around, though

woow cool
enchantée

Enchantée ;_

i'm a tunisian muslim girl. :P

Nice! I've seen some photos from your country (my French friends go there a lot). Beautiful place.
What brings you to ##java?

pr3d4t0r tell me we'll not be fired if we carry on talking out of the topic ?
or kicked

pr3d4t0r is one of the ops, so you're fine

You're fine.

Logi heh, thanks

the rest of us might get jelous, though, and kick you ;-)

You're more likely to get /kicked for staying on topic
/kick Logi.

Logi unfair :'(

jelous, excuse the spelling

Plus it's always nice to learn about cool exotic places.
Anyway.

pr3d4t0r tunisia is a cool place yeah.. i would never leave it if i could.

I have a party later.
Nice.

pr3d4t0r nice

It was nice meeting you — see you on-line at some point.
Z z .

sup pr3d4t0r

pr3d4t0r nice to meet you too, thanks
pr3d4t0r you there ?

Sorry, I was going to take a nap. What's up?

i used to be _S0cKeT-

Ah.
I don't reall your /nick

reall ?

Really.
Dalila:
Anyway. Nap time.
See you later.
Z z .

pr3d4t0r i know, i chose my first nick when i was looking for a java channel.. socket is related to java. anyway
see you later

Dalila is cooler
:* See ya.

pr3d4t0r :*

it's sunday

hmm? You've never been to a busy channel then

go to a sex channel
of course, most of the traffic in chans like that are 40-yo truckers looking for love in all the wrong places, but hey

well informed hein jottinger ? hehe

I knew you got around, but didn't know you were a trucker

so i hear you know lot about trucks..

sure, why not
actually, studies done on truckers show that they're a hell of a vector for disease

know as the "looser age"

it's made worse by the concept that driving a truck is "manly"
so they tend to hide illicit liaisons
makes research really difficult

heh wtf are you talking about?

truckers as disease vectors

stupid barbs!

trucker gets disease X from a stop on his route

jottinger, you seem to have a lot of experience with truckers

well considering the car runs on twelve wheels, its arguable that there is space to hide stuff in it..

~javadoc DataSource

I don't know of any documentation for DataSource

if you haven't been able to read, I'm talking about research, not infatuation

~javadoc java.lang.Throwable

cheeser, please see java.lang.Throwable: http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html
cheeser, please see java.lang.Throwable: a href="http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html"http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html/a

jottinger, hehe…whatever

disease kinda sucks, esp with diseases like AIDS lurking about
and truckers are some of the last bastions of the one-off pick-me-up
along with college students, go figure
and pr3d4t0r

you probably don't know a thing about truckers except that their gross income is higher than yours

*shrug* Okay. I've been talking about research, not lifestyle; why so touchy?
I mean, I'm not saying I know all about truckers; I've been talking about *one* *thing* affecting them

*yawn*

I don't see any comments about truckers until I say something in the channel

Being at work on a Sunday sucks balls.

I didn't know you were even in the channel.
in fact, I didn't even say anything about it until five minutes after you'd greeted pr3d4t0r
get over yourself; you're not that important.

lol ya, maybe you didnt know that I'm a trucker

who d'you think you are? meeper?
*shrug* makes no difference to me either way.

could I remove that "be r0bby" factoid? :-x

my main concern is that if you're a trucker, that you stay away from me, ya diseased hommasexshul! 'Cuz hommasexshul diseases fly through the air, you know
and if you can't detect sarcasm in that statement…. there was a lot of sarcasm in that statement

lies. I saw no opening or end tags for it.

life isn't SGML.
life isn't even ABOUT SGML.

I'm not a homo, but your worried about catching a diesease from a homo?
I'm not a homo, but your worried about catching a diesease from a homo?

THIS is why I said there was a lot of sarcasm there

nono, he was just talking about disease infested truckers.

what about all the disease infested computer programmers, can we talk about them too?

yes
except diseases tend not to travel over TCP/IP
only UDP
seriously, caverdude, chill out some
nobody A) knew you were a trucker; B) cares; C) assumed you were a homosexual; D) cared if you were, in fact, a homosexual

unless there was another trucker in the challen, lurking for love in all the wrong places
in the *channel even

who you screw and how isn't any of my concern

haha

~be r0bby

FileNotFoundException is a subclass of IOException; Exception won't directly catch that.

w00t

i'm not gonna do it, i view that as some sort of punishment, deserved it

well it looks like I'm going to continue as a trucker for a while, I'm hoping to start college again in september or next january. But I hope to cut my hours to 40 by january which should give me more time for java servlet hosting
again
heck even if I finished a degree I'd probably still drive a truck

i understand. Its so manly.

not only that it pays well

its the pure leather of the drivers seat on the naked body ?

you own your own rig?

you know people from India, China can't drive trucks right now. And at least for now Mexican's can't that may change later but I hope not
nope, I'm actually a "trailer jockey" right now at a local warehouse

*nod*

trying to get in a position to finish my associate degree at least, then maybe MIS degree.

well, I gotta jet.
Later all.

Are there any plans to implement a QT look and feel in Swing?

do you have any ?

Poor IDEA.

it refuses to open the ant build file
okay stopped acting up..

Was Solaris programmed purely in Java?

no…
I'm sure there are no java bits in the OS itself. There may be some admin aps in java, but I don't know.

Have any of you guys seen constructors that have more than 10 parameters?

Yes, but it was in an application that followed the detestable Immutable Object pattern.
I mean, value objects were immutable, so you could only access their fields from their constructors
"FileNotFoundException is a subclass of IOException; Exception won't directly catch that." This is false, isnt it?

Okay, NandoFlorestan.

~forget said: "FileNotFoundException

"filenotfoundexception, MickMcMack.

what the hell just happened?

you failed

I failed?

BotIOException

arent you guys enigmatic?

it is false
i said that

usually seldom

and well, it's gonna be there forever

if you want to hit on us, hit on the trucker..

I cant, my Beetle would be crushed

which one? john's quite stout

g[r]eek, how well do you know his beetle? Forget it, I dont really want to know

whose beetle?

g[r]eek, you said john's Beetle was stout.

no, i said john's quite stout

You people speak a mysterious language.

idle banter that went unnoticued i'm afraid.
*unnoticed

flippo, I wanted to speak Java here, but some ppl think this is #truckers or something

(Actually, John was a bit anorexic in later years. He didn't like being identified as the fat one.)

~flippo++

flippo has a karma level of 70, g[r]eek

my double whammy by virtue of sarcasm

g[r]eek, was I the only one to decode it?

i believe so

now look who is speaking a mysterious language

but you said "enigmatic", isnt that generally considered a pickup word ?

around blondes

hey does anyone in here play nethack?

gosh been asked to tender for the design and development of a large(ish) enterprise system. wtf happened to iterated development.

well "florestan" sounds like some kind of substance used for whitewashing hair..

reminds me of flotsam

wow, humorous as that is, it occurs to me you must have no life
I mean, come on, joking on #java on Sunday evening

i eat nandos for breakfast

heheheheh

its 2am here. Hardly a evening.

don't insult him.

1am. Woflborg: eastern europre?

g[r]eek: Finland is EET, yes

1am @ gmt+2 (south africa)

g[r]eek: oh, and it's EEST while it's still summer here, so +3

heh, here i was thinking finland is to the west of, well, the longitudinal line going through southa frica

lies, i have life. And life 2.

you have second life?

g[r]eek++

g[r]eek has a karma level of 9, r0bby

g[r]eek: nay, i mean "life 2", i got it after i reached level 50..

epic levels?

theres no epic levels in final fantasy six

wow. i'm only on level 23. *scratches head* what's the future of software oh wise sage?
ffvii is my favourite of all time

ah.. youngsters..

"angel-headed hipsters"

mmm, final fantasy
I'll get around to XII one of these days

g[r]eek: Finland seems to coincide with South Africa pretty well

Those are sissy games, men play Duke Nukem 3d

cool. i'll be sure to spend some time there when next in europe. i love not suffering from jet-lag

g[r]eek: jetlag shouldn't be too bad inside Europe - the clocks only range from +0 to +3
and for +3 you have to go quite far east

you guys are just coming out of summer correct?

hi again
Does any one use hibernate or just JDBC classes?

g[r]eek: up here in the north it's still summery-looking, but the evenings are already growing colder
in Central Europe thisis the summer holiday season

Because i am coming from .net world and using Datasets sucks.
Also here in Egypt

yes, some people use Hibernate

~tell _Kariem about anyone

_Kariem, Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.

No i am just making a survay that will help me weather to use Hibernate or anything else like raw JDBC or OODBMS
wether*

lol, in which case
~tell _Kariem about tias

_Kariem, Try it and see. You learn much more by experimentation than by asking without having even tried.

heh, i long for the day when javabot parses comments and replies autonomously

I used NHibernate much for apps

every question should boil down to rtfm :P

He does parse all comments… he just ignores most. :P

supposedly NHibernate is just a .NET version of Hibernate

But in Java EJB strongly present
no Ejb in .net

no EJB in Hibernate either, unless you want them, and then it's not really Hibenate anymore - just another EJB implementation

well, heh, with ejb 2 there were enitity beans :P
(hell on earth beans)

My question is does orm is a standard in java world

"is orm a standard" - sure it's popular. use the tool that suits the job at hand

there is no such thing as "java world"

understand your options. understand your domain. decide

_Kariem, I have a feeling most large projects use Hibernate.

I say java hosting world because .Net has very limited options

and most small projects should be open source and use db4o

Java world is wide - I'm fairly sure that people who do software for mobile phones don't use Hibernate, for example

Db4O is GPL

dude, i'm still not sure what your question is. try ask it in a single to-the-point sentence

i don't think my client would be happy if i released the source code

only if you don't wish to pay

Is hibernate used in any Desktop applications?

I wont be dragged into a license discussion here.

But there is many OODBMS alternatives in java

all have their ups and downs. what are you trying to do?

Big comnpany accounting and warehouse managment system with desktop interface

hi guys i need some help, i am trying to make a program for a palm, now it needs to have an option so i can send some data from that programa to a desktop or laptop, connecting the palm. Is it possible?

why desktop interface? why not do it via browser?

Suppose the application is deployed on a single machine,Is that would be good?
Because i have really asked myself this question many times.

anyone please?

what kind of Java do you have on Palm?

you said "big company" - that generally implies multitple users. it might be better (in this particular situation) to website design a server side jee app and serve its interface via any networked computer with a web browsr

the default that comes with it. i have netbeans on my desktop for making the program

Well, in that case _Kariem , forget Java, learn Python and use TurboGears

Or thin client interface

thin client is exactly what i described above

Why the hell i use those?

just what are you doing ni ##java again?

On Palm, I think the only good VM available is the IBM one, right?
The one that's like $5.00 a copy or something?

hell no!

how do you plan to establish communication between the desktop/laptop and the palm?

It is actually good idea to use Web browser.

thats the problem, thats my big problem, it could be easy if it was networked or something using the inet, but i dont know how

in this situation sure it is.

Web browser + AJAX = Done

~javadoc JFrame

I don't know of any documentation for JFrame

what options do you have, anyway?

~javadoc JFrame

cheeser, please see javax.swing.JFrame: http://java.sun.com/javase/6/docs/api/javax/swing/JFrame.html

w00t!

~javadoc HttpSession

I don't know of any documentation for HttpSession

still no jee
:~(

i'm working on that.

usb

found a bug in the javadoc parsing

what could i do from the browser?

sadly, the bot is kinda spammy…
~javadoc Element

cheeser, please see javax.lang.model.element.Element: http://java.sun.com/javase/6/docs/api/javax/lang/model/element/Element.html
cheeser, please see javax.swing.text.Element: http://java.sun.com/javase/6/docs/api/javax/swing/text/Element.html
cheeser, please see javax.swing.text.html.parser.Element: http://java.sun.com/javase/6/docs/api/javax/swing/text/html/parser/Element.html
cheeser, please see javax.xml.bind.Element: http://java.sun.com/javase/6/docs/api/javax/xml/bind/Element.html
cheeser, please see org.w3c.dom.Element: http://java.sun.com/javase/6/docs/api/org/w3c/dom/Element.html

heh

damnit

not sure how best to limit that.

~tell javabot about pastebin

javabot, http://eugeneciurana.com/pastebin

other than always push javadoc responses to PM

2 or something.

i don't think the rare occassion where spammy responses occur warrants such a move. imho

unless you get dickheads who just want to spam the channel
but i suppose that's what +b is for
8^)=

that's what we have you ops for

any ideas?

ok. time to give the baby a bath.
just wanted to update that javadoc

awww. how old?

besides combing through possible device-specific APIs, not really

babies rock

um… 10 months.

I suppose you know where to find those better than I do

sleepless nights? or the quiet type?

mostly quiet. wakes up once or twice to nurse but pretty quiet overall.
bbl

chiaz

be sure not to throw away the baby with the bath water, though

usb? that's not really an "option" for what you describe

heheheheheh

?

i know didly squat about palms, but surely they have wireless or bluetooth or something along those lines?

:'(

thanks
g[r]eek: ok i will try to find out
g[r]eek: no wireless or bluetooth

refresh my memory - what is the problem that you're trying to solve?

does any palm support java?

didn't answer my question. what are you trying to do?

g[r]eek: i want to make a program i can run from a palm, it should write some files and i should be able to get those files later in some desktop
ok, i have this palm TREO 650
it has bluetooth and infrared port

it has bluetooth there you go
i gotta run
bbl

ok so where do I go if I have a question about applets? Why arnt they allowed in here?
anyone?

can i do applications for windows in java? like delphi?

jmoncayo, go to wikipedia and read about java virtual machine
the answer is yes, but it runs on a java virtual machine
i.e. an interpreter

lets say i have the program.class how could i run that

jmoncayo, type "java" in your console and see the usage
java program.class

No, no class.

ok time to download Netbeans hosting or eclipse

Well, you can ask, you'll just get answers varied and mostly telling you to use webstart because applets are an overly restrictive containment environment with browser-dependant support for some features.
Which *really* makes for happy fun time when you're trying to support them on The Internet.

i
Whoops.

he's right java ClassName
you're executing _CLASSES_ not files

I think sun's forums have an applet section
if it's AWT/Swing related (and not a security issue), you can still ask it here

Dumb quesion…but does anybody know or had any success working with ant for using it to build non-java applications?

how's things?

svm_invictvs, I've seen it used to compile JNI code for java projects. Or to call scripts to do all sorts of random things.

~pastebin

http://pastebin.stonekeep.com

http://pastebin.stonekeep.com/638 - Hm? I guess. I dont know

How do use mod on java
like C's 5 % 4

same

oh okey, thanks

How do I implement ActionListener in a public void

ActionListener is an interface. You implement it like all other interfaces.

that question does not make sense

wow my code doesnt make any sense any more.

hey all

Fanook, okay I wrote this code myself and this makes 0 sense
Fanook, http://pastebin.stonekeep.com/639

perhaps you should spend some time on designing your program

Fanook, …

does anyone know of a RXTX download mirror?

Fanook, I did.

the download link on the RXTX site seems broken atm

ok, so what are you confuzzled on?

hehe
http://pastebin.stonekeep.com/640

correct. you did not implement the required method or declare the class abstract

Fanook, why would I need to do that…
Fanook, whats abstract about it?

because you are implementing an interface. when you do so, you must either implement every method declared in the interface or make the class abstract
~interfaces

Fanook, interfaces is http://java.sun.com/docs/books/tutorial/java/concepts/interface.html

Good to know. And is that an easy fix?

go read the interfaces tutorial

anyone using RXTX?

sayers, sure, if you know how to implement the method.
sayers, if not, you'll have to figure out what to do with an abstract class

flippo, should I drop my book and read the site?

sayers, you should learn what interfaces are for, and how to use them. Try both.

Guys, what good book do you suggest I buy
Maybe John Smiley's Learn to program in Java

Killer Game Programming Java Ramihg

~tell ramihg about beginner's bibles

ramihg, I guess the factoid 'beginners' bibles' might be appropriate:
1) Sun Java Tutorial (http://java.sun.com/docs/books/tutorial) 2) Bruce Eckel's "Thinking in Java" (http://www.mindview.net/Books/TIJ) (Get the 3rd edition, the 4th is only freely available up to
chapter 7.)

I am a C programmer, not a beginner so i dont need a total beginner's book
I read the sun java tutorial
I need a book since I am lacking in many stuff

Ramihg, then I'd read the language specification.

check out TIJ. feel free to gloss over the basic programming concept stuff

TIJ isn't just a beginner's book.

Thanks for the help
I will ready everything in the 'beginners bibles'

If you've only done C, then you may want the beginner's material on objects

I've done lots of languages. never got into java. its a shame really
I still need to pick up a beginner's book though. To explain the basic java stuff (ie about byte-code compiling etc)
thanks for the help

~tell Ramihg about firstcup

Ramihg, firstcup is a beginner's tutorial for getting started with Java available at http://java.sun.com/tutorial/getStarted/cupojava

that's the best host tutorial to "get started" with java

Yea hehe I read that one
I'm currently reading the rest of the tutorials on the java website
They're pretty nice

yeah, java's tutorials are among the best out there

There's one thing i googled a lot but never really understood

With public void actionPerformed(ActionEvent evt){ how can I determine what was pressed?

whats the difference between the enterprise edition and the standard edition
is it more libraries?
more _security_.. ?

Ramihg it seems that nobody knows

Ramihg, that's pretty easy to google

From what I understand from google is that EE has can make web applications

sayers, evt.getSource()

EE can**

Enterprise edition has additional libraries in order to make your acronym soup of a web application work.
You can also use SE for this. But then you don't properly leverage your assets with persistance frameworks. Cuz it's not enterprise.

You can repurpose your standard technologies for greater shareholder value

I'm afraid I won't get the difference till after a few months, till I _know_ what SE can do first ,hehe

Everything.

Ok.. I think I'll forget about EE for a while

kamoricks wins at buzzword bingo!

phus, trying to intergrate that but cant

EventObject.getSource() returns the object that the action occurred on. Alternatively, you can set unique ActionCommands for each of the objects your class is listening to and differentiate your actions based on that

Fanook, I think I had a brain-dea
Fanook, if(evt.getSource() == stats){ does not work

~doesn't work

Fanook, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions)

~javadoc CharSequence

cheeser, please see java.lang.CharSequence: http://java.sun.com/javase/6/docs/api/java/lang/CharSequence.html

~pastebin

http://eugeneciurana.com/pastebin

still pondering the javadoc bugs?

Fanook, http://eugeneciurana.com/pastebin/pastebin.php?show=3668
Fanook, line 56

hey guys if i want to start learning java, what should i download?

stats is local to your constructor. how do you expect the actionPerformed method to find it?

java dev kit

~tell jmoncayo about download

jmoncayo, download is http://java.sun.com/javase/downloads/index.jsp

get the jdk

Fanook, because its a button
and I added a listener to it

why should that matter? it's only visible INSIDE YOUR CONSTRUCTOR
~tell sayers about scope

sayers, "A variable's scope is the region of a program within which the variable can be referred to by its simple name" - http://bioportal.weizmann.ac.il/course/prog2/tutorial/java/nutsandbolts/scope.html Also see http://mindprod.com/jgloss/scope.html

well there arent any tutorials on event listener

~swing

Fanook, swing is a windowing toolkit for Java. Tutorials: http://java.sun.com/docs/books/tutorial/uiswing/ and http://www.swingwiki.org/ also check out ##swing

~tell sayers about events and components

sayers, events and components is http://java.sun.com/docs/books/tutorial/uiswing/events/eventsandcomponents.html

we beg do differ
s/do/to

its all lies, there really are no tutorials for anything, its all kept low under and hush hush..

I'm guessing javabot is written in java and/or is opensource :P

*down low even

yep

which bugs?

~tell Ramihg about about

http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot

Ramihg, and hes a mean bot

i already fixed a big on tonight.
er, big one

which one?

Fanook, another link you send me that isn't relevant. That link says nothing on action event listeners.\

ALL event listeners are done the exact same way
they just listen to different things

Fanook, which is?

thats right, listen to the small voice telling its all for naught, its telling the truth!

the javadoc only doc'd the java.* packages

ah. that's a nasty little oops
~tell sayers about events and components

sayers, events and components is http://java.sun.com/docs/books/tutorial/uiswing/events/eventsandcomponents.html

go read. i already linked this to you before. i will NOT do so again

dont click the link, he just wants to eat your brains.

Fanook, your wasting your time sending me useless links. That page has nothing relevant. Where does it say action event listener

gee, maybe the link saying "How to Write an Action Listener"

Jesus every time I decide to code my new live in girlfriend wants to blow me

and with that, you're going back on the ignore list. i can only tolerate so much insert grumbling here

thats on the side
Fanook, +2 ego points?

its all lies, theres no "event" in there, they just want to keep you down!

~Woflborg–

woflborg has a karma level of 1, Fanook

~Fanook++

fanook has a karma level of 35, Woflborg

sayers, did you add an addActionListener to your button?

phus, Yes.

That link is 100% relevant, you actually have to read.

or what ever thing your trying to trigger on

yes. he's just trying to refer to a method-local var from another method

Does javabot take away karma points too?

r0bby, I was reading the main body not the side.

read the whole page.

bs, its also in the main body.
ofcourse you need to learn the basics first, like scope, before you can leverage the page.

~barbie learning

barbielearning is hard!/barbie

but its alll for nauuught… it wont come to anything… better give up now!

hmm, i think that factoid needs a *giggle*

http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html
to help you.

I swear to all that is good and pure in this world, the next time I get instakilled due to poison from a soldier ant, I am going to throw this monitor out the nearest window. :@

~fluffle MickMcMack

I guess the factoid 'mickmcmack, mickmcmack' might be appropriate:
Fanook, mickmcmack, mickmcmack is http://www.me-online.me.uk/me.jpg :O!

heh

I should change that.

remember that whatever you spoonfeed to it, will come out of the other end, so I hope you like to change them diapers too..

aww, MickMcMack's exceeded his bandwidth

Fanook, MickMcMack's anti spam filter webmail host excedes his bandwidth. ._.

-_-

I'm trying to get this actionlistener button to change the color of the editorpane but all I can get it to do is change the panel color.. what can I do?

show us code?

I'm trying to get this actionlistener button to change the color of the editorpane but all I can get it to do is change the panel color.. what can I do?

~tell ticnailer69 about repeat

ticnailer69, Please don't repeat yourself, it annoys people and rarely produces results. Try rephrasing or, failing that, come back in a good while when there are different people here. Meanwhile, google is your friend.

ok

What should you use and make your standard, the StringBuilder, or the String objects?

thanks

standard what?

I mean which should you use
Do developers usually use StringBuilder or String?

it depends on what you're doing. if you build the string over several statements, StringBuilder will be more efficient
if you do string cats in a single line, the compiler will use a StringBuilder behind the scenes for you

Ah

uhh
how could I post code without flooding?

use the pastebin

~paste

http://eugeneciurana.com/pastebin

thanks

Hi Guys. How are you guys coping with the windows vista 'virtualstore' folder in your app? My program is supposed to save files to its cprogram files\myapp\data folder. But now everything is really saving to the HIDDEN virtualstore folder per vista security
This is making it impossible for the normal user to find the files
How are you guys coping with this?

i'm refusing to move to vista

Not using it, but that's a useless answer

http://eugeneciurana.com/pastebin/pastebin.php?show=3670
could I just change anything in the colorAction class?

what are you calling setBackGround on? You need to call it on a specific object

to get the color to change in the editor pane

i don't see how that could ever work. ActionListener doesn't inherit a Component
and seeing as how you haven't defined a setBackground to set the background on a Component, i don't even see how that's compiling

its setting the background based upon a menu item

This is just driving me nuts! I just spent 2 hours thinking I was crazy. From within my program I could click open file and the filechooser would show files that if I browsed to with explorer wouldn't exist. I finally searched all hidden files and found that vista has a driver that redirects
all user level writes to the virtualstore folder

setting the backgound of WHAT? ActionListener doesn't have a setBackground method and you haven't defined one

ok

call setBackground() instead on the object to which you're changing the background of

I've used this code in a similar program I wrote. The program was designed only to change the color of the panel.Let me show you…

lemmie guess, the class inherited from JPanel?

yeah
I used that in the program that I was about to show

which DOES have a setBackground method and so has meaning. you need to tell the compile hosting which method to set the background on
s/method to/component to

this is all new to me
ok

There doesn't seem to be a lot of documentation on java and virtual store
or java and UAC

so then if I cant use JPanel b/c it will just color the panel than is there another thing I can do?

objectYouWantToChangeTheBackgroundOn.setBackground(someColorGoesHere);

cool
thanks bro
ur the coolest

keep in mind, you WILL need a reference to the object in your class

javabot tell ticnailer69 about aolbonics

ticnailer69, aolbonics is talking like a retard using speech as if you were on AIM or using single letters for you, are, you are, you're, see, etc. Talking like this is frowned upon in ##java and may result in you being silenced. You have a full keyboard so use it. We don't care if you talk like
an idiot with your friends but we don't want to sit through stuff like this: http://forums.oracle.com/forums/thread.jspa?threadID=499980&start=0&tstart=0

ok

I'm trying to extend a class Book with another called CheckBook. When I try to compile my new class, it claims it's not able to find the constructor in the original Book class, though the constructor is present. Why would this be?

it's not public or protected

it's public…

~tell Bogaurd about paste

http://eugeneciurana.com/pastebin

alrighty.
http://eugeneciurana.com/pastebin/pastebin.php?show=3671

and the error is…?

CheckBook.java:11: cannot find symbol
constructor Book()
class Book
public CheckBook (String auth, String titl, String isb, int per) {

also, you may not realize this, but you've duplicated all your class members.

hmm
you mean the String's author, title etc?
only need to be declared in the original class?

Right.

yes, but you either need to make them protected members or create setters/getters for them

hmm, why's that?

protected members are available to subclasses

becaure things marked private are only accessible to that class, not to any other classes

ah, I see
alright, i'll modify that now

javabot tell Bogaurd about access specifiers

Bogaurd, I guess the factoid 'access modifiers' might be appropriate:
Bogaurd, access modifiers is http://java.sun.com/tutorial/java/javaOO/accesscontrol.html

^^

thanks :-)

the compiler is complaining because you only get a free default (no-args) constructor if you don't define any other constructors. either add a no-args constructor to the Book class or use the proper super(…) constructor call
~tell Bogaurd about super

Bogaurd, super is http://mindprod.com/jgloss/super.html

why do this and super have to be the first line in a constructor?

eh? this?

because the JLS says so

javabot tell JohnCC about jls

http://java.sun.com/docs/books/jls/

only super needs to be first

but why did they make that decision?
is it totally arbitrary or is there some reason behind it?

the inherited state needs to be created first
then if you need to cahnge that state you can.

this calls need to be first too

otherwise the parent classes can trample our changes
oh, this(blah)

yeah

thanks for your advice - it seems to be compiling fine now. I'll pastebin my code to show you what I did

yes. the dependent constructors have to go first

so, for example, if you were going to access a inherited variable, it would have to call the other constructure to initialize it first?

right. though you shouldn't access inherited fields directly

pshaw. future-proofing is for indecisive people

is it?
P^)=

i'm not sure anymore

hello, how do i invoke a method from a javabean for a html form?

eh?

http://eugeneciurana.com/pastebin/pastebin.php?show=3672

in a JSP?

yes in jsp

it works Bogaurd?

eh. i don't use JSP.

seems to r0bby :-)
did I do it correctly?

ah shucks

wicket++

usually the form action is set to a .jsp page right? i wonder can it be triggered by a method

I should hang up a sign in my cubicle for the boss that says, "I'M IN UR OFFICEZ…POLISHIN' UR TURDZ"

*snort*

LMFAO
find a nice cat picture, caption it, then put it on his door

How do you declare a variable in an ant build "script"

property

thanks.

sure
ant.apache.org/manual

is there a way to arbitrarily add/remove objects from an array, as well as check if an array contains said object, or does this require an arraylist?

i should really take some time and learn ant

They should call it variable or something that makes sense.

no, if you remove an item from an array, you'll be replacing it with null. use an ArrayList

thanks Fanook. if a create an arraylist 10 elements long, and I add another element at the begining, will it remove the last one?

~tell Bogaurd about arrays

Bogaurd, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html

yeah

thanks cheeser

no, it'll grow the list. if you want a fixed-size list, you'll have to write your own
i think Queue might have a fixed-size version, not really sure offhand

alrighty
thanks

not that it's really all that hard to write your own

what does it mean if the java compiler says that a class uses unchecked or unsafe operations?

that's its way of telling you that you should be using generics
~tell Bogaurd about generics

Bogaurd, generics is http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html Generics tutorial: http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf FAQ: http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html

you should finish gosling because ant pisses me off ^_^
lol

i'm hoping to get back to that next week

I acutally look forward to seeing it in action, it looks neat
from what litte bit of the code Ir ead.

k. bed time.
later…

lates

good god.. why do linux distros insist on shipping broken implementations of java

Because it's FREE!
….Like the GPL isn't…

hmmm

afaik, I wouldn't mind, but they install it as /usr/bin/java
afaik, /usr/bin/guava wouldn't be a problem. It wouldn't be mistaken for java.

is objectoutputstream / objectinputstream fifo or lifo?

update-alternatives-java: command not found
cant find it orse, I installed sun java via apt-get, but
sorry bout that

update-alternatives java
Since there are a lot of alternatives you can update, and java's just one of htem.

I get "unknown argument, java"

Err, update-alternatives –config java
Cuz it needs the –config for some reason.

heh… I installed sun's java via apt-get, but seems I still have gij. And removing it via apt-get insists I remove any java applications installed via apt-get
oh thanks
sweetness

That's because there are two java packages - ""Free" java, and ""commercial"" java (nevermind they come under the same dang license). ANd most things depend on "free" java.

i am getting a clear lifo behavior with objectinput and output streams, but it is supposed to be fifo right?

oh, but is it truely free?
FREE as in FREEDOM!?

kamoricks, I think you're having flashbacks.

hi, i'm looking for an open source lib for doing visio-like operations, i.e. adding widgets to a white-board-like interface and dragging them around and associating them by lines, etc. … anyone know of anything like this?

I think the license debate is over, except for a few font rendering libraries

LOL @ "diseases tend not to travel over TCP/IP" … not yet anyway

yeah, the only non-gpl stuff in java6 was graphics-related, mainly font rendering

. o O ( and yes, I realize that covnersation was hours ago )

can you provide a test case?

Has java6 leaked down to deb testing yet?

and yes, streams are FIFO

Fanook, its a couple writes and the subsequent reads from an applet to a servlet and back
so i think that would not be very clear to send the source over..

I know I asked before…
but how do I get one ant task to depend on a task in another buildfile?

use a depends="…" attribute
ant.apache.org/manual

exponentially? On what scale?
Don't you hate seeing technical words misused just for the way they sound?
My personal peeve is "parameter," which seems to have been taken by pundits everywhere to mean "constraint."
"We need to make sure this new program falls within the financial parameters."

what, you don't hear the implied "acceptable"?

I hear someone who is thinking "constraint" and should have said "We need to make sure it doesn't cost too much."
Or "bounds" or "limits"

DeVries must die…

Chocolate makers, or PR agency?

game programming college

Ah. Taking poor children's money, pretending they'll get a job playing games.

and i use 'college' in the most loosest sense possible
that was a bit redundant, wasn't it…

I should start a college where people can study the effects of cocaine first hand.
Might need to put that offshore somewhere, maybe on a boat…

DUDE! Robot Chicken Mythbusters!

we'd love to show you the next great video game
there's just one problem…

there's no way in hell we'll produce it

my boss at work was like 'so i was talking to an old friend yesterday and apparently her son is majoring in 'simulation and game programming'"
and i was like 'haha he isn't going to devry is he?'
and he was like 'yeah actually, that was the name of it' and i had to apologize because i was laughing uncontrollably

It will prepare him perfectly for a life of disillusionment and poverty.
Good grief. Those guys are everywhere.

i feel bad for the students, i really do.

This is very sad, indeed.
They seem to have a great many lawsuits against them too.

so on the other hand it's hard to feel bad since two seconds of googling will reveal what a scam it is

I guess they don't require familiarity with the internet as a prerequisite.

good point.

hm, not that easy to tell from googling

a recruiter made fun of MY school and it's an actual accredited university with a well respected comp sci program. i can only imagine trying to get anywhere with a devry 'degree'
google 'devry scam' and it's painfully obvious that the validity of their program is in question at the least

ah, definitely that. the site seems to whore the initial google results with its subdomains, however

there are days i think programming should be a certified profession

Wow, not that i'd ever touch devry, but wow.

eh, who would do the certifying? The government? /me shudders

the problem isn't always so much the programmers but the process.
we sometimes get hardware in one day and it ships out the next

treat it like engineering

the code runs on it? great! that's life in a startup

hm… that's not so bad of a system.

half the problem is that "programmer" is a pay grade in some companies

when you're trying to get product out there so you can raise more funds, it makes sense. but it doesn't guarantee stable firmware :P

sweet leaping jesus, devry's wikipedia article even mentions it

haha

http://www.secinfo.com/dsvRm.v9xh.htm#8051
that
's failure right there

hm
In ant…
if I run another ant task inside this file…
do I inherit taht ant file's properties?
And if I do, how do I reference them?
${ProjectName.propertyname}?

"The company claims that these legal procedures are incidental due to the nature of this business." yes, the scam business does lend itself to that

Bell and Howell…that's surprising to see there

it's amusing.
why did he quit to say he was away?

does anyone know where the default classpath is defined in ubuntu?

you shouldn't rely on a global classpath

how would i change it for something like tomcat?

in the configuration.

i really don't want to change it, i'm mostly curious where and how it is set

java -cp .:path/to/file1.jar ClassName
javac same thing

maybe i'm misunderstanding java, itself… how does the vm and compiler know what classes are available to it?
the ones that come with the jdk

you tell it via the classpath

~tell jerbear about classpath

jerbear, The class path tells Java or the compiler in which jar files and folders to look for classes. Use the -cp/-classpath run-time options to specify the class path. Also see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html and http://mindprod.com/jgloss/classpath.html#ANACHRONISM

the standard libraries are automatically found. everything else needs to be on the classpath

so something installed separately like derby, would need to be added to the classpath?

the "." means look in the current working directory the colon is the delimiter for seperating jars

on unix

it's ';' on windows i believe

yep

he's using ubuntu, which is why i used the colon specifically
but jerbear, read that link

which? both?

both
http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html

derby/javadb is available via apt-get in ubuntu, but it's not available without adding it to classpath… just making sure i'm not doing something wrong
thanks guys

svm_invictvs, gently rub your temples and think of a pleasant country scene

~comfort svm_invictvs

how do you reference a property in a different ant file?

this is a silly and masturbatory question, but what's the best way to find out how many lines of java exist beneath a subdirectory on linux?

wc -ls $(find subdir -name '*.java')
that should do it
of course, that doesn't strip out comments or empty lines
does that help. __david
?

yes
sorry
I got distracted

cool

I had this, so far:
find . -name "*.java" -exec wc -l {} \;|cut -f 1 -d " "

that'll do it except you don't get a summary count

wait, no
-s is invalid
hm
or maybe it worked

if you have many, many, many files, then my method will fail due to exceeding maximum number of command line args

it worked! thank you

np

not that many files
but its 8.3k lines
and I wrote it all by myself

nice work

thanks
thank god for ide's, though

lol

without "find usage," i'd be useless
have you ever used groovy?

hm. find usage is javadoc, no?

i have not

gracenotes, it's an ide function
you right click a field/function/class/etc, and it tells you every other file that refers to it
and it knows about scope, and it searches nearby contexts for comments too
I've been investigating groovy

ah… the API usage charts are non-automatically generated

i use it for internal checking
like, I make a map, and i want to reverse the param order
so i find usage all the code that touches it
and i can hunt down all the references in every file that uses it
Here's a least-worst practices question
I've got a variable which is currently static
public final static
and I want it to be loaded from a config
what's the best way to do this?
it is used in 23 places, so a rewrite is out of the question. The users can recompile if they want to change it that bad
would a static{} block be horrible?
or would it be better to integrate into the framework?
(the program has a framework)
actually, it cannot go into the framework directly, due to a one-way dependency
so would an interface abstraction be acceptable?

this might work:
public static final ClassType obj = loadObject();
private static ClassType loadObject {
and then code, closing brace, etc.
not sure if that works for you. .
s/loadObject/loadObject()

the problem is this:
The gui code needs a number to render itself
it is currently hardcoded (the number, that is)
The only configurable stuff is stored in the model code, which doesn't touch the gui
the gui could store the code in the model, but the dependencies would lead to even more astoundingly ugly code

if an object of class A needs to have a reference to an object of class B, and that is required and should not change, is it better to have a B argument to the A constructor, or have a default constructor and a setter for the B object?

both
do this:
public SomeObj(A foo){ doStuff(foo);}
public SomeObj(){ this(new A()); }
and add a setter
it's 3 lines more

um.. I mean public A(B foo)

A(){this(new B());} A(B foo){doStuff(foo)}
you can chain constructors
so that you only fill in the most advanced one

new B() in A's constructor is not acceptable

and the other just call the more advanced ones w/ defaulted arguments

B may be an interface

the "new B()" is just a mock
so that A can properly initialize
does A _always_ need a reference to B?

if A has a default construtor, it can not construct a B object
well, it may not need it immediately

if A always must have a reference to B, then disable the default constructors

A can have a start() method

what does the start() method do?

it means A has to be initialized before calling start()
so setting the B reference can be deferred to a setter

can you come up with a usage scenario where it would be useful to defer setting B?
b/c A does some pre-init work, or something?

I'm thinking IoC
I'm not sure there is such a scenario, but I'm wondering if I should allow for it

(p.s. i hate working in complex VMs, where you have to create scoped global, static states)

~pastebin

http://pastebin.stonekeep.com

in a complex situation, both A and B may need a reference to each other (although that may be an indication of bad design)
and that can only be done by using setters

hmm
i would use the constructor form
one must be created before the other

anyway, doing both is an idea, to have the greatest flexibility

I generally err on the side of flexibility

then I can change my mind later

it's a small cost
but in the future, you may appreciate it

yeah

I have 8-10 object deep dependency cycles
it's horrible
i feel dumb, until i assure myself that it's okay b/c they're so deep that they were impossible to predict

so.. A(){//the B ref is left null} A(B foo){this(); setB(foo);}

that would work
you may want to do it the other way, however
generally, the constructor w/ the most arguments should get the code
and all the others pass it fakes (incl. nulls)

well, I can't create a B out of thin air
oh

just check if B is nonnull before acting on it

that can work too

so you have A(){A(null);} and A(B foo){if (foo != null {doStuff(foo);}}
which is more verbose
but if you decide A needs another argument
you just add it to the A(B foo) constructor, create a new 1-arg constructor, and fix the zero-arg one

it will eliminate future code-duplication or icky-refactors in the future

Why would my compiler reject something like this.map.getFoo()?

no ;

"[Interface type] cannot be dereferenced."

The eclipse compiler seems to find it okay.

how did map get its value?

initialized in the ctor

ctor…i'm not familiar w/ this abbrv

Constructor

if the eclipse compiler finds it okay then which compiler rejects it?
also, pastebin

this might sound dumb
but try a clean & build
those fix a lot of weird, weird bugs

javac
Unfortunately, I cant' paste the code

ant is imperfect, and clean fixes it
assuming you use a partial rebuild tool

"Recompile with -Xlint:unchecked for details"

you could make a simple test case; anyway, try clean

What is -Xlint

lint tells you more errors
-Xlint:unchecked tells you about things that normally don't matter
or sth
it's nice
you get more information on the error, regardless

I'm wondering why the hell this fucking doesn't work
I'm gonna just manually javac it..

did you clean and build?

it warns you about unchecked conversions, I think they happen with generics

yes

did you use xlint:unchecked?

mabe the eclipse compiler is configured to be more tolerant.

Yes…
Well, waht is is is really bad code.
Because it was written by a fucking idiot.

no raw types, svm_invictvs? :

paste the output of xlint:unchecked here

(configured as in compilers settings for the project)

So, it works with eclipse, but javac doesn't like it.

that statement makes no sense to me
I thought eclipse uses javac

What makes no sense?

when it compiles things

and perhaps you have a java level version difference, too, so one compiler goes for java 1.4, while the other goes for 1.5

no, eclipse has its own compiler

it has it's own compiler as far as i know. hence the difference in error messages between the two.

it doesn't even require the jdk

are you using any of the following: generics, runtime-loaded stuff, introspection (reflection)
and are you sure you can't pastebin the code after a bit of obfuscation, or only give us 2-3 lines of context? surely, not all of it is sensitive info

Yes, generics. Let me show you a snipped of what the code basically does.

possibly related: http://www.google.com/search?hl=en&q=eclipse+configure+compiler+warnings&btnG=Google+Search

does entering a try{} block cost anything? i.e. if if(){try{}} or try{if(){}} any different if the if block is never executed?

http://rafb.net/p/NBKmVZ88.html

you could profile it

That's what's doing,
Forcing a downcast w/ genericds.
I didn't write this fucknig code.

that cast needs some more brackets

That's not the problem.

So…. what's a good free book on java?

It's failing on when I actually use taht function get()

A get()"

also the method doesn't return anything

I dont' know, I ddin't fucking write it.

you should only need the "A"

in the method signature, the error may dissappear

try that, i think it will work

tried that

unless the code has a deeper zen i'm not currently grokking
what's the error when that goes away?

It's failing not compiling that.
It's failing when I use a function that dangerously downcasts like that.

hmm
you should be abl
you should be able to cast it since it's explicit
are you sure that every Super is a Sub?

yes, I'm sure

you might use an if (blah instanceof SubClassType) return getItem else throw exception

That's what doesn't make sense
You can't use generics in an instanceof operation.

I hate generics
you use the get
get an object
see if it is a subclass, too
if it is, return it
follow?

did the manual javac also fail?

http://rafb.net/p/dGU2QV24.html
i'll assume for a moment that what I posted fails too
clean build, and try again
then, tell me if it still fails, and if it does, on which line?

that will only work with one subclass type

what is the get method doing?
is it returning different things based on how it was constructed?
if so, i don't know enough about generics to continue

i seem to recall a discussion about generics which concluded in "generics are straightforward if you use the provided generifed classes. if you create your own it becomes slightly more complex"

yes

can you make a test case? that is, complete and compilable (by eclipse)?

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: