Thursday Oct 14, 2010

Java Pass - Training & Certification by Oracle University

UPDATE: This offer is NO longer valid.

The Java Pass is a new offering from Oracle University and is a flexible education subscription program that enables you to attend its top ten Java courses in a live, virtual format for one year at an extremely discounted rate. It also includes one certification voucher so you can become Java certified.

There are several Java SE 6 and Java EE 6 courses available as part of this offering.

Hear all about this course in this short video introduction:

What are you waiting for ? Stretch your training $$ and sign up today!

Visit for more details.

UPDATE: This offer is NO longer valid.

Technorati: oracle university education javapass javaee6 javase6 courses training certification

Wednesday Apr 30, 2008

OSX #8: Java SE 6 U5 on Mac OS X Leopard

Yesterday, Apple released Java SE version 1.6.0_05 for 64-bit Intel-based Mac OS X 10.5.2 or later. Download it here!

It's restricted to 64-bit machines and Charles is unhappy about it. Hopefully, they'll release a 32-bit version as well.

Type "sw_vers" in a terminal to check the Mac OS X version as shown below:
~ >sw_vers
ProductName:    Mac OS X
ProductVersion: 10.5.2
BuildVersion:   9C31
Alternatively, "About This Mac" in the Apple menu shows you the version as well as shown below:

Anyway, after verifying the system requirements, download 57MB bundle and install it following the standard instructions.

And now successfully installed:

It gets installed in "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0" and shows the version number as:

/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin >./java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)

The default Java version can be changed by using "Java Preferences" as shown below:
/Applications/Utilities/Java >./"Java Preferences"
The following window shows up:

Pick the version of your choice and that should get you going!

These are the days before JavaOne and all my demos on this machine have been tested using the default J2SE 5. But I'll play with the new release after JavaOne anyway :)

Do you know sign up for GlassFish Day is FREE and gives you access to JavaOne pavilion as well ? Do it now!

A complete archive of all Mac OS X tips on this blog are available here.

Technorati: osxtips mac leopard javase6 javase jdk

Friday Jan 11, 2008

Java SE 6 Update 4 is released - "Good Riddance" with JAX-WS Endorsed

Java SE 6 Update 4 is now released. Download it here.

If you are a Metro user (either JAX-WS or WSIT) then this is a milestone release for you because it includes JAX-WS 2.1 API in the rt.jar. This means that, as a user, you no longer you need to copy JAX-WS or JAXB API jars in JAVA_HOME/jre/lib/endorsed as described here, here and here. Hurrah!

After you have downloaded and installed JDK 1.6 U4, java -version shows:

java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

wsgen -version shows:

JAX-WS RI 2.1.1 in JDK 6

wsimport -version shows:

JAX-WS RI 2.1.1 in JDK 6

Additionally, you can also verify by greping for class in JAVA_HOME/jre/lib/rt.jar. This is a new class introduced in JAX-WS 2.1.

Now after you've installed Java SE U4, you can download Metro 1.1, set JAVA_HOME to point to this new Java SE installation and you can easily import a WSDL as:

wsimport -d temp http://localhost:8080/MetroWithJavaSE6/HelloService?WSDL
parsing WSDL...

generating code...

compiling code...

If you try to import the same WSDL with an earlier release of Java SE 6, then you'll see the error message:

You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API. Use the endorsed standards override mechanism (, or use -Xendorsed option.

We hope this will make your life simpler :)

Metro 1.0.1 is anyway baked in GlassFish v2 UR1. You can override it with Metro 1.1 as described in TOTD #21.

Technorati: webservices metro jax-ws glassfish endorsed javase6 jdk

Monday Jun 18, 2007

Tango on JavaSE 6

