Main

May 12, 2011

JSP JSTL FMT, UTF-8 Unicode and native2ascii

So you need Japanese in a J2EE JSP. You do something like this.

<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<c:if test="${param.locale == 'jp'}"><fmt:setLocale value="jp" scope="session"/></c:if>
<fmt:bundle basename="com.example.Example"/>
<fmt:message key="example" var="example"/>
${example}

And then you use native2ascii from the JDK on a UTF-8 file filled with Japanese. You then add this to a property file. And get garbage when running the JSP. Why ?

Because, and I forget this over and over again, the tool exports escaped UTF-16 two byte pairs by default. What you want is:

native2ascii.exe -encoding UTF-8 Example.properties

March 29, 2011

Free color tool for web developers

The Colorspace history dialog is now part of the standard and free feature set. The Mac OS X build might be broken due to a problem with the automatic build system. 64bit builds are available for Windows and Ubuntu Linux, but 32bit executables are most likely the best option because of issues with the way Java VM's are installed. JRE_HOME and TEPPEFALL_JVM can be used to select a specific Java VM.

Free color tool for web developers (screenshot).

January 27, 2011

Salesforce.com launches Database.com, buys Heruko, Oracle drops Ruby

Salesforce Unveils Database Product, Taking On Oracle.

Salesforce's Heroku Acquisition Redefines Cloud Computing.

Ruby on Rails Support Discontinued in NetBeans IDE.

Is Oracle being paranoid or just pragmatic ?

January 24, 2011

A test too far

This article makes me wonder if the Oracle/Google lawsuit is 50 percent based on "some guy commited something to source control because".

Maybe we should call it console fire ? Like as in "helmet fire". Maybe too dramatic.

January 12, 2011

Designing for touch devices and HTML5

I forgot to mention it, but Teppefall DevGrid looks the way it does because it has been designed for mobile devices and tablets.

The clue to getting it right is this HTML meta tag:

<meta name="viewport" content="width=device-width, user-scalable=yes, maximum-scale=1.0"/>

You also need to use min-width and max-width CSS values instead of fixed values and sometimes use percentage based layout that floats to the left. I also add extra CSS if a mobile device is connected to reduce vertical space requirements. Overflow rules are used to hide wide images.

January 11, 2011

Introducing Teppefall DevGrid

This is the first "cloud based" product from Teppefall. More information will come over the next couple of months. It runs on Google AppEngine and is standard J2EE plus a few Google extensions. JavaMail, Twitter4J and XMPP works great.

January 07, 2011

What was the most significant Java-related news in 2010?

Here are my nominations (Updated *):


  • 8 - Every single Sun evangelist who claimed Java UI was on track has quit or stopped talking.

  • 7 - JavaFX Mobile Profile and Java Store turns out to be Schwartz (hot air).

  • 6 - Sony Ericsson, listed as a JavaFX supporter, releases top of the line Android phones*.

  • 5 - Apple thinks J2SE is a waste of time because of braindead JavaFX royalty play*.

  • 4 - James Gosling quits!

  • 3 - Oracle pulls a SCO against Google. JavaFX language probably killed because of the lawsuit.

  • 2 - Oracle pisses on Apache Software Foundation over TCK. Because hating your friends is cool.

  • 1 - Apache tells JCP to go **** themselves in concise, well formulated, diplomatic terms.

January 05, 2011

Sneak peak - HybridKit

Alpha product. Even the website is alpha. Teppefall HybridKit coming soon to a device near you.

December 14, 2010

Useless programmers blame the programming language

Therefore C/C++/Java sucks. QED.

December 11, 2010

Calling Oracle's SCO bluff

The reason Harmony is not getting a TCK is because Oracle wants Android to run a non-standard version of OpenJDK. Oracle wants Google Android as their property. It is like SCO versus IBM. But with a twist. Oracle wants Harmony to legitimize this legal attack through the JCP. Because without Apache Oracle just looks like a bunch of thugs stealing from their own. This is not an attack on Google. It is an attack on open source developers and public standards. SQL, Java, etc.

Continue reading "Calling Oracle's SCO bluff" »

October 27, 2010

Java developers are whiny self-obsessed bitches

Oracle sues Google. IBM joins OpenJDK. Apple drops Mac Java VM.

Well. Freaking. Duh.

Apple has hundreds of thousands of developers making iOS applications and 57 people doing Java Swing development. Every single one who whines about the depreciation of the Mac Java virtual machine is probably some sort of server programmer who whines about not being able to run Eclipse, IntelliJ or Netbeans, without installing a virtual machine, on his or her $5000 SSD MacBook Pro.

