aspose file tools*
The moose likes JavaFX and the fly likes How to install JavaFx in Ubuntu 12.04? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "How to install JavaFx in Ubuntu 12.04?" Watch "How to install JavaFx in Ubuntu 12.04?" New topic
Author

How to install JavaFx in Ubuntu 12.04?

Anto Aravinth
Greenhorn

Joined: Jun 05, 2012
Posts: 2
I downloaded the javafx from the homepage and I wish I could put into my classpath. So in Ubuntu I did this :


vi ~/.bashrc


opened the file and added the following lines :


JAVAFX_HOME=${HOME}/javafx/rt/lib/jfxrt.jar
export PATH=$PATH:$JAVAFX_HOME

provided that I have downloaded my JavaFx into my ${HOME}/javafx/ directory!

And I did this as well :

echo $PATH

which ouptputs :


/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/anto/javafx/rt/lib/jfxrt.jar


But when I run my JavaFx program using Groovy like this :

groovy HelloWorld.groovy

I get an error like this :

Caught: java.lang.NoClassDefFoundError: javafx/application/Application
java.lang.NoClassDefFoundError: javafx/application/Application
Caused by: java.lang.ClassNotFoundException: javafx.application.Application


Where I went wrong? Kindly help me out. I'm facing this problem for a day!
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3054
    
  33

The jfxrt.jar has to be part of the CLASSPATH and not PATH.


Mohamed Sanaulla | My Blog
Anto Aravinth
Greenhorn

Joined: Jun 05, 2012
Posts: 2
Thanks for the reply. So, can you say me how to setup the CLASSPATH in Ubuntu? Sorry, I'm very new to Ubuntu.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html


luck, db
There are no new questions, but there may be new answers.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3054
    
  33

You can follow the same approach you used for PATH. Create a CLASSPATH variable and then export it.
Or you can try the -cp command line switch and mention the dependent jars,class files there. More details are in the link which Darryl provided.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to install JavaFx in Ubuntu 12.04?
 
Similar Threads
Installing Java on Linux (FC6)
Environment Variable
java.lang.NoClassDefFoundError error
Problems with Java Home in VMBox
Editing the bashrc file