Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to run JavaFX jar with JRE7 on MAC OS Lion 10.7.5 ?

875776Dec 26 2012 — edited Jan 2 2013
I have created a bundled JavaFX application jar with ANT on Windows 8 O.S. , 64 bit machine. I have JavaFx2.0 and Java 1.7.0_09 installed on my Window O.S.
<target name="CreatingJars" depends="Compiling" description="generate the distribution" >
				<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"      
			         	uri="javafx:com.sun.javafx.tools.ant" classpath="${env.JAVA_HOME}/lib/ant-javafx.jar"/>
			         	
		                <mkdir dir="${WorkingFolder}/temp/libs"/>
					<copy todir="${WorkingFolder}/temp/libs">
					<fileset file="${WorkingFolder}/CustomJars/ProjectLib.jar">
					</fileset>
					</copy>
					<copy todir="${WorkingFolder}/temp/libs">
					<fileset dir="${WorkingFolder}/libs">
					</fileset>
				</copy>
				
				<fx:jar destfile="${WorkingFolder}/${app.name}.jar">
				<fx:application mainClass="${main.class}"/>
				<fx:resources>
					<fx:fileset dir="${WorkingFolder}/temp/"/>
				</fx:resources>
					
				<fileset dir="${WorkingFolder}/build"/>
				<fileset dir="${WorkingFolder}/resources"/>
				</fx:jar>
	</target> 
When I am trying to run that JavaFX application jar on MAC OS Lion 10.7.5 using

java -jar application.jar

It always shows a dialog "The application require a newer version of Java Run-time" with download link. Even I have downloaded and successfully installed it on my MAC machine but it still shows me the same window.

java -version is always point to 1.6.

Then I searched for Java Preferences to point the current JRE 1.7 but I could find Java Preferences at Applications -> Utilities -> Java -> Java Preferences.

I would like to know -- how to run JavaFX jar with JRE7 on MAC OS Lion 10.7.5? Is their any other way to run the JavaFX application JAR with JRE7?
This post has been answered by jsmith on Dec 31 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2013
Added on Dec 26 2012
8 comments
1,958 views