Can't find file when use the main(String[] args) method

I put a file under the DefaultDomain directory of Weblogic 11.1.1.5 on my local machine. Below is how I look up this file
FileInputStream fis = new FileInputStream("input.xml");
I started up the IntegratedWeblogicServer instance and I tested using the below 2 approaches.
1) When I test a web service program using the below approach, it CAN'T find the input.xml file
public static void main(String[] args)
2) When I package it into an EAR file and deploy it onto the server then log into the admin console and use the test client approach then it's able to find the file
How do I make it so it can find the file using #1 approach?
Thanks

That's how relative paths work, and it's nothing particular to Java.
When you type ls input.xml or dir input.xml does it list the file, or give an error? If it lists the file, then it's in your current directory, and it will work if you run Java from that directory. If it gives an error, then that file is not in your current working directory, and Java won't be able to find it either.

Similar Messages

  • I get itunes can't find file when I tried to play a TV show I had purchased that was supposed to be in the cloud. There are several of these, including an entire season. In the store it shows that I purchased these shows when I checked them.

    I get itunes can't find file when I tried to play a TV show I had purchased. I then checked and had this problem with an entire TV season I had purchesed. The shows were supposed to be in the cloud. I went to the itunes store, went to the tv shows and they showed that I had purchesed them. They do not show up when I click on purchesed in the store.

    Try this...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • Firefox 33 doesn't display a pdf file when using the response object

    Firefox 33.0.2 does not display pdf files when using the code below from an asp.net program, which works for previous versions of Firefox, and also works with IE. I'm using the built-in pdf viewer. All of my plugins are disabled.
    Dim strPDF As String
    strPDF = Session("filname") 'pdf filename
    Response.Clear()
    Response.ClearHeaders()
    Response.Buffer = True
    Response.ContentType = "application/pdf"
    Response.CacheControl = "Private"
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("Expires", "0")
    Response.AddHeader("Cache-Control", "no-store, no-cache, must-revalidate")
    Response.AddHeader("Content-Disposition", "inline; filename=" + strPDF)
    Response.WriteFile(strPDF)
    Response.Flush()
    Response.Close()
    Response.Clear()
    Response.End()
    Session("filname") = ""

    Thanks cor-el. You pointed me in the right direction. It appears to me that a reported Firefox 33 bug with the handling of compression (Transfer-Encoding: chunked) is the culprit (https://support.mozilla.org/en-US/questions/1026743). I was able to find a work-around by specifying the file size and buffering. Below is my code, with some code from http://www.codeproject.com/Questions/440054/How-to-Open-any-file-in-new-browser-tab-using-ASP.
    Dim strPDF As String
    strPDF = Session("filname") 'pdf filename
    Dim User As New WebClient()
    Dim FileBuffer As [Byte]() = User.DownloadData(strPDF)
    If Not (FileBuffer Is Nothing) Then
    Response.Clear()
    Response.ClearHeaders()
    Response.CacheControl = "Private"
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("Expires", "0")
    Response.AddHeader("Cache-Control", "no-store, no-cache, must-revalidate")
    Response.ContentType = "application/pdf"
    Response.AddHeader("content-length", FileBuffer.Length.ToString())
    Response.BinaryWrite(FileBuffer)
    Response.Flush()
    Response.Close()
    Response.Clear()
    Response.End()
    End If
    Session("filname") = ""

  • I can not find how to use the basic Mac air keyboard. where do i find it or do a tutorial board

    I am new to the Mac worls and hardly used a PC . I used a Blackberry. How can i find how to use the macair key board. I can not get the plus sign or the brackets on my leyboard to work. The option key is called the atl key.. There is no easy guide for how to use all the Buttons on the Key board. where do i find them

    Hello Sanjit_Das:
    sorry for my english again !.
    My purpose is almost the same as this:
    https://forums.adobe.com/message/6137964#6137964#6137964
    But I do not know which  path must specify when the video is uploaded to assets:
    Sorry to ask something so absurd.
    I tried putting all
    <source src = "assets / Myvideo.mp4" />
    not working
    <source src = "C: \ Users \ Angel \ Downloads \ NEW \ pruebamusevideo \ assets/Myvideo.mp4">
    not work.
    etc
    Presenting want to work from any computer, DVD, memory stick ...
    I'm going crazy.
    I know it's something about the route.
    From muse Vimeo links to work, but when I export them to HTML not working. I guess it's a problem related to the same.
    Thank you very much again.

  • Is there a capability to save/export the time capsule settings file when using the iphone/ipad airport utility. the "file" button does not exist on the latest airport utility app.

    is there a capability to save/export the new airport 2TB time capsule settings file when using the iphone/ipad airport utility. set-up wasn't a problem but the "file" button does not exist on the latest airport utility app v6.3 to save the configuration file.

    the "file" button does not exist on the latest airport utility app v6.3 to save the configuration file.
    Sounds like you are a bit confused with version numbers.
    Latest AirPort Utility version for the iPhone / iPad is 1.3.3.  There is no option or capability to export/import settings on the iOS version(s) of AirPort Utility.....although you could take a series of screen shots and save them for future reference.
    AirPort Utility 6.3.x is found on a Mac.....not on iPhone / iPad. Export and Import options are found under the File menu in 6.3.x.

  • I can´t find how to use the "at" sign

    I can´t find how to use the "at" sign on my new Mac book??

    Go to system preferences/keyboard/input sources and make sure that only US is there.
    http://support.apple.com/kb/PH13835

  • When does the Java main(String args[]) method exit?

    Hi all,
    I and my colleagues want to know, when does the main() method exit?
    we wrote a small code as follows:
    import java.awt.*;
    public class Test {
    public static void main(String[] args) {
    Frame f = new Frame("hi");
    f.show();
    System.out.println("after show");
    and ran the program, in which case I could see the printed message "after show", but although there is no code after the System.out.println(), the Java virtual machine does not exit and waits for the Frame to close.
    My question is has the main method exited in this case? since it clearly shows that it does not have any more code to execute. Does java create the main method as a thread or as a process?
    regards,
    Harshad

    To make your application terminate you need to add code to cause the AWT thread to handle the termination. In your code, before f.show(), try:
    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        dispose();
      public void windowClosed(WindowEvent e) {
        System.exit(0);
    });Now, at least you can click on the little "X" on the upper right-hand corner of the Frame (at least in Win95/98/NT) environments) to cause your application to receive a window closing event. It is also possible to add a menu with an option to exit; in that case I'd use an EventQueue to cause a window closing event to be sent.

  • While using Windows 7, itunes64setup.exe is shown as down loaded but, i can not find it when searching the computer. Whats up?

    I can not find the setup program by searching the computer.

    It should be in your Downloads folder.
    Use this link for instructions: http://windows.microsoft.com/en-us/windows-vista/find-a-file-you-have-downloaded

  • Where can I find information about using the Mozilla Help web pages?

    Such as tips to make searching the help pages faster like adding symbols + or - or " which some internet search systems use.
    There is simply too much information offered for me ( a neurologically disabled person - specifically with working memory difficulties [dyslexia, dyspraxia/DCD] ) and all one can do is write yet another new question - which will probably be a repeat of what has been asked before in a different way and increase the already existing mass of information for the next enquirer to 'wade; through!
    The consequence of not knowing where to look for information, is that I just bumble along and never become as proficient using Firefox (and the web and my computer) as might be possible if I had a really good teacher giving personal one to one guidance matching my knowledge gained so far and skill potential.

    Hi Andrew
    The main introduction to Firefox are these articles
    * https://www.mozilla.org/en-US/firefox/tour/ (it is interactive click to see what happens)
    ** https://www.mozilla.org/en-US/firefox/desktop/
    * [[Get started with Firefox - An overview of the main features]] a long article with plenty of pictures and short video clips
    This is a listing of your previous questions on this forum
    * https://support.mozilla.org/en-US/search?a=1&asked_by=TolknyAgain&sortby=1&w=2
    *Generally for anyone who is signed in to the forum their own questions are seen [https://support.mozilla.org/en-US/questions/all?owner=mine&show=all here] ( [https://support.mozilla.org/en-US/questions/firefox?owner=mine&show=all or] firefox only)
    We do not give general computer help here, but some links that may help you.
    The default search engine used by most versions of Firefox is Google these are some useful help pages
    * [https://support.google.com/websearch/?hl=en#topic=3180167 Welcome to the Search Help Center]
    ** [https://support.google.com/websearch/answer/136861 Search operators] Note a dash maybe used to exclude a word
    **https://support.google.com/websearch/answer/2466433 [ Punctuation and symbols in search]
    * The '''easy way''' just use http://www.google.com/advanced_search
    If you find something useful remember to bookmark it, and that Firefox is good at finding things you have already visited
    * [[How to use bookmarks to save and organize your favorite websites]]
    * [[Awesome Bar - Find your bookmarks, history and tabs when you type in the address bar]]
    Post back in this thread again if you have further questions about Firefox use or our help articles.
    We may not be able to give one to one teaching but we can try to answer questions about Firefox.
    Possibly consider using Firefox on wikipedia and the Khan Academy to learn more yourself.
    This is very simple you have probably already progressed past this but serves as examples
    Some helpful terms
    * [https://simple.wikipedia.org/wiki/Web_browser Browser] <-- clickable link - often blue in colour <br /> More detail https://en.wikipedia.org/wiki/Web_browser
    * [https://simple.wikipedia.org/wiki/Hyperlink Link] <-- link <br />https://en.wikipedia.org/wiki/Hyperlink <-- different article
    * [https://simple.wikipedia.org/wiki/Search_engine Search Engine] <br />https://en.wikipedia.org/wiki/Web_search_engine
    * [https://simple.wikipedia.org/wiki/World_Wide_Web World Wide Web] vs [https://simple.wikipedia.org/wiki/Internet Internet]
    **I will leave it as an exercise for you to look up the ordinary English versions of ''www'' & ''Internet'' in en.wikipedia.org
    ** Note the linked articles are themselves full of links.
    * http://en.wikipedia.org/wiki/Khan_academy -> https://www.khanacademy.org/ <br /> Includes subjects from basic arithmetic to computer programming

  • Can't find Library when using Import Mailboxes option in Mountain Lion

    Hi there, I'm trying to import my Mailboxes I've created on my iMac in my Apple Mail, but I can't see the "Library" folder. I've searched the web and found instructions to unhide the "Library" folder when using Finder, but this does not help me as I can't use this when following the instructions and prompts in the Mail>File>Import Mailboxes option. I'm running Mountain Lion. Can anyone help?

    Sorry that option not available in mountain lion.
    You can use a terminal command but the easiest way to do this is to choose Go>Go To Folder ~/Library.
    When it opens drag the Folder from the window bar into your side bar.
    This will make it always available.
    To remove it just drag out of the side bar.

  • URLClassloader can't find superclass when using JWS

    Using a URLClassLoader to load a class "LocalClass" which is stored locally on disk. "LocalClass" extends "AppClass" which is in a jar file in the application classpath. This works when running the application from the console, but not when running it using Web Start.
    Using Web Start, the class loader fails with a NoClassDefFoundError on _"AppClass"_. I guess it's a security restriction, but I find it strange that it's okay if all the superclasses are loaded through the URLClassLoader, i.e. if "LocalClass" extends Object or if "AppClass" is on the local disk.
    Is this a by-design restriction of the security apparatus or is there a workaround?

    Found the answer at http://forum.java.sun.com/thread.jsp?forum=38&thread=368027
    Solution is not to use the default parent class loader (the system classloader) but AppClass.class.getClassLoader() (the JNLP class loader)
    in the URLClassLoader constructor.

  • How can I find files renamed using mv file/path/folder .filename

    So I was a complete idiot and was messing around with the terminal. I was trying to figure out how to hide folders from other people who would have access to my account. Instead of creating a useless text file within a new folder, I just tried it on one of my own personal folders. The folder itself contained about two months worth of work, and I have no clue why I did it. But I did, and now I cannot find it for anything. This is what I did:
    mv /users/azuredavid/documents/Q1/ .filename
    However when I tried to access this via the Go To folder option, it wouldn't work. I used the exact path as above as well as variations using a period. Eventually I resorted to using:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    Now all I see is the addition of .DS_Store and .localized files in the folder. Still no work folder. I've seen conflicting reports of what exactly is the correct command for the defaults write command. I've used the one above as well as a few others, like AppleShowAllFiles YES, bool true, etc. Is there any way to get those files back?
    Thanks in advance.

    1. Look for it directly inside your home folder, or try using the Terminal's find command to locate files with the names of items in that folder.
    2. The syntax used is one of the correct ones for that command.
    (87770)

  • Where can I find information about using the measurement tool and log?

    Am try to use the measurement tool to measure perspective plain; any ideas?

    No one can remotely have "any ideas" to help you when you don't even mention what your problem is nor what your system and workflow are like.
    Of course, when you post here,one assumes you have done your due diligence, read the documentation, the user guide, the Help files in the Photoshop Help menu, as well as done Google and forum searches, etc, and we would expect some sensible, detailed information from you.
    Teaching someone Photoshop from scratch, step by step, exceeds the scope of this forum—or any other forum.
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    A screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Can't select files when using Automate batch command

    Hi all,
    I'm having a huge problem here.
    I am working with CS3 on a mac (leopard).
    I batch process (when applying actions) all the time using the Automate/Batch process command.
    I have been doing this for years on my computer but all of a sudden it has developed a problem. When I bring up the batch command and select a source folder, I am not able to select any of the files (jpgs/tiffs) . They are not highlighted for me to select them.
    So far I have deactivated and re-installed CS3 on my computer. Still not working. So, I have downloaded CS3 onto my laptop and taken the files from my desktop onto the laptop and the problem is the same. Like I said, this has just started happening for no reason after years of working fine.
    Please, please, can anyone help.
    Thx.
    Richard.

    I hardly use the feature, so I may have missed some change, but »Folder« seems to indicate that You are to select a Folder, not Files.

  • Safari can't find servers when using Wi-Fi

    I can log onto wi-fi networks just fine. When I look at the details I see all the connection details and the wi-fi icon shows up on the phone.
    But when I try to use the browser, or even just access email or maps, the phone can't locate anything. I have to shut off wi-fi and use edge.
    Any ideas what's wrong?

    I think my situation might be similar and I am stuck as well...
    What I see is I CAN connect to my home network (secured etc) no problem.
    I have been able to connect to unsecured networks before, no problem.
    But the "unsecured" wireless that is at my office does NOT allow me to get to the internet. Connecting to it via a laptop does the thing where it redirects the first web page you open to a agreement page, and you need to click "yes, I will be nice" or whatever before it allows full internet access, but then it is free and clear.
    From the iphone, the connection looks like it works - the iphone thinks its connected. If I look at the details I see it starts with a 169.* address, then DHCP looks like it kicks in and it gets a 42.* address and a router on that same network. The DNS it gives are on different networks (192.* and 166.*) however. Any page I try to go to in safari waits for a while then reports "...can't find the server", instead of going to the agreement page. I have tried adding the router's address in the DNS list just in case...
    Is there some incompatibility with this sort of thing?
    Cyberquixote
    Message was edited by: cyberquixote

Maybe you are looking for