surial, yes already
surial, ignore the method references, since that wasn't the important point of the annotation
pfn, it won't run your processor if it's not on the processorpath
Indeed. (I didn't see your line until after I hit enter) ALL i want is this: private @Getter @Setter int someField; //generate the simplest getter/setter for me here.
If I need a getter/setter that does something fancy, I'll just write it.
ah those java experts
dmlloyd, it won't even compile if the processor isn't on the processor path, since the annotation must be in class path
or just @Property would be nice
cheeser, right, and that's what I've done
the processor path is not the same as the class path
dmlloyd, the processor path is implicitly the classpath
except that usually I don't want a setter, and by splitting them it's easy to specify different access levels. private hosting @Getter @Setter(Access.PROTECTED) int something;
surial, @Property(readonly=true) or something like that was my option
fair enougn. but i'd prefer pfn's approach
broke`: yeah, v0.11 no docs, no site, i dont think so
That's a lot more work compared to just @Getter, and as a rule, just a getter ought to be the default, not both.
then I'd rather have @Property(writable=true) if you must
surial, doesn't work in many cases, e.g. JAXB
and jax-ws
except you'd waste a lot of people's time
jax-ws requires both if you want to properly serialize your object
Well, in those cases, toss a setter in there too.
hello. what would be a recommended structure to use for storing objects and then searching through them for their attributes later? vector? linkedList?
Never Vector.
you're make the noraml case more work.
multiple maps.
lol
most frameworks can work directly with private fields
surial, but yeah, my code isn't actually used, since there's such poor IDE support
depends on how you search. could be you want a Set, not a list.
how do i get jax-ws to generate the parameter names in the generated xsd as defined in the method signature instead of 'arg0' 'arg1' etc ?
meeper many, not most
Except that I consider the normal case to be just a getter.
the special cases should take the extra effort and the normal case the default.
meeper I reiterate jax-ws and jaxb as those that can't :p
really?
you're in extreme minority.
meeper and yes, I use JPA + private fields
any framework that can't work with private fields ought to be taken out and shot
I doubt that.
meeper spring as well
Immutables are Good.
meeper spring is javabean-style only
I agree with surial, immutable objects are common
they can be, sure. but they're not the normal case.
unless 2.1 is addressing that
well spring is all types of retarded. but jaxb should be able to work with fields. lemme check
just because a lot of J2EE stuff thinks otherwise.. I think in J2EE land, setters are the norm, and in J2SE focused stuff, they are not.
I make more immutable objects than mutible
sure they are
setters are the norm everywhere
more importantly though, the importance of immutable is a rising tide, not a waning one. Thus it is asking for future trouble by making 'mutable' the default.
the JEE/JSE distinction is ambiguous and largely irrelevant
i just don't buy it.
well i have an object of MP3 let's say, and i want to store the MP3's and then see if an MP3.getId() (it's id) is in a list or set or whatever of other MP3's.
and all that's beside the point anyway.
dmlloyd, anyway, I repeat–classpath is enough for anno-procs
I think you can add an @XmlAttribute to a private fgield in jaxb
and yet I see it everywhere. Lots of J2EE focused tech uses setters intrinsically (e.g. beans), whereas in J2SE (as in, stuff that does not really mesh with the jboss hosting defined interfaces), immutables are very common.
common doesn't mean the normal case.
but efficiently i suppose because it will be done often. so not really liking the idea of iterating through every memeber of the list/set
meeper possibly so–my only real interaction with JAXB comes through JAX-WS
in my own work, i see very few immutables.
In mine, I see many
In my work, I see… let me do a quick search here.
any case where there's thread-safety
issues
of course jaxb is evil anyways because it depends on xml schema. you should use http://jibx.sourceforge.net/
~evil
only morons use the word "evil" to refer programming practices, IDEs, etc.
0 setters, 915 getters.
tho I don't think jibx supports annotations yet
meeper I'm ok with xml schema–did you not hear? I wrote an entire soap stack for javascript using js dom :p
well you'
well you're going to hell. such a terrible thing stains your very soul
the new Time/Date API will have a large number of immutables
mmmmmm
setters should take a good, deep thinkthrough. In cases of doubt, the preferences goes to where the auto-pilot behaviour is less potentially dangerous.
meeper, http://paste.hanhuy.com/wsproxyfactory.js
heh…
though XML host schema is really very evil. I have yet to see it not make everything complicated and hoopy
well, some sort of schema is nice
it's not evil, that's silly
~ty
AlphaOmega, ty is the creator behind the fad-tabulous beanie baby craze of the nineties.
it's definitely complex
relaxng sounds interesting
har har har
but it's harder to parse than xmlschema
"harder to parse" since it isn't xml
wel time/dates, being immutable values, it makes sense. but the vast majority of objects aren't immutable.
hi pr3d4t0r
what's that about?
hola pr3d4t0r!
pr3d4t0r is pr3d4t1ng
a welcome-back-to-the-keyboard-kick?
I heard a cry in the wilderness demanding that.
Cheeser, you should really do something about that lieutenant of yours.
like what?
I dunno. Explain to him the nuances of random kicking.
feel free to do so.
.jj
i don't believe in empowering people only to dictate to them.
meeper anyway, I prefer there be some sort of schema
meeper xsd fills that niche
Thing is, he doesn't really listen to reason.
:*
It was done with love.
why? just to satisfy soap/wsdl?
meeper any time you have any automatic negotiation/validation occurring, in any sort of ESB
not just for soap
but yes, xsd seems rather vital for soap
I don't see how you'd get by on any rpc/message-passing system without some sort of IDL up-front
rpc tends to be annoying with static languages.
Unfortunate.
it's not that hard. you just implement the messaging system and do validation in your parsing code
meeper and you want to implement that validation for every permutation of your messages?
I've found schemas to be almost a complete waste of time except sometimes they have value as documentation
well yes
instead of defining common contracts?
yes…
most of the time (1) writing a correct schema is impossible since xml schema is horribly limited (2) schema validation is very slow and breaks down completely if you're doing a few hundred messages/min (3) it's a nightmare to maintain
but jax-ws seems to produce some pretty reasonable schema
so I don't even bother with it, and spend time ripping it out of a lot of places
gn8
1–not really, 2–if you're constantly referring to the XSD DOM, 3–not really
you think schema is not limited?
you can't even do a random set of elements. it's impossible to write schema for the simplest formats like rss
schema shema.
That doesn't really work
meeper depends on your concept of limited, I don't see it as limiting, I don't want to have a random set of elements
mein gott
if you have a random set of elements you can't have a schema
i like xml used in configuration, maps, lists, all that, i dont like xml when its used as a programming language
that's like saying you want an rdbms table with random column names
well yes, though there's nothing wrong with a random set of elements. the problem is schema's total inapplicability
as for rss… it sure does seem so simple with rdf, dc, etc.
ugh
you really need to grow up and stop privmsging me. I couldn't care less what you think.
And where do you think XML validation falls? app programming, or configuration?
but i usually dont write the validation code
if you ahve to create your own XML hosting schema, that sucks
its not so bad when you've got an IDE helping you
well, rss is its own kind of nonsense but. I still maintain schema isn't worth it. maybe tools have gotten a lot better in the last couple of years but I still have gotten along well enough while avoiding it like the plague
like?
any IDE that has a basic understanding of XML, like element and attribute completion
IDEA for one
okay, but, XML is a -really- horrid basis for a DSL. WHich is what we're talking about.
it doesn't excuse you from understanding schema, but it makes you less likely to screw it up
I'd be curious to see if anybody but the hardcore wsdl-heads are using xml schema. it seems like a very niche technology by now
programming ant is a pain in the tusch for a reason.
~gosling
surial, gosling is a pure java host build system. It can be found at https://gosling.dev.java.net
yeah, they all suck, i havent seen a good representation of xml visually in the ides
ant plain sucks for complex scripts
yeah but I think that's largely due to the lack of namespaces etc
it works great for simple setups
dmlloyd, ant? no
ant has no need of namespaces
Sure, but if it's simple, a java-notation-powered build 'script' would also be simple.
it does
the problem with ant is that it's "declarative"
maven is easier to configure than ant, but its still xml, see there, maven youre more configuring the xml, in ant , youre writing full fledged programs with flow control, yeach
there's no concept of flow-control, etc.
no, it's just that ANT is a really poor programming languages.
and there-in lies the problem
what pfn said.
never used maven, don't know, don't want to go through the overhead of figuring it out while ant still works for me…
I also don't like having my dependencies auto-fetched
lack of namespaces or schema or anything like it means that an IDE has no standard way to do things like element and attribute completion
I prefer to have them checked into my repo
Same here. I can make an work for me, but once gosling is out of alpha I'm gone.
dmlloyd, that would be lack of a namespace
er
schema
maven checks them into your repos, but initially, you have to dl, Maven host also does this for you
namespaces have nothing to do with it
i would use ant if its working for you
AlphaOmega, I don't see the advantage in that really
but they do - any non-core task or set of tasks should have its own namespace
otherwise, there's no way to validate the thing anyway
yeah, there is a big advantage if youre using ant improperly and getting frustrated
dmlloyd, there already is no way to validate ant :p
exactly!
if ant is working for you, then continue with ant, maven will probably be worth thte switch a little later
but there would be, if the tasks were grouped into namespaces
and yes, using ant xml properly *would* mean adding namespaces and schemas
rather than registering a taskdef
this is what I'm saying
indeed, but, would'nt you rather use gosling, or something similar?
you would use xmlns:taskgroupname xsi:whatever="…"
surial, I'll use the best tool for the job when such a thing is available
you'd have a ton of declarations at the top, but I guess that's the price for using xml
ant would be just fine if it stole maven's pom
gosling is exactly like ant, but instead of javac whatever whatever, you do new Javac(whatever, whatever) in a .java file and compile hosting it.
surial, I don't like having to compile
I'd rather have a jruby/groovy/scala/whatever script and run it
That's what IDEs are for.
or run gosling inside of beanshell, etc.
or a makefile?
There is a python-based java make replacement.
there's a maven task for ant. i use it to do just that: handle dependencies
an ant command line variant for gosling would undoubtedly use beanshell.
I mean, if ant had maven's pom built in. and of course got rid of the dependency madness
or some similar I'll-worry-about-compilation tactic.
jruby + buildr sounds interesting, perhaps
in maven, you can run any build.xml file
buildr, that was it.
transition is a cinch
"pom" isn't the point. repository management is (including versioning, automatically fetching dependencies, etc)
well I disagree. I think maven's repo management sucks. all I want is the pom
so, using mavens existing infrastructure (and repositories) seems like a good idea
Still rolling with Wicket?
well, without repo management, it's pretty pointless.
the maven repo is ~10GB, you can mirror it too
I don't think I've ever seen a maven build actually work when it had to download dependencies. the entire thing is pretty crazy
the main point for me is not having to copy jars around all the time
indeed, you ahve to find every dep, compile and runtime
orange80, I haven't written anything with wicket for a while, my voip application has been languishing–how's the job going?
so good unit tests are key
well no, with just the pom you can get away from having to define all the standard ant tasks that everybody reinvents over and over
hm, never had a problem with mavens dependency resolution. always just worked.
Oh, I love it there; a little stressful, but that's to be expected.
maven's build process is too restrictive for my taste though. and it confuses me, so i stick to ant
Nice to have (good) health insurance for the first time in a while
well, maven is deisnged to do *everything* the entire build process and project lifecycle, it takes a lot to learn,
I had the maven book opened up in a tab for a while, I couldn't get around to reading it…
i mean it generates your project website and can manage the entire website from a pom.xml and optional site.xml
I have been learning Wicket in my spare time because I hope to use it on one of our future projects rather than Struts which I don't really like.
is google calendar open source or source available somewhere?
uh, its javascript, no? so it has to be open source?
Duesentrieb ah yes that would make sense
hes probably talking about the non-public parts
Duesentrieb, just because the source is readable doesn't mean it's "open source"
Agreed. Someone once told me, "look it's so easy! All you have to do is this, and this, and this, and this, and this, and this…" And I'm like, "uhm, why is this easy again?"
yes it does. that'S the definition of open source. it doesn't make it Free Software, though
yeah, tahts called gpl
ok, someone please answer this time
I'm working on this thing, and have been thinking, what would be the most effective way to store data so it can be searched for rather than selected with a specific number/word.
how do you get mysql and java to talk
~jdbc
AlphaOmega, jdbc is Java DataBase Connection, the standard java API for communicating with databases using embedded SQL commands. See http://java.sun.com/tutorial/jdbc
V00do.
?
read the documentation
i'm confused
what documentation
nobody's going to tell when there's tons and tons of documentation on it
JDBC
google isn't helping
start with mysql's java docs
Just search "MySQL, Java, JDBC"
maybe read the jdbc tutorial
might also want to read the book of matthew
ok fine, jsut email me your homework and ILL do it! sheeeesh
hmmmmmmMmmm
So a friend of mine brought me back some rock from a beach in Hawaii…isn't that like really bad luck?
yeah
and that is true by the way
oh?
Actually it was sand and rocks.
my grandparents brought me back some lava rock in the shape of a pagan gift shop tiki god and i had bad luck til i broke it by accident and threw it away
Are we talking rock or "'rock"?
i dunno if that was it, but i think so
She said she got me sand from the black beach and somepebbles.
did you know, bad things happen to superstitious people
really?
lol
I feel good anytime some chick I like brings me something
of course, it doesn't bar stuff from happening to normal people
;-)
yeah, true dat.
Look at it *that* way.
hehe
the fact that bad things happens to everybody means that it happens to superstitious people :p
That overrides all the other shit.
yeah.
my grandparents tried to kill me too
Black sand!
What makes the sand black?
I'm working on this thing, and have been thinking, what would be the most effective way to store data so it can be searched for rather than selected with a specific number/word.
It's volcanic ash, I think.
Ok, I'm here to state the obvious.
lol
Cool chica, anyways?
?
The girl
Is she cool?
yeah.
you are writing a database. or a search engine, if you want "soft" matches. read up on "information retrieval".
…but it's not like that.
the general term is "indexing".
Damn, I hate it when "it's not like that"
uh don't do that
orange80:
look at java lucene. it does everything for you
freetext index
lucene for freetext, yea
lol! — for real lol
Wait, if I have somebody on ignore…
does that mean they can still see what I say?
yes
ah
Who are you ignoring?
your mom
Heh
your mom
I told her to stop trolling ##java.
Erika?
wow openfire is impressive
Erika didnt' troll, the last time I recall.
whats an erika?
…though I remember she had a pretty complicated J2ME app that didn't join threads.
um…?
A person's name?
svm_invictvs, i see…
hah, you see?
You should set your name "herschel" so you're herschel@hostmastk.com
"Start jconsole by typing jconsole in a command shell. When you start jconsole withouth any arguments, it will automatically detect all local Java applications, and display a dialog box that enables you to select the application you want to monitor. Both jconsole and the application must by
executed by the same user name, since the monitoring and monitoring system uses the operating system's file permissions."
this is not happening for me, i can't see anything I can connect to
tieTYT, they need to be running as the same user as you
tieTYT, and java5 may behave differently from java6
tieTYT, jps
try that first
if you don't see it there, you won't see it in jconsole
ok
yes don't see it
hm
grrr…
Amarok developer?
yes!
Hmmmmmmmm
^_^ Amarok is badass.
it surely is… too bad it only runs on Linux
there's nothing close on Windows is there? I use foobar2000
give us some months
Is it possible to use hashMapName.get(* + "thingy" + *);? In other words, is there a wildcard character in java?
there is a cygwin port… but it is very alpha
Vesuvius, no
No wildcards?
Vesuvius, write code to do something similar yourself
Vesuvius, no
Vesuvius, write code to do something similar yourself == ?
I've got a tomcat 4 app for which i am implementing an automatic updater for. i need to be able to restart the webapp context - what is the best way to do this?
yes, that's your answer, what are you expecting?
sebr jmx
and tomcat4? heh
sebr read the manager app and figure out how it does it
well yeah, old stuff
yeah i did read the manager app
but i need to remove it then re isntall it it seems
can't just reload because it won't read the new war file
huh?
tomcat will read the new war file…
you'd think so
but it didn't
i've googled out, and i still dont know why the ant build.xml doesn't pick up ${env.HOST} or ${env.HOSTNAME}. it picks up all the other env variables, but won't do that one on linux.
that's a question for tomcat peeps… and tomcat4 is old
yeah…
~question mark
I guess the factoid '~no, question mark' might be appropriate:
i'm wondering how much effort it is to port from tomcat4 to 5 or 6
Replying with a ? doesn't tell us what you are confused about. Ask a question that has an actual question to it.
eidolon, perhaps it's not set
then how do i get it?
eidolon, if it's not set, how would you get it…
execing a uname seems painful, particularly from a build.xml
wtf
pfn, my problem is -every- piece of documentation says it -should- be set.
ok javabot is acting weird
eidolon, simple, env | grep HOST
yes. i know that.
thanks.
every piece of documentation says it should be3 set?
i really do understand shells.
I don't see HOST set …
yes, every piece of documentation says env.HOSTNAME under linux should contain the hostname.
just as env.COMPUTERNAME under windows does.
(which it does)
and it works for me
env.HOSTNAME works fine
assuming you did property environment="env"/
yep
tag is at line 10. the build properties file is being generated down at line 147.
apparently pastbin doesnt' like line breaks in XML :-/
there's some old crap comments in there :-/
eidolon, well, your paste is using env.HOST
yeah, i changed it from env.HOSTNAME to env.HOST to see if it would fix it.
it didn't.
and why are you using env.HOSTNAME/COMPUTERNAME to determine OS?
os.name is much better
can someone tell me how this is possible? http://www.kimberlyandgeorge.com/debug.jpg
mylisteners size = 0 but listeners contains one (null) element
os.family is the branching argument.
you may be interested to know that this had the solution to my problem: http://forum.java.sun.com/thread.jspa?forumID=537&threadID=5133218
ArrayList listeners was instantiated from myListeners.keySet()
eidolon, eh?
eh which?
os.family is the branching argument.
it is.
do you understand how conditionals in ant work?
#
condition property="build.computer" value="${env.HOST}"
#
os family="unix"/
there is no os.family
#
directory did not have write access
/condition
what are you talking about
fuck
you get the idea.
what?
thingamabobber
ok
my question
why are you determining the value of build.computer based on presence of variable name
instead of just inspecting the contents of os.name
i'm not.
you're not understanding ant conditional breaks.
i'm setting the variable build.computer based on the value of os family…
yeah, but based on the presence of env.HOSTNAME vs. COMPUTERNAME
why not on os.name
no
you're still not understanding.
works.
then why are you using env.HOSTNAME
pfn.
you're making -zero- sense.
and you're arguing garbage.
listen carefully.
you're setting build.computer = os family = unix if env.HOSTNAME is set
yes?
NO!
again, NO!
works.
you obviously don't.
that's how the condition property crap works
no
it does not.
oh, it's the other way around
is true
if the content is true then set the value
yes.
jeezus.
was a j2ee channel ever created?
you should say so
i said repeatedly, you refused to listen, you refused to read the documentation asi told you to.
yeah yeah, I'm not the one with a problem am I :p
you're the one that can't get env.HOSTNAME to work
works fine for me
would just tell you if it's set or not and you're fucking up something else
uwould just tell you if it's set or not and you're fucking up something else/u
fyi, i know env.HOSTNAME doesn't eixst.
that's the problem.
and i don't know why it doesn't exist, when all the docs say it should.
then the problem is your shell, it's scrubbing the variables
especially, if you're running ant from an exec() of anysort
jdev:~ # echo $HOSTNAME $HOST
jdev jdev
no, i'm doing 'ant build-server'
vi `which ant`; go to line before java launch, echo hostname=$HOSTNAME
run script
also, ant has problems with environment variable values containing linebreaks
assuming ant does nothing to determine if it should use System.getenv() or exec(env)
the devbuild.sh script, which does 'ant -f ./packaging_build.xml' has HOST and HOSTNAME set.
i'm going to hack the /usr/bin/ant call to check there.
edit the ant script
then check the environment for variables that contain linebreaks
it's using exec :-/
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\"
that's fine
ng.
2 EDT 2007 : Executing ant _packaging_generation_ to compile and deploy the new
ANT Host is jdev
ANT Hostname is jdev
no dice.
that's right before the exec command.
then check your environment for variables with line breaks
Stop filling up the channel with your explanation. Paste bin if it's going to be so long.
blow me.
No need to be cranky just because you're stuck and don't know what you're doing.
Should the methods of a utility class be static?
you don't know me very well, do you?
Or is that personal preference?
leip, depends on design
apparenlty the hostname problem crops up on Solaris as well.
eidolon, will you just check and confirm the environment already?
env | grep -v =
jdev:~/ant/bin # env | grep -v =
jdev:~/ant/bin #
though. hmm.
check the environment from the script that calls ant
no, there… may be something else odd here. check this out.
'env' doesn't have odd stuff in it. but 'set' does. check this out.
http://pastebin.stonekeep.com/633
hmm, nice shell functions :p
ditch them and try it again
ant 1.7.0 might address this problem
i'm not even sure where the hell all that crap got set.
i'm sure this is some magic suse-ism.
like the geniuses who brought us beagle.
/etc/profile.d/* maybe
looks like /etc/bash_completion.d/
that's weird that you guys are talking about that
cause i have a problem with bash tab completion and google is really not helping. How do you make it case insensitive?
i'll ask in #linux
or #shell
that is a way worse channel
heh
How do I enable case-insensitive tab completion? http://www.wlug.org.nz/BashNotes
this has what to do with java?
neowhoah./neo
i just wrote a silly little test build.xml. and it worked (found env.HOSTNAME)
Did that work for you?
oh let me check
yes thanks
jesus, i should have just googled for that
all day i was looking for dos style completion and getting nothing
Haha…
Google is probably thinking, "why don't you just *ask* me what you want?!"
I only tried the bind from the prompt, but the inputrc should work fine too.
if i don't have an exact match, cycle through the options instead of showing me all possibilities
found it
bind '"\t":menu-complete'
hi, does anyone here have experience with Tiles?
~anyone
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.
ok - im having an issue where an property specified is 'not in context'… (in regards to a putlist)
I pity you if you're using Struts.
im using spring.. but have to use the Struts tag library for Tiles
I hate Struts.
i can tell
lol
Sorry. My experience is recent enough that I'm still having flashbacks
my exact error is "Error - tag importAttribute : property '*******' not found in context."
if i c:out the list i get "[one, two, three]".. but i can't forEach through it
is that a well formed array?
that looks all right, but without code…
wicket++
java 5 allows for covariant return types in subclasses. eg if superclass List has method subList with return type List, and i write a subclass of List called ArrayList, then i can make subList return the more specific ArrayList type.
correct
xs, int n, int m) { return xs.subList(n,m); }
you'll have to do ListT extends E, i think
tias
subArrayList = mySubList(someArrayList, 0, 3);
tias?
or..wait..if you want a different list of the same generic type, that code should work fine
~tias
Try it and see. You learn much more by experimentation than by asking without having even tried.
i've tried without success; i can paste my example shortly, but was wondering if someone here would know
http://rafb.net/p/oM8lu530.html
the commented-out lines do not compile
your f method doesn't compile either, not surprising considering you never defined T
whoops
I keep hearing about wicket, are a lot more people using it these days?
sorry, that's part of the code that doesn't compile
Wicket seems cool from what I have done with it so far.
orange80, compared to say early struts, spring mvc, jsf?
and all those commented out lines compile fine in java 6
The only other I have used is Struts.
my team really likes spring mvc and hates jsf with a passion
Wicket is the exact opposite and in every good way.
really!
I think JSF is probably more similar to Struts.
yep
backtracking a bit - i don't follow your comment about T not being defined
T id(T t) { return t; }
the error i get is "incompatible types"
yes, that's the error i get as well
but in java 5 only?
i'm running java 6
hm, then how could the commented lines possibly compile?
they directly depend on f()
eclipse is being nice?
hrm.
i guess what you mean by "compile" is that you get no errors pointing at those lines
correct
then i wouldn't say that anything compiles
i too only get a single compile error on f()
not on those lines i subsequently commented out
anyway, back to the original question - is there any way to accomplish what i described?
do you understand WHY you can't implicitly cast?
what are you referring to?
your error
i think i understand the error as saying:
jsf error messages seem really opaque … ajax seems like a hack to get working with jsf
am I alone?
"T is a subclass of A. T does not necessarily override A.f() to return the self-type T. hence i cannot guarantee you that the a.f() will return T (only that it will return A)."
bingo
~zeeeee++
zeeeee has a karma level of 1, Fanook
but i suppose i'm asking whether it is possible to get that more specific type whenever it's available
i understand that what i wrote fails to do that, but is there a way?
so when java is decompiled, say with jad, none of the original variable names are preserved are they?
U f(T a) { return A.f(); }
you can explicitly cast to T and as long as f() always returns an object of the same type a is, it'll work fine. Otherwise, you'd be better off storing the result in a temporary A reference, checking whether it's an instanceof T and reacting accordingly
although, i can't remember how instanceof interacts with T, might have to compare class name strings. *shrug* experiment
i expect the type erasure could play havoc with it
erisco, that's right
hard as hell to understand what is going on then, heh
ah well I will keep sorting
erisco, well, what are you expecting, you're decompiling
that's common with ALL decompilers
in css 100% height doesn't really mean the window height does it?
#html :p
:P
what can I use to unpack a pack200 file?
this relates to java how, exactly?
well I read it was used to compress .jar files
it's used for making jws downloads smaller
pack200
ah right. that's one of the algorithms you can use in a .jar
is how you unpack a pack200 file
$JAVA_HOME/bin/pack200
you figure out the rest
~pack200
aditsu, I have no idea what pack200 is.
~pack200 is replysee http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html and http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/pack200.html
Okay, aditsu.
switch that up for java 6: http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fjava.sun.com%2Fjavase%2F6%2Fdocs%2Fapi%2Fjava%2Futil%2Fjar%2FPack200.html&ei=VxzBRuG8MJq0eqWyzYYL&usg=AFQjCNFMlnFiErpJxAgfWiHuU98gUHBMcA&sig2=NescqawfyQ5wDInJxn_PpA
er crap
nevermind
sowwy
I couldn't find java 6 pages showing similar info after a quick search; if you can, be my guest and modify the factoid
that works..
http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html
~no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html
Okay, r0bby.
what about the second link?
finding it.
first link covers it, see towards the bottom.
so that's all that is needed.
didn't mean to step on your toes
if you say so..
aditsu: from the page: http://eugeneciurana.com/pastebin/pastebin.php?show=3602
it also has a link in the "more information" section
which is an anchor…I think people can read and follow links..
no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/tools/share/pack200.html
~no, pack200 is replysee http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/pack200.html and http://java.sun.com/javase/6/docs/technotes/tools/share/pack200.html
Okay, r0bby.
uh.. so what are you doing now then?
duplicating the first link and adding the link you said was unnecessary?
fixed.
see ya.
how do I do the equivalent of {foo,bar} (match foo or bar) in java regexp?
~regex
stickto, regex is http://java.sun.com/docs/books/tutorial/essential/regex/ — Additionally, take a look at the cheat sheet at http://www.javachannel.net/
stickto, yeah I went through those but couldn't find anything, I'm going through the perl docs now
it's long since i used regex last time, so i can't remember it
but I think maybe it's foo|bar, not sure
stickto, tried that but no luck
pls paste your code, I want to try
Can anyone recommend a good Solaris book for me to start learning with?
Solaris for Idiots
//jj/js
stickto, bah! turns out the foo|bar did work, unfortunately the string I was trying to match got changed to something slightly different
bstickto, bah! turns out the foo|bar did work, unfortunately the string I was trying to match got changed to something slightly different /b
anyway, it's good news
stickto, and upon some benchmarks it turns out that the approach that used the regexp was an order of magnitude slower (amazingly enough not due to the regexp!)
orange80, what's to learn, just use it
Yeah I guess… I just remember getting really frustrated the last time I tried it because it was so hard to find information by searching.
^
orange80!
Jeez, I'm always sending messages to myself…
How's Francis treating you?
Yo!
Heh, I have been one busy dude lately. It is right next to my bed though, next on the queue.
really? have you found the reason?
Actually I think I will read some before bed tonight. I had a fucked up dream last night that I was buying a Sega Master System and someone was trying to talk me out of it. This should improve things.
stickto, some log4j stuff involving a choice between adding a filter (using a regexp) and just changing the logging level for a couple lines, turns out changing the logging level is a lot faster
orange80, simple, get an ISO, get vmware server, install and play
hehe
I guess I better get my central time self to bed… good night Java amigos.
:*
lol
'Night.
scary
stickto, yeah, I figure it's an instance of a rule I've developed "if you write a clever piece of code it's probably because you're trying to do something dumb"
what
Hello
interesting, sometimes when one problem emerge, we will always try to bypass it rather than solving it, which cause new problem
in fact, I have face the similar situation many times
and there is a idiom in China, that is, treat head when headache
but sometimes headache is caused by malfunction of other parts of the body
stickto, well I just find that when I write a bit of code where I feel happy since it's nice and clever I almost always notice that if I simplify something somewhere in my code I end up being able to use a much simpler solution in the place of my clever code
unfortunately that happens much less often when I'm forced to use an ugly hack
I have a java program that works fine when I run it regularly but throws IOExceptions when I run the java web start, help?
it throws the IOExceptions when it tries to read from System.in
and did you read the actual error messages?
en, I gonna enjoy my lunch, see you next time
it wasn't very descriptive
i read the stack trace
i guarantee it was more descriptive that "it threw some IOExceptions"
s/that/than
it was just # Input / Output Exception
stickto, later, good eating
~tell kbelasco about show us
kbelasco, Paste the code (and any errors) in the pastebin where we can see it. See ~pastebin for options.
ok one sec
there's a page that says "There is currently no way to provide keyboard input via System.in to any Java Web Start application"
probably because there's no console window
hmm aditsu , that sounds like it
I run it from the console, though
but I guess there is just no way to do it
you can enable the console window, but I don't think it accepts input
what site did you read that from?
http://blogs.sun.com/quinn/entry/launch_that_app_client
bummer
thanks though
System.in sucks anyway :p
yeah it does, but i don't feel like rewriting this old project and adding a gui
well, jws typically means gui
He can deploy JWS without having a GUI.
He'll have to launch a console somehow, but it can be done.
I run the javaws from the console in this case
and it has part gui
Probably a lot less effort than writing a GUI front-end for the program if it's non-trivial.
another javaws question, whenever I write webstarts it seems to not read the first resource entry, which is bad, because thats where the main class is, any reasons?
I ended up putting the first entry twice
ok, I just don't know a good way
if you know, please share
I saw some way of doing it a while ago as part of a JNLP discussion.
Google is our friend
I'll let kbelasco google it then
perhaps later, but any ideas on why javaws doesn't read my first resource entry?
you may be doing it wrong
probably
where is pastebin?
~pastebin
http://rifers.org/paste
http://www.rifers.org/paste/show/5253
what is the most secure way to communicate between Java and C ? sockets ? pipes ?
what's the point of a jnlp with a codebase on the local hdd?
secure?
its a test before I put it up on the server
If I use sockets, then it's visible outside my system.. I want to communicate between local processes
use localhost
localhost:port
and what happens if you only put the jar once?
port
I don't want it to be visible for nmap and other port scanning tools
http://www.rifers.org/paste/show/5254
rmi?
it doesn't download anything and gives me that error
RMI .. isn't it java only ?
oh
yes
when I check the java cache, the app is 0.0 kb, so it just doesnt download
bind to localhost.
oops s/0.0/0
joed Ok, I will go with sockets, and use bind to localhost only..
thanks karstensrage joed
what jre are you using?
1.5 but the program is compiled to 1.4
I had the same problem at work when I wrote a webstart and ran with javaws 1.6
clear
wrong window, dumbass
botass .. it was right window.. with a missing /
I guess the factoid 'without aolbonics' might be appropriate:
http://maroon.uchicago.edu/viewpoints/articles/2006/04/14/aolspeak_is_destroyi.php - read it and chill, or kiss the channel goodbye.
try using jnlp spec="1.0+" ; I don't know if it helps, but that's what I have
no dice
well, I don't know; try a working jws app and compare the jnlp
ok thanks
working jnlp that someone else wrote, almost identical http://www.rifers.org/paste/show/5255
i remember syncronizing threads is a processor hog but how bad would it be to have about 10 threads syncronized?
hi ALL
can anybody help me out please
hellooo, people, any java programmers in here?
hey
what is your question
oh thank you
well.. i have set up a web-server
and my client connects to it by ssl
i.e. https connection
and for the server, i have generated the ssl sertificate on my own
but while connecting, my client throws an exception..
javax.net.ssl.SSLPeerUnverifiedException: could not verify peer certificate: blah blah blah
so,
how can i make the client to understand that sertificate?
pleeease help me out
*certificate
to be honest, I personally don't know much about webservers
or at least verification of them
i see
ok, thanks anyways!
does it give you a chance to view the certificate and "trust" it the way that java web starts do?
nope, that's the problem..
i somehow need to add the certificate to the trusted certificates list
you need to give the client the CA cert manually.
but not sure how
could you please tell me how to do that?
or at least give a link to any documentation?
pleeease )
export the ca public key and signature, hand it to the client.
hand == manually install it.
http://www.tc.umn.edu/~brams006/selfsign.html
thanks!!!!
np.
Is Javabot working? In Private messages he says "This might be appropriate:" but doesn't respond with more.
~fatjar
AMcBain, fatjar is a jar file compiled from several other jars, see http://fjep.sourceforge.net/
hmmm.
he has chosen to not like you
Well, lets try what I tried in there.
~fat jar
I guess the factoid 'jar file specification' might be appropriate:
AMcBain, jar file specification is http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html
Odd.
It works here.
hey all, i'm trying to run forEach's as specified here - http://www.herongyang.com/jsp/jstl_core_2.html - however all i'm getting returned is the items parameter eg: ${sessionScope}.. could anyone help me out with why this is
happening? thanks!
another question, please
the link you have given to me… about creating own CA..
is it appropriate for tomcat as well?
Yeah.
Same difference.
arright! thanks man!
dumb wifi
anyone on the forEach?
hi
how can i create a java.sql.Date with a certain timezone?
i need to deal a lot with dates in my app and i get a date object (maybe with a wrong timezone) from my api. i need to ignore the timezone within this date object and create a new one with my fixed application timezone
or has a date by definition the timezone of the current vm?
neither Date class contains any timezone information
MicW use Calendar
it does. i'm curently looking at the code of it. but it seems that it always uses the local timezone
use Calendar or a library such as joda-time
e.g. in serialization: wen serializing, only the milliseconds are serialized. on deserialization, the local tz is used
if the internal implementation has a timezone, it doesn't necessarily mean that you can use/manipulate it
ok
is the tz usually stored to the database?
depends, it can be
but not necessarily
i'll try. the date representation is only for (readable) information. i also store start/end ts of the day in milliseconds
and it's no problem to align the given date to the application timezone's day bounds
(in milliseconds)
do you know if joda-time supports operations like "give me the next start of a day after X (or return X, if it's the start of a day)"?
Yeah.
It even will do correct intervals, which is nice if you ever hated Date and tried to span times over date changes.
You might have to fiddle a little, but you will have a much richer api to pull from.
it should add 23 or 25 hours)?
afaik yes.
The author is working on the JSR for Data.
so hopefully this time it gets done right.
i'll give it a try (and write some unit tests around it)
Date even.
yes, with date it works (when i add days, not 24 hours)
It is essentially what quartz DailyClass should have had.
i used to write wrapper functions which uses date or calendar
it can most likely do everything you want and more; it has dates with/without timezone, partial dates (e.g. only day and month), etc.
does anyone know a timezone id "from the other side of the world" (e.g. newsealand) for my testcases?
ah. NZ
i'm trying to run forEach's as specified here - http://www.herongyang.com/jsp/jstl_core_2.html - however all i'm getting returned is the items parameter eg: ${sessionScope}.. could anyone help me out with why this is happening?
thanks!
Buenas.
Hej.
Did you add a factoid about aolbonics to the wiki?
er no
all of my additions have my nick
why?
mornin pr3d4t0r
everything i do on that wiki is identified. I always use my nick. And I always changelog it on my channelregulars page
I don't check the logs unless someone's doing mischief
What have you been up to?
Staying out of sight here
Dude. Just be cool.
I actually like you around.
Just give others a chance to appreciate you.
I've added nothing recently, although, take a peek at flippo's link on the channel regulars page
it's a link to a pony..
Heh. He's allowed.
~ops
cheeser, pr3d4t0r, jottinger, Javageek, jor, Logi, Sou|cutter, {aaron}, kinabalu, flippo, and joed. If you have an issue with channel operations, contact any of the above.
i was just thinking it could have been abuse
I like krustofski's new logo. How do you dig it?
I know flippo is an op; i updated that factoid
Nah.
it's nice
just caught my eye.
anyways.
90% of the time, i'm not sure if i'm liked or hated..
It's not about you.
It's about shit you do.
ah
Jumping into every conversation wasn't helping people appreciate you.
okay
It's better to say something meaningful when you are around.
I understand
goodmorning
thanks, anyways, talk to you later.
That's my strategy at work. Just the fact that I show up at a meeting tells people that whatever I'm going to say may be somewhat important or affect them.
Cheers.
.. z Z z .
dreaming pr3d4t0r…
yeah and in a little bit he'll start sleep-irc'ing
haha, yes
Z z .
ha
must be a good dream
. z Z z .
JOlga is waiting for me in bed.
I think I'll be a thespian tonight.
in ur bedroom, catching some zzzs.
nite bai.
zzzzzzzz.
chiaz
where cand i find some info about treedumper?
hi guys,
hi
sledger, what's that?
hello somes french with few time here ?
here?
Can anyone tell me what is the use of FilterInputStream please?
why is here so silent?
api-docs can
java's api documentation is vast. Each classes purpose is documented.
dsfhjdfhdjfhfdjhdf3356jh()^^%$
crap
java api
this is what i wanna know, i saw a code where someone was using TreeDumper.dump(document) to dump a dom tree
Odd question, but does anyone know the SCJP site (or rather, the Sun site where people manage their SCJP/SCJD certifications, re-request kits)?
I've checked it but I didn't got it, its constructor is defined protected, so I can't create an instant of it, what should I do?
It's been so long that I've forgotten the URL.
use the subclasses, also documented
do you meen BufferedInputStream?
e.g.
yes.
so why isn't FilterInputStream defined abstract?
javabot tell Farhadix about abstract
Farhadix, abstract is http://java.sun.com/docs/books/tutorial/java/IandI/abstract.html
abstract means you must subclass it to use it.
really looks like filterinputstream could be abstract as well
maybe it's used internally in the package
thank you, you rescued me from arguing!
good reason
~javadoc FilterInputStream
I don't know of any documentation for FilterInputStream
I meen i havn't thought about internal use of FilterInputStream
g[r]eek: it's busted.
k
g[r]eek: cheeser made some changes, switched the javadoc stuff to a database table.
another question please, what is the concept of Stream?
javabot tell Farhadix about io
Farhadix, io is http://java.sun.com/tutorial/essential/io
that explains it all.
http://java.sun.com/docs/books/tutorial/essential/io/streams.html
when you do System.out.println("Hello world"); your "stream" is System.out
(or to be more precise standard out (or stdout)
good luck.
is this Stream buffered?
regarding FilterInputStream, it's fine as it is. a class is declared abstract when it shouldn't be instantiated. FilterInputStream does not fit into that category
someone probably said that already though, i haven't read through everyone's comments
g[r]eek: sorry, but FilterInputStream is definrd protected, so it couldn't be instantiated from another class. so shouldn't be abstract?
no, you're thinking of private. protected means it can't be instantiated from outside the package. private means can't be instantiated from outside the class
javabot tell Farhadix about access specifers
Farhadix, I guess the factoid 'access modifiers' might be appropriate:
Farhadix, access modifiers is http://java.sun.com/tutorial/java/javaOO/accesscontrol.html
but with a private constructor, you can still instantiate from inside the class but that's besides the point.
^^
yeah thanks, read that FarBeyondDriven
Go read the link i gave you
http://java.sun.com/tutorial/essential/io
OK, thanks.
here? i need your help, please
what sorta help?
maybe others can help you.
but they dont have the silky smooth touch that is joed's speciality
hehe
hrm, how do you call the guy that supervise you during the writing of your Thesis at the university ?
dude
you're kidding right? this is a java support channel.
Yeah. Who would use Java in their thesis?
ok nvm. I tought some of you might have done studies. and since I'm writing my curiculum vitae for a java dev job.. anyway sorry for disturbing you
:P
(The term is 'thesis adviser')
no idea. but in bulgarian. it is "rukovoditel"
thank you DRMacIver
in greek it's thaskalos
in french it's "Promoteur", fyi
interesting, adviser/advisor: "an expert who gives advice." - subscripts: advisor: "the United States sent military advisors to Guatemala" - adviser: "an adviser helped students select their courses"
gotta love english.
I assume it's just a dialect spelling difference.
mine was my project tutor
Guys, do you know what xsl engine uses Mule?
can't find xalan nor saxon in its libraries…
i figured that too. but this particular dictionary usually says "UK" or "US", in this case, it doesn't say either.
Maybe they reinvented the wheel?
DRMacIver, i don't think so. They seem smart guys
Are you insinuating something, sir?
hehe, you choose the insinuation
ok, this jaxen jar they use is for xpath…
mmm, maybe this jdom.jar
is the answer…
Can't you just hook up a profiler, look at the loaded classes and see which ones have to do with xpath?
I'm opening src code with netbeans
http://mule.codehaus.org/docs/site/mule-modules/mule-module-client/dependencies.html
morning
hi jottinger
hi
g[r]eek, interesting, how did you get there?
(that's for MuleClient, not for Mule itself…)
i googled "mule project dependences"
*dependencies
howdy jottinger
holy google…
amen.
http://mule.codehaus.org/docs/site/mule-core/dependencies.html
anyway, hopefully that'll help
i'm by no means a mule aficionado
Nitro tha CiMien
mmm, still not sure… there are a lot of jars missing there…
http://mule.codehaus.org/docs/site/mule-modules/mule-module-builders/dependencies.html
hmm finding quite a few of these random links
reckon they're autogenerated somehow?
i think they are maven-generated
no luck whith the sources… all is based in TransformerFactory class
which delays XSL engine binding to runtime i guess
let's follow DRMacIver suggested path
execute a xslt bad formed and look at the stack trace
bbl
ok, got it
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(
but i can't find xalan jar on mule libs… maybe they come with jvm itself? let's see…
is that a sun or apache package :s
hi, i developped an app which use many librairy. I want to generate a jar file, so i'm trying to edit the manifest file, but there is a problem, it seems that i have too many librairy, it says an error when i'm trying to generate the jar file "line too long", how can fix it ?
http://rafb.net/p/SMnF9s82.html
ok, here comes the explanation about xalan, jaxp, sun, apache, etc.
http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html#packageNamesWhy
com.sun.org.apache.xalan is the xalan frozen version included in the jdk
you don't have to use the endorsed dir now to use a more recent xalan implementation
you can simply put it on the CLASSPATH
SO
hello … i can't launch a program cause of env variable on Linux what are the ENV VARIABLE TO set please ?
mule is using my jdk 6 internal xalan
usually, none
exception in thread "main" java.lang.NoClassDefFoundError:
hahah
#1 ill indeed.
that doesn't sound like an env problem
I'm having trouble with the java.awt.TrayIcon class.
jottinger, i can run the program in eclipse but not in my term
g[r]eek: I think he should have said "most common" instead of #1
yup
show your command line
utrrrongeeb, use java 6 SystemTray
LDPATH="$LDPATH:/usr/share/jdom-1.0/lib/:/usr/share/sax/lib/:/usr/lib/eclipse-3.2/" java Creation
Exception in thread "main" java.lang.NoClassDefFoundError: Creation
well, LDPATH and CLASSPATH aren't the same
Why? I use java.awt.SystemTray to add the TrayIcon, I just get plenty of exceptions after I start to click the icon.
Hi
It's giving me ClassCastExceptions from the event thread, as a TrayIcon isn't a component…
utrrrongeeb, sorry for that, it worked for me some months ago…
It works, but when I click it it eventually starts pouring out those exceptions.
~j2ee
for a tutorial on java ee see http://java.sun.com/javaee/5/docs/tutorial/doc/
jottinger, http://pastebin.com/m7dbf8b69 error too .. ut in eclipse it works .. same file
g[r]eek: oh sorry, i was away )
I'm a bit inexperienced, and my docs seem out-of-date, as they don't cover TrayIcon. I'm trying to remove a dependency on org.jdesktop.jdic.tray.TrayIcon, but java.awt.TrayIcon uses the AWT, not Swing…
g[r]eek: so, do you really want to hear my problem?
)))
utrrrongeeb, start from scratch
try to do a simple example with SystemTry and build from there…
It's not a case of messy-poor-coding (IMHO), but rather that the Java Event Thread is throwing its own ClassCastException.
here?
~SWIG
Overlook217, SWIG is http://www.swig.org
this XMLSpy tool is amazing…
XMLSpy is amazing
it's the bestest db tool evar!
db tool, hehe
it even reads EDIs
It's won JDJ's DB Tool award for years
DBSpy?
uh oh, xml databse!
no, xmlspy
~openssl
I guess the factoid 'openssl-keytool' might be appropriate:
progreSSive, openssl-keytool is http://mark.foster.cc/kb/openssl-keytool.html
basically, altova's fanboys managed to slam the JDJ Reader's choice awards
jottinger, CLASSPATH="/my/folder:$(java-config -p jdom-1.0,sax)" works
it's been a source of humor forever
I'm not even sure altova realises how funny it is
yay
jottinger, slam? worderference tells me that is closing a door roughly
in context, it means that altova has a huge grassroots campaign that skews the results in their favor
ah, ok. Anyway, the tool is amazing whatever the government say
Well, not only XMLSpy, but also the other kids… MapForce etc.
ok! great. I don't have to learn XSL MapForce will do the work for me
(i know, IDEs are not for newbies… whatever! i will not mess with XSLT until necessary)
heh
Can anyone tell me hoe I use generics and variable argument lists in JNI?
XSLT owns j00
j00?
xslt isn't so complicated…
you?
it's just dom and xpath…
anyone? jni and varargs?
pfn, well, i'm checking the XSLT Mapforce generated for me…
may not the most performant
*maybe
jni + varargs = jni + object[]
generics–well, it's native code, why does it care about generics
just treat it as an object
the question is: how do the signatures for methods with generics and arargs look?
I am using java from C++ code
trueg, Object and Object[] respectively….
jni docs don't cover this?
sadly, no.
varargs probably just have an array for their last argument when called from JNI.
It's just syntactic sugar over that (I never got to the bottom of exactly what it does at the byte code level, but the answer seems to be "not much")
bIt's just syntactic sugar over that (I never got to the bottom of exactly what it does at the byte code level, but the answer seems to be "not much")/b
any java programmers knowing SSL??
thanks guys.
(And you should have no problem using the type erased version from JNI. Don't know if there's anything better you can do)
can anybody help me out please
?
javabot, tell progreSSive about ask
I guess the factoid 'the truth about garbage collection' might be appropriate:
andresgr, the truth about garbage collection is http://java.sun.com/docs/books/performance/1st_edition/html/JPAppGC.fm.html
~ask
The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.
~javabot++
javabot has a karma level of 100, g[r]eek
~appfuse
sanjar, I have no idea what appfuse is.
~ssl
I guess the factoid 'openssl-keytool' might be appropriate:
sanjar, openssl-keytool is http://mark.foster.cc/kb/openssl-keytool.html