Skip to main content

JavaFX script compiler error

2 replies [Last post]
terra_chan
Offline
Joined: 2008-02-01

I read the SDN tutorial article "Creating Rich Internet Applications With Compiled JavaFX Script Technology," and obtained JavaFX compiler as following the description "Obtaining the JavaFX Script Compiler."
I expanded the archive.zip file and tried to compile the Code Sample 1. But, I got following messages displaying infinitely.
line 56:0 rule RBRACE failed predicate: { !BraceQuoteTracker.rightBraceLikeQuote(CUR_QUOTE_CTX) }?
Does anyone know the cause? My Java version is JDK 1.5.0_11. But, I think it's a compiler problem. It is not a appropriate action as displaying message infinitely, at least.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terra_chan
Offline
Joined: 2008-02-01

The problem is solved.
I updated my JDK version from jdk1.5.0_11 to jdk1.6.0_04. And the compiled JavaFX code is successfully executed:-)

terra_chan
Offline
Joined: 2008-02-01

I found the cause.
Closing double quotation mark for the message attribute of the MessageDialog is missing in the Code Sample 1. I added it and compilation is safely done.
But, when I executed the compiled code, following message is displayed.
----------------------------
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
-------------------------------------
The tutorial said that "You must have [b]JRE 5 or later[/b] to compile and run JavaFX Script programs" and I used the jdk1.5.0_11 as mentioned before. Do I make a mistake anything else?