Continue reading "Java developers are whiny self-obsessed bitches" »

October 21, 2010

No Java in Mac App Store

Code signing for everybody, here we come. And yeah, this applies to everyone once the Apple propaganda machine starts talking about dangerous non-MacAppStore non-signed executable files Basically both Microsoft and Apple has decided that code signing is the cure that fixes all those buffer overruns in third party software and/or operating systems. And this is why Java and Flash/PDF is being spanked in public.

Ah well, Sun and Adobe screwed up on security and this is the result. Jobs and Balmer hates incompetent wannabe competitors who makes their platform look bad. The big boys are putting their foot down. Well, for as long as Ubuntu will let them. This might be an opportunity for Ubuntu Linux, Xen and VirtualBox. Some may talk about Google Chrome OS, but to me it looks like a toy for kids.

Happy now JavaFX team ?

Apple JVM becomes EOL in OS X Lion. InfoQ coverage.

Now Mac OS X JRE is Oracle's problem. Should be easy to perfect Prism when you have complete control.

October 20, 2010

Demand JCP standardization of JavaFX in Java

Since Sun has been such a stickler about standardization, why not apply the same standards to Java-JavaFX as we do to J2EE and Java 7 ? Go to the Java Community Process website and ask where the JavaFX Java Specification Requests (JSR) can be downloaded !

Set up an expert group and let them vote on the inclusion of JavaFX in the JRE. Oracle would love this. It allows Oracle to showcase their openness and professionalism. And when you read a Oracle white paper, or a public API, you can be sure this is not some random garbage put out to please the crowd before public events.

August 16, 2010

Oracle will loose or reach a settlement with Google

What is a "mobile device" anyway ? A laptop ? The Apple iPad ? Google Android is superficially more similar to J2SE than JavaFX powered by Prism. How is Android or Harmony J2ME when they do not implement J2ME profile classes ? How the hell can Oracle sue a J2SE open source implementation running on an internet connected 1GHz computer with eight gigabytes of shared memory and a 800x480 screen (Samsung Galaxy S) ?

Continue reading "Oracle will loose or reach a settlement with Google" »

July 14, 2010

Java 6u21 DownloadServiceListener example

Testing out the 1.6.0_21 new progress-class attribute in JNLP.

What is funny about this new release is that all JavaFX developers must PAY MONEY to run their code. Or they get this message. Or maybe I am wrong and screwing up cross domain issues. Who the heck knows. This is the second or third time they pull a move like this without writing any advisories on it.

It is also funny how clicking YES and NO both hang my software. Is someone making assumptions about threads ? Silly me ?

Warning - Security2222.png

You can see the new DownloadServiceListener loader function here . Media player and 3D is now broken because Sun changed the rules... again. If nothing happens you might have to clean the Web Start cache. You must run Java 6u21.

July 06, 2010

The reason why .NET is not a startup technology

A PHP shared server account costs $9 a month. A J2EE virtual dedicated costs $50. A .NET dedicated costs $250. .NET and IIS on a VM over Remote Desktop is a horrible development experience. SSH, SFTP, Dreamweaver, Eclipse and J2EE is much easier. And Apache Perl/Python/PHP is often installed by default on Linux.

Continue reading "The reason why .NET is not a startup technology" »

May 25, 2010

Did MPEG LA kill media support in Java

Sun removed JMediaPane from the JavaFX build a while back. Which is bizarre since JavaFX has complete support for ON2 video. So why did this happen ? Why is JMediaPane in the JRE a problem when Web Start powered JavaFX is ok ?

The German company Nero AG is telling us that MPEG LA sued them over royalties earlier this year. Basically MPEG wants cash in hand every time someone downloads a Nero video aware product. And then the question becomes. Is this why JavaFX ON2 video support is based on Web Start ? To circumvent the MPEG LA patent pool ?

Basically MPEG LA did a very naughty thing. They added a metric ton of patents to their patent pool AFTER all the developers had signed up. So now MPEG owns the entire video marked. They can become a patent troll for the next 100 years. Just look at Canon video cameras that cost $10 000 and which are, and I kid you not, NOT for professional use ! Professional use requires that you pay royalties to MPEG every time someone downloads your video.

Nero has now filed an antitrust suit against MPEG LA. So maybe some tasty information might leak out.

April 29, 2010

Swing XML layout with no dependencies

This article is a continuation of my article about how to start a Swing application. You must download the Teppefall Layout tool to create the correct XML. If you do not want to use this tool (trial is free), you can also use the XSLT files found in the "transformers" folder instead.

