How to know the current directory

Could somebody write me an example to print the current directory I'm working on.
e.g.
java A
d:\My Documents\source\A.java
Thank you.

Could somebody write me an example to print the
current directory I'm working on.
e.g.
java A
d:\My Documents\source\A.java1. This is not a directory
2. A.class will be run, not A.java
3. You'Ll never know where your sourcecode is
4. Where your program thinks it is can be determined using
new File(".")

Similar Messages

  • How to now the Current Directory

    Hi everyone, i have a little problem, i dont'n know how to get the name of the current directory where i have the .jar file of my applet, and i need to know which is this directory to do something on it.
    How could i know the current directory?...
    Thanks.

    Hi.
    You can not get the current directory: applets can not access the hard drive. Instead you can get the code location, which will given the current directory if running locally.
    Try this: within the applet do : getCodeBase(). This will give you an URL to the code of the Applet, that is the JAR file.
    Hope this helps,
    Nuno

  • How to know the current patch or version of 11g

    How to know the current version of the 11g with patch info?

    Check this
    http://obi9.blogspot.com/2012/11/determining-current-patch-levels.html
    If helps pls mark

  • How to get the Current Directory

    Hi,
    I need to tell the system to read a file in my current directory. How do I tell the system what the current Directory Path is
    Thankx in advance...

    It depends on the current working directory from which you start your JVM.
    From DOS or UNIX shell this is the directory where you have come by "cd".
    On Windows you can do the same from Explorer or other file managers: the directory where you are when starting JVM.exe.
    If you define shortcuts - e.g. on the desktop -, you specify it there as the "working directory".
    You can retrieve this directory by
    System.getProperty( "user.dir" )
    Now with File classes:
    Each file name without path will be interpreted as being in this directory.
    Absolute paths are clear.
    But you can't mix this:
    If you specify "test/debug.ini" or "test\\debug.ini" from debug directory: false!
    If you specify "../debug.ini" or "..\\debug.ini" from debug/test directory: false!
    Do it this way:
    Start from debug directory.
    So you can access file debug/test/debug.ini as
    System.getProperty( "user.dir" ) + "/test/debug.ini"
    Works?

  • How to know the current version of SAP

    Hi everybody,
    How can we know the current version of SAP we are working with? Is there any function module for it?
    please let me know.
    thanks in advance,
    regards,
    mounika.

    goto sap...From MENU  System-->Status...it will open a popup..Under component version..the is a click icon...click on it and it will open another popup where u will find details...example...
    SAP_BASIS     620
    SAP_ABA                     620
    SAP_APPL     470
    SAP_HR                     470
    EA-IPPE                     110
    So, basis is on 6.2 & abap gui is on 6.2 where as abap application is on 4.7

  • How to know the current Task/Job ID in which a request is waiting for

    Hi Team,
    Is there any table/view in IDM 7.2 that provides current task/job ID number a request is waiting for?
    Even though the last completed phase of the request can be seen from admin UI that only shows the description of the completed steps but not the technical details like task ID/Job ID of the current step.
    Knowing the current step/Job ID helps the admin a lot to directly go the step when the request is waiting for long/got failed etc..
    Regards,
    Venkata Bavirisetty

    Hi Matt,
    Thanks for your response.
    I read few articles in your blog couple of weeks before and they are very much informative.
    The information provided in the provisioning queue just shows the task ID and no.of requests (without request nos) waiting in that task.
    Basically the question I have mentioned in my previous post is not related to any specific task type. It is like using request no we wanted to know complete request history specially the current task (task ID) at which the request is waiting for.
    Regards,
    Venkata Bavirisetty

  • How to know the current jvm name executable ?

    Hi,
    I should want know what is the current jvm executable, from a java program. For exemple c:\foo\bar\bin\java.exe, or /home/foo/bar/java_1.6/jre/bin/java and other.
    With system properties, I can know java home, version, vendor etc of JVM, but how I can know "bin\java.exe" or other ?
    Thanks.

    Yes.
    I see java.runtime.name=Java(TM) SE Runtime Environment, I see the classpath, I see java.runtime.version=1.6.0_14-b08, I see java.home=/home/herve/java/jdk1.6.0_14/jre, but I don't see the name of java programme.
    For me it is something like {java.home}/bin/java. I don't see that in system properties.

  • How to know the current tab

    Hi everyone,
    Does annyone knows if there is an indicator that indicate you the current tab where you are working in?
    I want my BSP to do different action depending on wich tab the user is in.
    I'm working in the BSP CRMD_BUS2000126 for the activities.
    Thanks!

    This is probably a question better suited to the BSP forum.  I also noticed that your application name starts with CRM.  I'm not familiar with CRM and its particular take on BSP, but I can tell you how I do this in my BSP applications:
    First I use the phtmlb:containerTabStrip to create my tabstrip.  I use an application class attribute to store my selectedIndex (the current selected Tab).
    <phtmlb:containerTabStrip id                    = "TabStrip15"
                              collapsed             = "FALSE"
                              collapsible           = "FALSE"
                              firstVisibleItemIndex = "1"
                              hasContentConnector   = "TRUE"
                              maxVisibleItems       = "5"
                              onCollapse            = "myCollapse"
                              scrollableItems       = "TRUE"
                              selectedIndex         = "<%= application->SELECTED_date2       %>" >
    Now I use MVC, so in my DO_HANDLE_EVENT method of my controller class I trap the tabstrip event and query for the selected tab:
    data: event_id type string.
      event_id = event.
      if htmlb_event is not initial.
        event_id = htmlb_event->id.
      endif.
      data: model type ref to zcl_bsp_m_eqi_selection.
      data: appl type ref to zcl_eq_bsp_eqi.
    ****Get a pointer to the Model Object.
      model ?= get_model( 'MS' ).
    ****Get a Pointer to the application Object
      appl ?= application.
      if event_id cs 'tabstrip15'.
        data: event1 type ref to if_htmlb_data.
        event1 = cl_htmlb_manager=>get_event_ex( request ).
        if event1->event_type eq cl_phtmlb_containertabstrip=>co_phtmlb_event_tab_selected.
          appl->selected_date2 = event1->event_server_name.
        endif.
      endif.

  • How to get the current directory as File object

    Hi guys,
    i want to get the current working directory as a file object.
    plz help me on that if there are any standard methods present for this.

    new File(".");

  • How to know the current VI is aborted ?

    i hv three VI A.vi is opening B.vi and it opens C.vi,,,,,,, now at one time only 1 VI is  opening at the task bar,,, and even i can go back.
    i have made that program,,,,,, but the problem is ,,, while i m starting from A.vi and ,,, go to C.vi   via B.VI,.,,, and,, after stoping C.vi,.....  if i open A.vi from the folder it is still running(in the running stage),,,, so...........
    i want to add the fuctionality,,, in which, i want to find the event..... when my current VI is aborted i want  the A.vi to be aborted....
    HOW ITS POSSIBLE...
    Waiging for reply,,,
    Manisha
    Attachments:
    C.vi ‏20 KB
    A.vi ‏19 KB
    B.vi ‏27 KB

    Maybe you can tell us what you are trying to achieve. I simply cannot make much sense out of your code.
    At least try to put a small wait in each loop, right now they all spin millions of times doing nothing. Maybe you could use an event structure?  You should also set your buttons to latch when released. Currently, e.g. the "Go back to B" button inside c.vi is set to switch until released, meaning you'll probably run the TRUE case a few thousand times whenever you press the button. Also familiarize yourself with dataflow. You seem to think that you set the boolean flag value before the while loop starts, however LabVIEW does not guarantee that this happens in this order because there is no data dependency.
    What are you trying to do? I am sure there are better ways.
    LabVIEW Champion . Do more with less code and in less time .

  • How to know the current resolution of screen?

    Help me please

    Actually, that's misleading. It's Toolkit.getDefaultToolkit().getScreenSize(). That gets the X x Y pixel count of the screen. Toolkit.getDefaultToolkit().getScreenResolution() gives the DPI of a screen (supposedly).

  • How to get the current application root directory

    Hi Experts,
    I am deploying an ADF Application to a Standalone WLS 10.3. During development I am using Integrated WLS (which comes with JDeveloper 11.1.1.5.0). During development, I configured my application to create log files in my local machine (where Integrated WLS is running) by using absolute path for my log file. Now, I am moving to a standalone instance of WLS for testing (before moving to production).
    Now I need to keep my log files under my application root directory. Please let me know how to get the absolute path of the deployed application root directory from WLS ENV/System property into my application's Java Code.
    I tried the below java code,
    Current weblogic server name is: " + System.getProperty("weblogic.Name") --> This gives me the name of the server where my application is running.
    Current weblogic server name is: " + System.getProperty("weblogic.Root") --> This returns NULL. How to get the Root directory of my application using some system property inside my application at runtime??
    Thanks
    Rathnam

    One method is to create a File(""); and do getPath() on it.
    At least it's worked for me.

  • How do you reset your password if you dont know the current password

    Does anyone know how to reset your password if you do not know the current password

    If you have forgotten your Apple ID password: If you forgot your Apple ID password
    If it's your iPhone passcode; then you need to do a restore: Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled

  • How to get the current executing file/itself absolute directory?

    hellooo,
              gentlemen/lady, how to get the current executing file/itself absolute directory?
              thanks
              

              Hello,
              you can get the real path information of the JSP through the servlet context:
              http://java.sun.com/products/servlet/2.2/javadoc/index.html
              javax.servlet
              Interface ServletContext
              Method getRealPath
              Christian Plenagl
              Developer Relations Engineer
              BEA Support
              [email protected] (alex mok) wrote:
              >hellooo,
              >
              >gentlemen/lady, how to get the current executing file/itself absolute
              >directory?
              >
              >thanks
              

  • Don't know how to calcualte the current page in smartform for second layout

    Hi All ,
       Iam creating an smart form which contains two layout in a single form. I need the page number to be displayed as followes.
    1st layout : 1 of 2
                     2 of 2.
    in 2nd layout 1 of 2.
                        2 0f 2.
    I dont have any issues in printing total number of pages. i dont know how to calculate the current page for the 2nd layout. <<text removed>>
    Edited by: Matt on Jun 25, 2009 5:09 PM - Removed ALL CAPITALS from subject

    Hi,
    Create a New window of Type 'Final Window' and Position it in the layout where u want to display the page numbers.
    Now, create a text element in the window and create the text like below in the text element.
    P1 Page &SFSY-PAGE& of  &SFSY-FORMPAGES(3CZ)&
    &SFSY-PAGE&                            - Current Page No.
    &SFSY-FORMPAGES(3CZ)&         - Total No of Pages.
    Note: dont forget to create the window type as 'Final Window', otherwise it will show ssome junk...
    Hope it helps!!
    Rgds,
    Pavan

Maybe you are looking for

  • Fast index creation suggestions wanted

    Hi: I've loaded a table with a little over 100,000,000 records. The table has several indexes which I must now create. Need to do this as fast as possible. I've read the excellent article by Don Burleson (http://www.dba-oracle.com/oracle_tips_index_s

  • SQLException Scheduling error

    I'm using BIP 10.1.3.3 against a 10.2.0 database and getting the following error when I try and schedule a report oracle.apps.xdo.servlet.scheduler.ProcessingException: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 0601

  • Abstract method and class

    I'm a beginner in Java and just learn about abstract method and class. However, i am wondering what is the point of using abstract method/class? Because when I delete the abstract method and change the class name to public class XXXX( changed from "a

  • Node over Firewire

    I have a dual G4 that is connected to a MBP 17" over fire wire. I can see the node listed in the node list. I can see the meter for the node load. File sharing is on and firewalls are disabled, but none of the nodes light for any track. I am running

  • Function module to Calculate PO Price

    hi, can anybody tell me is there any function module to get PO Price for a corresponding PO