Welcome To Snipplr


Everyone's Recent Java Snippets Tagged java



How to access the build number in the WAR file (generated by the Maven build number plugin) from Java.
0 559 posted 14 years ago by ff1959
0 632 posted 14 years ago by ff1959
This gives the absolute path for the file log4j.properties
1 513 posted 14 years ago by arunpjohny
this simple snippet compiles a Java source file.
2 874 posted 14 years ago by akostajti
A Swing ActionListener that opens a JFileChooser and returns the selected file.
1 842 posted 14 years ago by liqweed
0 476 posted 14 years ago by ff1959
2 711 posted 14 years ago by angusdev
Simple way to configure the JVM to use the proxy in the network
1 579 posted 14 years ago by neozilon
0 438 posted 14 years ago by snipleritesteri
Save/Load or.. Write/Read or.. Store/Retrieve Private Key/Public Key to/from disk/file :D
0 10621 posted 14 years ago by geekiuscaesar
0 322 posted 14 years ago by adammika
*save as proxy.jsp and put it in your servlet container *consider using other methods to circumvent XSS: JSONP, dojox.io.xhrWindowNamePlugin, etc.
1 1031 posted 14 years ago by stoyan
Rather than hard-coding values shared between classes/methods/servlets, it's good to use content params in web.xml.
0 581 posted 14 years ago by sunkist
К этому моменту у вас уже должно быть достаточно знаний, чтобы сериализовать объект. Но как работает этот механизм? Алгоритм сериализаци...
0 444 posted 14 years ago by beresovskiy
i love those ternary expressions, they really make things clear, don't they? found in org.eclipse.jface.action.Action
0 348 posted 14 years ago by guetux
Tags: C3P0, datasource, spring, database, java
1 1743 posted 14 years ago by mahome
0 442 posted 14 years ago by resurge
1 701 posted 14 years ago by walokra
Simple Mail Example. Tags: SMTP, Mail, Java [JavaMail (Sun)](http://java.sun.com/products/javamail/) [JavaMail (Galileo)](http://openbook.galileocomputing.de/javainsel8/javainsel_18_012.htm#mj2a4110a634c82a3f676d8f87a50d6567)
1 713 posted 14 years ago by mahome
Connects to a web page, reads in the content and strips whitespace.
2 711 posted 15 years ago by gdvickery
Running a btrace script takes two separate steps by default: 1. Running jps to get the Java process ID. 2. Running btrace on the ID. A simple awk script can merge the two into a single step.
0 594 posted 15 years ago by narkisr
Some java application do not get focus or have strange behaviours under no standard Window Managers like Awesome.
0 473 posted 15 years ago by escalant3
An immutable (a new object is created for each change) Java class builder pattern example.
0 583 posted 15 years ago by narkisr
The returned file will either contain the folder from where your program is running or the executable jar file, if your program is an executable jar. I'm using `Main.class` because this code is in my main method (which is in the class 'Main'). You...
0 504 posted 15 years ago by resurge