This will only work if you remove the Teppefall API's from the JXML. JXML is simply short for Java XML, which is a standard object serialization format in the JRE. The ViewImporter.test method should be called on the Event Dispatch Thread (EDT). In other words, on the Application.create method in the previous article.

Continue reading "Swing XML layout with no dependencies" »

January 16, 2010

64bit support is coming

Supporting 64bit is not very important when most of your code is in Java. But Teppefall does have around 300kb of C++ that needs to be ported. And the process is something like this.


  • Install crazy big Windows SDK and Visual Studio on Windows 7.

  • Realize that the Windows documentation is wrong when it comes to "vcvarsall.bat amd64".

  • Dig around for a while.

  • Find the correct BAT based configuration files and drag them into the application menu.

  • Create custom makefiles.

  • Scratch your head as Microsoft uses the suffix "32" in paths and library names everywhere.

  • More mind numbingly boring rewriting of makefiles.

  • Everything compiles, but Winsock related code is broken. Might be configuration. Might be worse.

  • Realize that 64bit JRE writes a registry JVM value that points to a non-existent file. My fault ?

  • But the code supports that, so just use TEPPEFALL_JVM variable.

  • Success!


Itanium support is probably not happening. The compiler can't find "Windows.h" under the IPF configuration and that's kind of a problem unless I want to dynamically load every method. 64bit Windows 7 also seems to crash some plug-in based systems. They keep changing the security model and developers are behind all the time for some reason. Although, the same problem exists on 64bit Linux. Which is stranger since 64bit compiler support is just a GCC parameter away.

December 11, 2009

Which one is Swing and which one is WPF ?

Teppefall Media Player (91).png

Teppefall Media Player (93).png

The volume component gives it away. But Silverlight 4 may change that.

December 10, 2009

Sun is missing out on a huge opportunity

Teppefall Media Player (85).png

By being hell bent on "finishing" JavaFX instead of augmenting Swing Sun has more or less destroyed their credibility as a desktop platform company. The reality is that Swing plus a scene graph, accelerated layers and a new media framework is more valuable than the entire JavaFX ecosystem. Adobe, Microsoft, Apple, Opera, Mozilla and Google all believe that XML is the future of layout and yet Sun believes a non-standard syntax based on Lisp and JSON is the way to go. And the fact that C#, Actionscript, Dalvik and Javascript are all Java clones seems to indicate that Java is just fine as a user interface language. Adobe even exports twine animation code as XML and vectors as SVG. I sit here working in Adobe Creative Suite and wonder what Sun is thinking.

Continue reading "Sun is missing out on a huge opportunity" »

September 27, 2009

Suck on this Adobe

suck-on-this-adobe-thumbnail.jpg

This is a Remote Desktop screenshot of a brand new Quad Intel i7 / Windows 7 system running 16 FLV movies, or maybe just 14, in Teppefall Media Player (JMC/Swing). It's not usable, but it does run. Still not able to do this in WPF, though. I can only play one WPF MediaElement video stream for some reason. Maybe it's a bug in my code. Don't know.

Adobe Flash will still own the marked, but Sun could get a share of it by fixing the security problems related to Swing. It might be possible to create an FLV player in Java Swing that is faster than a Flash 10 based player. JavaFX might do the same, but only if they put JavaFX inside the JRE. Downloading a 15Mb JavaFX player is not a very useful experience after downloading a 15Mb JRE. My biggest concern is not Windows, but rather OS X people in an infinite bitching loop.

I guess this demo proves that my layout technology is pretty scalable. Though, JMC is still not ready for professional use. There are audio and video synchronization problems everywhere.

September 21, 2009

Comparing Swing with WPF one more time

Here are two similar screenshots. Sun uses a pretty brutal video scaling algorithm and this is a better screenshot than the one below this post.

Sun seems to be in a coma, so I'm only working on the WPF version.

Teppefall Media Player (58).png

Teppefall Media Player (WPF) (7).png

August 05, 2009

Java Swing versus WPF running on Windows Vista Chuck Norris Edition.

Do you know what a guy like me does when Sun Microsystems refuses to release JMediaPane, a Swing API that was announced almost three years ago ? Do I create a lot of JavaFX code and then go into a corner and cry ? No... I create the same media player in Microsoft WPF and C#. That's what people like me do. Yeah, Chuck Norris approves this message !

Teppefall Media Player (54).png

Teppefall Media Player (WPF) (6).png

Continue reading "Java Swing versus WPF running on Windows Vista Chuck Norris Edition." »

Java Swing versus Adobe Flash/Flex

