| |
| |
| |
|
Page: 1 2 3
Comments:
<0> I have a loop in which I create a new Thread (and start it) upon at the end of each iteration. The trouble is, I do not want to start to start the next iteration of the for-loop until the thread is completed. Any ideas please? (Java 1.5) <1> use signaling (wait/notify) <1> or what the new 1.5 concurrent package offers you <0> _kmh_: are you talking about the join thing? <1> no <1> i'm talking about wait/notify as written <2> join sounds good. something wrong with that? <2> tiggger? <0> sorry, I'm reading up on wait/notify <1> http://www.javaworld.com/javaworld/jw-10-1998/jw-10-toolbox.html <0> I've read about this before and not gotten anywhere, hopefully I will this time =] <2> "Waits for this thread to die." sounds good. <0> thanks <2> tiggger: have you tried Thread.join()? <0> ahh, thanks I'll read that <1> actually join is a special case of wait/notify
<0> Clackwell: I did try it once but I couldn't get it to work actually <0> I see <1> make sure you call join of the right object if you go that route <2> tiggger: http://rifers.org/paste/show/1496 <2> test cases++ <2> bye <0> Clackwell: thanks , i'll take a look <0> bye <1> tiggger : join is easier for your case than to setup your own signaling <0> _kmh_: thanks, i'll try fiddling around with this example and seeing what I come up with <0> while I'm here, how easy is it to use/setup a debugger? I've been coding java for a few years now, and have never used a debugger. My programmes are getting quite big now, and simple trace statements don't appear to be that easy to follow anymore. <0> and can you recomment anything. I've heard of jdb <1> the easiest is to use an integrated debugger from an ide <3> are you're cl***es getting huge? <3> if so design them better, else carry on without a debugger <0> they are quite big, and honestly could do with being redesigned a bit, but I've no time for that just now. I'm not desperate for a debugger, just curious. Plus I think employers are interested in people that use debuggers. <0> perhaps I'll forkout for the full version of Jcreator---I think it has a debugger <1> tiggger : netbeans, eclipse, jbuilder foundation all come with an integrated debugger (and are free) <0> _kmh_: thanks, maybe i'll switch to eclipse, I hear a lot about it <0> it would be nice just to see the values of some variables at runtime, rather than having to quit the program, insert some trace statements and recompile/execute <4> sal <4> care ma ajuta si pe mine cu ceva <4> ? <4> pls <0> thanks for the advice _kmh_ <5> after i have installed JDK 6 Beta 2 AMD 64, i go into Command Prompt and type javac HelloWorldApp.java (in the created directory c:\java with the HelloWorldApp.java file in) but windows does not recognize the commad. can anyone help me. <6> is it in your path? <5> yes <6> javac -v gives you what <5> ill try <5> the same not recognized. <6> apparently it's not in your path after all <6> for whatever reason <5> when i do "dir" its in there <6> where? c:\java? <5> yes. <6> erm <5> im running XP x64 <6> javac should be in c:\java\bin then <5> no im entering javac as a command in the command prompt <5> c:\java just has my hello world app in it. <6> Where, then, is javac <5> oh right i should run it from the directory when it is installed? <6> no <6> but the directory that has javac should be in your path <5> ok ill go try 2 secs. <5> same.. <5> can you run me through exactly what i have to do.. <2> Rip_UK: http://javafaq.mine.nu/lookup?67 <5> ill have a look through that Clackwell thanks. 2 mins. <2> Rip_UK: when changing env vars in control panel/system, make sure to open a new instance of cmd.exe via start/run... <2> (anything else might not work correctly) <5> yes i was going to start.. run.. cmd <2> Rip_UK: pastebin.com the output of this: echo %PATH% <5> ? <6> Rip_UK: open a command shell, then run "echo %PATH%" -- without the quotes <2> copy and paste to that site...then post url here <6> and then tell us what it says <5> ok <5> c:\windows\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem <5> is that right?
<2> Rip_UK: where is the java bit in that? <5> im not sure what im doing here <2> Rip_UK: go to control panel again and check the environment variables again. <2> Rip_UK: why are you unsure? you are running a 64 bit operating system, you should know a bit about operating systems. <5> where do i find the environment variables <2> Rip_UK: see above link, it explains <5> ok <2> [19:48] <6> is it in your path? [19:48] <5> yes <5> sorry i thought he meant something else. <5> im new to this ;) <6> why the **** are you running a 64-bit machine? <5> lol <5> why not <5> NZXT Nemesis (White) <5> Digimate 17" TFT Monitor (White) <5> Msi K8n Diamond Sli <5> AMD 64 4400+ X2 With AS5 <5> BFG 7800 GTX OC <5> 2GB (2 x 1GB) OCZ Platinum PC3200 <5> 300GB Maxtor Diamondmax 10 SATA <5> NEC ND45550 16x DVDRW +/- & DVDRAM <5> Enermax Liberty 620W <5> SoundBlaster Audigy 2 ZS <2> dude... <5> sorry. <7> lofl <2> kick*** machine, laughable monitor, screams for a knowledgable operator <5> ;) <5> i cant find the environmental variables in control panel , system <2> Rip_UK: well...keep looking <2> i have never seen xp64, so no clue if it looks the same. <5> not in here i dont think <6> somewhere the god of pebcak is smiling down upon you <6> "See that guy? He's my poster child." <7> right click MyComputer ->Properties->Advanced <5> no advanced they're <7> sad to know that <6> "no advanced they're"? <6> Oh my <7> lol <5> advanced tab <5> hehe <5> ****. <8> no advanced they are? are you trying to be yoda or something? <5> there it is <5> lol <6> I think you've just done absolutely horrible things to the english language. <5> took me a while. <7> scots usually do that <6> on behalf of the engrish lanjuage I smite thee <5> if there is no path in user variables do I add it in? <7> if you set it system then all users get it <7> you got one of those exploding dells didn't you? <5> lol saw them in the paper <6> sabre: we can only hope <6> *boom* *#java's pain goes away* <7> http://www.boingboing.net/2006/07/28/dude_your_dell_just_.html <5> ok i have just added C:\Program Files (x86)\Java\jdk1.5.0_08\bin to the right of the text in Path in System Variables <7> that's what happens when you don't set your path correctly <6> hahaha <7> you sure? :) <5> hmm <7> Rip_UK you might want to give the java tutorial a look <6> you may want to give "computers for dummies" a look too <5> oi <7> hehe <5> thats where i was looking the java tutorial <5> yay <5> thanks guys. <5> cya <9> Hi, im kind of new at this. How can I iterate a Hashtable? <10> Get the keys, walk through them. <9> the thing is, i don't have the keys, that's why i need to iterate them <10> for (Object key : tehTable.keys()) { Object thing = tehTable.get(key); }
Return to
#java or Go to some related
logs:
usershare: usershares are currently disabled #linuxhelp #java #c++ #gentoo #AllNiteCafe #MissKitten #linuxhelp #teens #chatzone
|
|