Replace one char with the other

I am reading a path,when i use the system path with the \ slash in java its not compatible in windows,
is there any facility in java for replacing the rightslash with the forward slash
i.e when we encounter '/' i wanna to replace it with '\'
sample code needed
please help me
thank in advance,
with regards

The java file handling code will work with paths containing forward slashes, even on windows. If you want to convert to backslashes before displaying to the user or calling native code, then something like the following should work:
String myPath = "C:/Windows";
myPath = myPath.replace('/', '\\');

Similar Messages

  • How to replace one char with two chars in email address policy?

    I very much like to replace the 'ß' char in the surname with 'sz'. However, applying filter '%rßsz%[email protected]' on 'Preußig' leaves me with '[email protected]'.
    So, how do I replace one char with two chars in email address policy?

    As far as I know, your only solution is to manually create such addresses instead of using e-mail address policy.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • HT204053 It seems as if I have 2 accounts.  I would like to combine one account with the other.  How can I close one apple ID and combine it with the other that I was not aware I had set up???

    I would like to close one account and only use the other.  D

    You can't close or delete accounts (you can only remove any personal info from them and stop using them), and you can't merge accounts or transfer purchases to another account - content will remain tied to the account that downloaded them.

  • How do i get my apps from m phone into my itunes?when i sync my phone it wants to replace my phone with the ones in itunes already.

    how do i get my apps from m phone into my itunes?
    when i sync my phone it wants to replace my phone with the ones in itunes already.

    PaulaMS wrote:
    My iPhone software crashed ... I am unable to recover my songs that were on my phone. How am I able to get those songs back?
    Download Past Purchases  >  http://support.apple.com/kb/HT2519
    OR Re-Sync your Content from your Computer.
    See here  >  http://support.apple.com/kb/HT1386
    From Here  >  http://www.apple.com/support/iphone/syncing/

  • I have 2 Apple ids and two corresponding iCloud accounts. My five Apple devices are linked to one or the other. As one consequence a small number of my contacts are associated with one iCloud account, the majority with the other. How can I merge?

    For reasons not entirely clear to me I have ended up with two Apple ids, two iCloud accounts and my Apple devices being associated with one or the other iCloud account/Apple id. One of the complications is that my contacts are partially owned by one iCloud account, partially by the other.
    Is there any way to
    - merge the contacts (I have tried exporting from one and importing into the other but one set will overwrite the other)?
    - migrate all devices to one single iCloud account without being locked out for 3 months?
    - merge Apple ids or just delete one of them without locking out devices?
    Grateful for any suggestions because this is turning into a headache.

    You can merge the contacts from one account with your other one without overwriting them.  Sign into the first account, download them as vCard (iCloud: Export contact information as a vCard), email them to a device signed into the account you want to merge them with, tap the vCard and choose Add..., then Create New Contacts.
    You can also migrate a copy of the data in one account and merge it with the other by signing into the account you are leaving, then signing out (or deleting the account if not running iOS 8), then choosing Keep on My iDevice when prompted.  Then sign into the other account and choose Merge when prompted.  This won't move Notes however.  If you are syncing notes that you want to migrate from the other account, you can temporarily add the account to your Mac as a secondary account by going to System Preferences>Internet Accounts (or Mail,Contacts,Calendars)>Add Account>iCloud and signing in with the other account ID.  Then enable notes syncing in the secondary account.  You will then be able to open the notes app and drag and drop notes from one account to the other.  When you're done, delete the secondary account from your Mac.
    You can't merge IDs as Apple does not allow it.  Also, you won't be locked out of anything for 3 months.  The "90-day switch" rule only applies to changing your iTunes store account, not your iCloud account.  Just leave your iTunes store account as-is.  The ID you use for the iTunes store does not have to be the same as the ID you use for iCloud.

  • I want to Facetime my Ipad from my Iphone but they are both set up with the same Apple id.  Do I need to create a new id for one of them in order to facetime with the other?

    I want to Facetime my Ipad from my Iphone but they are both set up with the same Apple id.  Do I need to create a new id for one of them in order to facetime with the other?

    You should be able to call the iPad using your Apple ID from the iPhone. When calling from iPad use the iPhone's phone number to initiate the call.

  • I have 2 different libraries and would like to switch one with the other. Can I simply authorize the one I want to switch to the same user and Password that refers to the one I want to get to.

    I have 2 Itunes libraries on 2 different computers and would like to switch one to become the other in order to have one complete library on both computers. Can I simply deauthorize and reauthorize the computer i want changed with the other library.

    hi melansonp, these 2 emails accounts are from one webmail or from 2 differents ?

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • I have recently bought a second I phone4 and have the same apple ID on both of them, strangely I noticed the messages sent from one phone appearing the other one along with any pictures I sent from one of my Iphones. Is it possible to see the same msgs.

    I have recently bought a second I phone4 and have the same apple ID on both of them, strangely I noticed the messages sent from one phone appearing the other one along with any pictures I sent from one of my Iphones. Is it possible to see the same msgs.

    You need to setup different Receive At addresses for iMessage.
    If you don't want the same pics on each, turn off PhotoStream.
    User Guide

  • Does anyone knows a way to work with various Pages documents at the same time, for example with a system of tabs to switch directly from one document to the other?

    Hello everyone,
    Working with numerous Apple Pages documents at the same time, I am looking for an efficient solution to switch faster from one document to the other. Integrating all them in a single framework, for exemple by switching from one to the other with a system of tabs would be of great help. Does anyone knows if such a possibility exists?
    Thanks in advance,
    Jean-Baptiste

    jbp- wrote:
    Thanks. It works and is very efficient. Not as much as a real system of tabs, but is allows to switch very fast between different documents. Only regret I would have is that it doesn't work with a document which is on full page mode. But that's already very helpful!
    You're very welcome but Peggy really gave you the answer already. 
    With regard to the full screen apps, I don't think Apple have yet worked out how to make them elegantly coexist with other apps.  The closest you can get is the four finger swipe gestures you may use on a trackpad if you have one (Mission Control and App Exposé).
    In fact nowadays I use the App Exposé (four finger swipe down gesture) more often than I use Command-Accent to move between documents in the same app (when not in full screen).  It also as the advantage of showing you thumbnails of recently opened documents below the ones already open within the app.  If you haven't tried it, I suggest you give it a whirl.
    I can't remember now but I think the four finger gestures are not enabled by default and you must switch them on in System Preferences > Trackpad > More Gestures. 

  • I am using Mail 5.3 with two separate gmail addresses. One is personal the other is business. When I send emails from the business address, any auto-replies I get COME TO THE PERSONAL INBOX. I imagine that this is a setting? Please help!

    I am using Mail 5.3 with two separate gmail addresses.
    One is personal the other is business.
    When I send emails from the BUSINESS address, any auto-replies/out of office notices I get come to my PERSONAL INBOX.
    I imagine that this is a setting? Please help!

    Edit the SMTP server list. Add a new one for the business account. Put the correct password and information for it. Give it a description so you will know which server is which. Mke sure the correct server is highlighted in the account selected and check the box to use only that server for that account. Do that for the other account also.

  • JDBC with CLOB abnomally - shows on one server, not the other

    Hi have a problem.
    I recently moved a web application to another server. I copied over all the same java libraries I had on the first server.
    The web application queries an Oracle table - the table contains one CLOB field.
    When I query the table on the first server, I can see the contents of the CLOB.
    When I query the table with the other server, the query is empty for the CLOB field.
    This is the code I use to query the table. I have connection pooling set up within Sun Web Server. If it works on the one server, why would it not work with the other server? This is driving me crazy!!
    Any suggestions?
    try{
                // Get connection from configured pool
                initContext = new InitialContext();
                source = (DataSource) initContext.lookup("java:comp/env/jdbc/myDB");
                conn = source.getConnection();
                if(conn != null){
                    stmt = conn.createStatement();
                    result = stmt.executeQuery(sql);
                    rsmd = result.getMetaData();
                    while(result.next()){
                        Hashtable hash = new Hashtable();
                        for(int i = 1; i <= rsmd.getColumnCount(); i++){
                            if(result.getString(i) != null){
                                hash.put(rsmd.getColumnName(i),result.getString(i));
                            }else{
                                hash.put(rsmd.getColumnName(i),"");
                        returnValue.addElement(hash);
            }catch (Exception e){
                setErrors(e.toString());
                Email.sendMail("[email protected],"subject","Exception: " + e.toString() + "\nWith: " + sql,"fromname");
            }

    I tried that with this code:
    <body>
              <h1>
                   JSP Example
              </h1>
              <%
              Connection dbconn=null;
              ResultSet results=null;
              PreparedStatement sql=null;
              try{
                   Class.forName("oracle.jdbc.OracleDriver");
                   try{
                        boolean     doneheading = false;
                        dbconn = DriverManager.getConnection("jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host.com) (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=theserver.com)))","username", "password");
                        sql = dbconn.prepareStatement("SELECT * FROM BE_STATUS_EMAILS WHERE ID='42575'");
                        results = sql.executeQuery();
                        while(results.next()){
                             if(!doneheading){
                                  out.println("<table border=2>");
                                  doneheading = true;
                             out.println("<tr><td>" + results.getString("ID"));
                             out.println("<td>" + results.getString("RECEIVED"));
                             out.println("<td>" + results.getString("TYPE1"));
                             out.println("<td>" + results.getString("FROM1"));
                             out.println("<td>" + results.getString("TO1"));
                             out.println("<td>" + results.getString("CC"));
                             out.println("<td>" + results.getString("SUBJECT"));
                             out.println("<td>" + results.getString("MESSAGE"));
                             out.println("<td>" + results.getString("STATUS"));
                        if(doneheading){
                             out.println("</table>");
                        }else{
                             out.println("No results");
                   }catch (SQLException s){
                        out.println("SQL Error<br>");
                   }finally{
                        if(dbconn!=null)dbconn.close();
              }catch (ClassNotFoundException err){
                   out.println("Class loading error");
              %>
         </body>It produced the output, but again, the CLOB field was null. But when I query the database with that SQL using a database query tool, like Aquastudio, I can see the output. And if I run the stub on the other server, it works! This is nuts!!
    Any suggestions?

  • Greetings. Do you know if an unlocked Iphone 5S can switch from CDMA to GSM with a sim card, or if you have to choose one capacity or the other when you buy the phone?  Many thanks.

    Greetings. Do you know if an unlocked Iphone 5S can switch from CDMA to GSM with a sim card, or if you have to choose one capacity or the other when you buy the phone?  Many thanks.

    Is this a Verizon or Sprint iPhone 5S?

  • I have a fairly elderly I Mac 7.1 (2.47 Ghz Intel Core Duo) operating OSX v 10.9.5. At the core level I find two Library folders, one within the System Folder and one by itself with the other core level folders - mostly same content. Is this right?

    iMac 7.1 (2.47 Ghz Intel Core Duo w/2GB memory) operating OSX v 10.9.5. At the core level I find two Library folders, one within the System Folder and one by itself with the other core level folders - mostly same content. Is this right or do I have a duplication problem?
    The system is slow.

  • I bought a new Iphone 4s, gave the older to my wife , made a new account for her, erased all data and now when i sync them they interfere with the other. Eg: if i delete an app ou buy one it appears on her phone, what shoul I do?

    I bought a new Iphone 4s, gave the older to my wife , made a new account for her, erased all data and now when i sync them they interfere with the other. Eg: if i delete an app ou buy one it appears on her phone, what should I do?

    Have a look here...
    Automatic Downloads...
    http://support.apple.com/kb/ht4539
    Turn off Automatic Downloads. Settings > Store

Maybe you are looking for

  • IPOD Touch is an MP3 player ???

    hi, Had some various replies that iPOD touch is an iPOD mp3 player foremost. This is the reply that we get due to some basic features missing in some of the other apps. All good, no worries, as it is a mp3 player after all. Here is my question: When

  • Error in BAPI_BUPA_ADDRESS_CHANGE

    I want to change the address of the BP and I'm trying to use this BAPI. But when I want to change only the city, I'm passing the new value in the ADDRESSDATA and also marking the city field in the ADDRESSDATA_X. But it gives me the error that "Tax ju

  • Transferring CS4 from an old Mac to a new one, I get a notice saying "licensing for this product has stopped working" Error 150:30. Don't know what to do? Thanks.

    I'm trying to migrate my CS4 from my old Mac to my new one. When trying to open photoshop, i get a message saying "Licensing for this product has stopped working." And "Error: 150:30" I don't know what to do from here. Can someone help me? Thanks.

  • BI Publisher Desktop Install Error

    1.) I uninstalled XML Desktop via the XP control panel... 2.) BIP Desktop would not install and indicated I had 'not' uninstalled my previous ver of XML Pub... 3.) I reinstalled XML Desktop and then used Oracle's setup.exe included with XML Publisher

  • NWDI requirement for Portal 7.3

    We are upgrading from Portal 7.0 landscape to Portal 7.3 landscape. Would we be requiring a different NWDI or the existing NWDI  running in portal 7.0 landscape would work? Thanks, Appachi