Three questions about Java and Ftp

Hello, i've the following questions about Java and Ftp:
1- .netrc file is in $HOME directory but i can't access to this directory from java code. The following line producesan Exception (directory doesn't exists)
FileWriter file = new FileWriter ("$HOME/.netrc");
2- .netrc file must have the following permissions: -rw- --- --- but when i create the .netrc file the following permissions are on default: -rw- r-- r--, how can i change this permissions? (In java code, i can't use chmod.....)
3- Are there any way to pass parameters to a .netrc file? If i get to do this i needn't change the permissions because i can't modify or create/destroy this file.
Thanks in advanced!!!
Kike

1- .netrc file is in $HOME directory but i can't
access to this directory from java code. The
following line producesan Exception (directory
doesn't exists)
FileWriter file = new FileWriter ("$HOME/.netrc");$HOME would have to be replaced by a shell, I don't
think you can use it as part of a legal path.
Instead, use System.getProperty("user.home");
Ok, thanks
2- .netrc file must have the followingpermissions:
-rw- --- --- but when i create the .netrc file the
following permissions are on default: -rw- r--r--,
how can i change this permissions? (In java code,i
can't use chmod.....)Yes, you can: Runtime.exec("chmod ...");
I need to use estrictly the .netrc with -rw- --- --- permissions
Yes, i can use Runtime.exec ("chmod ..."); but i don't like very much this solution because is a slow solution, am i right?
3- Are there any way to pass parameters to a.netrc
file? If i get to do this i needn't change the
permissions because i can't modify orcreate/destroy
this file.I don't think so. Why do you need the .netrc file in
Java at all? Writing a GUI frontend?I want to use automatic ftp in a java program and FTP server, the files and path are not always the same, so i can:
- modify .netrc (for me is the complex option)
- destroy and create a new .netrc (is easier but i have permissions problem)
- use .netrc with parameters but i haven't found any help about it
Thanks for your prompt reply!!!!
Kike

Similar Messages

  • Question about java and batik

    i want to make a project using batik.. if i want to animate the svg, can batik do this? i am confused about batik. does it support animation? and how do i read the mouse coordinates in an svg using batik? please help..

    thanks for the reply! what i mean in the second question is does the canvas in batik support mouse coordinates?
    from what i understand is i can add interactivity to a svg by using batik and java and no javascript.. am i right? i am asking because i am doing a gis project and i want to do it in batik and java. after creating the svg file in the web, it will be downloaded from a phone fow viewing. in orer to do that i have to do a program for the phone, right?

  • HT201303 hi just got my new apple ipod touch i need to update my security information other wise it wont let me download apps it says to enter three questions about myself and i get to the third question and it wont let me enter the third question

    hi just got my new apple ipod touch and to download apps it wants to add questions about myself for more sercurity information. i get up to question 3 and it wont let me select a question but it will let me write an answer so i just pressed done and then it says i cant carry on because ive mised out information when it wont let me do a question!

    Welcome to the Apple community.
    You might try to see if you can change your security questions. Start here, change your country if necessary and go to manage your account > Password and Security.
    I'm able to do this, others say they need to input answers to their current security questions in order to make changes, I'm inclined to think its worth a try, you don't have anything to lose.
    If that doesn't help you might try contacting Apple through Express Lane (select your country, navigate to iCloud help and enter the serial number of one of your devices)

  • Few question about Java and MySQL connection

    Hi!
    I have some problems with creating connection between Java and MySQL.
    I followed the restrictions in mysql-connector-java.jar' readme, I set the CLASSPATH :
    CLASSPATH=.;D:/mysql/mysql-connector-java.jar;
    I copied this jar file to the right place (descripted above), and I used the right steps to load it:
    Class.forName('com.mysql.jdbc.Driver"); and it throws a ClassNotFoundException
    Why? All the paths are correct, everything is on the right place.... I dont know why.
    When I installed the JBuilder8, and copied the jar file to JBuilder8/jdk4/jre/lib/ext it worked without any CLASSPATH in enviromental variables.
    If I want to run my program on machines where are not JBuilder, what should I do?
    Please help, if you can.
    Thanks,
    henpanta

    Yeah. So if I compiled my program with JBuilder to an .exe file, I cant run it on other machines, if the jar file isnt in the same place?
    If I tried your advice, java -classpath mymainclass I got the next message:
    main class not found. Believe me, its there. :(

  • Simple Questions about ESB and ftp adapter.

    We have the following Business Scenario:
    We have a partner company that provide us a ftp server with some files. We need to transfer these files from this server to other server, we don't need to read the file's content, we just need transfer the files.
    We are planning to use ESB in order to implement this solution but we have the following questions:
    Is it possible use the ftp adapter in order to transfer the files?
    Is there any example available about (Schema is Opaque feature) on a ftp adapter?
    Thanks
    Ramiro Ortiz

    Thank you very much for your reply.
    . I am trying to construct a FTP ( get) adapter with which I would like to do a simple FTP transfer from /var/out directory server xxx.oms.com (say) to a directory /home/in on the server bos1.oms.com (say) could not figure out this in jdeveloper 10.1.3.3 ( do i need upgraded jdeveloper?). The esb server and control exists on server bos1.oms.com. While constructing the adapter in jdeveloper it asks for physical directory? Is this the directory where it will the read the file from? How do I specify if the directory exists on the different server.
    is it something like xxx.oms.com:/var/out
    Please let me know.

  • Question about  Java and XML  rendering for Word 97 upwards.

    Without using the apache POI library, and by sticking to non-pay products,
    is it possible to use java or XSLT/XML to turn
    an xml formatted file into a
    Microsoft Word/Excell/PDF file within one framework?

    Look into Apache FOP. But be warned: it will most likely use POI to do any excel conversions. That's how (sane) software development works: you don't reinvent the wheel, you effectively reuse what is already there.

  • QUestion about Java and GC

    Hello, I have a question regarding the garbage collection in java
    When can GC be called upon a class?
    Right now, I have a linked list of entities which when an entity is removed, it simply removes the reference of that monster (thus meaning the monster is non-existent as far as the server knows), however, after removing/adding around 25k new entities, the memory usage does not seem to go down
    Here is the code to remove the entity
                Entity current = first;
                //check if there is a next monster
                Entity next = null;
                while (current.hasNext()) {
                    //if there is, look at the next monster, see if it's id is equal to this id
                    next = current.getNext();
                    if (next.getID() == id) {
                        //now, if the id is equal to the id we are suppose to remove, simply remove the reference from that monster
                        current.setNext(next.getNext());
                        next.finish();
                        next = null;
                        size--;
                        return true;
                    } else {
                        current = current.getNext();
                }The finish code, nulls any classes
        public void finish() {
            equip = null;
            next = null;
            location = null;
            name = null;
            parent = null;
        }Now, at around 25k entities (being removed, then added), it adds around 2mb , so it's getting quite bulky

    Naki wrote:
    Hello, I have a question regarding the garbage collection in java
    When can GC be called upon a class? When that class' classloader is GCed.
    I assume you meant on an object though, not on a class. An object is eligible for GC when it cannot be reached through any root reference in any thrad.
    The finish code, nulls any classesNo, it doesn't. It sets variables to null, not classes. The notion of "nulling a class" does not exist in Java. Also, that code is most likely unnecessary, though I haven't looked at the rest of you post that closely.

  • A few questions about MacBooks and Parallels Desktop.

    I have a few questions about MacBooks and Parallels Desktop.
    1) I understand I need at least 1GB of RAM to run Parallels Desktop but what about the hard drive, is the stock 60GB drive big enough?
    2) Related to question 1, even if it was big enough to allow me to install and run Windows would the 60GB drive be enough if I wanted to install a Linux distribution as well?
    3) This has nothing to do with Parallels Desktop but thought I'd ask it here anyway, do Apple Stores carry just the stock MacBooks, or do they carry other configurations?
    Thanks
    Keith

    1. Depend on how intensive you use that HD for saving data on both Mac OS and XP. For standard installation on both OS X and XP, the space of 60 Gb is enough.
    2. Same answer as no 1. You can install all three on that HD space, but the extra spacce available will be less and less for your data. You can save your data on external or back up on cd/dvd and erase it from the HD to keep the free space.
    Remember to leave at least 2 or 3 Gb for virtual memory usage.
    3. Just call them, maybe they don't have it in store stock, but by appointment they might configure one for you before your pick-up date.
    Good Luck

  • Question about Java's HttpServer: Threading? Backlog?

    Hello,
    I have two questions about Java's HttpServer (com.sun.net.httpserver). From the JavaDoc:
    >
    Management of threads can be done external to this object by providing a Executor object. If none is provided a default implementation is used.
    >
    How can I get information about the default implementation in 1.6.0_13? Do you know the behavior? From my observations, the default implementation uses no Threads, meaning every request is handled in the same Thread, this results in handling the requests to the HttpServer one after another.
    Is this right?
    The second question is about this, also from the JavaDoc:
    >
    When binding to an address and port number, the application can also specify an integer backlog parameter. This represents the maximum number of incoming TCP connections which the system will queue internally. [...]
    >
    When setting the backlog to -1, it uses the systems default backlog. How can I determine the systems default backlog? Can some lines of Java code reveal it (there is no getBeacklog() method)? Or is it up to the Operating System (we use Redhat Linux)?
    Thanks a lot for your help!
    Regards,
    Timo

    How can I determine the systems default backlog?You can't. There is no API for that even at the C level.
    Can some lines of Java code reveal itNo.
    Or is it up to the Operating System (we use Redhat Linux)?Yes. Linux provides a large default. It seems to be at least 50 on most platforms. This is not something you should be worrying about.

  • I have three questions about managing my music library

    Hello,
    I have three questions about managing my music library, I hope you can help me with them:
    1) Is there a limit of how many entries, songs, albums, art work, can iTunes handle? I have a hunch iTunes is like a database program and am curious about its capacity. I have two 2-TB drives and am wondering what is going to happen when I fill these two drives up. Other than disk space, what are iTunes limitations?
    2) Talking about these two drives. How can I use both as a source for my iTunes library. Can I have two folders selected as the source of my library? I am not sure if I have enough disk space to hold all my music, but I do also have a 1TB almost empty drive is need be.
    3) OK now comes te real question. I am sure that I have duplicates in my library and I sure would love to clean my library up.Possiby if I do get to clean it up, I can save some disk space and that is always a good thing. Any good techniques, software, techniques to follow while ripping music to help keep my library organized. Please be as detailed as you can.
    Thanks and I can't wait to hear from you.
    Waseem

    Wassimn wrote:
    Hello,
    I have three questions about managing my music library, I hope you can help me with them:
    1) Is there a limit of how many entries, songs, albums, art work, can iTunes handle? I have a hunch iTunes is like a database program and am curious about its capacity. I have two 2-TB drives and am wondering what is going to happen when I fill these two drives up. Other than disk space, what are iTunes limitations?
    As far as I know you're going to run out of disc space before you hit any limits. Each object in iTunes has a 64-bit key to access it. That said as your library grows it will get less responsive as bigger indexes take exponentially longer to process.
    2) Talking about these two drives. How can I use both as a source for my iTunes library. Can I have two folders selected as the source of my library? I am not sure if I have enough disk space to hold all my music, but I do also have a 1TB almost empty drive is need be.
    iTunes wants to manage everything inside one big folder. Some idiosyncrasies with the way it manages things if you have to move to a new drive means it is best if you can stick to that plan. If your library grows larger then you'll have to take manual control of where some or all of your content is stored. I use a variation of a script called ConsolidateByMoving which you could adapt for your needs.
    3) OK now comes te real question. I am sure that I have duplicates in my library and I sure would love to clean my library up.Possiby if I do get to clean it up, I can save some disk space and that is always a good thing. Any good techniques, software, techniques to follow while ripping music to help keep my library organized. Please be as detailed as you can.
    When it comes to deduping I've written another script for that called DeDuper, see this thread for background.
    And for some general tips on getting organized in iTunes see Grouping tracks into albums.
    tt2

  • Three questions about a single-folio publication

    We are finishing our first publication with DPS.
    We have a Adobe DPS Professional Edition, Annual version.
    1- I have been planning to launch the App in iPad and Android for free and in three days to put the price at $9,00. Is that possible?
    2 - How much time needs Apple to approve our appliction?
    3- I have read that you can't publish a single folio app in Android. Why?
    What is the option

    On android a .apk app is limited to 50 mb. Additional Content up to 4GB can
    be loaded by the app on its first start.
    This need a change in workflow for the android version on the viewer side.
    And it may be political, too.
    —Johannes
    (mobil gesendet)
    Am 17.01.2012 02:32 schrieb "Bob Bringhurst - Adobe" <[email protected]>:
       Re: Three questions about a single-folio publication  created by Bob
    Bringhurst - Adobe <http://forums.adobe.com/people/BobBringhurst-+Adobe>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4145193#4145193>

  • I want to change my secret questions where I had forgotten the answers to three questions about safe

    I want to change my secret questions where I had forgotten the answers to three questions about safe

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • A question about grub and USB

    Hi All
    I have a quick question about grub and USB that I can't quite find the answer to by searching.   Most of the FAQs discuss booting a full linux dristribution from USB. My situation is this.  I am getting a new computer with two drives, the second will be arch and the first will be Vista (for my wife).  I want the computer to boot the same way that my wife's machine boots at work so I don't want to install grub on the MBR.  So, is there a way to have all of the grub config files and kernels installed on the second drive and simply install to grub boot loader to the MBR of a USB stick?  My goal would be to simply plug the USB stick into the new PC and boot arch from the second drive. 
    Thanks
    Kev

    i cant say for hp's
    havent worked on any in a while
    recent machines have been coupleof dell's , vaio & emachine
    which dells do offer it at least the ones i tried , my laptop does(dell)
    all home pc's are built by me which do offer to boot individual drives
    what hp you getting it may tell in specs
    are both discs sata? if so it might not offer this option with 2 drives of same interface
    check your power supply alot of these preconfigured machines put cheap under reated power supplies in there
    & will burn your motherboard i just replaced PS(250 watt) & mobo(845gvsr) in an emachines <cheap stuff<
    i hope you researched the pc before buying ie : mobo, power supply are the biggest concerns
    i find it much more benificial to build my own machine gives me peace at mind. the cost is sometimes more in $ but not always , your biggest expense is time researching hardware
    if you live in usa the best places to start looking are bensbargains.net & pricewatch.com
    i am not affiliated with either & niether sell the hardware they are just advertisers a place to buy
    for costomized machines that i would trust is unitedmicro.com theyll asemble & test before shipping
    i have gotten 2 machines so far from them with NO PROBLEMS with hardware (knock knock)
    you may want to consider this in your next venture for pc

  • I have a Macbook Pro june 2011... I have 8GB ram but I only have 256mb VRAM... I've read some other questions about this and I realized... Why do I not have 560mb of VRAM since I have 8GB of RAM? Is there any way to get more VRAM to play games on steam?

    I have a Macbook Pro june 2011... I have 8GB ram but I only have 256mb VRAM...
    I've read some other questions about this and I realized... Why do I not have 560mb of VRAM since I have 8GB of RAM?
    Is there any way to get more VRAM to play games on steam?
    I've learned  by reading other topics that I can't upgrade my graphics card on my Macbook Pro because it's soldered into the motherboard or somthing like that, but please tell me if there is any way to get more video ram by chaning some setting or upgrading something else. I'd also like to know why I only have 256MB of VRAM when I have 8GB of RAM, since I have 8GB of RAM I thought I was supposed to have 560mb of VRAM...
    So the two questions are...
    Is there any way to upgrade my VRAM, so that I can play games on steam?
    Why do I only have 256MB VRAM when I have 8GB total RAM?
    Other Info:
    I have a quad core i7 Processor.
    My graphcics card is the AMD Radeon HD 6490M.
    I am also trying to play games on my BOOTCAMPed side of my mac, or my Windows 7 Professional side.
    THANK YOU SO MUCH IF YOU CAN REPLY,
    Dylan

    The only two items that a user can change on a MBP are the RAM and HDD (Retinas not included).  You have what the unit came with and the only way you will be able to change that is to purchase a MBP with superior graphics
    If you are very much into gaming, the I suggest A PC.  They are far superior for that type of application to a MBP.
    Ciao.

  • One question about Pricing and Conditions puzzle me for a long time!

    One question about Pricing and Conditions puzzle me for a long time.I take one example to explain my question:
    1-First,my sale order use pricing procedure RVAA01.
    2-Next,the pricing procedure RVAA01 have some condition type,such as EK01(Actual Costs),PR00(Price)....,and so on.
    3-Next,the condition type PR00 define the Access Sequences PR00 as it's Access Sequences.
    4-Next,the Access Sequences PR00 have some Condition tables,such as:
         table 118 : "Empties" Prices (Material-Dependent)
         table 5 : Customer/Material
         table 6 : Price List Type/Currency/Material
         table 4 : Material
    5-Next,I need to maintain Condition tables's Records.Such as the table 5(Customer/Material).I guess the sap would supply one screen for me to input the data of table 5.At this screen,the sap would ask me to select one table,such as table 5.When I select the table 5,the sap would go to the screen to let me input the data of table 5.But when I use the T-CODE VK31 or VK32 to maintain Condition tables's Record,I found it's total different from my guess:
    A-First,I can not found one place for me to open the table,such as table 5,to let me input the data?
    B-Second,For example,when I select the VK31->Discounts/Surcharges->By Customer/Material,the sap show the grid view at the right side.At the each line of the grid view,you need to select the Condition Type at the first field.And this make me confused very much.Why the sap need me to select one Condition Type but not the Condition table?To the normal logic,it ought not to select Condition table but not the Condition Type!
    Dear all,I'm a new one in sd.May be this is a very stupid question.But it did puzzle me for a long time.If any one can  explain this question in detail and let me understand the concept,I will appreciate him/her very much.Thank you.

    Hi,
    You said that you are using the T.codes VK31 or VK32.
    These transaction codes are used to enter condition records for standard condition types. As you can see a grid left side having all the standard condition types like price, discounts, taxes, frieghts.
    Pl check using T.code VK11 OR VK12 (change mode)
    Here you can enter the required condition type, in the intial screen. (like PR00, MWST, K004, K005 .....etc)
    After giving the condition type, press enter or click on Combinations icon on top of the screen. Then you can see all the condition tables which you maintained for that condition type. Like as you said table 118, table 5, table 6 and table 4.
    You can select any table and press enter, then you can go into the screen in which you have all the field cataglogues you maintained for that table. For example you selected combination of Customer/Material (table 5) then after you press enter then you can see customer field on top, and material fields.
    You can give all the required values and save the conditon record.
    Hope this is clear.
    REWARD IF HELPFUL.
    Regards,
    praveen

