Archive for the ‘Java’ Category

Sun CEO sets open source Java time frame

Tuesday, October 31st, 2006

Sun CEO sets open source Java time frame - Yahoo! News

> San Francisco (InfoWorld) - SAN FRANCISCO – Demonstrating a perhaps more aggressive path than anticipated, Sun Microsystems is set to announce the open-sourcing of the core Java platform within 30 to 60 days, Sun President and CEO Jonathan Schwartz said at the Oracle OpenWorld conference on Wednesday morning.

This means around chrismas. Will be interesting to see what comes of this.

Exploring the Google Web Toolkit

Tuesday, July 4th, 2006

Ajax for Java developers: Exploring the Google Web Toolkit

> The recently released Google Web Toolkit (GWT) is a comprehensive set of APIs and tools that lets you create dynamic Web applications almost entirely in Javaâ„¢ code. Philip McCarthy returns to his popular Ajax for Java developers series to show you what GWT can do and help you decide whether it’s right for you.

Still can’t decide if GWT is for you? Read this article for a good overview of the strengths and weaknesses of the framework, and you might be in a better position to make up your mind. Personally, I find it’s a bit too much like developing GUI applications, and I don’t feel too comfortable with the vendor lock-in.

Sun Denies Open Source Java Imminent

Tuesday, July 4th, 2006

Sun Denies Open Source Java Imminent

> Sun was quick to deny published reports today that it plans to open source Java in the next few months. The company is working on the project, but any transition to open source is closer to a year away.

Bugger, but I guess this will give GNU Classpath more time to play catchup, and possibly become a viable alternative to the sun stack.

Sun Java 1.5 & Compiz / XGL

Thursday, June 8th, 2006

Seems there’s an assumption in Sun Java 1.5 about window managers which causes it to bug out with Compiz & Xgl.
A temporary workaround is:

export AWT_TOOLKIT=MToolkit

or grab Compiz CVS and apply the following patches:

— dix/window.c 2006/05/29 18:12:27 1.1
+++ dix/window.c 2006/05/29 18:15:15
@ -1265,8 +1265,12 @
result = EventSelectForWindow(pWin, client, (Mask )*pVlist);
if (result)
{
- error = result;
- goto PatchUp;
+ if (vmask Mask= SubstructureRedirectMask)
+ {
+ error = result;
+ goto PatchUp;
+ }
}
pVlist++;
break;

— src/window.c 6 Jun 2006 05:12:07 -0000 1.55
+++ src/window.c 6 Jun 2006 06:22:39 -0000
@ -2268,6 +2322,9 @
}

XConfigureWindow (w->screen->display->display, w->id, xwcm, xwc);
+
+ if (w->resName && strncmp (w->resName, “sun-awt-X11″, 11) 0) + sendConfigureNotify (w); } void @@ -2283,6 +2340,9 @@ XMoveWindow (w->screen->display->display, w->frame, w->attrib.x - w->input.left, w->attrib.y - w->input.top); + + if (w->resName && strncmp (w->resName, “sun-awt-X11″, 11) 0)
+ sendConfigureNotify (w);
}
}

Red Hat: Java Linux license does not go far enough

Tuesday, May 23rd, 2006

Red Hat: Java Linux license does not go far enough | The Register

> Sun Microsystems’ new GNU/Linux-friendly Java license does not go far enough for Red Hat. It says Sun should have open-sourced Java instead.

> Brian Stevens, Red Hat CTO, told The Register Sun should open-source its Java Virtual Machine (JVM) (which is licensed by Red Hat) so developers can improve the software’s real-time capabilities.

> According to Stevens, Sun’s Distro License for Java (DLJ) - launched at this week’s JavaOne conference - will reduce companies’ legal costs. But does not satisfy the desire for open source Java. He criticized Sun for being reactive, rather than leading, on the issue of open source Java. “They try to do the minimal amount they can get away with,” he said.

At the moment, I’m somewhat pleased that Linux distributions can ship the Sun jvm with their OS, as I’ve lost count of how many times I’ve downloaded the jvm myself for installing. And, as it’s a hassle, I keep forgetting to upgrade to new versions. Much better to let the distros do it for me, and have new versions automatically apper on my desktop machines.

But, I do understand the need and want of an OpenSource and free jvm implementation that people easily can contribute to and optimize. A custom jvm tweaked for your own projects would be really nice to have and could improve the perfomance of a lot of legacy systems.

Sun Recasts Java Licensing for GNU/Linux and OpenSolaris Communities

Thursday, May 18th, 2006

Sun Recasts Java Licensing for GNU/Linux and OpenSolaris Communities
> SAN FRANCISCO, JAVAONE CONFERENCE, May 16 /PRNewswire-FirstCall/ — Sun Microsystems, Inc. (Nasdaq: SUNW), the creator and leading advocate of Java™ technology, today announced that Java Platform, Standard Edition (Java SE) 5 is now available for redistribution by GNU/Linux and OpenSolaris(SM) operating system distributors under the new Operating System Distributor’s License for Java (also known as the “Distro License for Java” or DLJ).

About time! Getting and keeping Java current has been a major hassle every time I reinstall a system. I’ve lost count of the number of times I’ve had to manually download the j2sdk, make a package and install it. It’ll be interesting to see where Java ends up with the promise from Sun to open up more and more of the platform. Oh, it’s already in Dapper Multiverse.

Java Ices

Friday, October 21st, 2005

Work has required me to look into streaming of audio/video at work, and as we’re mainly a Java shop, I’ve been struggling with audio decoding/encoding and Java. Java really needs to get its act together, and come up with a streamlined & polished media solution that actually works out of the box. I’ve been forced to debug and hack lowlevel `.c` wrappers around shared libs, I’ve had to trace through tons of Java code, and I’ve had to poke at way too much stuff to get everything to play along nicely.

Anyways, I did get it working, and now I have a Java version of Ices / ezStream, which can take input from anything JMF can handle, and output as many MP3/Ogg streams of different bitrates as the machine can handle, and feed those outputs to `IceCast2`, `ShoutCast` or `DarwinStreamingServer` for further broadcasting.

vorbisspi and length calculation

Monday, October 17th, 2005

Seems the latest version of Jorbis has a bug which causes the length of a `.ogg` song to get a negative value if it’s longer than ~34 minutes. As I mostly deal with livesets of several hours, this didn’t work well for me.

Anyways, the fix is to convert the length calculation `int`s to `long`, and remove the `Math.round()` calls.

Tritonus Vorbis Encoding

Saturday, October 15th, 2005

I’ve been working on audio encoding using Java at work for a while, and one problem I ran into was with Tritonus and encoding a pcm stream to Ogg Vorbis. No matter what I did, I only got sound in the left channel.

It seems Tritonus assumes that the channel buffers from libvorbis are allocated as one large block, which is no longer the case. Changing `tritonus/src/lib/vorbis/org_tritonus_lowlevel_vorbis_DspState.c` around line 183 to:

(*env)->GetFloatArrayRegion(env, floatArray,
0, nValues, bufferPointer[i]);

did the trick for me, and I suddenly got sound in both channels again.