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 Preferences.app/Contents/MacOS >./"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 javax.xml.ws.Endpoint 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 (http://java.sun.com/javase/6/docs/technotes/guides/standards/), 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

Thursday Dec 14, 2006

Web services native support in Java6

A new thread started on TheServerSide prompted by Dims post on "Why bundling JAX-WS in Java6 was a bad idea!". Let me explain why I don't agree.

 I still remember JavaOne 2005 technical keynote getting applauds from everybody when bundling Web services in Java6 was announced. An approximate 5000 developer audience thrilled that Web services will be available natively in Java6.

JAX-WS 2.0 is a JCP standard (JSR 224) that enables Web services support in a standard way. Here are some of the salient features:

  • Supports SOAP-based and REST-based services
  • Supports both Java-first and WSDL-first programming model equally
  • Enables POJO-based Web services
  • Descriptor free programming
  • Uses industry proven JAXB RI for data binding
  • Integrated with NetBeans 5.5 hiding all the tools/config details
  • Tested extensively for interoperability

Mainly because of timing constraints, JAX-WS 2.0 (and not 2.1) was included in Java6. However the currently bundled JAX-WS implementation is very powerful and allows you to develop/invoke SOAP-based and REST-based services. If you want to enable different WS-\* specifications (such as WS-Security, WS-Reliable Messaging and WS-Secure Conversation) then you can download WSIT builds and configure them on Java6 (another blog on that later) and there by WSIT-ifying your Java6.

Web services and Scripting are the two most talked about features in Java6 as is evident by a short list of links below (there are many more):

In all, I strongly believe, more as a technology user, that adding basic Web services support to Java6 is the first step. There is always a balance between providing an out-of-the-box experience or asking them to download additional stuff and go through configuration. I believe in simplicity and that's what we have tried to achieve by adding Web services support in Java6. You'll see more sophisticated additions in the versions to come.

Technorati: Java6 JDK JAX-WS Web Services

About

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

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today