Month: April 2017

[Solved] JRebel can’t reload jsp in netbeans of spring boot project

JRebel can’t reload jsp in netbeans of spring boot project, asked in jrebel forum but seems no one can answer. I finally found a way to fix it. Don’t execute the “spring-boot:run” goal, directly run your main class, this make jrebel able to reload jsp/css/class, just tested. No matter you put your static files in src/main/webapp or src/main/resources, it just works.

dont touch the jrebel.xml

read count : 56

SQL to convert all tables from MyISAM to InnoDB

This is the SQL to convert all tables to InnoDB, relace the word to your database name, then run the output again.


read count : 14

netbeans api to read bookmark line numbers

Below code can read out bookmark line numbers for netbeans. For Java project, the bookmark line number are stored in nbproject/private/private.xml. If it is maven project, the private.xml is not exist but this code still work, there must be some place to store the bookmark info but I just don’t know. These code has a weak point, it won’t read the latest line numbers unless you close the project/netbeans.

			Project project = NetbeansUtil.getProject();
			AuxiliaryConfiguration config = ProjectUtils.getAuxiliaryConfiguration(project);
			org.w3c.dom.Element element = config.getConfigurationFragment("editor-bookmarks", "", false);
			ModuleLib.log("element=" + element);
			if (element != null) {
				NodeList list = element.getElementsByTagNameNS("", "bookmark");
				for (int x = 0; x < list.getLength(); x++) {
					org.w3c.dom.Element enEl = (org.w3c.dom.Element) list.item(x);
					String lineNo = enEl.getTextContent().trim();
					ModuleLib.log("line no=" + lineNo);

read count : 11

Netbeans plugins, able to compile and build != able to install in a clean netbeans

People reported my minimal plugins can’t install in their netbeans. I concluded these:

1) able to compile and build NOT EQUAL to able to install in a clean netbeans
2) able to install your plugin in your netbeans NOT EQUAL to able to install in a clean netbeans

When you meet this error : Project depends on packages not accessible at runtime

Just add the library to in pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
        <description>Display the code minimap, programmer can overlook their code.</description>

read count : 27