How to put path one directory up i.e ../

Hi ,
i have two questions.
1) I have path in my properties file say
variable = [Bold]/abc/def[Bold] .
Now when I get this direcorty I need to move to directory parallel to the [Bold]def [Bold] directory say
[Bold]xyz [Bold]
Now say I have a program file where I use a String variable to get the path
String str1 = proerties.instance().get("variable");
To this I need to add
[Bold]../xyz[Bold] so that I actually land up in Bold]/abc/def[Bold] directory and not the Bold]/abc/def[Bold] directory.
Also this will change with operating system so how can I find out which operating system I am working on with within my program.
Regards,
Anand

Got the first part of the question.
Need to just do this actually /abc/def/../xyz. in the string. Was confused becoz dos uses \abc\def\..\xyz and the same when used in java has to be \\abc\\def\\..\\xyz.
Any ways the second part of the question still remains as to determine the operating system in my program.
Regards,
Anand

Similar Messages

  • How to find out one directory in unix

    How to find out one directory(Ex-abc dirctory) in linux??
    I am in home i dont know the location of that directory can give me some command to find the path of the directory ??
    I am new in linux ??
    Thanks advancly

    You may want to consider using wildcard and "-iname" which is case insensitive.
    find / -iname *ex-abc* -type dTo find files and directories you can also use the locate command, which uses a database to find stuff, after indexing the system, and hence is faster than a regular find:
    locate -i ex-abc... provided the database has been created and is up2date.
    sudo updatedbPls see "man locate" and "man find" for more options
    Edited by: Dude on Dec 1, 2011 6:24 AM

  • How to migrate Sun One directory server to a new physical server install

    need help
    We have to move our existing installation of sun on directory server 5.2 to a new physical server.
    We have a new physical server with a new host name. I am trying to find an easiest way to take a snapshot of our existing server and put it on a new installation
    So will installing sun one directory server , its shows me two choices either to create a new instance or copy configuration from a existing server
    What do i choose and which is the fastest route to replicate my old server
    Thanks a bunch in advance
    Sganb

    Hi,
    I'm glad you're still using the old, glorious Sun One Directory Server 5.2, because it brings me back a lot of memories... But are you seriously talking of the 'plain' version, with no patches/hot fixes on top? If that's the case, you're using of a software that has been developed in 2004 and released in Jan 2005! Just for you to be aware, in the last *8* (eight) years a considerable number (in the magnitude of 10^3) of bugs, security problems and performance issues has been identified and fixed...
    However, to provide a better answer to your question, it would be important to understand the 'big picture' in terms of scenario and requirements:
    1) Is this a critical 24x7 service for which you need to perform an on-line migration or you have a 'maintenance window' during which the service may be switched off?
    2) Is the old server member of replication environment? If yes, how many masters/slaves do you have already? Shall the new server be part of this topology? What role shall it have?
    3) Would it be possible to make the the old server able to communicate with the new server?
    4) How big is the database that you've got to migrate? Do you have any requirement in terms of caches?
    5) Do you take backups on a regularly basis and have in place working (*tested*) backup/restore procedures?
    6) Is the new server conserving or changing the O.S. and architecture? [SPARC->SPARC, x86->x86, SPARC->x86, Solaris -> ? , 32 .vs. 64-bit? ]
    7) What are the steps you did to 'install' the software on the new server?
    Thanks,
    Marco
    P.S.: I don't wanna sound 'scaring' with all these questions, neither this should be intended as an 'hidden advertising' for Oracle Professional/Consulting Services, but the only way to not put in jeopardy your data is being aware of the risks, having the control of what's going on and ... possibly have a 'B' plan ;-)
    P.S.S.: My last suggestion is to consider a migration to a later release AS SOON AS POSSIBLE; the latest is ODSEE 11.1.1.7, which is available here:
    http://www.oracle.com/technetwork/middleware/downloads/oid-11g-161194.html
    and seems to work pretty well ;-)

  • How to put path variables into a jar?

    Hey,
    I'm writing a Java prg, that needs some path variables for the JVM. I used to
    pass them over to the JVM each time at start up. Since this solution seems
    to me slightly complex I wonder if there's no other solution like e.g. placing
    them into a .jar's manifest so that the jar has them already - might this be
    possible?
    /usr/local/java/current/bin/java
    -Djava.library.path=/mnt/.../jdk1.5.0_05/jre/lib/i386/client:/usr/.../jdk1.5.0_05/jre/lib/i386:/usr/local/java/jdk1.5.0_05/jre/../lib/i386:/usr/... -cp /mnt/.../JRI.jar:/mnt/.../apache.poi/poi-2.5.1-final-20040804.jar:/mnt/.../CSV/ostermillerutils_1_06_00.jar mainGUI.FrameMain /mnt/.../workspace/project/In case it might also be possible using just a jar, I would appreciate
    some links on how to do that, TIA!!!

    Well I thought about that, since I'm working under linux a start.sh script serves
    qutie well. I'd like to use the prg also under windows but thought a start.bat
    might rather be discouraged?!
    I thought about writing an installer or just using one of the already existing installer projects, to set up those paths in the manifest of the jar directly each time it get installed - the problem is I need these absolute paths, since the prg depends on some another prg, which could be situated on a different position depending on the system and installation...
    Thus I'd like to know, is it possible to set path variables in a manifest's jar at all?
    Is this still a bad idea? why?
    Since this is the first time I try to do things like that, what might be an elegant solution for that issue?

  • How to put Firefox Profiles directory on an external disk?

    I am using Firefox (and Thunderbird) on my Mac at home and at work. I use an external disk where I have all my files and which I transport forth and back. I easily included the Thunderbird Profiles directory so that I can read and treat my mail in both location. I am unable to do the same with the Firefox Profiles directory and it is somewhat frustrating.
    == Operating system ==
    MacOSX 10.6.2

    Jacques.
    What you probably need can be found in a different distribution of Firefox called Portable Firefox:
    http://portableapps.com/apps/internet/firefox_portable
    It's the same exact version of Firefox, but it's portable, and you can install it (profile folders and all) in whatever place you want. See this page for support on that distribution:
    http://portableapps.com/support/firefox_portable

  • How do I move a file up one directory?

    While in "icon view", how can i select a file and then move it up one directory? I always end up dragging it to the desktop, then navigating my way up one directory in finder, then dragging it from desktop to the one directory higher. Seems like a lot of f'n around for such a simple task. Am I missing something? I beleive that an older version of OS X used to allow you to hover the file over the bar along the top of the window or something and then finder would go up one directory. This doesn't seem to work anymore though...unfortunately. Any tips?

    while in icon view, select
    View -> Show Path Bar
    In the bottum row of the Finder Window you can drag your File to any Folder along the path, and also to the enclosing Folder in the directory
    Hope that helps
    Léonie

  • Install Sun ONE Directory Server 5,2 & how to use it for authenticate user

    Good afternoon, Excuse, are newbie in the scope I am learning and putting desire to him, this in my situation I am trying to install Sun ONE Directory Server 5,2 since I understand that this it is application LDAP for Solaris, ok I want to install it to authenticate user against the system, that is to say, to be able to acces the server entering with a created user from the data base of LDAP and make think user that his created in the system. But the documentation that I finds indicates the installation of Sun ONE Directory Server 5,2 but it not clearly about how to use it for authentication. Some one have any manual step by step of Sun ONE Directory Server 5,2 installation and how to make it for authentication systems users.
    I read the forum seeking for anwser and i get confuse
    Thanks for the help and sorry for any inconvenient
    Message was edited by:
    Aku_28
    Message was edited by:
    Aku_28

    I think that I found the Sun endorsed book locations for using LDAP accounts that don't use authentication besides "crypt". I now can use an account with a "ssha" password. It can be more than 8 characters long.
    Chapter 14 System Administration Guide: Naming and Directory Services
    Read page 201 which is the pam.conf file pam_ldap setups. I edited my "/etc/pam.conf" file to reflect this
    Chapter 7 Directory Server 5.2 2005Q4 - Administration Guide
    Read page 316-318 which has a graphical technique to specify password syntax. I set it up and then tried the password by running "su - brahms". It now requires a longer password than 8 characters and it is set up to use "ssha" for that UID entry "brahms".

  • How to define Containing Project Directory in the TestStand Search Path?

    In TestStand Search Path one of the list is "Containing Project Directory". How can I define this?

    Legal Engineer -
    TestStand does expose the "containing project directory" in the search directories dialog box. It only has meaning for the FindFile API function when the "currentSequenceFile" parameter is set to a project file. I agree that it is confusing in that it does not apply to steps finding code modules. If you unchecks this setting and you reload a workspace, any projects that use relative paths to specify their files may no longer find their files.
    In general the suggestion is to leave it checked and ignore it.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • I recently sync one song to my friends iphone 4 and it erased all the music and only put that one song. I tried backing it up but it didnt help. How do I put all previous music back on the iphone?

    I recently sync one song to my friends iphone 4 and it erased all the music and only put that one song. I tried backing it up but it didnt help. How do I put all previous music back on the iphone?

    Re- sync the phone with the computer it was originally synced with.

  • How to put two ipods on one computer

    how to put two ipods on one computer

    Set up the second exactly the same way as you set up the first. If iTunes is already installed, it doesn't need to be installed again.
    (64746)

  • HT5625 I'm trying to create a new Apple ID but when I was putting on my information, there's a box asking for an ITunes gift code. What's this and how can I get one?

    I'm trying to create a new Apple ID but when I was putting on my information, there's a box asking for an ITunes gift code. What's this and how can I get one?

    You're not obligated to insert a gift code. But you can purchase gift codes on the Apple online store (gift cards or certificates) or Apple Retail store
    Gift codes are pre paid cards so you can use credit on the iTunes Store to purchase content
    To create apple ID without payment method:
    http://support.apple.com/kb/HT2534?viewlocale=pt_PT

  • I forgot my password for my apple ID. Any ideas on how to put in a new one without knowing the old one?

    I forgot my password for my Apple ID. Anyone have a solution on how to put in a new one without knowing the old one?
    Thanks

    Welcome to Apple Support Communities
    You have to reset your password. You can do this in this site > http://iforgot.apple.com

  • I tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help

    i tried to sinc my photos and i ended up deleting off my phone all the pictures.  i only ended up with one folder, and i cant figure out how to put rest of folders from my computer back on my phone.....help
    and on a second problem.  I need to know for sure that my contacts are backed up on my computer

    Create a parent folder on your computer to store the named folders of photos that you want transferred to your iPhone. Under the Photos tab for your iPhone sync preferences with iTunes, select the parent folder. All named folders of photos within will be transferred to your iPhone as separate folders or albums.
    Regarding your 2nd question, this should be easy. Your contacts should be available on your computer with or without an iPhone or any cell phone, which can be lost or stolen.
    Although contacts are included with your iPhone's backup which is updated by iTunes as the first step during the iTunes sync process, not a good idea to depend on this either since the iPhone backup includes a significant amount of other data. Contacts are designed to be synced with a supported address book app on your computer. With Windoze, this can be with Outlook 2003, 2007, or 2010 along with syncing calendar events and notes, or with the address book app used by Outlook Express with XP and by Windows Mail with Vista and Windows 7 called Windows Contacts for syncing contacts only.

  • How to put the swf in sub directory

    Would you guys let me know how to put the *.swf file which
    has *.flv in sub directory other than root.
    I've tried many things none of them working.
    a regular *.swf are OK. But if that swf file related with
    *.flv. that Swf has to be in root directory on the server.
    if I put that swf in sub directory such as /swf then it's not
    working.
    Please, help me out.

    Hi,
    It looks like this is for the certification, so I won't give you that much helpt. But you could use a modern IDE to do what you want, or use ant (http://ant.apache.org/) for building.
    /Kaj
    Ps. It looks like your classpath is wrong when you try to run the program.

  • Help!! How to install and use Sun ONE Directory Server Resource Kit 5.2

    Hi ! Friend:
    I have some problem on install and use Sun ONE Directory Server Resource Kit 5.2, when I execute "java DSRK", afterwards something like this : com.iplanet.install.until.wbResource::gerstring:resource bundle"locale.resources.S1DSRKResource" not found appeared in the window ,that's why?
    Meanwhile ,can you give some data about it on how to use it ?
    Thank you !

    You should be aware of the following characteristics of your directory when using this tool:
    Size and number of entries.
    Directory structure and access permissions.
    Virtual attributes, class of service, and indexing.
    Usage, types of access, and access patterns.
    Post your error messages completely.
    Thanks
    --Britto                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Two different main windows in one form?

    Hello - I have a requirement to print a list at the end of an invoice printout.  The invoice can cover multiple pages, and the secondary list can also cover multiple pages, one page per material.  So essentially I need two different definitions of a

  • Table with more than 35 columns

    Hello All. How can one work with a table with more than 35 columns on JDev 9.0.3.3? My other question is related to this. Setting Entities's Beans properties from a Session Bean bought up the error, but when setting from inside the EJB, the bug stays

  • Lumia Imaging SDK and PubCenter on WP8.1 RT : System.TypeLoadException

    Hello, i'm developping a WP8.1 RT app using the Lumia imaging SDK for 8.1 and it's working like a charm. Recently, I had to put some PubCenter ads on my layout. When navigating to a page that is making calls to Imaging library, I catch an exception :

  • Disaster recovery in SQL 2005 - which one is better ?

    Hi All, i am in a slight confusion of implementing a DR solution for one of my banking client. They have a citrix application which depends on a sql server. they cannot have a down time more than 15 mins for that application...They want the DR databa

  • CRM 2015 Unable to get profiler error to debug code on associate message

    Hi all, Im trying to get the profiler on associate message(Opportunity- Competitor)  and i'm unable to get profiler error to debug code and getting "ISV Code aborted" the below link didn't work for me https://community.dynamics.com/crm/f/117/t/134575