Why cant I use relative paths in Netbeans

Why cant I use relative paths in Netbeans to files on my PC.
I want to be able to copy my project folder between different drives and pcs dont want to edit the code everytime I do.
BTW I didnt know where on the forum to post this. Just in case this is the wrong place.

When I use relative paths it doesnt see the files. Like when I want to add an image to a panel. If I use '../image.jpg' it wont work but if I use 'd:\javafiles\images\image.jpg\ it will work.
Cant seem to fix it.

Similar Messages

  • Can't use relative paths in jsp pages or javabeans

    Hi everyone,
    Can someone please help me with this little problem.
    When I want to use in a JSP page the object 'FileReadInput' to read in a file, it can't find when I only give the filename. The target file and source file are in the same directory so I would expect if I only give the filename, it will automatically search in the current directory. But when I give the complete absolute path, everything works fine. Is it possible to use relative paths in a jsp or javabean file?
    By the way, I am working with JDeveloper from Oracle. (maybe that has something to do with my problem)
    Can someone help me???
    Thx

    My dear friend,
    It will not work at all. coz, for any jsp file, ur application server will create a .java file and then .class file in a directory other than the directory where ur .jsp file present. that's why, ur file to be read can't be found. that's why use the following.
    String path=getServletConfig().getServletContext().getRealPath("/")+File.seperator+"yourfilename";

  • Menu using relative paths

    Hi, I have flash menu all using relative paths to the html
    files. I also have some files in a separate folder for
    organization. I add the folder paths to get to the html files
    within the folder, but when I get into that folders file, i cant
    get back out. If I add ../ to the other files, it of course brings
    me out, but cant get to the other files. I hope that makes sense,
    Should I just use absolute paths?
    file.html
    /folder/file.html
    otherfile.html
    thanks,
    Josh

    absolute would probably work best.
    When a link brings you into a folder (/folder/file.html), if
    the same set of links is there and you click a link that is
    supposed to bring you to home (index.html), it tries to open
    (/folder/index.html), not index.html. Make sense?
    Thanks,
    Josh

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Using Relative Path instead of Full Path OMBPlus

    Can we use relative paths in OMBPlus scripts instead of full paths. For example all my OMBplus (tcl) scripts are in folder;
    C:\tfsroot2\Interfaces and Extracts\branches\Interfaces and Extracts1.1\000 - OWB Prototype\deploy\ora.stg
    and the MDX file I would like to deploy is in
    C:\tfsroot2\Interfaces and Extracts\branches\Interfaces and Extracts1.1\000 - OWB Prototype\deploy\ora.stg\scripts\dwextract\tables
    but when I try to use
    OMBIMPORT MDL_FILE '../scripts/dwextract/tables/$tblName.mdx'
    instead of
    OMBIMPORT MDL_FILE 'C:/tfsroot2/Interfaces and Extracts/branches/Interfaces and Extracts1.1/000 - OWB Prototype/deploy/ora.stg/scripts/dwextract/tables/$tblName.mdx'
    It does not work.
    I use
    call "C:\OraHome_1\owb\bin\win32\OMBPlus.bat" "C:\tfsroot2\Interfaces and Extracts\branches\Interfaces and Extracts1.1\000 - OWB Prototype\deploy\ora.stg\OMB_DEPLOY_TBL.tcl" XTRCT_WRK_INPUT_FILE
    in order to execute.
    I think it is because It set the OMBPlus.bat location is a base folder. Any way to overcome this issue and use relative paths instead of the full path?

    OK, a couple of things. First, you need to remember that TCL treats back-slashes as an escape character. Always use forward slashes in your paths, or double up the back slashes .
    So, this should work:
    CD "C:\tfsroot2\Interfaces and Extracts\branches\Interfaces and Extracts1.1\000 - OWB Prototype\deploy\ora.stg"
    call OMBPlus.bat "C:\\tfsroot2\\Interfaces and Extracts\\branches\\Interfaces and Extracts1.1\\000 - OWB Prototype\\deploy\\ora.stg\\OMB_DEPLOY_TBL.tcl" XTRCT_WRK_INPUT_FILEor this:
    CD "C\tfsroot2\Interfaces and Extracts\branches\Interfaces and Extracts1.1\000 - OWB Prototype\deploy\ora.stg"
    call OMBPlus.bat "C:/tfsroot2/Interfaces and Extracts/branches/Interfaces and Extracts1.1/000 - OWB Prototype/deploy/ora.stg/OMB_DEPLOY_TBL.tcl" XTRCT_WRK_INPUT_FILEAs an FYI for OMB, if you are prone to doing a lot of scripts and so building libraries of common functions, you can also easilly use the "file" command in order to determine the current directory at runtime so you can plunk your script anywhere with it's required libraries and it will be able to source them at runtime.
    For example, all our scripts have this basic bit of code at the beginning so we can pass them between developers and it doesn't matter where anyone put their script directory - the scripts will find the libraries as long as they are co-located:
    #  Get Current Directory and time
    set dtstmp     [ clock format [clock seconds] -format {%Y%m%d_%H%M}]
    set scrpt      [ file split [file root [info script]]]
    set scriptDir  [ file dirname [info script]]
    set scriptName [ lindex $scrpt [expr [llength $scrpt]-1]]
    set cnfg_lib "$scriptDir/ombplus_config.tcl"
    set owb_lib  "$scriptDir/omb_library.tcl"
    set sql_lib  "$scriptDir/omb_sql_library.tcl"
    #  Import Lbraries
    #      Assumes that owb_config, omb_library, and omb_sql_library are in the same directory as this
    #      script.
    #get config file
    if [catch { set retstr [ source $cnfg_lib ] } errmsg] {
       puts "**********************************************************************"
       puts "* Libraries are missing from the current directory. Exiting.... *"
       puts "**********************************************************************"
       return -code 2
    #get standard library
    source $owb_lib
    source $sql_lib
    #  Set Logfile
    #    This will overwrite anything set in the config file.
    set LOG_PATH "$scriptDir/logs"
    file mkdir $LOG_PATH
    set    SPOOLFILE  ""
    append SPOOLFILE $LOG_PATH "/log_"  $scriptName "_" $tabName "_" $dtstmp ".txt"
    # Now the main script body goes from here.Cheers,
    Mike
    Edited by: zeppo on Aug 4, 2009 7:02 AM
    Edited by: zeppo on Aug 4, 2009 7:03 AM

  • WHY CANT I USE FINAL CUT EXPRESS HD IN MY MACBOOK

    WHY CANT I USE FINAL CUT EXPRESS HD IN MY MACBOOK?

    hey there DavoMrMac,
    according to Apple's 'site:
    System Requirements
    Macintosh computer with 500MHz or faster PowerPC G4 or G5 (550MHz for PowerBook G4) or Intel Core Duo
    512MB RAM
    Display with 1024-by-768 (or higher) resolution
    An AGP or PCI Express graphics card compatible with Quartz Extreme or an Intel GMA integrated graphics processor in MacBook or Mac Mini
    Mac OS X 10.4.6 or later
    QuickTime 7.0.4 or later
    HDV features require 1GHz or faster processor and 1GB of RAM (2GB recommended)
    500MB disk space required for applications; additional 16GB of additional storage space for Soundtrack and LiveType content (can be installed on separate disks)
    DVD drive for software installation
    i've been running FCE HD 3.5 on my MacBook since i got it in November '06. runs okay for the few short SD projects(15:00) or less i've put together.

  • How to read/know/use  relative paths in java files ?

    I am able to access files in java after using the
    String TxtURL = "file:///c:/files/TEXTS/";and then loop
    = new File(ma.TxtURL +filename );However , I need to use this in several drives , C , D E etc , how can I use relative path ?
    I used these but they didn't work
    String TxtURL = "file:///TEXTS/";
    String TxtURL = "file:////TEXTS/";
    String TxtURL = "file:///./TEXTS/";
    String TxtURL = "file:///../TEXTS/";

    ya batch , I want to run a java program from batch file
    java C:\...\fileand as u know that C will change , so any suggestions/solutions ?
    thanks

  • Why cant i use a bought call-tone bought through I-tones for calling tones for just one of my contacts?

    Why cant i use a bought call-tone bought through I-tones for calling tones for just one of my contacts?

    What makes you believe that you can't? To set a custom ringtone (or SMS tone) for a contact, go to that contact entry, tap the Edit button in the upper right. You can then edit both ringtones and SMS tones for that contact.

  • How to use relative paths in Captivate 8 / Cómo usar URL's relativas en Captivate 8

    Hello, I have developed a bunch of courses which will be migrated to a new site and I am having trouble changing the absolute paths into relative URL's to resources such as PDF files inserted into the scorm packages. I cannot find information on how to use relative paths in Captivate. Please help. Thank you.

    I have the same issue with relative links using Captivate 8.  I am trying to load Captivate modules into an LMS using relative links to document files within the LMS.  The links work fine during a site page test so not an issue in the LMS, but from the Captivate module they aren't working....
    Help?

  • Why cant i use turn by turn navigation on my iPad 3 ?

    Why cant i use turn by turn navigation? i can see the route and start it ,but i wont get turn by turn navigation, i online get directions!

    I just bought a mini and updated to iOS 7 straightaway. It's running quite well and I haven't experienced any issues.
    There is NO way to downgrade. Your friend probably did it before Apple stopped signing iOS 6.

  • Why cant i use normal messaging on  my ipad mini

    I have recenly got an Ipad mini buy it will only let me message people who are on Imessage ,Why cant i use normal messaging on  my ipad mini ?

    Try resetting your Wi-Fi router. Turn off the power to the router. Leave it off for at least 30 seconds then power it back on. After the router has completed its startup routine and indicates a good connection to the internet, turn on your iPad and try to connect again.

  • Why cant i use air print with my hp deskjet 3050

    why cant i use air print with my hp deskjet 3050

    The HP Deskjet 3050A J611 is AirPrint compatible.
    If it is not working for you, try restarting your router as well as the printer. Power them down, wait a moment or two, then power them back up again. It should work.

  • Using relative path for in file/ftp adapter

    Hi All,
    How to have a relative path for file/ ftp adapter's inbound/outbound operation?
    Example: Consider $ORA_HOME = /home/oracle --> This environment variable can be different on different machines
    i want to drop a file in to $ORA_HOME/folder1/folder2 (Or poll for a file).
    <partnerLinkBinding name="FTP">
    <property name="wsdlLocation">FTP.wsdl</property>
    <property name="out_dir" type="LogicalDirectory">What do i write here???</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    if i cant configure this in partner link section or in activation agent sction, how else do i achieve this?
    i am using 10.1.3.* version.
    Thanks in advance.
    Roshan.

    You can achive it using the deployment scripts if the directory is changing on the basis of the environment
    If you want to change at run time than you can use the jca properties to set using the variables at runtime.
    Regards,
    Ajay

  • ActiveX control using relative paths

    I've been battling with an Active X control for a while now. Everytime I use a particular active x control inside a VI, it crashes during execution. Labview wasn't giving much of a hint, but after an exhaustive investigation, we determined that the exe must be in the third party vendors bin folder for it to work properly. In other words, the active x control looks for lower level dll's using the executable's relative path. I've successfully got this working by building an exe from Labview and then placing it in the bin folder and executing from there.
    So my question: Is there anyway to get this working correctly in the development evironment? Right now, if I try to run this from the development environment, it looks for the dll's relative to the path of Labview.exe. Is there any setting to make a VI look like it is running from a different location? I know I could continually create builds, but it would be much easier if I could run VIs from the development environment while I develop and debug.

    No, you cannot make a VI "look like it is running from someplace else". The VI isn't what's running - it's the LabVIEW development environment that's running. This sounds like an issue with the ActiveX control that you're using, and not an issue with LabVIEW. Have you tried contacting the publisher of that ActiveX control and asking them why they wrote it that way?

  • Can you customize the Portal Page_Path item to use relative paths?

    Why does the built-in Portal page_path item generate absolute paths instead of relative paths? It would seem to me to make sense that a breadcrumb (page_path) link would always be on the current site and that relative paths would make sense.
    Is there a setting that can be changed for it to generate relative paths?
    Thanks,
    Jeff

    I don't think that the portlets lend themselves to a viewing (compact) vs. using (maximized) distinction, beyond what the "Show/Hide Folders" button provides.
    In other words, with the folders hidden, things are as small as we felt we could make them for both viewing and editing. The layout is quite liquid and can be stretched and shrunk to fit, given the realities of the items in each portlet (large quantities, long titles, etc.). The visitor tools allow you to arrange the portlets however you'd like.
    Admittedly, the WYSIWYG editor is quite large and we'd like to provide options for the user to size it for their screen or to show/hide it in a future release.
    One thing that would help would be user-selectable columns in tables I suppose. That way you could hide more columns to save space.
    At one point we put the portlet in maximized mode when the user edited something, but that required a full post of the browser, negating the benefits of the AJAX portlet refreshing only itself.
    Do you have any specific examples of what you'd like to see more compact?
    Your feedback is much appreciated.

Maybe you are looking for

  • Tab in search help MM03 and VA03

    Hi experts, I added a new tab in matrn search help MAT1 (MM01/02/03) and it shows ok. But in VA01/02/03 item grid, the search help for matnr does not show the new tab. VAs tcode use S_MAT1 search help, but MAT1 is in S_MAT1 as collective search help.

  • Gif animation k changes once saved

    When I "save for web" a gif animation in photoshop its optimized at 72k.  I then check it in file manager and its 102k???!!!

  • Reader 10.1.10 update forces our previous PDF forms to be signed.

    How can I turn this forces signing function off as it will not let me save a PDF form without signing. This was not an issue with 10.1.9 and our employees who did not update to 10.1.9 can manipulate/save these forms without issue, only those who upda

  • HP Facebook Photo and Album Printing

    I have just finished reinstalling my operating system (Windows XP) and am now reinstalling my programs.  I have just reinstalled Hp printing software.    There is a new feature available I would like to use from HP updates.  It allows a person to pri

  • How i can use labview control or indicator in VB or C++

    Hi, I would like to use labview control or indicator in thierd party application like VB or C++ or .net. Please help me, how i can use this? Thanks