Quantcast

NetBeans update centre from local path

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NetBeans update centre from local path

manozz91
I have a Netbeans platform application and trying to implement autoupdate service,

So far am able to achieve updating from a URL by updating Bundle.properties and layer.xml

Like below,

Bundle.properties

Code:
update_center=file://xyz.com/NbUpdateCenter/updates.xml

......
......
Services/AutoupdateType/update_center.instance=Update Center



layer.xml

Code:
<folder name="Services">
        <folder name="AutoupdateType">
            <file name="update_center.instance">
                <attr name="displayName" bundlevalue="images.Bundle#Services/AutoupdateType/update_center.instance"/>
                <attr name="enabled" boolvalue="true"/>
                <attr name="instanceCreate" methodvalue="org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider"/>
                <attr name="instanceOf" stringvalue="org.netbeans.spi.autoupdate.UpdateProvider"/>
                <attr name="url" bundlevalue="images.Bundle#update_center"/>
            </file>
        </folder>
    </folder>



What i am trying to do is,

Keep the required files in local path and update from there.

Something like this,


Code:
update_center=file://C:/NbUpdateCenter/updates.xml



It throws , INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL file://C:/NbUpdateCenter/updates.xml failed (java.net.UnknownHostException: C)


Is it possible to update from local path if all required files are available. or how should i do this?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NetBeans update centre from local path

Randall Wood
You need three slashes before the drive letter, not two.

file:///C:/... is (as I understand it) the same as file://localhost/C:/...
so file://C:/... is looking for the file ... on the host named C:


Randall Wood
Alexandria Software

On May 3, 2017, at 04:10, manozz91 <[hidden email]> wrote:

I have a Netbeans platform application and trying to implement autoupdate service,

So far am able to achieve updating from a URL by updating Bundle.properties and layer.xml

Like below,

Bundle.properties

Code:
update_center=file://xyz.com/NbUpdateCenter/updates.xml

......
......
Services/AutoupdateType/update_center.instance=Update Center



layer.xml

Code:
<folder name="Services">
       <folder name="AutoupdateType">
           <file name="update_center.instance">
               <attr name="displayName" bundlevalue="images.Bundle#Services/AutoupdateType/update_center.instance"/>
               <attr name="enabled" boolvalue="true"/>
               <attr name="instanceCreate" methodvalue="org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider"/>
               <attr name="instanceOf" stringvalue="org.netbeans.spi.autoupdate.UpdateProvider"/>
               <attr name="url" bundlevalue="images.Bundle#update_center"/>
           </file>
       </folder>
   </folder>



What i am trying to do is,

Keep the required files in local path and update from there.

Something like this,


Code:
update_center=file://C:/NbUpdateCenter/updates.xml



It throws , INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL file://C:/NbUpdateCenter/updates.xml failed (java.net.UnknownHostException: C)


Is it possible to update from local path if all required files are available. or how should i do this?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NetBeans update centre from local path

bruehlicke
In reply to this post by manozz91
On my system it works when using the following syntax


>  file:/C:/NbUpdateCenter/updates.xml





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NetBeans update centre from local path

Neil C Smith-2


On Fri, May 5, 2017 at 1:47 PM bruehlicke <[hidden email]> wrote:
On my system it works when using the following syntax
>  file:/C:/NbUpdateCenter/updates.xml

Yes, single slash (empty authority) should also be valid, although that fact seems to be missing from the Wikipedia link!?  Covered at https://tools.ietf.org/html/rfc8089#page-10

Best wishes,

Neil
--
Neil C Smith
Artist & Technologist

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org
Loading...