Where is the running JAVA file is located

Hey,
lets say my java file would be in C:\package1\whereIam.java
if I run this program, how can I ask (command ?),
in which directory the running java file is located.
i.e. I would like to get C:\package1
Aykut

It's actually more complicated than that. The class could be in a jar file... would you want the directory the jar file is in? Well, I'll let you deal with those issues. You can get a URL to your class like this, I think:URL me = this.getClass().getResource("/" + this.getClass().getName());

Similar Messages

  • Where are the JSP  Java Files stored in WL8?

    Hi there,
              i'm looking for the .java-Files generated from the .jsp-File. I have already set the property "JSPKeep Generated".
              Thanks for your help
              cheers immo

    I don't know if this varies by WLS version, and you haven't specified which version you are using, but in my WLS 8.1SP2 distribution, they are stored at:
              c:/bea/user_projects/domains/<domain>/<server>/.wlnotdelete/extract/.../jsp_servlet/.../*.java

  • Where is the run.bat file?

    Hi,
    I have downloaded beanbuilder-0_6-alpha from https://bean-builder.dev.java.net/
    I am trying to install the bean builder going thru the readme file. I have extracted all the file but I cannot find "run.bat". Can anyone help me find this file.
    If this is not how I should go about installing the bean builder. Please guide me.
    Thanks,
    tick_tick

    Hi,
    You probably have the wrong classpath on your line:
    java -cp ... javafilename xml ruleset_nameSince the DocumentBuilderFactory can't be found.
    It is most likely included in one of the jar-files in the lib directory.
    /Kaj

  • Does anyone know where the iWeb data files are located or what they are called?  I can't find them.  I looked in Finder for files named the same as my website, but found nothing.  Any help would be appreciated.

    Does anyone know where the iWeb data files are located or what they are called?  I can't find them.  I looked in Finder for files named the same as my website, but found nothing.  Any help would be appreciated.

    If you erased or replaced your hard drive since iWeb was cancelled, then they are gone. Otherwise, if you have maintained backups then check those.
    Usually such files are in the /Home/Library/ folder or a sub-folder.
    Exposing the /Home/Library/ Folder
    Pick one of the following methods:
    A. This method will make the folder visible permanently. Open the Terminal application in your Utilities folder and paste the following at the command prompt:
    chflags nohidden ~/Library
    Press RETURN.
    B. Click on the Desktop, press the OPTION (⌥) button, select Library from the Finder's Go menu.
    C. Select Go To Folder from the Finder's Go menu. Paste the following in the path field:
    ~/Library
    Press the Go button.

  • HT1766 where is the Itunes backup file located in the computer ?

    where is the Itunes backup file located in the computer?

    Read here:
    http://support.apple.com/kb/ht4946

  • In windows 7 where is the iPad backup file located?

    In windows 7 where is the iPad backup file located?

    iTunes places the backup files in the following places:
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\

  • Where are the actual Aperture files located? Only in the application? I am transitioning to Lightroom and would like to only move some of the files. Advice appreciated. Also anyone know how to transfer in with edits?

    Where are the actual Aperture files located? Only in the application? I am transitioning to Lightroom and would like to only move some of the files. Advice appreciated. Also anyone know how to transfer in with edits? Using iMac, OS X, most recent Aperture and Lightroom 5.7 with plugin for Aperture.

    Define "the Aperture files".
    Read this concise guide.
    The files you imported into an Aperture Library can be exported (at any time, and repeatedly) using the command "File ▹ Export ▹ Originals".  Your Originals are never altered.  What went in is what comes out.
    Adjustments and changes to the metadata that you made since creating an Image in Aperture by importing a file are saved to a text file.  This file is combined, on-the-fly, with the Original to create the Image that you see in Aperture.  There is no file saved to disk that is the full-size Image.  Thumbnails are saved, and Previews are saved.  These are JPG files, almost always smaller than the Original.  They are not substitutes for the Image for the use you have.
    When you need a file of an Image to use in another program, you export the Image from Aperture.  "Export" means "Make me a file of this Image according to these file specs I'm providing".  The way to get files of your adjusted Images is simple:  create them by exporting.  Specify "Original size", and use a loss-less image-file format (e.g. TIFF 16-bit) if you want to retain as much visual information as possible.
    Search the Web for information about transitioning from Aperture to Lightroom.  Note that I say "transitioning".  You cannot move a database from one format to another without significant changes, and likely some loss of information.  Adobe provides a tool and some instructions.  I strongly recommend working out the process step-by-step, and then proceeding with first a few Images, then a bushel-ful, and stopping to use the first few, the the bushel-ful, before committing your entire collection to the process.
    As always, never use any computer file without having a back-up.
    We have seen mixed reports here of the success of the LR tool that creates a LR database from your Aperture database.
    If you want to carefully define the process, and test and refine it, use the excellent process-development, analysis, and execution program inShort.
    Sadly, there is not and can never be a good, thorough re-positioning of the digital assets in your Aperture Library to become digital assets in a LR database.  Just as a metaphor for any user contemplating transitioning to another digital asset manager:  that would be like digging up a house in one country, planting it in a hole in another country, and expecting to be able to use the toilet and the sinks, turn on the lights, cook dinner, and sleep soundly.
    HTH,
    Kirby.

  • Where is the swing.properties file?

    In J2SDK 1.5 beta, where is the swing.properties file.
    The file is supposed to be located in <Java Home>/lib/ but it is not there.
    Thanks,

    I'm not sure about 1.5, but normally there isn't one. The defaults are just used unless there is one.
    Look here
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/UIManager.html

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • How to test the simple .java file in cactus

    dear friends,
    i have use the junit first time .And i am working in weblogic8.1 so i have use cactus .But i face the problem to use it.
    1. how to test the simple .java file in cactus.
    2.how to run the cactus in weblogic 8.1.

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • How to compile and run java files on a mac using command line?

    can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard

    What do you mean by "where to put them" ? What do you want to put anywhere ?
    Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
    Edited by: Michael_Knight on Aug 31, 2008 4:23 AM

  • How can i run java file by double click like Visual basic

    i have to run java file by giving a command on DOS promtp.But in Visual basic i easily make a .exe file to run my program. Does java provide this thing?
    please help me.

    If you have intaled a JRE in your computer, at leasrt in windows, the .jar files are asociated with the VM, so a double click on them will execute the, thats how things work on my computer, with jdk 1.4 installed.
    Abraham.

  • Just where ARE the site definition files?

    I've just received CS4.  I want to move it to my more powerful laptop when I install it.  I know how to do that and I can move site files, but where are the site definition files?  I really don't want to have to set up each site from scratch.  Is there one (or more) files that are the name, url, location, id, password etc for each of the (many) sites in CS3?
    don Carlos

    To import/export site definitions (not site files):
    On the old computer:
    Site > Manage Sites
    Shift click to highlight all site names
    Export..
    Same procedure on new computer then Import..

  • How to run .java file in windows ?

    How to run .java file in windows without installing any program? Thx!

    First, U must make sure that there is JDK on your computer
    Then, set the envionment variables which the os can find your compiler and interpreter: javac java
    after those, you must complie your .java file to .class file, then you can excute it by java, for example " java helloworld"

  • I ran the Adobe installer for CC desktop and it failed.  Error: 50   What happened?  Now the Run.exe file is gone.

    I ran the Adobe installer for CC desktop and it failed.  Error: 50   What happened?  Now the Run.exe file is gone.

    Hi,
    Please refer to the thread below where this issue has been discussed:
    Error code 50
    Regards,
    Sheena

Maybe you are looking for