Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Deploy To Dev and Production

Thread view: 
Shelves - 17 Jul 2007 03:33 GMT
I'm a newbie...

I'm using JDeveloper to build a desktop app, as a jar file. I want to
make 2 deployment profiles, one for Development and one for
Production. I would like it to set a constant somewhere that equals 1
for production and 0 for dev... In C++ I could set it up to include
different .h header files. How can I do that in Java? Or, what's a
best-practice for injecting different values into prod vs. dev code,
and having that set in the deployment profile so I can easily deploy
one or the other?

Thanks.

Shelves
Lew - 17 Jul 2007 04:28 GMT
> I'm a newbie...
>
[quoted text clipped - 6 lines]
> and having that set in the deployment profile so I can easily deploy
> one or the other?

Google for "Java property files" and "deployment descriptors".

--
Lew
Shelves - 18 Jul 2007 00:56 GMT
> > I'm a newbie...
> >
[quoted text clipped - 11 lines]
> --
> Lew

Thanks Lew. A property file should work. Do have to use Ant to
accomplish this?
Lew - 18 Jul 2007 02:38 GMT
> A property file should work. Do have to use Ant to accomplish this?

No.

Signature

Lew

Roedy Green - 17 Jul 2007 08:07 GMT
>In C++ I could set it up to include
>different .h header files. How can I do that in Java? Or, what's a
>best-practice for injecting different values into prod vs. dev code,
>and having that set in the deployment profile so I can easily deploy
>one or the other?

You could use an ant script to copy Variant1.java or Variant2.java
onto Variant.java and do a clean compile.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.