Uploading a file from standalone app to another machine

hi there,
i wrote a awt application which can read a file in the local machine. after that i need to upload it to another machine in the internet. I got permissions to access that machine.
if anybody knows the way how i can do this please help me.
batta

Yeah well if the machine has a webinterface, look for a package which can do HTTP uploads. Else check the apache commons.net which contains a nice FTP api.
http://jakarta.apache.org/commons/net/

Similar Messages

  • Moving uploaded VSIX files from one account into another

    Hey guys,
    I want to ask you if it is possible to move already uploaded and published VSIX files from account into another.
    Our case is the following, our company made 2 accounts and we want to merge them as one. However, if I test this scenario with another accounts, it fails. What I do:
    1. Upload with Account1
    2. Unpublish and delete the uploaded VSIX
    3. Try to upload the same VSIX using Account2
    4. I get "Your VSIX ID already exists on the site" error (re-uploading using Account1 works fine!)
    Any help is appreciated.
    Greetings! :)

    Hi SteliyanStoyanov,
    As far as I know, there's no such kind of feature, to merge two accounts as one in the VSGallery site. The reason for the "VSIX ID already exists" error may be that it will take some time to take effect after you delete an uploaded VSIX. So you
    can try it after a few hours. Or change the VSIX ID and reupload all the extensions.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Upload files from my app works fine in JDev but NOT on app server???

    i guys,
    I'm using jdeve 10.1.2. and adf bc's. So here's my problem:
    In my application i need to allow for the upload of files from user's computers. This works perfectly fine from jdeveloper but when i deploy my application on the application server i get the following error:
    JBO-26041: Failed to post data to database during "Insert": SQL Statement "D:\TrademarkTestData\TrademarkunitTestData.xls (The system cannot find the path specified)".
    D:\TrademarkTestData\TrademarkunitTestData.xls (The system cannot find the path specified)
    For some reason the system cannot find the path. This is most frustrating as it works perfectly fine when run from jdeveloper.
    Any ideas would be most welcome.
    Thanks in advance,
    Newbe

    Hi Frank,
    Thanks for the response. I've consulted with our server guy and he says that there are no read/write privileges. Jdev is not on the server.
    I'm really stumped by this so if you have any ideas, I'd really appreciate it.
    Happr New Year to you,
    Newbe.

  • HT4623 How come my ipad jumps from one app to another app?

    How come my i pad jumps from one app to another for no reason at all. especially when Ia using safari?

    And do you have enough space left on your iPad?
    Is an error message appearing? If yes, what does it say?
    Then you can't transfer files between apps, you'll need to use iTunes.
    If you do not have the file on your computer, just connect your iPad, download the file into the computer from the original app and upload it to the other/new app.

  • Java Program to copy file from one directory to another failing

    Hello All,
    Oracle Applications 12.1.3
    RDBMS: 11.2.0.30
    SQL*Plus: 10.1.0.5.0
    Java beginner here so help is much appreciated.  I'm have some java code that I'm using to copy a file from one directory to another in an Oracle Applications Server.  I notice that when moving to a new instnace I started to get file not found errors.  I think it's because of the directory.  My question is, does the directory in which I trying to pick up the file have to be a DBA_DIRECTORY, or a UTL_FILE directory in order for the java to find the file and move it?
    Here is my code...
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "COPY_FILE_JVS" AS
    import java.io.*;
    public class COPY_FILE_JVC{
      public static void copy(String SourceFile, String DestDir) {
        File source = new File(SourceFile);
        File dest = new File(DestDir);
        File cpDestFile = null;
        try {
          if (dest.isDirectory()) {
              if(source.isFile()) {
                System.out.println("File name = " + source.getName());
                System.out.println("File name dest = " + dest.getPath() );
                System.out.println("File name cpDestFile = " + dest.getPath() + File.separator + source.getName());
                cpDestFile = new File(dest.getPath() + File.separator + source.getName());
              else {
                System.out.println("Directory or File Not Found");
                return;
          BufferedInputStream  br = new BufferedInputStream (new FileInputStream (source));
          BufferedOutputStream  bw = new BufferedOutputStream (new FileOutputStream (cpDestFile));
          int read = 0;
          while((read = br.read()) != -1) {
            //System.out.println((char)read);
            bw.write(read);
          br.close();
          bw.close();
        catch (FileNotFoundException e) {
        e.printStackTrace();
        catch (IOException e) {
        e.printStackTrace();

    I get these messages when calling the java from SQL Plus as follows...
    serveroutput on size 100000;
    dbms_java.set_output(1000000);
    MY_PKG.CopyFile('/home/my_user/set_env.sh','/interface/home'); (this is call to oracle pl/sql package which calls the java.)
    PL/SQL procedure successfully completed.
    Directory or File Not Found
    PL/SQL procedure successfully completed.
    If I change the directory from /home/my_user/ to any directory that is defined in DBA_DIRECTORIES or is a UTL_FILE directory to program works.  Is it perhaps because the java is in a PL/SQL package as seen below?  The PL/SQL program runs as the APPS user and I have issued the following the command grant JAVASYSPRIV to APPS.
    Here is the PL/SQL Package....
    CREATE OR REPLACE PACKAGE BOLINF.MY_PKG AUTHID CURRENT_USER AS
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2);
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE BODY BOLINF.MY_PKG  is
    CopyFile(p_SourceFile IN VARCHAR2, p_DestDir IN VARCHAR2)
    AS LANGUAGE JAVA NAME 'COPY_FILE_JVC.copy(java.lang.String, java.lang.String)';

  • How can I move a Pages file from a folder to another one?

    I Have done the upgrade to mac os Yosemite but now i'm Not able to move a file from a folder to another one Inside iCloud
    now it's impossible to organize MY archive

    Thankyou Winston, you guess right. What i don't understand is why with the older version of mac os (10.9) i can organize my document into icloud folders using the Pages app window. But now with the new version i'm no longer able to do that. Using ipad in the same window there is no problem, but in mac os it doesn't work. 

  • Help please to Upload a file from my PC to server's KM

    Hello:
    I can't Upload correctly a file from my local PC to a KM of the server.
    My problem is after that I've uploaded any file from my PC to KM, sometimes when I open or download it from the KM appears blank, and when I try another way to write the file (out.write()) I've uploaded a bad file that can't be downloaded or opened it. I can't get the file Data of the file for uploading, I need to set it with the fileResource (I tried with fileResource.read(false))
    I use a FileUpload in my view.
    <b>My Context:</b>
    File (node)
         |----fileResource  (com.sap.ide.webdynpro.uielementdefinitions.Resource)
         |----fileData  (binary)   
         |----fileName  (String)
    wdDoInit(){
         IPrivateUploadDownloadKMView.IFileElement fileBind = wdContext.createFileElement();
         wdContext.nodeFile().bind(fileBind);
         IWDAttributeInfo attInfo = wdContext.nodeFile().getNodeInfo().getAttribute("fileData");
         ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
    onActionSubir(){
          IPrivateUploadDownloadKMView.IFileElement fileElement = wdContext.currentFileElement();
          IWDResource resource = fileElement.getFileResource();
          fileElement.setFileName(resource.getResourceName());
          fileElement.setFileData(fileData);
          byte[] fileData=new byte[resource.read(false).available()];
          fileElement.setFileData(fileData);
          fileName = fileElement.getFileName();
         try{               
               File file = new File(fileName);
               FileOutputStream out = new FileOutputStream(file);
               out.write(fileElement.getFileData());
               out.close();
               fin = new FileInputStream(fileName);
               fin.read();
               Content content = new Content(fin,null, -1);
                IResource newResource = folder.createResource(fileElement.getFileName(),null, content);
          catch(Exception e){
                 IWDMessageManager mm = wdControllerAPI.getComponent().getMessageManager();
                 mm.reportWarning("error: "+e.getMessage());
    Can you help me?, any sugestions to solve my problem or improve my code?
    Regards
    Jonatan.

    If you have got the permission to access <b>content management</b> in portal appliction server consle,then click on content management >select the KM Repository and clik on it.Then right click on <b>folder</b>>new-->upload.After clicking the upload option one page will be open and then you can browse your local file and upload to the KM Repository.

  • How to transfer files from one partition to another on the same computer

    I had a crash could not boot back into my 8.1 upgrade. Went out bought standalone 8.1. I loaded it on HD free space now I want to transfer files from one partition to another.

    hi
    say there are two infoobjects X  and Y.
    X is existing infoobject and Y in new one.
    go to infosurce-search for X-create export datasource - map the rules and load the data.
    This is one way.
    Other way is u can use X as a reference object of Y so that both of them have same structure and both objects will share common database tables in BW which are exsting for X.
    Hope this helps.
    Kindly assign the points if it helps.

  • Upload xml file from aplication server using read dataset, parser error.

    Hi,
    I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '#' char. How do You upload xml file from app server? What Could be incorrect.
    I try to open dataset in binary mode, text mode...
    TYPES: BEGIN OF xml_line,
            data(255) TYPE c,
          END OF xml_line.
    DATA: gt_xml_table TYPE TABLE OF xml_line,
          gs_xml_structure TYPE  xml_line,
          gv_xml_table_size TYPE i.
    OPEN DATASET s FOR INPUT IN BINARY MODE.
      IF sy-subrc <> 0.
        MESSAGE e001(zet) WITH '....'.
      ENDIF.
      DO.
        READ DATASET s INTO gs_xml_structure.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
         len = STRLEN( gs_xml_structure ).
         len = len - 1.
         check len > 0.
         WRITE gs_xml_structure(len) TO gs_xml_structure.
          APPEND gs_xml_structure TO gt_xml_table.
        ENDIF.
      ENDDO.

    You Can do this too
    parameters: p_file like rlgrap-filename.
    data: subrc like sy-subrc.
      create object me.
      REFRESH t_data.
    *  Open XML File
      CALL METHOD me->CREATE_WITH_FILE
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = subrc.
    * Saves Data in an itab from XML File.
      CALL METHOD me->get_data
        IMPORTING
          retcode    = subrc
        CHANGING
          dataobject = t_data[].
    Regards,
    Claudio.

  • Move files from one folder to another javascript?

    I am running a 3-action droplet automatically using windows task scheduler.  Here are the 3 steps:
    1.    Batch file to move files from hot folder to processing folder
    2.    Run IPP (dr brown's image processor pro) using preloaded settings to make several sizes copies of the files.
    3.    Bat file to move the files from processing folder to archive folder.
    The problem I am observing is that Step 1 works and IPP begins to run.  It only processes the first few images, and then moves on to the 3rd step where the bat file is ran to move all files from processing folder to archive folder.   The trouble is, only a few images were processes (about 10 or so), yet all of the images get moved to the archive without being processed.  Is there a way to make sure that step 2 (IPP) doesn’t begin until all files have successfully been moved from the hot folder to the processing folder?  IPP starts right away and files are still being transferred to the processing folder.
    Does anyone have a script that will move files from one folder to another? 

    I'm sure I have see a way to close down Photoshop in a Photoshop script.  I never had the need to.  It may be a simple statement like app.close(); I don't know javascript and only hack Photoshop script mostly by looking at others code.  app.close(); is a guess on my part. Let me try it. I was wrong its photoshop.quit();
    So make your MoveToArchive.jsx look something like this
    try{
       var BAT = new File(Folder.temp + "/MoveFilesToArchive.bat");
       BAT.open("w");
       BAT.writeln('Copy /Y "c:\\Process\\*.jpg" "c:\\Archive\\*.*"');
       BAT.writeln('Del "c:\Process\\*.jpg"');
       BAT.close();
       BAT.execute();   // execute the temp bat file
    }catch(e){
    alert("Bat MoveFilesToArchive  failed to execute.");
    photoshop.quit();

  • How to move a file from a page to another one in a wiki?

    Is it possible to move a file from a page to another one in a wiki (wiki server 4)?

    Files uploaded via "+" button and "Upload File to "My wiki name"" can be moved just like normal wiki pages by clicking the "sprocket" button and selecting "Move to Wiki"
    Fils attached via the "paperclip" button when editing a page, must be downloaded first, deleted from the initial page and reattached to the new page.

  • How to move files from  one  system  to another in plsql

    Hi all,
    I want to move file from one system to another using plsql procedure .
    Kindly let me know what package i have to use for doing this .
    Thanks,
    P Prakash
    Edited by: prakash on Jul 27, 2011 2:20 AM
    Edited by: prakash on Jul 27, 2011 2:59 AM

    BluShadow wrote:
    That's ok if you want to diet. ;)Ooh look, the strange punctuation is back. Can it be true that the forum software has caught up with the '80s?
    I almost feel like connecting to the internet using a 9600 baud modem to celebrate.
    http://upload.wikimedia.org/wikipedia/commons/5/5d/TeleGuide-terminal.jpg
    Colon dash right bracket.
    (Old habits die hard)

  • Loading text from one app to another

    If we are using text members and we want to transfer comments from one app to another.
    our steps are as follows.
    1) Export indicators in Essbase
    2) LCM text members out of one app to import into the other.
    3) load indicators in new app
    4) load LCM file to new app.
    The wrinkle is the following
    App 2 already has the exact same member for text and there is already text in separate spots (no overlap - think 2 different versions). But what about the number system when we bring it back in.
    Has anyone done this where you have to reallign the indicators in the relational database and essbase so that nothing gets crushed?
    We are thinking of editing the files and create new numbers. Will that work?
    This is version 11.1.2.2

    Hi,
    Mode of updation is delta.
    ZCUBE_2 already contains data from Aug. to March
    My problem is m not able to move March onwards data.
    Till today my delta was working fine.But i had to delete April data. Now i want to reaload it.
    Before deleting i tried to load 10 daya data all together, it reloaded successfully. Now i have to reload 48 days data, its not loading.
    I also to restict period in filter option, then also no data availabe is coming.

  • Uploading a file from a J2ME application

    Ok, obviously this is either not interesting, or no one really knows what to do, I would love any ideas even if they dont work, just anything that would help would be great :)
    I am extremely new to servlet programming and reasonably new to J2ME. I want to upload a file from my device to a central server. I am not sure how to go about starting this. I have a html form that requests a file and posts it to the servlet fine, but I am not sure how I would get my J2ME application to do the same. Do I replicate the html from with in the program? Any help would be much appreciated.
    My basic servlet and Java code is:
    Java
    public String sendPostRequest(String urlstring) throws IOException {
                  HttpConnection hc = null;
                  DataInputStream dis = null;
                  DataOutputStream dos = null;
                  String message = "";
                  // the request body
                  FileSystem fs = new FileSystem();
                  byte[] file = fs.returnFile("c:/other/dot/helloworld.txt");
                  if(file != null){
                       String fileString = ("file=" + new String(file));
                       try {
                         // an HttpConnection with both read and write access
                         hc = (HttpConnection)Connector.open(urlstring, Connector.READ_WRITE);
                         // set the request method to POST
                         hc.setRequestMethod(HttpConnection.POST);
                         // set request type
                         // Could possibly need to be "application/x-www-form-urlencoded"????????????????????????????????
                         hc.setRequestProperty("Content-Type", "multipart/form-data");
                         hc.setRequestProperty("Content-Length", fileString.length()+ "" );
                         // obtain DataOutputStream for sending the request string
                         dos = hc.openDataOutputStream();
                         byte[] requestBody = fileString.getBytes();
                         // send request string to Web server
                         for (int i = 0; i < requestBody.length; i++) {
                           dos.writeByte(requestBody);
                   // flush it out
                   dos.flush();
                   // obtain DataInputStream for receiving server responses
                   dis = new DataInputStream(hc.openInputStream());
                   // retrieve the responses from Web server
                   int ch;
                   while ((ch = dis.read()) != -1) {
                   message = message + (char) ch;
                   } finally {
                   // free up i/o streams and http connection
                   if (hc != null)hc.close();
                   if (dis != null)dis.close();
                   if (dos != null)dos.close();
    Servlet
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.oreilly.servlet.MultipartRequest;
    public class DNTUpload extends HttpServlet{
        public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException{
            res.setContentType("text/html");
            PrintWriter out = res.getWriter();
            try{
                MultipartRequest multi = new MultipartRequest(req, "C:\\Servlets+JSP\\DNT", 5*1024*1024);
                Enumeration files = multi.getFileNames();
                String name = (String)files.nextElement();
                File f = multi.getFile(name);
                if(f != null){
                    out.println("<HTML>");
                out.println("<HEAD><TITLE>FileUploader</TITLE></HEAD>");
                out.println("<BODY>");
                out.println("<H1>Should have saved file</H1>");
                out.println("</BODY>");
                out.println("</HTML>");
                else{
                     res.setHeader("valserror", "ERROR");
            }catch(Exception e){
                out.println("<HTML>");
                out.println("<BODY>");
                out.println("failure!!");
                out.println("</BODY>");
                out.println("</HTML>");
    Message was edited by:
    -fluffy-

    I've only done one small j2me program and not recently, but here is a link that can give you some of the basics: http://today.java.net/pub/a/today/2005/02/09/j2me1.html
    I'm guessing, but I believe you have to use http sockets to accomplish a file transfer with a phone. Also, there are some limitations with full sockets depending on which type of phone you using to write your app to.
    Hope that helps!

  • Hi, can I upload Pages files from my iPad to Google Sites?  More specifically, a File Cabinet page?

    Hi, can I upload Pages files from my iPad to Google Sites? 
    I set up a File Cabinet page, and when I touch "Add file," it only allows me to select files from my Photo Stream.  I'd like to be able to select files from my Pages documents.
    I am trying to use Sites for my students' ePortfolio, and the only way I can manage to get files onto the file cabinet is to export it to an app which will, in turn, save it as a photo.  This process will be a monster when I'm trying to get a bunch of freshmen to upload their portfolio artifacts from Pages.  
    iPad implementation has been very frustrating for my school--I wish they had laptops!
    Thanks!

    PS -- I really did search the community for this topic.  I apologize if it's a repeated question. 

Maybe you are looking for