Thursday Feb 28, 2013

Java Tsunami on the Thames

London prepares for a surge of developer brainpower during the Devoxx UK conference on Tuesday and Wednesday, March 26th and 27th. Meet & Greet, global Java community, and Hackergarten are nice add-ons. Don't miss it - Register today

The fun really starts on Monday evening with an attendee Meet & Greet where attendees can relax, grab a drink and something to eat and, of course, meet fellow attendees and the speakers. 

In addition to U.K speakers, many international guests are scheduled, notably from the US. Twenty-eight user groups from across Europe are attending too. A veritable army of experts will be on hand to share their expertise with Devoxx attendees.  

Hackergarten takes place during the conference. There's no time limit; participants can stay and code for as long as they want. Just bring a laptop and write a plugin, a tutorial, a small feature, or a bug fix for a project that interests you alongside several open-source experts willing to share their knowledge. The organizers of two community projects called Adopt-a-JSR and Adopt Open JDK will be there to explain how to contribute to the future Java releases. 

Monday Feb 04, 2013

FOSDEM 2013



The annual Free Open-Source Developers' European Meeting took place last weekend in Belgium. The free event brought together 5,000 hackers from the open source community. There were 477 speakers and 488 sessions with a mix of keynotes, lightning talks, certification exams and developer rooms talks.


Tasha Carl, Java architect and the leader of the Brussels Java user group, wrote a blog about FOSDEM and the Free Java developer room. She mentioned Java talks and posted pictures making you feel as if you were there. "The Free Java dev room at FOSDEM is since many years the biggest OpenJDK meet-up around. You can not only see, but really high-five celebrities like – this year – Mark Reinhold, Chief Architect of the Java Platform Group at Oracle, Sean Coffey, Oracle JDK engineer and maintainer of OpenJDK 7u, Steve Poole, developer and evangelist working since ever  for IBM on the JVM, Simon Phipps, Andrew Haley, Charles Nutter, JRuby lead developer speaking about InvokeDynamic,…" she commented.


In another blog, Mani mentioned that "the OpenJDK topic has got massive coverage with 17 speakers, speaking and holding events covering various topics." Java community leaders including Martijn Verburg and Ben Evans were involved in the Java track. In addition to Brussels JUG, members of LJC JUG, CEJUG and others participated at the event.


In her blog, Heather VanCura shares the Java Community Process (JCP) presentation titled "JCP State of the Nation and Future Directions," as well as links to JCP.Next and the community program Adopt-a-JSR programs.


Friday Feb 01, 2013

The JCP Evolution!

Recent changes to the Java Community Process (JCP) program "focus on the way the organization itself is structured and organized" explained Patrick in this interview.  The changes will result from the implementation of three Java Specification Requests (JSRs). The first JSR, the JSR 348, makes the process more open and transparent to facilitate developers' participation. It was released a year ago and Heather witnessed increased transparency in projects,  additional participation and a simplified release process. "They are using public issue trackers and public discussion alias on projects. More people from the community are commenting and participating in the JSRs. The process of releasing final and maintenance releases is more agile," she commented.

She explained the different options for developers' participation in the JCP. Java user groups may become JCP members at no charge and contribute as a group. Individuals and user groups can contribute to the community initiative Adopt-A-JSR. Developers can give feedback on the transparency of a JSR process. Individuals, corporations and non-profit organizations (JUGs for example) can join the JCP. They then can comment on specs, join an expert group and become a spec lead





Information about the JCP program is available at jcp.org. Watch the recent presentation about Adopt-a-JSR with Martin Verburg and Java EE 7 JSR projects with Arun Gupta

Wednesday Jan 30, 2013

Nashorn, the JavaScript Implementation in Java 8

In this Interview, Marcus Lagergren, who works on the dynamic language team at Oracle, discussed the Nashorn project.  "Nashorn is the JavaScript runtime based on InvokeDynamic for the Java Virtual Machine (JVM)" he explains. The Nashorn project is now part of the OpenJDK

The performance is much better than its predecessor Rhino. "We totally blow it out of the water now that we have specific tools to run other things than Java on the JVM." Marcus commented. "The pluggability between JavaScript and Java is another good thing" he added.

His Devoxx talk about Nashorn is now freely accessible at Nashorn - implementing dynamic languages on the JVM
Marcus Lagergren's twitter handle is @lagergren. Nashorn blog has the latest on the project

Thursday Jan 24, 2013

