サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
参議院選挙2025
weblogs.java.net
Source Code The following code snippets are part of a complete sample available at https://github.com/bhakti-mehta/samples/tree/master/jdk8-and-guava For the sake of simplicty, I have a simple sample which has a collection of people's data. We start with a simple POJO Person as shown below for both the JDK 8 and Guava cases public class Person { private String firstName; private String
One of the things I've always wanted in Java is a "one liner" trick to read all of the text from a stream. For example, I often want to be able to grab the contents of a URL or file as a simple String, without a lot of typing. The URL class tantalizingly holds out its getContent() method, but sadly, content handlers were never really taken seriously. I don't even particularly care about performanc
Josh Bloch's Effective Java popularized the Builder Pattern as a more palatable way of constructing objects than constructors or factory methods when there are potentially many constructor parameters. The formulation in Effective Java makes for a particularly readable construction, like this: new Rectangle.Builder().height(250).width(300).color(PINK).build(); The advantage over a constructor invoc
A little-known but very useful feature slipped into JUnit 4 and recent versions of the Maven Surefire Plugin: support for parallel testing. This feature has been around for a while in TestNG, but has been missing in JUnit. And now, if you are a JUnit user, you too can run your tests in parallel! Running your tests in parallel is a powerful way to speed up your tests. Good automated tests should be
I started working for Sun Microsystems since Janurary 2001, when I first came to the US. During these years I was able to work on many different projects, such as MSV, JAXB, JAX-WS, Metro, GlassFish v3, and Hudson, to name a few, with many great people. It was all quite an enjoyable journey. I won't list all those names one by one here, for it will be too long, but if you are one of them, I think
I've finally managed to produce the Windows installer for Hudson, as originally raised by Håkan Reis. Please try it out and let me know how it works. This one took much longer than the installer for any other platforms, and while I normally think of Microsoft technologies very highly, Windows installers and WiX are a real disappointment. For example, you write the description of the installer in X
Posted by robc on August 04, 2009 at 12:03 PM | Comments (0) One big topic of discussion at JavaOne was the recently filed JSR-330, "Dependency injection for Java". As many of the comments during the JSR approval ballot made clear, some alignment of JSR-330 and JSR-299 (formerly knows as "Web Beans") was in order. What would be the point of having a JSR to help reduce fragmentation in the dependen
Posted by amyroh on June 24, 2009 at 04:36 PM | Comments (4) GlassFish V3 has improved the way to front GlassFish with Apache HTTP Server. Unlike the V2 way where users had to copy tomcat-ajp.jar and commons-*.jar, you can just enable mod_jk in V3 using the network-listener's attribute "jk-enabled" without copying any additional jars into its lib directory. You can also create jk-connectors under
Posted by kohsuke on May 02, 2009 at 08:26 AM | Comments (0) "You can do everything from GUI" has always been one of Hudson's strengths, and we also have the REST API, but at the same time, CLI is also very useful for improving automation around administration, builds, and so on. So starting Hudson 1.302, I added a CLI agent to Hudson. CLI can be downloaded from your Hudson from http://server/huds
CollabNet is currently down for scheduled maintenance. As part of CollabNet's expansion and improvement plan, we are upgrading the space in our datacenter to help better serve you as our customer. CollabNet is making improvements and expansions to the network, power, and the overall infrastructure of our datacenter space. The maintenance is scheduled to conclude at 7:00AM PST Saturday morning.
Posted by kohsuke on January 21, 2009 at 05:42 PM | Comments (5) Starting Hudson 1.264, Hudson has an option of sending usage statistics. This was released 12/16 last year, so it's been about a month. So I run some data analysis over the data that's collected so far. First, data is filtered to eliminate one off installations that don't appear to be a long running installation. That is, I only coun
Posted by jhook on December 22, 2008 at 11:34 PM | Comments (2) After spending way too much time on ways to speed up web applications, you'll find that your greatest mileage comes in database optimizations, networking, and reducing the bytes downloaded (an example). Time spent optimizing Java code is seemingly insignificant between waiting on the request, waiting on the database, waiting on the se
JWebPane project, a browser plugin for Swing and soon FX Posted by alex2d on December 10, 2008 at 04:08 AM | Comments (4) JWebPane overview Hello blog-o-sphere! I'm the tech lead of the new JWebPane project, a browser plugin for Swing and soon FX. We showed a preview this past JavaOne that was well received, and I wanted to give everyone an update on where we are. JWebPane is a WebKit based brow
Introducing JWebPane component Posted by ixmal on May 29, 2008 at 02:26 AM | Comments (15) Recently, at the JavaOne conference, Sun has introduced several new JavaFX related technologies and products. The Scene Graph and WebKit session was one of the technical sessions to present such advanced technologies: Inside The JavaFX™ Script Technology-Based Runtime APIs: Scene Graph & JWebPane Component
Scala Lift Web Framework on GlassFish v3 Posted by vivekp on May 16, 2008 at 04:35 PM | Comments (0) During JavaOne I heard about Lift - a Scala web framework and wanted to try it. It claims to provide best of Rails(simple and fast development), Seaside(security), Django(access control by default) and uses Wicket for view templates. In few steps I had my first Lift web application running on Glass
Why does JAXB put @XmlRootElement sometimes but not always? Posted by kohsuke on March 03, 2006 at 04:21 PM | Comments (15) isusanin asked in the JAXB forum: When trying to marshall an object I get this error message: unable to marshal type "org.blah.MessageType" as an element because it is missing an @XmlRootElement annotation If I add the @XmlRootElement annotation to the MessageType, it works,
Posted by kohsuke on March 15, 2006 at 03:17 PM | Comments (5) One of the common issues that JAXB 2.0 users face is this. When they compile their favorite schema, XJC reports back the following scary-looking errors and refuses to compile it: parsing a schema... [ERROR] Property "MiOrMoOrMn" is already defined. line 132 of file:/C:/kohsuke/Sun/JAXB/jaxb-unit/schemas/individual/MathML2/presentation/
Posted by kgh on October 19, 2004 at 08:43 AM | Comments (16) The question came up recently of "should we make Swing truly multithreaded?" My personal answer would be "no", and here's why... The Failed Dream There are certain ideas in Computer Science that I think of as the "Failed Dreams" (borrowing a term from Vernor Vinge). The Failed Dreams seem like obvious good ideas. So they get periodical
Posted by sdo on December 03, 2007 at 11:25 AM | Comments (1) When I reported our recent excellent SPECjAppServer 2004 scores, one glassfish user responded: I sure wish you guys were able to come up with a thorough write up about the SPEC Benchmark architecture, and the techniques you guys used to get the numbers you get and, more importantly, how those techniques might apply to every day applicat
Building a Ruby Sample for NetBeans Posted by bleonard on March 26, 2007 at 03:26 PM | Comments (9) We're in the process of creating some sample applications to ship with the NetBeans Ruby module, one of which will be based on the screencast, Putting Flickr on Rails. You can just download and run the sample project (you'll have to set your Flickr API Key), or build it from scratch as documented he
Kohsuke Kawaguchi is a staff engineer at Sun Microsystems. He has been working on XML and XML schema languages since 2001, in particular RELAX NG, W3C XML Schema, JAXB, and JAXP. He also hosts many projects on java.net. More information on him can be found at http://www.kohsuke.org/. Installing Hudson on Windows just got even easier Posted by kohsuke on September 27, 2008 at 12:57 PM | Permalink |
One of my hobby projects is Hudson, and there I use colored balls as a metaphor of the build status — red means fatal errors, yellow means test failures, blue means OK, etc. One day I came across the ambient orb, which I thought would be a rather cool widget as the real world representation of the Hudson ball. I commit to a large number of projects, and I often break a build, so I thought maybe I
Posted by chet on October 06, 2006 at 02:23 PM | Comments (73) The Rumor Hey, I like a rumor as much as anybody (Hey, did you hear that Larry Ellison is acquiring Europe?). But when the rumor is clearly wrong and it involves a project that I'm actually working on, I feel obliged to correct the misinformation (as did Java 2D's Dmitri Trembovetski, who has responded to the relevant threads in th
The XmlHttpProxy Client for Java Posted by gmurray71 on July 17, 2006 at 12:49 PM | Comments (3) One drawback of working with AJAX is that an AJAX-based client cannot make calls to URLs outside of its domain, which means that it cannot access services located on another server. A technique such as JSONP can help in this regard, but it has some limitations. One limitation is that including third-p
Grizzly: An HTTP Listener Using Java Technology NIO Posted by jfarcand on June 16, 2005 at 01:39 PM | Comments (15) Writing scalable server applications in Java technology has always been difficult. Before the advent of NIO, thread management issues made it impossible for an HTTP server to scale to thousands of users. I'm gonna start blogging on Grizzly, the HTTP Connector based on NIO shipped in
Restricting Access to your AJAX Services Posted by gmurray71 on August 02, 2006 at 11:32 AM | Comments (6) Services like the XmlHttpProxy for Java are designed to return JavaScript that is evaluated on the client. Unfortunately, if you are not careful with the design of your services, JSONP techniques could be used to hijack your services. While I'm not saying JSONP is bad, I do highly recommend y
The XmlHttpProxy Client for Java Posted by gmurray71 on July 17, 2006 at 12:49 PM | Comments (1) One drawback of working with AJAX is that an AJAX-based client cannot make calls to URLs outside of its domain, which means that it cannot access services located on another server. A technique such as JSONP can help in this regard, but it has some limitations. One limitation is that including third-p
RESTful Web Services with JAX-WS and JAXB Posted by mhadley on March 08, 2006 at 11:44 AM | Comments (1) In a previous blog entry I described how to use the dynamic client functionality of JAX-WS in combination with JAXP XPath capabilities to query a service providing data using XML/HTTP. In this entry I'd like to focus on how to use JAXB instead of XPath to get strongly typed access to the same d
Understanding Weak References Posted by enicholas on May 04, 2006 at 05:06 PM | Comments (9) Some time ago I was interviewing candidates for a Senior Java Engineer position. Among the many questions I asked was "What can you tell me about weak references?" I wasn't expecting a detailed technical treatise on the subject. I would probably have been satisfied with "Umm... don't they have something to
次のページ
このページを最初にブックマークしてみませんか?
『weblogs.java.net』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く