Using FileOutputStream for File Creation. Help Required!!

Folks,
I am using the FileOutputStream to create a file.For this I am
saying:
FileOutputStream fout2 = new FileOutputStream("Name.txt");
This creates the File in the Current directory of the IDE(JBuilder 5).
I want to create ths File in the a logs directory,taking the
relative path.
So I want the File to be created as ./logs/Filename.txt??
How do I set the relative path in the FileOutputStream ??
Can anyone please respond?

Yes, "." does not coincide with the classes directory, especially when starting the application from an IDE.
Take a look at the system properties for some directories:
System.getProperties().list(System.out);
System.putProperty("user.dir", "...");For your means I would abuse the ClassLoader, and specify a full path, and start to patch a file name from it:
java.net.URL u = this.getClass().getResource(".../x.gif");

Similar Messages

  • Table Cluster Creation - Help required.

    Hi,
    I need to create a Table Cluster. My requirement is to create Table Cluster for MARA and 3 more 'Z' tables.
    I read through the SAP documentation for the creation of table cluster. <http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm>
    But when i tried creating 'Cluster Table' i am getting errors.
    Please suggest the precautions to be taken while creating a Table Cluster, It would be of great help if any Mock document can be provided for creation of Table Cluster.
    Quick help in this regard is much appreciated.
    Many Thanks
    Ramesh.
    Edited by: Ramesh Kajuru on Apr 10, 2008 3:49 AM

    hi ramesh,
    Creating Pooled Tables/Cluster Tables
    Procedure
    In the initial screen of the ABAP Dictionary select object type Table, enter a table name and choose  Create.
    The field maintenance screen for the table is displayed. Table type Transparent table is set as default.
    Make the necessary entries in the Short description and Delivery class fields on the Attributes tab page. Then define the fields of the table.
    Proceed as when  creating a transparent table. Save your entries.
    Choose Extras ® Change table category.
    A dialog box appears in which you have to select the table type Pooled table or Cluster table.
    Choose Select.
    You return to the field maintenance screen for the table. Field Pool/cluster name is displayed on the Attributes tab page in addition to the standard fields.
    Enter the name of the table pool or table cluster to which you want to assign the pooled table or cluster table in field Pool/cluster name
    Note that the total key length of a pooled table may not exceed the key length of the associated table pool. The key of a cluster table must correspond to the key of the associated table cluster.
    Proceed as when creating a transparent table (see  Creating Tables). Remember that you cannot create indexes for pooled or cluster tables.
    All the attributes of the  technical settings can be maintained for pooled tables and cluster tables. Before you can access these attributes, however, you must convert the table to a transparent table.
    Creating Table Pools/Table Clusters
    Procedure
    In the initial screen of the ABAP Dictionary, choose Utilities ® Further Dictionary Objects.
    A dialog box appears.
    Select the object type Table pool/cluster and enter the object name. Choose .
    A dialog box appears in which you must specify if it is a table pool or a table cluster.
    Select the required object type and choose .
    The maintenance screen for table pools/clusters appears.
    The necessary entries will have been made automatically for the fields for table pools since a table pool has a fixed structure. You should not change these standard settings if you can avoid it.
    The structure of a table cluster is also mostly fixed. Certain fields are therefore proposed when the table cluster is created. You can adjust this proposal to your requirements, for example by inserting further key fields. However, make sure you conform to the structure necessary for a table cluster.
    Enter an explanatory text in the field Short text.
    If necessary, select the  activation type of the table pool/cluster with Utilities ® Activation type.
    Create documentation about the table pool/cluster with Goto ® Documentation.
    This documentation should describe what the table pool/cluster is used for. The documentation is also output when the table pool/cluster is printed.
    Go to the maintenance screen for the technical settings by choosing Goto ® Technical settings.
    In contrast to the table maintenance screen, you can only define the  size category here. All other attributes of the technical settings are preset.
    Activate the table pool/cluster with .
    Result
    The table pool/cluster is activated. You can look at the log of the activation with Utilities ® Activation log. If errors occurred during activation, the activation log is automatically displayed.
    After the table pool/cluster has been activated, you need to create it in the database. To do this, use the database utility (Utilities ® Database utility).
    Once a table pool contains data, it can no longer be changed.
    thanks
    karthik
    reward me points if usefull

  • How do I use VPN for file sharing?

    Hi folks, hope you can help.
    I need to find a method for file sharing between my company's two offices, which are not only in different countries but also use both PCs and Macs. I think setting up a VPN is the way forward.
    My file server is a Mac Mini running the standard client version of OS 10.5.4, with a static IP, 217.xxx.xxx.xxx. I need the PCs and Macs to access its resources. It is set up to share its files using FTP, AFP and SMB. It is running the application iVPN Server, which I understand is a GUI that makes the built-in OS X VPN Server function available to the client edition of OS X.
    I am currently overseas and can connect to the Mac Mini over VPN. The problem is that I cannot seem to access the Mac Mini's files - I don't know what to do having established the VPN connection. I was half-expecting it to show up in the Finder under Shared or something.
    The Mac Mini has a local IP of 10.0.1.20, but the VPN Server is issuing an IP to all clients in the range 192.168.2.200 and beyond. Is this where I'm going wrong?
    Should the Mac Mini VPN Server also connect to itself, using VPN, as a client?
    I'm really stuck, all help is very much appreciated. Thank you!

    Thanks for prompt reply Topher..
    I am familiar with the Connect to Server window, but I am not sure which IP I should be using. Assuming no VPN connection for the moment, and assuming I'm on a remote network, I can connect to the User's documents folder on the Mac Mini already by typing afp://[username:password]@[static WAN ip]/Documents
    However, I need to ensure that SMB shares work (I know they work when I'm on the local network). So I type smb://[username:password]@[static WAN ip]/Documents but this fails to connect to the User's Documents folder.
    To make the SMB shares work I think I have to connect using VPN. So I connect to the Mac Mini via VPN, and my laptop is issued a VPN IP of 192.168.2.200. Of course my laptop also has an IP from my local network. Do I need to rearrange my network order in System Preferences?
    So I'm now connected via VPN. However to view the Mac Mini's files, surely it also needs to have an IP issued by the VPN Server? But the Mac Mini is the VPN server. So should I go into its System Preferences and set up a VPN connection to itself?
    Now back on the laptop and I want to browse User's Documents folder on the Mac Mini using SMB. I go Connect to Server, and I guess I would type smb://[username:password]@[Mac Mini's VPN IP]/Documents
    Am I on the right track? Thanks again...

  • Use Ethernet for file transfers to iMac?

    Hi -- In earlier Powerbook use I used to like using the "Target Disk Mode" to drag files from my laptop to my desktop machines, but of course my new MacBook has no firewire.
    is there anyway to connect my MacBook to my iMac using an ethernet cable, to drag sel;ect files from the portable to the desktop machine? I've got some multi-gig files I need to shuttle back and forth occasionally, so it's pretty tedious to chug along via wireless . . .
    Any other suggestions for most convenient means of shuttling big files?
    Thanks

    Yes, you can use Ethernet to transfer files via File Sharing. If you have a home network then you can share files over your home network whether it be wired or wireless. You can also create a computer-to-computer network by connecting two computers directly via Ethernet cable.
    Select Mac Help from the Finder's Help menu and search for "file sharing." Search for "network" to find an article on computer-to-computer networks.

  • Using OEM for file management

    Is anyone using OEM to manage files on their clients?
    We currently have a bunch of scripts that distribute certain files to certain systems based on system criteria, such as OS version, system "usage" (ie oracle DB, backup server) etc.
    I was looking @ OEM Deployment Procedures as something that might help with this. I didn't see a premade "file distribution" procedure, though, so I would probably have to write my own somehow.
    I'm also open to using Ops Center or some other plugin that might be more suited to this task.

    I am going to assume that you are using EM 12c. Let me know if this is not true.
    Deployment procedures (DP) is the ideal solution for this. There is no out of box DP for file transfer because it is extremely easy to create one. You have two options:
    1. transfer files from one server to another (using the file transfer step in DP)
    2. upload files to EM software library and then transfer them to different hosts (using the component and directive step in DP)
    Useful links:
    http://docs.oracle.com/cd/E24628_01/em.121/e27046/part_dp.htm#CCHJBDFD
    https://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5787,1
    https://apex.oracle.com/pls/apex/f?p=44785:24:0::NO:24:P24_CONTENT_ID,P24_PREV_PAGE:5788,1

  • Converting using stramclip for apple tv help.

    Can someone help, im using windows and am unable to convert anymore that 4 vob files 1gig each, is there a way to convert a movie which is fairly long without using another program to convert it to something like avi which streamclip can convert, your help would be gratfull.

    Do you merge the files in the same way as adding the vob files to convert, i.e select add files, then add the new files and convert them in to a compatable formatYes, if you plan to use MPEG Streamclip.
    im currently tring to convert the six vob files in to two avi files, then convert them to h264, will that workI personally might try the shorter method of converting the first three VOBs to H.264 and then do the same to the second three VOBs. If the target files are named consecutively (e.g., filename_1 and filename_2) I'd then simply use the "Add Files" menu option to open the files in correct order in MPEG Streamclip, check to see that they merge without a break, and then use the "Save As..." File option to save the "merged" content in a single MP4 container as if the files had been converted in one contiuous stream. This saves you the trouble/time of performing the intermediate conversion and preserves the quality that would have been lost had the original files been "shrunken" before conversion.

  • Impossible to use Mozilla now.I've used it for years. Help

    I've used Mozilla for years and love it. It has been imposible to connect for the last two weeks. The page will not download.

    hello, normally such issues are caused by a firewall/security software which doesn't recognize & therefore blocks new firefox versions: [[Fix problems connecting to websites after updating Firefox]]

  • I just purchased an ATC for my wife for Xmas, and she wants to use it for file sharing.  Help??

    From an external location (over the interent).........not at home on............Is this doable?  Please let me know!!!
    Thanks for any help.

    There are 3 methods which Tesserax explains here..
    https://discussions.apple.com/docs/DOC-3413
    The key one being the one Apple designed for easy access, Back to My Mac.. which has been around the place for ages but was updated to iCloud some time ago.
    She will need a Mac computer to use for the connection.. that is one limitation.. Another is the TC must be the main router in the network.
    If you run into any other issues feel free to ask.. it is never the simple thing you expect because it is unlikely you are using a business account with a static IP.. ISP deliberately work to stop you doing this without paying for it.
    A thread like this show that all not sweetness and light even in the BTMM world.
    https://discussions.apple.com/thread/3699096?start=0&tstart=0

  • Should a graphic designer use Iphoto for file management ?

    I am a designer who is overwhelmed by too many images from different sources (scan, online, art, photos) that need to be organized by themes (animals, flowers, calligraphy, projects, etc) so I tried transferring all my ps and tif and jpg files into iphoto (hoping to avoid using bridge, which I don't like).
    I noticed after I drug some them into iphoto, I reopened them in PS (drug file to the PS software Logo in dock), all the layers were had been flattened and the file went from 600 dpi to 72! EEEEK!
    I am a graphic designer and need large files with layers. Is iphoto a bad way to organize images? The orginal reason I like iphoto is because you can just drag out a file, and the original remains. In bridge, the original actually MOVES OUT.
    (I posted this in the wrong forum before, so this is a repeat posting)

    kidquotes:
    I would seriously look into a more robust DAM (digital asset management) application. The one that I use is Media Expression. It allows you to manage your folder system, move image files between folders from within the application, rename files, add metadata and write them to the files so they travel with them.
    Go go The DAM Forum where professional photographers discuss the various DAM applications and their relative merits, etc. Expression Media was originally iView MediaPro and, at the time, was consdered one of the very best. EM was bought by Microsoft (ugh) but has evolved into am improved product but is more expensive.
    As far as the dpi the resolution didn't change. iPhoto displays all at 72 dpi but if you were to look at the file in Photoshop it's print size would be nearly 9 times larger. It's all relative. SeeThe Myth of DPI.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • I am an English teacher, and my school just bought iPads for my students and me. I want to use Dropbox for file sharing and to be able to edit their work on my iPad so that my students will be able to open their work from Dropbox and see my corrections.

    I would like my editing marks and comments to save in Dropbox in a contrasting color. The students will then need to be able to open the document and make corrections, then save again to Dropbox. Thanks for any ideas!

    Thanks, everyone, for these helpful suggestions. Before we got the iPads last week, we were saving compositions from desktops onto the school server. There was not a problem with the students seeing other students' files, so I didn't password protect them, but there was the issue of copying all their work onto a thumb drive so I could grade it at home. I like accessing files in the cloud much better. Under the previous system, I was also printing out their work and marking it up for the students to correct before I put it on our class web site. Now under this new system, I would like to go paperless, sharing my digital revisions with the students as they perfect their work before I put the final products online. This usually takes 3 or more revisiosns. So far, I have tried the following apps: Quickoffice, Documents to Go, Writeup, Plaintext, Pages, Essay, and Droptext. The students and I have no trouble saving into and retrieving from Dropbox, but there is no good way so far for me to edit their work in color so that they can open up the file and see my comments in order to make their revisions. I do have this capability on my laptop and desktop by using the redlining feature in Word. It's just that I'd rather be able to use my iPad for this purpose. I will check out Evernote.

  • Error: 1:n multi-mapping using BPM for file to file scenario

    Hi. Iu2019m trying to do 1:n multi-mapping using bpm scenario. I use file to file. Input file consists of many records and then I want many record to be transformed into many file at target system. I follow step in http://www.riyaz.net/blog/xipi-1n-multi-mapping-using-bpm/. However, I have a problem when file is retrieved in to XI. It doesnu2019t create any output file.
    When I look at SXMB_MONI, it shows u201CNo object type found for the message Check that the corresponding process is activated.u201D Besides, it shows error message "Unable to perform action for selected message" when i clikc at PE in SXMB_MONI.
    I have check at many previous posts with the same error message but still couldnu2019t solve it. I already activate my BPM and check that status in SXI_CACHE = 0. There is noting left in change list of my IR and ID.
    Here is my design and configuration.
    IR
    Data Type: DT_file_split -> for both input and output file
    Message Type: MT_file_split_sender, MT_file_split_receiver
    Message Interface: SI_file_split_in, SI_file_split_out, SI_file_abs_source, SI_file_abs_target
    Message mapping: MM_file_split for mapping MT_file_split_sender with MT_file_split_receiver
    Interface mapping: OM_file_split
    u2022     Source = SI_file_split_out
    u2022     Target = SI_file_split_in
    u2022     Mapping Program = MM_file_split
    BPM following this link http://www.riyaz.net/blog/xipi-1n-multi-mapping-using-bpm/.
    ID
    Import my Integration process
    2 Communication Channel for getting input file (CC_File_split_sender) and creating output file (CC_File_split)
    2 Receiver determination:
    u2022     Source system to BPM using interface SI_File_Abs_source
    u2022     BPM to target system using interface SI_File_Abs_target
    1 Interface determination:
    u2022     from source system to BPM
    u2022     Sender interface: SI_File_Split_Out
    u2022     Receiver interface: SI_file_abs_source
    1 Sender Agreement
    u2022     Commu. Component: Source System
    u2022     Using interface: SI_File_Abs_source
    u2022     Sender Communication Channel: CC_File_Split_Sender
    1 Receiver Agreement
    u2022     Sender Communication Component: BPM
    u2022     Receiver Communication Component: Target System
    u2022     Receiver Interface: SI_File_Split_In
    u2022     Receiver Communication Channel: CC_File_Split
    Anyone know how to fix this?
    Thanks,
    Pavin

    Hi,
    Yes, thats the problem.
    You are creating file from test tab of  1..N mapping .
    In case of 1..N mappping in mapping Extra tags of messages are addded to the data.As shown here:-
    Messages
          Message1
               MessageType
    When you use this mapping to generate xml message then it will add additional tags for <Messages> and <Message1>, which is not correct. it should only have structure of you MT.
    So remove start and end tag of <Messages> and <Message1> from your data file. Mentioned below in bold.
    <xml......>
    <Messages>
    <Message1>
    <MT_...>
    </MT_...>
    </Message1>
    </Messages>
    This should solve your problem.
    Regards,
    Sami.

  • Anyone use MediaMonkey for file transfers with their Zen (Xtra)? For changing bitrat

    I'm looking for some software that will reduce the bitrates of my songs as they are transferred from my Vista computer to my Zen Xtra, i.e., I store my music files on my computer in WMA lossless format, and I want them copied onto my device at 28kb
    ps.
    MediaMonkey looks like it will do this. Does Windows Media Player?
    Are there other MP3 File Management programs that do this?

    Hiya all,
    Just to let you know, that this has happened again, 2nd time within 4 months of owning it, I cannot add or remove data from the data partition, I can listen to the MP3's fine, but can't do jack with the data partition, does anyone know of anything that can resolve this since the last time I reported the problem? I've double checked that I've got the most up todate firmware and software. It's a bit pants if you can't use the Zen Xtra for what it's designed for!
    Flegg

  • File to File interface - Help Required

    Hello All,
    We have the below business requirement:
    In the source directory, we would receive multiple .dat and one .txt files. Before picking up any of the file, we need to check whether the .txt file exists in the folder or not.
    If the .txt file exists, only then pick the .dat files and move them to target directory, else dont do any action until the .txt files comes into the folder.
    Also, the dat and txt files have to be moved to the target directory in a sequence(i.e. first the dat files have to be moved and then finally txt file has to be moved).
    Please help in providing an approach preferably with the standard sender file channel options.
    Thanks in advance.
    Regards,
    Subbu

    Try this option
    Source Directory: /yourSourceDir
    FileName : File1.xml
    In Additional Files:
    File List: File2.xml
    File2.xml.namePart - "File1.xml" = "File2.xml"
    File2.xml.optional - NO
    File2.xml.type - xml
    by having this settings, File1 will be picked only when File2 is placed in the folder.
    Regards

  • FCC for file receiver help

    Hi all,
    My source xml is:
    node1_mt
    <node2>
      <node3> 0 to u
         field1
         field2
         field3
         <node4> 0 to u
            fielda
            fieldb
            fieldc
         </node4>
      </node3>
      fieldaa
      fieldbb
    My target file should be: (csv)
    field1 field2 field3
    fielda fieldb fieldc
    fielda fieldb fieldc
    fielda fieldb fieldc
    How should I have my FCC parameters please?
    Many thanks.
    Ramesh.

    ok, now got a bit further.
    I am just using:
    Recordset structure: header,item
    header.addHeaderLine  = 1
    header.fieldSeparator    = ,
    header.endSeparator    = 'nl'
    item.fieldSeparator       = ,
    item.endSeparator       = 'nl'
    This is creating the output file as: (for multiple items)
    field1  field2 field3 fielda fieldb fieldc
    fielda fieldb  fieldc
    fielda fieldb  fieldc
    Now my only question is how can I take the first item line and put it in a separate line instead of the header?  like...
    field1  field2 field3
    fielda fieldb fieldc
    fielda fieldb  fieldc
    fielda fieldb  fieldc
    Many thanks.

  • Using PHP for file IO

    I am dealing mainly with a nested array of objects that I
    would like to be able to save to a .txt or .html file. Because
    flash can't do this (I assume for security reasons) I need to use a
    PHP script. The only problem is, I don't know how.
    Can someone please inform me of how to save a flash variable
    with PHP?
    Also, I'd like to know how to get actionscript to read the
    file in again.
    Thanks in advance,
    Raphael

    quote:
    Originally posted by:
    CogDev
    bump

Maybe you are looking for

  • Logging SQL parameters in Database Adapter??

    Hi there!! We'd like to be able to log all the parameters that are used in a SQL operation in Database Adapters. So far, we've been able to log the query with '?' instead of the real parameters. For example: select t.* from tsupcontact t WHERE t.idsu

  • BlackBerry Z10 Internet Browser pops up 8 preview windows - how do you pick what is in the 8 preview windows ?

    In main Home Display, I click Browser and it pops up 8 preview window panes for me, which is most helpful.  I have some there I use frequently such as a traffic site.  But, my 8 preview window panes have no button I can click which allows me to add a

  • How to save a scanned pdf file that has been rotated?

    I scanned several pages of a book but I evidently did it upside-down.  I rotated the pages 90 degrees, twice, and then saved the document with a different name.  But when I open the new document, the pages are still upside-down.  How can I correct th

  • Is able to run two webservices in Weblogic 7.0 trial version ?

    Hi all: I caught a webservice problem in weblogic7.0 (trial version). I have built an Session Bean example (examples\webservices\complex\statelessSession) in Weblogic 7.0 Examples Service, it works as expected. However, when I create another session

  • Lost iPad and iTunes account?

    How do I delete the missing iPad from my iTunes account? My only concern right how, since the chances of it turning up is slim, is that they don't use my account to purchase anything. I've browsed though the forums and it says pretty much that I can