Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2128 > unrolled thread
| Started by | piscesboy <oraclmaster@gmail.com> |
|---|---|
| First post | 2012-09-29 15:00 -0700 |
| Last post | 2012-10-02 15:55 -0700 |
| Articles | 17 — 5 participants |
Back to article view | Back to comp.lang.java.help
Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-09-29 15:00 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Knute Johnson <nospam@knutejohnson.com> - 2012-09-29 17:51 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Lew <lewbloch@gmail.com> - 2012-09-30 17:33 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-10-01 09:27 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Knute Johnson <nospam@knutejohnson.com> - 2012-10-01 11:01 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-10-01 11:32 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Knute Johnson <nospam@knutejohnson.com> - 2012-10-01 12:36 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-10-03 00:50 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Knute Johnson <nospam@knutejohnson.com> - 2012-10-03 06:39 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Jeff Higgins <jeff@invalid.invalid> - 2012-10-02 03:02 -0400
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Jeff Higgins <jeff@invalid.invalid> - 2012-10-02 03:16 -0400
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-10-03 00:46 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... markspace <-@.> - 2012-10-03 08:48 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Jeff Higgins <jeff@invalid.invalid> - 2012-10-03 16:00 -0400
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Lew <lewbloch@gmail.com> - 2012-10-01 13:10 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... piscesboy <oraclmaster@gmail.com> - 2012-10-01 18:38 -0700
Re: Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... Lew <lewbloch@gmail.com> - 2012-10-02 15:55 -0700
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-09-29 15:00 -0700 |
| Subject | Newbie Question: Help using JavaFX on Java 7 for Mac OS X 10.7.5... |
| Message-ID | <fead3281-6eb8-410b-9d07-19d8f9b00dea@googlegroups.com> |
I just downloaded and installed the Java7 update 7 JDK for Mac OS X via the convenient .dmg installer on the Oracle website. JavaFX SDK is supposed to be included
I want to get started on some example JavaFX applications...a simple HelloWorld app to get started using it and to verify that JavaFX works on my system. Here's the code for HelloWorld.java:
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class HelloWorld extends Application {
@Override public void start(Stage stage) {
Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
stage.setTitle("Welcome to JavaFX!");
stage.setScene(scene);
stage.sizeToScene();
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
I tried compiling via standard javac HelloWorld.java and the following error occurs:
import javafx.application.Application;
^
HelloWorld.java:2: error: package javafx.scene does not exist
import javafx.scene.Group;
^
HelloWorld.java:3: error: package javafx.scene does not exist
import javafx.scene.Scene;
^
HelloWorld.java:4: error: package javafx.scene.text does not exist
import javafx.scene.text.Text;
^
HelloWorld.java:5: error: package javafx.stage does not exist
import javafx.stage.Stage;
^
HelloWorld.java:7: error: cannot find symbol
public class HelloWorld extends Application {
^
symbol: class Application
HelloWorld.java:9: error: cannot find symbol
@Override public void start(Stage stage) {
^
symbol: class Stage
location: class HelloWorld
HelloWorld.java:10: error: cannot find symbol
Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
^
symbol: class Scene
location: class HelloWorld
HelloWorld.java:10: error: cannot find symbol
Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
^
symbol: class Scene
location: class HelloWorld
HelloWorld.java:10: error: cannot find symbol
Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
^
symbol: class Group
location: class HelloWorld
HelloWorld.java:10: error: cannot find symbol
Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
^
symbol: class Text
location: class HelloWorld
HelloWorld.java:9: error: method does not override or implement a method from a supertype
@Override public void start(Stage stage) {
^
HelloWorld.java:19: error: cannot find symbol
Application.launch(args);
^
symbol: variable Application
location: class HelloWorld
It is obvious that it is not finding the JavaFX library to compile. I did a search and found that the jfxrt.jar file is required to compile and run it. But it is located inside of the folder:
/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib
which is inside of the JDK virtual machine folder for Java 7. I don't think there is any magic classpath command needed to compile this simple program but I could be wrong.
[toc] | [next] | [standalone]
| From | Knute Johnson <nospam@knutejohnson.com> |
|---|---|
| Date | 2012-09-29 17:51 -0700 |
| Message-ID | <k4852u$qal$1@dont-email.me> |
| In reply to | #2128 |
On 9/29/2012 3:00 PM, piscesboy wrote:
> I just downloaded and installed the Java7 update 7 JDK for Mac OS X via the convenient .dmg installer on the Oracle website. JavaFX SDK is supposed to be included
>
> I want to get started on some example JavaFX applications...a simple HelloWorld app to get started using it and to verify that JavaFX works on my system. Here's the code for HelloWorld.java:
>
> import javafx.application.Application;
> import javafx.scene.Group;
> import javafx.scene.Scene;
> import javafx.scene.text.Text;
> import javafx.stage.Stage;
>
> public class HelloWorld extends Application {
>
> @Override public void start(Stage stage) {
> Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
>
> stage.setTitle("Welcome to JavaFX!");
> stage.setScene(scene);
> stage.sizeToScene();
> stage.show();
> }
>
> public static void main(String[] args) {
> Application.launch(args);
> }
> }
>
> I tried compiling via standard javac HelloWorld.java and the following error occurs:
>
> import javafx.application.Application;
> ^
> HelloWorld.java:2: error: package javafx.scene does not exist
> import javafx.scene.Group;
> ^
> HelloWorld.java:3: error: package javafx.scene does not exist
> import javafx.scene.Scene;
> ^
> HelloWorld.java:4: error: package javafx.scene.text does not exist
> import javafx.scene.text.Text;
> ^
> HelloWorld.java:5: error: package javafx.stage does not exist
> import javafx.stage.Stage;
> ^
> HelloWorld.java:7: error: cannot find symbol
> public class HelloWorld extends Application {
> ^
> symbol: class Application
> HelloWorld.java:9: error: cannot find symbol
> @Override public void start(Stage stage) {
> ^
> symbol: class Stage
> location: class HelloWorld
> HelloWorld.java:10: error: cannot find symbol
> Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
> ^
> symbol: class Scene
> location: class HelloWorld
> HelloWorld.java:10: error: cannot find symbol
> Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
> ^
> symbol: class Scene
> location: class HelloWorld
> HelloWorld.java:10: error: cannot find symbol
> Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
> ^
> symbol: class Group
> location: class HelloWorld
> HelloWorld.java:10: error: cannot find symbol
> Scene scene = new Scene(new Group(new Text(25, 25, "Hello World!")));
> ^
> symbol: class Text
> location: class HelloWorld
> HelloWorld.java:9: error: method does not override or implement a method from a supertype
> @Override public void start(Stage stage) {
> ^
> HelloWorld.java:19: error: cannot find symbol
> Application.launch(args);
> ^
> symbol: variable Application
> location: class HelloWorld
>
>
> It is obvious that it is not finding the JavaFX library to compile. I did a search and found that the jfxrt.jar file is required to compile and run it. But it is located inside of the folder:
>
> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib
>
> which is inside of the JDK virtual machine folder for Java 7. I don't think there is any magic classpath command needed to compile this simple program but I could be wrong.
>
Yes you need the magic CLASSPATH to compile it. I don't know why when
the put FX in the JDK and JRE that it isn't already in the classpath but
it isn't. So just add it to your CLASSPATH and it will work just fine.
--
Knute Johnson
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-09-30 17:33 -0700 |
| Message-ID | <6efa5c08-67a8-4266-900d-b69bcc294a4a@googlegroups.com> |
| In reply to | #2129 |
Knute Johnson wrote: > piscesboy wrote: >> I just downloaded and installed the Java7 update 7 JDK for Mac OS X via the convenient .dmg installer on the Oracle website. JavaFX SDK is supposed to be included > >> I want to get started on some example JavaFX applications...a simple HelloWorld app to get started using it and to verify that JavaFX works on my system. Here's the code for HelloWorld.java: > . . . >> HelloWorld.java:2: error: package javafx.scene does not exist >> import javafx.scene.Group; >> ^ >> HelloWorld.java:3: error: package javafx.scene does not exist > . . . >> It is obvious that it is not finding the JavaFX library to compile. I did a search and found that the jfxrt.jar file is required to compile and run it. But it is located inside of the folder: > >> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib > >> which is inside of the JDK virtual machine folder for Java 7. I don't think there is any magic classpath command needed to compile this simple program but I could be wrong. Clearly. > Yes you need the magic CLASSPATH to compile it. I don't know why when > the put FX in the JDK and JRE that it isn't already in the classpath but > it isn't. So just add it to your CLASSPATH and it will work just fine. This is one of the rare use cases where it actually makes sense to put the JAR in the "CLASSPATH" environment variable (along with "."). Doing this has perils, including necessitating the explicit mention of "." as a classpath element. Under most circumstances one would eschew "CLASSPATH" in favor of the more flexible and less damaging "-classpath" or "-cp" command-line parameter. However, when something is so much to be desired as a routine part of your build all the time as JavaFX might be in this instance, then the use of either "CLASSPATH" or even (gasp!) extension libraries becomes an option. Whatever you choose, make sure you have actually RTFMed on tools classpaths. -- Lew
[toc] | [prev] | [next] | [standalone]
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-10-01 09:27 -0700 |
| Message-ID | <5fe6d862-7451-4f3b-a936-a11336cd2e47@googlegroups.com> |
| In reply to | #2130 |
On Sunday, September 30, 2012 8:33:32 PM UTC-4, Lew wrote: > Knute Johnson wrote: > > > piscesboy wrote: > > >> I just downloaded and installed the Java7 update 7 JDK for Mac OS X via the convenient .dmg installer on the Oracle website. JavaFX SDK is supposed to be included > > > > > >> I want to get started on some example JavaFX applications...a simple HelloWorld app to get started using it and to verify that JavaFX works on my system. Here's the code for HelloWorld.java: > > > > > > > . . . > > >> HelloWorld.java:2: error: package javafx.scene does not exist > > >> import javafx.scene.Group; > > >> ^ > > >> HelloWorld.java:3: error: package javafx.scene does not exist > > > > > . . . > > >> It is obvious that it is not finding the JavaFX library to compile. I did a search and found that the jfxrt.jar file is required to compile and run it. But it is located inside of the folder: > > > > > >> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib > > > > > >> which is inside of the JDK virtual machine folder for Java 7. I don't think there is any magic classpath command needed to compile this simple program but I could be wrong. > > > > Clearly. > > > > > Yes you need the magic CLASSPATH to compile it. I don't know why when > > > the put FX in the JDK and JRE that it isn't already in the classpath but > > > it isn't. So just add it to your CLASSPATH and it will work just fine. > > > > This is one of the rare use cases where it actually makes sense to put the JAR > > in the "CLASSPATH" environment variable (along with "."). Doing this has perils, > > including necessitating the explicit mention of "." as a classpath element. > > Under most circumstances one would eschew "CLASSPATH" in favor of the more > > flexible and less damaging "-classpath" or "-cp" command-line parameter. > > However, when something is so much to be desired as a routine part of your > > build all the time as JavaFX might be in this instance, then the use of > > either "CLASSPATH" or even (gasp!) extension libraries becomes an option. > > > > Whatever you choose, make sure you have actually RTFMed on tools classpaths. > > > > -- > > Lew I compiled with the -cp option and now it compiles fine...but now it fails to run when I invoke: java HelloWorld I get: Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480) Caused by: java.lang.ClassNotFoundException: javafx.application.Application at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) Again...this seems to be a missing class definition problem...which leads me to believe there is a deeper flaw in how Java7 is set up in my machine. I followed the instructions for downloading and installing Java7 update 7 from the Oracle website, I used the Java Preferences Application to set my default JDK to jdk 1.7.0 as per the instructions, but now it's having all these different classpath issues that do not happen when I use the standard Java 6 JDK from the Apple vendor as opposed to the Oracle vendor Java 7 JDK.
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@knutejohnson.com> |
|---|---|
| Date | 2012-10-01 11:01 -0700 |
| Message-ID | <k4clqg$29d$1@dont-email.me> |
| In reply to | #2131 |
On 10/1/2012 9:27 AM, piscesboy wrote: > On Sunday, September 30, 2012 8:33:32 PM UTC-4, Lew wrote: >> Knute Johnson wrote: >> >>> piscesboy wrote: >> >>>> I just downloaded and installed the Java7 update 7 JDK for Mac >>>> OS X via the convenient .dmg installer on the Oracle website. >>>> JavaFX SDK is supposed to be included >> >>> >> >>>> I want to get started on some example JavaFX applications...a >>>> simple HelloWorld app to get started using it and to verify >>>> that JavaFX works on my system. Here's the code for >>>> HelloWorld.java: >> >>> >> >> >> >> . . . >> >>>> HelloWorld.java:2: error: package javafx.scene does not exist >> >>>> import javafx.scene.Group; >> >>>> ^ >> >>>> HelloWorld.java:3: error: package javafx.scene does not exist >> >> >> >>> . . . >> >>>> It is obvious that it is not finding the JavaFX library to >>>> compile. I did a search and found that the jfxrt.jar file is >>>> required to compile and run it. But it is located inside of the >>>> folder: >> >>> >> >>>> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib >> >>> >> >>>> >>>> which is inside of the JDK virtual machine folder for Java 7. I don't think there is any magic classpath command needed to compile this simple program but I could be wrong. >> >> >> >> Clearly. >> >> >> >>> Yes you need the magic CLASSPATH to compile it. I don't know why >>> when >> >>> the put FX in the JDK and JRE that it isn't already in the >>> classpath but >> >>> it isn't. So just add it to your CLASSPATH and it will work just >>> fine. >> >> >> >> This is one of the rare use cases where it actually makes sense to >> put the JAR >> >> in the "CLASSPATH" environment variable (along with "."). Doing >> this has perils, >> >> including necessitating the explicit mention of "." as a classpath >> element. >> >> Under most circumstances one would eschew "CLASSPATH" in favor of >> the more >> >> flexible and less damaging "-classpath" or "-cp" command-line >> parameter. >> >> However, when something is so much to be desired as a routine part >> of your >> >> build all the time as JavaFX might be in this instance, then the >> use of >> >> either "CLASSPATH" or even (gasp!) extension libraries becomes an >> option. >> >> >> >> Whatever you choose, make sure you have actually RTFMed on tools >> classpaths. >> >> >> >> -- >> >> Lew > > I compiled with the -cp option and now it compiles fine...but now it > fails to run when I invoke: > > java HelloWorld > > I get: > > Exception in thread "main" java.lang.NoClassDefFoundError: > javafx/application/Application at > java.lang.ClassLoader.defineClass1(Native Method) at > java.lang.ClassLoader.defineClass(ClassLoader.java:791) at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) > at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at > java.net.URLClassLoader$1.run(URLClassLoader.java:361) at > java.net.URLClassLoader$1.run(URLClassLoader.java:355) at > java.security.AccessController.doPrivileged(Native Method) at > java.net.URLClassLoader.findClass(URLClassLoader.java:354) at > java.lang.ClassLoader.loadClass(ClassLoader.java:423) at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at > java.lang.ClassLoader.loadClass(ClassLoader.java:356) at > sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480) > > Caused by: java.lang.ClassNotFoundException: javafx.application.Application > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at > java.net.URLClassLoader$1.run(URLClassLoader.java:355) at > java.security.AccessController.doPrivileged(Native Method) at > java.net.URLClassLoader.findClass(URLClassLoader.java:354) at > java.lang.ClassLoader.loadClass(ClassLoader.java:423) at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at > java.lang.ClassLoader.loadClass(ClassLoader.java:356) > > > Again...this seems to be a missing class definition problem...which > leads me to believe there is a deeper flaw in how Java7 is set up in > my machine. > > I followed the instructions for downloading and installing Java7 > update 7 from the Oracle website, I used the Java Preferences > Application to set my default JDK to jdk 1.7.0 as per the > instructions, but now it's having all these different classpath > issues that do not happen when I use the standard Java 6 JDK from the > Apple vendor as opposed to the Oracle vendor Java 7 JDK. > I guess I should have been more complete, if you need the magic to compile, you will need the magic to run it too. -- Knute Johnson
[toc] | [prev] | [next] | [standalone]
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-10-01 11:32 -0700 |
| Message-ID | <ec815099-9dc3-47f5-972f-8785b69d1ad8@googlegroups.com> |
| In reply to | #2132 |
On Monday, October 1, 2012 2:01:53 PM UTC-4, Knute Johnson wrote: > On 10/1/2012 9:27 AM, piscesboy wrote: > > > On Sunday, September 30, 2012 8:33:32 PM UTC-4, Lew wrote: > > >> Knute Johnson wrote: > > >> > > >>> piscesboy wrote: > > >> > > >>>> I just downloaded and installed the Java7 update 7 JDK for Mac > > >>>> OS X via the convenient .dmg installer on the Oracle website. > > >>>> JavaFX SDK is supposed to be included > > >> > > >>> > > >> > > >>>> I want to get started on some example JavaFX applications...a > > >>>> simple HelloWorld app to get started using it and to verify > > >>>> that JavaFX works on my system. Here's the code for > > >>>> HelloWorld.java: > > >> > > >>> > > >> > > >> > > >> > > >> . . . > > >> > > >>>> HelloWorld.java:2: error: package javafx.scene does not exist > > >> > > >>>> import javafx.scene.Group; > > >> > > >>>> ^ > > >> > > >>>> HelloWorld.java:3: error: package javafx.scene does not exist > > >> > > >> > > >> > > >>> . . . > > >> > > >>>> It is obvious that it is not finding the JavaFX library to > > >>>> compile. I did a search and found that the jfxrt.jar file is > > >>>> required to compile and run it. But it is located inside of the > > >>>> folder: > > >> > > >>> > > >> > > >>>> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib > > >> > > >>> > > >> > > >>>> > > >>>> > > which is inside of the JDK virtual machine folder for Java 7. I don't > > think there is any magic classpath command needed to compile this simple > > program but I could be wrong. > > >> > > >> > > >> > > >> Clearly. > > >> > > >> > > >> > > >>> Yes you need the magic CLASSPATH to compile it. I don't know why > > >>> when > > >> > > >>> the put FX in the JDK and JRE that it isn't already in the > > >>> classpath but > > >> > > >>> it isn't. So just add it to your CLASSPATH and it will work just > > >>> fine. > > >> > > >> > > >> > > >> This is one of the rare use cases where it actually makes sense to > > >> put the JAR > > >> > > >> in the "CLASSPATH" environment variable (along with "."). Doing > > >> this has perils, > > >> > > >> including necessitating the explicit mention of "." as a classpath > > >> element. > > >> > > >> Under most circumstances one would eschew "CLASSPATH" in favor of > > >> the more > > >> > > >> flexible and less damaging "-classpath" or "-cp" command-line > > >> parameter. > > >> > > >> However, when something is so much to be desired as a routine part > > >> of your > > >> > > >> build all the time as JavaFX might be in this instance, then the > > >> use of > > >> > > >> either "CLASSPATH" or even (gasp!) extension libraries becomes an > > >> option. > > >> > > >> > > >> > > >> Whatever you choose, make sure you have actually RTFMed on tools > > >> classpaths. > > >> > > >> > > >> > > >> -- > > >> > > >> Lew > > > > > > I compiled with the -cp option and now it compiles fine...but now it > > > fails to run when I invoke: > > > > > > java HelloWorld > > > > > > I get: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > > javafx/application/Application at > > > java.lang.ClassLoader.defineClass1(Native Method) at > > > java.lang.ClassLoader.defineClass(ClassLoader.java:791) at > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > > > > > > > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) > > > at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at > > > java.net.URLClassLoader$1.run(URLClassLoader.java:361) at > > > java.net.URLClassLoader$1.run(URLClassLoader.java:355) at > > > java.security.AccessController.doPrivileged(Native Method) at > > > java.net.URLClassLoader.findClass(URLClassLoader.java:354) at > > > java.lang.ClassLoader.loadClass(ClassLoader.java:423) at > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at > > > java.lang.ClassLoader.loadClass(ClassLoader.java:356) at > > > sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480) > > > > > > > > Caused by: java.lang.ClassNotFoundException: javafx.application.Application > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at > > > java.net.URLClassLoader$1.run(URLClassLoader.java:355) at > > > java.security.AccessController.doPrivileged(Native Method) at > > > java.net.URLClassLoader.findClass(URLClassLoader.java:354) at > > > java.lang.ClassLoader.loadClass(ClassLoader.java:423) at > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at > > > java.lang.ClassLoader.loadClass(ClassLoader.java:356) > > > > > > > > > Again...this seems to be a missing class definition problem...which > > > leads me to believe there is a deeper flaw in how Java7 is set up in > > > my machine. > > > > > > I followed the instructions for downloading and installing Java7 > > > update 7 from the Oracle website, I used the Java Preferences > > > Application to set my default JDK to jdk 1.7.0 as per the > > > instructions, but now it's having all these different classpath > > > issues that do not happen when I use the standard Java 6 JDK from the > > > Apple vendor as opposed to the Oracle vendor Java 7 JDK. > > > > > > > I guess I should have been more complete, if you need the magic to > > compile, you will need the magic to run it too. > > > > -- > > > > Knute Johnson What's annoying is why I have to set the classpath in the first place...I thought the Java Preferences application would set the JAVA_HOME to the appropriate JDK and load all the appropriate jar files to begin with.
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@knutejohnson.com> |
|---|---|
| Date | 2012-10-01 12:36 -0700 |
| Message-ID | <k4crc7$ac0$1@dont-email.me> |
| In reply to | #2133 |
On 10/1/2012 11:32 AM, piscesboy wrote: > > What's annoying is why I have to set the classpath in the first > place...I thought the Java Preferences application would set the > JAVA_HOME to the appropriate JDK and load all the appropriate jar > files to begin with. > Are you using some sort of IDE? JAVA_HOME does nothing on Windows for anything. What is this Java Preferences application you are talking about? You could go rogue and put the jar file in the ext directory (that's what I would do but I wouldn't tell anybody). -- Knute Johnson
[toc] | [prev] | [next] | [standalone]
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-10-03 00:50 -0700 |
| Message-ID | <370dfd42-bf33-4c6e-8d04-5ea0d9d081e3@googlegroups.com> |
| In reply to | #2134 |
On Monday, October 1, 2012 3:36:39 PM UTC-4, Knute Johnson wrote: > On 10/1/2012 11:32 AM, piscesboy wrote: > > > > > > What's annoying is why I have to set the classpath in the first > > > place...I thought the Java Preferences application would set the > > > JAVA_HOME to the appropriate JDK and load all the appropriate jar > > > files to begin with. > > > > > > > Are you using some sort of IDE? JAVA_HOME does nothing on Windows for > > anything. What is this Java Preferences application you are talking > > about? You could go rogue and put the jar file in the ext directory > > (that's what I would do but I wouldn't tell anybody). Perhaps I should have been more complete and mentioned I was using OS X not Windows...oh wait...I did. > > > > -- > > > > Knute Johnson
[toc] | [prev] | [next] | [standalone]
| From | Knute Johnson <nospam@knutejohnson.com> |
|---|---|
| Date | 2012-10-03 06:39 -0700 |
| Message-ID | <k4hf7f$p50$1@dont-email.me> |
| In reply to | #2142 |
On 10/3/2012 12:50 AM, piscesboy wrote: > On Monday, October 1, 2012 3:36:39 PM UTC-4, Knute Johnson wrote: >> On 10/1/2012 11:32 AM, piscesboy wrote: >> >>> >> >>> What's annoying is why I have to set the classpath in the first >> >>> place...I thought the Java Preferences application would set the >> >>> JAVA_HOME to the appropriate JDK and load all the appropriate >>> jar >> >>> files to begin with. >> >>> >> >> >> >> Are you using some sort of IDE? JAVA_HOME does nothing on Windows >> for >> >> anything. What is this Java Preferences application you are >> talking >> >> about? You could go rogue and put the jar file in the ext >> directory >> >> (that's what I would do but I wouldn't tell anybody). > > Perhaps I should have been more complete and mentioned I was using > OS X not Windows...oh wait...I did. > >> >> >> >> -- >> >> >> >> Knute Johnson > You don't need to get snarky with me. I have no knowledge of OS X, and that was the point. In either case I have attempted to be helpful. But now I'm going to say I don't know anything about OS X and you can figure it out for yourself. -- Knute Johnson
[toc] | [prev] | [next] | [standalone]
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Date | 2012-10-02 03:02 -0400 |
| Message-ID | <k4e3a5$o5k$1@dont-email.me> |
| In reply to | #2133 |
On 10/01/2012 02:32 PM, piscesboy wrote:
> On Monday, October 1, 2012 2:01:53 PM UTC-4, Knute Johnson wrote:
>> I guess I should have been more complete, if you need the magic to
>>
>> compile, you will need the magic to run it too.
>
> What's annoying is why I have to set the classpath in the first place...
I thought the Java Preferences application would set the JAVA_HOME to
the appropriate JDK and load all the appropriate jar files to begin with.
There is really no magic here. The situation is that JavaFX is not fully
integrated into the standard library just yet. 'They' have been kind
enough to "co-bundle" ('their' word) with the current JavaFX with JDK 7.6
I posted a link to a blog entry some weeks ago that explains the situation.
For now you will need to include the appropriate jar(s) in your classpath.
According to the aforesaid blog entry full integration is now
scheduled for JDK 9.
[toc] | [prev] | [next] | [standalone]
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Date | 2012-10-02 03:16 -0400 |
| Message-ID | <k4e43m$stl$1@dont-email.me> |
| In reply to | #2133 |
On 10/01/2012 02:32 PM, piscesboy wrote:
> On Monday, October 1, 2012 2:01:53 PM UTC-4, Knute Johnson wrote:
>> I guess I should have been more complete, if you need the magic to
>>
>> compile, you will need the magic to run it too.
>
> What's annoying is why I have to set the classpath in the first place...
I thought the Java Preferences application would set the JAVA_HOME to
the appropriate JDK and load all the appropriate jar files to begin with.
There is really no magic here. The situation is that JavaFX is not fully
integrated into the standard library just yet. 'They' have been kind
enough to "co-bundle" ('their' word) the current JavaFX with JDK 7.6
I posted a link to a blog entry some weeks ago that explains the situation.
For now you will need to include the appropriate jar(s) in your classpath.
According to the aforesaid blog entry full integration is now
scheduled for JDK 9.
[toc] | [prev] | [next] | [standalone]
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-10-03 00:46 -0700 |
| Message-ID | <63d6f5eb-9aa0-4e83-8d8e-4988742f7842@googlegroups.com> |
| In reply to | #2139 |
On Tuesday, October 2, 2012 3:11:51 AM UTC-4, Jeff Higgins wrote:
> On 10/01/2012 02:32 PM, piscesboy wrote:
>
> > On Monday, October 1, 2012 2:01:53 PM UTC-4, Knute Johnson wrote:
>
>
>
> >> I guess I should have been more complete, if you need the magic to
>
> >>
>
> >> compile, you will need the magic to run it too.
>
> >
>
> > What's annoying is why I have to set the classpath in the first place...
>
> I thought the Java Preferences application would set the JAVA_HOME to
>
> the appropriate JDK and load all the appropriate jar files to begin with.
>
>
>
> There is really no magic here. The situation is that JavaFX is not fully
>
> integrated into the standard library just yet. 'They' have been kind
>
> enough to "co-bundle" ('their' word) the current JavaFX with JDK 7.6
>
> I posted a link to a blog entry some weeks ago that explains the situation.
>
>
>
> For now you will need to include the appropriate jar(s) in your classpath.
>
>
>
> According to the aforesaid blog entry full integration is now
>
> scheduled for JDK 9.
Is there anything else they've "co bundled" but not officially integrated in their standard release?
[toc] | [prev] | [next] | [standalone]
| From | markspace <-@.> |
|---|---|
| Date | 2012-10-03 08:48 -0700 |
| Message-ID | <k4hmp7$c5t$2@dont-email.me> |
| In reply to | #2141 |
On 10/3/2012 12:46 AM, piscesboy wrote: > Is there anything else they've "co bundled" but not officially > integrated in their standard release? > Everything that isn't in the JRE. Really, really, serious answer: Read. The. Docs.
[toc] | [prev] | [next] | [standalone]
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Date | 2012-10-03 16:00 -0400 |
| Message-ID | <k4i56e$icm$1@dont-email.me> |
| In reply to | #2141 |
On 10/03/2012 03:46 AM, piscesboy wrote:
> On Tuesday, October 2, 2012 3:11:51 AM UTC-4, Jeff Higgins wrote:
>> On 10/01/2012 02:32 PM, piscesboy wrote:
>>
>>> On Monday, October 1, 2012 2:01:53 PM UTC-4, Knute Johnson wrote:
>>
>>
>>
>>>> I guess I should have been more complete, if you need the magic to
>>
>>>>
>>
>>>> compile, you will need the magic to run it too.
>>
>>>
>>
>>> What's annoying is why I have to set the classpath in the first place...
>>
>> I thought the Java Preferences application would set the JAVA_HOME to
>>
>> the appropriate JDK and load all the appropriate jar files to begin with.
>>
>>
>>
>> There is really no magic here. The situation is that JavaFX is not fully
>>
>> integrated into the standard library just yet. 'They' have been kind
>>
>> enough to "co-bundle" ('their' word) the current JavaFX with JDK 7.6
>>
>> I posted a link to a blog entry some weeks ago that explains the situation.
>>
>>
>>
>> For now you will need to include the appropriate jar(s) in your classpath.
>>
>>
>>
>> According to the aforesaid blog entry full integration is now
>>
>> scheduled for JDK 9.
>
> Is there anything else they've "co bundled" but not officially integrated in their standard release?
Right off the top of my head I cannot think of anything.
JavaFX is a very large package. It looks to me to provide
many benefits. I suppose that we can consider it beta-ware
at this point. I'm happy that the development team is
taking their time and providing plenty of opportunity for
us beta-testers to work with the evolving product and
give feedback. The resulting final product should be better
by the extent of the feedback given.
I went back and found the link to the blog entry I mentioned:
<http://fxexperience.com/2012/08/javafx-2-2-is-here-and-javafx-8-0-is-on-its-way/>
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-10-01 13:10 -0700 |
| Message-ID | <432ee7d6-7ee1-4535-bcdc-fc4967f56388@googlegroups.com> |
| In reply to | #2131 |
piscesboy wrote: > Lew wrote: >> Whatever you choose, make sure you have actually RTFMed on tools classpaths. > > I compiled with the -cp option and now it compiles fine...but now it fails to run when I invoke: > > java HelloWorld You didn't follow my advice. Then you got a different result from what you wanted. Had you followed my advice, you would have gotten the desired result. You desire the desired result. Therefore you should go back and follow that advice. As a matter of courtesy to those who volunteer to help you, you should follow the advice before complaining again, and explain why the advice didn't help. > I get: > > Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application Because you didn't follow the advice. > > Again...this seems to be a missing class definition problem... > which leads me to believe there is a deeper flaw in how Java7 is set up in my machine. The problem is in the wetware. Java is set up correctly. You aren't following instructions. > I followed the instructions for downloading and installing Java7 update 7 from the Oracle website, I used the Java Preferences Application to set my default JDK to jdk 1.7.0 as per the instructions, but now it's having all these different classpath issues that do not happen when I use the standard Java 6 JDK from the Apple vendor as opposed to the Oracle vendor Java 7 JDK. RTFM. Really. RTFM. http://lmgtfy.com/?q=Java+classpath -- Lew
[toc] | [prev] | [next] | [standalone]
| From | piscesboy <oraclmaster@gmail.com> |
|---|---|
| Date | 2012-10-01 18:38 -0700 |
| Message-ID | <0b72419b-aaa5-48e3-87b4-a21b393f4976@googlegroups.com> |
| In reply to | #2135 |
On Monday, October 1, 2012 4:10:09 PM UTC-4, Lew wrote: > piscesboy wrote: > > > Lew wrote: > > >> Whatever you choose, make sure you have actually RTFMed on tools classpaths. > > > > > > I compiled with the -cp option and now it compiles fine...but now it fails to run when I invoke: > > > > > > java HelloWorld > > > > You didn't follow my advice. Then you got a different result from what you wanted. > > > > Had you followed my advice, you would have gotten the desired result. > > > > You desire the desired result. > > > > Therefore you should go back and follow that advice. > > > > As a matter of courtesy to those who volunteer to help you, you should follow > > the advice before complaining again, and explain why the advice didn't help. > > > > > I get: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application > > > > Because you didn't follow the advice. > > > > > > > > Again...this seems to be a missing class definition problem... > > > which leads me to believe there is a deeper flaw in how Java7 is set up in my machine. > > > > The problem is in the wetware. > > > > Java is set up correctly. You aren't following instructions. > > > > > I followed the instructions for downloading and installing Java7 update 7 from the Oracle website, I used the Java Preferences Application to set my default JDK to jdk 1.7.0 as per the instructions, but now it's having all these different classpath issues that do not happen when I use the standard Java 6 JDK from the Apple vendor as opposed to the Oracle vendor Java 7 JDK. > > > > RTFM. > > > > Really. > > > > RTFM. > This is why people are loath to post reasonable questions on message boards. Stop typing before you reach this level of sarcasm. I got it running now. WITHOUT your advice. > > > http://lmgtfy.com/?q=Java+classpath > > > > -- > > Lew
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-10-02 15:55 -0700 |
| Message-ID | <4c882c5d-76e0-4786-9168-e0e3847a6d67@googlegroups.com> |
| In reply to | #2136 |
On Monday, October 1, 2012 6:38:55 PM UTC-7, piscesboy wrote: > This is why people are loath to post reasonable questions on message boards. Stop typing before you reach this level of sarcasm. I got it running now. WITHOUT your advice. This was not sarcasm, this was outrage that you would not follow the advice that would have helped you, then still complained. > > http://lmgtfy.com/?q=Java+classpath You hadn't shown any signs that you had done any reading. Get off your high horse. There's no need for you to be such a piece of work. -- Lew
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.help
csiph-web