Tag: java
All the articles & tech notes with the tag "java".
Articles
-
Statically analyze and programmatically modify compiled .class files without decompilation. Covers a practical example of changing a bytecode equality operator to alter program behavior, along with additional capabilities like method injection and code insertion.
-
A design pattern for implementing dynamic, user-configurable column layouts in JSP applications using Apache Struts, leveraging a singleton class to store per-user column preferences in the servlet container's Application Context.
-
Performance comparison of Java string concatenation methods — the + operator, String.concat(), StringBuffer.append(), and StringBuilder.append() through benchmarking with Perf4J and bytecode analysis.
-
Recursive file tree traversal in Java using NIO.2's FileVisitor and SimpleFileVisitor interfaces, including pattern-based file searching with PathMatcher, symbolic link handling via FileVisitOption, and traversal control through FileVisitResult.
-
Dynamically load and execute compiled Java classes from byte array using a custom ClassLoader, without writing physical class files to disk. Highlights use cases like license validation, encrypted class delivery, and secure remote code execution.
-
Monitoring a directory for file system changes using Java NIO.2 WatchService API introduced in JDK 7, offering a more efficient alternative to manual polling threads.