Quick question (I think...Ihope)

I'm trying to do something I thought was simple, but apparently it's not simple enough.
I'm on linux and I'm trying to write files to the current user's /home directory? Anyone know how I can do this? I was looking into System.getProperties.. but I'm not getting anywhere. Any tip would be greatly appreciated. Thanks --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

From the API for "System.getProperties()"
The current set of system properties for use by the getProperty(String) method is returned as a Properties object. If there is no current set of system properties, a set of system properties is first created and initialized. This set of system properties always includes values for the following keys: Key Description of Associated Value
java.version                Java Runtime Environment version
java.vendor                 Java Runtime Environment vendor
java.vendor.url           Java vendor URL
user.home                  User's home directory

Similar Messages

  • Quick question ( I think)

    I have written a class of static methods that converts a bunch of stuff (like weight, height, temperature, etc).
    In another class I am supposed to initialize name, gender, age, height, weight, if the person drinks, smokes, and exercises...I've done that part. I'm now where i have to write a method that calculates a person's BMI (person's weight in kg divided by the square of his/her height in meters). The weights are supposed to be input from the user in pounds, and the height as inches. How would i use the conversion class in the BMIcalculator method?...
    would this all be done in the main/driver class?...I think i know how to do it that way.

    getting illegal start of type error on the second if statement here...
    public int computeHealthIndex()
            int index = 10;
            double bmi = 0;
            bmi = (weight / (height * height) );
            if(bmi <= 25)
            index = index - 0;
            if(bmi >= 25 && < 30)
            index = index - 2;
            if (bmi >= 30)
            index = index - 4
            if (smok = true)
            index = index - 2;
            if (drink = true)
            index = index - 2;
            if (exer = true)
            index = index + 2;
            return index;
        }getting the error at this: if(bmi >= 25 && < 30)
    index = index - 2;
    ...any idea why? like my usual stuff..it's likely a silly mistake, but i can't see it.

  • Quick Easy Question- I think...

    If you have 15 expressions, concatenated by Boolean OR's, how many of the expressions must be true for the entire thing to be true? My friend and I are arguing whether the answer is...
    a. at least 1
    b. all of them
    c. cannot be determined
    Thank you so much for your input. We are studying for an exam, trying to finish the practice questions. I appreciate any input and your time!! :-)

    Hi,
    Programming languages are created by humans, and therefore it is usually pretty easy to answer such questions. Think about the human language..
    Do you have a car or a house or a space ship?
    Any one who owns a car or a house would answer yes, even if they didn't own a space ship. That is, the whole expression evaluates to true if one of the statements is true.
    /Kaj

  • Quick Question re Data Source

    Hi
    I have a quick question re datasource login.
    I havent touched my Crystal Reports for about a year. Since I created the reports (which users have been using through Crystal Reports server) I have changed my PC.
    I need to make a change in the formulas of the reports so I have reinstalled Crystal Reports 11 onto my PC and opened the reports. The forumula change is simple but I am having a nightmare with the data source login. The report runs against an SQL database. From memory all I did the last time was create an ODBC connection on my PC (which used the the SQL login sa account) and configured the reports to use that ODBC connection. When I open the report it asks me for the data source location which I tell it to use the one I created and the report runs fine.
    If I close Crystal Reports and and then re-open, I press F5 to run the report and it gain asks me for the data source credentials.
    Any ideas, I'm sure it is something simple I am missing?
    Thanks

    Guys
    Thanks for your help
    Ive managed to fix it but not really sure how although I'm sure a few of the things you have mentioned is what I have done.
    I basically restored the reports from last nights backup (before I did the changes), re-did the changes and saved and now it seems  to work. I think the difference here is that I had created the odbc connection prior to changing the reports - if that makes sense?
    What I would like to do is fully understand how this data source connection works.
    Don, when I open the report now and hit f5 the report presents me with the parameters and not the database login screen as it was doing before - how is this? What credentials is it using? The SQL sa account (which I configured the ODBC connection to use) or is it my domain account of which I assume permissions for this account must be set on the actual SQL database?
    As you and Jeff suggested when I look at the datasource connection screen it shows "trusted Connection: 1" - what does this mean and how is this configured, have I configured this in Crystal somewhere?
    Thanks
    Andy

  • IMovie - quick questions about video files when importing and optimizing

    Hi, have some quick questions. I think they are simple.
    1. When I import a video (from say iPhoto), where does it get "Move" or "Copy" to?
    2. Why would I want to do "Copy" instead of "Move", because isn't it then taking up more space?
    3. I'm wondering if after I optimize a video, I can stash away the original (non-optimized video that I either "Move"d or "Copy"d earlier) into an external hd.
    4. By the way, what is the new file name of the optimized video?
    Though things are working fine in iMovie and iPhoto, I'm trying to manage hard disk space, and hope answers to these questions will help.
    Do you guys have a guideline on how to manage hard disk space when it comes to iphoto and imovie?
    Thanks.

    As has been suggested you can encourage people to download QuickTime player by doing something like this...
    http://www.mirroroftheuniverse.com/Songs.html
    You can also present your songs like this...
    http://roddymckay.com/Satellite/JukeBox.html
    This is a SnoCap jukebox and you need an account to use it but you'll get the link to ESnips on the above page.
    A 3 minute song has a file size of about 30 Mb in AIFF format. Converting it to MP3 reduces it to about 3.5 Mb and M4A to about 5.5 Mb.
    iTunes will do these conversions for you and M4A is far superior to MP3 as far as sound quality is concerned.

  • Some quick questions before I purchase LE8..

    Hi all,
    I'm a longtime mac user and I just got into music production. I plan on mainly making Hip Hop beats and also record me playing bass on sampled tracks. I have already purchased an audio interface( PreSonus Firebox 6x10) and some monitors (KRK RP5's). I'm going to be purchasing LE8 and a MIDI keyboard soon, as well as a turntable for sampling vinyl sometime this week.
    I got some quick questions though. If I'm loading samples off vinyl into the ESX24 sampler in LE8, what program can I use within LE8 to cut the desired parts of the sample? Then assign them to my MIDI keyboard or Akai MPD24.
    I plan on hooking everything up to my 2.16ghz w/2MB Macbook and was wondering if it could withstand Logic. Also, will I need to update any drivers for the firebox? I remember reading problems about it working with Logic.
    Any help would greatly be appreciated. If any Hip Hop heads here have any tips/ suggestions, lemme know!
    Thanks,
    JC
    Message was edited by: sonofabass

    I'm not a big expert on audio recording, but other than the video card (which would not be a big factor for audio) you can't really upgrade it to much further than what you specified. You could increase the internal storage, but I've always been inclined to keep most of my personal files (things I am not actively working on now) on an external drive, and keep the OS, applications, and my current ongoing work on the internal drive, along with plenty of free space. I think that improves performance. If you did get the larger internal storage option, you might consider partitioning it into two volumes. You could keep your OS, apps, ongoing work, and that free space on one volume, and use the other volume for the long-term storage of your user files. Or maybe for your audio work, it is better to have a separate volume that is a dedicated +scratch space+, so if you had the larger internal drive, you can use that space more flexibly.
    One other consideration is the CPU speed. There is really very little difference between 2.93 GHz and 3.06 GHz. It's about 4%, but in the real world, the performance difference is probably even less. So you could trade the $150 for the slightly faster speed and get the extra internal storage for $100, saving you $50.
    Also, the online store has a page for clearance and refurbs (Special Deals). For example, this one is currently listed
    http://store.apple.com/us/product/FB419LL/A?mco=MjE0NDk5Mw
    It is the current gen iMac model. Note: Many of the items on the Special Deals section are previous generation Mac models (so keep that in mind if you look at other listings). My current iMac is a refurb. In my experience, the one Mac and two iPods I have purchased as refurbs have looked new. They just come in a plain brown box instead of the fancy retail packaging. The warranty is the same as new.

  • Some quick questions before purchase of MBP

    Hey Guys/Gals,
    I've been a PC user all my life, but will now be making a permanent switch to Macs. I've been wanting to buy a MBP since they have been released, but have been hesitant (like many others I think...) about the issues of whine, extreme heat, warped screens etc...
    With the recent updates of the logic board and even battery, I think I'm ready to go for it. I just had some quick questions before I place my order:
    1. I could order my MBP from the computer store at my university. Do you guys think that will get me the newest possible MBP or will they maybe get me one that they have had in stock for ages? I really don't want to get stuck with an outdated logic board and/or battery. Is it safest just to order directly from the site?
    2. Although the issue with really hot MBPs seems to have gotten better, I am still quite shocked that people say that temperatures well above 70 Celsius are "within spec". I understand that Apple officially states this and that the Intel chip can handle up to 100 Celsius, but this seems crazy to me Basically, I want to ask if I am correct in my observations that the new Intel chips don't get much hotter than other chips around, but rather Apple has chosen to set the temperature mark that sets off the fans pretty hight (around the 70s if I remember correctly?)
    I would assume that in following their "mission" of creating beautifully designed computers, Apple also wants to have a really silent one. Now I'm all for a quiet machine, but I feel as though if fans were on either (a) all the time or (b) when the CPU reaches the high 50s lots of people would be happier.
    Anyway, it's just a thought. I noticed there are lots of experts around here, so I'm just interested to hear what you guys think about this approach that Apple seems to have taken. I don't think the heat will stop me from getting this amazing notebook, but it certainly is a little frustrating.
    Any responses are greatly appreciated.

    1. I could order my MBP from the computer store at my university. Do you guys think that will get me the newest possible MBP or will they maybe get me one that they have had in stock for ages? I really don't want to get stuck with an outdated logic board and/or battery. Is it safest just to order directly from the site?
    No matter where you take possession there's no assurance of when the machine was manufactured. There is really just as good a chance of getting a perfectly good computer regardless of place of purchase. If there is a problem it's covered under warranty. You can have the computer replaced within the first two weeks. Afterwards they will replace or repair. Without Applecare's extended warranty the computer is warranted for one year after purchase.
    2. Although the issue with really hot MBPs seems to have gotten better, I am still quite shocked that people say that temperatures well above 70 Celsius are "within spec". I understand that Apple officially states this and that the Intel chip can handle up to 100 Celsius, but this seems crazy to me Basically, I want to ask if I am correct in my observations that the new Intel chips don't get much hotter than other chips around, but rather Apple has chosen to set the temperature mark that sets off the fans pretty hight (around the 70s if I remember correctly?)
    You are wrong in your assumption. The Core Duo's maximum temperature is 125C before shutdown. Normal operating temperatures according to Intel's own documentation is 50-70C under average load. MBPs under heavy load will typically reach core temperatures over 80C. Then there's the added heat from the hard drive and GPU. The aluminum case acts as a partial heat radiator hence the case temperatures can get high. The MBP User Guide specifically states this and issues a warning about using the computer on one's lap.
    I would assume that in following their "mission" of creating beautifully designed computers, Apple also wants to have a really silent one. Now I'm all for a quiet machine, but I feel as though if fans were on either (a) all the time or (b) when the CPU reaches the high 50s lots of people would be happier.
    In fact the fans in the MBP are very quiet at least mine are. Unless you are in the hardware design business with intimate knowledge of using Core Duo chips in portable computers, then your observations, although certainly your opinion, are not based on anything factual.
    Anyway, it's just a thought. I noticed there are lots of experts around here, so I'm just interested to hear what you guys think about this approach that Apple seems to have taken. I don't think the heat will stop me from getting this amazing notebook, but it certainly is a little frustrating.
    More likely there are a lot of people around here who think they are experts. As the remark goes, "An 'expert' derives from ex, meaning 'has been', and spert, meaning 'drip under pressure.'"
    You'll read lots of opinions on these forums. Don't take for granted that everything you read is factual or truth. A lot of the opinions expressed are without any basis in fact.

  • Quick question (why is this happening)

    i'm working on a draggable background with boundaries and had
    a quick question for you guys that know way more than me about
    actionscript... any help will be greatly appreciated.
    i have a draggable movie clip and set up boundaries for it,
    and they all work except for when you drag the MC to the extreme
    left/bottom corner... the left boundary stops working as soon as it
    hits that direct corner..
    see for yourself:
    http://www.liquid-creative.com/testing.php
    my code is below... any thoughts?

    hm... well I think what you really need to get out of the
    dragging step is the vector of the object when the object is
    ‘released’?
    I suppose you could use the actual startDrag()/stopDrag
    methods to do the dragging work for you and then add on to it.
    Perhaps while the mouse is moving, keep track of (and update) the
    values/vector of where the mouse was 1 ‘movement unit’
    before (1 frame before I presume), then when stopDrag() is called,
    at the same spot, subtract the current vector from the vector
    stored and use the result for calculating inertia.
    (Note that I don’t have flash in front of me so this
    actually coming from my head, -someone may have a better
    method)

  • Quick question from future mac user

    Hi there.
    Just a quick question about the Intel iMacs.
    Total noob with Macs so please forgive me, I'm looking to get away from Windows and PC's but not sure what I would need exactly.
    Would the 24":3.06GHz Intel Core 2 Duo iMac with 4GBs of RAM and 1TB hdd be more than enough to handle video/audio editing with Final Cut Pro Studio, some gaming (such as newer MMO games or RPG/FPS games) and maybe running VMware Fusion for running Windows apps and games that I have/use that are either not available or not yet supported by Apple?
    Or would I be looking at goin with the Mac Pro?
    I'd rather shoot for the iMac because I'm SO tired of PC's and boxes and would like my computer to actually look nice as well as kick butt. But I'm just worried that if I got with the iMac I won't be able to perform those functions well or at all.
    I love the look and feel of the iMac although I don't think you can get more than 4GBs of RAM or more than ONE hard drive inside (which isn't a big concern as I can always use external drives) so I'm just wondering if upgrading to the extra ram and hdd space from the get go would be a great help without having to worry about adding more later.
    I'd like to be able to just use the iMac than the Mac Pro because the price difference seems to jump up quite a bit between iMac and Mac Pro. I'm just worried if that type of iMac setup wouldn't be enough for what I need.
    Any suggestions or information would be greatly appreciated. Thanks.
    Janin

    The iMac in general is more than enough to perform those tasks well however the Mac Pro still has it's advantages. Lenn already went over those so take a look at these speed scores as they may help you to make your decision.
    http://www.marketingtactics.com/Speedmark/
    Either way I recommend getting the base RAM configuration from Apple and purchase RAM from OWC.
    http://eshop.macsales.com/item/Other%20World%20Computing/6400DDR2S4MP/
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=284&type=Memory&TI=0 655&shoupgrds=Show+Upgrades
    George

  • Simple Quick Question

    wrong section, post was moved.
    Message was edited by:
    Rob17

    you titled "simple quick question"...
    .. complicated to answer..
    a) the TermsOfUse of the iTS don't allow any processing of purchased files, these are "copy protected"..
    b) iM has a voice-over function..
    c) iM is a video-edit app.. easy to use... just learn to handle it...
    d) iM allows to "extract" audio (=muting the original audio, adding your own..)
    e) to learn iM, spend some time here: http://www.apple.com/ilife/tutorials/imovie/index.html
    f) use pencil and paper first! WRITE and scribble, what shall happen when in your movie/parody... make a script, draw a storyboard .. THEN launch iM.. in other words: think first, then edit.. iM is just a tool, it does not "create"... Picasso needed a papertowel and half a stencil to create art....
    g) to get comfortable with iM, start with your own, small, short (3min!) project... import some stills, edit them, add a funny voice-over, add sounds, add music... good? make a bigger one...
    h) .. in our Lecture II, we teach you how to import shows from TV, youtube, wherever..
    standard disclaimer:
    be nice to ©opyrights ...

  • Quick question on potential Ti-4400 Problem

    Hi all,
    I think I am having some problems with my mobo and just wanted to ask a quick question...
    On my old box, I had major crashing problems when I put the Ti-4400 in while in the middle of 3D games.  I'm almost certain this was due to overheating.
    New rig...many fans!  Everything seems pretty cool.  However, among other problems I am having since putting this new setup together (onboard audio crashes, reboots while using IE, etc.), I am having crashes in the opening intro video to various games.  My recollection is that this is just crappy rez vids that don't tax the video card to nearly what the actual gaming should.  Does this sound right to every/anyone?  I don't seem to have any great problem during heavy 3D use (or 3dmark, etc.).
    Thanks.

    Currently I have actionPerformed method in the editor and an actionPerformed method attached to each button.Well, you should create an Action. The Action can be shared by both a menuItem or a button. Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html]How to Use Actions for more information.
    should the listener be an innner class of the Editor class or an external class.Whether the Action is an inner class or external class doesn't really matter as long as it is a separate class.
    If the Action is unique and will only be used by the parent class, then making it an inner class can simplify coding since it has access to the variables of the class.
    If the Action is more generic and might be able to be used by multiple applications then it should be a separate class so you have code reusability.

  • 3 quick questions - Auctions

    Hello everyone, I just have 3 quick questions based on our customer needs:
    1 - Can the bid in a LAC (auction) be done in percentage and not in currency?
    2 - Using lotting, can the bid be on the lot itself instead of the itens?
    I mean, if I have done lotting with 4 itens, and the total of the lot is 500 USD for instance. Could the bidders bid on this lot instead of the itens (I would like to 'hide' the itens from them)?
    3 - Is the bid value from the auction winner replicated to the origin RFx?
    I mean, lets say on my original RFx we have 3 bids:
    1 - Vendor 1: at 8 USD
    2 - Vendor 2: at 10 USD
    3 - Vendor 3: at 6 USD
    Then, I decided to create an auction between vendor 1 and 2, and the winner is vendor number 2, with 5 USD.
    The next step is to create the Contract or Purchase Order, but is the 5 USD information sent to the RFx?
    Assuming I want to create the Contract or Purchase Order in SAP ERP, normally you create these documents based on a RFx response.. but if I have the 'old' bid on the RFx as the responses, how can I create the Contract with the auction winner price?
    Thanks for any input!
    Regards,
    Ricardo Sancio Lóra
    Brazil

    Responding myself, I think questions #3 is not possible based on this phrase from SAP documentation: "After conversion, the RFx is set to the status Completed and no further changes can be made to it."

  • AVCHD-2 quick questions

    I know that AVCHD isn't considered a good format to record in with it's GOP and all, but I have two quick questions about it none the less.
    1. Is AVCHD a HDD camera format only, or can it be recorded onto mini DV tapes or P2 cards?
    2. I know that FCP 6 got AVCHD support in 6.0.1, but is there a way of using AVCHD files in FCP 5.1, say with MPEG Streamclip, VisualHub, Compressor, or even Quicktime to transcode the files for 5.1?
    Thanks for the help,
    -Brian

    HDV is Long or Short GOP....AVCHD, as far as I know, does something COMPLETELY different. I don't know what that is, but I didn't think it was GOP.
    1. Thus far it is HDD cameras only. MiniDV tapes are used for HDV, and P2 is strictly DVCPRO codecs (25, 50, 100). No camera that I have seen employs a tape or P2 mechanism.
    2. The only way anyone got those files to work (again, AFAIK) was to use the PC software that came with the cameras and extract the video that way, then export it out as QT files from there.
    Shane

  • Report Generation Toolkit Error Quick Question

    Hi,
         I created the most awesome LabVIEW report ever at my desk using a trial version of the RGT and Office 2003.  I took this to my production machine and ")@#(&%(*#^%()^!!!"  The production machine has office 2007 and a fully licensed version of the RGT.  Both machines have LabVIEW 8.6.0.  I've read all the stuff about these errors and something about classes and dll's and whatnot's.  So my quick question, is:  Instead of matching the versions of Microsoft Office as recommended, can I just rewrite from scratch the VI that creates this world's most awesome LabVIEW report on the production machine to create the same effect? 
    Solved!
    Go to Solution.

    Hi 
    Quick Answer: Probably
    Slower answer: Microsoft changed a lot of things behind the scenes in Office 2007, but the Report Generation toolkit version 1.1.3 supports Office 2007 so you should be good to go. Depends on what functions are included in your VI. Liek the read me says "Several default settings in Microsoft Office 2007 differ slightly from previous versions. Reports you generate using Office 2007 might look different than reports you generate from other versions of Office because font sizes, cell sizes, and so on, differ."
    Best Regards
    David
    NISW

  • Two quick questions about Library after moving beginning on a new computer

    Hi there,
    I just moved from Windows to Mac, meaning I had to move my iTunes library from the old PC to my new MBA.
    Just a couple of quick questions.
    1. When I started iTunes on my new Mac, in the preferences I directed the media folder to the folder with all my itunes music/podcasts etc, and then I imported the Library XML file.  Is this incorrect? Should I have imported a different file? Should I have used the itl file instead? 
    If so, should I delete the library and start again?  (if this is the case, please suggest the best way of doing this without affecting my media)
    - a kind of sub-question to this one:  some of the media files arent showing up in the iTunes library, but they are in the media folder on the ext HDD.  Is there a way I can find out which ones havent been recognized by iTunes?  Whats the best way of getting them in to my library?
    2. Pretty much half of my podcasts have not been loaded in the new iTunes.  The ones that havent were ones that I subscribed to on my iPhone, whereas the ones that show up in iTunes were ones I downloaded from iTunes.  When I connect my iPhone and sync it with iTunes, will those podcasts show up in iTunes?  Or is there a risk that they will be deleted from my iPhone?
    Cheers,

    The .xml is lacking some information such as ratings, date added, and play count.  Using the .itl includes this information but cannot be imported using the method you did.
    A complete library is everything in the iTunes folder.  By using the method you did you left the artwork behind in the artwork folder on the other machine.
    Selecting the media folder in preferences does not get iTunes to recognize the media.  All it does is tell iTunes to start storing new media in that location.
    Using the method I outlined nothing will be missed (with the exception of WMA) because you aren't rebuilding your library, you are using the one that already exists.
    You don't have to re-copy everything as long as you get the stuff you missed and re-assemble it all as it was before except not on the Mac.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

Maybe you are looking for