« first day (3 days earlier)      last day (4923 days later) » 

1:38 AM
anyone know how to edit the html templates in Hudson ?
 
2:05 AM
wow
is this as dead as it looks like/
?
 
2:16 AM
I just found out about these new chat rooms.
 
cool eh?
 
Mia
3:04 AM
hi
 
3:44 AM
is anyone using java porting of gettext @ code.google.com/p/gettext-commons
 
Good day. I don't use Java much. I am trying to install JAI-ImageIO for amd64 so I can run (already compiled) dcm2jpg. I copied the jar to /usr/share/java, didn't work. How can I teach Java to use this? I haven't looked that hard for the amd64 installer but it's been a pain to try and find it.
 
 
2 hours later…
5:37 AM
cookiecaper: Look up the meaning of the CLASSPATH environment variable
this really is an very active chat
But I wonder if there exists an IRC bridge to this
 
6:31 AM
either it is an IRC back-end, and then it does, or this is their own custom ajax dohicky and it doesn't
Personally I'd say its unlikely this is IRC based
wouldn't make much sense if you want to bind it nicely to usernames and logos and would invite more problems than it would solve.
this is pretty flush to be honest
 
is it possible to call C++ library from Java ?
if yes, how ?
 
yes
you're looking for JNI (Java Native Interface)
Perhaps this will help:
 
BjornS: thanks! will definitely look into that
 
while it does work, I would recommend not using it unless you know exactly what you are doing
 
I am trying to call a Machine Learning library written in C++ from my Java code
 
6:40 AM
have you considered looking into java based machine learning libraries :)
 
they are slow / buggy for what I want to do.
 
mahout.apache.org is quite good
 
the C++ library has the features I want.
 
ok, but be warned, you might run into all kinds of nasty problems working across platforms like that
 
Mahout doesn't have a CRF implementation, as far as I know
nasty?
 
6:44 AM
JNI works in theory, in practise I can say nothing for it other than I suspect you will have funny issues with types and any kind of change in the api will need to be reflected on both platforms very carefully
using JNI is not trivial
mind you, there are several CRF implementations in java you might explore ;) en.wikipedia.org/wiki/Conditional_random_field
 
BjornS: do you have any experience with CRFs?
 
Not much
I've worked with Markov chains before mind you
from what I've read, they are not too different
 
hmm, ok
I was wondering how many samples does one need for CRF training?
 
7:00 AM
depends entierly on the domain I guess
how much time do you have, how much training data do you have, what quality is it etc etc ad nausium
if you find that you're not getting the results you wanted, turn up the size of your training data :)
 
this is for address tokenization to: house, street, city, region, etc.
 
hmm, sounds like a strange domain to do that for but sure
 
why do you think it is a strange domain?
 
well most of the time addresses are formatted correctly, its only really applicable if you're trying to datamine for addresses in free text, and you said tokenize so I presume you already have the addresses as a string :)
 
Has anyone got a good success rate with mturk for subjective questions?
 
7:17 AM
mturk, such a politically correct name :P
 
7:56 AM
anyone know how to do "mouseover" events in swing?
 
8:19 AM
hi everyone
 
hi
ClassPathScanningCandidateComponentProvider from spring is magic!
 
what does it do?
before RTFM :)
 
lets you scan a package for classes matching certain criteria
I use it to scan a package for all classes with a certain annotation and then use that to produce a sitemap
14
Q: Scanning Java annotations at runtime

AlotorWhat is the best way of searching the whole classpath for an annotated class? I'm doing a library and I want to allow the users to annotate their classes, so when the Web application starts I need to scann the whole classpath for certain annotation. Do you know a library or a Java facility to d...

 
that is nice
 
incredibly useful for decoupled coding
having to register each page with a sitemap generator is a pain in the ass, now I can just put an annotation on a page class and it'll just work
 
8:32 AM
Annotations make life very easy if I am using annotations not providing them
 
providing them is pretty easy too :)
 
when I use reflections and all those fancy stuff I get easily confused
 
9:10 AM
ah
mmmmm Guava
Anyone have any suggestions for getting an open source java lib off the ground ?
 
9:39 AM
I'll take that as a no then
 
 
2 hours later…
11:23 AM
Can't help but think that this is a troll name: stackoverflow.com/users/386562/julian-assange
 
 
2 hours later…
12:58 PM
crickets
 
