Skip to main content

Which java version supported for javafx script

2 replies [Last post]
thamizh
Offline
Joined: 2005-11-25
Points: 0

I started doing javafx script reading. i have written a HelloWorld.fx file. which java version is supported for javafx. i am using jdk 5 now. After the compilation i am getting "Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file" this error. can any one help me on this.

This may be a smalll question.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tball
Offline
Joined: 2003-06-10
Points: 0

The JavaFX Script compiler's default Java target is 1.6 (Java 6). To create files that can be run using Java 5, add "-target 1.5" to the compile command.

If you are using a NetBeans project, the target is specified by editing the project's properties: right-click on the project, and select properties, then select "Java 5" in the "Source/Binary Format" drop-down list. This sets an Ant property named javac.target, which is passed to the compiler the same way as is done when using the command-line.

Tom

thamizh
Offline
Joined: 2005-11-25
Points: 0

Hi Tball,

Thanks. This is working for me using -target 1.5. Once again thanks for your help. Do you have any good links to refer javaFX