How to detrmine what directory you (the JAR file) are in

Is there some sort of function that returns (ideally in a string, or array of strings) what directory you (the JAR file) are in? Something along the lines of:
String dir = Function();Then dir would be something like : "C:\Users and Settings\Me\Java Apps"
Thanks.

It's not clear exactly what is wanted. Look at the information in the API for java.lang.System,getProperties(), which lists properties available - choos the one you want.

Similar Messages

  • FMS  - change directory where the log files are located?

    I want to change the logs files directory from:
    C:\Program Files (x86)\Adobe\Flash Media Server 3.5/logs
    to:
    D:\fmsLogs
    Please halp me to understand...
    in adobe in:
    Home / Flash Media Server  3.5 Configuration and Administration Guide / XML configuration files reference
    it says:
    in Logger.xml in Directory
    Specifies the directory where the log files are located.
    By default, the log files are located in the logs directory in the server installation directory.
    Example:
    <Directory>${LOGGER.LOGDIR}</Directory>
    what this meens: ${LOGGER.LOGDIR} ?
    in order to change the logs files directory from:
    C:\Program Files (x86)\Adobe\Flash Media Server 3.5/logs
    to:
    D:\fmsLogs
    do i need to write this:
    <Directory>D:\fmsLogs</Directory>
    or what do i neet to write?
    it is totaly not understandable from this example...
    big thanks for any halp
    cheinan

    You can change LOGGER.LOGDIR in fms.ini to your preferred location i.e. D:\fmsLogs and restart FMS.
    Now if you want to change for individual logs - you can change in Logger.xml - by default logger.xml will use value from fms.ini

  • What I view the dbx files are of unknown format from TEMP directory?

    When you start Outlook Express DBX file to create a push, but after the program can not find it. There is a configuration change that? In the TEMP folder found files, but they are of unknown format, what I view the dbx files? 

    The user of the DBX Viewer Tool can recover mail messages from *.dbx files in the batch mode. If you recover messages in the Batch mode, messages are extracted from *.dbx files one by one and immediately saved to the hard drive. Batch message recovery can be
    used to recover correspondence from a large number of corrupted *.dbx files simultaneously.
    http://www.dbx.viewertool.com/ The Batch Mode will allows you to considerably save time and effort spent on organizing the process of recovering messages from corrupted *.dbx files. Read it: http://www.filerepairforum.com/forum/microsoft/microsoft-aa/outlook-express/966-i-need-to-dbx-viewer-tool-advise-me-anything

  • How to add a directory into a jar file

    Hi, guys, I want to add a package into a jar file. For example, my dirctory structrue
    is org/test/, all files locate in the directory test, in org.test package. I want to
    add the package into a jar file, test.jar. I use "java -cvf test.jar -C org/test/ .
    But it says "jar: no match". How can I solve it.
    thanks

    Instead of 'java', use 'jar'.
    All in all, try this: jar cvf test.jar -C org/test/*.class.
    Have a nice day!

  • How to see what is in the "other" file on itunes

    I updated my iPhone about a week ago, and all my pictures got synced to itunes and of my iPhone. I cant find any of these pictures on i tunes or on my laptop. I think they are somewhere in the "other" folder on itunes, but I just dont know how to open it. It says it uses up 3gb.

    You don't open "other"
    This much other indicates corrupt files. A restore should resolve.

  • How to find directory java program .jar file is in?

    I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
    If the user launches the app from that directory, it's easy.
    The problem is when they do something like "java -jar /dir1/dir2/program.jar".
    When they do that, HOW can I find the directory the .jar file is in - from within the program?

    CasaDelGato wrote:
    I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
    If the user launches the app from that directory, it's easy.
    The problem is when they do something like "java -jar /dir1/dir2/program.jar".
    When they do that, HOW can I find the directory the .jar file is in - from within the program?There is an obscure way that basically consists of the following.
    1. Get the class loader of the class (obviously one in the jar)
    2. Find the 'resource' of that.
    3. Resolve that to a path
    4. Make it absolute if not already.
    5. Extract the directory part.
    2 and 3 are always the hard ones (conceptually and figuring out from the javadocs). There are examples somewhere on the forum.

  • Trying to login to software program known as hamspher (vip simulated ham radio,  it downloaded the program but it will not allow me to login with call sign and pin.  it has to be opened with what they call a jar file.  how do i do this?

    trying to login to software program known as hamspher (vip simulated ham radio,  it downloaded the program but it will not allow me to login with call sign and pin.  it has to be opened with what they call a jar file.  how do i do this?

    This is compatible with Mac? Especially Snow Leopard (if that is what you'e running)?
    Have you considered posting your question in their forums?
    Here is some information re. the jar file:
    http://ostermiller.org/opening_jar_files.html

  • How Do I Specify uri in JSP taglib Directive to Point to the Jar File

    I put the trail-taglib-0.2.jar file in the MyApplication/WEB-INF/lib directory.
    Because the .tld is included in the trail-taglib-0.2.jar, I added the following In the MyApplication/WEB-INF/web.xml file:
    < filter >
      < filter-name > trailFilter < /filter-name >
      < filter-class > org.osjava.taglib.trail.OriginalRequestFilter < /filter-class >
    < /filter >
    < filter-mapping >
      < filter-name > trailFilter < /filter-name >
      < url-pattern > *.do < url-pattern >
    < filter-mapping > How do I specify the uri in my JSP @taglib to point to the jar file? I think I did not get the path right:
    < %@ taglib prefix="trail" uri="trail-taglib-0.2" % >

    Your advices have been very good. Problems get solved one at a time.
    1. Now, the taglib.tld in the WEB-INF directory can be found; however, another problem occurred: XML parsing error on file /WEB-INF/taglib.tld: (line 11, col 17): Element type "display-name" must be declared.
    2. no matter where I insert the filter and its mapping in the web.xml file,
      <filter>
       <filter-name>trailFilter</filter-name>
       <filter-class>org.osjava.taglib.trail.OriginalRequestFilter</filter-class>
      </filter>
      <filter-mapping>
       <filter-name>trailFilter</filter-name>
       <url-pattern>*.do</url-pattern>
      </filter-mapping>The server cannot find the Struts tag libraries. If I remove the filter tag and its mapping, the server does not complain anymore. I checked the DTD, the filter tag and its mapping tag should be before the servlet tag and servlet mapping tag. But, it does not work.
    Here is the taglib.tld:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
      <tlibversion>1.0</tlibversion>
      <jspversion>2.0</jspversion>
      <shortname>trail</shortname>
      <uri>http://www.osjava.org/taglibs/trail-1.0</uri>
      <info>Breadcrumbs in a taglib. </info>
      <display-name>Trail Taglib</display-name>
      <description>The Trail taglib maintains a dynamic trail of pages that the user has hit and allows a normalized version of that trail to be shown as a breadcrumbs list. </description>
      <tag>
        <name>list</name>
        <tagclass>org.osjava.taglib.trail.ListTag</tagclass>
        <bodycontent>JSP</bodycontent>
        <display-name>Trail List</display-name>
        <description>ListTag is used to display the trail, either the whole trail or more likely the normalized version. </description>
      <attribute>
          <name>var</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <description>Store the trail text in a variable. This will probably change to store the actual trail list and not the text. </description>
        </attribute>
        <attribute>
          <name>delimiter</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <description>The delimiter to use between trail items. It defaults to -> and at some point an image will be useable instead. </description>
        </attribute>
        <attribute>
          <name>type</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <description>The type of list to show. The default is 'normalized', while any other type specified will result in 'full'. </description>
        </attribute>
      </tag>
      <tag>
        <name>push</name>
        <tagclass>org.osjava.taglib.trail.PushTag</tagclass>
        <bodycontent>JSP</bodycontent>
        <display-name>Trail Formation</display-name>
        <description>Place a page on the trail. </description>
        <attribute>
          <name>label</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description>The text to use when placing the page on the trail. This is what will be displayed to the user in the List tag. </description>
        </attribute>
        <attribute>
          <name>url</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          <description>Usually the url in question will be figured out by the taglib, however you may override it with this attribute. </description>
        </attribute>
      </tag>
    </taglib>

  • ODI - Multi development environment how to share the JAR files

    Hi,
    For some of our functionality, existing KM not sufficient so we created with our own KM and we have called some jave code which we created and place inside lib directory of ODI as a JAR file. there are four people in the development work. so we have four development environment(all are complete installation, i.e while installing we choosing Complete Option).
    One of our developer created the our own KM and he placed the jar file in his own Dev environment's lib Directory. Since four Dev environment shares the some work rep we could see the new KM and all the ODI object in all the dev env. but if we run the the ODI interface which use the new KM from other Dev environment where we dint place the jar we are getting Error.
    if we keep the jar file in all the other three Dev environment's LIB directory then respective interface working.
    here my doubt,   is there any other way to share the JAR file to all the Environment without copying into everywhere?
    Thanks
    Knidhi

    Thanks you verymuch Cezar and Ratish, now almost i got the answer for my question.
    i installed ODI Server into separate machine. it has folder structure as follows
    Directory: D:/ODIServer/oracledi/ has the following subfolder
    1.bin 2.drivers 3.lib 4.tools.
    here i need to keep my Jar files under the lib folder. am i right?
    and bin directory contains only Agent related batch files. (agent.bat, agentscheduler.bat,agentservice.bat,agentstop.bat,agentstart.bat,agentweb.bat and jython.bat and respective .sh files)
    here dont know how to precede the following things
    1. how to configure the Master and Work Repository information with ODI Server?(MR and WR i already created with the help of one the ODI Client)
    2. how to configure the Client machine to Server?
    3. Since ODI Server not having the Topology, how to create the Agent? do i need to use any one of the ODI Client for this task?
    --Thanks
    Knidhi

  • How to modify the jar files information for Script Assets??

    Hi,
    I am using Open Script 9.2. We can add the external JAR files using Script->Script Properties--> Script Assets. I need to change the jar files when ever i am going to execute no of scripts. How can I modify them using JAVA Coding without manual handling. Is there any specific methods existed in OpenScript to serve the above scenario.
    Thanks in Advance.
    Thanks & Regards,
    Siva Thota

    Hi,
    When you say alter the jar file, do you mean alter the contents of the java code within the jar. If this is yes then the simple answer is no. As you are probably aware, a jar file contains pre-compiled java code, which you will not be able to alter. What is it you are trying to achieve?
    A simple answer maybe to use a child script which you can include into your main script. You can then change the code in the child script, and when you play back, this 'new' code will be compiled, and included within the replay.
    Regards
    Wayne.

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

  • HOw To Identify The JAR File Name

    Hi,
    In an already developed java code how can we identify which jar file has been used? Does it depend on what packages are included? In a java code which I have the following packages are included, so please tell me what will be the name of the corresponding file:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.Map;
    import javax.xml.namespace.NamespaceContext;
    import javax.xml.xpath.*;
    import org.xml.sax.InputSource;
    import sun.misc.BASE64Encoder;
    import sun.misc.CharacterEncoder;
    Thanks,
    Abhishek.

    The .jar files that i will need are:
    1) aii_map_api.jar
    2) namespace.jar
    Regards,
    Abhishek.

  • How to extract the contents of the Jar file?

    Hello,
    Can anyone tell me how to extract the contents of the Jar file?
    An example will be highly appreciated.
    Thanks.

    From command line, or from within a java application?
    Kaj
    Btw. Why do you need to do it. You do know that you can add jars to the classpath and read resources from them without extracting the file?

  • What are the Jar files required,that for accessing the Type 4 Drivers.

    what are the Jar files required,that for accessing the Type 4 Drivers.
    Regards,

    Well it is Database Specific.
    Howevr there are few 3rd party .jar (Derby) which you can use it for accesing some standard databases.

  • How to list the JAR files loaded into the Oracle Database ?

    How to list the JAR files loaded into the Oracle Database ?

    From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
    JAVAJAR$
    JAVAJAROBJECTS$
    By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
    These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
    But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.

Maybe you are looking for

  • IPhoto Libary cannot be open

    I have recently returned from a trip and tried to organise my photos in order to publish, print, etc. My MBP has a 256Gb SSD and the MacOS partition is pretty small (dumb choice from me, I know) so I created a new library on the NTFS partition. After

  • Safari can't display image color properly?

    i've made a logo for my website. the logo's background color should be the same as the webpage background, and yes it is on Firefox (Mac/PC) and Internet Explorer (PC). But Safari shows it differently. Here is the page: http://www.sinnovate.net Any i

  • Homw page does not have bookmarks, favorites on top any more

    my home page now has no task bar information on top of page, like favourite, bookmarks.How do I fix this

  • Migrating settings and library from Lightroom 4.4 to 5

    I Just istalled Lightroom 5 and I would like my settings and stuff to be just like in 4.4, how do I transfer or migrate my setting, preferences, Libraries...? Do I need to start from scratch again?

  • R3 Tables ADRP and USR21

    I need to use the above tables in BW. I noticed that these tables exist in BW but are not being populated.  Can someone tell me how these tables can be populated in BW?  Are there any data sources available without us having to create a generic data