1:16 PM
crick crick :)
Anybody got an idea about this issue? stackoverflow.com/questions/2428109/…
Encountered this one on my code, looking for a workaround...
 
@Ido From the question: ...I was adjusting some of the transforms and found that the bug does not occur if I just filter through an identity matrix... Have you tried that?
@BjornS He's here to let the world know the cold hard truth behind Android.
 
1:41 PM
@Markp
urrr, @MarkPeters, hehe yes, AndroidLeaks perhaps?
oh hey
@Ido, are you doing medical imaging?
I wrote my master thesis on Tricubic interpolation of MRI images, coded in java :)
 
@Markp - no, have not tried filtering through identity matrix, i will try that.
@BjornS - yes, but not stuff like you mention... just some applications/utilities/workflow for an NM scanner host.
 
thats incredibly odd though
 
why?
 
Hi, how can i place logout in .xhtml page of Richfaces?
anybody help me regarding this....
 
1:59 PM
well an identity matrix shouldn't affect anything, and the weird line shouldn't occur
my guess is that it is a flaw in the interpolation maths when A and B are identical.
I experienced similar problem when I was doing Tricubic interpolation
 
Agreed. that is odd. What did you do in your case? work around it?
 
2:16 PM
I wasn't able to fix it in time
 
hi, guys. does anybody have ready snippet to deep merge two java beans?
 
@Chupa check out Dozer
 
@mattb Thanks, will take a look
 
 
1 hour later…
3:31 PM
How would I make a thread wait until another thread has run for 10 seconds of CPU time?
 
run a timer with a callback that does it?
 
@AlexReece CPU time? There's no portable way in Java I don't think
@AlexReece Would probably need JNI or something
 
@MarkPeters yeah. The java management package offers a way to get CPU time for threads, but doesn't appear to allow me to wait
I can hack it ( a while loop around a sleep() statement ) but that sounds grossly inefficient
 
3:49 PM
@AlexReece Yeah and sleep() is not CPU time anyway. There's no guarantee the other thread had ANY CPU time during that period.
Oh I see what you're suggesting
Yeah what you are suggesting is probably the best bet. It won't be hugely inefficient if you don't need to be hugely precise...just schedule maybe 1 second sleep cycles.
@Alex try to make a habit of posting your question link here if you've already asked it on the main site
 
4:07 PM
@MarkPeters I just asked the question because there is no action on the chat. Sorry
0
Q: How would I make a thread join on another thread but only wait for n seconds of CPU time?

