[jbosstools-issues] [JBoss JIRA] (JBIDE-20510) org.jboss.tools.jmx.local.ProcessInformationStore doesn't handle spaces in the java.home path

Rob Stryker (JIRA) issues at jboss.org
Wed Sep 9 18:50:00 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-20510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107208#comment-13107208 ] 

Rob Stryker commented on JBIDE-20510:
-------------------------------------

I'm a bit confused here.  I've created a simple example which I ran on windows:  http://fpaste.org/265459/83878914/

In this example, I basically run  java -version  via the two methods:  as one command (as is currently in ProcessInformationStore) and via a cmd array (as suggested in this jira). 

And yet both seem to work just fine. I'm not escaping the spaces or anything... so I don't see why I wouldn't be getting the same failure here that you are.  Any ideas? 

>  org.jboss.tools.jmx.local.ProcessInformationStore doesn't handle spaces in the java.home path
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-20510
>                 URL: https://issues.jboss.org/browse/JBIDE-20510
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jmx
>    Affects Versions: 4.3.0.Beta2
>         Environment: Windows 7 x64, Eclipse Mars (4.5.0), Java 1.8.0u51
>            Reporter: Daniel Atallah
>            Assignee: Rob Stryker
>
> org.jboss.tools.jmx.local.ProcessInformationStore.loadProcessStore:97 should either use the Runtime.getRuntime().exec(String[]) method to deal with Java installation locations containing spaces.
> In my case the {{java.home}} system property points to {{"C:\Program Files\Java\jdk1.8.0_51"}}, which I think would be pretty normal on Windows.
> {noformat}
> java.io.IOException: Cannot run program "C:\Program": CreateProcess error=2, The system cannot find the file specified
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
>         at java.lang.Runtime.exec(Runtime.java:620)
>         at java.lang.Runtime.exec(Runtime.java:450)
>         at java.lang.Runtime.exec(Runtime.java:347)
>         at org.jboss.tools.jmx.local.ProcessInformationStore.loadProcessStore(ProcessInformationStore.java:97)
>         at org.jboss.tools.jmx.local.ProcessInformationStore.refreshProcessInformationStore(ProcessInformationStore.java:64)
>         at org.jboss.tools.jmx.local.ProcessInformationStore$1.run(ProcessInformationStore.java:135)
>         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
>         at java.lang.ProcessImpl.create(Native Method)
>         at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:137)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
>         ... 7 more
> {noformat}
> I'm note sure what the impact is - I don't necessarily notice anything not working.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list