Tuesday, November 11, 2008

Transferring Sockets

hat you can do is put a proxy server/load balancer in front of your service. (The proxy service must match your protocol, a HTTP proxy server won't work unless you are proxying HTTP requests)
The proxy would have same the IP address and port of your current service so that the clients connect to the proxy. You can have the proxy server connect to your service passing one requests way and replies the other way. If your service dies, the proxy can create a new connection to another service, or the same service when it restarts and you might be able to hide this from the client (there will be a delay of some order)
Depending on the complexity of your protocol and whether the connection is stateful, this might be easy to do...

Hey GlassFish v3 Prelude Released

Sun GlassFish Enterprise Server v3 Prelude improves productivity with rapid deployment technology and modular architecture based on OSGi. Read the overview and download it now.


Young Developers
Programming is not just for adults anymore! The Young Developer Series teaches Java programming to anyone over 10 years of age, using a tool called Greenfoot:
Wombat Object Basics
Wombat Classes Basics

Wednesday, March 19, 2008

How to embed a True Type font

Some applications, for reasons of esthetics or a required visual style, will embed certain uncommon fonts so that they are always there when needed regardless of whether the font is actually installed on the destination system.

The secret to this is twofold. First the font needs to be placed in the resources by adding it to the solution and marking it as an embedded resource. Secondly, at runtime, the font is loaded via a stream and stored in a PrivateFontCollection object for later use.

This example uses a font which is unlikely to be installed on your system. Alpha Dance is a free True Type font that is available from the Free Fonts Collection. This font was embedded into the application by adding it to the solution and selecting the "embedded resource" build action in the properties.

http://www.xtremevbtalk.com/archive/index.php/t-252347.html



Fonts may have only certain styles which are available and unfortunately, selecting a font style that doesn't exist will throw an exception. To overcome this the font can be interrogated to see which styles are available and only those provided by the font can be used. The following listing demonstrates how the Alpha Dance font is used by checking the available font styles and showing all those that exist. Note that the underline and strikethrough styles are pseudo styles constructed by the font rendering engine and are not actually provided in glyph form.

How to embed a True Type font

Some applications, for reasons of esthetics or a required visual style, will embed certain uncommon fonts so that they are always there when needed regardless of whether the font is actually installed on the destination system.

The secret to this is twofold. First the font needs to be placed in the resources by adding it to the solution and marking it as an embedded resource. Secondly, at runtime, the font is loaded via a stream and stored in a PrivateFontCollection object for later use.

This example uses a font which is unlikely to be installed on your system. Alpha Dance is a free True Type font that is available from the Free Fonts Collection. This font was embedded into the application by adding it to the solution and selecting the "embedded resource" build action in the properties.


Fonts may have only certain styles which are available and unfortunately, selecting a font style that doesn't exist will throw an exception. To overcome this the font can be interrogated to see which styles are available and only those provided by the font can be used. The following listing demonstrates how the Alpha Dance font is used by checking the available font styles and showing all those that exist. Note that the underline and strikethrough styles are pseudo styles constructed by the font rendering engine and are not actually provided in glyph form.

Tuesday, March 4, 2008

Open JDK

What you will find here

Today this project contains two significant components of the JDK:

The remainder of the open-source JDK will be available in the first half of 2007. At that time this project will host the source code for the complete JDK except for a few components that Sun does not have the right to publish in source form under the GPL; pre-built binaries will be provided for those components.

You will also find the jtreg unit-test harness here, for use in running the compiler's unit tests. For now this tool is available only in binary form, but eventually it too will be open-sourced.

OpenJDK-6 source code available

The source code for the JDK 6 project is now available here. To learn more about this new effort please see Joe Darcy's blog; to get involved please join us on the jdk6-dev list.

Draft Developers' Guide available

Iris Clark has posted the first draft of the OpenJDK Developers' Guide. Please send comments to guide-discuss(at)openjdk.java.net

The OpenJDK Community Innovators' Challenge is ON!

Want to do something good for OpenJDK and the community and possibly win a prize for your efforts? The OpenJDK Community Innovators' Challenge is part of Sun's new community awards initiative, giving away up to $1,000,000 in 2008 across six of Sun's key FOSS communities. The Challenge will give away up to $175,000 to worthy developers who enter. For more on this opportunity, please visit here.


Java with MySQL and Developers

MySQL, the world's most popular open-source database, fills an important niche in Sun's software stack. With Sun's reach and resources, MySQL is poised for even wider adoption.

Deep Dive: JXTA on MIDP
SDN staff writer Ed Ort interviews JXTA project architect Mohamed Abdelaziz. Abdelaziz demonstrates how JXTA for MIDP 2.0 allows handheld devices to participate as first-class devices in a JXTA network.

From Java Platform Improvements to Better Teaching: A Conversation With Java Champion Cay Horstmann
Java Champion Cay Horstmann, a computer science professor and author of noted books on Java programming, discusses needed platform improvements, developer challenges, and ways to inspire students.

Student Developers
Where can you find hot technologies, open-source communities, and job opportunities? Sun is looking for students who are ready to innovate and create the future. Learn More

Duke's Choice Awards
We are accepting nominations for the sixth edition of the popular Duke's Choice Awards. Winners will be recognized at the 2008 JavaOne Conference. Submit entries by March 14.

Connect and Participate With GlassFish
Try GlassFish for a chance to win an iPhone. This sweepstakes ends on March 23, 2008.
New Java Enterprise Architect Certification
The much anticipated update to the Java Enterprise Architect Certification is now available. Achieving this advanced and well respected certification can help get you to the next level in your career.

Download Java SE 6 Update N, formerly known as the Consumer JRE, and provide feedback on these exciting features: Direct3D, Java Quick Starter, Nimbus, and Deployment Toolkit. Get the RSS feed.


Tuesday, February 26, 2008

Reference


Glass Fish

Download GlassFish and enter the iPhone sweepstakes.

Independent Component Downloads



Community

Community


Open-Source Java Project Sun's Java implementation and Free Software unite.

GlassFish Participate in the community development of the GlassFish application server, which implements the newest features in the Java EE 5 platform.

The Aquarium Get daily news from the GlassFish Community. And read about GlassFish in the real world in Stories.

Samples for Project GlassFish Developers can use and contribute to the sample applications that demonstrate Java EE technology using the Java EE SDK built by the GlassFish Community.

Java EE Forums Share information, locate tried solutions, and learn best practices for Sun products and technologies.

Java Enterprise Community Here's the place to exchange ideas with other developers working with Java EE technologies.

java download Free

Free Java Download

Download Java for your desktop computer now!


Download Java Software now

Version 6 Update 3

What is Java? | Do I have Java? | Need Help?


If you want to download Java for another computer or Operating System, click the link below.

> All Java Downloads


Why Download Java?

Java technology allows you to work and play in a secure computing environment.

Java is in cell phones, automobiles, the Mars Rover, and many other places. By downloading it to your computer, you will be able to experience the power of Java.

What new in java






Authenticate With Sun Java System Access Manager and ActivIdentity 4TRESS Authentication Server A win-win integration story: You can now adopt 4TRESS one-time password (OTP) authentication schemes in Access Manager and thus secure applications with a wider range of OTP schemes in an Access Manager-protected environment.


Extended Persistence Context in Stateful Session Beans This Tech Tip illustrates an application that uses a stateful session bean and an entity manager with an extended persistence context.


Sun Technical Specialist on Identity and OpenSSO Extensions Paul Bryan talks with Marina Sum about his background in identity development, the history and future of Sun Java System Access Manager, OpenID, the subproject OpenSSO Extensions, and the solutions for phishing.


Video: Sun's Open-Source Application Server--GlassFish Discover the latest Java EE technology with Sun's open-source application server called GlassFish. Learn more about the communities, projects, and resources available

All Java

Java Platform, Enterprise Edition (Java EE) builds on the solid foundation of Java Platform, Standard Edition (Java SE) and is the industry standard for implementing enterprise-class service-oriented architecture (SOA) and next-generation web applications. The SDKs contain Sun Java System Application Server (Sun's supported distribution of GlassFish) and provide support for Java EE 5 specifications.

Updated! Download the Java EE 5 SDK or Java Application Platform SDK.

java FX

JavaFX Technologies and how to use them
Tutorials - Getting Started with JavaFX Script, Learning More, and other Community Member Contributed Tutorials
OpenJFX-Compiler Project - The JavaFX Community Compiler Project
Project SceneGraph - The JavaFX Community SceneGraph Project
JavaFX Mobile - The Sun Developer Network site for JavaFX Mobile
JavaFX Script - The Sun Developer Network site for JavaFX Script

java Certification

- Most Wanted
Will you be the recipient of Sun's 500,000 certification? Certify now and receive a free gift.
- New Enterprise Architect Exams
Become a Sun Certified Enterprise Architect for the Java Platform Enterprise Edition 5.
- New Sun Certified Web Component Developer Exams
Become a Sun Certified Web Component Developer for the Java Platform Enterprise Edition 5.
- Discontinued Exams
Several Java certification exams will be discontinued February 29, 2008.
- Top 5 Reasons to Get Certified from Sun
Exam Preparation

- Free Proficiency Assessments
- Certification Learning Paths
- Practice Exams
- Java Coaching Program
- Solaris Coaching Program
- News and Resources
- Exam Preparation A - Z

Developer


From Java Platform Improvements to Better Teaching: A Conversation With Java Champion Cay Horstmann
Java Champion Cay Horstmann, a computer science professor and author of noted books on Java programming, discusses needed platform improvements, developer challenges, and ways to inspire students.

Student Developers
Where can you find hot technologies, open-source communities, and job opportunities? Sun is looking for students who are ready to innovate and create the future. Learn More

Duke's Choice Awards
We are accepting nominations for the sixth edition of the popular Duke's Choice Awards. Winners will be recognized at the 2008 JavaOne Conference. Submit entries by March 14.

Connect and Participate With GlassFish
Try GlassFish for a chance to win an iPhone. This sweepstakes ends on March 23, 2008.
Submit your entry today.


February 26, 2008
Sun and MySQL: How It Stacks Up for Developers
MySQL, the world's most popular open-source database, fills an important niche in Sun's software stack. With Sun's reach and resources, MySQL is poised for even wider adoption.

February 26, 2008
Consuming a MySQL Database in a RESTful Web Service
Learn how to use the NetBeans IDE to expose a MySQL database as a RESTful web service endpoint.

February 26, 2008
MySQL: A Q&A on the Sun Acquisition
Find out what MySQL CEO MÃ¥rten Mickos has to say about Sun's acquisition of the database company.


Sunday, February 10, 2008

From Java To Ruby

You want your development team to be productive. You want to write flexible, maintainable web applications. You want to use Ruby and Rails. But can you justify the move away from established platforms such as J2EE? Bruce Tate’s From Java to Ruby has the answers, and it expresses them in a language that’ll help persuade managers and executives who’ve seen it all. See when and where the switch makes sense, and see how to make it.

Source code extracts for From Java To Ruby are available as an archive in either .tgz (Unix) or .zip (Windows) format:

Thursday, February 7, 2008

JDK 7 Project

  • The openjdk project is now available shipping HotSpot, javac and JavaHelp as the initially available open source components.
  • The JDK 7 project opens for business at https://jdk7.dev.java.net/. But you knew that already

Wednesday, January 30, 2008

java Spot light


Duke's Choice Awards
We are accepting nominations for the sixth edition of the popular Duke's Choice Awards. Winners will be recognized at the 2008 JavaOne Conference. Submit entries by March 14.

Free Evaluation: Sun Java Real-Time System 2.0 Update 1
Get all the power and benefits of the Java platform plus unprecedented control.
Learn More

NetBeans 6.0 - The Only IDE You Need.
NetBeans 6.0 IDE increases developer productivity with a smarter, faster editor, Ruby/JRuby/Ruby on Rails support and much more.
Download Now Learn More Free DVDPublish Post

CommunityOne 2008: Call For Participation
Share your expertise with the free and open source community at the second annual CommunityOne conference. Call for participation is open through January 31, 2008.

Saturday, January 19, 2008

Java Screep Capturing Program

import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class screen2image
{
public static void main(String[] args) throws Exception
{
Robot robot = new Robot();

BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
ImageIO.write(screenShot, "BMP", new File("screenShot.bmp"));
}
}

Sunday, January 13, 2008

AJax and Java



jMaki for Roller
In this blog Dave discusses his holiday project of integrating jMaki with Roller.


Another Real-life app using jMaki & Jersey
In my role of Technology Evangelist, I get the opportunity to meet a lot of community (folks like you .all around the world. In the year 2007, I represented GlassFish


jMaki wrappers for ExtJs now available
In a joint effort with the ExtJs toolkit team, the jMaki wrappers for the ExtJs 1.1 toolkit are now available, jmaki-ext-1.0.1.zip .




Sun Java BluePrints Solutions Catalog with Ajax
This set of documents, code, and applications covers problems and solutions for using Ajax in a Java EE application. You can download it (code and solution documents) and run it on a Java EE application server, or you can just view the solutions document online to see if you are interested in downloading.

Korean and Chinese users, get Ajax content in your language. Java Studio Creator users can find content in Espanol, Francais, Japanese, Chinese, and Korean.



Wednesday, January 9, 2008

java certification

Sun eLearning Certification Success Packages Offer eLearning Certification Success Packages

Sun offers New eLearning Certification Success Packages that take the guesswork out of preparing for certification. These packages are comprehensive solutions that can help ease the learning and certification process by providing the right combination of Web-based or CD-ROM Sun authorized courseware and practice exams, even a voucher for the actual certification exam.

Sun authorized courseware is available to you 24x7 via your personal computer or online access, giving you the flexibility to learn when it is convenient to you. Offered at a discount, these packages provide an excellent value for your educational investment.

To preview Sun's new eLearning Certification Success Packages, follow links below.

For System Administrators:

For Developers:

To qualify for the eLearning Certification Success Package training offer:

  • Purchase qualifying eLearning Certification Success Packages online by March 31, 2008.
  • For the Swiss Army Field Watch, provide Priority Code WW18CS1 at the time of purchase.
  • For the Solio Universal Hybrid Charger, provide Priority Code WW18CS2 at the time of purchase.
  • Order eLearning Certification Success Packages online by following links to packages above.

You will receive your Swiss Army Field Watch or Solio Universal Hybrid Charger within four weeks of package payment receipt.