Runtime Environment + Linux + the "find" command

Hi everybody,
I want to write a small program which makes it easy for me to use the find command with Linux. I have experience with Java but I have never used the runtime environment before. I am not sure how to best execute the "find" command. I tried this:
    public static void main(String[] args)
        String command = "find -name \"*\"";
        execute(command);
    private static void execute(String p_command)
        // Show the executed command.
        System.out.println(p_command);
        // Get the runtime object and handle the command.
        Runtime rt = Runtime.getRuntime();
        try
            // Execute the command.
            Process proc = rt.exec(p_command);
            // Show the output of the command.
            InputStream stdin = proc.getInputStream();
            InputStreamReader isr = new InputStreamReader(stdin);
            BufferedReader br = new BufferedReader(isr);
            String line = null;
            System.out.println("<OUTPUT>");
            while ( (line = br.readLine()) != null) System.out.println(line);
            System.out.println("</OUTPUT>");
            // Show the exit value of the process.
            int exitVal = proc.waitFor();
            System.out.println("Process exitValue: " + exitVal);
        catch (Exception e)
            System.out.println("Could not excecute: " + p_command);
    }This piece of code returns this:
find -name "*"
<OUTPUT>
</OUTPUT>
Process exitValue: 0This is not correct, because it should return something like this:
[jethro@laptop FindNix]$ find -name "*"
./nbproject
./nbproject/project.xml
./nbproject/project.properties
./nbproject/private
./nbproject/private/private.properties
./nbproject/build-impl.xml
./nbproject/genfiles.properties
./build.xml
./src
./src/findnix
./src/findnix/Main.java
./test
./manifest.mf
./build
./build/classes
./build/classes/findnix
./build/classes/findnix/Main.classDoes anybody know what I am doing wrong?
Best regards,
Jethro Borsje

It looks like you doing all correctly. I don't know what does Runtime.exec() do with passed arguments, but if specify command in following way:
String command = "find -name *";
'find' executed through Runtime.exec() behaves as if it was executed from command line with arguments -name "*".

