Mittwoch, Juli 09, 2008

javafx and Mac OS X

I installed JavaFX as bin package. Unpacked it into /opt/local/lib/javafx and moved everything from archive/openjfx-compiler/dist into it.

Like stated on the page I've set the execution bit and updated the path variable.
export PATH=$PATH:/opt/local/lib/javafx/bin

The first example was HelloCompiledJavaFX.fx.

Starting it lead to the error message:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

The default version of java and javac on OS X 10.5.4 is 1.5.0_13. As this example worked under linux with Java 1.6 I tried this.

As I'm new to the Mac, I don't know if it is possible to switch the installed Java version via System Preferences. But luckily Java has it's own way.

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands:$PATH
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

And now the JavaFX application runs fine.

Samstag, Juli 05, 2008

copy eclipse projects to OS X

The projects from the old 3.2 eclipse installation (linux) don't show up in the new 3.4 one (OS X). The projects are part of a Mercurial repository. The clone worked fine from view of Mercurial. But eclipse didn't show this projects.

Import from the workspace was not possible. It worked only after I moved this projects outside the workspace. But the projects should be locate inside the workspace. All machines should have the same file structure.

Adding the missing project again made the complete project with all is content visible. The original and the new .project file are equal.

A look at /Applications//eclipse/ didn't reveal any obvious information about used projects.

I will try this on linux and Windows after I updated eclipse to 3.4 on this machines.