Skip to main content

Posts

Installing Firefox Java plugin on Ubuntu Linux for Dummies

As a Windows user, I was amused how not easy to install Java on Ubuntu Linux (10.04) nor installing Java (1.6) plugin into Firefox (3.6). It's not nearly a download-next-next-finish task. Additionally, digging into forums I found a lot outdated solutions which I tried and soon realized that they doubtlessly aren't working. Here is the one which worked for me: First, open a terminal window: Applications menu -> Accessories -> Terminal. Type the followings (you will be promted for admin password, because sudo prefix means you want to do something in the name of the super (or sytem) user): sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo aptitude update sudo aptitude install sun-java6-jdk Then you have to select things with arrows and pressing enter. Then Timothy says in the forum you have to type this, but I didn't need it: sudo update-alternatives --config java Now you can check if java is installed by typing java -version . ...

Web-based chart libraries

Recently I was hunting for good web-based client-side chart-drawing libraries . I've found a number of blog entries or articles which enumerates some subset of existing frameworks and write sentences about them, like this: ' This is fancy, this is not so fancy but it's still good. ' Those writings didn't help me a lot. What I am interested in? Presentation model: Can be Flash, HTML Canvas or any other magic. This influences interoperability and scalability of the charts. Licensing model: Is it free, commercial or GPL. Dependencies: Should I have to bring another dependencies with the chart-drawing facility? Docs: quality of documentation. Examples: quality of examples. And finally, outlook of the charts and number of the options are also matters. I've found 16 libraries up to now and made an overall matrix about them, regarding considerations above. Check it out.

Brillien

There were three presentation as usual at the 14th Java User Meeting at Budapest yesterday, but this time I'll write only about the first one. Imre Fazekas had been invited from Debrecen to make a presentation about Brillien , their Java enterprise platform. It's an alternative way of modeling and implementing business logic in place of Java Enterprise (J2EE) Technology. It uses invasive programming model which means we have to extend classes from Brillien superclasses and we may use annotations. The whole system based on asynchronous XMPP communication and a set-context-flow concept. It's something like an application server, but uses a more logical and set-based approach. As the presenter said, it has very good speed and performance characteristics. Currently there are no IDE or other tools for editing models because this is a very young project, however a Maven plugin and a Maven archetype is accessible on the homepage. A very good introduction and tutorial can be also ...

Hacking Apache POI

In the near future, presumably, I'll have to read and process complex xlsx documents containing a lots of formulas. Jexcelapi can't even open those kinds documents, so I turned to Apache POI . Unfortunately, POI also have problems with some formulas becase support of this field is not fully laboured. [ Update 2010.03.10: After some experimentations I found that Apache POI can read and process new Excel ( xlsx ) documents including calculating very complex formulas: Basically, cell.getStringCellValue() gives the evaluated outcome. This way, I didn't have to hack POI. That's great!] I choosed to start two methods: Knowing exact static structure of the Excel template document, I do problematic calculations in the reader program itself, eliminating POI's formula support. I study Apache POI's internal structure and try to make up the missing functionality. Unfortunately, POI isn't amendable in a non-invasive way with registering components at certain extensi...

Json-lib vs Hibernate

Subtitle: java.util.Date vs java.sql.Timestamp One of my projects has a data path where Hibernate entities are converted to Json objects by using json-lib . I have some special formatters, e.g. for Date objects for having an easy readable format instead of this: {"date":1,"day":4,"hours":1, "minutes":0,"month":0,"nanos":0, "seconds":0,"time":0,"timezoneOffset":-60,"year":70} A JsonConfig object can be suited by special formatters which later will be given to the fromObject method: JsonConfig cfg = new JsonConfig(); cfg.registerJsonValueProcessor( java.util.Date.class, new JsonValueProcessor() { private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd"); public Object processArrayValue(Object value, JsonConfig c) { return format((Date)value); } public Object processObjectValue( String key, Object v, JsonConfig c) { return format(...

jxl.log

In an intranet production environment we have running a Glassfish v2 appserver with several J2EE applications which all use JexcelApi , a.k.a JXL, which is an open source library for accessing, generating or manipulating Microsoft Excel documents. We use version 2.6.3 of JXL because it's the recent one in the Maven repository which we use, however, at the official JXL site there are newer versions. Additionally we have log4j and Java Commons Logging (JCL), ignoring Glassfish's JSR-47 Java Util Logging (JUL) facility. Application #1 uses purely log4j and gets its log4j.xml config from a custom location. Application #2 runs Java Commons Logging with no explicite configuration file given, so JCL uses the default JUL facility of the appserver. Application #1 had been running for a long time without problems but when we installed #2 we realized that a jxl.log file had been created in the glassfish/domain/domain1/config directory and it's rapidly growing. As it happens, we ...

JUM VIII. - IX. - X.

In the recent months there were a few Java-related microconferences organized at Budapest. At the eighth occassion of the Java User Meeting (JUM) in January we had a presentation about OSGi by local guys and about Flex by Cornel Creanga from the Romanian Adobe office. I've read his blog and I must say life of an evangelist can be very cool (if there's no wife or girlfriend:)). Visiting Java and Adobe user groups all around in Europe, it's great. At the ninth occasion in March we had three presentations: introduction to the Maven build system, SOAP testing with SOAPui and various other components, and OLAP architectures. The latter was driven by the magnificant prezi presentation engine, which is a very young Hungarian startup project and which will be introduced soon at the Silicon Walley and I'm sure it will have a great success. Otherwise, I guess this time we beat down the highest participant number with about 40 attendees. At the tenth occassion we had a pr...