Spaces in property values result in values bein enclosed in quotes (Linux)

G'day,
I couldn't find this mentioned in the bugs database (or anywhere else) so it might be a new bug.
If a property value in a JNLP descriptor contains spaces then the resulting property value returned by System.getProperty() is enclosed in quotes, e.g.
<property name="jnlp.blah" value="foo bar"/>
results in System.getProperty("jnlp.blah") returning the value +{color:#ff0000}"{color}foo bar{color:#ff0000}"{color}+ instead of the expected foo bar (without quotes).
In the Java console I see the following:
jnlpx.vmargs = {color:#ff0000}"{color}-Xmx512m -Xms256m ... -Djnlp.blah={color:#ff0000}\"{color}foo bar{color:#ff0000}\"{color} ... {color:#ff0000}"{color}
This only affects Linux (tested with JRE 6.0_20 on Ubuntu 10.04). The same JNLP launched with Java Web-Start on Windows (JREs 6.0_12 & 6.0_21 on Vista) produces the following:
jnlpx.vmargs = -Xmx512m -Xms256m ... {color:#ff0000}"{color}-Djnlp.blah=foo bar{color:#ff0000}"{color} ...
So, the problem stems from the way property values with spaces are handled by the Linux implementation of the JRE.
Has anyone else come across this behaviour?
Regards,
Chris.

G'day,
AndrewThompson64 wrote:
If there is one, the best thing to do is raise a bug report, but first you'll need a test case.
Something with source, JNLP and build file provided. In fact, if you can produce that in a Zip archive available on the net, I can download it and run it both Win 7 & Ubuntu for a further test. Good call - narrowing down a test-case helped me pin down the problem.1. Download the test-case here.
2. Unzip to /tmp:
cd /tmp
unzip JnlpPropertyWithSpacesBug.zip
3. Test 1:
javaws file:///tmp/JnlpPropertyWithSpacesBug/test.jnlp
This should result in the message: System.getProperty("jnlp.my.property") returns null
This is the correct result.
4. Test 2:
javaws /tmp/custom.jnlp
On Linux, this should result in the message: +System.getProperty("jnlp.my.property") returns {color:#ff0000}"{color}should not be enclosed in double-quotes{color:#ff0000}"{color}+
This result is incorrect (shouldn't have double quotes).
Note that custom.jnlp is a customized version of JnlpPropertyWithSpacesBug/test.jnlp:
1. attributes have been added to the java tag
2. a property tag has been added for a secure property: sun.java2d.noddraw
3. a property tag has been added for a jnlp property: jnlp.my.property
All three are needed to produce the bug. It only occurs on when the Linux JRE is used (6.0_20; Ubuntu 10.04).
This simulates the situation in which a custom JNLP descriptor is dynamically generated, e.g. to invoke the application with custom system properties.
There will be extra chance of test results if you can provide a link directly to the JNLP file on the net. The test case would need to be small and sand-boxed, of course.Any suggestions as to where you can freely host Java Web-Start applications?
Thanks,
Chris.
Edited by: cpudney on Aug 18, 2010 2:06 PM

Similar Messages

  • Help! Trouble with property name="jnlp.versionEnabled" value="true"/

    Trouble with <property name="jnlp.versionEnabled" value="true"/> and file: protocol.
    I can't get the versionEnabled flag to work with local file system URL's.
    Here is code example (NanoHTTPD.java came from here -> http://elonen.iki.fi/code/nanohttpd/) :
    C:\test>dir
    Volume in drive C has no label.
    Volume Serial Number is CCC7-E05D
    Directory of C:\test
    05/08/2008  10:08 AM    <DIR>          .
    05/08/2008  10:08 AM    <DIR>          ..
    05/08/2008  09:44 AM               109 hello.java
    05/08/2008  09:57 AM               542 hello.jnlp
    04/10/2008  09:52 AM            20,547 NanoHTTPD.java
                   3 File(s)         21,198 bytes
                   2 Dir(s)  26,610,700,288 bytes free
    C:\test>type hello.java
    public class hello
    public static void main(String[] args)
    System.out.printf("Hello world\n");
    C:\test>type hello.jnlp
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="6.0+" codebase="http://localhost/" >
    <!-- codebase="file:///C:/test" -->
    <!-- codebase="http://localhost/" -->
        <information>
            <title>hello</title>
            <vendor>hello</vendor>
            <description>hello</description>
        </information>
        <resources>
            <j2se version="1.6" />
            <property name="jnlp.versionEnabled" value="true"/>
            <jar href="hello.jar" version="1.0" />
        </resources>
        <application-desc main-class="hello"/>
    </jnlp>
    C:\test>javac NanoHTTPD.java hello.java
    Note: NanoHTTPD.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: NanoHTTPD.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    C:\test>jar cvf hello__V1.0.jar hello.class
    added manifest
    adding: hello.class(in = 459) (out= 299)(deflated 34%)
    C:\test>start java -cp . NanoHTTPD
    C:\test>javaws http://localhost/hello.jnlpjava console output :
    Java Web Start 1.6.0_10-beta
    Using JRE version 1.6.0_10-beta Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\4381
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    0-5: set trace level to <n>
    Hello worldchange hello.jnlp, jnlp start element to this:
    <jnlp spec="6.0+" codebase="file:///C:/test" >
    javaws hello.jnlpjava console output:
    Java Web Start 1.6.0_10-beta
    Using JRE version 1.6.0_10-beta Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\4381
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    0-5: set trace level to <n>
    #### Java Web Start Error:
    #### helloStacktrace in detail :
    Detail ST:
    java.lang.ClassNotFoundException: hello
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Take version out of file name:
    C:\test>move hello__V1.0.jar hello.jar
    C:\test>javaws hello.jnlp
    java console output:
    Java Web Start 1.6.0_10-beta
    Using JRE version 1.6.0_10-beta Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\4381
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    0-5: set trace level to <n>
    Hello world

    The short answer is that e4x XML rocks!
    Beyond that, consider that you are sending xml to Flex. For
    any format other than e4x, Flex has to convert the xml into that
    format. The precise algorithms Flex uses for this are not obvious
    or published. This is why I have never liked using mx:Model. It
    converts the xml into nested objects, but i have never been
    comfortable predicting exactly what the resulting structure will
    be.
    Once you get an e4x xml node identified (toXMLString()), you
    CAN predict exactly whate the data you want is going to be because
    there is no conversion. And I and just very comfortable with xml.
    Tracy

  • How can I multiply all values of a 4-element array with all of its inverse values resulting to an array having all 16 products?

    I'm quite new to LabVIEW (v.8.0) and I'm trying to figure out the easiest way to have a 4-element array multiplied by its inverse values resulting in a 16-element array
    Array 1 values = 1, 2, 3, 4
    Array 1 inverse values = 1, 0.5, 0.33, 0.25
    Resulting array = (1, 0.5, 0.33, 0.25, 2, 1, 0.66, 0.5, 3, 1.5, 1, 0.75, 4, 2, 1.32, 1)
    Any advice would be appreciated. Thanks!
    Solved!
    Go to Solution.

    Attachments:
    mo.doc ‏27 KB

  • How can I make a row of cells containing 3-digit decimals, who's values resulted from calculations within the spreadsheet, appear as durations of minutes and seconds?

    Row 6 in this spreadsheet is the result of Row 2/Row 3 as evidenced by the formula listed while Cell Y6 selected. How can I make the values in this row appear as durations of minutes and seconds rather than 3-digit decimals? For example, rather than appearing as 9.84 I would like the value of Cell Y6 to appear as 9:50 or 9min 50sec. (obviously .84x60seconds 50 seconds). I tried changing the cell formats from "number" to "duration," but no change is made. Using the "duration" format does however work if I am manually entering the decimal value into the cell rather than allowing it to result from another caluclation within the spreadsheet. Is there a solution to this within Numbers '09? You can see why I would want the "pace" displayed in minutes and seconds. Thanks in advance!
    Ryan

    Hi Ryan,
    You wrote:
    "The problem is that my "Distance" is a row of automatically generated values resulting from ((Row1/60)*Row 6). Changing the format of Row 1 to minutes causes row two to be expressed as a duration, which obviously it shouldn't because it is a distance. The spreadsheet has to be designed so that all I have to manually input on each entry are Row 1 Values (Time) and Row 6 Values (Average Pace). The rest of the cells must be automatically poulated as a result of formulas."
    I'm assuming that where you say "Row 1" in this you mean "Row 2", which is labeled "Time" in the example in the OP.
    In the original post, you presented a formula from cell Y6. Replacing the Header labels in that formula's cell reference with the Addresses of the referenced cells, the formula was:
    Y6: =Y2/Y3
    In this post, you are saying that Y6 contains entered data: "...all I have to manually input on each entry are Row 1 Values (Time) and Row 6 Values (Average Pace).
    Which is correct?
    Regards,
    Barry

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • Query resulting Incorrect values

    Hello ALL.
    I need your suggestions on this issue.
    I have a Query on top of multiprovider which is on top of 6 cubes. In the query one RKF is resulting wrong values for Unassigned WBS Element Hierarchy.
    <u><b>RF: Forecast amount</b></u>
    0amount, Version:01, Vtype:20,Company Code:100,Fiscyear=2008 and Posting Period=1-12.
    Query resulting: 68,000 and Where as Multi prvider has only 2 rows satisfying the above Restrictions and giving 13,000.
    These wrong values are only for Unassgined Nodes of WBS Element.(Rows) Other node values are correct.
    I am not sure where it is getting these values?
    Kindly suggest.
    Thanks,
    Geetha
    <u></u>

    Can you chk if you have the values in the multiprovider?

  • How to hide value "result" on chararcteristic?

    Hi,
    When I am running Ad Hoc report on ODS I get in the first row result calculating all rows.
    With key figures it's okey, because i get summation of all rows, but with characteristics I get value "RESULT".
    I want to see only value for summation and where the characteristics are I don't want to see value "RESULT".
    I can only get that if I put key figure in the last column, but I want to put it somewhere in the middle.
    Any ideas?
    Regards,
    Uros

    Hi
    In query designer -> Go to change query ->Go to characteristic-> right mouse click-> properties ->Supress result rows -> Here select always.
    Do this for all characteristics except the first characteristic (top most in ROws section), otherwise you will not get Result at all.
    Hope this helps
    Regards
    Pradip

  • Result recorded values not appearing in printing the Inspection lot

    Hi all ,
    Using QC21 i am printing the Inspection lot  but the Result recorded values  are not appearing in printing the Inspection lot .
    while creating the certifacte  profile i had maintained the MIC for which i had saved as Summary for recording . if i change this to Orginal value it says that this doesnt exist in the Inspection plan .
    can somebody help me on this .
    thanks ,
    ksr

    Hi
    1.Make sure that you are using same MIC in Task list & certificate.
    2.make sure that you have done RR & taken UD.
    3.make sure that MIC is reference MIC.
    4.Make sure that profile is attached to material
    Regards
    Sujit

  • How to deselect query property 'suppress repeated key values'

    hj gurus,
    In BEx analyser there is a query property 'suppress repeated key values' which can be de-selected.
    regards,
    Preety

    Hello preety.
    Is simple.
    In BEx query designer push the button designated by "query properties" (the 13 button from left to right).
    Go to the tab "Display" and mark the second option "Hide Repeated Key Values"
    And there you go.
    Please assign points.
    Diogo.

  • Result Row value Issue

    Hi All,
    I have created a query which has multiple selection & formula in it. One of my formula is not working properly.
    Description of the issue:
    Key figure is "no. of Shipment"
    A calculated key figure "Total no of Shipment" is capturing the result row value of "No of Shipment".
    But some time it doesn't work as expected. I don't know why.
    For example if I select a week range then it dosen't work. I have used the "Total no of Shipment" in no. of other calculated key figure for calculation.
    Meaning for %On-Time = (On-Time A%Total no of Shipment)
    Below query is filter by fiscal week =Result
    Plant|FiscalWeek|NoofShipments|Totalnoof Shipments|%OnTm 
    =====       ======   =========  ==========    ========
    A  |        Result  |     98    |    78    |       104.10 %     
    Here  "Total no. of Shipment" should be 98 but is not able  to pick up the Result value  & it getting 78...I don't know from where it get the number.                                                    
    Please let me know if any body has faced similar case or is there any OSS note to fix the issue.
    Thanks
    Mahendra

    Hi Rishi,
    I tried as per you're suggestion. It didn't work.
    See my key figure is "No.Of Shipment"  & formula is
    "Total no. of Shipment" = SUMCT (No.Of Shipment)
    So whenever the result row of "No.Of Shipment" changes then "Total no. of Shipment" should pick up the value.
    Please let me know if you have any other solution.
    Thanks
    Mahendra

  • Get Reporting Statistics: What resulting statistic values?

    Cisco CRA Editor 3.5(3)
    In the script we are doing a " Get Reporting Statistics " step to get the agent state
    What resulting statistic values?
    "Ready" does not approach

    Create a String variable to store the agent state and set Result Statistic in the Get Reporting Statistic step to this variable. You can then reference this variable in future steps such as If AgentState == "Ready".
    Hope this helps. If so, please rate the post.
    Brandon

  • Can the newText property detect when a value is deleted?

    i'm writing a script in a text field that runs from the change event:
    ]var myValue = xfa.event.newText;
    ]oSubform.textField.rawValue = ScriptObject.myFunction(thisValue);
    it runs fine when an actual value is passed to the function. my problem is that i also need the function to run when a value is deleted from the text field. can the newText property detect when a value is cleared via the delete / backspace key?
    i know i can run this from the calculate event but i would rather not because the text field running the script is in a repeating subform that spans multiple pages. previous attempts to fire off the function from the calculate event has caused significant slow down in processing.

    justin,
    good catch on the thisValue being passed instead of myValue. note to self: need to work on attention to details...
    anyway, i re-examined my function to see what errors may be happening but i'm stumped. here's the gist of what the function's supposed to do:
    function myFunction(myValue) {
    ] if (myValue == null) {
    ]] return "None";
    ] } else {
    ]] if (myValue == 1) {
    ]]] return myValue + " day off";
    ]] } else {
    ]]] return myValue + " days off";
    when i delete the value being entered into the text field that calls the function, the function returns " days off" instead of "None". what am i missing here?

  • Can i store the Result set values as a Session variable

    hai,
    I want the result set values of a query to be used many times and I want the same resultset between different page calls.
    I want all those records fetched from the database to be available in the next page with out refetching from the database.
    can any one help me out. its very urgent.....
    Thanks and regards,
    Ravikiran
    mail to me at : [email protected]

    "can i store the Result set values as a Session variable "
    Practically Yes u can
    but u want be able to accesses it in other pages
    u can try it and see
    the other thing u can do is store the values from the resultset in a object say vector and put vector in seesion and u can use this any where
    for e.g
    Vector v=new Vector();
    While(rs.next())
    v.addElement(rs.getString(1));
    v.addElement(rs.getString(2));
    session.putValue("myVector",v);
    now where u want to get it do this
    Vector myvec=(Vector)session.getValue("myVector");
    do do futher

  • Negating a value results in only approximate negative

    I've run into a somewhat confusing situation.
    The following short and simple VBA macros was added to an existing large VBA project that I created: the project works well.
    I've managed to make this code work, but I can't figure why the 'commented' line does NOT do the job.
    The code is designed to take the value from a cell in the worksheet and place the exact negative of that value in the empty cell immediately below. The cell below will, by design, be empty and available for the negated value. All values in the spreadsheet
    will have been entered as dollar and cents values [i.e.  49.66, 20.00 etc.] Simply negating a value such as 49.66 will show up in the spreadsheet as -49.66 (cells are formatted as currency) but the actual value will be something like 49.6599322 etc. While
    this is not a serious problem... the values appear correctly in the sheet, I would not want to sum the values since the net sum will NOT be zero. [These will in effect be a number of these reversals in a column along with various other values].
    The code for the routine is as follows:
    Sub Neg_Amt()
    ' Neg_Amt Macro'
    ' Keyboard Shortcut: Ctrl+n
    ' Reverses the value of the cell... cell below must be empty
    Dim r, c As Integer
    Dim x As Single
    x = 0
    r = ActiveCell.Cells.Row
    c = ActiveCell.Cells.Column
    x = ActiveCell.Value
    Cells(r + 1, c).Value = -ActiveCell.Value       'use this approach rather than -x, gives exact value whereas -x seems to be not
    ' '   Cells(r + 1, c).Value = -x                       'commented out   ... this is the problem line yielding unexpected
    results    
    End
    End Sub
    If anyone could explain why the simpler approach x= -x does not work, I would appreciate your help.
    Thanks  IAFxl

    Have a look at the following url. Quite a good explanation.
    http://stackoverflow.com/questions/12680609/excel-2007-vba-calculations-wrong
    Also try Dim x as Currency      I understand that this is designed to alleviate the problem. In the following example at the above URL it works if you change it to Currency.
    Example edited since initial post.
    Sub test()
    Dim me_wrong As Double
    me_wrong = 1000 - 999.59
    MsgBox me_wrong
    Dim me_correct As Currency
    me_correct = 1000 - 999.59
    MsgBox me_correct
    End Sub
    Regards, OssieMac

  • Value mapping : target value need to be blank

    Hi,
    I have a requirement like below (just example).
    Source                        Target
    A                                 Z
    B                                 Y
    C                                 X
    N                                 BLANK or ""
    When I did this using value mapping it works fine for all values except for source value 'N'.
    When the source is N then the target should have value space or blank. Is this not supported by value mapping?
    For value N, do i have to explicitly check 'if value N then make it blank'?

    > For source value N I am getting target as N though in value mapping I have mentioned the target as blank.
    This is standard behavior of value mapping when any value is not present in value mapping table then it return the input value as it is. So this means when you declare N with a bank value as result then value mapping won't consider it as an valid entry in the value mapping table. So now you have to take care of N explicitly.

Maybe you are looking for

  • Default to wrong address

    The Mail system has memorized email addresses that are out of date or that I don't want to use. When I type in a name or group list, it defaults to the wrong address. In one case I have a group name in my address book that I cannot get it to default

  • Billing Tax Invoice

    Hi, I'm just work in SAPSCRIPT for Tax Invoice which is copy from RVINVOICE01. 1) Just for Line Item, how can i get values for - order quantity, deliver quantity, unit price (exclude GST), total value (exclude GST). 2) for total section: how can i ge

  • Issues opening attachments 800w

    I have a 800w with Windows mobile 6.1 connecting to a 2003 Exchange SP2 server.  Everything is syncing just fine with active sync but when I try to open a attachment I get nothing.  It looks like its downloading but never turns the icon to a real ico

  • Code for merging cells

    what is the code for merging cells ? to create a shortcut ?

  • HELP: Using my video iPod with iTrip/Mac OXS 10.3.9

    I just bought the new iPod and one of the main reasons i bought it was so that i could listen to music in my car. I bought iTrip along with the iPod but it isn't compatible. Someone suggested that i could use a cassette tape adapter but i dont have a