| |
| |
| |
|
Page: 1 2 3
Comments:
<0> imagePath.OS_PATH = "/"; <0> System.out.println(OS_NUM); <0> } <1> Because you need String.equals() instead of the '==' operator? <0> Thank you. <2> or you could use the provided system properties which identifies the proper separator... <0> Oh <0> any idea what that is? <0> I will look on System cl***. <2> http://java.sun.com/docs/books/tutorial/essential/io/file.html <0> sweet thanks <2> np <0> File.separator , can it be that easy? LOL <3> if (OS.equalsIgnoreCase(LINUX)) { would do it. <3> Or simply don't create a LINUX var and do: if (OS.equalsIgnoreCase("Linux")) { <0> thanks dom
<4> Roan - you can also use File.seperatorChar <0> so when creating the string String PATH = System.getProperty("user.dir") + File.seperatorChar + "pics"; <3> What do you want to do exactly ? <0> I can get the path with System.getProperty("user.dir") of the directory the program is in, I want to add to that path a folder in the program folder called pics <3> String PATH = System.getProperty("user.dir") + "/pics"; <3> On windows it'll work, but i guess you use linux ? <0> right but it would change when on a on a linux <0> I want to build to be cross platform <3> on linux it's \ ? <0> right <0> this is what I did and now it works, based off of MbGones suggestion <0> public static String tempLocation = progLocation + File.separatorChar + "pics" + File.separatorChar; <0> MbGone: thanks that worked good. <3> Why the separatorChar after ? Shouldn't it be between the two folders ? <0> well its whats in that folder I need <0> see my java program goes out to and ftp site, downloads the pics I want into that folder and then the java program alows me to view them. <3> You could have used, in the linux if instruction: imagePath.OS_PATH = "\"; (it's the code for \) <0> I am building a Network Camera Archive viewer. I have about 30 cameras and all of them dump images to my ftp server <3> Kk <0> right but this way it does for either windows of linux. <5> you probably want to use the File or URL cl***, makes it a lot easier to deal with filenames. <3> Yes MbGone's way is simplier indeed. <0> Thanks Lion-O, I will read up on that thanks. <4> evening all <6> please visit http://www.1explore.com and click on google ads, your click will help finance the education of poor children in the philippines <7> hi <7> Exception in thread "main" java.lang.Error: Unresolved compilation problem: <7> Syntax error, annotations are only available if source level is 5.0 <8> hi. is there any way to read the contents of a folder? <7> any ideas for this error? <9> evening <8> hullo rob <8> rob, is there any way to read the contents of a folder? <9> the files and directories you mean? <9> or its attributes? <8> the files present in that dir <9> File("c:\temp").listFiles(); <8> what does it return? <9> an array of File <9> http://java.sun.com/j2se/1.5.0/docs/api/ winhelpversion: http://www.allimant.org/javadoc/index.php <8> i see thanks <9> a File can be a directory or file <9> so check file.isFile() to determine what it is <8> ok.. thank u very much <4> hey rob <9> hey <4> how goes it? <9> fine <10> dispose of JFrame hangs JVM. What may be wrong ? <9> no exceptions? <3> Nothing. <9> did u set exit on dispose? <9> myFrame.setDefaultCloseOperation(EXIT_ON_DISPOSE); <10> no <10> Rob_uknow: was that for me ? <9> yeah <10> no <10> I run dispose() as part of application shutdown <9> try it <10> it will work <9> dispose only closes the frame
<9> the app continue's to run <10> I think it will work <10> myFrame.setDefaultCloseOperation(EXIT_ON_DISPOSE); <10> but I also have to close application from another command <10> e.g from console <10> and dispose() hangs there <10> I have thread dump, can post it <4> [algo] - what exactly are you trying to achieve ? exit the application? <10> yes, gracefully exit it <4> ok, so whats wrong with what Rob's told you? <4> as soon as you close the frame the application will exist <9> exit <10> because application is closed from another command <10> not from window close <9> so? <9> then call System.exit(0); <10> damn <10> I want <10> (1) graceful exit <10> (2) not after window close, but called by special command <10> currently I just destroy() all beans <10> everything is fine, bug dispose() hangs <10> http://eugeneciurana.com/pastebin/pastebin.php?show=1563 <10> that's the dump if it helps.. <10> maybe I should just remove dispose() call.. <9> dispose is just for letting the frame dissapear <9> not to terminate the application <9> looks like a threading issue <4> heh, you got the words out of my mouth... <9> one thread messing up the other <10> yeah looks like that.. <10> how should I terminate swing ? <10> or just forget it ? <9> why are you using the spring framework? <9> do you call destroy yourself? <10> no <10> spring calls it <10> I'm using Spring framework cause it makes my code simpler <9> does it? <9> it looks like its not helping here <10> there's some problem with destroy yes.. <9> and I wouldn't be supprised that you aren't using it correctly or that spring is actually the cause of the problem <10> I don't understand, because I miss some points about Swing functionality <9> I also see that you use a beta version of java 1.6 <10> beta ? <9> yes <10> yes <10> 1.6.. <9> nevermind, its b for build <9> not beta <9> calling destory seems dangerous to me <10> I let spring destroy JFrame when it decides <10> should I somehow control it ? <9> the whole problem starts with SimplePostFrame calling destroy <10> yes <10> if I remove dispose() there, everything seems fine <10> just remove dispose completely =) <10> but I miss what's up =) <11> hi <9> hi <9> state the nature of the java emergency? <12> i'm out of coffee <9> starbucks time? <11> could anybody tell me a good book on java? <12> that sends me to the bathroom too fast. dunkin donuts. <9> Snootrs Thinking in Java is good <9> and you can download it free of buy the paperback in the stores <9> for free <11> i can download it for free? <9> I think thejavatutorial.com should be enough <11> where? <9> www.mindview.net has a thinking in java download link <9> its boring material perhaps <9> but its does cover the basics in a didactic manner
Return to
#java or Go to some related
logs:
draw circle c++ console * debian error while loading shared libraries: libSM.so.6 #MissKitten linux cfgengine phpMyAdmin Timeout #linux mysql is dividable #linux #MissKitten sladeen
|
|