Similar Messages

  • Help please! [using Runtime.exec() to run find command in UNIX]

    Hi guys! im trying to use exec() to run the UNIX find command
    that my application uses. As you can see from my sample code, the find command finds all files ending with html in my home directory. Unfortunately when I run the program it doesn't give me an output, but when I run it on the shell in the same directory as this code is saved, it works perfectly fine.
    Could someone please help me on this one. Many thanks! =)
    import java.io.*;
    import java.lang.String;
    public class RunCommand {
            public static void main(String[] args) {
                    try {
                            String[] command = {"find", "~/", "-name",
                                            "*.html", "-print"};
                            String find_str;
                            Process find_proc = Runtime.getRuntime().exec(
                                            command);
                            DataInputStream find_in = new DataInputStream(
                                            find_proc.getInputStream());
                            try {
                                    while ((find_str = find_in.readLine())
                                                                    != null) {
                                            System.out.println(find_str);
                            } catch (IOException e) {
                                    System.exit(0);
                    } catch (IOException e1) {
                            System.err.println(e1);
                            System.exit(1);
                    System.exit(0);
    }

    I don't see anythi obvious. In both catch blocks, call printSckTrace on the exception yhou caught.
    I think the real culprit is the ~ though.
    ~ is interpreted by some (most?) shells to men home dir. However, when you just exec a command, you don't have a shell to do that interpretation for you, so it's looking for a directory that's literally named ~.
    Either exec a shell (read the man pages for the shell of your choice, but for zsh I think it's "/bin/zsh -c find ~ blah blah blah) or else just put the actual path to your home directory into the string you pass to exec. You can get that from System.getProperty("user.home").

  • Runtime environment for the production apex instance

    My first goal is to export a full application from a full development environment to a runtime environment.
    The two environments are on dedicated servers.
    From Oracle Application Express documentation and Oracle Application Express Forum, I realized that to install an exported application into a runtime installation, you must:
    1) Export the workspace from the Application Express instance where the application was developed. The export file created contains information about the workspace, all the users in the workspace, and any groups in the workspace (if applicable).
    2) Use SQL*Plus to import your workspace in to the runtime environment.
    3) Export and then import your application (with Supporting Objects) using SQLPlus in to the runtime environment. The related files
    This means that to be able to import an application via SQL*Plus from a development environment to a runtime environment, the workspace must exist (with the identical workspace ID) in the runtime environment. And the best way to ensure that the workspace IDs are the same is to export the workspace from the development apex instance and import it into the runtime apex instance.
    Also, you can't change the application ID through SQL*Plus - so if you're importing the application via SQL*Plus, either a) that application ID can't exist, or b) if it does exist, it will be overwritten by the import (of course, in case b we don't export/import also supporting objects).
    I know that there are some tricks, like editing the application export file just to import into a workspace with a different ID in the production runtime environment. But i wuold like to be official supported ;)
    So in my case i think i could, for the first export/import:
    1) Convert the production apex instance from runtime environment into a full development environment.
    2) Export the workspace from the development instance using the apex administration services (in a text file).
    3) Import the exported workspace into the production instance using the text file created and SQLPlus connect as APEX_030200.
    FOR THE NEXT POINT 4 I ASSUME THAT EXPORTING/IMPORTING A WORKSPACE DOES NOT INCLUDE THE SCHEMAS ASSOCIATED WITH THE WORKSPACE.
    4)
    a1) Create a new schema for the supporting objects of applications in the production instance with a DBA tool.
    a2) Assign the schema created in the production instance to the workspace imported from the development instance, using the apex administration services.
    or, if you want apex creating the schema for the supporting objects of applications:
    4)
    b1) Create a new workspace (with a new schema) in the production instance using the apex administration services.
    b2) Delete the workspace created in the production instance: the schema will not be removed.
    b3) Assign the schema created to the workspace imported from the development instance.
    5) Delete the users and eventually the groups in the imported workspace in the production instance, using the apex administration services.
    6) Change the name of the imported workspace in the production instance, using the apex administration services.
    7) Convert the production apex instance from full development environment to runtime environment.
    8) Export the application (with supporting objects) from development instance, using the export page.
    9) Import the application (with supporting objects) to the production instance using SQLPlus connect as APEX_030200.
    10) Export all associated files (related files) of the application (CSS, Images, Themes, ...) from developmente instance, using the tabs located at the top of the export page.
    11) Import the related files to the production instance using SQLPlus connect as APEX_030200.
    So, for next the next releases of the application i can again export the full application:
    1) Export the application (without supporting objects) from development instance, using the export page.
    2) Import the application (without supporting objects) to the production instance using SQLPlus connect as APEX_030200.
    3) Export all updated associated files (related files) of the application (CSS, Images, Themes, ...) from developmente instance, using the tabs located at the top of the export page.
    4) Import the exported related files to the production instance using SQLPlus connect as APEX_030200.
    or i can export and import single pages of the application.
    Excuse me for the long introduction, but the question is:
    what i have written is correct? Please let me know also your advice.
    Thanks a lot.
    Silvio

    HI,
    Thanks for responding.
    Should the APEX_ADMIN be available in a runtime environment?
    If so, we have missed a step in our installation.
    Keisha

  • Can i get access to the find command in Word via activeX?

    Does anyone know if it is possible to search through a word document using activeX commands from labview? Basically i need to use the "find" command from Word.
    Thanks for your help

    Excellent thanks a lot.
    I've now got the search function working but im having a little trouble getting the results i want. What do you mean by "new selection"? is this the output refnum from the execute node?
    Im looking to search through a word document for a certain paragraph number then highlight this paragraph in some way.
    At present i have used your method to find the section number and then used a frame property on the output refnum followed by select method cascaded from this. This has the effect of selecting the number causing the word window to jump to the desired point but only the first line of the paragraph is shown because it places the found text at the bottom of the screen.
    Do you have any suggestions as to how i could select the en
    tire paragraph? I also cannot get any output from the select method in this way, am i using it incorrectly?
    Thanks again for your time
    Alan

  • LR V1.2 Having problems using the find Command

    Have just recently started using lightroom and so far managing most applications imported a series of photos and after import added keywords to them using the find function I cannot get images to appear. What seems to happen is that in the keyword tag and the folders any of the headings that contain the keyword become active the remainder show a zero no in number of images held in that folder but no images on screen
    can anyone assist me
    Peter

    thanks for the reply
    have switched of global filters, made sure that using the Find command have set keywords in "text box" and in the "rule box "contains". When I then enter a key word as soon as a type the first two or three letters
    a message appears on the screen no "No photos in the selected keyword Tag" Also when you look at the folders which have a series of numbers indicating the photos in the directory the first number in each set turns to 0 with the exception of the folder and sub folder were the images are
    So have not managed to make any progress
    Peter

  • Please Help.  compare two excel files.  Can't get the find command to work

    Hello, I'm new to applescript.  I'm trying to write a script to compare column B of one excel file to column B of the another excel file.
    I will have to had a repeat loop to proceed down the column but I'm stuck on the find command. 
    Below is some of the code I have so far.  The applescript error message is "Microsoft Excel got an error: The object you are trying to access does not exist. It highlights the find column." 
    set patientFile to choose file with prompt "Please select the patient Excel file:"
    set patientName to name of (info for patientFile)
    tell application "Microsoft Excel"
    open patientFile
    set thepatientFile to workbook patientName
    end tell
    display dialog "Is your patient SNP data in column B of the " & " " & patientName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
    display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
    if the button returned of the result is "Cancel" then
    end if
    else
    display dialog "Is column E empty? The results of this program will be stored in column E of the" & " " & patientName & " " & "excel file." buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
      display dialog "Please put your data in empty column E" buttons {"Cancel"} default button 1
      if the button returned of the result is "Cancel" then
      end if
    else
      set relativeFile to choose file with prompt "Please select the relative Excel file:"
      set relativeName to name of (info for relativeFile)
      tell application "Microsoft Excel"
      open relativeFile
      set therelativeFile to workbook relativeName
      end tell
    end if
    end if
    display dialog "Is your relative SNP data in column B of the" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
    display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
    if the button returned of the result is "Cancel" then
    end if
    else
    display dialog "Does column C contain the result data you would like copied from" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
    if the button returned of the result is "No" then
      display dialog "Please put the data you would like copied in column C." buttons {"Cancel"} default button 1
      if the button returned of the result is "Cancel" then
      end if
    else
      tell application "Microsoft Excel"
      activate object workbook patientName
      copy value of cell "A1" to cellPatientFile
      find (range "B:B" of workbook relativeName) what cellPatientFile
      if cellPatientFile is true then
      set bold of font object of cellPatientFile to true
      end if
      end tell
    end if
    end if
    Does any one have any hints towards solving this problem?  Thank you for any help.

    Hi,
    taffners wrote:
    Thank you everyone for your help.  I attached my code.  It works now but kinda slow.  Does anyone have any hints on making it faster.
    Important : when you use the find command, it's preferable to use the properties ( look in and look at).
    Example : find searchRange what searchTerm look in values look at whole
    Otherwise, it will search according to the criteria of your last find.
    Example, if you uncheck 'Find entire cells only', and after that you run the script,
    find column 2 what 10.0 -->  match 110.0 or 1110.0 or 310.0, .... , because it look at part.
    set screen updating to false : Yes it improves the speed.
    Here are my tests (no duplicate values in the Excel column ) on old computer (Powermac G5) .
    set screen updating to false without any activate object command
    2000 rows --> 3.7 minutes,  your script : 11.5 minutes
    4000 rows --> 7.5 minutes, your script : 23 minutes
    8000 rows --> 15 minutes,  your script : 46 minutes
    But, it's faster to search through a list without using the Excel find command, no need to set the screen updating, You can continue working on the workbook or another workbook, this will not disturb the script.
    Tests on my script :
    2000 rows --> 4 seconds
    4000 rows --> 21 seconds
    8000 rows --> 1.3 minutes
    17000 rows --> 6 minutes
    Here is the script :
    main()
    display dialog "Done"
    on main()
          script o
                property patientSNP_list : {}
                property relativeSNP_list : {}
                property resultsList : {}
                property copyAnswerList : {}
                on findLookAtWhole(value) -- case sensitive
                      set {low, high} to {1, count my relativeSNP_list}
                      considering case
                            repeat while low ≠ high
                                  set mid_ to (low + high) div 2
                                  if value is in items low thru mid_ of my relativeSNP_list then
                                        set high to mid_
                                  else
                                        set low to mid_ + 1
                                  end if
                            end repeat
                      end considering
                      if (item low of my relativeSNP_list is value) then
                            set end of my resultsList to item low of my copyAnswerList
                      else
                            set end of my resultsList to {"no"}
                      end if
                end findLookAtWhole
          end script
          --opens File1.  Names it patientName
          set patientFile to choose file with prompt "Please select the patient Excel file:"
          set patientName to name of (info for patientFile)
          tell application "Microsoft Excel"
                open patientFile
                set thepatientFile to workbook patientName
                set patientSheet to sheet (name of active sheet) of thepatientFile
          end tell
          --This Dialog assigns where the data is stored for file1
          display dialog "What Column is your patient SNP data of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set PatientSNPCol to (text returned of the result)
          --This Dialog assigns what row your data starts at for file1
          display dialog "What row does your patient SNP data start in the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set patientSNPRow to (text returned of the result)
          set patientStartCell to PatientSNPCol & patientSNPRow
          --This Dialog assigns the last row of data for file1
          display dialog "What row is the last row of you patient SNP data start of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set patientLastRow to (text returned of the result)
          set patientLastCell to PatientSNPCol & patientLastRow
          --This Dialog assigns the location of the data copied from file2
          display dialog "What column would you like the results of this program stored in of the" & " " & patientName & " " & "excel file." default answer "" buttons {"submit"} default button 1
          set resultsLocation to (text returned of the result)
          --opens File2.  Names it relativeName
          set relativeFile to choose file with prompt "Please select the relative Excel file:"
          set relativeName to name of (info for relativeFile)
          tell application "Microsoft Excel"
                open relativeFile
                set therelativeFile to workbook relativeName
                set relativeSheet to sheet (name of active sheet) of therelativeFile
          end tell
          --This dialog assigns the column of data in file2
          display dialog "What Column is your relative SNP data of the " & " " & relativeName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
          set relativeSNPCol to (text returned of the result)
          --This dialog assigns the column of data begining copied to excel file1.
          display dialog "What Column contains the data you would like copied to the " & " " & patientName & " " & "excel file in column" & " " & resultsLocation & " " & "?" default answer "" buttons {"submit"} default button 1
          set copyAnswer to (text returned of the result)
          tell application "Microsoft Excel" -- get values
                set o's patientSNP_list to value of range (PatientSNPCol & patientSNPRow & ":" & PatientSNPCol & patientLastRow) of patientSheet
                set lastrow to first row index of (last cell of used range of relativeSheet)
                set o's relativeSNP_list to value of range (relativeSNPCol & "1:" & relativeSNPCol & lastrow) of relativeSheet
                set o's copyAnswerList to value of range (copyAnswer & "1:" & copyAnswer & lastrow) of relativeSheet
          end tell
          set tc to (count o's relativeSNP_list)
          repeat with i from 1 to tc --convert list of lists to one list
                set item i of o's relativeSNP_list to item 1 of item i of o's relativeSNP_list
          end repeat
          set tc to (count o's patientSNP_list)
          repeat with i from 1 to tc -- AppleScript find method, not the Excel Find
                o's findLookAtWhole(item 1 of (item i of o's patientSNP_list))
          end repeat
          tell application "Microsoft Excel" -- set values
                set value of range (resultsLocation & patientSNPRow & ":" & resultsLocation & patientLastRow) of patientSheet to o's resultsList
          end tell
    end main
    If you have lots of rows and you want it to go faster.
    I have another script that uses the power of (/usr/bin/awk and his associative arrays) in a do shell script
    17000 rows --> awk : 2 seconds, applescript : 6 seconds, total : 8 seconds
    34000 rows --> awk : 3 seconds, applescript : 11 seconds, total : 14 seconds

  • Why is the Find command in Notes always disabled?

    I would like to be able to locate text inside of notes in the Mac OS X version of Notes. The Find, Find Next, Find Previous, and Find Selected Text commands all exist in the Edit>Find sub-menu but they're always disabled. Is there something wrong with my installation of Mountain Lion or are these commands always disabled? How can I enable these Find commands in Notes?

    Entering text in the search sidebar filters the notes containing the text entered in the box, but it does not enable the Find commands nor highlight the text within the note. If you want to find the desired text within a very long note —and I'm sure we all have a few— you must copy the text into another application and use that application's Find command, make your changes, then paste the text back into the note.
    My question still stands. How can I enable the Find command which exists in Notes but which is always disabled? Is this simply a feature that was planned but never implemented? If the command was never intended to work in Notes, why was it included in the menu? Finally, since the Find command is standard in every other text editor, why would it not be included in Notes?
    As a Mac developer, I'm tempted to try and hack it into working, but I'd rather not have to.

  • Disable the find command

    Hi All,
    I am using Adobe Acrobat 3D, and i need to secure my pdf documents so that users will be unable to use the "find" and directly get to the point.
    Is there any solution for that???????
    Thank You.

    This is the command that is endlessly repeated:
    Sun Jul 22 20:01:28 mm-computer com.apple.launchd[1] (com.google.keystone.daemon[565]) <Warning>: Exited with exit code: 1
    Sun Jul 22 20:01:28 mm-computer com.apple.launchd[1] (com.google.keystone.daemon) <Warning>: Throttling respawn: Will start in 10 seconds
    Sun Jul 22 20:01:38 mm-computer com.apple.launchd[1] (com.google.keystone.daemon[566]) <Warning>: Exited with exit code: 1
    Sun Jul 22 20:01:38 mm-computer com.apple.launchd[1] (com.google.keystone.daemon) <Warning>: Throttling respawn: Will start in 10 seconds
    Sun Jul 22 20:01:48 mm-computer com.apple.launchd[1] (com.google.keystone.daemon[567]) <Warning>: Exited with exit code: 1
    Sun Jul 22 20:01:48 mm-computer com.apple.launchd[1] (com.google.keystone.daemon) <Warning>: Throttling respawn: Will start in 10 seconds
    After trying ds store's suggestion, I continue to receive the 'throttling respawn' every 10 seconds, but now with the addition of "No such file or directory'
    7/28/12 2:25:19 PM
    com.apple.launchd[1]
    (com.google.keystone.daemon[19996]) Exited with exit code: 1
    7/28/12 2:25:19 PM
    com.apple.launchd[1]
    (com.google.keystone.daemon) Throttling respawn: Will start in 10 seconds
    7/28/12 2:25:29 PM
    com.apple.launchd[1]
    (com.google.keystone.daemon[19997]) posix_spawn("/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/C ontents/MacOS/GoogleSoftwareUpdateDaemon", ...): No such file or directory

  • The Find command on the Edit menu doesn't work. No window in which to enter the word(s) I wish to find opens up.

    When I go to edit and click find no window opens and so I can not enter the word(s) that I am searching for on the webpage. The same result comes with using Ctrl+f. Infact, when I click on the edit menu, I noticed that Find is not followed by the usual .... Does that mean that the Find feature is not part of this newer version of Firefox and if so why?

    If you use Edit > Find or Ctrl+F then you should see a Find bar at the bottom of the browser window. Current Firefox versions do not show a pop-up window.

  • A Unix question: find command

    Hi all,
    Sorry for posting a Unix question here.
    In the following directory I have:
    /opt/SonicSoftware/SonicMQ/samples/TopicPubSub/DurableChat>ls
    DurableChat.class DurableChat.java Readme.txt
    However, if I try:
    /opt/SonicSoftware>find -iname DurableChat.class
    The path can not be found, it just gives me the prompt back; I don't know what the reason is. Any idea?

    I'm just wondering can the symbolic link be the
    reason that class file can not be found (I guess, not
    though, b/c other classes can be found):What do you mean "not found"?
    Do you mean why the find command isn't finding it? Yes, that's why. But now that you know, you can use -follow.
    Or do you mean the VM is unable to find the class at runtime? I'm almost certain the classloader can follow symbolic links in the classpath, so I don't think that's the problem.
    >
    /opt/SonicSoftware/SonicMQ/samples/TopicPubSub/Chat>..
    /../SonicMQ.sh DurableChat -u AlwaysUp
    Exception in thread "main"
    java.lang.NoClassDefFoundError: DurableChat
    Should I change the path that it won't be symbolic
    anymore?Try it and see if it fixes it. I'd be surprised, but you never know. If making it not a link fixes it, then maybe that's what you have to do. If it doesn't fix it, then you know you have to look somewhere else.

  • The cursor "jumps out" of the find box before search line is completed?

    I frequently use "find" command..... what happens VERY frequently is that the cursor "Jumps out" of the find command box prior to my finishing the search letters......... Firefox wants to locate ANY item with only a few matching intro letters........... This is VERY annoying.... I do believe that Firefox should be changed so the find search will be executed when "enter" is keyed.........

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")<br />

  • Find command puzzle

    After reading the help file and searching this forum, I'm still puzzled about the "find" command. My understanding is that I can enter a filename or a keyword, with the appropriate other modifiers selected, and that image or group of images should appear in the library showing in the center of my screen. However, it appears to take no action.
    Can anyone help figure out what steps I am forgetting? Thanks

    1) Thanks, I finally got a runtime error from probably not waiting long enough.
    2) now it shows a selection of 32 out of xxx
    3) I tested a keyword.
    I closed and reopened LR and it appears to be working. I also think I failed to use the enter key to activate the request. Seems simle enough but didn't realize that part. Other commands are actuated upon clicking elsewhere.
    Thanks, you got me there and I appreciate it.

  • "Find " command andshell scripting

    hi,
    I recently tried to write a shell script that looks in a directory and deletes all files matching a certain pattern which are more than 45 days old.
    I used the "find" command. the problem is that the find command recursively searches all the subdirectories present. I NEED TO RESTRICT THIS AND ENSURE THAT THE SEARCH IS RESTRICTED TO THE SPECIFIED DIRECTORY ONLY.
    the script is as follows:
    for file in `find . -mtime +15 -print`
    do
    if [ -f $file ]
    then
    echo "Removing $file that existed more than 15 days."
    rm $file
    #use mv command to some temp dir for testing
    fi
    done.
    I am on a solaris 5.6 machine and need help that will work on that version. I tried other commands such as locate and glimpse but the ksh does not seem to recognze tham at all. Also there is man page entry for these commands.
    In solaris, the find command comes with an option called -depth that restricts the depth of the search but i am not able to work it. The man pages abt this option says:
    -depth : Always true; causes descent of the directory
    hierarchy to be done so that all entries in a
    directory are acted on before the directory
    itself. This can be useful when find is used
    does anyone know how to work this?
    Also, the man page mentions that the depth is determined by an environment variable PATH_MAX. I am not able toset this variable. The man page for that says:
    find will be able to descend to arbitrary depths in a file hierarchy and will not fail due to path length limitations (unless a path operand specified by the application exceeds PATH_MAX requirements).
    Can someone tell me how to restrict this?
    I would appreciate it if you could cc a copy to my mail id :[email protected] as i have a lot of trouble accessing the net
    Regards,
    Sailesh

    hi
    i got a way but why dont you break it in to two scripts first script will search for the file path and redirects in to a file and then when its search is end start the removing your file by grep the file path from that file i think its simple

  • Deploying an Application to a APEX 3.1.1 Runtime Environment

    Hello Everyone,
    I'm trying to work out how to deploy an application from a development to runtime environment but am facing a few issues / uncertainty and would appreciate any input/help on this. To begin with here is my environment:
    - Apex 3.1.1
    - Two Oracle 9i (9.2.0.8) instances running on different hosts (development environment on host AA and runtime environment on host BB)
    - Using the Oracle 9i HTTP Server with mod_plsql (on both hosts)
    - DEVLWS workspace +(on development env)+
    - DEVSCHEMA schema +(on development env)+
    - USER01 - non-developer & non-admin user +(on development env)+
    - DEV01 - developer and admin user +(on development env)+
    I'm performing this test deployment with the downloaded application Timesheets from apex.oracle.com with the application ID of 111 (when imported into my development environment).
    Situation:_
    I have no issues on the development environment. I can import the Timesheet app into it and run it using either the USER01 or DEV01 ID as it was imported into the DEVSCHEMA schema. However, when I try to deploy over to my runtime environment, here is where things gets sketchy on this.
    1) In order to get this application (Timesheets) to run properly on my runtime environment, I've to perform a Oracle9i EXP of my DEVSCHEMA objects and import this into my runtime environment using the IMP utility to get the proper workspace and associated objects over,
    --> I tried exporting the workspace on the development env but even after running it on the runtime env, I was not able to get the application to run (missing workspace schema, users etc).
    2) From my development environment, I export the Timesheet app with supporting objects option and on the runtime environment, I use SQL*Plus as such:
    SQL> alter session set current_schema=FLOWS_030100;
    SQL> @f111.sql
    Once the script completes, I use the http://hostBB:7776/pls/apex/f?p=111.1 url and was able to get in to the application, however I found things like the images are missing and I've to manually export these again from the development env and run the generated SQL script file on my runtime env.
    Is there a better (and documented step by step) way of doing this kind of deployment? The Apex User Guides talks about creating a packaged application but I didn't see this as a way to deploy specifically into a runtime environment as I followed it and still had missing images. When I did the export of the Timesheet application, I used the DEV01 id and made sure I selected the 'with supporting objects' option but yet I've to do most of the steps manually (i.e. build the schema, tablespace, application tables via exp/imp) and again the images were not included.
    Is there a document / note available that discusses this in better detail (deploy from Development env to Runtime env) so that I can do cut down the manual steps and making sure that my developers can effectively deploy our apps with minimal fuss and headaches? Appreciate any input.

    ...I've to perform a Oracle9i EXP of my DEVSCHEMA objects and import this into my runtime environment using the IMP utility to get the proper workspace and associated objects over,...
    EXP/IMP will not do workspaces. You can use the Application Express apex_admin application to export a workspace to a file. Then, in a runtime environment, you can install that workspace file using SQL*Plus. This way of
    creating the workspace also ensures that it will have the same workspace ID as it did in the original database, making possible the installation of exported applications from application export files from the original
    workspace into the new workspace having the same workspace ID and also where the installed applications are to have their original application IDs.
    ... and still had missing images. When I did the export of the Timesheet application, I used the DEV01 id and made sure I selected the 'with supporting objects' option but yet I've to do most of the steps manually (i.e. build the schema, tablespace, application tables via exp/imp) and again the images were not included.
    Images aren't part of application exports. Exporting the images to a file and then installing them using that file and SQL*Plus is the way to do it.
    As Patrick mentioned, running the application export file in SQL*Plus doesn't run the supporting objects script. It creates the script in the datbase. But in a runtime environment you can't run the script because the runtime environment lacks the Application Builder.
    SQL> alter session set current_schema=FLOWS_030100;
    SQL> @f111.sql
    You can install applications by connecting as a less privileged schema. Any schema assigned to the workspace into which the application is to be installed will do. To install workspace export files (or applications), you can also use a schema that has been granted the role APEX_ADMINISTRATOR_ROLE.
    Scott

  • How to  Connect to ftp server in active mode using the finder

    How can I can I use the finder command "connect to server" to connect to a ftp server using the active Mode. With Cyberduck I can connect to this server only in active mode. Apparently the connect to server command uses the ftp passive mode.
    Or is it an other way to mount on the desktop a ftp server in active mode?
    Thank you

    Passive mode can be disabled in your network settings, but I have a feeling what you're actually asking for is the ability to upload, and the answer to that is the Finder can't do it. There are some filesystem plugins out there that provide this functionality, but they cost money.

Maybe you are looking for