by jNayden | Jul 18, 2014 | Aggregated, Uncategorized
My Presentation about “Beyond new things in Java” which I held at javaday.bg event, organized by trader.bg. (IN BULGARIAN) And this is the presentation only: Lecture from javaday.bg by Nayden Gochev from Nayden Gochev My Presentation about “Beyond new things in Java” which I held at javaday.bg event, organized by trader.bg. (IN BULGARIAN) And this is the presentation only: Lecture from javaday.bg by Nayden Gochev from Nayden...
by jNayden | Jul 18, 2014 | Aggregated, Uncategorized
My Presentation about “Beyond new things in Java” which I held at javaday.bg event, organized by trader.bg. (IN BULGARIAN) And this is the presentation only: Lecture from javaday.bg by Nayden Gochev from Nayden...
by jNayden | Apr 22, 2014 | Aggregated, Uncategorized
Today I found spring loaded (https://github.com/spring-projects/spring-loaded) in short this is a java agent that enables class reloading of already running VM. Simply this means zero deployment time (in many cases). It is like a free and open source alternative of JRebel. Spring Loaded allows you to add/modify/delete methods/fields/constructors. The annotations on types/methods/fields/constructors can also be modified and it is possible to add/remove/change values in enum types. There is a preliminary java8 support. There is also another project DCEVM ( which is also great but supports only till JRE 6 update 26). More info here http://ssw.jku.at/dcevm/ But lets stop speaking and show you how it works. In short you just need to pass the agent when starting the vm and that’s it. >java -javaagent:D:/Downloads/springloaded-1.2.0.BUILD-20140409.201438-12.jar -noverify org.gochev.MainClass I am using this Build since I am running Java 8 and this is currently the latest . The code I in my simple app is the following: A POJO like this : package org.gochev;public class DynamicReloadedClass { private int age = 30; public int getAge() { return age; } public void setAge(int age) { this.age = age; }} and a MainClass like this: package org.gochev;import java.util.Scanner;public class MainClass { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { while (true) { System.out.println("test " + new DynamicReloadedClass().getAge()); scanner.next(); } } }} So I can change the DynamicReloadedClass while the main method in the MainClass is looping. You can see this in action here : http://www.screencast.com/t/KIFIxv7j Awesome … and free ! Today I found spring loaded (https://github.com/spring-projects/spring-loaded) in short this is a java agent that enables class reloading of already running...
by jNayden | Apr 22, 2014 | Aggregated, Uncategorized
Today I found spring loaded (https://github.com/spring-projects/spring-loaded) in short this is a java agent that enables class reloading of already running VM. Simply this means zero deployment time (in many cases). It is like a free and open source alternative of JRebel. Spring Loaded allows you to add/modify/delete methods/fields/constructors. The annotations on types/methods/fields/constructors can also be modified and it is possible to add/remove/change values in enum types. There is a preliminary java8 support. There is also another project DCEVM ( which is also great but supports only till JRE 6 update 26). More info here http://ssw.jku.at/dcevm/ But lets stop speaking and show you how it works. In short you just need to pass the agent when starting the vm and that’s it. >java -javaagent:D:/Downloads/springloaded-1.2.0.BUILD-20140409.201438-12.jar -noverify org.gochev.MainClass I am using this Build since I am running Java 8 and this is currently the latest . The code I in my simple app is the following: A POJO like this : package org.gochev;public class DynamicReloadedClass { private int age = 30; public int getAge() { return age; } public void setAge(int age) { this.age = age; }} and a MainClass like this: package org.gochev;import java.util.Scanner;public class MainClass { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { while (true) { System.out.println("test " + new DynamicReloadedClass().getAge()); scanner.next(); } } }} So I can change the DynamicReloadedClass while the main method in the MainClass is looping. You can see this in action here : http://www.screencast.com/t/KIFIxv7j Awesome … and free...
by admin | Jul 28, 2011 | Aggregated, Uncategorized
Добре дошли в новия сайт на Българската Java потребителска група!Welcome to BGJUG!
by jNayden | May 19, 2011 | Aggregated, Uncategorized
This is really the dumbest thing ever in linux, there are many many dumb things but this is the dumbest. Ultra trivial task you want to “find a specific string in a file content of specific file type starting from root folder” this is the easiest thing ever, it was not available in Windows XP/98 and because of that I was keeping one JBuilder which can search normally in any java file containing XXX in starting from this folder. But in Windows Vista / 7 this is done EASY just press F3! In Linux on the other hand it is a NIGHTMARE I was having a trivial task which takes… 10 seconds to search for a properties file which contains a default.session.timeout=600 which is a row in this file and this took me more then 30 mins because there are TONS of posts how this is done but none have worked there ware examples using grep, egrep whatever NOTHING is working total CRAP really. So in short I found it somewhere and I want to post it in order to have another POST in google which gives the answers. So In short: How to search for a file content in linux in specific file names starting from specific root folder. find . -name "*.properties" -print | xargs grep default.session.timeout=600 Which will give you all properties files which contains default.session.timeout=600 it doesn’t have to be the match the whole row you can search for just default.session which will give you all files which contains default.session. This command is typed in the folder that you want to start the search...
Recent Comments