Backslash problem in properties

I have a properties file where I want the user to define a full file path to a windows directory.
In properties file if the file name is c:\ramkibg\monitor.exe , when I read it , it will return as c:ramkibgmonitor.exe
Is there any way to avoid it?
It is working fine if I escape it with another back slash. But it won't be good to ask user to give like this.

You can use / instead... you will then have to convert it to \ after reading the properties file

Similar Messages

  • Backslash problem in property file

    I have to read and update a value of a key in the property file.The value that the key holds is a url.or that i have used load and store method of property class.
    But the problem is each time it writes back to property file a backslash is placed before (:) and the url becomes useless.
    scp.dir=[email protected]:/opt/oracle/productbecomes
    scp.dir=[email protected]\:/opt/oracle/productso i want to know is there any way to solve this problem.Do i want to read and write property file in any other way to avoid this problem

    If you use the Properties class for writing, then it will write in a format that the Properties class understands.
    So there's no problem if you read & write using the Properties class.
    If you write using the Properties class and read using any other way, then you'll have to handle the escaping (as it's required by the Properties format specification).
    How do you read the file and why is that backslash a problem?

  • Problems with properties files and war files in weblogic 5.1

              I work with WebLogic 5.1 and I'm trying to deploy a web application which gets
              a properties file. If I deploy it as an expanded directory hierarchy (with the
              properties files into WEB-INF/classes) I have no problems. While deploying it
              by a .war file I get this message: "en_GB java.util.MissingResourceException:
              Can't find resource for base name Agent, locale en " (the getBundle() method is
              trying to get an english property file). What could I do? Is it really a weblogic
              5.1 bug?
              Thanks,
              David
              

    This issue comes up repeatably. It's a real bug.
              I believe this problem was fixed in a 5.1 service pack, but I'm trying to
              find out the exact disposition of the issue. Noone seems to be complaining
              about this under 6.x, so a fix seems to have been made, the only question is
              whether or not it got back-ported to a 5.1 service pack.
              Gary
              david <[email protected]> wrote in message
              news:3ac4a39a$[email protected]..
              >
              > I work with WebLogic 5.1 and I'm trying to deploy a web application which
              gets
              > a properties file. If I deploy it as an expanded directory hierarchy (with
              the
              > properties files into WEB-INF/classes) I have no problems. While deploying
              it
              > by a .war file I get this message: "en_GB
              java.util.MissingResourceException:
              > Can't find resource for base name Agent, locale en " (the getBundle()
              method is
              > trying to get an english property file). What could I do? Is it really a
              weblogic
              > 5.1 bug?
              > Thanks,
              > David
              

  • The backslash problem when using file new file

    how would i change c://
    to c:\
    because normally in windows you would use c:\
    but since when you use "\" backslash in a string it would come up with a syntax error
    im trying to input using a jtextfeild c:\
    and i want the output to be changed to c://
    how would i go about doing this?

    iv solved my problem with the help from corlettk's
    answer
    thanks for the help
    // convert
                     String convert = inputTextbox.getText();
                     convert.replaceAll("c:\"", "c:\\");
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Japanese backslash problem

    Hi all,
    I am storing Japanese characters in MySQL database, the database encoding is Shitf_JIS. All characters are working fine except �\�� this character. I made a Google search and found out that this character has a backslash in trailer byte. While storing in the db this backslash is stripped off. So it displays a strange character instead of the original one. Has anybody faced this problem? If any please suggest me a solution. Its very very urgent. The configuration is,tomcat 3.3.1, MySQL 3.2.3, Apcahe on Linux machine.
    Thanx in advance.
    Regards,
    Raj

    In many Japanese environments the characters
    (char)0x005c ('\')
    (char)0x00a5 ('�')
    have the same functioning.

  • Problem changing properties

    Hello,
    I'm having trouble changing the document properties of this document: http://registry.nafta-sec-alena.org/cmdocuments/35e148ef-82a8-4eaa-b71b-4803d93ff43f.pdf As far as I can tell, the security settings allow editing of the document. However, when I try to edit them, they are all grayed out and I can't make changes. Does anyone know what I'm doing wrong?
    Thanks,
    Simon

    That's bizarre. What am I doing wrong? I have Acrobat 9 pro, and I've never had this problem with other documents. Any thoughts?

  • Problem storing properties with IServiceProfile

    Hi SDN,
    I found the following SDN Topic which seems to be similiar to my problem:
    https://forums.sdn.sap.com/thread.jspa?forumID=41&threadID=26137&messageID=233589#233589
    I feel I have the same problem but not on EP6 SP3 but on current EP6 (tested on SPS12 and SPS14). So I decided to open this as a new topic again:
    I have a service for which I am trying to set properties programmatically.
    I created an iView which calls a set method on the service. In this method a specific property of the service is changed using the following code:
    IServiceProfile serviceProfile= context.getServiceProfile();
    serviceProfile.setProperty(key, value);
    serviceProfile.store();
    However, if I look in the Property Editor of this service sometimes this call seems to change the property and sometimes not!
    Specifically, if I use the call above just after restarting the SAP EP it works. But any following call does not change the value in the Property Editor.
    If I check the value bevor changing it in the iView which does the change it seems like the property value has been changed correctly.
    But it is not a caching problem in the browser, because if I access the property from a different iView it has not changed as well.
    Does anybody know about a solution to this problem?
    Best regards,
    Stefan Brauneis

    Hi Detlev,
    I was hoping that anybody could find a better solution than telling "...ask the expert next door...".
    But this answer is of course more valuable than nothing. So you get points. Sorry, I could have done this earlier.
    The problem, however, still exists. Even if it has only very low priority for me, because there is the workaround of just using the services property editor. Every change there seems to be reflected immediately.
    I will keep this question open and wait if somebody on SDN has a solution to it.
    Best regards,
    Stefan Brauneis

  • Problems with properties view

    Hi guys.
    I have one problem that I cant fix. First of all I am going to describe my project.
    I using EMF for my models, and I have my own navigator and couple editors for models. Some of editors have table with list of models as input and some add/remove buttons. My navigator and editors implementing ITabbedPropertySheetPageContributor to return contributor id, and override getAdapter() like this:
    @SuppressWarnings("rawtypes")
    @Override
    public Object getAdapter(Class adapter) {
    if (adapter == IPropertySheetPage.class) {
    return new TabbedPropertySheetPage(this);
    return super.getAdapter(adapter);
    So properties are showing for all models (even same) in navigator and editor. Also I have undo action on my project, this action it is handler that calls UIUndoLastOperationController.
    If I try to delete model from Editors table, content provider notifies listener (SelectionChangedListener) in TabbedPropertySheetPage, and selectionChanged(SelectionChangedEvent event) method is called, that hide properties view. But if I try to create new model in my table, go to navigator and call Undo action (created model disappear from table) and go back to Editor - properties view are no hide, and listener in TabbedPropertySheetPage is not notified.
    Could anybody help my with this problem, maybe someone already had this problem.
    Thanks in advance for any tips.
    Best regards, Ruslan.

    Hi guys.
    I have one problem that I cant fix. First of all I am going to describe my project.
    I using EMF for my models, and I have my own navigator and couple editors for models. Some of editors have table with list of models as input and some add/remove buttons. My navigator and editors implementing ITabbedPropertySheetPageContributor to return contributor id, and override getAdapter() like this:
    @SuppressWarnings("rawtypes")
    @Override
    public Object getAdapter(Class adapter) {
    if (adapter == IPropertySheetPage.class) {
    return new TabbedPropertySheetPage(this);
    return super.getAdapter(adapter);
    So properties are showing for all models (even same) in navigator and editor. Also I have undo action on my project, this action it is handler that calls UIUndoLastOperationController.
    If I try to delete model from Editors table, content provider notifies listener (SelectionChangedListener) in TabbedPropertySheetPage, and selectionChanged(SelectionChangedEvent event) method is called, that hide properties view. But if I try to create new model in my table, go to navigator and call Undo action (created model disappear from table) and go back to Editor - properties view are no hide, and listener in TabbedPropertySheetPage is not notified.
    Could anybody help my with this problem, maybe someone already had this problem.
    Thanks in advance for any tips.
    Best regards, Ruslan.

  • Lenovo 0769 b5g keyboard "\" backslash problem

    lenovo 0769 b5g,( thats the code written under my laptop).. i dont know the model code of this laptop.. i have a problem.. when my laptop gets hot, or when i play games with high ram requirements.. it starts to slowly type \.. it starts slow then.. it type faster and faster... i dont know if this is a virus or theres a problem in my laptop... how can i solved this.. i tried to use a acronis true image.. i restored it.. almost like a format... pls help me about this problem.. it piss me off... i cant multi task..

     As I wrote earlier you should tjeck if it's a software issue or hardware.
    I would download ubuntu linux, http://www.ubuntu.com/getubuntu/download
    Download an reboot with the burned disc in the drive.
    this should boot up linux,
    then check if the backslash works.
    good luck

  • Problem: CM properties translation through Metadata Extensions

    Hi.
    I encountered a problem with CM properties translation using metada extensions.
    The translation as it is goes fine, however, sorting does not.
    I have a property, that is created in Language1, which has some allowed values. That property is used in one of the xml forms. Its allowed values are displayed in this form sorted accordingly when portal is viewed in Language1.
    I added metadata extension, where allowed values from property are translated into Language2.
    When portal user swithes to Language2, translation kicks in, but the values are not sorted accordingly in Language2. They remain sorted as they were in their original language - Language1.
    Problem: how to make portal (xml form) use the properly sorted property in any chosen language?
    Lucas

    Hi.
    I encountered a problem with CM properties translation using metada extensions.
    The translation as it is goes fine, however, sorting does not.
    I have a property, that is created in Language1, which has some allowed values. That property is used in one of the xml forms. Its allowed values are displayed in this form sorted accordingly when portal is viewed in Language1.
    I added metadata extension, where allowed values from property are translated into Language2.
    When portal user swithes to Language2, translation kicks in, but the values are not sorted accordingly in Language2. They remain sorted as they were in their original language - Language1.
    Problem: how to make portal (xml form) use the properly sorted property in any chosen language?
    Lucas

  • Problem setting properties using TTC-Pro

    I am using TrackThemColors-Pro for Windows with Director MX
    2004.
    [www.smoothware.com]
    When I try to set the video settings in code, or open the
    video settings dialogue, the video input hangs. I have tried 4
    different capture cards, 3 different cameras etc.
    I have emailed Danny about this, but no reply so I guess it
    isnt supported anymore.
    When trying this it hangs
    SetParams(TrackObj,input,hue,saturation,brightness,contrast,sharpness
    , standard)
    (of course substitute the variables for numbers).
    Anyone else have this problem, or know when this function
    should be called?
    Thanks

    Joe,
    Can you give us the details of your Sequence, your Source Footage and then the specs. of your computer?
    Thanks, and good luck,
    Hunt

  • Classpath problem with properties file in jar

    Hi,
    I am seeing a classpath error for my setup, as follows...
    A defaultFieldIDs.properties exists with numerous entries:
    projectID=10630
    issueTypeID=80
    closedStatusID=6My Spring applicationContext.xml file contains the following:
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="locations">
                   <list>
                         <value>classpath:sqlScripts.properties</value>
                         <value>classpath:defaultFieldIDs.properties</value>
                    </list>
              </property>
              <property name="ignoreUnresolvablePlaceholders" value="false"/>
         </bean>     
    <util:map id="defaultQueryParameters">
              <entry key="projectID" value="${projectID}"/>
              <entry key="issueTypeID" value="${issueTypeID}"/>
              <entry key="closedStatusID" value="${closedStatusID}"/>
              <entry key="statusFieldName" value="${statusFieldName}"/>
              <entry key="numberOfExpenseLinesFieldID" value="${numberOfExpenseLinesFieldID}"/>
         </util:map>My compiled jar contains the above properties directory in its root directory, and is placed in the lib directory of the application
    However, when I start my application I get the following error:
    Invalid bean definition with name 'defaultQueryParameters' defined in null: Could not resolve placeholder 'projectID'
    What is going wrong here?

    Then presumably that jar file isn't in the classpath for your application. Perhaps just dropping it into the lib directory isn't sufficient.
    You didn't say anything about what kind of application it is. For web applications, all jars in the WEB-INF/lib directory are in the classpath. But you didn't say this was a web application and you didn't say you put it in the WEB-INF/lib directory. So if you don't care to put sufficient information into your posts, I recommend you read up on the rules for whatever type of application you have, in particular the rules for how to set its classpath.

  • Crystal reports on SAP-BW 3.5 query - problem w. properties of key figures

    Dear experts,
    Creating a crystal report on a SAP-BW 3.5 query we have the following problem:
    In SAP-BW query we defined a restricted key figure with property
    'Calculate single value as Ranked list (olympic)'.
    Within SAP-BW it works correctly; in Crystal Reports we see the
    key figure without the defined property.
    Example
    SAP-BW
    Customer     Revenue 
    4711            1
    4812            2
    4913            3
    Crystal Reprts
    Customer     Revenue 
    4711            500 EUR
    4812            300 EUR
    4913            100 EUR
    Could anyone give us an advice to solve this?
    Thanks a lot in advance.
    Hagen

    Edited by: Hagen Kunze on Feb 12, 2010 3:22 PM

  • EM Configuration problem, emom.properties

    Hi,
    I am trying to configure Enterprise manager using Oracle 11g on win 7
    I have created the repository successfully.
    On using
    emca -config dbcontrol db
    I getting error in logs I am pasting the last parts here...
    INFO: Uploading configuration data to EM repository (this may take a while) ...
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMReposConfig invoke
    INFO: Uploaded configuration data successfully
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMDBCConfig updateEmomsProps
    CONFIG: Updating file D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties ...
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.util.FileUtil _deleteFile
    CONFIG: Deleting file D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.util.FileUtil copyFile
    CONFIG: exception caught in copyFile:
    oracle.sysman.emcp.exception.FileUtilException: Copying file D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties.emca to D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties
      at oracle.sysman.emcp.util.FileUtil._copyFile(FileUtil.java:277)
      at oracle.sysman.emcp.util.FileUtil.copyFile(FileUtil.java:618)
      at oracle.sysman.emcp.util.FileUtil.copyFile(FileUtil.java:394)
      at oracle.sysman.emcp.EMDBCConfig.updateEmomsProps(EMDBCConfig.java:926)
      at oracle.sysman.emcp.EMDBCConfig.performConfiguration(EMDBCConfig.java:408)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:174)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:144)
      at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:255)
      at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:590)
      at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1453)
      at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:574)
      at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:522)
    Caused by: java.io.FileNotFoundException: D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties (Access is denied)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at oracle.sysman.emcp.util.FileUtil._copyFile(FileUtil.java:263)
      ... 11 more
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMDBCConfig updateEmomsProps
    CONFIG: Copying file D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties.emca to D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error updating D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties
    Refer to the log file at D:\app\IST-85\cfgtoollogs\emca\orcl\emca_2013_11_11_20_58_39.log for more details.
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error updating D:\app\IST-85\product\11.2.0\dbhome_1\sysman\config\emoms.properties
      at oracle.sysman.emcp.EMDBCConfig.performConfiguration(EMDBCConfig.java:413)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:174)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:144)
      at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:255)
      at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:590)
      at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1453)
      at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:574)
      at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:522)
    Nov 11, 2013 9:07:16 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
    CONFIG: Restoring oracle.installer.oui_loc to D:\app\IST-85\product\11.2.0\dbhome_1\oui
    Please have a look on it and let me know where I did mistake.
    Thanks,
    Aamir.

    Hii Rahul Sir,
    I tried to configure 11g using DBCA.... and i got the error -
    EM configuration failed due to following reason -
    refer to log cfgtoollogs\dbca\emconfig.log for more details.
    And the LOG says -
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    Nov 18, 2013 12:45:30 PM oracle.sysman.emcp.util.FileUtil setAttributeInXML
    SEVERE: Error parsing XML file D:\app\IST-85\product\11.2.0\dbhome_1\oc4j\j2ee\OC4J_DBConsole\config\server.xml
    Nov 18, 2013 12:45:30 PM oracle.sysman.emcp.util.FileUtil setAttributeInXML
    CONFIG: Stack Trace:
    java.io.FileNotFoundException: D:\app\IST-85\product\11.2.0\dbhome_1\oc4j\j2ee\OC4J_DBConsole\config\server.xml (The system cannot find the file specified)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at java.io.FileInputStream.<init>(FileInputStream.java:66)
      at java.io.FileReader.<init>(FileReader.java:41)
      at oracle.sysman.emcp.util.FileUtil.setAttributeInXML(FileUtil.java:1065)
      at oracle.sysman.emcp.EMDBCConfig.instantiateOC4JConfigFiles(EMDBCConfig.java:992)
      at oracle.sysman.emcp.EMDBCConfig.performConfiguration(EMDBCConfig.java:423)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:174)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:144)
      at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:255)
      at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:583)
      at oracle.sysman.assistants.util.em.EMConfigStep.executeImpl(EMConfigStep.java:139)
      at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
      at oracle.sysman.assistants.util.step.BasicStep.callStep(BasicStep.java:251)
      at oracle.sysman.assistants.dbca.backend.PostDBConfigureStep.executeImpl(PostDBConfigureStep.java:269)
      at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
      at oracle.sysman.assistants.util.step.Step.execute(Step.java:140)
      at oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2667)
      at java.lang.Thread.run(Thread.java:595)
    Nov 18, 2013 12:45:30 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
    CONFIG: Failed to set value in server.xml for application-server tag
    Nov 18, 2013 12:45:30 PM oracle.sysman.emcp.EMConfig perform
    SEVERE: Error instantiating OC4J configuration files
    Refer to the log file at D:\app\IST-85\cfgtoollogs\dbca\orcl\emConfig.log for more details.
    Nov 18, 2013 12:45:30 PM oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error instantiating OC4J configuration files
      at oracle.sysman.emcp.EMDBCConfig.performConfiguration(EMDBCConfig.java:427)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:174)
      at oracle.sysman.emcp.EMDBCConfig.invoke(EMDBCConfig.java:144)
      at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:255)
      at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:583)
      at oracle.sysman.assistants.util.em.EMConfigStep.executeImpl(EMConfigStep.java:139)
      at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
      at oracle.sysman.assistants.util.step.BasicStep.callStep(BasicStep.java:251)
      at oracle.sysman.assistants.dbca.backend.PostDBConfigureStep.executeImpl(PostDBConfigureStep.java:269)
      at oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:210)
      at oracle.sysman.assistants.util.step.Step.execute(Step.java:140)
      at oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2667)
      at java.lang.Thread.run(Thread.java:595)
    Now I remember when I installed 11g in my system, I got the same message at that time... but I ignored that because all I wanted to install 11g at that time......
    What should I do now?
    And Thank you very much for your time sir.

  • Backslash(\) problem in JSTL

    I am trying to set a backslash (\) as the value of a variable but I failed.
    when I use the following, I got an error message: JavaCompile: String literal is not properly closed by a double-quote.
    <c:set var="var1" value="\\"/>However, when I add one more character after the backslash, it can run correctly. For example like this:
    <c:set var="var1" value="\\a"/>Do anyone have any idea about this? How can I set the backslash as the value of a variable? Thanks for all your reply first.

    Some suggestions:
    Try putting the attribute with single quotes, instead of double quotes.
    Take a look at the generated .java file for the servlet code.
    Try nesting the value between tags:
    <c:set var="var1">\</c:set>worst comes to worst you could probably use a scriptlet
    <% pageContext.setAttribute("var1", "\\");  %>Good luck,
    evnafets

Maybe you are looking for