That's how Winter in Tokyo looks like. No snow, no ice, no trembling dogs near metro stations.
Tuesday, December 23, 2008
Saturday, October 04, 2008
OpenOffice.org 3 Release Candidate 2 on Mac OSX
Just installed OpenOffice.org Release Candidade 2 on my Mac, where I am running Leopard 10.5.5. I was really surprised when it starts just within 4.03 seconds! In compare to Microsoft Office 2008, it takes really a long time to make it start and open some document.
Check it out: http://porting.openoffice.org/mac/download/aqua-Intel.html
Check it out: http://porting.openoffice.org/mac/download/aqua-Intel.html
Friday, October 03, 2008
Proxy And Java Web Start
When running on client environent, Java Web Start is using JavaScript PAC file (proxy auto-config), completely ignoring system environment settings, for example, like "(protocol).
The problem occurs, when you need something, like a different port for a web service that is running with SSL. In that case Proxy server will return an error, encouraging client to connect only through defined ports.
Here is a cure how to turn off proxy settings within Java Web Start, having no deal with the system configuration (including
The object ProxySelector is a global object that is used by all the handlers. Now in this case it will return a default Proxy object that is
nonProxyHosts" etc. In my case, users are not authorized to change their own default proxy settings and everybody are enforced to use some specific address.The problem occurs, when you need something, like a different port for a web service that is running with SSL. In that case Proxy server will return an error, encouraging client to connect only through defined ports.
Here is a cure how to turn off proxy settings within Java Web Start, having no deal with the system configuration (including
javaws.cfg):
ProxySelector.setDefault(new ProxySelector() {
@Override
public List<Proxy> select(URI uri) {
List<Proxy> proxyList = new ArrayList<Proxy>();
proxyList.add(Proxy.NO_PROXY);
return proxyList;
}
@Override
public void connectFailed(URI uri,
SocketAddress socketAddress,
IOException ioException) {
}
});
The object ProxySelector is a global object that is used by all the handlers. Now in this case it will return a default Proxy object that is
DIRECT connection. It is equivalent to setting javaws.cfg.proxy.setting=NONE in javaws.cfg file.
Friday, September 26, 2008
Writing a Standalone Client For Secure Web Service
Today I was puzzled writing a standalone Java client (going to be Swing app) that "talks" to the remote server, which serves a secure Web Service. Looking around various blogs and other stuff, I made it. It even works as expected. :-)
But I want now put it all together to make it very clear and up to date. The process is all undocumented properly and successfully allows everybody hit the wall with the forehead. Therefore, to avoid others had the same sad experience googling around for a half a day, soon I am going to make a end-to-end document with a screenshots and detail explanations.
Uugghhh... Now is Friday and 8:30PM. Maybe tomorrow...
Thursday, September 25, 2008
Writing a Secure Swing Client For a Web Service
Using NetBenans IDE, I've tried to write a Swing GUI client for a secure web service that I've made. While web-based servlet works great, Swing standalone application spits weird errors and won't even run. One of the interesting exceptions is:
jar libraries that NetBeans added automatically, when created Web Service Client reference and replace them with the libraries from GlassFish application server.
To those, who need step-by-step instructions:
javax.xml.ws.soap.SOAPFaultException: ERROR: No security header found in the messageThe problem is that NetBeans is using "old" JAX-WS libraries instead using WSIT. Solution is to remove all the JAX-WS
...
To those, who need step-by-step instructions:
- In NetBeans IDE, right-click on the client project and select "Properties". "Project Properties" dialog appears.
- From the "Categories" tree at the left side of the dialog, select "Libraries" item.
- Remove all the JAX-WS libraries—do not worry, your project is completely broken anyways. :-)
- On the right side of the dialog, click on "Add JAR/Folder" button. "Add JAR/Folder" dialog appears.
- Browse to
$GLASSFISH_HOME/libfolder (and subfolders) in order to select all the libraries, listed below. - Click OK.
- Have fun. :-)
lib/endorsed subfolder):- activation.jar
- appserv-deployment-client.jar
- appserv-launch.jar
- appserv-admin.jar
- appserv-ext.jar
- appserv-rt.jar
- javaee.jar (oh my...)
- webservices-rt.jar
- webservices-tools.jar
- webservices-api.jar
Sunday, September 21, 2008
16 Million Of Terabytes On a Laptop
Thursday, August 07, 2008
Java Swing Balloon Tip
I am developing a GUIs with Java Swing. Awesome, everything fine. Now, today I needed something like tool-tip or balloon pop-up to show various messages. In particular, I find that there are no standard form validation framework, so I created one, ripping off ideas from Zope Formulator. And the validation trigger suppose to pop-up a balloon tip when something wrong and focus the widget. That's fine, validation works perfect, unless you need a balloon tip.
I found one "decent" balloon tip on https://balloontip.dev.java.net/ site. Here how it looks like in Windows with Metal L&F: (pic is taken from the site directly):

Well, it's OK. It's Windows and mostly everything looks ugly there even in Vista, so a combination of blue frame on bluish gray with a squarish hint might be OK for environment that lacks taste and design. But what about Mac? — yeah, I am snob-like a--hole here, sorry. OK, what about Gnome or KDE on Linux and/or Sun Solaris? Windows is not the only OS these days anymore. So here how the whole thing looks like in Mac:

Notice ugly corners and quite crappy close button, not mention that a close button does not fits into a balloon tip paradigm. Well, my double-advice to all Java developers who sticks on Windows platform (there are two messages in one):
People, PLEASE install Linux and/or Solaris to make sure you are NOT providing funny things!..
*sigh*
So and now this is how it should look like (took for me less than two hours to rework entire source code, throwing lots of things):

Now I am happy. :-)
P.S. And yes, it does not need a close button — just click on it...
I found one "decent" balloon tip on https://balloontip.dev.java.net/ site. Here how it looks like in Windows with Metal L&F: (pic is taken from the site directly):

Well, it's OK. It's Windows and mostly everything looks ugly there even in Vista, so a combination of blue frame on bluish gray with a squarish hint might be OK for environment that lacks taste and design. But what about Mac? — yeah, I am snob-like a--hole here, sorry. OK, what about Gnome or KDE on Linux and/or Sun Solaris? Windows is not the only OS these days anymore. So here how the whole thing looks like in Mac:

Notice ugly corners and quite crappy close button, not mention that a close button does not fits into a balloon tip paradigm. Well, my double-advice to all Java developers who sticks on Windows platform (there are two messages in one):
People, PLEASE install Linux and/or Solaris to make sure you are NOT providing funny things!..
*sigh*
So and now this is how it should look like (took for me less than two hours to rework entire source code, throwing lots of things):

Now I am happy. :-)
P.S. And yes, it does not need a close button — just click on it...
Subscribe to:
Posts (Atom)

