How to run Visage application with Visage-compiler-preview and JavaFX2.0 ?

71 views
Skip to first unread message

Shiv Kumar Ganesh

unread,
Oct 26, 2011, 8:20:55 AM10/26/11
to visage...@googlegroups.com
Hi,

I downloaded the Visage compiler but am not able to figure it out how to run the visage applications.
I am on a windows system with JavaFX 2.0. I did follow the wiki on the InstallingPreviewBuilds but as mentioned about
the "lib/shared" folder where the javafxc.jar is to be put, there does not exist any "lib/shared" folder.
On the other hand since the wiki was for JavaFX 1.3.1 is the Visage-compiler-preview 1 having problems with JavaFX 2.0.
Please let me know the details of how to run a visage app on my windows machine?

Thanks,
Shiv.

William Antônio Siqueira

unread,
Oct 27, 2011, 10:33:33 PM10/27/11
to visage...@googlegroups.com
Hello Shiv,

Here the steps I followed to create compile with Visage and JavaFX 2.0 (VisageFX):

- Check out Visage project and clean/build it;
- Check out VisageFX, solve the reference problem in Netbeans and clean/build it;

From now you are able to create JavaFX 2.0 apps using the old and good Visage. For this, what I did was the following steps:

- I took Visage build files and created a Visage "dist" in my machine. After this I set the VISAGE_HOME variable and put it in my path, so I'm able to call "visage" and "visagec" on command line;
- Now I can create .visage files, open with notepad++ and start creating code from what is done with VisageFX project. 
- To compile it I use the following command:

# visagec - classpath .;{JavaFX 2.0 rt.jar file};{visagefx JAR file} filename

- To run it I use the following command:

# visage - classpath .;{JavaFX 2.0 rt.jar file};{visagefx JAR file} classname

Please, let me know if these instructions were helpful :)

--
William Antônio Siqueira
Java Support Analyst
Colaborador do JavaFree.org




2011/10/26 Shiv Kumar Ganesh <gshi...@gmail.com>

Shiv Kumar Ganesh

unread,
Oct 29, 2011, 6:22:08 AM10/29/11
to visage...@googlegroups.com, william....@gmail.com
Hi Williams,

I have already tried out the things you mentioned above. I am facing a broblem where after compilation I get the class file. But when I try running the class file I get the following error :-

C:\Users\Shiv\Documents\Projects\Visage\HelloVisage>visage -cp lib/VisageFX.jar;
lib/jfxrt.jar src/org/visage/test/Main.class
Main-Class not found src/org/visage/test/Main.class

java.lang.ClassNotFoundException: src/org/visage/test/Main.class
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at org.visage.runtime.Main.main(Main.java:68)

Kindly download and feel free to point of the  mistake.
Coz I have just written a simple stage. My program goes like this

                                                      package org.visage.test;
                                                      import visage.javafx.stage.Stage;
 
                                                         Stage {
  
                                                                    }

Thanks,
Regards,
Shiv Kumar Ganesh

Shiv Kumar Ganesh

unread,
Oct 29, 2011, 8:09:42 AM10/29/11
to visage...@googlegroups.com, william....@gmail.com
Pls share your email or just add me up on GTalk. Coz it would be better if we can get in touch. I can explain you better since I am new here. :)
My GTalk ID is GShiv.sk

Regards,
Shiv Kumar Ganesh

Shiv Kumar Ganesh

unread,
Nov 1, 2011, 3:13:16 AM11/1/11
to visage...@googlegroups.com, william....@gmail.com
Hi William,

I was actually waiting for your reply. Please help me through. I would appreciate your help.I am still stuck with it though I have started going through the code or wrapping visage and would definitely take up some task.

Regards,
Shiv Kumar Ganesh

William Antônio Siqueira

unread,
Nov 1, 2011, 4:19:08 AM11/1/11
to visage...@googlegroups.com

Hello Shiv,

Please add me on GTalk and let's discuss the error you are having. The only difference from my code is that I use: visage -cp .;visageFx.jar;jfxrt.jar ClassName

I don't know why, but I remember the . Was very important on classpath.

- William

Shiv Kumar Ganesh

unread,
Nov 1, 2011, 5:13:46 AM11/1/11
to visage...@googlegroups.com, william....@gmail.com
I would definitely do that William. I am also using the same command my jar files being in another folder I type as follows:-

>> visage -cp bin;lib/visageFX.jar;lib/jfxrt.jar className

But it throws exception. Is it due to JDK 7 and JavaFX2.0 because most of the people I see in the user group use JavaFX 1.3 ? Neways it was really nice to hear from you. I would add you up and we will discuss further.Thanks a lot once again :).
NOTE: I am running bad on internet connection so would be unavailable for a week or so.Hope you understand :).

Regards,
Shiv Kumar Ganesh

William Antônio Siqueira

unread,
Nov 1, 2011, 8:15:35 AM11/1/11
to visage...@googlegroups.com
Hi Shiv,

>>> But it throws exception

I faced this same issue when I started with VisageFX. For some reason you need to include the "." in your classpath. Please, search this group and you will see some messages mine regarding it.

> visagec -cp .;bin;lib/visageFX.jar;lib/jfxrt.jar file.visage
> visage -cp .;bin;lib/visageFX.jar;lib/jfxrt.jar className


> Is it due to JDK 7 and JavaFX2.0 because most of the people I see in the user group use JavaFX 1.3

For JavaFX  the process is different. I'm using Java 6 and JavaFX, but VisageFX. VisageFX is a project to bring Visage to JavaFX 2, JavaFX 1.x doesn't need VisageFX, if I remember well it requires only a file substitution in JavaFX 1.x installation.

Please let me know if you could compile and execute your VisageFX code and also if you need more information.


Best Regards,


--
William Antônio Siqueira
Java Support Analyst
Colaborador do JavaFree.org




2011/11/1 Shiv Kumar Ganesh <gshi...@gmail.com>
Reply all
Reply to author
Forward
0 new messages