Referring to data files contained in the application JAR file

Hello

My application needs referencing files in folders that are part of the application JAR. I have tested locally with NetBeans and it works fine. However, during the launch of the server, the application search for files in the downloads directory (where the JNLP file is saved for the launch). How can I get the application to search for files in the JAR file, where they reside? TIA!

Bob

FractalBob wrote:
.. AHA! Thank you! It's exactly what I'm looking for.

Please mark my answer as "correct". ;)

Tags: Java

Similar Questions

  • Critical error in QML, module 'bb.data' is not installed, the application will not start

    Hello

    I'm trying to do something similar to the example here:

    https://developer.BlackBerry.com/Cascades/reference/bb__data__xmldataaccess.html

    I learned to expect problems with the QML preview, but this error occurs when you try to launch the application on my device of DevAlpha!  The exact errors are:

    Critical: bb::cascades::QmlDocument: error when loading QML from:   QUrl( "file:///apps/com.example.rim/native/assets//main.qml" )
    Critical:   --- errors:  (file:///apps/com.example.rim/native/assets//main.qml:3:1: module "bb.data" is not installed
        import bb.data 1.0
        ^)
    Critical: bb::cascades::QmlDocument:createRootObject document is not loaded or has errors, can't create root
    

    Note that I added the lbbdata - for the LIBS in my .pro file, so there should be no reason why the app cannont find bb.data!  Has anyone else seen this problem or found a solution?  It is essentially blocking any progress on my app!

    Thank you

    Nick

    try to including this line in your hand:

    BB::data:ataSource::registerQmlTypes();

    the notes say that this has been deprecated in version gold but it doesn't seem to be the case... I created a new project using the sdk of gold and had the same problem you did if I used a data source class above the fixed line!

    false documents:

    https://developer.BlackBerry.com/Cascades/documentation/dev/upgrading/index.html

  • VP1 is unable to connect to Data Mover not at the Application Designer

    Hello
    On 8; 42; 15 tools on a win 2003 server, DB oracle 9i:
    SYSADM can connect via Data Mover, but VP1 can not:
    Invalid user ID and password for the access code.

    I don't know password. I've updated with encryption = 0 and password and as sysadm run:

    encrypt_password *;

    in Data Mover.
    Also:
    SQL > select acctlock from the sysadm.psoprdefn where oprid = 'VP1 ";

    ACCTLOCK
    ----------
    0

    What else to check.

    For the moment unable to connect via the application designer. With the same error message.
    Thanks for the help.

    Have you set the connectid and the connectid Word both in configuration manager (pscfg.exe)?
    Are you able to connect to the database with the people of the user? And be connected with people, able to interview PSSTATUS, PSACCESSPRFL, and PSOPRDEFN (prefixed by the name of the owner of the tables)?
    PS user exist? Is there a table PSDBOWNER containing the name of the database?

    Nicolas.

  • A question for shared in 2 data source model of the application of the project in JDEV11

    Hi all
    My application has the following structure:

    ...
    | _Model_A
    | ...
    | | _Application-module-1
    | | _Application-module-2
    |
    | _ViewController_A
    | ...
    |
    | _Model_B
    | ...
    | | _Application-module-1
    | | _Application-module-3
    |
    | _ViewController_B
    ...

    As you can see, there are 2 projects of model and they share an Application Module: Application-Module-1

    I created 3 branches: APPDS_1, APPDS_2, APPDS_3. When you set up these 3 AMs in the model project, then select "JDBC URL" as the type of connection, both applications can work properly, say, source of data/JNDI are correctly at the launch of the JDEV 11 apps. Then, when select 'JDBC Data Source' as connection type, that is to say, use it as the source of data for Application-Module-1, both Model_A and Model_B: java: comp/env/jdbc/APPDS_1, app B throws an error:

    oracle.jbo.DMLException: Houston-27200: failure JNDI. Impossible to research data Source in the context...

    but app has still works.

    play with the value of data source in the Model_B for Application-Module-1, it is that set the JDBC data source "* jdbc / APPDS_1 *" make a app B! But, as far as I know, the correct value for 'JDBC Data Source' in 11g should be: java: comp/env/jdbc/APPDS_1.

    This really disturbs me. Why would this happen? Is it because that the Model_B use the same name that Model_A, IE. Application-Module-1?

    Just tried to rename it to Model_B so request-Module-1 becomes application-Module-4, still got the same error.


    Thank you
    Shawn

    Published by: shawn_abc on June 13, 2012 15:19

    # The best way is to use jdbc/APPDS_1

    The initial prefix part of the Datasource resource tree.
    Read here, http://www.coderanch.com/t/316003/EJB-JEE/java/lookup-java-comp

  • Single database session by user in the Application of the ADF/BC

    Hi, I use ADF with BC (JDeveloper 11.1.1.1). My application will contain several application modules, each connected to the same JDBC data source. On the application server, I configured the data source to use the identity function connection pooling.

    My current Setup translates many sessions of database for each user. I have an obligation to use only a single database session by user HTTP session. Is it possible to configure the application modules to achieve this?

    Thank you
    Brad

    Hello

    use a single root module Am and make sure that the others are used as nested modules. This will create a single connection

    Frank

  • can I manually add a workout to the application of the activity (e.g. swimming when I'm not wearing the watch)

    Can I manually add a workout (such as swimming when I don't wear the watch) to the application of the activity?

    Hello

    It is not possible to add workouts directly in the implementation of the activity.

    Health and fitness data Apple Watch, iPhone and any other source are rather grouped by health on your iPhone app. Combined data is reflected in the application of health dashboard, which adjusts the results to avoid any double counting of data from different sources.

    To add a workout:

    -On your iPhone, in the application of health (icon: red heart on a white background), go to: data on health (tab) > Fitness > training > tap Add a data Point > enter the result of your workout.

  • Event ID 10016 - the application-specific permission settings do not local Activation permission for the COM with the CLSID server application

    Lately, I'm getting this system error a lot now that I've upgraded to Windows 8 Pro is an event DistributedCom 10016 ID. Here is the text of the error:

    The application-specific permission settings do not local Activation permission for the COM with the CLSID server application

    {D63B10C5-BB46-4990-A94F-E40B9D520160}

    and APPID

    {9CA88EE3-ACB7-47C8-AFC4-AB702511C276}

    the user NT AUTHORITY\SYSTEM SID (S-1-5-18) from the address LocalHost (using LRPC) running in the container of the application unavailable SID (not available). This security permission can be modified using the Component Services administrative tool.

    Anyone has an idea why I get this error?
    Walt

    Same thing here. Grayed. Windows 8.1 seems to fill the observer of events with many more errors than previous versions.

    Edit: OK, discovered why it is grayed out. There are 2 reg key, you must set permissions before going to the Configuration of DCOM in component services. The CLSID key and the APPID key.

    From another forum, although it applies to a different application, same principle:

    1. open Regedit.
    2. go in HKEY_Classes_Root\CLSID\ * CLSID *.
    Note: * CLSID * stand for the ID that appears in your event viewer error. In your case, it is {C2F03A33-21F5-47FA-B4BB-156362A2F239}.
    3. right-click on it and select authorization.
    4. click on Advance and change owner to administrator. Also click on the box that will appear below the threshold of owner.
    5. apply a full control.
    6. close the tab, then go to HKEY_LocalMachine\Software\Classes\AppID\ * APPID *.
    Note: * AppID * is the ID that appears in your event viewer. In your case, it is {316CDED5-E4AE-4B15-9113-7055D84DCC97}.
    7 right-click on it and select authorization.
    8. click on Advance and change the owner to administrators.
    9. click on the box that will appear below the line owner.
    10. click on apply and grant full control to the administrators.
    11. close all tabs and navigate to the administration tool.
    12. open component services.
    13. click on the computer, click my computer, and then click DCOM.
    14 find the corresponding service that appears on the display of the error.
    15. right-click on it, and then click Properties.
    16. click the Security tab, and then click Add a user. Add the SYSTEM and then apply.
    17. check enable local.

    Then use the relevant keys here and the DCOM Config utility should give you access greyed onareas:

    CLSID:

    {D63B10C5-BB46-4990-A94F-E40B9D520160}

    and APPID

    {9CA88EE3-ACB7-47C8-AFC4-AB702511C276}

  • Ways to put the application in read-only during the monthly maintenance mode

    Hello

    We have a situation where, during the maintenance phase every month for 2 or 3 days, I need to put the application in read mode only. We already have the dimension security level applied to each user, but even to users who have write access to certain members on the forms of data etc., the app just can't be read only during this period so that no user can enter data.

    I know the application in maintenance mode, all users will be be locked is not what we want. Users should always be able to see the dataforms, reports, etc. So, please let me know your ideas on this.

    Any ideas are appreciated.
    ~ Hervé

    The same question was asked the other day - How can I request a read-only?

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • the windows boot configuration data file does not contain a valid entry os

    Hello

    I got this message when recovery... I can't get the windows... I have the CD recovery, but when I boot it... It gives me this message

    the windows boot configuration data file does not contain a valid entry os

     


    How do I solve this problem

    Hello

    Assuming that it's just a problem with the recovery media, here's another solution, you can try.

    Before you try the following, make sure that you can always read the character product activation key 25 on your label Windows COA (5 blocks of 5 alphanumeric games).

    An example of a COA label can be seen here.

    You can create a Windows 7 installation disc yourself using another PC - just download the good Disk Image ( it must be the same version that originally shipped with your laptop - IE if your laptop comes with Windows 7 Home Premium, that is the file you need to download ) from the link below and use an app like ImgBurn to burn the ISO correctly file on a blank DVD - a guide on the use of ImgBurn to write an ISO on a disc is here.  The source of the Image is - Digital River.

    Images of Windows 7.

    Use the disk to perform the installation, enter the activation key of Windows on the label of the COA at the request and once the installation is complete, use ' 'phone Method' described in detail in the link below to activate the operating system -this made method supported by Microsoft and is popular with people who want to just have a new installation of Windows 7 without additional software load normally comes with OEM installations.

    http://www.kodyaz.com/articles/how-to-activate-Windows-7-by-phone.aspx

    All pilots additional and the software you may need are located by entering your full model number or Nr here.

    Kind regards

    DP - K

  • Data file associated with the application of deployment

    I have a file of data/database (~ 256 k) I would like to include with my application, but not as a resource file.

    I know that I can group as a resource, but I want to change the file because the application is used, so may not be part of the cod file.

    I am currently thinking of the deployment of the application without the data file, and then let the app to download the data file on first use, or as a background thread (in which I may have to provide some stupid message).  I hope not to make one of these.

    Instead, is it possible to deploy the application with a file that will be written in the memory of the device (file:///store) as 1 a download?  If this is not the case, what are some viable approaches to this problem.

    Maybe this:

    http://supportforums.BlackBerry.com/T5/Java-development/resource-Installer-to-SD-card-application-SA...

    Downloading in the app is I think a different approach (and that I took).

  • Unable to start Win8. Error: "0xc0000098. "The boot configuration data file contains no valid information for an operating system".

    Original title: Windows 8 will not start

    I have a pre installed Windows 8 pro and have therefore no disks in the system. It does not start, but I get a message from the "Windows Boot Manager" with the message "Windows couldn't boot...". «, etc, etc and told to contact the ' system administrator or computer manufacturer...» "then the information:
    File: \BCD
    Status: 0xc0000098
    Info: the boot configuration data file contains no valid information for an operating system.

    How can I get it back? Can I get a system disk or can I do?

    Hi David,

    Thank you for getting back to us with additional information.

    If you have another computer with Windows 7 or Vista installed, you can create Windows 8 DVD installation of this system. But you need to get the product key Windows 8 of the manufacturer of the computer. Please refer to this link and create a DVD of Windows 8.

    http://Windows.Microsoft.com/en-us/Windows-8/create-reset-refresh-media

    Hope this information is useful.

  • The Boot Configuration data file contains no valid information for an operating system

    I have a Toshiba Satellite C55 B5200 running Windows 8.1 pre-installed. How ever when I boot, I get the Boot Configuration Data file does not contain valid information for an operating system to file: \BCD error Code: 0xc0000098

    If I do a usb on a friends computer system recovery, it will affect the recovery of my computer? I don't have product key windows 8 as it was preinstalled. If I go down to the store, buy Windows 8.1 will be this also fixes my problem? Any help is appreciated

    Hello

    Please refer to this and see if it helps:

    http://www.thewindowsclub.com/0xc0000098-error-Windows-8-help

    Hope this helps, good luck :)

  • I accidentally the application data file in my windows 8. Help, please.

    I accidentally the application data file in my windows 8 accordingly the tile on the start menu is missing only the office and the store remained, I lost too much profile in other games, how to restore lost especially applications apps built in? Help, please.

    Hello

    Please check section of applications that the built-in apps still exists or not. This will clear if the built-in apps are only missing the start screen or permanently missing. If you find them, re-PIN. If you can't find them, Refresh and they all will be back over your app so lost data file.
    Here's how to Update:
    Hope this helps, good luck :)
  • Download of AIR for IOS via the Application Loader I get the following error - the package does not contain a file Info.plist.

    I publish a .fla in the AIR for IOS.

    I'm in 2014 CC, so first I need to know what AIR I should publish in?

    more recent is AIR 14.0.0.178 for IOS

    IOS deployment type is App Store

    published with no error.

    I see that the following files included app.xml and .swf

    I converted the .ipa to a zip file

    Download through the Application Loader, I get the following error

    The package does not contain a file Info.plist.

    Here is the infoplist for that and convert the .ipa and the info in a zip file?

    I converted the .ipa in a zip file and the intoplist file is NOT THERE how to generate this?

    Any help here?

    the most recent is 16 +, Download Adobe AIR SDK

  • Reading/writing data to files in the directory "data" of the application

    I'm trying to write and then read a little data, and it does not work. The size of the file is back by '0' because I wrote the file:

    char* ptr = NULL;
    write_file("./data/test.txt", "testing!");
    read_file("./data/test.txt", &ptr);
    fprintf(stderr, "HERE: %s\n", ptr);
    
    void write_file(char* file_name, char* data)
    {
        FILE* file = fopen(file_name, "w");
    
        if (file == NULL)
        {
            fprintf(stderr, "Cannot write to file: %s\n", file_name);
        }
        else
        {
            fprintf(file, data);
        }
    
        close(file);
    }
    
    int read_file(char* file_name, char** data)
    {
        FILE* file = fopen(file_name, "r");
    
        if (file == NULL)
        {
            fprintf(stderr, "Cannot read from file: %s\n", file_name);
    
        }
        else
        {
            struct stat st;
            int rc = stat(file_name, &st);
    
            if (rc)
            {
                return -1;
            }
    
            long num_bytes = st.st_size;
    
            *data = malloc(num_bytes + 1);
    
            fread(*data, 1, num_bytes, file);
    
            (*data)[num_bytes] = NULL;
        }
    
        close(file);
    
        return 0;
    }
    

    Don't know what I'm doing wrong here...

    No idea, but a few tips:

    • Have you created the directory data?
    • Put an exit if the entry is successful, so you can be sure that your code is executed
    • Close the file only if opened successfully
    • Close the file with fclose. Close may not do and cause it is not emptied, the content can be empty. See http://www.cplusplus.com/reference/clibrary/cstdio/fopen/
    • Add a fflush (normally not used) after writing

Maybe you are looking for