How can i determine the working path within the jdeveloper9 project?

hello
my directory structure as following:
D:\myjava\testWorkspace
D:\myjava\testWorkspace\Project1
D:\myjava\testWorkspace\Project1\src
D:\myjava\testWorkspace\Project1\public_html
D:\myjava\testWorkspace\Project1\classes
in my program,i have following code block:
File file = new File("D:/myjava/testWorkspace/Project1/catalog.xml");
InputSource src = new InputSource(new FileInputStream(file));
SaxCatalogUnmarshaller saxUms = new SaxCatalogUnmarshaller();
XMLReader rdr = XMLReaderFactory.
createXMLReader("org.apache.xerces.parsers.SAXParser");
rdr.setContentHandler(saxUms);
as you can see,i must specify the absolute file name within the File class constructor,i want to use the relative file path,but it don't work.
i wonder where i should put the "catalog.xml" file and how to specify its path?
thanks

You can specify the working directory for your program in the Project Settings dialog, on the Runner panel. The text field is labeled "Run Directory".
-Liz

Similar Messages

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How can I determine the type of video out connector I need?

    Howdy,
    I have a white macbook purchased Jun/2008. I want to connect to a TV but don't know what adapter I need. How can I determine the type of video out jack my macbook has?
    System Profiler says the model identifier is "MacBook 4,1". Under Graphics/Displays the only thing it says about the "Display Connector" is that no display is connected. Too bad it doesn't tell me what type of connector it is. If I knew the name of the connector I'd probably be home free. But it seems like every macbook model has a different video connector (since the state of the art has advanced over the years) and I haven't been able to keep up with the names.
    Now, I have a 6" long adapter that will convert this connector to VGA. And searching the Apple store for VGA adapters, the existence of mine says my connector is might be one of "Mini DisplayPort", "Apple Mini DVI", "Apple DVI", or "Apple Micro-DVI". But then there is also the connector at
    http://store.apple.com/us/product/M8639G/A?mco=MTY3ODQ5OTY
    and that looks like the one I have. But unlike the other adapters, this one is just called a "VGA Display Adapter". Does the connector have a name? How can I find adapters that have that same connector?
    I know I could use the adapter I have, plus a VGA to VGA cable, to hook up to a TV. But the quality of the VGA signal is poor in the digital world. My goal is to hook up to the TV via HDMI. Is this even possible? By which I mean, will my macbook generate the signals necessary to be able to be converted to HDMI?
    Thanks for any help,
    Zebulon T

    Thanks, Ded,
    You're right, the cable that I have won't work. I't from my previous, 2004 iBook. This is pretty embarrassing... I looked at the cable but didn't bother to try plugging it in.
    Looking at the close-up picture of the Mini-DVI to VGA adapter, that does look like the right connector. So I have Mini-DVI, and the other apter you pointed to can convert this to DVI. I'll take a look to see what makes the most sense, connector wise, downstream from that.
    Thanks very much.
    Zeb T

  • How can I determine the number and sizes of redologs?

    Dear all,
    How can I determine the number and sizes of redologs are sufficient to allow redo log switching while hot backup is in progress?
    Please advice,
    Amy

    Two questions here - what the OP put as the subject title and what was asked in the thread, which are different questions.
    I would interpret the question in the thread to mean "how to avoid hanging due to archiving waiting for a redo log group to become available." Alert log, wait events, and user complaints would be the source of information here.

  • How can I determine the time zone the computer it set to?

    How can I determine the time zone the computer it set to?
    I am using Lab View 5.1.1

    Hi,
    in the G-tools (http://www.geocities.com/gzou999/index.html ) you find two
    time functions, "Get local time" and "get sys time". The difference between
    them is the time zone.
    Niko

  • How can I determine the liquid level in a bottle (LabView Vision)?

    How can I determine the liquid level in a bottle (LabView Vision)? Does anybody have an example code? The task is, that if liqid level is between two predetermined level, the program writes, that it is correct else it writes incorrect. Thank you.

    here is a little play with your bad picture:
    used only the small field of interest (here a guess) ,
    used only the red channel ( takes out most of the light reflection)
    grey scale, 3x(blurr, median filter) , played with  contrast -gamma - saturation
    now you need to add the edge detection and some sort of scale.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • How can I determine the cipher bit strength used by MY os X?

    How can I determine the cipher bit strength used by MY OS X?  Using Lion now?

    CT:
    Not Filvault, but the regular cryptographic use as built into OS X.  For example 1Password uses the algorithm in the OS X's Linux.  How many bits (i.e. 50, 128, 256...) does it use and what algorithm (DES, AES...)
    Linc
    As per reply to CT?
    Like so:
    http://osxdaily.com/2012/01/30/encrypt-and-decrypt-files-with-openssl/
    What is the strength used?

  • How can I utilize the feature "Project Proposal Workflow"?

    Hello,
    I am looking for any reference shows how can I utilize the feature "Project Proposal Workflow" in creating a Demand Managment process in Project Server 2013.
    Thanks

    Hi New_page,
    Basically this feature allows you doing what is called "ideation" in Project Server. From a SharePoint list (either in a dedicated site or directly in PWA), you can create ideas of projects and then initiate a project in Project Server from
    this list, mapping the list's columns with enterprise project custom fields and choosing an enterprise project type.
    See some references below:
    https://azlav.wordpress.com/2013/12/09/bulk-importing-projects-into-2013/
    http://www.alexandervanwynsberghe.be/basic-ideation-with-sharepoint-and-project-online/
    http://blogs.office.com/2012/11/05/demand-management-and-ideation-in-microsoft-project-online/
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • How can you determine the absolute path to a dynamically created NetStream object?

    We are trying to implement video captioning with a freeware component, ccforflash. This requires us to provide an absolute or relative path  to our NetStream object. How can we determine this path in Flash CS5 AS3?
    From the CCforFlashCS5 documentation:
    "2. Object name and path
    Type the name and path.  This is the instance name of the object with which CCforFlashAS3 will synchronize. It must be spelled correctly, since CCforFlashAS3 will query the object with this name for timing information in order to synchronize the captions. The path must also be included; either relative to the CCforFlashAS3 component (i.e. this.parent) or the absolute path from the main level of the movie (root)."

    It would be easier if the NetStream object was created on an easily identifiable place on the timeline. This player has an MVC architecture. The NetStream object is created in a subclass to Model class, which is itself a subclass of the EventDispatcher object. The View class access it via an interface.
    As you can guess, it's not that straightforward to determine where the NetStream object is located on the timeline. This is compounded by the fact that the NetStream object does not have a name property.
    I've tried methods like these, but they only work for the DisplayObject class:
    public static function displayObjectPath( avDisplayObject : DisplayObject ) :String
    var lvPath:String = "";
    do
    if( avDisplayObject.name ) {
    // var obj_name:String = (avDisplayObject.name == 'root1') ? 'root' : avDisplayObject.name;
    if (avDisplayObject.name != 'root1') {
    lvPath = avDisplayObject.name
       + ( lvPath == "" ? "" : "." + lvPath );
    } else {
    trace("displayObjectPath() NO NAME avDisplayObject="+avDisplayObject);
    } while( avDisplayObject = avDisplayObject.parent );
    return lvPath;
    } // displayObjectPath
    private  function showChildren(d:DisplayObjectContainer):void {
    trace("showChildren()");
    if (d.numChildren>0) {
    for (var c:Number = 0; c < d.numChildren; c++) {
    trace("showChildren c=",c," name=",d.getChildAt(c).name);

  • VBS:How can i determine the last row of an excel-sheet

    I want to replace the chn-comments of an datafile. I pick up the chn-names and want to compare them with an excel-file and so get from the excel-file the right chn-comment and store int back in the datafile. my problem is how can i determine where the excelfile-row is on the end to load the loopounter with corr values.
    i know one solution via scan on ascii 13 and 9.but bether is to know immediately the length of the column.
    answers also in german possible.

    Peter,
    Are you using DIAdem's Excel Import Wizard? By "Excel file" do you mean a tab- or comma-delimited ASCII file that Excel can read in easily, or do you mean a file with the extension "*.xls"? You certainly could not search through an *.xls file to find CR/LF characters.
    If you use the ASCII or Excel Import Wizard to create an *.STP file for the "Excel" file in question, then after the *.STP file is loaded you have access to a whole range of variables, starting with Ascii... or Excel... which completely outline the structure of the ASCII or Excel file, including things like the row in which the channel comments are, etc.
    Why don't you send over your Excel file and I'll be able to help you a lot better.
    Regards,
    Brad Turpin
    NI

  • How can I add the new project? (for mac)

    I can't add the new project. Who can help to do this action?

    You have opened the Render Engine. Either you clicked on the wrong app or you have a fouled up text file in preferences. There are several threads on this forum that point to the solution.

  • How can one determine the nice level of running processes?

    Renice is a wonderful and easy way to change CPU priority of processes. (If you are working in Final Cut Pro while rendering in After Effects in the background, you can set After Effects to only use leftover computing power that you are not needing in Final Cut Pro, thus not hanging up your work in Final Cut) Google renice to learn more). However.... how do you determine what the current nice levels of processes are?
    Thank you, somebody!

    Thank you! A total mystery language to me ("comm,nice"?) but works just dandy!

  • How can I determine the device number from the task ID

    I'm using 'Port Config' to initialize my DIO port for a NI-DAQ 6052E. Port Config returns a task id and it would be very useful if I could determine what device number I have based on the task id.

    Hello,
    Thank you for contacting National Instruments.
    It is not possible to determine the device number programmatically from the task id. This would be slightly redundant since you must supply a device number when you Port Config executes. You could simply create a local variable of the Device Number control that is connected to the Port Config.vi if you need to use the device number elsewhere in your VI. Simply right-click on the Device number control and select Create >> Local Variable. Then right click on the local variable and select change to read. This will allow you to read the value of the device number you provided anywhere in your VI.
    If you would rather determine the actual device that is being used rather than the device number, yo
    u can use the Get DAQ Device Info.vi. I have attached a simple example program that demonstrates how to use the VI.
    Regards,
    Bill B
    Applications Engineer
    National Instruments
    Attachments:
    Write_to_1_Dig_Port_(E).vi ‏58 KB

  • How can I determine the feeder class for a WebDynpro component in SRM 7.0?

    Hi experts.
    I am trying to figure out how to add some columns to the list of contract items for this WebDynpro application/view:
    Applikation: /SAPSRM/WDA_L_FPM_OIF
    Web Dynpro-komponent: /SAPSRM/WDC_CTR_DOTC_IT
    Window: IV_L_FPC_CA_TREE
    View: V_CTR_DODC_ITEMS
    Configuration-ID: /SAPSRM/WDCC_FPM_CTR_DOTC_ITM
    All the documentation I can find regarding the FPM says to change the feeder class, but nowhere I have seen do they explain how to determine the feeder class of an existing component/view.
    I am hoping for your help!
    Thanks!
    Best regards
    Per Hjorth Christiansen

    The term "feeder class" normally refers to the POWL search, not the actual document detail screen. You could just add one more column by enhancing the webdynpro view.

  • How can I determine the number and resolution of the current displays/screens?

    I am developing a vision application that will require a specific window size, thus the application must run with the screen resolution at predified levels. It is also possible that the application will run on a system with multiple monitors, so I need to be able to determine the number of monitors, and the resolution of each.

    Hi
    I recommend you to work with the VI Server functions (Application class properties). See my little example.
    Regards,
    Luca
    Attachments:
    VI_Server.vi ‏22 KB

  • How can I determine the number and size of the items in a window?

    With operating systems before Mavericks, the number of items contained and the total size was displayed at the bottom of an open window.  This was valuable, for example, when assembling files and folders for burning to discs.  How can I quickly obtain the information using Mavericks?

    Welcome to Apple Support Communities
    That setting is hidden by default, but Finder still has got the feature. To enable it, open a Finder window and go to View menu (in the menu bar) -> Show Status Bar

Maybe you are looking for

  • Need to skip page break between header and Detail sections

    Hello, I am combining two reports in one report (one in header section and another report in the body section). when this report is run, there's a page break between these two sections. Is it possible to eliminate it? Ideally I would like the detail

  • Server-Side Include or what?

    One of my sites: http://www.plough.com  has become more active, I need to do a redesign. One thing I have to change: the "Recent Articles" list has up to now been a library item. This worked fine as long as the site was small. But now checking out &

  • Can it be any slower?

    I have the E4200 on a Mac.  Wireless connection.  HughesNet Internet Service.  Just downloaded the latest firmware.  Internet Speed tests consistently show (over a couple of days): Download Speed = 1.31 (Highest!) Upload Speed = 0.21 (Again, highest

  • How to generate global LogFile object

    Hi, I'm new to JAVA, I used to work in C. In C I could initialize a global file pointer which was known through the whole package, so I could write to a file using the same pointer. Now in JAVA I have to create an object of the filewriter, but how ca

  • Burning 2 DVD's at a time (DVDSP 4.1.1)

    Is it possible to burn two DVD(-R')s at a time from DVD Studio Pro with the two SuperDrives installed? Thanks Paul