How to open a relative fileOutputStream

Hello all,
I need to open a fileWriter to save levels in my game as text documents. I can get the URL with
this.getClass().getResource("path to text file");
but how do i then open a fileWriter from the URL;
thanks

Use files then, not URLs.thats exactly what i want to do, but i dont know the
whole file path of the file only where it is relative
to the class file. I am doing this so i can move the
program and the levels to a different directory and it
will still run.
erm nvm, didnt notice you were using FileWriter ;/yes i need a stream where i can write text to a file.
File f1 = new File("../bob.txt"); // one directory up
File f2 = new File("bob.txt"); // same directory
File f3 = new File("maps/bob.txt"); // inside maps directoryIs this what you are talking about?

Similar Messages

  • How to open and the view the .jsp(OAF) page and it's related code?

    Hi,
    Can anybody help on how to open the .jsp and it's related java files to see the coding? I want to know the table and view details related to a particular OAF page. It will be great help if someone explains.
    Thanks in advance.
    Muruga.
    Edited by: Murugeshapps on Jun 26, 2009 6:37 AM

    Hi,
    Please see the following documents.
    Note: 416708.1 - How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12.x
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=416708.1
    Note: 330236.1 - Configuring JDeveloper For Use With Oracle Applications 11i and R12
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=330236.1
    For further OAF questions, please post it in [Technology - OA Framework |http://forums.oracle.com/forums/forum.jspa?forumID=210] forum, you would probably get a better/faster response.
    Regards,
    Hussein

  • How can I open a relative path

    Does somebody knows how can I open a relative URL from an applet by the
    getAppletContext().showDocument(new URL("http://java.sun.com"), "_blank");
    instruction?
    I mean, I want to open a html page stored in my hard drive but if I change the "http://java.sun.com" to, for example, "Mi documents/index.html" it doesn't works.
    Could sombody help me with this please?

    Well, in fact you can in a special case :
    - The file you want to access is in the same directory than the applet (or in a sub-directory)
    If this condition is OK, you can open the file using :
    java.io.InputStream MyInputStream = <YourAppletClassName>.class.getResourceAsStream("sidira_interactif2.svg")
    With this stream, its easy to read the file content.

  • When I try open a .pdf file my Adobe Reader 11 only allows the download / save opening the related window and don't show me both options 1) open with ... and 2) save as.... probably someone flagged the choise... always perform this way ....

    When I try open a .pdf file my Adobe Reader 11 only allows the download / save opening the related window and don't show me both options 1) open with ... and 2) save as.... probably someone flagged the choise... always perform this way ....
    Could some one give help and let me know where I can probably find the settings option that allows me to change and switch to previous situation where it was possible to decide time to time how to proceed either opening the file or saving it ??
    Thanks in advance
    David

    What is your operating system?
    Open a PDF from where?  If online, in what browser?

  • How to Open & Close the periods in Asset Accounting for Depreciation.

    Dear All,
    How to to How to Open & Close the periods in Asset Accounting for Depreciation ? Please let me know
    If there is any T.Code or procedure for it.
    Your help is highly appreciated.
    Thanks & Regards,
    Pankaj.

    Dear Alex ,
    1) I am facing one problem that one of my asset 123 I Capitalized on 13.09.2006 have deactivated on
    14.05.2008. with value of Rs.1.00.000/- all the activities are closed down related it on deactivation date.
    In 2009 a new asset 456 purchased with different value. But in T.code OARP in column cumulative acquisition
    value it is showing value of Asset 123 instead of it's own capitalization value.
    2 ) And about my Asset 123 it is also showing a Cumulative Acquisition value in year 2009 which it
    should not display because I have already deactivated that asset. ( The same checked in AR03 )
    Please help.
    Your help is highly appreciated.
    Regards,
    Pankaj.
    P.S :- Keep the discussion on for further assistance.

  • How to open a URL without session ID and reuse the current browser session?

    Hi All,
    I have a question about HTMLDB 2.0
    How to open a URL without session ID and reuse the current browser session?
    That was the behaviour in HTMLDB 1.6 ...
    My usecase for this is the following:
    We have written an issue tracking application, which sends e-mail to the interested users, when something happens.
    In these email we've put a link to some page, with some parameters in the URL.
    The idea is for the user to be easy to click on the hyperlink and to see the details of the ticket.
    When the user clicks on such a link he is directed to a login screen (page 101) and he enters his Username and password, and is then forwarded to the details for the ticket.
    Then he receives another email (e.g. for another ticked). He clicks on the link and :
    a) in HTMLDB 1.6 he goes to the details as he didn't close his browser and session is remembered
    b) in HTMLDB 2.0 he is prompted to enter username, password with the username populated
    Please tell me how can I achieve the same behaviour in HTMLDB2.0 as it was in HTMLDB 1.6.
    I understand this change is somehow security related, althogh I don't understand how. If you can explain this either I would be very happy?
    Best regards,
    Mihail Daskalov

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • How to open a "wav" file in Logic 7.2.1 and then remaster?

    A fellow musician wants to see if I can improve audio tracks his band recorded in Cubase SX. He has a CD with the WAV files of each of 12 audio tracks. First question - Could someone tell me how to open his files and then import them into Logic Pro so that his tracks 1-12 correspond to my audio tracks 1-12 and be in sync?
    Second question - assuming I can get his tracks going what are the key ways to boost volume or "master" his tracks so that the end result, a stereo mix, is loud vibrant and "radio ready"?
    I'm familiar with the mastering plug ins on the output channels of Logic. I've used "Soft Maximizer" but it seems to be compression related. Are these "rooms", available on the output channels, the only way to increase volume and aliveness?
    He's doing this because the studio he's at can't seem to make a mix that he's happy with. He says the mixes lack volume and vibrancy. Thanks in advance.

    Use the Audio Editor window to import the tracks. Then drag them one at a time onto Audio tracks in the Arrange window so they all align to Bar 1 1 1 1.
    The fun will start if they were not recorded simultaneously as you will need to align them manually to be in sync. Good luck with that it takes time but is not impossible. Use the moveable start point in the Audio Editor to adjust the start of each wav file until they are aligned.
    To improve the levels, probably the quickest way is to Normalize each track first in the Audio Editor window before you start mixing and EQ'ing them in Arrange.
    Rik

  • I downloaded Newest mozilla yesterday, adobe updated, and now when I click a YouTube video I get a box saying "Firefox doesn't know how to open this address, because the protocol (rtsp) isn't associated with any program." and can't watch any videos?

    I downloaded the latest version of Mozilla Firefox yesterday, full and complete, and I am actually using it right now. The only problem I have had is upon clicking any YouTube video, the box pops up saying "Firefox doesn't know how to open this address, because the protocol (rtsp) isn't associated with any program." But there are no directions or suggestions on how to address this problem. Ive looked at YouTube add-ons and none of them really seem related. Upon the finish of the new Mozilla, I also was prompted to upgrade the flash player, and did so without any trouble. I am only guessing this is an extension/plug-in problem. I really am quite confused!

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • How To Open Word In Java Application

    Hello
    How To Open Ms-Word Or Ms-Excel Or Any Other Format In Java Application
    According To Their Own ForMat

    The best is to know which program you like to execute. Make those many strings available. Suppose you like to execute M$ Word and M$ Excel. Now do like this..
    String word = "";  // null
    String excel = ""; //null
    /* In the File Class you can find out the methods that can search these files and return thier
    absolute and relative paths. Save those paths in uppe String(s) word and excel and place them in
    runtime.exec( word/excel)...etc. Place this code before a tolbar button and click that..*/

  • How to open file in their native application

    How to open file in their native application form web browser?
    if associated .txt file should open in editplus then from web browser if I try to open .txt file it should open in editplus rather then open in notepad(default), If on other computer if I associate .txt file should open in word, it should open in word. I am using Tomcat Web Server.

    that's nothing you could influence from a servlet or jsp.
    all you could do is specifying the content type of your response.
    Next you might hope that the client requesting your content uses a browser that relates the given content type to a special application (e.g. "text/plain" -> editplus or notepad or kedit or word or ...)

  • How to open examples in Essbase Studio console

    Hi,
    How to open examples comes with Essbase 11 in studio console?
    Thanks,
    Best,
    Veeranna Ronad.

    since the cubes were not built through Essbase studio, Oracle did not retrofit them into studio for the most part. If you look at the flat files on your studio server in \hyperion\products\Essbase\Essbasestudio\server\datafiles\tbcSamples you will see the files that you could use to recreate sample Basic.The SQL files that John talks about allow you to do the same thing from relational tables and do a drill thru report

  • How to open winmail.dat attachments???

    Hi, this is my first use of this discussion forum, so here goes: Can anyone tell me how to open attachments I am sent on a regular basis that are winmail.dat attachments???

    Search Google for "winmail.dat mac" and you'll find many solutions
    Also note that this forum is for troubleshooting Apple Software Update for Windows, a software package for Windows designed to update Apple products that run on Windows, and not related to your issue, so you should really post search/post your question in the Mac OS X forums

  • How to Open acc.sit files

    I just downloaded a Bill Frisell album off of his site. I downloaded the files as ACC for mac, and saved the files to my desktop, but they will not open with iTunes. Does any one have any ideas on how to open these files?
    Thanks
    Brian

    M,
    Thanks, that did it. Usually when I download files that are compressed i.e. Zip Files, Stuffit opens them automatically. This time I had to locate the program and start it up before I could uncompress the files. Is that related to the file type?
    Thanks again. Thanks also for the link, I downloaded the newer version.
    See Ya
    Brian

  • How to open project from an earlier version (RH x3) using RoboHelp 6.

    Hello everyone, I need your help. I have recently upgraded
    from RH x3 to RH V6. I have just completed the installation of RH6
    after spending long time with Adobe customer support as it took
    them long time to figure out how to provide me the unlocking key to
    install RH v6.
    BTW I have only installed RoboHelp 6 by itself. I did not
    install their Source Control because we already have Visual Source
    Safe which we have been using in our company.
    Also, since I had Adobe Reader 8 installed on my PC, I did
    not install Acrobat Element 7 either. As I suppose if Acrobat 7 or
    higher is installed RH v6 was not going to install Acrobat Element
    7.
    Well, now after I have installed RH v6, my first step is to
    find out how to open project from an earlier version (RH x3) using
    RoboHelp 6.
    RH x3 is installed on my old PC and I am working on my new PC
    where I have installed RH V6.
    Sorry, for providing you too many details, the purpose is
    only to give you a clear picture.
    Please, give me your feedback if I am doing everything
    correct and how should I open the project from an earlier version.
    Thanks

    Hi Peter,
    Thank you so much for the response. Actually, after I posted
    the question on Forum we had lost internet connection for some time
    and I just went ahead and tried it by myself.
    This is what I did – since we use MS Visual Source
    Safe, my all files were in the working folder of VSS in my c drive.
    I just clicked the Open tab/More Files in RoboHelp Starter and
    located the RoboHelp HTML Project File. It opened without any
    problem. Everything looks alright.
    Is there anything specific I should be checking to make sure
    if it is working fine in this version of RH. Because I did not
    create this project, somebody else did and I have never used this
    tool before this is the first time I will be using.
    I found your site pretty helpful though and it did have some
    information about Source Safe. I still have one question related to
    Visual Source Safe that Is RoboHelp v6 linked to VSS automatically
    and check the files out from it automatically whenever a project is
    opened or we have to manually set the link between the RH6 &
    VSS.
    In RH x3 whenever I would open a project it would prompt a
    message that in order to open this project the following files need
    to be writable, would you like to make them writable, selecting
    that option would checkout all the files from the VSS to make them
    writable. However, in RH V6 I opened an existing project and it
    opened without checking out the project files from VSS. Do you have
    any idea what’s happening?
    Ps: Do you recommend any book on RH 6 for starters or any
    other recommendation?
    Your help is always appreciated

  • Firefox doesn't know how to open this address, because one of the following protocols (itms-service) isn't associated with any program or is not allowed in this

    Firefox doesn't know how to open this address, because one of the following protocols (itms-services) isn't associated with any program or is not allowed in this context.
    You might need to install other software to open this address."
    tried to fix in about:config but itms-services not foundn; also tried to fix using network.protocol-handler.external.foo but that wasn't listed either
    trying to download an app related to a rewards gift card
    firefox and os versions are up to date on MacBook Air

    Hello!
    Would you please provide the link you were trying to visit?
    Also, you may want to post this question to the [https://support.mozilla.org/en-US/questions/new/desktop Firefox for Desktop Support Forum] . The Mozilla Support volunteers there may be able to better assist you.
    I hope we can help you solve your problem.

Maybe you are looking for

  • Unable to Switch Users on Window 8 Start Screen

    I can not switch users from the Windows 8 Start Screen. Previously when I clicked on the current user Icon in the upper right corner, all the users were displayed for selection. Now it just displays a pull-down menu (1) Change account picture, (2) Lo

  • BPEL process crashes randomly

    Iam working on softwareproject based on JAVA Web Services, deployed on a AXIS server, which are orchestrated in a BPEL process. The BPEL process was created with JDeveloper and deployed on the Oracle BPEL PM 10.1.3.1.0. The main WMYPC BPEL process in

  • ISA and IPC

    hi   I got the assignment to display the ipc component like subtotal,fright charges  in jsp page of isa.(SAP E-Commerce 5.0) . But I am not able to find how to do it. the arrangement of the system is as given below. ECC 6.0 as sap R/3 and sap b2b isa

  • CRM - BSP applications - Getting started

    Hi Experts , I have a knowledge of BSPs used in R/3. and for my project requirement now i am asked to study CRM BSPs. And i am not aware of the CRM BSP applications at all. what is the difference between BSPs and CRM BSPs ?? Can anybody give me a Doc

  • What does the sync choice "erase data before syncing" do?

    I want to synce a Sony Ericsson cell with my ical via isync. One of the choices before syncing asks whether I want to erase info on the cell before syncing or merge the info on the cell with the mac. I only want to sync the calendar data and not the