OpenJDK, Adopt-A-JSR and Adopt OpenJDK Projects!

In two interviews, Martijn Verburg, leaders of the London Java user group and Cecilia Borg, Project Manager at Oracle explain the OpenJDK and two community projects Adopt-a-JSR and Adopt OpenJDK.  

"The Java Platform is huge and, to a lot of people, it is too big" explained Cecilia. "OpenJDK is divided into 22 different groups and 40 different projects to make it easy to participate." She recommends starting small by "subscribing to one of the mailing lists at openjdk.java.net" and contributing small bug fixes, for example.  It is important that contributors learn as much as possible and pick a project that feels right for them.


"The idea of Adopt-a-JSR is to have ordinary Java developers get involved with the creation of standards" indicates Martijn.  "Adopt-a-JSR is about Java EE and ME standards."  "The work on the Java language and the JVM is done as part of OpenJDK and Adopt OpenJDK projects," Verburg continues. He outlines how to start on those projects. Contributors can be individuals but also JUG leaders, who organize coding events to work on Java standards. 

Sunday Sep 30, 2012

The Java Specialist: An Interview with Java Champion Heinz Kabutz

Dr. Heinz Kabutz is well known for his Java Specialists’ Newsletter, initiated in November 2000, where he displays his acute grasp of the intricacies of the Java platform for an estimated 70,000 readers; for his work as a consultant; and for his workshops and trainings at his home on the Island of Crete where he has lived since 2006 -- where he is known to curl up on the beach with his laptop to hack away, in between dips in the Mediterranean.

Kabutz was born of German parents and raised in Cape Town, South Africa, where he developed a love of programming in junior high school through his explorations on a ZX Spectrum computer. He received a B.S. from the University of Cape Town, and at 25, a Ph.D., both in computer science.

He will be leading a two-hour hands-on lab session, HOL6500 – “Finding and Solving Java Deadlocks,” at this year’s JavaOne that will explore what causes deadlocks and how to solve them.

Q: Tell us about your JavaOne plans.

A: I am arriving on Sunday evening and have just one hands-on-lab to do on Monday morning. This is the first time that a non-Oracle team is doing a HOL at JavaOne under Oracle's stewardship and we are all a bit nervous about how it will turn out. Oracle has been immensely helpful in getting us set up. I have a great team helping me: Kirk Pepperdine, Dario Laverde, Benjamin Evans and Martijn Verburg from jClarity, Nathan Reynolds from Oracle, Henri Tremblay of OCTO Technology and Jeff Genender of Savoir Technologies.

