How to set the initial directory

Using the FileChooser in JavaFX 2.0. How do you correctly set the initial directory?
In Swing you would do the following:
JFileChooser Choose = new JFileChooser();
Choose.setCurrentDirectory(new File("."));But in JavaFX:
Choose.setInitialDirectory(new File("."));does not work and causes JavaFX to bomb out when this code is triggered.
Edited by: 863626 on 30-Oct-2011 05:30

javafx.stage.FileChooser choose = newjavafx.stage.FileChooser();
File d = new File(getClass().getResource(".").getFile());
choose.setInitialDirectory(d);

Similar Messages

  • How to set the target directory from source filename using adaptor module.

    Hi,
    How im using a logical bypass scenario.I have to set the target directory using the sorce filename.There is no chance of using a Java UDF as my scenario does not have a Mapping(as it is a Bypass Scenario).The only option that i got is to use a Adaptor module.Can anyone help  me this.
    Thanks,
    Bhargav

    Hi,
    See this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/61e1407e858031e10000000a1550b0/content.htm
    hope it helps.
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.

  • How to set the working directory for reports in linux

    Hi All,
    Can you anyone help me to set the working directory for oracle application server 10g reports? I am using RHEL4 and AS10g. Actually i want to run my reports from my define
    working directory. How can I do this?
    Thanks in advance
    Arif

    Hi,
    your rep_srv.conf should look like something like
    +<?xml version = '1.0' encoding = 'ISO-8859-1'?>+
    +<!DOCTYPE server PUBLIC "-//Oracle Corp.//DTD Reports Server Configuration //EN" "file:D:\oracle\FRHome_1/reports/dtd/rwserverconf.dtd">+
    +<server version="10.1.2.0.2">+
    +<!--Please do not change the id for reports engine.-->+
    +<!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->+
    +<cache class="oracle.reports.cache.RWCache">+
    +<property name="cacheSize" value="50"/>+
    +<!--property name="cacheDir" value="your cache directory"-->+
    +<!--property name="maxCacheFileNumber" value="max number of cache files"-->+
    +<!--property name="ignoreParameters" value="parameter names to be ignored in constructing cache key, separated by comma ','"-->+
    +</cache>+
    +<engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="3" minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="90000" jvmOptions="-Xmx512M -Xss512K">+
    +<!--property name="sourceDir" value="your reports source directory"/-->+
    +<!--property name="tempDir" value="your reports temp directory"/-->+
    +<!--property name="keepConnection" value="yes"/-->+
    +</engine>+
    +...+
    some more definitions
    +..+
    +<!--pluginParam name="proxy" type="file">proxyinfo.xml</pluginParam-->+
    +<pluginParam name="xmlpds" type="file">xmlpds.conf</pluginParam>+
    +<pluginParam name="jdbcpds" type="file">jdbcpds.conf</pluginParam>+
    +<pluginParam name="textpds" type="file">textpds.conf</pluginParam>+
    *<environment id="APP1">*
    *+<envVariable name="REPORTS_PATH" value="/application1/reports"/>+*
    *+</environment>+*
    *+<environment id="APP2">+*
    *+<envVariable name="REPORTS_PATH" value="/application2/reports"/>+*
    +</environment>+
    +</server>+
    The environment ids you can choose yourself and you have to put them in there yourself too (here I put two environments for two different applications "1" and "2").
    If you call a report from Forms, then you have to code something like
    ADD_PARAMETER(p_list,'ENVID',TEXT_PARAMETER,'APP1');
    Details depend on how you call your reports, my example is for using a parameter list and calling a report out of application1
    Hope that helps.
    Volker

  • How to set the initial Quota Planning in CRM Pipeline Performance Mgmt

    We have just installed CRM 7.0
    When I go to PPM --> Quota Planning,  all the initial figures are zeros.
    Next from top menu I click on "Generate Quota" and from the the popup I pick a sles team memeber, and I try to generate Quota
    The Err I get is
    1) "Quota plan generation failed for Michael Cutis"
    2) No quota exists for 2008 for Micahael Curtis ..... generation  for 2009 not possible"
    My question how and where do I set the initial quota value for the previous year so that I can generate quota for this year ?
    Regards,
    Surajit Roy

    Hello Surajit,
    The generate quota functionality of PPM can be used to generate quota for a fiscal based on the quota of the previous fiscal year. For example, if a rep A has been given a target of $100 for fiscal year 2009, then you can give the growth factor as 10 % and then the system can generate a quota of $110 for rep A for fiscal year 2010.
    Coming to how quota can be set up for a fiscal year manually, you can set 5 different types of quotas in the quota planning application. Total Sales Volume, Product Sales Volume, Product Category Sales Volume, Product Units and Product category untis. If you click on the one click edit button against any of the users in the actions column, system will navigate to a detailed quota planning page, where you can set all these types of targets. Alternatively, if you are just interested in Total Sales Volume Target, you can use the table view in the Quota planning page to plan the targets.
    You can refer to my blog on this topic for further information.
    /people/krantikiran.avadhanula/blog/2009/07/30/identifying-gaps-in-sales-pipeline
    Thanks and Regards,
    Kranti

  • How to set the initial value of of a poplist dynamical

    Hi,
    I've got a poplist that is populated by a recordgroup. This is done by the following pre-form trigger:
    DECLARE
         l_query_ok NUMBER;
         l_group_id RecordGroup;
         l_it_id     item;
         l_int_value VARCHAR2(2);
    BEGIN
         l_it_id := Find_item('MERGED_ISSUER.product_code');
         l_group_id := FIND_GROUP('RG_PRODUCT_CODE');
         l_query_ok := POPULATE_GROUP(l_group_id);
         -- Populate list 'Product Code'
         CLEAR_LIST (l_it_id);
         POPULATE_LIST(l_it_id,l_group_id);
    END;
    I've tried to set the initial value by adding following lines to the trigger above but I receive the frm-41084 error. This code assigns the first value of the recordgroup to a hidden text item. In the properties of the poplist the value of the hidden text field is set as initial value.
    -- Set initial value
    l_int_value := Get_Group_Char_Cell('RG_PRODUCT_CODE', 1);
    :MERGED_ISSUER.int_value := l_int_value;
    Any help?
    thx

    Hello Ken,
    you can set an initial value for a poplist with the copy command.
    You could use a procedure like this:
    PROCEDURE P_FILL_LBX
         lbx_ITEM_IN                 VARCHAR2,
         grp_DATA_GROUP_IN  VARCHAR2,
         flg_DEL_NULL              BOOLEAN,
         str_WERT_IN               VARCHAR2
    ) IS
      ERROR_ID NUMBER;
    BEGIN
      CLEAR_LIST(lbx_ITEM_IN);
      ERROR_ID := populate_group(grp_DATA_GROUP_IN);
      populate_list(lbx_ITEM_IN,grp_DATA_GROUP_IN);
      IF flg_DEL_NULL = TRUE THEN
        DELETE_LIST_ELEMENT(lbx_ITEM_IN,GET_LIST_ELEMENT_COUNT(lbx_ITEM_IN));
      END IF;
      IF str_WERT_IN IS NOT NULL THEN
        COPY(str_WERT_IN,''||lbx_ITEM_IN||'');
      END IF;
    END;Bernd

  • How to set the defualt directory of where to look for a file to read

    I am reading a file from a servlet. I wanted to see where Tomcat would write the file if I didn't specify a path. The results surprised me. It wrote the file in: "C:\Documents and Settings\myusername\Start Menu\Programs\Apache Tomcat 4.1". So I looked through server.xml to see if perhaps this path was set there but didn't find anything. I right clicked on the "Start Tomcat" target to see its properties and there it was. There was a field "Start in:" and it contained the aforementioned path. I changed it to what I wanted but there has to be a way to set this in server.xml. How do I do this. my guess would be something like :
    "<Context path="" docBase="c:/theDefaultDirectory" debug="0"/>", but this didn't work. Any light on this subject would GREATLY be appreciatted,
    silas

    Well, actually, it opens file where the process is currently located on your fileSystem. since you seems to be using windows, the process is started in the directory written in the "Starts In" field. Now you could use the command line (the ugly MSDOS like window), go to some directory and starts the tomcat process from there, and the files would be created in that place.
    The docBase tells where tomcat should look when looking for pages (html jsp, etc...). If you want to use it, you can still refers to it as :
    new File (yourServlet.getServletConfig().getContextPath("/myfile.txt"))Another track to check would be to look in the System.getProperties. There has to be some property that gives the current JVM path, try to change it to the location you'd like it to be and see if it conforms to how you'd like to see it works.
    Still, remember that you can have multiple Context in your servlet container, so there's no reason for tomcat to set the JVM default path to the docBase from one or another (File is a global JVM utility, not a J2EE only feature !!).

  • How to set the deployment directory ?

    Hi all,
    I am using Sun One Studio 3.0 with iWS6.0.
    For every new application that I write, compile and execute,
    it is getting deployed to the same
    directory.
    Because Sun One Studio is always using the same directory,
    for every application I have
    to manually delete the deployment directory.
    Is there any way to set different deployment
    directory for every new application that I write ?
    If yes, how to do this ?
    Thanks
    Swap

    I dont have the product installed, so I cannot try it right now. But I think the context root is part of the directory name in which the application is deployed. By default the context root is empty. If you change that, your application would be deployed in a different directory. To change context root, right click on WEB-INF node, and select "Properties" from the menu.
    Alternatively, you could try changing the directory name by right-clicking on the web.xml node under WEB-INF. You should see an iWS tab on the property sheet, where you could enter a directory name.

  • How to Set The Initial Value of selectinputdate Component

    I set the the initial value by
    public void setSelectInputDate1(CoreSelectInputDate selectInputDate1) {
    this.selectInputDate1 = selectInputDate1;
    java.util.Date v_tarih = new java.util.Date();
    this.selectInputDate1.setValue(v_tarih);
    But when I change the value of selectinputdate and refresh the page it gives the warning
    2006-11-18 19:21:35.562 WARNING JBO-25009: 25.11.2006 19:17 oracle.jbo.domain.Date object cannot be created
    2006-11-18 19:21:35.562 WARNING java.lang.IllegalArgumentException.
    What is the reason?
    Thanks...

    Hi Turhan Tekin,
    this post may be helpful for you:
    Re: setting value of select input date adf component programmaticaly
    Regards,
    Luis R.

  • How to set the initial path of a Select File dialog.

    I'm using the Flex3 File.browseForOpen() method.  I'm opening a xml file; but I want to seed a path to the open dialog so used don't have to do much file navigation.   Is there a way to specify a path that the file browser starts in?
    Thanks.
    -Hays

    Answering my own question.
    var file:File = File.desktopDirectory; //this is the initial dirrectory as long as it's valid
    file:File.addEventListener(Event.SELECT, newXMLSelected);
    file:File.browseForOpen("XML", [new FileFilter("XML", "*.xml")]);

  • When I open a pdf file in Firefox and then save, how do I set the initial directory to be closer to what I want instead of a temp directory?

    When I choose to save a pdf file directly when using Firefox, it works perfectly. However, when I choose to open a pdf instead and then save it, the save directly displayed will always be a temp directory and it would be more convenient for me to choose a directory closer to where most of my files normally go. How do I change this?

    Hi,
    I partially answered your question in another posting but I feel that you´re in the wrong forum for your problem. This is for BSP development and you talk about CRM.

  • How to set the Initial path in the FILE name field of a JFilechooser?

    as title
    thx...

    try this....
    File file =null;
    JFileChooser fileDemo=new JFileChooser();
    fileDemo.setCurrentDirectory(new File("e:\\test"));
    instead of "e:\\test" you can specify your path.

  • How do I set the initial servlet pool size in WL 5.1

              In WL 4.5, I can set the initial servlet pool size using the
              weblogic.httpd.servlet.SingleThreadedModelPoolSize. I tried to set this property in WL 5.1, and get an "Found undeclared property..." message when booting WL. Is this feature still supported in WL 5.1? If so, how do I set it?
              Thankx
              

    It appears that pool size of 5 is hardcoded somewhere - no matter where you specify
              weblogic.httpd.servlet.SingleThreadedModelPoolSize, the following test servlet:
              import javax.servlet.*;
              import javax.servlet.http.*;
              public class SingleT extends HttpServlet implements SingleThreadModel {
              static int instanceCount = 0;
              public SingleT() {
              super();
              System.out.println("Instance " + (++instanceCount) + " created");
              always produces:
              Instance 1 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 2 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 3 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 4 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Instance 5 created
              Wed Nov 01 11:15:36 PST 2000:<I> <ServletContext-General> SingleT: init
              Joe Trung <[email protected]> wrote:
              > Hi Huy,
              > There are lot of 'undeclared' stuffes if you move from 451 to 51.
              > However, if you run WLS with
              > '-Dweblogic.httpd.servlet.SingleThreadedModelPoolSize=10'
              > You will get what you want. I think BEA has moved this option to the <System props>, no more in its <config>
              > Joe
              > "Huy Pham" <[email protected]> wrote:
              >>
              >>In WL 4.5, I can set the initial servlet pool size using the
              >>weblogic.httpd.servlet.SingleThreadedModelPoolSize. I tried to set this property in WL 5.1, and get an "Found undeclared property..." message when booting WL. Is this feature still supported in WL 5.1? If so, how do I set it?
              >>
              >>Thankx
              Dimitri
              

  • How to set the  Upload Destination Directory for RichFileUpload ?

    Hi! I'm using the RichFile Upload component for uploading the files to server..
    I have configured the file the size to be uploaded, but could not set the destination directory... The web.xml entries I have in my project is:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 500K -->
    <param-value>512000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 5,000K -->
    <param-value>5120000000</param-value>
    </context-param>
    <context-param>
    <!-- directory to store temporary files -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR</param-name>
    <!-- Use an ADFUploads subdirectory of /tmp -->
    <param-value>/tmp/TrinidadUploads/</param-value>
    </context-param>
    <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    By default the uploaded files are stored in :
    /u01/home/developer/.jdeveloper/system11.1.1.0.17.45.24/o.j2ee/embedded-oc4j/config
    I'm using Linux OS and JDev11g .
    Why is the desination directory configured in web.xml not being used?
    Am I doing any thing wrong?
    Any suggestions ?
    Thanking you,
    Samba

    Hi! Ric,
    This is the entire web.xml :
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 500K -->
    <param-value>512000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 5,000K -->
    <param-value>5120000000</param-value>
    </context-param>
    <context-param>
    <!-- directory to store temporary files -->
    <param-name>org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR</param-name>
    <!-- Use an ADFUploads subdirectory of /tmp -->
    <param-value>/tmp/TrinidadUploads/</param-value>
    </context-param>
    <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/afr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/SessionEJBLocal</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>com.prapansol.demos.SessionEJBLocal</local>
    <ejb-link>SessionEJB</ejb-link>
    </ejb-local-ref>
    </web-app>
    And about the other details you asked :
    1. I'm not using any custom UploadFileProcessors.. I'm using the default one.
    2. I tried with and with out the TrinidadUploads directory
    But still the same effect!
    Can you suggest where I'm going wrong?
    Thankyou
    Samba

  • How to set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

Maybe you are looking for

  • Customize the Word Templates?

    Is it possible to customize the existing or build new Word templates to be used when publishing to Word? Thanks! Rory

  • Document Listener for JTextArea in JTable

    I am trying to implement a DocumentListener for JTextArea in JTable, but its not happening. Can someone tell me what's wrong. SSCCE below. import java.awt.Component; import java.awt.Dimension; import java.awt.event.WindowAdapter; import java.awt.even

  • WebDynpro Development Technical Specification Document

    I am developing some custom screens using WebDynpro for our Project.  I am looking for a template for Technical Specification document for WD development.  I searched in SDN an Service market but could not find any.  I only found a naming convention

  • Submit Z program in lsmw

    Hi all, I need to run a Z program right after a LSMW. I've tried to insert a "submit ZPROG" in the LSMW "end_of_transaction" step but it doesn't work. Does somebody has an idea if it's possible ? Or, is there any workaround ? Thanks in advance for yo

  • Cancelation of QA lots whic are in LTCA Status

    Hi All, Lots are coming to quality in LTCA status after lot canceled by lot creator. So this list has become big in volume & it is observed in QA32 as pending with Quality Inspection. So please suggest how to remove such lots from QA32. Arun