Path and JTree?

Hi everybody !!!
I would like to know how I can get the complete path of the JTree. I use the getLastSelectedPathComponent()) but it display only the folder. Do you know a method that can display the path of the folder?
tree.addMouseListener(new MouseAdapter()
     public void mousePressed(MouseEvent e)
          if (e.getModifiers()==e.BUTTON1_MASK) // Bouton gauche
                         planche.affichageGraphique(tree.getLastSelectedPathComponent());
          else if(e.getModifiers()==e.BUTTON3_MASK) // Bouton droit
                         f_temps.setVisible(true);
Thanks !!!

jTree.getSelectionPath()

Similar Messages

  • Path and filename in footer

    If it is possible, how do I cause Acrobat 9 to report the current path and filename in the footer?
    Thanks!

    In a document-level JavaScript, add the following code, outside of a function definition:
    // Code in document-level JavaScript
    getField("PATH").value = path;
    where "PATH" is the name of a read-only text field that you've added to the bottom of each page.

  • Logical Path and File Name

    Hi Everybody,
    How could I check the actual value of 2 variables which I defined with transaction \nFILE for the Logical Path and the logical file name?
    Background to this question is that I am experiencing problems in using them and want to check if the variables have correct values.....
    Thanks in advance
    FedeX.

    Hi FedeX,
    Did not get exactly what you wanted.
    May be you can try this: You can check the varibale values in the table V_PARAMVAL.
    Bye
    Dinesh

  • Unable to see the logical path and file created in FILE tcode from AL11 and unable to upload the file to this path from front end

    Hi Experts,
    I have created the logical path and filename in FILE tcode.I am trying to upload the pdf file to application server by using this path.But
    I am getting message like "Unable to open the file".Even I cannot find the this path in AL11 tcode.Kindly anyone advise how to upload pdf file using
    custom path and file created from FILE tcode.
    Thanks & Regards,
    Anusha.

    Hi Anusha,
    Please give as below.
    I forget to say you cannot open the PDF in AL11 and for that you need some configuration, i think it can be done using content server,not sure completely please wait for some more suggestions.
    Regards,
    Pavan

  • What is the diff b/w Conventional Path and Direct Path?

    What is the diff b/w Conventional Path and Direct Path?
    While doing exp/imp
    which one is best in peroformance Conventional Or Direct
    consider my Oracle is 9i (9.2.0) and Os is Solaris 9
    Could you please clarify.....
    Thanks

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1005685

  • Difference between path and classpath

    Difference between path and classpath?

    PATH - set of paths there executables will be found.
    CLASSPATH - set of paths and archives there class files will be found.

  • Path and Name field in SPD 2010 Workflow for creating Doc Sets

    Hi Guys,
    Here's hoping you can help out and give a few pointers. I'm currently trying to implement what I thought was quite a simple workflow involving the creation of a Content Type (similar to Doc Set but with additional field) within an alternative library when
    a new item is added to the current library.
    Create Item in CaseFileLibrary (Output to Variable: CaseFile)
    When running the workflow, I keep getting the following error:
    "The workflow could not create the list item because the file name is either missing or invalid. "
    It seems to be related to the 'File and Path' field within the 'Create New List Item' field mappings. For this I have tried the CurrentItem:Title as some other forums suggest and have also tried entering the URL path e.g. /subsite_name/library_name/CurrentItem:Title.
    (as the name of the CaseFile (Doc Set) is going to be the same as the current item name)
    If anyone has any suggestions, I would be truely greatful.
    Luke

    Hi Luke,
    This error indicates there is an error in the workflow logic. Ensure that the file name entered in the Path and Name field is a valid file name. Common reasons for a file name to be invalid include a missing or incorrect file extension or a file/path string
    that is too long and exceeds the allowable number of characters.
    More information, please refer to :
    Common error messages in SharePoint workflow development
    For the URL that you used in the ‘Create New List Item’, whether the CurrentItem:Title is a lookup, not typed by yourself. If not, please type /subsite_name/library_name/, then lookup CurrentItem:Title, like the below, then save and publish the workflow,
    compare the result.
    In addition, please use another name for the name, compare the result.
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • File Path and Name field does not display correct path

    We are using Crystal 2008 along with VS 2005. We embed the special "File Path and Name" field  inside our report and it displays the correct path when viewed inside Crystal reports:
    C:\Program Files\reports\Chart.rpt
    When run through the web and viewed in the DHTML viewer, the file name and path appear as follows:
    C:\Windows\TEMP\Chart {02152A43-3339-4C03-A50A-E281E1D391AF}.rpt
    How can this be corrected?
    Thanks in advance for any assistance.

    This is a known issue tracked under ADAPT0000962216. At this time I do not know when this will be resolved, however Service Pack 2 for CR 2008 is targeted to be released by September and this may contain the fix.
    Ludek

  • HOw to create a text file in the given path and delete it after the use?

    Hi all,
    I am trying to create a text file at the given path and delete the created file after the use.
    I am using following code.:
    import java.io.*;
    // write binary data as characters
    public class RanIO {
                                            public static void main(String f[])
                                                      // First illustrate append
                                                      String lineSep = "\n";
                                                      try {
                                                                     File temp= new File("C:/Ash","cute.txt");
                                                      boolean ch=temp.createNewFile();
                                                      if(ch)
                                                           System.out.println("file created");
                                                      else
                                                      System.out.println("file Not created");
                                                      //writing to file
                                                 /*     PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter("cute.txt",true)));
                                                      p.print("Emp NO");
                                                      p.close();*/
                                                                // Open fileWriter in append mode
                                                                               FileWriter fos = new FileWriter(temp, true);
                                                                               BufferedWriter bw = new BufferedWriter(fos);
                                                                               PrintWriter pw = new PrintWriter(fos);
                                                                               double d=550;
                                                                          // lineSep = System.getProperty("line.separator");
                                                                          pw.print("Hello");
                                                                          //pw.print( lineSep );
                                                                          pw.print( d );
                                                                          pw.close();
                                  boolean det=temp.delete();
                                                 if(det)
                                                      System.out.println("File deleted");
                                                 else
                                                      System.out.println("File not deleted");
                                                 } catch (IOException ioe)
                                                                System.out.println( "Append IO error:" + ioe );
    My problem:
    1)
    I am not able to write to the file. I want to know, where i am going wrong.
    It is giving error message like
    "Canot resolve Symbol: temp,"
    But, FileWriter Constructor should accept a File type parameter.
    here temp is a file parameter.
    If i am not using file=new file();
    i can't delete the file after the use. i.e if i use
    PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter("cute.txt",true)));
    how can i delete cute.txt after the use?
    2)
    I am not able to write to the text file. file is created but, a blank file.
    "Hello" is not written into the text file.
    can anyone help me in this regard
    Thanks in advance
    Ashvini

    Thank you Ram,
    But, i want to create a text file in Append mode.
    for that i used
    FileWriter fos = new FileWriter(temp,true); But, it is not accepting FileWriter constructor in
    this format. if i use
    FileWriter fos = new
    FileWriter("c:/ash/cute.txt",true); it works fine. !!!!!Here's the javadoc
    public FileWriter(File file,
    boolean append)
    throws IOExceptionConstructs a FileWriter object given a File object. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.
    Parameters:
    file - a File object to write to
    append - if true, then bytes will be written to the end of the file rather than the beginning
    Throws:
    IOException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
    Since:
    1.4
    Are you using jdk.13 or lower ?
    >
    ONe more doubt, Does flush method deletes a file?
    if not, then i need to use
    File temp=new File("c:/ash/cute.txt");
    FileWriter fos = new FileWriter(temp,true); //which
    is again a problem
    if(temp.delete())
    out.println("File is deleted");
    }I don't know whether i am taking it wrong ! or
    anything wrong with my coding ! but, after creating
    and writing data into a text file. I must delete it
    as it contains confidential informations.
    Regards,
    Thanks.'flush' writes to a file immediately. Else you should explicitly call 'flush' to write contents from buffer to underlying source.
    javadoc again
    PrintWriter
    public PrintWriter(Writer out,
    boolean autoFlush)Create a new PrintWriter.
    Parameters:
    out - A character-output stream
    autoFlush - A boolean; if true, the println, printf, or format methods will flush the output buffer
    cheers,
    ram.
    Question; What do you gain by opening a file, writing to it and deleting it in the same program ?

  • "Text on a path" and "paths" rasterised when printed from a PDF on an iGen

    I have just obtained from the printer the first proof of my book (printed on an iGen) and I'd like to find out where one of the problems lie. I'll ask the printer his opinion before second proof, but I don't like to annoy him unnecessarily.
    One of the chapters in the book has a lot of maps. I drew rivers by stroking a path, and named the rivers using 'Text on a Path' so that the text follows the curve of the river. Some of the maps have a pale background image on a different layer. And this is where the problem seems to lie.
    1. Rivers (and their names) appear normal on a map WITHOUT a background. By 'normal' I mean they look sharp. When magnified they seem to have been drawn as vectors.
    2. On maps WITH a background layer, 'Text on a path' appears very chunky (as if it has been rasterised at about 300 dpi) and paths (the rivers) appear to have the jaggies. Horizontal text does not appear to be affected.
    I can't be certain that (1) and (2) exactly define the problem, but it's as close as I can get at the moment.
    When I opened the original PDF file from which the book was printed, no matter how much I enlarge it, all paths and 'type on a path' retain their smoothness. i.e they are obviously vectors. However, I noticed when I opened the PDF in Acrobat 7 and tried to edit the 'text on a path', the PDF went haywire: the text I tried to edit disappeared, and other text frames on the page were shifted around.
    A sample PDF (6.7 MB, including an original two-page spread, and a scanned copy of the iGen print of the same), can be downloaded from:
    http://www.mediafire.com/download.php?oe4omuzoqzz
    Two questions:
    Q1: On the maps with a background image, is the rasterising of stroked paths, and 'text on a path' due to the iGen mishandling the file? Or might there be another explanation?
    Q2: Re Acrobat 7 mishandling my 'text on a path': is this a bug that has been fixed in later versions of Acrobat?
    To reproduce this bug do this: Open the PDF described above, and within Acrobat 7 select Tools > Advanced Editing > Touchup Text Tool. Then click inside the name "Georgina River", backspace to try and delete a letter, and the PDF should go haywire.

    Sandee: Almost certainly below the text, but I'd have to check them all.
    But before I do that, we'll have to go back a step. I can almost handle layers in InDesign, but didn't know they existed in PDFs. The printer printed from the PDF and as far as I can tell after a brief visit to HELP, there aren't any layers in the PDF. When I go to View > Navigation Tabs > Layers and click on the Layer Tab when it appears, there's nothing there; and all the items under Options are grayed.
    Q1: Why do I need a layer in a PDF? By not having layers, can that cause problems?
    Q2: Re Robert's suggestions: what do you mean by "move all the text to a top layer"? Within InDesign before I export to PDF?
    Q3: Is printing more foolproof when I export to PDF, if all my text is on the one layer in InDesign and that layer is above any images? There are several hundred river names, place names etc, sitting on lower layers, but if need be I'll move them all.

  • I have a question on paths and templates

    I have a question on how I should structure my site
    At my root directory on my server I have this set up.
    index.html
    /pages
         page1.html (all of these were created from my own template)
         page2.html
         page3.html
         and so on....
    /webReadyGraphics
    /css
    /library
    /templates
         genericTemplate.dwt
    Each folder has their own respective files in it.
    The problem I'm bumping into is relative and absolute paths in my DW templates/assest.  I will do my best to explain.
    I've create a menu with text that links to various pages.  An example would be a home button which always returns you to the index.html.  I turned that home button into an asset.  I've placed that asset into my genericTemplate.dwt. The link attached to the home button is a relative path and looks something like ../index.html.
    I have used my genericTemplate to create all my pages, even index.html.  So on my index page is my home button which tries to link to a parent directory ../index.html.  I decided to use absolute paths instead which is great on my local machine but when I go to upload to my server won't this be a problem?  As browsers will be looking for a local absolute path?
    How should I structure my website?  I've been thinking about putting all my pages at the root directory but that just gets mess looking.
    I hope I explained that well.  My understanding of web theory is a bit novice.
    Thanks!
    -Dweinin

    How do I do that? The pages which have the asset (button)  have different paths to get to the index.html...  some paths would be ../index others would be ../../index.html
    I don't know how to explain this.  I have 1 button.  that button is on 15 webpages.  Those pages are located at various directories from within my website.  So all their paths would be different but I only have 1 button.  So how do I put a relative path in there?
    I can put all the pages in 1 location so the button path would be the same.  That's not a problem BUT! I also have that button on my index.html page which is at the root of my site. 
    All of my pages would be located at root/pages/______.html.  The button would have a relative path of ../index.html
    The index is located at root/index.html  and that SAME button would have an incorrect path of ../index.html and return an error saying page not found.
    I want to keep the button an asset since I will likely be changing it's destination in the future or may want it to link a different page.  So I made the button an asset so that I when I do want to change it I only have to do it once and it updates across all my pages.
    Does that make sense?  Should I just put all my pages at the root?  Is that normal to do?  My root would start to look pretty mess with 15-20+ html pages.
    -Drew

  • I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview

    I tried to rename a file, it gave me an error message (can't remember the number - 43??) and then the file disappeared from the original folder. When I do a search, the file comes up under the new name, but it does not show a path, and even though preview shows the contents, I can't open the document (Powerpoint) and I can't move the document. I tried "Copy" and paste but it doesn't work. I tried "Share" with Airdrop and iChat, but the file is inaccessible. When i try to rename the file, it says the filename is too long.
    When I try to open it, it says the alias is not good, and asks if I want to fix the alias. I'm afraid to do that and lose all access to this document.
    Right now, it feels like a ghost document - it is on the computer intact, but it is in an undisclosed location and inaccessible.
    Please help!!

    I was able to resolve this by repairing permissions, even though no permissions error was listed specifically for that file.
    I could also have recovered it through Time Machine, but I'm interested in knowing how not to have this happen again!
    I was afraid of rebooting and possibly losing track even of the ghost.
    I did not try EasyFind - I'll keep that in mind next time.
    Thanks for all the comments.

  • Tips on avoiding hard coded paths and make a java app platform independent

    HI all,
    I would like to gather some tips on how to avoid hard coded file paths, which are plenty in the application I work on and which I inherited from previous programmers.
    Also, when deploying to the production server, my app goes from a Windows platform to a Linux machine.
    I am curious to know what tricks and tools other programmers find useful in similar contexts.
    I am sure many of us would benefit from the discussion.
    Thank you !

    Actually, Java does this for you; you can use unix-style paths and they will still work, even on Windoze. To wit:
    public static void main(String[] args) {
            File f = new File("/");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\
    public static void main(String[] args) {
            File f = new File("/Program Files");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\Program Files

  • Library paths and environment variables

    Hello,
    I am using 10g AS 9.0.4 on a Unix system.
    I am trying to convert an old JSP web application to work with 10g. It is not an EAR/WAR file so I am manually trying to set it up under the "default-web-app" folder. It uses a number of java class files which currently reside in $J2EE_HOME/default-web-app/WEB-INF/classes/mystuff.
    These class files require access to a number of libraries. I foolishly believed that they would be accessible if I were to place them in the $J2EE_HOME/default-web-app/WEB-INF/lib folder, but that did not work.
    I read that OC4J uses a "catch all" lib directory at $J2EE_HOME/applib. I copied the library files there and they still did not work.
    Frustrated, I tried to print out the environment variables for the server - only to find that this function is not supported.
    I managed to print out the library path by creating a Java class files which returns the following as a string:
    System.getProperty("java.library.path");
    This (when called from a JSP) prints a number of different library paths, none of which match those found listed in the $J2EE_HOME/config/application.xml file. I placed the library files in one of the paths listed by the "java.library.path" and it worked!
    3 questions:
    1. How do you print the server's environment variables using a JSP? This strikes me as a very useful function for sorting out library and path issues. Do a search on Google for "print environment variables OC4J" or something similar and there are no useful pages suggesting how this can be done.
    2. Why are the default library paths different on the server than to those specified in application.xml?
    3. How do I change the LD_LIBRARY_PATH (or any environment variable for that matter)? I have tried adding the following line to $ORACLE_HOME/Apache/Jserv/etc/jserv.properties without success:
    wrapper.env=LD_LIBRARY_PATH=/my/custom/library/path
    Any help you can offer would be most appreciated.

    >
    Thanks very much for a such a comprehensive response
    - it has helped answer a lot of questions, especially
    being able to print out the system properties. That
    will be really useful!
    No worries at all Rob.
    The main hurdle is that the libraries are indeed
    native (*.so) libraries. I hadn't considered that
    until you pointed it out in your message. Can I
    assume, then, that $J2EE_HOME/applib and
    $J2EE_HOME/default-web-app/WEB-INF/lib are only
    designed to handle Java's .JAR librares? That would
    explain why placing the native libraries in there
    didn't work, but is there a way of getting such
    native libraries recognised and bundled up in a
    WAR/EAR file?
    Yep, that's it.
    Our proprietary applib and the servlet specs web-inf/lib are only dealing with Java archives.
    The J2EE specs don't cover how to deal with native libs like this.
    Now I've NEVER EVER tried it, but it's worth a shot of at least trying -- for simplified packaging purposes, what you may be able to do is to distribute the .so's within the web-inf/lib -- and then just set that directory (where's its realized on the server after the app is deployed) to be referenced witihn the LD_LIBRARY_PATH. I'd expect our deployment manager will just ignore files it doesn't know about, so arguably you should be able to at least distribute them with the standard archive.
    You'll need to specifically set the LD_LIBRARY_PATH as a separate task outside of the deployment operation though.
    >
    This is where things get a bit weird, and is partly
    my fault during the installation of 10g AS.
    We already had an existing installation of Oracle 10g
    Database (10.1.0) at $ORACLE_HOME under the user
    "oracle". I logged in as the user "oracle" to install
    the Application Server into a different location (In
    this case, "$ORACLE_HOME/../ias10g_9.0.4" - let's
    call this $IAS_HOME). So there is no separate user
    account for Oracle Database and Application Server
    (and hence no separate $LD_LIBRARY_PATH).
    If I log into UNIX as the user "oracle" and echo the
    LD_LIBRARY_PATH, I get the following directories:
    $ORACLE_HOME/lib
    /usr/openv/netbackup/bin
    /usr/dt/lib
    /usr/lib
    I use this user to do "opmnctl stopall" and "opmnctl
    startall". If I then print out the library path from
    a JSP using
    "System.getProperty("java.library.path");", I get the
    following paths:
    $IAS_HOME/jdk/jre/lib/sparc/server
    $IAS_HOME/jdk/jre/lib/sparc
    $IAS_HOME/jdk/jre/../lib/sparc
    $IAS_HOME/opmn/lib
    $IAS_HOME/lib
    $IAS_HOME/usr/lib
    Which is totally different to those listed by
    $LD_LIBRARY_PATH at the command line, which means
    they must be coming from somewhere else.
    It gets worse - my application is trying to call a
    native library that is only present in the
    $ORACLE_HOME/lib32 directory (libclntsh.so.10.1), so
    unless I can include this path in the
    "java.library.path" on the Applicaiton Server, then
    my program will not work.
    So, how do I change the "java.library.path" when the
    values aren't coming from $LD_LIBRARY_PATH in the
    first place?
    The utility $IAS_HOME/opmn/bin/opmnctl is actually a shell script.
    It has this section which sets the LD_LIBRARY_PATH:
    if [ -z "$LD_LIBRARY_PATH" ]
    then
    LD_LIBRARY_PATH=$ORACLE_HOME/opmn/lib:$ORACLE_HOME/lib ; export LD_LIBRARY_PATH
    else LD_LIBRARY_PATH=$ORACLE_HOME/opmn/lib:$ORACLE_HOME/lib:${LD_LIBRARY_PATH} ; export LD_LIBRARY_PATH
    fi
    So if you have an existing LD_LIBRARY_PATH env var set, it should just be putting its paths onto the front of it.
    What you could try as a quick test is to edit the opmnctl script (after taking a backup of course) and either appending the path you need to it, or just add some debug statements to output the LD_LIBRARY_PATH value it ends up setting so you can try and work out what's causing it.
    I expect these other entries:
    $IAS_HOME/jdk/jre/lib/sparc/server
    $IAS_HOME/jdk/jre/lib/sparc
    $IAS_HOME/jdk/jre/../lib/sparc
    are coming from the JRE when it is launched, in probably a similar manner to our opmn entries.
    I really appreciate your help, and I bet if anyone
    can answer these questions, you can! ;-)
    You're very welcome.
    cheers
    -steve-

  • Fixing PATH (and MANPATH) once and for all

    I think the list of directories in PATH should be:
    /Users/cb/bin:
    /opt/local/bin:
    /opt/local/sbin:
    /usr/local/bin:
    /usr/bin:
    /bin:
    /usr/local/sbin:
    /usr/sbin:
    /sbin:
    /usr/X11R6/bin:
    /usr/local/teTeX/bin/powerpc-apple-darwin-current
    Do you agree? Comments and suggestions welcome.
    Background:
    I am trying to sort thru the endless confusion and set up PATH (and MANPATH) right, once and for all. Every package I install seems to have its own idea of what these variables should be.
    I could set up a wrapper script for every installed command - but some subsystems, like Aquamacs and Python, let you create and use subshells. If the PATH in your subshell isn't the same as the one you use every day in bash, you could create bugs which are nearly impossible to track down.
    My solution is to create $HOME/.setShells.sh -- which sets a uniform set of paths (and which will probably rewrite man.conf in the bargain). But I want to make sure that I'm choosing the right baseline, which is what the list above is supposed to be.
    I'd appreciate your thoughts and/or assistance.

    Correct is what's correct for you. You have to consider and repect how the vanilla system sets up the environment, and realize that the software you install and configure to make the machine yours will be different for everybody.
    Your list looks reasonable. Of course we all know that PATH is searched in the order listed, so your ~/bin takes precedence over everything, and stuff you install in /opt and /usr/local takes precedence over the vanilla system.
    You don't need a wrapper for every command. Environment variables are inherited. You simply need to set this stuff up in your ~/.bashrc and everything you run from the shell will inherit the environment. I think PATH may be exported automatically, but it never hurts to do so explicitly. So set those variables with lines like ...
    export PATH=
    export MANPATH=
    It's important to understand the subtle difference between executing a shell command file and sourceing it.
    bash# ./file
    ... will run the file in a subshell, so any variables and environment changes will only be known to the subshell. Your interactive shell is the parent process of the subshell.
    bash# . ./file
    ... will run the file in the current shell rather than forking a subshell, so any variables, functions, aliases, or environment changes will remain in effect.
    When a shell starts, your ~/.bashrc is sourced, not executed.
    Message was edited by: b3and88
    because he can't spel

Maybe you are looking for