Fabian explained how WSIT features can be configured on Java SE 6 Endpoint API exposed as part of JAX-WS 2.1. In this blog, I start with a Reliable Messaging-enabled endpoint developed using NetBeans IDE 5.5.1 and WSIT plug-in and then provide detailed steps, along with code, to deploy it in Java SE 6.

  1. Create a Reliable Web service endpoint using WSIT plug-in and NetBeans 5.5.1 by watching this screencast.
  2. Download and install WSIT Milestone 5. Copy webservices-api.jar in Java SE 6 'jre\\lib\\endorsed' directory.
  3. All the capabilities enabled at an endpoint, such as Reliable Messaging for this one, are stored in the WSIT configuration file. In NetBeans IDE, expand your Project, 'Web Pages', 'WEB-INF'. The configuration file be named something similar to 'wsit-server.HelloWebService.xml' following the format 'wsit-<packageName>.<ServiceName>.xml'. Here is how the config file looks like:
    <?xml version="1.0" encoding="UTF-8"?> <definitions
    xmlns:soap="" name="HelloWebServiceService" targetNamespace="http://server/" xmlns:tns="http://server/" xmlns:wsp="" xmlns:wsu="" xmlns:wsaws="" xmlns:wsrm="">
    <message name="sayHello"/>
    <message name="sayHelloResponse"/>
    <portType name="HelloWebService">
    <wsdl:operation name="sayHello">
    <wsdl:input message="tns:sayHello"/>
    <wsdl:output message="tns:sayHelloResponse"/>
    <binding name="HelloWebServicePortBinding" type="tns:HelloWebService">
    <wsp:PolicyReference URI="#HelloWebServicePortBindingPolicy"/>
    <wsdl:operation name="sayHello">
    <service name="HelloWebServiceService">
    <wsdl:port name="HelloWebServicePort" binding="tns:HelloWebServicePortBinding"/>
    <wsp:Policy wsu:Id="HelloWebServicePortBindingPolicy">
    <wsaws:UsingAddressing xmlns:wsaws=""/>
    Copy this config file by the name wsit-server.HelloWebService.xml in META-INF directory in your classpath.
  4. The Web service implementation class looks like:
    package server;

    import javax.jws.\*;

    public class HelloWebService {
        public String hello(@WebParam(name="name")String text) {
            return "Hello " + text;
    As you see, this is a plain JAX-WS Web service endpoint class.
  5. The JAX-WS Endpoint code that starts the Web service endpoint looks like:
    package server;
    public class Main {
       private static final int PORT = 58888;
       private static final String HOST = "localhost";
       public static void main(String[] args) {
            Endpoint endpoint = Endpoint.create(new HelloWebService());
            String address = "http://" + HOST + ":" + PORT + "/";
            System.out.println("Endpoint hosted at ... " + address);
  6. The sequence of commands to deploy the endpoint is:
    "\\Program Files\\Java\\jdk1.6.0_01\\bin\\javac.exe" -d . server\\\*.java
    "\\Program Files\\Java\\jdk1.6.0_01\\bin\\wsgen.exe" -cp . server.HelloWebService
    java -classpath .;\\jax-ws-latest-wsit\\lib\\webservices-rt.jar server.Main
  7. And then you see the following output on the command prompt:
    java -classpath .;C:\\testbed\\jax-ws-latest-wsit\\lib\\webservices-rt.jar server.Main
    Jun 18, 2007 4:46:34 PM [] parse
    INFO: WSP1049: Loaded WSIT configuration from file:
    Jun 18, 2007 4:46:34 PM [] update
    INFO: WSTX-COMMON-2005: running in a non Java EE container; disable mapping of Container Managed Transaction EJB to WS-AT Policy assertions due to 'javax/ejb/TransactionManagement'
    Endpoint hosted at ... http://localhost:58888/

That's it, the endpoint now deployed at 'http://localhost:58888/MyService?wsdl' is Reliable Messaging enabled. This endpoint can be invoked using any of the methods shown here.

Technorati: webservices wsit jax-ws glassfish javase6


profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.

Java EE 7 Samples

Stay Connected


« July 2016