Alex ReeceotherThread.join( time ) appears to wait time in real milliseconds. I want to wait time in actual CPU time so that I can get consistent behavior within my application. I've done a quick look at ThreadMXBean but that doesn't quite seem to have what I wanted ( it tells me the threads actual CPU t...

@MarkPeters I was hoping to avoid having to do context switching.
 
 
6 hours later…
10:06 PM
Is anyone in here?
 
Hi
 
Hi mangst, do you have any experience with using Flex and Java?
 
No, sorry, I've never used Flex before.
 
ok, cool. I am a Flex / ColdFusion developer and was just starting to look for resources on how to make Flex talk to Java and what all you would need on the server side to make it all work
 
I thought that Flex was a Java technology?
 
10:11 PM
im just starting to look through google, but was just wondering if anyone had any good experience with it
no Flex is adobe
 
Oh that's right, Flex is like Flash.
 
right
 
You could probably just set up a Java web application using Tomcat and then send HTTP requests from Flex to the Java server.
You could write Java servlets to respond to the requests.
 
yeah, thats the parts im not sure about. I will probably use blazeDS to allow me to do remoting calls to the java backend, but I wasn't sure what else I would need
is tomcat free?
 
Yes, Tomcat is free.
I don't think you would need anything fancy to do this.
 
10:14 PM
yeah, I wouldn't expect so
 
You would just create a normal Java web application which runs in Tomcat
 
does tomcat run on osx?
 
The web application would have servlets which respond to the HTTP requests that come from Flex.
Yeah it does.
 
ok, cool
 
I think it's platform agnostic.
 
10:22 PM
you better hurry if you wanna use tomcat in OSX :P
java is being deprecated
 
well, I had seen that, but I wasn't sure what that would affect. I figured it was really only going to affect GUI apps like ecplise (which would definitely be bad for me) but I wasn't sure how that would affect server applications
 
Deprecated??
 
@RyanGuill yeah probably you're right
don't think that servlets have some platform specific stuff
@mangst didn't you hear?
it's like THE news lately
 
Is Apple going to stop supporting its Java VM?
 
Indeed
but the most probable thing is that Oracle is going to take over
 
10:27 PM
Oh, well that's not so bad then.
 
like they do with windows and unix
 
I was scared for a second! :X
 
no, but people tend to spread FUD quickly
don't worry dude
 
well help me understand this then, what is it exactly that apple is currently providing? the JVM?
 
yeah
custom parts, specially the UI stuff
 
10:28 PM
and then a J2EE platform sits on top of that and runs, like tomcat?
 
yeah, tomcat is not a J2EE platform
 
Tomcat provides an implementation of J2EE
At least of the Container half.
 
I really don't know what J2EE is
I mean, I do know
but it's like fuzzy and buzzwordy
 
its a misnomer you mean?
 
exactly
 
10:30 PM
so what would you call tomcat then?
 
There's two parts to a J2EE Application Server...the Container part that runs things like servlets and JSP and the EJB part which runs the EJBs.
 
I'd call it a servlet container
yeah, I'm not sure if tomcat has one of those
 
EJB == Enterprise Java Beans?
 
EJB containers
 
Yeah, Tomcat only has the Container part
 
10:30 PM
yeah, also EJB == crap
 
gotcha
 
Yeah, I hear less and less people are using EJBs
 
okay, so the servlet container though sits on top of and requires a jvm?
 
yeah, since it's written in java
 
Yeah, Tomcat needs a Java VM to run
 
10:32 PM
and things like jrun are servlet containers too?
 
never heard of tat
that
 
Neither have I
 
seems like a servlet container from adobe
Im sure it need the jvm too
 
okay, google says jrun is an j2ee application server
is there a difference?
coldfusion runs on top of jrun (from adobe) by default, but you can run it on other things too I believe
 
seems like a tuned tomcat that also runs coldfusion
 
10:34 PM
ok, cool
 
Tomcat isn't a full J2EE application server, it doesn't support EJBs
 
gotcha
 
well what do you need EJB's for? or put another way, is there things that I can't do with tomcat that I would need to?
im talking relatively simple stuff, basic classes, talking to a database, writing files to a filesystem, etc
 
You can do all that stuff with Tomcat.
 
10:36 PM
ok cool
 
actually
EJB are more like a "stack" solution
like ruby on rails
 
I don't know too much about EJBs, but I've worked on fully functional applications before that didn't use EJBs
 
you get the servlets, the db layer, etc
that's why people say it's bloated (and they're right)
 
so EJB's are sort of like a framework?
 
framework is also a misnomer
:P
 
10:38 PM
you wouldn't call rails a framework on ruby?
(I don't know much about it, I am just asking)
 
I would, yeah
would you call junit a framework?
or a library?
 
I think that once Java web frameworks like Spring became mature, people began to see EJBs as unnessary and bloated
 
ah, I see the distinction I think
 
That's my impression anyway
 
okay, I have access to a windows 7 box, would it be easier to work on it rather than osx for installing and working with tomcat?
im pretty comfortable in both
 
10:42 PM
I'd use OSX
just to avoid dealing with the crappy windows console
but, I haven't use windows for a while now so my opinion might be biased
 
Installing Tomcat just involves unzipping a ZIP file, so I don't think it really matters
But the Windows console is indeed crappy.
 
yeah, if im going to have to live in a console I would much prefer to be in osx
 
Then to start Tomcat, you run a shell or BAT script depending on your os
 
well im going to be using blazeDS, and im trying to figure out if it has tomcat in it already or if I need that separately
this page: adobe.com/devnet/livecycle/articles/blazeds_testdrive.html leads me to believe that tomcat comes with it, they call it a BlazeDS turnkey server
 
Looks like it does
 
10:50 PM
okay, so this page says this:
If you have downloaded the BlazeDS Turnkey ZIP file, unzip it to create a directory structure on your computer that contains all of the resources necessary to build your application.
Alternately, you can download and unzip the BlazeDS binary distribution ZIP file, which contains just the blazeds.war web application file and a readme file; you deploy the blazeds.war file into your application server.
so, what exactly is a WAR file?
is that what I would use if I already had tomcat installed? I put the war file into tomcat?
 
Yep.
A WAR file is just a ZIP file with a different extention.
When you drop it into Tomcat, Tomcat recognizes it, unzips it and starts the web application.
 
awesome, okay
 
All you have to do is start Tomcat, then copy the WAR file into the webapps directory.
 
well im thinking I just use the turnkey option
im hoping that would give me everything I need
okay, this line in the instructions: Make sure that the machine you are installing on has a Java Development Kit (JDK) installed and a JAVA_HOME environment variable.
how do I make sure of that on OSX?
 
Open a console window and type "echo $JAVA_HOME"
 
10:56 PM
nothing but a blank line
 
That means you don't have the variable set.
I think that you can set the variable by editing the .base_profile file.
 
okay, am I setting the variable on my bash profile for my console? or system wide?
 
It should be system wide
So setting it in your bash profile should work
 
hmm, i might need help doing that
I am following some instructions, but it doesn't seem to have worked
 
Oh ok, open the .bash_profile file in your home directory
 
11:00 PM
nevermind, I didn't read far enough that I had to close the terminal window and reopen it
 
Then add the following textJAVA_HOME=/path/to/jvm" to the end
Yeah, you have to do that
 
okay, im good now
is there an appropriate place to put this in osx? this says to put it in /Library, is that right?
 
I think that Applications makes more sense, but you can put it whereever you want
Applications is where I have my Tomcat installation
BlazeDS might be different, but to start Tomcat, run the "startup.sh" script in the "bin" folder
 
Applications in your user profile or at the root level? (might not be the right terminology, sorry)
 
That's at the root level--it's located at "/Applications"
 
11:04 PM
okay
so to run it, is it "./startup.sh" ?
 
Yes, you might have to modify its permissions to make it executable though
And then to shut it down, run the shutdown.sh script
To make it executable, you can run "chmod 744 startup.sh"
 
how do I know that I have a JDK installed?
 
Type "java -version"
 
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
 
So that means that you have Java installed :)
 
11:09 PM
alright, so I installed the blazeds in /Applications, and it has a /tomcat/bin folder underneath it
 
Oh wait a sec.
That means that you have a JRE installed, but not necessarily a JDK
So try typing "javac"
 
it gave me a usage help
thats good right?
 
Yeah, that means you have a JDK
javac is the command used to compile Java files
 
okay cool
right, I actually knew that I think, but its been a while
 
You can't compile anything with just a JRE. You need a JDK to compile Java programs.
A JRE is only used to run Java programs.
 
11:12 PM
right
okay, so I am in /Applications/blazeds/tomcat/bin/
and I type ./startup.sh start
and it says Cannot find /Library/Tomcat/Home/bin/setclasspath.sh
This file is needed to run this program
I have a setclasspath.sh in this bin, but it isn't in /Library/Tomcat...
 
Oh that's right, you have to make all .sh scripts executable
Because startup.sh references other .sh scripts
So run "chmod 744 *.sh"
 
okay, I did that, but it still gives the same error
 
This is BlazeDS you are running?
 
yeah
 
Ok, maybe they changed Tomcat around.
You might have to install it in /Library
 
11:15 PM
the installation instructions say this:
# To start BlazeDS on Microssoft Windows, open a command window, navigate to install_root/tomcat/bin, and enter the catalina start command. On OS X, UNIX, and Linux, enter ./catalina start. Optionally, on Windows you can navigate to the install_root/tomcat/bin in Windows Explorer and double-click the startup.bat icon.
 
Right, but didn't it say to install BlazeDS in "/Library"?
 
but if I run ./catalina start it syas no such file or directory and if I run ./catalina.sh start it says the same thing as before, can't find setclasspath.sh
let me look again
it talks like I can put it anywhere
even my desktop
 
But it suggested /Library?
 
well thats just where the error message says its looking
but even if I move it to /Library, the path still wouldn't be right
I wonder if there is a configuration file somewhere
 
Try just running "./startup.sh" without the "start"
 
11:18 PM
I really appreciate your help with this btw, you have been very patient and helpful
 
Thank you, no problem!
 
same output
 
Does BlazeDS come with an installation program or something?
 
no, everything im reading seems like I can just extract the zip
 
try typing "echo $TOMCAT_HOME"
 
11:23 PM
nothing, blank line
you think I need to add that to my bash profile?
 
I thought that maybe it would be set to /Library/Tomcat/Home, which is why it's trying to look for setclasspath.sh in there.
 
ah, actually I think I see the problem
 
What's wrong?
 
sweet, that was it
I had added these lines to my profile:
export JAVA_HOME=/Library/Java/Home
export CATALINA_HOME=/Library/Tomcat/Home
whatever catalina is it is what it says to run
but I got those lines from another tutorial that I guess expected I was installing tomcat in /library
fixed that and now it seems to be working
 
Ahh ok, excellent
 
11:28 PM
sweet, the samples are working
 
cool!
 
yes, very cool
you have been a great help, is there a way I can give you reputation for this?
 
thank you! hmm I don't know
i just found out about this chat thing a few days ago
 
yeah, same here
 
i'm glad that you got it working
 
11:31 PM
yeah, and it seems to walk me through the rest on how to start setting everything else up
so let me ask you this though
so I am going to go to eclipse and create a new java project, write my code and all that, and I guess im going to tell it to compile it to a certain location?
is there a specific place I should put it or will tomcat be able to find it wherever?
 
You don't want to create a new Java project
 
oh ok
 
You want to create a new Dynamic Website project or something like that
That is what you can use to write J2EE applications.
 
ok
im opening it up now to see what my options are
 
Then, there is a "Server" view.
You can add your Tomcat installation to this and Eclipse will deploy your web application and let you run Tomcat.
 
11:34 PM
awesome
 
yeah it's integrated nicely
 
how can I tell for sure what version of tomcat I have?
 
Run "./catalina.sh version"
 
Server version: Apache Tomcat/6.0.14
awesome
is that a fairly new version?
 
yeah that's pretty recent
the latest version is 7.x
 
11:37 PM
ok cool
 
Scratch that: the latest stable version is 6.x, 7.x is in beta
 
oh thats sweet, I can start the server directly in ecliipse
 
Yes, just make sure to restart the server any time to make a change to your application in order for the changes to propagate down.
 
so everytime I compile?
 
Yes
 
11:40 PM
ok, very good to know
on osx, how can I extract a war file?
nevermind, I found it
open with - duh
 
haha
The default extractor program works
 
yeah
okay, what is the difference between an EAR and a WAR
 
I think that EAR is for EJBs.
I've never worked with EARs before.
 
ah, okay
alright, so I created a Dynamic Web Project
do I put my code where it says Java Resources: src ?
 
Yes your source code goes in src.
Then, basically everything in WebContent gets deployed to Tomcat.
The compiled class files go in WEB-INF/classes, this is a J2EE standard.
 
11:50 PM
okay, so this thing started something listening on localhost:8400
is that tomcat itself I guess?
 
Tomcat runs on 8080 by default, but maybe blazeds changed that.
 
okay, so here is possibly a stupid questino
 
Haha no problem!
 
but I am looking through here and under the tomcat directory there is a /webapps/samples directory with a bunch of different directories underneath it
that samples directory has a WEB-INF
 
Yes, samples is a web application
I think that BlazeDs said that it came with sample apps
 
11:53 PM
how does tomcat know that WEB-INF directory is there and to look there for executable code?
 
That's a J2EE standard--all J2EE apps have a WEB-INF directory.
 
in other words, if I create a test/WEB-INF/ project, will it just pick that up automatically? or is there something I need to edit?
 
You also need a deployment descriptor, which is a file called web.xml
Eclipse should have created a default one
 
yeah, thats in the WEB-INF
but is there another file that I need to tell tomcat that there is a new WEB-INF folder with a web.xml file?
 
Yes, this file specifies things like the application's servlets and login information.
No, Tomcat will see that there's a new directory or a new WAR file in the webapps directory and it will automatically start the application.
 
11:56 PM
oh really? automatically?
 
yeah, you don't have to run any commands or anything
 
thats awesome
 
it listens for changes to that folder
 
sweet
but it would need to be underneath the tomcat directory though right?
 
yeah, the application has to be under TOMCAT/webapps
 
11:58 PM
ah, gotcha
okay, so what do I need to do in my eclipse project to tell it to put my stuff in that webapps directory?
 
But if you make any changes to the application's source code and the class files need to be recompiled, then you have to restart Tomcat.
 
right
do I just change the default output folder?
 

« first day (3 days earlier)      last day (4923 days later) »