Thursday, February 26, 2015

Netbeans Update Center


1) Create a update.xml file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module_updates PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.6//EN" "http://plugins.netbeans.org/data/catalogue/autoupdate-catalog-2_6.dtd">
<module_updates timestamp="31/55/00/07/02/2015">

<module codenamebase="org.abc" distribution="http://abc.com/abcupdate/files/nbms/org-abc.nbm" downloadsize="21272" homepage="http://abc.com" license="8B813426" moduleauthor="Peter" needsrestart="true" releasedate="2015/02/24">
    <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.abc" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="110324" OpenIDE-Module-Java-Dependencies="Java > 1.6" OpenIDE-Module-Long-Description="Shows the line endings of the currently edited file in the statuc bar, and allows to change them," OpenIDE-Module-Module-Dependencies="org.netbeans.modules.editor/3 > 1.50.1.3.10.2, org.netbeans.modules.editor.lib/2-3 > 2.10.1.10.2, org.netbeans.modules.editor.lib2/1 > 1.28.1.2, org.openide.awt > 7.23.1, org.openide.filesystems > 7.38.1, org.openide.loaders > 7.16.1, org.openide.nodes > 7.16.1, org.openide.text > 6.30.1, org.openide.util > 8.6.1, org.openide.util.lookup > 8.3.1" OpenIDE-Module-Name="Show and change line endings" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Short-Description="Shows the line endings of the currently edited file in the statuc bar, and allows to change them," OpenIDE-Module-Specification-Version="1.2"/>
 
</module>

<module codenamebase="org.abc.def.db" distribution="http://abc.com/abcupdate/files/nbms/org-abc-def-db.nbm" downloadsize="41272" homepage="http://abc.com" license="8B813424" moduleauthor="Peter" needsrestart="true" releasedate="2015/02/24">
    <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.abc.def.db" OpenIDE-Module-Display-Category="Editing" OpenIDE-Module-Implementation-Version="110324" OpenIDE-Module-Java-Dependencies="Java > 1.3" OpenIDE-Module-Long-Description="Shows the line endings of the currently edited file in the statuc bar, and allows to change them," OpenIDE-Module-Module-Dependencies="org.netbeans.modules.editor/3 > 1.50.1.3.10.2, org.netbeans.modules.editor.lib/2-3 > 2.10.1.10.2, org.netbeans.modules.editor.lib2/1 > 1.28.1.2, org.openide.awt > 7.23.1, org.openide.filesystems > 7.38.1, org.openide.loaders > 7.16.1, org.openide.nodes > 7.16.1, org.openide.text > 6.30.1, org.openide.util > 8.6.1, org.openide.util.lookup > 8.3.1" OpenIDE-Module-Name="Show and change line endings" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Short-Description="Shows the line endings of the currently edited file in the statuc bar, and allows to change them," OpenIDE-Module-Specification-Version="1.2"/>
 
</module>

<license name="8B813426" url="http://abc.com/abcupdate/licenses/8B813426.license"/>
<license name="8B813424" url="http://abc.com/abcupdate/licenses/8B813424.license"/>
</module_updates>

Refer:
http://updates.netbeans.org/netbeans/updates/7.1.2/uc/final/distribution/catalog.xml.gz
(need to unzip file to get catalog.xml)

2) Create the nbm files for the respective modules
3) Place the nbm files in the respective folders specified above on the server
4) Define the Update Center in layer.xml and add code in Installer.java


layer.xml
...
        <folder name="AutoupdateType">
            <file name="org_doxa_update_center.instance">
                <attr name="SystemFileSystem.localizingBundle" stringvalue="org.doxa.Bundle"/>
                <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_key" stringvalue="org_doxa_update_center"/>
            </file>
        </folder>
</folder>

....



Set interval


-J-Dplugin.manager.check.interval=EVERY_STARTUP



http://wiki.netbeans.org/FaqPluginManagerCustomization#To_customize_Interval_of_Automatically_Check_for_Updates_.28since_NB6.1.29

Ref:
http://wiki.netbeans.org/FaqPluginManagerCustomization
https://blogs.oracle.com/rechtacek/entry/how_to_update_netbeans_platform


https://gist.github.com/alanhamlett/2a57ffb51f0850272d0d
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/overview-summary.html


Tuesday, February 17, 2015

Open Source Network Monitoring tool


Source:
http://www.infoworld.com/article/2884203/network-monitoring/best-open-source-monitoring-tools.html


http://www.zabbix.com/
http://www.observium.org/
https://www.icinga.org/
http://www.cacti.net/

Monday, February 9, 2015

Set property for DocumentBuilderFactory


Source
http://lostinheapspace.blogspot.sg/2008/12/specify-documentbuilderfactory-with.html


System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();

Netbeans Platform : WIndows Mode

https://ui.netbeans.org/docs/ui/ws/ws_spec-netbeans_ide.html
https://platform.netbeans.org/tutorials/nbm-quick-start.html#window
http://wiki.netbeans.org/DevFaqWindowsMode
http://wiki.netbeans.org/DevFaqWindowsTopComponent
http://wiki.netbeans.org/DevFaqWindowsInternals
http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/doc-files/api.html#find
http://bits.netbeans.org/dev/javadoc/org-openide-windows/org/openide/windows/Mode.html

http://netbeans.dzone.com/news/secrets-netbeans-window-system

https://blogs.oracle.com/geertjan/entry/window_system_in_7_1

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/tutorials/WordProcessor

App Privacy

http://www.appprivacy.net/

Thursday, February 5, 2015

Raspberry Pi Model B+ pins

http://pi4j.com/pins/model-b-plus.html

Wednesday, February 4, 2015

GPIO over Internet (Raspberry Pi)

http://www.instructables.com/id/Web-Control-of-Raspberry-Pi-GPIO/
http://forums.connectedly.com/raspberry-pi-f179/how-controlling-gpio-pins-via-internet-2884/

http://www.raspberrypi.org/documentation/remote-access/web-server/apache.md
http://www.raspipress.com/2012/09/tutorial-install-apache-php-and-mysql-on-raspberry-pi/
http://www.wikihow.com/Make-a-Raspberry-Pi-Web-Server

Tomcat
http://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/05/02/tomcat-on-my-pi
https://heirloomcomputing.zendesk.com/entries/21669897-Running-a-Web-Application-on-Raspberry-Pi
https://alextheedom.wordpress.com/raspberry-pi/installing-java-7-and-tomcat-7/


https://code.google.com/p/webiopi/
http://raspberrywebserver.com/gpio/


http://computers.tutsplus.com/tutorials/take-control-of-your-raspberry-pi-using-your-mac-pc-ipad-or-phone--mac-54603

Debugging Drools

http://planet.jboss.org/post/debugging_drools_rules
http://stackoverflow.com/questions/19951880/drools-how-to-find-out-which-all-rules-were-matched
http://blog.lunatech.com/2011/09/02/logging-debug-drools

http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3080

http://blog.athico.com/2011/10/cookbook-how-to-test-rules-using-xunit.html

https://thomassundberg.wordpress.com/2012/10/11/jboss-drools-a-hello-world-example/

Java on Raspberry Pi

http://bluej.org/
http://www.bluej.org/raspberrypi/
http://pi4j.com/

Monday, February 2, 2015

Netbeans Classloaders

http://www.java-tips.org/other-api-tips/netbeans/what-classloaders-are-created-by-the-module-s.html

http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html