How can I specify...

How can I specify an exact location for a data file? The program that reads the file has this as a constructor:
public VocabularyWordRW (String fileName) {
fname = fileName;
list = null;
Whenever I call new VocabularyWordRW ("data1"); (which is the name of the file). I get a "File Not Found"
message. It usually works on a Unix machine as long as I'm running it from the directory it's in.
I tried putting the file in both c:\ and c:\englishDrill, which is the location of the program, but it still didn't work.
Thanks for your help.
-Chris

The reason you need to use two backslashes, for exampe "C:\\blah\\datafile", is that the backslash character is a special escape character in Java - you use it to specify special characters. For example "\n" in a string in your source code means the newline character.

Similar Messages

  • How can we specify the Mailbox for Notes?

    In Mail.app, how can we specify the Mailbox for Notes (where the new notes will be resided)? It is now 'On My Mac'. I wish to change to my IMAP Mailbox so it sync with my iPhone by just checking email (not by syncing on iTunes).
    Thanks in advance.
    Message was edited by: Ekapon

    You could use the DecimalFormat or NumberFormat to do the job.
    double number 1234.567;
    DecimalForamt df = new DecimalFormat("###.##");
    String s = df.format(number);or
    double number 1234.567;
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(2);
    /* if needed.
       nf.setMaximumIntegerDigits(value);
       nf.setMinimumFractionDigits(value);
       nf.setMinimumIntegerDigits(value); */
    String s = nf.format(number);I didn't test the codes but they should work. For more information, please consult the documentations.

  • How Can i specify multiple server names in rwservlet.properties  file?

    How Can i specify multiple server names in rwservlet.properties file without clustering?
    I am using oracle 10g Application server. we have 3 servers Repsvr1, RepSvr2 and RepSvr3. Now i need to configure rwservlet.properties file to point to these servers based on any running report. i got 3 keymap files with reports info.
    Sample entry in the key map file is:
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    rwservlet.properties file letting me to enter only one servername. Even though i merged all 3 keymap files into 1, still i have the server name issue. If i leave the server to the default name still i am getting the below error.
    REP-51002: Bind to Reports Server Repsvr1 failed. However, i know the default rep_<servername> would be used incase we dont have SERVER=<value> parameter in the rwservlet.properties file.
    If i specify the servername in the rwservlet.properties file then only Repsvr1 reports are working fine and other 2 server reports are giving the same error like
    REP-51002: Bind to Reports Server <<Server Name>> failed.
    how can i configure the info which will work all 3 reports. 2 Port servers are invoking using oracle forms and report server is invoking using ASP pages.
    If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error, whenever i am trying to integrate all 3 to workable i am getting binding error. if i exclude the server from rwservlet.properties still i am getting the same error.

    My RELOAD_KEYMAP setting is YES only.As i said If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error.
    keymap file entries
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    If i use http://server.domain:port/reports/rwservlet? cmdkey = key1 should bring the report from Repsvr1 and http://server.domain:port/reports/rwservlet? cmdkey = key2 should bring the report from Repsvr2, but i am getting an error from Repsvr2 saying that REP-51002: Bind to Reports Server repsvr2 failed.
    Only Servername Repsvr1 is in rwservlet.properties file. Now what is the best option to by pass the server from rwservlet.properties file and should be from keymap file. if i comment server name in rwservlet.properties file still i am getting REP-51002: Bind to Reports Server <<Server Name>> failed error for both keys.

  • How can I specify the default tab in a CHM Output?

    My company uses CHM-based help for some of its products. We build the CHM files from RoboHelp 9, and while these CHM files don't really have a full Index attached to them, the Index tab shows up in the output anyway. Unfortunately, we are suddenly seeing that when the CHM file is launched from our program, the Index tab is displayed by default. We'd rather have the Contents tab be the default look, especially considering that the Index does not exist.
    I have poked around into how you can specify a default tab for a CHM file, and the only information I have found suggests that using a CHM file creates a file (HH.dat) that specifies which tab should be displayed on a user-by-user basis, and that the last tab displayed when you close the CHM should be the first one displayed when you re-open it. While this is true if you open the CHM independent from the product, when you launch it from our program, it's all Index, all the time.
    So, my question is: How can I specify the default tab for a CHM file? Or, failing that, how can I excise the Index tab from my CHM output.

    Hi there
    This will be something up to your application developer to resolve. When s/he issues the call to open the CHM, there are parameters that may be used to always open with the desired tab "in front".
    Point your developer to the link below and advise that s/he is most likely interested in the section titled: Programming Tips.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How can I specify an SFTP directory path that has spaces in it?

    The directory (path) on my SFTP server has spaces in some of the folder names: e.g. /data/Cisco Products/UC Applications/
    How can I specify this path in the directory field of a remote server definition if I want to upload files from my SFTP server to the CUCM?
    I've tried surrounding the whole path in quotes, %, *, backslash space, point, hash...running out of things to try. Must be possible...surely?!#
    Thank-you
    -Rob.

    I haven't tried this but when i hit tab to auto complete on a linux machine i notice a space and backslash between two words. I can see you tried backslash space. Try space backspace - <word><space><backslash><word>

  • How can I specify the path in Form Builder 9.0

    Hi, everyone,
    could anybody tell me how can I specify the path in Form Buidler 9.0? there is problems when I want to attach library in form builder. thanks to Kuldeep RAwat and Natalia Vidal, I know I should specify the path, but I still don't know how to specify, how can I do?
    besides, when I run a form, sometime there will be a warnig:
    Please acknowledge message
    what's that meaning?
    thank you very much for your great help

    Shay Shmeltzer thank you very much for your so quickly response. I have modified the file and my form can run now!
    but, when I open my form, it always suggest me:
    FRM-10102: Cannot attach PL/SQL library TalbotStandard. This library attachment will be lost if the module is saved.
    so everytime I open my form, I must attach the library manully. I don't know the reason. do you know that or anybody else knows that? thank you very much!
    have a good weekend :-)

  • How can user specify HAVING clause in Interactive Report

    How can user specify HAVING clause in Interactive Report after making the group by selection? Under Actions/Format, the user sees just the Group By-Sort and Group By options.

    Hi ,
    Thanks for your information.
    I am new to the APEX.*i need to show Progress bar while opening the each page* then user can know some process is happening from the backside and i don't know where i need to add and call the below function.could you please provide the steps for the progress bar.
    In my application there are almost 100 pages are there so, i need to show progress bar on each page while opening .could you please provide Global function to call on each page.
    function html_url_Progress(pThis){ 
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //doSubmit('APPLY_CHANGES');
    redirect(pUrl);
    Regards
    Narender B

  • JDev TP3 / UML Class Diagram / How can I specify a derivative attribute?

    Hello,
    I'm trying to put derivatives (or calculated) attributes such as "age" or "price" in a class of UML diagram. In all of UML books that I've seen, a derivative attribute is represented with a "/" and the attribute's name. For example, "/age" or "/price". But in the class diagram of JDeveloper I can't put "/" in the name of attribute. So, how can I specify a derivative attribute?
    Thanks in advance,
    JVN

    Unfortunately, it is not possible to denote derived attributes in TP3. Bug 6915067 has been logged to address this in a future version.
    Thanks, Guus (JDev PM)

  • How can i specify username/password while creating a virtual directory

    Hi,
    i m trying to create a virtual directory in 9iAS on a mapped drive. How can i specify which username password to use to enable to connect to the network mapped drive. Is there any way where we can specify username / password ???
    thanks
    Unmesh

    9iAS R1
    Run the report service as a local account with administrator rights.
    On the target server, create a local account with the same user name and password.
    Now you can use the hidden shares ($) for example:
    &destype=file&desname=\\servername\d$\report_output\report.pdf
    9iAS R2 and 10g
    Pretty much the same thing except by default, the report server runs inline. I have not been able to get the entire service to run as a particular user. To get around this, I created a report server service and do not run the reports in process. It uses the separate service.
    rwserver -install rep90_name
    edit <ORACLE_HOME>\reports\conf\rwservlet.properties file.
    SERVER_IN_PROCESS=NO
    SERVER=rep90_name
    Edit service for rep90_name and change it to run as local administrator user you created on both servers and then start the service.

  • How can I specify SMTP Email Server userID and password when using Email VIs?

    How can I specify SMTP Email Server userID and password when using Email VIs included in Internet Toolkit?

    Hi,
    A similar question was posted on Discussion Forums soem time back. Please see the link below.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C7B00000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    You would find the last post in the above thread quite useful where it has a link to OpenG code. I am also copying that link for your reference.
    http://www.openg.org/tiki/tiki-index.php?page=OpenG+Internet+Connectivity+Tools
    Please feel free to respond to this post with any questions/comments you may have.
    Regards,
    Ankita A.
    National Instruments

  • How can I specify the attribute AU_SIZE in OUI

    Hello,
    How can I specify the AU_SIZE when i create the disk group for OCR and Voting disk when i install the GI home.
    Basically i want to create the Disk group with AU_SIZE as 4MB when i create it Via OUI.I know I can edit the attributes when i do using ASMCA.But not sure about OUI.
    Please can someone guide me ?
    Regards
    Joe

    Hi Joe,
    Did you mean that i will need to move the OCR/voting **** to another diskgroup -> drop the one created during installtion -> recrerate the diskgroup with AU_SIZE as desired Yes.. you must move OCR, VOTING and ASM SPFILE to another diskgroup and recreate the diskgroup.
    Doc said : Oracle recommends that the allocation unit (AU) size for a disk group be set to 4 megabytes (MB).
    I do not see benefits to configure the AU SIZE 4MBytes for diskgroup that will store only Clusterware Files.
    The voting files are stored directly on ASM Disk (i.e not use AU SIZE). The OCR File and ASM SPFILE use AU SIZE, but are not frequently accessed (low I/O) and files are too small to configure AU to 4MBytes.
    Set AU SIZE makes a difference when you do need high I/O throughput. i.e: Used to Diskgroup that will store Datafiles.
    I recommend you read my point of view how to store VOTING Files, OCR and ASM SPFILE on ASM.
    Re: 3rd voting disk on nfs share
    Regards,
    Levi Pereira

  • When opening a new tab, how can I specify a site or empty? My tabs open to a site I don't want to see.

    When opening a new tab, how can I specify a site, homepage or empty? My new tabs open to a site I don't want to see.

    A new tab opens by default as a blank tab (about:blank).
    If that isn't the case then an extension has changed that behavior.
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    You can middle-click or hold down Ctrl and left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at this extension to set which page to open in a new tab:
    *NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/

  • How can we specify the number of decimals to be printed

    How can we specify the number of decimals to be printed
    such as "%5.2d" in C.
    Can anyone help me

    You could use the DecimalFormat or NumberFormat to do the job.
    double number 1234.567;
    DecimalForamt df = new DecimalFormat("###.##");
    String s = df.format(number);or
    double number 1234.567;
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(2);
    /* if needed.
       nf.setMaximumIntegerDigits(value);
       nf.setMinimumFractionDigits(value);
       nf.setMinimumIntegerDigits(value); */
    String s = nf.format(number);I didn't test the codes but they should work. For more information, please consult the documentations.

  • How can I specify UK web sites without having to reload firefox and typing in search criteria again. I can still do this on Internet Explorer

    How can I specify UK web sites only when searching in Google. I can still do this using the sidebar on Internet Explorer but not on Firefox

    This has been going on for months for me. Time to drop Firefox & go back to IE.

  • How can we specify the order of the predicates execution?

    I am going to write the following query
    select answer, answer_id from surveys s join answers a on s.survey_id = a.survey_seq_id
    where question_uid = 206400374 and insertdate = to_date('31/12/2012') and answer > 0;However, when I look at the execution plan, I see that the last predicate (to_number(answer) > 0) has been executed the first. Henceforth, it checks many rows first. Normally, 75 rows belong to 31/12/2012 as you see from the following. Can I specify the execution order?
    select count(*) from surveys s join answers a on s.survey_id = a.survey_seq_id
    where question_uid = 206400374 and insertdate = to_date('31/12/2012');
    COUNT(*)
    75If so, how? Because, the type of answer is varchar2 and some of answers contain text characters such as 'Yes' or 'No'. Therefore, before 31/12/2012 some answers contain 'Yes' or 'No'. However in 31/12/2012 all answers are numeric.
    Plan hash value: 3217836037
    | Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |         |     2 |    68 |  9401   (1)| 00:01:53 |
    |*  1 |  HASH JOIN         |         |     2 |    68 |  9401   (1)| 00:01:53 |
    |*  2 |   TABLE ACCESS FULL| SURVEYS |     2 |    26 |   239   (1)| 00:00:03 |
    |*  3 |   TABLE ACCESS FULL| ANSWERS |   337 |  7077 |  9162   (1)| 00:01:50 |
    Predicate Information (identified by operation id):
       1 - access("S"."SURVEY_ID"="A"."SURVEY_SEQ_ID")
       2 - filter("S"."INSERTDATE"=TO_DATE(' 2012-12-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
       3 - filter("A"."QUESTION_UID"=206400374 AND
                  TO_NUMBER("A"."ANSWER")>0)
    select distinct answer from surveys s join answers a on s.survey_id = a.survey_seq_id
    where question_uid = 206400374 and insertdate = to_date('31/12/2012');
    ANSWER
    1
    3
    0
    2And, also I can execute the following query without any error
    select to_number(answer) from surveys s join answers a on s.survey_id = a.survey_seq_id
    where question_uid = 206400374 and insertdate = to_date('31/12/2012');

    In answer to your original question:
    970992 wrote:
    However, when I look at the execution plan, I see that the last predicate (to_number(answer) > 0) has been executed the first. Henceforth, it checks many rows first. Normally, 75 rows belong to 31/12/2012 as you see from the following. Can I specify the execution order?According to the execution plan, it will do a full scan of surveys using the predicate on insertdate to build the (presumably in-memory) hash table (hash based on survey_id) to do the joins (Step 2). Then, it does a full scan of the answers table using the question_uid and answer predicates (Step 3). For each row it finds that matches those predicate, it will prpobe the hash table created in step 2 using the hashed value of survey_seq_id. So, it is doing the insertdate predicate first.
    In answer to your last post
    970992 wrote:
    >
    First of all i would get rid of the implizit type conversion:
    TO_NUMBER("A"."ANSWER")>0)it is not implicit conversion, I reckon it is explicit type conversion, isnt it?
    No, it is an implicit type conversion. Your code says answer > 0, since the answer column is a varchar2 column, Oracle implicitly converts the answer column to a number to compare against the number on the right side of the comparison. Note that if something like 'A' ever becomes a valid answer, then this query will fail with ORA-01722: invalid number.
    >
    >
    Obviously "A"."ANSWER" is not a number colmun, problably varchar, so use something like
    A.ANSWER != "0"
    or
    A.ANSWER > "0"Yes answer column is varchar2 but can you type A.ANSWER > "0" as a predicate? I mean, you can not varchar > varchar, can you?
    Of course you can use inequality predicates on a varcahr column. Is the string A greater than the string B?
    Based on the explain plan, your statistics might be a little off, not hugely so. The esitmates are at least in the right order of magnitude based on what you have posted so far.
    What indexes, if any, are available on the two tables?
    John

Maybe you are looking for