Is there a function that will retrieve working directory?

I'm writing an application that conjugates Spanish and I'm putting all irregulars into different databases according to their tense. The databases will list the information on what kind of irregular it is as well as other things. In the end there will be two applications, one that conjugates the verbs, and one that i am going to design to update the databases e.g. add new words, change rules, etc. The problem i have is that i would like this application to work not only on my computer but also anyone i want to give it to so they can use it to help study. The only thing is, i don't want to hard-code the path of the databases into my program so, I'm wondering if there's a function that could obtain the directory of say the .java file that is being ran. That way, i could use that directory to construct the path to the databases, and also, it wouldn't be hard to go from one computer to another. The only system requirements would be that the computer has the jdk installed. I don't want to do anything fancy, no packaging or compiling into an executable, or compiling into a .jar or compiling an auto-installer. I simply want the end result to be a folder with the .java files and the databases. then, i can include a readme that tells how to use javac to compile the application, and a batch file that simply has the command: java filename.java.
Thanks for your time,
lateralus

Is your data read only? If so you should treat is as a "resource", e.g. use getResourceAsStream() from the a class or classloader to access it. That will look for it in the same place that the .class files live.

Similar Messages

  • Function Module that will retrieve the parameters for a given function Modu

    Hi
    We have a requirement where we will be calling Function Module that will be maintained in a table entry. How we will determine what is the parameters that is required by this function module. Is there a FM that will suffice the requirement.
    Thanks in advance
    arghadip

    Hi,
    You have to write a custom code for that. Use the table FUPARAREF to retrieve the parameters for a function module. Give function module name as input.
    Pls reward points if solved your issue.
    Regards,
    Renjith Michael.

  • I have an iphone 4s, I installed Vtok but the video chatting part of the app is not working when I try to chat with my husband through gmail on his PC. Can I fix this or is there another app that will let me chat with my gmail chat contacts?

    Vtok video chatting is not working on my iphone 4s. When I try to do a video chat with my gmail chat contacts who are using a PC we each only get the voice part of the chat and no video. Is there some way to fix this or is there another program that will let me video chat with my gmail chat contacts? Thank you.

    You can not merge accounts.
    Apps are tied to the Apple ID used to download them, you can not transfer them.

  • Do I have to buy Lion or snow lepoard or is there a way to updated from OS X 10.4.11?? I have a new ipod that will not work without the ne itunes, but the new itunes will not install without a newer vesion of Max OS X. Help please :)

    Do I have to buy Lion or snow lepoard or is there a way to updated from OS X 10.4.11?? I have a new ipod that will not work without the ne itunes, but the new itunes will not install without a newer vesion of Max OS X. Help please

    Need to know your Mac model. If it's a PowerPC, the max OS is Leopard 10.5.x. If it's an Intel procesor, you can upgrade to Snow Leopard (for $29) & later to Lion.
    *Mac OS X 10.5 Leopard installation system requirements*
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store *but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753)*.
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
     Cheers, Tom

  • Is there any app that will make an Iphone4 work as SIRI does on my 4S. Thanks.

    Is there any app that will make an Iphone 4 work as Siri does on a 4S? Thank you. Bob.

    The closest thing that I know of may be an app called VLingo
    http://www.vlingo.com/
    https://itunes.apple.com/us/app/vlingo-voice-app/id297214191?mt=8

  • In the garage I have a Netgear Router. it is connected by a ethernet cable, I have a 1tb drive that I want to use there. On the drive there is only a USB port. on the Netgear there is only ethernet ports. is there an adapter that will work for that?

    In the garage I have a Netgear Router. it is connected by a ethernet cable, I have a 1tb drive that I want to use there. On the drive there is only a USB port. on the Netgear there is only ethernet ports. is there an adapter that will work for that?

    It's not that simple. You need a "smart" device to connect a hard drive to, like a Time Capsule, or another computer, or an Airport Extreme/Express that was made to share a drive, or some other brand router that has a USB port for sharing a drive, etc.

  • Am I candidate for QT Pro, or is there something else that will work better

    Hello,
    So, I've been playing a bit with some short home video stuff - and now that we actually have some space to burn in iDisk - I would like to start uploading some video to our iWeb sites.
    Upon my first attempt of doing such - I was met with a pop-up window in iWeb that told me the file was huge - and I would be best to convert it in QT Pro by way of exporting it. When I tried to do such via the export option - it was greyed out, that is unless I purchase the Pro version.
    My question is - do I really need to purchase additional software to do this, and if so - is QT pro the program to go with, or is there something else that will be able to do what I need for the very limited amount of "video" that I plan to do?
    Thanx,
    -A-

    Assuming you edited in iLife ,e.g. iMovie you can export to QT formats from there vs. paying for QT Pro, opening and then exporting from QT which will just do the same thing with some more options.
    Idea: Open the file in MPEG Streamclip (free) and you can export to various iTunes formats without knowing a thing about exporting and pay zero for the privilege and probably do a better job of it. Use Streamclip version 1.9b3 , export to MPEG-4 and then press the iTunes button and pick a format you like. You will find even the basic to iPod setting at 320X240 will make very good quality videos that upscale to 640X480 well and are nicely small.

  • Is there a function that uses Get_DAQ_De​vice_Info - device_typ​e_code to get info

    Is there a function that uses Get_DAQ_Device_Info - device_type_code to get info on the hardware characteristics such as a list of available gains or A/D converter resolution?

    Duncan;
    When calling Get_DAQ_Device_Info we get most of the information for our board. For example: the base address, calibration status, counter type, serial number, device type code, DMA and Interrupt levels, etc.
    At this moment we do not have any function that will let us know the number of channels of a certain device and the configuration mode supported by the board.
    However, you can use the Init_DA_Boards to retrieve what type of board is installed on the machine at a given time, and to have a look up table with the available gains for the possible boards that can be used on your application.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • CS4 will not open Nikon D7000 NEF files; Is there a DNC that will open them?

    I have CS4 and Light Room 2
    Apparently there is no Camera Raw update for the new Nikon D7000 NEF files for CS4.
    I therefore down loaded the Adobe Digital Negative Converter Verson 6.3.0.79 which is compatible with Camera Raw 5.4 or later. 
    Using that DNC, when I do step 1, "Select the images to convert" I get the message "No items match your search".  It apparently is not recongnizing the D7000 NEF files.
    Is there another DNC that will open and convert the D7000 NEF files?

    I just bought the d7000 yesterday and was experiencing the same issue with cs4. I downloaded the DNG converter from adobe and selected the whole folder where the raw files were located (I was unable to select individual images) and it worked fine. It processed the files one by one with new name (without the $500 CS5 pricetag for now). The DNG files open in bridge and psd. Perhaps try selecting the folder?  Good luck.

  • I have a large wrist (10.0" around).  Is there a band that will fit me?

    I have a large wrist (10.0" around).  Is there a band that will fit me?

    I have 230mm wrist. Sounds like you have 254mm wrist. I believe the large leather band may work for you. I encourage you to try it on in store first.
    I can only just get the milanese loop over my hand.
    The classic buckle I have to do up on the last hole and it has no length in the band to create more holes.
    Note: if the classic buckle did not do up for me, I was prepared to go and by a matching 3rd party watch band (20mm width) and make an extension strap from it. I.e. cut the new band two about two inches long and punch a hole in it and fit it between the two parts of the Apple Classic Buckle band.
    Or, wait for 3rd party adapters to start shipping so you can fit any normal watch band to the Apple Watch.

  • Please Help regard function that will return values of each JComboBox items

    I'd like to create a function that will return values of each item on the JComboBox at a time when
    I click on each item of a comboBox. I had this following codes, but didn't work.
    Please help me !!!Please correct it... thanks a million
    String wp;
    String text;
    String A[] = {"WARNIGNS","CAUTIONS","NOTES"};
    JComboBox ABC = new JComboBox();
    for (int i=0;i<A.length;i++) {
    ABC.addItem (A);
    text = Get_It(); //assigns each value of JComboBox's item to variable text when clicks at each item
    //of a comboBOx
    private String Get_It(){
    ABC.addActionListener(new ActionListener (){
    public void actionPerformed(ActionEvent e){
    wp = (String)CBweapon.getSelectedItem() ;
    return wp;

    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class AlertFrame extends JFrame {
    String s_alert[] ={"WARNIGNS","CAUTIONS","NOTES"};
    JComboBox CBweapon;
    String wpText;
    public AlertFrame() {
    super("Alerts");
    Container contentPane = getContentPane();
    contentPane.setLayout(null);
    setSize(600,600);
    CBweapon = new JComboBox();
    for (int i=0;i<s_weapon.length;i++) {
    CBweapon.addItem (s_weapon);
    contentPane.add(CBweapon);
    CBweapon.setActionCommand("");
    //set position for components
    CBweapon.setBounds(370 + insets.left,295+ insets.top, 150,30);
    System.out.println(getit()); //calling getit() function
    //this function will be return a String of JcomboBOx value if click on each item of combobox
    private String getit(){
    CBweapon.addActionListener( new ActionListener (){
    public void actionPerformed(ActionEvent e){
    wpText = (String)CBweapon.getSelectedItem() ;
    return wpText;
    public static void main(String args[]) {
    AlertFrame af = new AlertFrame();
    af.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    **I have no errors on compile or run, but it didn't return a string value to System.out.println(getit());
    It maybe because of the "void" of public void actionPerformed(ActionEvent e){
    wpText = (String)CBweapon.getSelectedItem() ;
    Please help me

  • Is there a calculation that will automatically turn a whole number into a percentage or decimal poin

    For example I have a formula where I need to input the sales tax.  Currently they only way it works is if I input it in decimal form.  Is there a formula that will calculate that for me?  So rather then inputting .06 I can just type 6%.

    Actually you could  add an additional item
    Sales Tax Percentage  (could be place anywhere on the Form)
    then change tax formula to  Tax = (Subtotal * (Sales Tax*0.01))
    I'll see if I can create a sample  PDF
    Okay here is sample:
    https://acrobat.com/?d=U5lHNjlDgJD3Zc666qVrLw
    Your welcome to download  see how I created the calculations.
    I'm sure someone else will come along and suggest a simplified method. I choose this method so that a number for the Sales Tax per could be entered per area. It could be renamed VAT for Europe.  and if it uses 1/2 percentages change format for 1 decimal place.
    OH Command+D (Mac)  Is Properties for entire form. Not individual cells to do that In Form Fomatting click on Item with Control key pressed down. When Context menu pops up choose Properties. Then you can set properties for individual form fields.
    I've updated the test form now all calculation work as they should. (had to rename some field names)

  • Is there a tutorial that will help in creating a RS232 driver?

    I am attempting to write a driver / VI that will control an Animatics "SmartMoter" via a RS232 port.  I was able to download sub VI's from www.summerfiles.com. 
    Is there a tutorial that will help in creating a driver for a RS232 port?  I take it that I will need to connect these sub vi's in a correct sequence to be able to communicate through the RS232 port.
    Thanks,
    Bill

    It seems that what you downloaded is a driver. What you need to determine is how to use the functions on the driver to create a high level application. There is a tutorial at http://zone.ni.com/devzone/cda/tut/p/id/2804 that might be useful. The driver you downloaded is lacking in several areas. One of which is documention. Each VI should include a description of what it is and what it does. Each control/indicator should also include a description. I could not find any such information in these VIs. I didn't look at everything because the horrid front panel colors in the SmartMotor.llb was giving me a headache. I did see a VI called SM Tester. This appears to be a high level example that you could use as a model.

  • Is there any function that output address by inputing the address no.?

    Is there any function that accept an address number as input paramenter and return an address so that I don't need to build it myself?
    Thanks!

    FU ADDRESS_INTO_PRINTFORM        ADDRESS_TYPE
    Text
    Address type: 1,2,3 or ' '(default)
    Description
    There are three address types:
    Address type '1': 'Normal' address (company or organization); the address structure used in most SAP applications as 'Address'.
    Address type '2': Address of a person
    Address type '3': Work address, usually the address of a contact person in a company
    The default address type SPACE is treated as type '1' and is required for the upwards compatibility of the function module.
    The interface parameters ADRSWA_IN and ADRSWA_OUT are only used in address type SPACE.
    The other address types use:
    ADDRESS_1 or ADDRESS_2 or ADDRESS_3 for the attributes, and
    SENDER_COUNTRY, RECEIVER_LANGUAGE, NUMBER_OF_LINES, STREET_HAS_PRIORITY and LINE_PRIORITY for control.
    The parameters COUNTRY_NAME_IN_RECEIVER_LANGU, LANGUAGE_FOR_COUNTRY_NAME and NO_UPPER_CASE_FOR_CITY are address type-independent.
    The address attributes can be read directly instead of being passed in the structures ADDRESS1/2/3, if the address is in the Central Address Management tables.
    The Business Address Services keys must be passed instead of the structures ADDRESS1/2/3:
    Address type 1: ADDRESS_NUMBER
    Address type 2: ADDRESS_NUMBER and PERSON_NUMBER
    Address type 3: ADDRESS_NUMBER and PERSON_NUMBER
    The following parameters are used (Import) or filled (Export):
    Address type 1
    Import parameters:
    ADDRESS_1
    ADDRESS_TYPE
    ADDRESS_NUMBER
    SENDER_COUNTRY
    RECEIVER_LANGUAGE
    NUMBER_OF_LINES
    STREET_HAS_PRIORITY
    LINE_PRIORITY
    COUNTRY_NAME_IN_RECEIVER_LANGU
    LANGUAGE_FOR_COUNTRY_NAME
    NO_UPPER_CASE_FOR_CITY
    Export parameters:
    ADDRESS_PRINTFORM
    ADDRESS_SHORT_FORM
    ADDRESS_SHORT_FORM_S
    ADDRESS_DATA_CARRIER
    ADDRESS_DATA_CARRIER_0
    NUMBER_OF_USED_LINES
    NAME_IS_EMPTY
    ADDRESS_NOT_FOUND
    ADDRESS_PRINTFORM_TABLE
    Address type 2
    Import parameters:
    ADDRESS_2
    ADDRESS_TYPE
    ADDRESS_NUMBER und PERSON_NUMBER
    SENDER_COUNTRY
    RECEIVER_LANGUAGE
    NUMBER_OF_LINES
    STREET_HAS_PRIORITY
    LINE_PRIORITY
    COUNTRY_NAME_IN_RECEIVER_LANGU
    LANGUAGE_FOR_COUNTRY_NAME
    NO_UPPER_CASE_FOR_CITY
    Export parameters:
    ADDRESS_PRINTFORM
    ADDRESS_SHORT_FORM
    ADDRESS_SHORT_FORM_S
    ADDRESS_DATA_CARRIER
    ADDRESS_DATA_CARRIER_0
    NUMBER_OF_USED_LINES
    NAME_IS_EMPTY
    ADDRESS_NOT_FOUND
    ADDRESS_PRINTFORM_TABLE
    Address type 3
    Import parameters:
    ADDRESS_3
    ADDRESS_TYPE
    ADDRESS_NUMBER und PERSON_NUMBER
    SENDER_COUNTRY
    RECEIVER_LANGUAGE
    NUMBER_OF_LINES
    STREET_HAS_PRIORITY
    LINE_PRIORITY
    COUNTRY_NAME_IN_RECEIVER_LANGU
    LANGUAGE_FOR_COUNTRY_NAME
    NO_UPPER_CASE_FOR_CITY
    Export parameters:
    ADDRESS_PRINTFORM
    ADDRESS_SHORT_FORM
    ADDRESS_SHORT_FORM_S
    ADDRESS_DATA_CARRIER
    ADDRESS_DATA_CARRIER_0
    NUMBER_OF_USED_LINES
    NAME_IS_EMPTY
    ADDRESS_NOT_FOUND
    ADDRESS_PRINTFORM_TABLE
    Address type SPACE (default value; the previous interface up to Release 3.0B):
    Import parameters:
    ADRSWA_IN
    ADDRESS_TYPE
    ADDRESS_NUMBER (only for special cases such as Japan)
    COUNTRY_NAME_IN_RECEIVER_LANGU
    LANGUAGE_FOR_COUNTRY_NAME
    NO_UPPER_CASE_FOR_CITY
    Export parameters:
    ADRSWA_OUT
    NAME_IS_EMPTY
    ADDRESS_PRINTFORM_TABLE
    The following parameters correspond to each other (on the left the individual parameter - on the right the fields in the old interface structures ADRSWA_IN and ADRSWA_OUT):
    ADDRESS_NUMBER                   -   no equivalent
    PERSON_NUMBER                    -   no equivalent
    SENDER_COUNTRY                   -   ADRSWA_IN-INLND
    RECEIVER_LANGUAGE               -   ADRSWA_IN-SPRAS
    NUMBER_OF_LINES                 -   ADRSWA_IN-ANZZL
    STREET_HAS_PRIORITY             -   ADRSWA_IN-WAREN
    LINE_PRIORITY                    -   ADRSWA_IN-PRIOR
    COUNTRY_NAME_IN_RECEIVER_LANGU  -   no equivalent
    LANGUAGE_FOR_COUNTRY_NAME       -   no equivalent
    NO_UPPER_CASE_FOR_CITY          -   no equivalent
    ADDRESS_SHORT_FORM              -   ADRSWA_OUT-LINEK
    ADDRESS_SHORT_FORM_S            -   no equivalent
    ADDRESS_DATA_CARRIER            -   ADRSWA_OUT-LINED
    ADDRESS_DATA_CARRIER_0          -   ADRSWA_OUT-LINED0
    NUMBER_OF_USED_LINES            -   ADRSWA_OUT-ANZZL
    NAME_IS_EMPTY                    -   no equivalent
    ADDRESS_NOT_FOUND               -   no equivalent
    ADDRESS_PRINTFORM_TABLE         -   no equivalent
    The parameters are described in the parameter documentation.

  • Is there an App that will sync with microsoft outlook calender?

    Is there an App that will sync with microsoft outlook calender?

    OK here is a problem I have with my calender- all the events are added mutible times for each event- at least 4 of each. So how do I get all of these mutiable events down to just one event. Now this also includes hollidays and personel events  on the calender from outlook. All this I think happened after sync to Cloud- not sure, could have happened after OS 5 update!!! Now this is on my iPhone 4. Now going to my calender on my home computer in outlook no events or holidays are showing in the outlook my calender. If I go to the icloud calender it has mutiable events and holidays like on my iPhone. Now how do I fix this without causing a problem with my other programs?

Maybe you are looking for

  • Troubles by changing the size of a bookmark header text Repot generation Toolkit

    Hello everyone I'm having  troubles getting the size of  a header text formatted into a different font size, I attach the code I'm using to get the work done. At the end I get all I want from the report generation toolkit but the text size in the hea

  • Iweb site works in safari but not netsape or explorer

    I just found out the site i had up doesnt work in explorer or safari, it comes up, but all the navigation tabs are gone so there is no way to get from page to page... I looked at the same site an older verson on my HD done with iweb o7 and it works f

  • Can't parse xml file in jar file when  can't connect to web server

    My JNLP application throw ConnectException when trying to parse xml during web server offline. Steps, 1. JNLP application has been launched once and all related jar and xml files are already downloaded to local cache. 2. Then I close web server to te

  • Editing Fields not working in Adobe 9 Standard

    I imported a word doc and am trying to make a form out of it with fill-in fields.  When I am creating the fields, they all show up blue with a red border.  I tried to go in and edit them and although it "takes" my settings when I go back to the form

  • Hi experts only  dialog prog

    hi experts i would like to know how to disable a pushbutton in dialog progr initially when the prog is executed. i have to show 2 push buttons on application tool bar, one of them is active and the other is not active . after execution when active bu