This is really a stupid test, but I'm showcasing this just to give Adobe a little hint. This my JMC based video player playing four FLV encoded videos versus playing one FLV video in the Adobe Media Player. A lot of memory is being used by the AMP streaming logic, syndication system, image cache, theme system, animation engine and such but the memory usage is still pretty spectacular. But that's not the most shocking issue. The CPU usage is for some absurd reason in the same ballpark. Give or take a few ballparks in scientific accuracy.

Teppefall Media Player (43).png

Adobe Media Player (7).png

Continue reading "Java Swing versus Adobe Flash/Flex" »

July 22, 2008

AMF.. huh?

This is my comment to Bruce Eckel's post Does Anyone Really Care About Desktop Java?. I really enjoyed the honesty in the comments and recommend that people read them.

Swing is difficult because it tries to solve difficult problems. Flex is much more specialized and supports a small subset of Swing's features. If you think Flex competes with Swing you probably also think that “web operating systems” done in Javascript and HTML competes with Windows and OS X. Yes, you can replace a Swing application with a Flex application if the application fits within the feature specification of Flash, but Swing is more similar to QT than Flex.

Continue reading "AMF.. huh?" »

March 19, 2008

Writing Teppefall applications in Javascript

It was never my intention to write Teppefall applications in Javascript, but here is a simple example on how to do it. The update system, the DSR (Teppefall Runtime) launcher and some Application logic is not available at this time because of dependency problems. It is hard to use Javascript when the concept of a Class is replaced with something else. And working with all kinds of adapter logic is also pretty confusing.

If you want to run this example, just move the /network_app folder into the Teppefall SDK root folder and run Network.cmd or NetworkOSX.sh. This demo showcases plugins, the taskbar icon, layout and basic setup.

You have to download Teppefall Layout to get the original layout file used in this example.

Teppefall SDK Javascript example: network_app.zip

network.js
network_plugins.js

Teppefall Network Teppefall Network

Continue reading "Writing Teppefall applications in Javascript" »

June 25, 2007

The funniest thing about Flex and Apollo (AIR) is...

Memory usage ! I get all teary eyed when I see this. Tamarin seems to be just as greedy as Hotspot.
Well.. at least in this totally non-scientific test. It is beta after all... dude.

Tamarin VS Hotspot - Apollo/AIR VS Java

June 21, 2007

JSlider is stupid

Why is this not the default behavior ?

Continue reading "JSlider is stupid" »

SystemTray and Swing

An attempt to merge SystemTray with a Swing JPopupMenu. If you like problems, try this code.

Continue reading "SystemTray and Swing" »

June 17, 2007

Awesome Java resource

Sun's Technical Articles and Tips . Tons of Java goodness.

June 03, 2007

Java Media

This blog post by Chris Adamson is a good read. Even got a line or two about Java FX in it.

This guy has been doing a lot (well, more than you) of Quicktime code and understand the boring problems. My addition to his words is that any new audio/video support is not really that helpfull without a new media Applet system or first class Web Start support. The current Applet loader just crashes Firefox over and over again. They have to rethink the class loading system and cut down the number of file reads on the disk. Starting an Applet today is like starting Photoshop.

Web Start is looking better and better, but is still a bitch to debug and still slightly retarded when in sandbox mode.

May 27, 2007

Writing Darkstar applications in Python

You don't have to use Java in order to create Darkstar applications. Here is a simple project I wrote in Python - py_dsi.zip.

Darkstar application written in Python

Continue reading "Writing Darkstar applications in Python" »

May 26, 2007

Using Darkstar 2D in a CAPTCHA system

Darkstar 2D, the system that powers Surface, can also be used in web applications. Here is a simple example in the form of a visual barrier. Darkstar 2D also supports rendering over Java RMI if you need to be able to read Photoshop PSD files on a Mac from a Linux server. The RMI code takes forever to initialize but is quite snappy when operational.

This example is running on a Linux box and uses -Djava.awt.headless=true since it has no GUI system installed.

visualbarrier

May 20, 2007

Java FX

There has been a lot of broo-ha about Sun's new Java FX platform. Personally I see Java FX as an attempt to move forward on the mobile platform and to replace Java ME with a more powerful Java SE stack, but a lot of people see this as a Flash/Flex/WPF competitor and therefore po-po it as such. Maybe the people at Sun didn't get or read the memo. Or maybe the memo raised an ArrayIndexOutOfBoundsException when reading it backwards. Who knows.

Continue reading "Java FX" »

Next generation Teppefall software

Coming soon to Teppefall Link.