Hi,

Are you simply looking to define a constant?

In Java, this can be achieved by:

Class A
{
        public final static String SERVER = "";
}

You then reference this value in other classes using A.SERVER

Hope this helps.

James

-----Original Message-----
From: java-ee-j2ee-programming-with-passion@googlegroups.com
[mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of
tedpottel
Sent: 15 October 2009 15:49
To: Java EE (J2EE) Programming with Passion!
Subject: [java ee programming] using as define in Java


Hi

I may have already posted this, but cannot find it.

I'n using Ajax code, I have 3 different servers the php file is in,
depending on what I'm debugging. I have the Jiffy server when
debugging within eclipse, then I have my local Apache server, when I'm
trying to debug the php code, and a different server name for
production run.

C and PHP has a  define statement, whare I could have something like
#define server /local/
And include it in all my files.

Is there a way to do this in java, so I can easly switch the server
name, without having to change it superbly in all my classes?

Ted Define



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.421 / Virus Database: 270.14.9/2427 - Release Date: 10/10/09
06:39:00


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to