Code Comments
Programming Forum and web based access to our favorite programming groups.How do i generate a .JAR for a Web Application? By default it generates .WAR, but I need a .WAR and a .JAR to the same project. Product Version: NetBeans IDE 6.1 (Build 200804211638) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) Thanks, Júnior.
Post Follow-up to this messageThe question is why do you want a jar, not a war. It doesn't make much sens= e. On Mon, Jun 9, 2008 at 8:01 AM, J=FAnior - iB <junior-eX+1FYolXPxi3DnVkjdj9g h0onu2mTI+@public.gmane.org> = wrote: > How do i generate a .JAR for a Web Application? > By default it generates .WAR, but I need a .WAR and a .JAR to the same > project. > > Product Version: NetBeans IDE 6.1 (Build 200804211638) > Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 > System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) > > Thanks, > J=FAnior. > >
Post Follow-up to this messageI have a web application with the class Product. And I want to use that class in other web application. Sean Chen wrote: > The question is why do you want a jar, not a war. It doesn't make much sen se. > > On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior-eX+1FYolXPxi3DnVkjdj9g h0onu2mTI+@public.gmane.org> wrote: > > > >
Post Follow-up to this messageYou should create a library or a "shared library", look at the nb 6.1 features 2008/6/9 JĂşnior - iB <junior@infobusiness.com.br>: > I have a web application with the class Product. > And I want to use that class in other web application. > > > > Sean Chen wrote: > > The question is why do you want a jar, not a war. It doesn't make much sen se. > > On Mon, Jun 9, 2008 at 8:01 AM, JĂşnior - iB <junior@infobusiness.com.br> <junior@infobusiness.com.br> wrote: > > > How do i generate a .JAR for a Web Application? > By default it generates .WAR, but I need a .WAR and a .JAR to the same > project. > > Product Version: NetBeans IDE 6.1 (Build 200804211638) > Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 > System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) > > Thanks, > JĂşnior. > > > > > -- Victor M. Ramirez A. Ingeniero de Sistemas Universidad del Norte http://vramirez.wordpress.com
Post Follow-up to this messageIt sounds like you should put Product into a Java Library Project that is used by two different Web App projects... vbk Júnior - iB wrote: > I have a web application with the class Product. > And I want to use that class in other web application. > > > Sean Chen wrote:
Post Follow-up to this messageJúnior, You can pull your class out of your web application and create a java librar y. When you complie the library, you will get a .jar. Then use this librar y (.jar) in your web application. Michelle ________________________________ From: Júnior - iB [mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@public.gma ne.org] Sent: Monday, June 09, 2008 8:44 AM To: nbj2ee-gVrGfPuBK2Jg9hUCZPvPmw@public.gmane.org Subject: Re: [nbj2ee] JAR from WebApplication Project I have a web application with the class Product. And I want to use that class in other web application. Sean Chen wrote: The question is why do you want a jar, not a war. It doesn't make much sense . On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <junior-eX+1FYolXPxi3DnVkjdj9gh0 onu2mTI+@public.gmane.org> <mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@p ublic.gmane.org> wrote: How do i generate a .JAR for a Web Application? By default it generates .WAR, but I need a .WAR and a .JAR to the same project. Product Version: NetBeans IDE 6.1 (Build 200804211638) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) Thanks, Júnior.
Post Follow-up to this messageMove the class Product to a Java Application or Java Class Library. Then import the new project / jar file in both projects. Best regards Kristian I have a web application with the class Product. And I want to use that class in other web application. Sean Chen wrote: The question is why do you want a jar, not a war. It doesn't make much sense. On Mon, Jun 9, 2008 at 8:01 AM, Júnior - iB <mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@public.gmane.org> <junior-eX +1FYolXPxi3DnVkjdj9gh0onu2mTI+@public.gmane.org> wrote: How do i generate a .JAR for a Web Application? By default it generates .WAR, but I need a .WAR and a .JAR to the same project. Product Version: NetBeans IDE 6.1 (Build 200804211638) Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) Thanks, Júnior.
Post Follow-up to this messageJ=FAnior, other people have answered. Want to point out one more thing: if "Product" is coupling with web concepts, then you should decouple, refactor and then move into a class library. Reply again if you have more questions. On Mon, Jun 9, 2008 at 12:51 PM, Ho, Michelle M. <Michelle.Ho-itBhTGHPdi0@pu blic.gmane.org> wrot= e: > J=FAnior, > > You can pull your class out of your web application and create a java > library. When you complie the library, you will get a .jar. Then use th= is > library (.jar) in your web application. > > Michelle > ________________________________ > From: J=FAnior - iB [mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@public .gmane.org] > Sent: Monday, June 09, 2008 8:44 AM > To: nbj2ee-gVrGfPuBK2Jg9hUCZPvPmw@public.gmane.org > Subject: Re: [nbj2ee] JAR from WebApplication Project > > I have a web application with the class Product. > And I want to use that class in other web application. > > > Sean Chen wrote: > > The question is why do you want a jar, not a war. It doesn't make much > sense. > > On Mon, Jun 9, 2008 at 8:01 AM, J=FAnior - iB <junior-eX+1FYolXPxi3DnVkjdj 9gh0onu2mTI+@public.gmane.org= > > wrote: > > > How do i generate a .JAR for a Web Application? > By default it generates .WAR, but I need a .WAR and a .JAR to the same > project. > > Product Version: NetBeans IDE 6.1 (Build 200804211638) > Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 > System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) > > Thanks, > J=FAnior. > > > > >
Post Follow-up to this messageMichelle, Vince, Victor... Actually I am using my classes out of my web application. And I´m having to create two Project: a "Java Class Library" for each "Web Application". I would like to create just one (but, of course, I would like to include this one in others). Take a look in 'contas' at attachments. Thanks. Ho, Michelle M. wrote: > Júnior, > > You can pull your class out of your web application and create a java > library. When you complie the library, you will get a .jar. Then use > this library (.jar) in your web application. > > Michelle > > ------------------------------------------------------------------------ > *From:* Júnior - iB [mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@public .gmane.org] > *Sent:* Monday, June 09, 2008 8:44 AM > *To:* nbj2ee-gVrGfPuBK2Jg9hUCZPvPmw@public.gmane.org > *Subject:* Re: [nbj2ee] JAR from WebApplication Project > > I have a web application with the class Product. > And I want to use that class in other web application. > > > Sean Chen wrote:
Post Follow-up to this messageDon't quite understand what you mean, but you should create a common library for both web projects instead of duplicating a class in two different libraries. On Mon, Jun 9, 2008 at 1:13 PM, J=FAnior - iB <junior-eX+1FYolXPxi3DnVkjdj9g h0onu2mTI+@public.gmane.org> = wrote: > Michelle, Vince, Victor... > > Actually I am using my classes out of my web application. > And I=B4m having to create two Project: a "Java Class Library" for each "= Web > Application". > I would like to create just one (but, of course, I would like to include > this one in others). > Take a look in 'contas' at attachments. > > Thanks. > > > Ho, Michelle M. wrote: > > J=FAnior, > > You can pull your class out of your web application and create a java > library. When you complie the library, you will get a .jar. Then use th= is > library (.jar) in your web application. > > Michelle > ________________________________ > From: J=FAnior - iB [mailto:junior-eX+1FYolXPxi3DnVkjdj9gh0onu2mTI+@public .gmane.org] > Sent: Monday, June 09, 2008 8:44 AM > To: nbj2ee-gVrGfPuBK2Jg9hUCZPvPmw@public.gmane.org > Subject: Re: [nbj2ee] JAR from WebApplication Project > > I have a web application with the class Product. > And I want to use that class in other web application. > > > Sean Chen wrote: > > The question is why do you want a jar, not a war. It doesn't make much > sense. > > On Mon, Jun 9, 2008 at 8:01 AM, J=FAnior - iB <junior-eX+1FYolXPxi3DnVkjdj 9gh0onu2mTI+@public.gmane.org= > > wrote: > > > How do i generate a .JAR for a Web Application? > By default it generates .WAR, but I need a .WAR and a .JAR to the same > project. > > Product Version: NetBeans IDE 6.1 (Build 200804211638) > Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19 > System: Windows XP version 5.1 running on x86; Cp1252; pt_BR (nb) > > Thanks, > J=FAnior. > > > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.