You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Mohammed Benabdallah <be...@gmail.com> on 2010/01/23 20:43:41 UTC

Eclipse and Pivot

Good evening,

I'm new on the liste, and i already have a question :

The demo of Pivot are on a JAR file, but what if we want to use eclipse, I
mean that in the demo war file we have this architecture :

pivot-demos
|_________*src *(EMPTY)
|_________*WebContent *(All HTML file that call Java Classes)
|_________|__________*lib *(Contain pivot-demos-1.4.jar, all the classes for
the demo)


But in an Eclipse (or NetBeans or a Standard Maven) project, the sources are
in *src *folder, and when i create an HTML file in the *WebContent *I have
an error message saying

> * Application class name is required
> *


Does any body already work with Eclipse in an Pivot project ? is there any
plugin for Pivot ?

Thanks for your time.

-- 
Cordialement.
Benabdallah Mohammed

Re: Eclipse and Pivot

Posted by Mohammed Benabdallah <be...@gmail.com>.
Thaks for you all, actually i get it done thanks to your advices :


   - I created a Java Web project ( I intended to use some JSP files so it
   can't be Java project)
   - I created a user library containing  Pivot jars (for further use in
   other Pivot projects)
   - I corrected the "applicationClassName" applet param to
   "application_class_name
   - That's All working :)


Thanks for all I'm starting to migrate a JSF small project to Pivot (trying
in fact), share result here once done ;)

-- 
Cordialement.
Benabdallah Mohammed





2010/1/25 Sandro Martini <sa...@gmail.com>

> Hi,
> without Maven you can do this for example by placing all your jars
> inside a folder (for example /java/jars) and then point Eclipse to the
> jars copied inside, defining one or more User Libraries (but
> attention, they have an absolute path on your PC) and referring to
> them from your project.
>
> Bye,
> Sandro
>

Re: Eclipse and Pivot

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
without Maven you can do this for example by placing all your jars
inside a folder (for example /java/jars) and then point Eclipse to the
jars copied inside, defining one or more User Libraries (but
attention, they have an absolute path on your PC) and referring to
them from your project.

Bye,
Sandro

Re: Eclipse and Pivot