Maybe you are looking for

  • How to billing sub items ?

    Hi Gurus: I have set a BOM in sales contract and sales order. The requirement from customer is to be able to bill the sub item individually. I am able to bill the main item right now but not the sub item. Any body knows how to bill the sub item ? Tha

  • Error message: local root folder does not exist

    Greetings, I'm working on a MacPro 2x2.66Ghz, running DW from CS2 and through a strange combination of keyboard keystrokes while cleaning my keyboard yesterday I inadvertantly renamed my hard drive "-OX" from it's default. I can't seem to remember wh

  • CiscoIPPhoneExecute no longer works on SPA50xG ?

    I have simple XML Phone Application: <CiscoIPPhoneExecute>         <ExecuteItem Priority="0" URL="Init:Services" />         <ExecuteItem Priority="1" URL="Key:Settings" />         <ExecuteItem Priority="1" URL="Key:KeyPad1" />         <ExecuteItem Pr

  • Lost my itunes

    The other day I logged on my mac and i saw that my itunes icon had a question mark in it.  I went to log in and nothing. I quit the app and tried to open it but to my surprise it's gone. What happened? Half of my music left with it.

  • PI 7 Content in XI 3?

    Hi, Is it possible to import Content designed for PI 7.0 (i.e HR 7.0 Content) into XI 3.0? If possible, then is this also supported by SAP? Or is an upgrade to PI 7.0 recomended? Thanks, Hans