Monday will be hard work, but after that, I will hopefully get to network with fellow Java experts, attend interesting sessions and just enjoy San Francisco. Oh, and my kids have already given me a shopping list of things to get, like a GoPro Hero 2 dive housing for shooting those nice videos of Crete. (That's me at the beginning diving down.)

Q: What sessions are you attending that we should know about?

A: Sometimes the most unusual sessions are the best. I avoid the "big names". They often are spread too thin with all their sessions, which makes it difficult for them to deliver what I would consider deep content. I also avoid entertainers who might be good at presenting but who do not say that much.

In 2010, I attended a session by Vladimir Yaroslavskiy where he talked about sorting. Although he struggled to speak English, what he had to say was spectacular. There was hardly anybody in the room, having not heard of Vladimir before. To me that was the highlight of 2010. Funnily enough, he was supposed to speak with Joshua Bloch, but if you remember, Google cancelled. If Bloch has been there, the room would have been packed to capacity.

Q: Give us an update on the Java Specialists’ Newsletter.

A: The Java Specialists' Newsletter continues being read by an elite audience around the world. The apostrophe in the name is significant.  It is a newsletter for Java specialists. When I started it twelve years ago, I was trying to find non-obvious things in Java to write about. Things that would be interesting to an advanced audience.

As an April Fool's joke, I told my readers in Issue 44 that subscribing would remain free, but that they would have to pay US$5 to US$7 depending on their geographical location. I received quite a few angry emails from that one. I would have not earned that much from unsubscriptions. Most readers stay for a very long time.

After Oracle bought Sun, the Java community held its breath for about two years whilst Oracle was figuring out what to do with Java. For a while, we were quite concerned that there was not much progress shown by Oracle. My newsletter still continued, but it was quite difficult finding new things to write about. We have probably about 70,000 readers, which is quite a small number for a Java publication. However, our readers are the top in the Java industry. So I don't mind having "only" 70000 readers, as long as they are the top 0.7%.

Java concurrency is a very important topic that programmers think they should know about, but often neglect to fully understand. I continued writing about that and made some interesting discoveries. For example, in Issue 165, I showed how we can get thread starvation with the ReadWriteLock. This was a bug in Java 5, which was corrected in Java 6, but perhaps a bit too much. Whereas we could get starvation of writers in Java 5, in Java 6 we could now get starvation of readers. All of these interesting findings make their way into my courseware to help companies avoid these pitfalls.

Another interesting discovery was how polymorphism works in the Server HotSpot compiler in Issue 157 and Issue 158. HotSpot can inline methods from interfaces that have only one implementation class in the JVM. When a new subclass is instantiated and called for the first time, the JVM will undo the previous optimization and re-optimize differently.

Here is a little memory puzzle for your readers:

public class JavaMemoryPuzzle {
  private final int dataSize =
      (int) (Runtime.getRuntime().maxMemory() * 0.6);

  public void f() {
    {
      byte[] data = new byte[dataSize];
    }
    byte[] data2 = new byte[dataSize];
  }

  public static void main(String[] args) {
    JavaMemoryPuzzle jmp = new JavaMemoryPuzzle();
    jmp.f();
  }
}


When you run this you will always get an OutOfMemoryError, even though the local variable data is no longer visible outside of the code block.

So here comes the puzzle, that I'd like you to ponder a bit. If you very politely ask the VM to release memory, then you don't get an OutOfMemoryError:

public class JavaMemoryPuzzlePolite {
  private final int dataSize =
      (int) (Runtime.getRuntime().maxMemory() * 0.6);

  public void f() {
    {
      byte[] data = new byte[dataSize];
    }

    for(int i=0; i<10; i++) {
      System.out.println("Please be so kind and release memory");
    }
    byte[] data2 = new byte[dataSize];
  }

  public static void main(String[] args) {
    JavaMemoryPuzzlePolite jmp = new JavaMemoryPuzzlePolite();
    jmp.f();
    System.out.println("No OutOfMemoryError");
  }
}


Why does this work? When I published this in my newsletter, I received over 400 emails from excited readers around the world, most of whom sent me the wrong explanation. After the 300th wrong answer, my replies became unfortunately a bit curt. Have a look at Issue 174 for a detailed explanation, but before you do, put on your thinking caps and try to figure it out yourself.

Q: What do you think Java developers should know that they currently do not know?

A: They should definitely get to know more about concurrency. It is a tough subject that most programmers try to avoid. Unfortunately we do come in contact with it. And when we do, we need to know how to protect ourselves and how to solve tricky system errors.

Knowing your IDE is also useful. Most IDEs have a ton of shortcuts, which can make you a lot more productive in moving code around. Another thing that is useful is being able to read GC logs. Kirk Pepperdine has a great talk at JavaOne that I can recommend if you want to learn more. It's this: CON5405 – “Are Your Garbage Collection Logs Speaking to You?”

Q: What are you looking forward to in Java 8?

A: I'm quite excited about lambdas, though I must confess that I have not studied them in detail yet. Maurice Naftalin's Lambda FAQ is quite a good start to document what you can do with them. I'm looking forward to finding all the interesting bugs that we will now get due to lambdas obscuring what is really going on underneath, just like we had with generics.

I am quite impressed with what the team at Oracle did with OpenJDK's performance. A lot of the benchmarks now run faster.

Hopefully Java 8 will come with JSR 310, the Date and Time API. It still boggles my mind that such an important API has been left out in the cold for so long.

What I am not looking forward to is losing perm space. Even though some systems run out of perm space, at least the problem is contained and they usually manage to work around it. In most cases, this is due to a memory leak in that region of memory. Once they bundle perm space with the old generation, I predict that memory leaks in perm space will be harder to find. More contracts for us, but also more pain for our customers.

Originally published on blogs.oracle.com/javaone.

Thursday Jan 19, 2012

A File I/O Tutorial Featuring NIO.2

A tutorial on the front page of otn/java titled “A File I/O Tutorial Featuring NIO.2” explains the new file I/O mechanism introduced in the Java 7 release. The java.nio.file package and its related package, java.nio.file.attribute, provide comprehensive support for file I/O and for accessing the default file system. Though the API has many classes, developers need only focus on a few key entry points. The tutorial makes it clear that the API is intuitive and easy to use.

The tutorial begins by asking, “What is a path?” and then introduces the Path class, which is the primary entry point for the package. It explains Methods in the Path class related to syntactic operations and moves on to the other primary class in the package, the Files class, which contains methods related to file operations. It then introduces some concepts common to many file operations and explains methods for checking, deleting, copying, and moving files.

The tutorial offers a concise summary of the API with suggestions for further learning.

“The java.nio.file package provides extensive support for file and file system I/O. This is a very comprehensive API, but the key entry points are as follows:
•    The Path class has methods for manipulating a path.
•    The Files class has methods for file operations, such as moving, copy, deleting, and also methods for retrieving and  setting file attributes.
•    The FileSystem class has a variety of methods for obtaining information about the file system.”

More information on NIO.2 can be found on the OpenJDK: NIO project website on java.net. This site includes resources for features provided by NIO.2 that are beyond the scope of this tutorial, such as multicasting, asynchronous I/O, and creating your own file system implementation.


Read the complete article here.

Tuesday Oct 18, 2011

"Looking Back on JavaOne 2011" feature article

A JavaOne “afterglow” article, “Looking Back on JavaOne 2011” is up on otn/java. The article reviews the spirit, highlights, and feel of the 2011 JavaOne Conference.

From the article itself:

“It was at times difficult to take in all that has been achieved in the last year. The announcements at this year’s JavaOne came fast and furious -- the summer release of JDK 7 (including preview release for Mac OS X), the debut of JavaFX 2.0 (Oracle’s premier development environment for rich client applications), and ongoing progress on Java EE 7 (including taking Java EE into the Cloud). Meanwhile, at Monday’s Technical Keynote, it was pointed out that there are now 5 billion Java Cards in the world --contrasted with a global population of 6.5 billion. And then Tuesday’s Strategy Keynote brought Oracle’s announcement that it will open source JavaFX -- first the components, and then the rest of the framework -- as soon as there is approval from the OpenJDK community. And all the while, the OpenJDK community continues to grow, with recent members including IBM, Apple, SAP, and Twitter.”

Read the complete article.

Monday Oct 17, 2011

Java Community Keynote: Enabling Collaboration, Enabling Innovation

IBM, Java, and the Cloud

The morning JavaOne 2011 Community Keynote began with IBM, presented by Jason McGee, IBM Distinguished Engineer, Chief Architect, Cloud Computing. McGee focused on Java and Cloud computing-the challenges in the language and the JVM for running in the Cloud, how to make your applications elastic and scale well in the Cloud, and the latest innovations (driven by IBM and others) for deploying applications to the Cloud.

McGee explored several recent IBM offerings for the Cloud-including WebSphere eXtreme Scale, a Java based, in-memory data grid product for elastic scalability in Cloud environments; and IBM Workload Deployer, a Cloud deployment and management system for existing virtualized hardware. McGee ended by reiterating IBM's commitment to the Java community, noting their membership in OpenJDK as of 2010.

Community: Best Practices, Innovation, and Learning Resources

Sharat Chander, Principle Product Director, JavaOne Program Committee Chairperson, Oracle began his portion of the keynote by offering a moment of silence in respect for the passing of Apple's Steve Jobs, noting his passion and innovation in the world of technology. The Apple logo briefly appeared on the large screen.

Chander emphasized that Java isn't just about technology, it's also about community. Within this context, he first recognized Mike DeNicola, John Rose, and Patrick Curran, for their outstanding participation and leadership within the JCP this past year. And as part of ever-broadening the Java community, Chander next paid tribute to the Java Dutchess program-with over 400 groups around the world, globally connecting women in Java technology.

From there, Donald Smith, Director of Product Management, Java Platform Group, Oracle invited onstage a panel of representatives from the global Java community: Martijn Verburg, London Java Community; John Duimovich, OpenJDK; Deepak Bhole, OpenJDK; Stephen Chin, SvJugFx; and Bruno Souza, SouJava. The group noted that this was the first JavaOne conference with a community-themed keynote. In true connected community fashion, the group invited those watching the presentation to informally vote (via text message) on Java technologies and initiatives of current and future interest.

The panel members all urged active participation in Java User Groups, from both a technical and professional advancement perspective. Such community involvement not only drives open standards, they declared, but also drives innovation among vendors. The OpenJDK representatives then explored the challenges and promises of the initiative, agreeing that participants should have high expectations for openness, and to push on that. They strongly urged developers to download OpenJDK, and to use it.

Community: Moving Java Forward

Smith explored with the panel how the Java community can best take part in moving Java forward. The consensus was that the process ideally involves vision, innovation, and execution, and that the community can participate at all of these levels-getting involved via JUGs, as well as testing and submitting bug reports, and thereby helping Oracle and other Java vendors build the best and most innovative technologies. One technique being explored at some JUGs, to better facilitate participation, is to both stream them live and offer audio archives via Parleys.com. Within the context of making community content as available as possible, Oracle announced their agreement with Parleys.com to host many of the JavaOne sessions on the learning site-including video, demos, and synchronized audio/slides.

Duke's Choice Award Winners

What JavaOne would be complete without acknowledging the Duke's Choice Award Winners (this year with community input in the selection and review process). Featured onstage were representatives of Rockwell Automation, for their Java Embedded factory floor automation solutions; Sodbeans Project, for their NetBeans-based accessibility suite to aid blind software developers; and JHome, a Glassfish/Java EE-based home automation system for the control of almost any device in the home, including lamps, gates, coffee machines, and more.
Java Posse Comes to Town

To the tune of Spaghetti Western soundtrack music, representatives of the fabled Java Posse next took the stage (to Sharat Chander's mock amazement). The Java Posse site has long been known for its podcasts offering news, discussions, interviews, and "general mayhem" surrounding the world of Java. The Java Posse members emphasized what they see as the three elements of Java-the language, the platform, and (most importantly), the Java community. "We have a development community that other development platforms dream of having," they said. They promised in-depth appearances from many of the Duke's Choice Award winners. And in parting the stage, they deputized Chander as an official honorary member of the Java Posse, presenting him with a 10-gallon hat.

In closing, JavaOne participants were urged to get involved and make their voices heard-to participate in the JavaOne Community Steering Committee, to participate in the JavaOne Program Committee, to submit speaker papers, to participate in the OpenJDK project, and to join a local JUG. Chander parted by noting that JavaOne 2012 would feature a community member as one of the keynote speakers.



Learn More:

WebSphere eXtreme Scale
IBM Workload Deployer
Java Dutchess
2011 Duke's Choice Award Winners
Parleys.com
The Java Posse

OpenJDK Development Best Practices

At JavaOne 2011, Oracle Principal Member of Technical Staff, Kelly O’Hair, had a session on “OpenJDK Development Best Practices” that offered a lot of useful practical advice. He discussed current OpenJDK development procedures such as building, testing, code review, and creating a changeset, and integrating that changeset into a team repository.  In addition he covered "OpenJDK Developers' Guide" topics and looked at the challenges of integrating a change.

So what are the best practices when working on the JDK?
● When in doubt, ask
● When something does not work, report it
● Always be careful, rushing in changes is dangerous
● Do no harm, have a backup or backout plan
● Stay calm, nervous people make mistakes
● Be prepared for anything, because it will happen

When editing sources:
● No TABS
● Never edit the legal notices
● Respect the existing formatting
● Small surgical changes are best, easiest to review
● Well written comments are critical
● Do not assume anything about the compilers

Testcases are critical and not optional:
● Create a new one or modify an existing testcase
● Must be solid and work on all supported systems
● Must not be a resource hog (open 20,000 files)
● Must work in a shared VM mode (like a JUnit test)
● Assume someone else might be running the same test at the same time, and that someone might be you
● Continuous Build & Test
● Test gates or baseline testing
● But before you even get started making changes you must be able to completely build it and test it on your own system, this is a fundamental
● Linux builds are the easiest, so let's see what needs to happen

He suggested best practices short cuts for building:
● Always use local disk space
● Use /tmp if it has the space
● Try export HOTSPOT_BUILD_JOBS=4
● Try export ALT_PARALLEL_COMPILE_JOBS=4
● Use export NO_DOCS=true to avoid running javadoc
● Use ALT_JDK_IMPORT_PATH=${HOME}/jdk1.8.0

Kelly offered detailed principles related to testing, testing prep, editing, code review, changeset creation, why a push fails, and the team repository model.

His core ideas:
● Pick your environment, Linux is easiest
● Pick a stable state of repos, promoted build, oldest best
● Learn to build and test it, over and over, know what to expect, create a jdk to use as your import
● Editing working set files, read the Mercurial book
● Problemlist, changeset creation

About

Insider News from the Java Team at Oracle!

duke
Links


Search

Archives
« May 2016
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
31
    
       
Today