Posted by Greg Brown <gk...@mac.com>.
Yes, you could also set it up this way. I simply prefer to keep project resources centralized (and the Pivot JARs are pretty small, so file size shouldn't be that much of an issue).

On Jan 23, 2010, at 9:17 PM, Bob Santos wrote:

> Correct me if I'm wrong but I think adding a lib folder and having a copy of the pivot jars for each project is not required. You can point to the same source of the jars everytime you create a Pivot project. 
> 
> The disadvantage of having a copy of the jars for each project is file size, while the disadvantage of pointing to the same source of jars is you have to edit the location of the jars for each project if you move the jars to a different location.
> 
> For me, the best way is still using Maven with Eclipse cause you can have the advantage of pointing to one source/repository and when you change the location of your local maven repository you just need to change the M2_REPO classpath variable in Eclipse. Reading to Michael's blog post is a good start.
> 
> 
> Regards,
> 
> Bob
> 
> On Sun, Jan 24, 2010 at 6:35 AM, Greg Brown <gk...@mac.com> wrote:
> FYI, I added this information to the FAQ:
> 
> http://cwiki.apache.org/confluence/display/PIVOT/Frequently+Asked+Questions+%28FAQ%29
> 
> On Jan 23, 2010, at 5:05 PM, Greg Brown wrote:
> 
>> Hi,
>> 
>> Welcome! It is very easy to set up a Pivot project using Eclipse (the Pivot platform itself is actually built using Eclipse). These are the steps I typically use:
>> 
>> - Create a new Java project (File > New Java Project).
>> 
>> - Add a lib folder to the project.
>> 
>> - Copy the Pivot JARs you need to the lib folder. At a minimum, you'll need pivot-core-1.4.jar, pivot-wtk-1.4.jar, and pivot-wtk-terra-1.4.jar. The contents of all the Pivot JARs are discussed in the Platform Overview section of the tutorial (http://pivot.apache.org/tutorials/platform-overview.html).
>> 
>> - Right-click on the project in Eclipse and select Properties. Click on Java Build Path.
>> 
>> - Select the Libraries tab and click Add JARs.
>> 
>> - Navigate to the lib directory in your newly created project, select the Pivot JARs, and click OK.
>> 
>> You can now create your main application class (the one that implements org.apache.pivot.wtk.Application). The Hello World tutorial page discusses this interface in more detail and provides information on how to launch it in a browser or as a desktop application:
>> 
>> http://pivot.apache.org/tutorials/hello-world.html
>> 
>> Note that there is a typo in the current version of this page. The "applicationClassName" applet param should actually be "application_class_name". This will be fixed the next time we update the site.
>> 
>> Please let us know if you have any additional questions.
>> 
>> Greg
>> 
>> 
>> On Jan 23, 2010, at 2:43 PM, Mohammed Benabdallah wrote:
>> 
>>> Good evening,
>>> 
>>> I'm new on the liste, and i already have a question :
>>> 
>>> The demo of Pivot are on a JAR file, but what if we want to use eclipse, I mean that in the demo war file we have this architecture :
>>> 
>>> pivot-demos
>>> |_________src (EMPTY)
>>> |_________WebContent (All HTML file that call Java Classes)
>>> |_________|__________lib (Contain pivot-demos-1.4.jar, all the classes for the demo)
>>> 
>>> 
>>> But in an Eclipse (or NetBeans or a Standard Maven) project, the sources are in src folder, and when i create an HTML file in the WebContent I have an error message saying
>>>  Application class name is required
>>> 
>>> Does any body already work with Eclipse in an Pivot project ? is there any plugin for Pivot ?
>>> 
>>> Thanks for your time. 
>>> 
>>> -- 
>>> Cordialement.
>>> Benabdallah Mohammed
>>> 
>>> 
>>> 
>> 
> 
> 


Re: Eclipse and Pivot

Posted by Bob Santos <bo...@gmail.com>.
Correct me if I'm wrong but I think adding a lib folder and having a copy of
the pivot jars for each project is not required. You can point to the same
source of the jars everytime you create a Pivot project.

The disadvantage of having a copy of the jars for each project is file size,
while the disadvantage of pointing to the same source of jars is you have to
edit the location of the jars for each project if you move the jars to a
different location.

For me, the best way is still using Maven with Eclipse cause you can have
the advantage of pointing to one source/repository and when you change the
location of your local maven repository you just need to change the M2_REPO
classpath variable in Eclipse. Reading to Michael's blog post is a good
start.


Regards,

Bob

On Sun, Jan 24, 2010 at 6:35 AM, Greg Brown <gk...@mac.com> wrote:

> FYI, I added this information to the FAQ:
>
>
> http://cwiki.apache.org/confluence/display/PIVOT/Frequently+Asked+Questions+%28FAQ%29
>
> On Jan 23, 2010, at 5:05 PM, Greg Brown wrote:
>
> Hi,
>
> Welcome! It is very easy to set up a Pivot project using Eclipse (the Pivot
> platform itself is actually built using Eclipse). These are the steps I
> typically use:
>
> - Create a new Java project (File > New Java Project).
>
> - Add a lib folder to the project.
>
> - Copy the Pivot JARs you need to the lib folder. At a minimum, you'll need
> pivot-core-1.4.jar, pivot-wtk-1.4.jar, and pivot-wtk-terra-1.4.jar. The
> contents of all the Pivot JARs are discussed in the Platform Overview
> section of the tutorial (
> http://pivot.apache.org/tutorials/platform-overview.html).
>
> - Right-click on the project in Eclipse and select Properties. Click on
> Java Build Path.
>
> - Select the Libraries tab and click Add JARs.
>
> - Navigate to the lib directory in your newly created project, select the
> Pivot JARs, and click OK.
>
> You can now create your main application class (the one that implements
> org.apache.pivot.wtk.Application). The Hello World tutorial page discusses
> this interface in more detail and provides information on how to launch it
> in a browser or as a desktop application:
>
> http://pivot.apache.org/tutorials/hello-world.html
>
> Note that there is a typo in the current version of this page. The
> "applicationClassName" applet param should actually be
> "application_class_name". This will be fixed the next time we update the
> site.
>
> Please let us know if you have any additional questions.
>
> Greg
>
>
> On Jan 23, 2010, at 2:43 PM, Mohammed Benabdallah wrote:
>
> Good evening,
>
> I'm new on the liste, and i already have a question :
>
> The demo of Pivot are on a JAR file, but what if we want to use eclipse, I
> mean that in the demo war file we have this architecture :
>
> pivot-demos
> |_________*src *(EMPTY)
> |_________*WebContent *(All HTML file that call Java Classes)
> |_________|__________*lib *(Contain pivot-demos-1.4.jar, all the classes
> for the demo)
>
>
> But in an Eclipse (or NetBeans or a Standard Maven) project, the sources
> are in *src *folder, and when i create an HTML file in the *WebContent *I
> have an error message saying
>
>> * Application class name is required
>> *
>
>
> Does any body already work with Eclipse in an Pivot project ? is there any
> plugin for Pivot ?
>
> Thanks for your time.
>
> --
> Cordialement.
> Benabdallah Mohammed
>
>
>
>
>
>

Re: Eclipse and Pivot

Posted by Greg Brown <gk...@mac.com>.
FYI, I added this information to the FAQ:

http://cwiki.apache.org/confluence/display/PIVOT/Frequently+Asked+Questions+%28FAQ%29

On Jan 23, 2010, at 5:05 PM, Greg Brown wrote:

> Hi,
> 
> Welcome! It is very easy to set up a Pivot project using Eclipse (the Pivot platform itself is actually built using Eclipse). These are the steps I typically use:
> 
> - Create a new Java project (File > New Java Project).
> 
> - Add a lib folder to the project.
> 
> - Copy the Pivot JARs you need to the lib folder. At a minimum, you'll need pivot-core-1.4.jar, pivot-wtk-1.4.jar, and pivot-wtk-terra-1.4.jar. The contents of all the Pivot JARs are discussed in the Platform Overview section of the tutorial (http://pivot.apache.org/tutorials/platform-overview.html).
> 
> - Right-click on the project in Eclipse and select Properties. Click on Java Build Path.
> 
> - Select the Libraries tab and click Add JARs.
> 
> - Navigate to the lib directory in your newly created project, select the Pivot JARs, and click OK.
> 
> You can now create your main application class (the one that implements org.apache.pivot.wtk.Application). The Hello World tutorial page discusses this interface in more detail and provides information on how to launch it in a browser or as a desktop application:
> 
> http://pivot.apache.org/tutorials/hello-world.html
> 
> Note that there is a typo in the current version of this page. The "applicationClassName" applet param should actually be "application_class_name". This will be fixed the next time we update the site.
> 
> Please let us know if you have any additional questions.
> 
> Greg
> 
> 
> On Jan 23, 2010, at 2:43 PM, Mohammed Benabdallah wrote:
> 
>> Good evening,
>> 
>> I'm new on the liste, and i already have a question :
>> 
>> The demo of Pivot are on a JAR file, but what if we want to use eclipse, I mean that in the demo war file we have this architecture :
>> 
>> pivot-demos
>> |_________src (EMPTY)
>> |_________WebContent (All HTML file that call Java Classes)
>> |_________|__________lib (Contain pivot-demos-1.4.jar, all the classes for the demo)
>> 
>> 
>> But in an Eclipse (or NetBeans or a Standard Maven) project, the sources are in src folder, and when i create an HTML file in the WebContent I have an error message saying
>>  Application class name is required
>> 
>> Does any body already work with Eclipse in an Pivot project ? is there any plugin for Pivot ?
>> 
>> Thanks for your time. 
>> 
>> -- 
>> Cordialement.
>> Benabdallah Mohammed
>> 
>> 
>> 
> 


Re: Eclipse and Pivot

Posted by Greg Brown <gk...@mac.com>.
Hi,

Welcome! It is very easy to set up a Pivot project using Eclipse (the Pivot platform itself is actually built using Eclipse). These are the steps I typically use:

- Create a new Java project (File > New Java Project).

- Add a lib folder to the project.

- Copy the Pivot JARs you need to the lib folder. At a minimum, you'll need pivot-core-1.4.jar, pivot-wtk-1.4.jar, and pivot-wtk-terra-1.4.jar. The contents of all the Pivot JARs are discussed in the Platform Overview section of the tutorial (http://pivot.apache.org/tutorials/platform-overview.html).

- Right-click on the project in Eclipse and select Properties. Click on Java Build Path.

- Select the Libraries tab and click Add JARs.

- Navigate to the lib directory in your newly created project, select the Pivot JARs, and click OK.

You can now create your main application class (the one that implements org.apache.pivot.wtk.Application). The Hello World tutorial page discusses this interface in more detail and provides information on how to launch it in a browser or as a desktop application:

http://pivot.apache.org/tutorials/hello-world.html

Note that there is a typo in the current version of this page. The "applicationClassName" applet param should actually be "application_class_name". This will be fixed the next time we update the site.

Please let us know if you have any additional questions.

Greg


On Jan 23, 2010, at 2:43 PM, Mohammed Benabdallah wrote:

> Good evening,
> 
> I'm new on the liste, and i already have a question :
> 
> The demo of Pivot are on a JAR file, but what if we want to use eclipse, I mean that in the demo war file we have this architecture :
> 
> pivot-demos
> |_________src (EMPTY)
> |_________WebContent (All HTML file that call Java Classes)
> |_________|__________lib (Contain pivot-demos-1.4.jar, all the classes for the demo)
> 
> 
> But in an Eclipse (or NetBeans or a Standard Maven) project, the sources are in src folder, and when i create an HTML file in the WebContent I have an error message saying
>  Application class name is required
> 
> Does any body already work with Eclipse in an Pivot project ? is there any plugin for Pivot ?
> 
> Thanks for your time. 
> 
> -- 
> Cordialement.
> Benabdallah Mohammed
> 
> 
> 


Re: Eclipse and Pivot

Posted by Michael Bushe <mi...@bushe.com>.
Not sure if anyone has a better answer, but you can follow my detailed blog
post
<http://michaelbushe.wordpress.com/2009/12/22/creating-an-executable-apache-pivot-app-using-maven/>on
setting up a Pivot project in Maven and then import the Maven project into
eclipse.

Michael Bushe
Software Architect/Developer
michael@bushe.com
www.bushe.com


On Sat, Jan 23, 2010 at 2:43 PM, Mohammed Benabdallah <benabdallah.ma@
gmail.com> wrote:

> Good evening,
>
> I'm new on the liste, and i already have a question :
>
> The demo of Pivot are on a JAR file, but what if we want to use eclipse, I
> mean that in the demo war file we have this architecture :
>
> pivot-demos
> |_________*src *(EMPTY)
> |_________*WebContent *(All HTML file that call Java Classes)
> |_________|__________*lib *(Contain pivot-demos-1.4.jar, all the classes
> for the demo)
>
>
> But in an Eclipse (or NetBeans or a Standard Maven) project, the sources
> are in *src *folder, and when i create an HTML file in the *WebContent *I
> have an error message saying
>
>> * Application class name is required
>> *
>
>
> Does any body already work with Eclipse in an Pivot project ? is there any
> plugin for Pivot ?
>
> Thanks for your time.
>
> --
> Cordialement.
> Benabdallah Mohammed
>
>
>
>