background preloader

Archive: Java[tm] Technology Products Download

Archive: Java[tm] Technology Products Download
The Oracle Java Archive offers self-service download access to some of our historical Java releases. WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production. Only developers and Enterprise administrators should download these releases. Downloading these releases requires an oracle.com account. For current Java releases, please consult the Oracle Software Download page. Current update releases for JDK 6 and JDK 7 are available for support customers. For more information on the transition of products from the legacy Sun download system to the Oracle Technology Network, visit the SDLC Decommission page announcement. Java SE Java SE 8 Java SE 7 Java SE 6 Java SE 5 Java SE 1.4 Java SE 1.3 Java SE 1.2 Java SE 1.1 JRockit Family Java SE Tutorials JDK 1.3 Documentation JDK 1.4.2 Documentation JVM Technologies jvmstat Java EE Java Web Services Developer Pack

Debug Java applications remotely with Eclipse Remote debugging can be useful for application development, such as developing a program for a low-end machine that cannot host the development platform, or debugging programs on dedicated machines like Web servers, whose services cannot be shut down. Other examples include Java applications running with limited memory or CPU power, such as mobile devices, or developers wanting to separate the application and development environments, etc. Prerequisites If you don't have it already, download Eclipse V3.4 (Ganymede). In Ganymede, the socket listening connector has been added to the Remote Java Application launch-configuration type. To use remote debugging, Java Virtual Machine (JVM) V5.0 or later must be used, such as IBM® J9 or Sun Microsystems' Java SE Development Kit (JDK). JPDA introduction Sun Microsystems' Java Platform Debugger Architecture (JPDA) technology is a multitiered architecture that allows you to debug Java applications in all situations easily. Listing 1. -Xdebug transport

Write thread-safe servlets If you write Web applications in Java, the servlet is your best friend. Whether you write Java ServerPages (JSP) or plain servlets, you are both at the servlet's mercy and the lucky recipient of what the servlet has to offer. So let's look closer at the servlet. As we know, when building a Website, we are primarily interested in the servlet's two methods: doPost() and doGet(). A thread is a single execution process; in other words, an individual, sequential flow of control within a program. So what do we mean by thread-safe, you ask? What happens when Thread-A examines variable instanceVar? Your servlet container is no dummy A lot of magic happens between the Web browser's HTTP request and the code we write within the doGet() and doPost() methods. The servlet's lifecycle is an important topic, and thus, you will find it on Sun's Java certification exam. The servlet container not only handles the servlet's lifecycle, it also does a fine job at it. Are you thread-safe?

Use static imports rarely Static imports allow the static items of one class to be referenced in another without qualification. Used indiscriminately, this will likely make code more difficult to understand, not easier to understand. Example import java.util.*; import static java.util.Collections.*; public final class StaticImporter { public static void main(String... aArgs){ List<String> things = new ArrayList<>(); things.add("blah"); List<String> syncThings = synchronizedList(things); } } An example in which a static import is likely acceptable is a constants class. More generally, a business application might define a constants class, and import it statically. SSL Connection with Java « Ady Wicaksono Daily Activities Here is an example Java code to create SSL connection between you and HTTPS (taken from You can compile & run it: $ javac HTTPSClient.java $ java HTTPSClient login.yahoo.com But wait, if HTTPS server give you certificate which is signed by “unknown” Certificate Authority ( I mean not signed by approved CA like Thawte, Verisign) then you will get this error javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target or something like it javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found However, I found the fast solutions (I forget where was it, but I started from Google) so all certificates (signed and unsigned) become accepted and the exception disappears. Like this: Like Loading...

Detect internet Connection using Java Compiling and Running Java Programs Compiling Java Source Code Before the Java virtual machine (VM) can run a Java program, the program's Java source code must be compiled into byte-code using the javac compiler. Java byte-code is a platform independent version of machine code; the target machine is the Java VM rather than the underlying architecture. % javac -g Foo.java The -g command line option is optional, but we recommend using it as it makes debugging easier. If there are no errors in your source file, the Java compiler will produce one or more .class files (one .class file for each class defined in the Foo.java source file). Every public class that you write must be in a separate .java file where the first part of the file name is identical to the class name.

Related: