Dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid

After upgrading to ML, I am now getting this message when I try to sudo.  I've repaired permissions, rebuilt the dyld cache, and removed the DYLD_LIBRARY_PATH environment variable, all with no success.  Met with this message each time:
$ sudo ls
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
Any help is appreciated.
Thanks!

In short, I find this solution:
     comment out `export LD_LIBRARY_PATH=XXX` in .bash_profile
I do not have DYLD_LIBRARY_PATH in bash env

Similar Messages

  • Terminal: dyld: DYLD_ environment variables ...

    Since upgrading to Mountain Lion -- when I open a new Terminal window or tab -- I get the following:
    dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/login) is setuid or setgid
    Last login: Sat Jul 28 18:50:25 on ttys001
    ~ $
    Any idea how to correct / rid the dyld message?

    Check this topic out: https://discussions.apple.com/message/19066465#19066465
    You need to unset whichever DYLD_<something_else> variable you have.
    In my case, I commented it on /Users/<my_username>/.bash_profile:
    #export DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient_10_2"
    Of course, that leaves me with another problem. In order to use the Oracle database server with ruby, I need that variable set. So I'm stuck commenting/uncommenting the variable as needed. Apple needs to fix this.
    If you can't find that variable, you may have asepsis installed (maybe you installed it with TotalFinder). Removing it fixes the problem, but I also ran into some issues and had to do a complete reinstall of the OS.
    regards,

  • How to install correctly Java 1.5 on Mountain Lion?

    After Moiuntain Lion installing, I have re-install my Java 1.5 in my system.
    I need of it to run a build for a specific application. When I tried to do it, I got the following message:
    [javac] Invalid memory access of location 00000000 eip=0237da36
    I would like to know if Java 1.5 is fully supported on Mountain Lion?

    Thank you for your return
    But this article is related to the Java 1.6, not the 1.5 version .
    I need to find a way to re-install my jdk 1.5 on my Mountain Lion.
    Since my Lion update, when I try to use the sudo command, I have this kind of message:
    dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
    And also when I tried to build my project, I got this error:
    [javac] Invalid memory access of location 00000000 eip=0077da39

  • How to install W7/XP with VirtualBox on Mountain Lion?

    Hey, I want to install Zoo Tycoon (the first version) but it is not for Mac. Complete collection is only for Mac but not for Mountain Lion or is another way without VirtualBox? Please help me! Thank you!!

    Thank you for your return
    But this article is related to the Java 1.6, not the 1.5 version .
    I need to find a way to re-install my jdk 1.5 on my Mountain Lion.
    Since my Lion update, when I try to use the sudo command, I have this kind of message:
    dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
    And also when I tried to build my project, I got this error:
    [javac] Invalid memory access of location 00000000 eip=0077da39

  • Passing environment variables to managed server during nmStart

    I'm trying to script automated start with WLST using node managers but noticed that we're having some applications depending on some environment variables being set during startup.
    How can I pass these from the node manager? Is it possible?
    I'm trying to keep the number of nodemanagers to a minimum, otherwise I just could have just used a second one with these variables defined.
    Edit: Could I just use os.environ perhaps for this?
    Edit2: Say I wan't to use the admin console to restart said managed servers, is it possible to set these variables when starting from the adminconsole through the node manager?
    Edited by: user13100625 on Aug 23, 2011 11:23 AM
    Edited by: user13100625 on Aug 23, 2011 12:04 PM

    os.environ did not work because the nodemanager forks a new process inherited on it self... seems like I need a second nodemanager...

  • Getting a Unix environment variable

    Hi, everyone.
    I need to use a Unix enviroment variable from a form. This form
    is gonna use this variable in order to be the path of another
    form who is gonna be called.
    In other words:
    CALL_FORM( $unix_var + '/forms/myform_name' );
    unix_var is what I want to get.
    Thanks a lot in advance,
    Eduardo

    It worked, Michael. Thanks a lot!
    To the documentation guys at Oracle... This is how you define
    the TOOL_ENV package in the Forms' help:
    "The TOOL_ENV package allows you to interact with Oracle
    environment variables by retrieving their values for use in
    subprograms."
    Suggestion: ...with Oracle environment variables AND OTHER
    SYSTEM OPERATION ENVIRONMENT VARIABLES...
    because this narrow definition can prevent people for trying to
    use it to retrieve other NON-ORACLE environment variable via
    this package. Thanks.

  • App-V 5 package ignores environment variable included in virtual registry

    Hey all,
    I'm experiencing following problem with one of my virtual packages - it keeps ignoring system environment variable included in virtual registry.
    During sequencing, i've added system variable on the machine, sequencer picked it up and included in virtual registry. Variable is stored in following key (key set to merge):
    Machine\System\CurrentControlSet\Control\Session Manager\Enviroment\MyVariable
    When i install the application (with msi, packaged fully cached on the client) and i run the application, it fails with error. 
    Going into virtual environment of the package with cmd.exe /appvpid:<pid of application>  and checking
    SET command, i see that variable is stored, recognized and returned correctly:
    MyVariable=C:\ProgramData\App-V\5550C766-44C0-4E75-95F9-961EFDC04B8E\158980CE-20C3-4D2B-9763-B06616BF71D0\Root\BIN 
    Where C:\ProgramData\App-V\5550C766-44C0(..) is local cache copy of the application.
    There is a kind of workaround - application works properly when i set the variable in client's environment variables.
    It looks like App-V package completely ignores the variable from virtual registry as adding identical one to the client machine allows the application to run just fine.
    Has anyone similar experienced with their applications and would be able to point me in some directions where to look for the issue?
    Thanks,
    Marek

    All, 
    Sorry for the spam on this thread, here is the workaround (I use AD groups).  I configured this in the UserConfig.xml (remember to re-import via management console if used).
    The first shortcut called BMC Atrium Integrator Spoon.lnk is the default from sequencing, it does work via the sequencing machine and also launches from command prompt within the app-v environment, but does
    not work via the Windows startmenu.
    The second shortcut called BMC Atrium Integrator Spoon Test.lnk
    uses cmd.exe to fire off the spoon.bat (argument), this link works great native from the Windows Start-menu.
    <Shortcuts Enabled="true">
          <Extensions>
            <Extension Category="AppV.Shortcut">
              <Shortcut>
                <File>[{Common Programs}]\BMC Software\Atrium Integrator\BMC Atrium Integrator Spoon.lnk</File>
                <Target>[{AppVPackageRoot}]\client\data-integration\Spoon.bat</Target>
                <Icon>[{Windows}]\Installer\{D664641A-EC80-45F0-828E-22A1174C4537}\IconD664641A.ico.1.ico</Icon>
                <Arguments />
                <WorkingDirectory>[{AppVPackageRoot}]\client\data-integration\</WorkingDirectory>
                <ShowCommand>1</ShowCommand>
                <ApplicationId>[{AppVPackageRoot}]\client\data-integration\Spoon.bat</ApplicationId>
     </Shortcut>
    </Extension>
    <Extension Category="AppV.Shortcut">
    <Shortcut>
    <File>[{Common Programs}]\BMC Software\Atrium Integrator\BMC Atrium Integrator Spoon Test.lnk</File>
    <Target>[{System}]\cmd.exe</Target>
    <Icon>[{Windows}]\Installer\{D664641A-EC80-45F0-828E-22A1174C4537}\IconD664641A.ico.1.ico</Icon>
    <Arguments>/C [{AppVPackageRoot}]\client\data-integration\Spoon.bat</Arguments>
    <WorkingDirectory>[{AppVPackageRoot}]\client\data-integration\</WorkingDirectory>
    <ShowCommand>1</ShowCommand>
    <ApplicationId>[{System}]\cmd.exe</ApplicationId>
    </Shortcut>
     </Extension>
          </Extensions>
        </Shortcuts>

  • Library paths and environment variables

    Hello,
    I am using 10g AS 9.0.4 on a Unix system.
    I am trying to convert an old JSP web application to work with 10g. It is not an EAR/WAR file so I am manually trying to set it up under the "default-web-app" folder. It uses a number of java class files which currently reside in $J2EE_HOME/default-web-app/WEB-INF/classes/mystuff.
    These class files require access to a number of libraries. I foolishly believed that they would be accessible if I were to place them in the $J2EE_HOME/default-web-app/WEB-INF/lib folder, but that did not work.
    I read that OC4J uses a "catch all" lib directory at $J2EE_HOME/applib. I copied the library files there and they still did not work.
    Frustrated, I tried to print out the environment variables for the server - only to find that this function is not supported.
    I managed to print out the library path by creating a Java class files which returns the following as a string:
    System.getProperty("java.library.path");
    This (when called from a JSP) prints a number of different library paths, none of which match those found listed in the $J2EE_HOME/config/application.xml file. I placed the library files in one of the paths listed by the "java.library.path" and it worked!
    3 questions:
    1. How do you print the server's environment variables using a JSP? This strikes me as a very useful function for sorting out library and path issues. Do a search on Google for "print environment variables OC4J" or something similar and there are no useful pages suggesting how this can be done.
    2. Why are the default library paths different on the server than to those specified in application.xml?
    3. How do I change the LD_LIBRARY_PATH (or any environment variable for that matter)? I have tried adding the following line to $ORACLE_HOME/Apache/Jserv/etc/jserv.properties without success:
    wrapper.env=LD_LIBRARY_PATH=/my/custom/library/path
    Any help you can offer would be most appreciated.

    >
    Thanks very much for a such a comprehensive response
    - it has helped answer a lot of questions, especially
    being able to print out the system properties. That
    will be really useful!
    No worries at all Rob.
    The main hurdle is that the libraries are indeed
    native (*.so) libraries. I hadn't considered that
    until you pointed it out in your message. Can I
    assume, then, that $J2EE_HOME/applib and
    $J2EE_HOME/default-web-app/WEB-INF/lib are only
    designed to handle Java's .JAR librares? That would
    explain why placing the native libraries in there
    didn't work, but is there a way of getting such
    native libraries recognised and bundled up in a
    WAR/EAR file?
    Yep, that's it.
    Our proprietary applib and the servlet specs web-inf/lib are only dealing with Java archives.
    The J2EE specs don't cover how to deal with native libs like this.
    Now I've NEVER EVER tried it, but it's worth a shot of at least trying -- for simplified packaging purposes, what you may be able to do is to distribute the .so's within the web-inf/lib -- and then just set that directory (where's its realized on the server after the app is deployed) to be referenced witihn the LD_LIBRARY_PATH. I'd expect our deployment manager will just ignore files it doesn't know about, so arguably you should be able to at least distribute them with the standard archive.
    You'll need to specifically set the LD_LIBRARY_PATH as a separate task outside of the deployment operation though.
    >
    This is where things get a bit weird, and is partly
    my fault during the installation of 10g AS.
    We already had an existing installation of Oracle 10g
    Database (10.1.0) at $ORACLE_HOME under the user
    "oracle". I logged in as the user "oracle" to install
    the Application Server into a different location (In
    this case, "$ORACLE_HOME/../ias10g_9.0.4" - let's
    call this $IAS_HOME). So there is no separate user
    account for Oracle Database and Application Server
    (and hence no separate $LD_LIBRARY_PATH).
    If I log into UNIX as the user "oracle" and echo the
    LD_LIBRARY_PATH, I get the following directories:
    $ORACLE_HOME/lib
    /usr/openv/netbackup/bin
    /usr/dt/lib
    /usr/lib
    I use this user to do "opmnctl stopall" and "opmnctl
    startall". If I then print out the library path from
    a JSP using
    "System.getProperty("java.library.path");", I get the
    following paths:
    $IAS_HOME/jdk/jre/lib/sparc/server
    $IAS_HOME/jdk/jre/lib/sparc
    $IAS_HOME/jdk/jre/../lib/sparc
    $IAS_HOME/opmn/lib
    $IAS_HOME/lib
    $IAS_HOME/usr/lib
    Which is totally different to those listed by
    $LD_LIBRARY_PATH at the command line, which means
    they must be coming from somewhere else.
    It gets worse - my application is trying to call a
    native library that is only present in the
    $ORACLE_HOME/lib32 directory (libclntsh.so.10.1), so
    unless I can include this path in the
    "java.library.path" on the Applicaiton Server, then
    my program will not work.
    So, how do I change the "java.library.path" when the
    values aren't coming from $LD_LIBRARY_PATH in the
    first place?
    The utility $IAS_HOME/opmn/bin/opmnctl is actually a shell script.
    It has this section which sets the LD_LIBRARY_PATH:
    if [ -z "$LD_LIBRARY_PATH" ]
    then
    LD_LIBRARY_PATH=$ORACLE_HOME/opmn/lib:$ORACLE_HOME/lib ; export LD_LIBRARY_PATH
    else LD_LIBRARY_PATH=$ORACLE_HOME/opmn/lib:$ORACLE_HOME/lib:${LD_LIBRARY_PATH} ; export LD_LIBRARY_PATH
    fi
    So if you have an existing LD_LIBRARY_PATH env var set, it should just be putting its paths onto the front of it.
    What you could try as a quick test is to edit the opmnctl script (after taking a backup of course) and either appending the path you need to it, or just add some debug statements to output the LD_LIBRARY_PATH value it ends up setting so you can try and work out what's causing it.
    I expect these other entries:
    $IAS_HOME/jdk/jre/lib/sparc/server
    $IAS_HOME/jdk/jre/lib/sparc
    $IAS_HOME/jdk/jre/../lib/sparc
    are coming from the JRE when it is launched, in probably a similar manner to our opmn entries.
    I really appreciate your help, and I bet if anyone
    can answer these questions, you can! ;-)
    You're very welcome.
    cheers
    -steve-

  • How do I use Embed with an environment variable in an Actionscript AIR project Flash Builder 4.7

    I am using Flash Builder 4.7 to build an Actionscript AIR project.  The project embeds a number of png files from my local directory and I have been using absolute paths which all works fine.
    I have a laptop with which I want to start developing the same project - I set up a git repository that both the laptop and main pc can pull from and so I can get the source where I need it and push it back to the central repository.
    My problem is that the absolute paths for the embed commands don't work on the laptop as it has a different filesystem setup (Windows 8 with one drive as opposed to Windows 7 with a SSD and a data drive).  I thought the solution would be as easy as using an environment variable to specify the path which could then point to a different physical directory on both machines, i.e:
    [Embed(source = "DEVELOPER_RESOURCES/graphics/are/here.png"]
    I did a bit of research and there was quite a lot mentioned about setting up resource directories using path variables which I worked through but I just can't get it to compile.  The Actionscript compiler just won't find the png files however I specify the path.  I tried something with a FLEX project and the compiler didn't complain but I think this is because the compiler for FLEX uses a different convention.
    [Embed(source ="/Project Name/DEVELOPER_RESOURCES/graphics/are/here.png"]  works with FLEX but not Actionscript.
    So does anyone have a recipe for using the Embed command referencing assets using an environment variable that works across multiple machines with different file structures?

    I managed to find a solution on Windows which was to use symlinks and absolute paths.  You an basically point one directory to another so I did something like:
    mklink c:\developer_resources c:/the/local/path/to/my/resources
    and then reference all resources as c:\developer_resources\...
    Now as long as a developer machine has the right link (from c:\developer_resources to the place where the resources are kept) then it seems to work. 
    This doesn't however work for Mac and certainly isn't a solution for passing files between Mac and windows

  • How do I use a OS (Windows) Environment Variable in the source path of me ActionScript 3.0 settings

    I'm sure this can be done as I know we used something similiar at my old work place, below is an image showing what I am attempting to do.
    We used this to create more portable / shareable assets files which when symbols are linking to code, the code was very often in different directories on different machines.
    So we had set up environment variables in the OS to point to source directories and then used these variables in the source paths.
    As long as everyone had these variables set up then it would all work.
    Anyone know the correct way to do this in Flash CC
    Thanks in advance!
    Best Wishes
    Rhys Thomas

    sinious the problem with doing that is that the changed path gets into the code repository as well, so you wind up with everyone going back and forth changing it to their own value, which is a hassle. If you use relative paths and a standard project setup, then it all "just works" without a problem.
    For example, this is the setup I use:
    .dev
         .thisProject
              .Flash1
                   Flash1.as
                   .Flash1
                        Flash1.xfl
                   .view
                        .audioAssets
                        .customViews
              .SoundLib
                   SoundLib.xfl
              SoundLib.swc
         .bin <swfs are output here
              .xml
         .core
              .control
              .model
              .service
              .view
    We have a "base project" that you check out to start a new project (we do heaps of similar work), and the paths are already set up to be relative. Having each project point to its own copy of the core code allows for fine-grained control of which revision you're using--we've even pointed deliberately to old versions or branches on rare occasions.
    The bin folder is actually shared with the website repository, which is in a different directory from the Flash source code (in the website, it has a different name). This allows the generated swfs to be easily updated and ensures that the latest XML is being used both for development and on the site.
    The "thisProject" folder actually includes a Flash Builder workspace with all the standard shortcuts, etc., already set up. This is primarily because of how the "default path" works when you create a new Flash Pro project in FB. Because we output a level up from the workspace, we hack the .metadata folder every time, but that's a small change.

  • Why do we need to declare CATALINA_HOME environment variable in Tomacat?

    {color:#ff0000}*Why do we need to set CATALINA_HOME
    environment variable while using TomCat and what happens if we do not
    {color}
    {color:#008000}If anybody has the solution .. please do reply
    {color}
    Thanks &
    Regards, Akshay_L

    SoulTech2012 wrote:
    it makes zero sense because if CATALINA_HOME is not set, then CATALINA_HOME/bin won't resolve at all (unless some form of magic is used)
    # Get standard environment variables
    PRGDIR=`dirname "$PRG"`
    # Only set CATALINA_HOME if not already set
    [ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`rightBy "right", are you being sarcastic or are you saying that code is correct?
    It's a pretty standard technique for setting default variables under *nix, no magic involved. And this particular example was taken from the Tomcat 5.5.25 startup script.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error submitting environment variable containing spaces

    Hello,
    I need some help passing an environment variable that contains spaces to the JVM when launched via the command line
    I can successfully use the following and read its value in the java application:
    java -DMYVAR=value.cfg myClass
    However, when I try
    java -DMYVAR="value1.cfg, value2.cfg, value3.cfg" myClass
    I get the following exception
    Exception in thread "main" java.lang.NoClassDefFoundError: value2/cfg"
    It looks like the inverted commas are being discarded and the JVM is treating value2.cfg as a class to execute
    I have run this on
    1) a Solaris box with the following details:
    SunOS trafford 5.6 Generic_105181-26 sun4u sparc SUNW,Ultra-4
    and java version
    java version "1.2.1"
    Solaris VM (build Solaris_JDK_1.2.1_04, native threads, sunwjit)
    2) an HP box with the following details:
    HP-UX wpsc02 B.11.00 U 9000/800 105911507 unlimited-user license
    and java version
    java version "1.4.1.00"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1.00-030116-09:58)
    Java HotSpot(TM) Server VM (build 1.4.1 1.4.1.00-030116-11:27-PA_RISC2.0 PA2.0, mixed mode)
    We want to do this so that we can get the value of MYVAR, split up the string using a StringTokenizer on the "," and pick out as many tokens as are present. As a workaround, we can leave out the spaces and it works fine, but it would be useful to be able to allow the spaces
    Thanks in advance to anyone who has any ideas about what is happening or how to solve this

    Try this:
    java "-DMYVAR=value1.cfg, value2.cfg, value3.cfg" myClass
    Notice the quotes are in front of the -D, not the equal sign.
    Juan

  • Sapcheck environment variable

    brconnect jobs in DB13 are failing.  The job log gives me a pretty good indication why:
    BR0252E Function fopen() failed for '/oracle/BBS/920_64/sapcheck/cdwcvtyd.sta' at location main-9
    BR0253E errno 2: No such file or directory
    From this, it appears that it is trying to access the log in the wrong directory (oracle/BBS/920_64) - not /oracle/BBS/sapcheck.
    Documentation suggests setting the SAPCHECK environment variable to accomplish this.  However, we have not tried this since we would like to understand how / why / where this errant setting setting got there.  Also, we are assuming that if we do add this variable it needs to be added for the <SIDADM> user - is that accurate?
    In addition, this is a "stage" system that should be configured identically to the DEV system which is working.  We also have several other ancillary systems that are functioning as expected - which again, makes us hesitant to just add the "band-aid" solution of an environment variable.

    Jeff,
    To answer your question regarding which user's  environment variables are used: When you run jobs from db13, the executables are being called from sidadm. However, depending on the permissions and ownership that the executable that is called has, the process can be run by orasid as well. So, if you call something from db13 , it starts with sidadm, but if the executable is owned by orasid and the s flag is set instead of x on the permissions, it will run with orasid. Maybe this is why the ORACLE_HOME is picked up instead of SAPDATA_HOME?
    These are my permissions, which work fine in 5 installations we have here. Maybe you can run saproot.sh as root (this is under /sapmnt/SID/exe ) as root:
    ./saproot.sh SID
    and the correct permissions will be set 
    -rwsrwxr-x   1 oraprd   sapsys   4898192 Jan 21  2007 brarchive
    -rwsrwxr-x   1 oraprd   sapsys   5042888 Jan 21  2007 brbackup
    -rwsrwxr-x   1 oraprd   sapsys   6622328 Jan 21  2007 brconnect
    -rwxr-xr-x   1 prdadm   sapsys   5409416 Jan 21  2007 brrecover
    -rwxr-xr-x   1 prdadm   sapsys   2132496 Jan 21  2007 brrestore
    -rwxr-xr-x   1 prdadm   sapsys   6817944 Jan 21  2007 brspace
    -rwsrwxr-x   1 oraprd   sapsys   2758224 Jan 21  2007 brtools
    Ensure that the brtools, brspace, brconnect etc executables in the system where you have the issue  have exactly the same ownership /permissions with the system where everything works fine. Pay particular attention that the "set user id on execution" bits or flags are correctly set  (the S instad of x )  (rwsr_xr_x)
    I hope this helps
    Andreas

  • Unabled to set Environment Variables to point to javac.exe

    Hi everyone
    I have recently installed the Java Development Kit 6 in my Windows 7 Ultimate 32 bit installation but not been able to set the path to the javac compiler in the Environment Variables. What I have done so far is:
    Opened the Environment Variables dialog obx
    Created a new PATH to C:\Program Files\Java\jdk1.6.0_20\bin under User Variables
    Added C:\Program Files\Java\jdk1.6.0_20\bin to the right end of the series of directories called 'Path' under System Variables
    The instructions on this in the Oracle website seems to be written for Windows XP and apparently different setup is required for Windows 7. All I want to do is every time I launch Command Prompt, the Prompt knows where javac.exe is so it can execute it without my typing the path to the compiler.
    A funny thing I noticed is that Windows 7 only has a variable called 'Path' under System Variables not under User Variables.
    I would like to have as much as avice/instructions as possible because it has been nagging me for quite some time and irresolvable.
    Thank you in advance,
    Derek

    Environment (env) variable names are case insensitive. So Path and PATH are the same.
    The 'System' env vars are at the top.
    The 'User' env vars inherit from the 'System' env vars. So every env var in 'System' is in 'User'. The 'User' exists so that two people on the same box can have different env vars.
    If you want to use 'User' to set the Path then you would do it like this in the User panel.
    <pre>%PATH%;C:\Program Files\Java\jdk1.6.0_20\bin</pre>
    That would add your java path to the System one. If you are not concerned about users then you can just modify System.
    You can verify the settings by opening a console window and typing the following.
    <pre>set PATH</pre>
    As for why it is isn't working.
    - You forgot to say 'Ok'. I do this occassionally. Until you hit Ok on the Env Variables main box your changes do not get applied.
    - Something is actually wrong with the path that you typed.
    - Win 7 might not propogate into the OS like previous systems. I believe I have seen this. I know that the console shell was re-written for Win7 to make it a more integral part of the OS. Rebooting solves this and log in/out might as well. Or I might just be mistaken as well.

  • Servlet environment variables

    Hi
    I'm developing a webservice and I need it to read some configuration info (database related stuff mainly: database name, jdbc driver, etc). Are the environment variables definable in the web.xml file, the way to go?
    And, how can I access them inside the service code?
    Thanks in advance!

    For smallish systems web.xml can be used. Google for "getInitParameter example", e.g. the one in javaalmanac.com seems ok.
    For larger systems you may want code reuse. Then the servlets would usually be a fairly thin layer on top of "business code", database code and reusable libraries. You'll want to separate most code away from servlets so you can test (jUnit) and reuse the bulk of the code in non-servlet programs. You wouldn't want to do configuration with web.xml and getInitParameter() because those are servlet-only. You'd put configuration in a properties file and access it with java.util.Properties. Alternatively an XML solution if you have a lot of structured configuration.
    You could go Properties right away, it's a few lines more code depending on how you do it. Google "java properties example", starting with javaalmanac.com.
    If your service is to be installed in an existing environment, ask the sysadmins what existing code does and what they prefer. They are the customers of your config mechanism.

Maybe you are looking for

  • Locked Out of Blackberry ID and password Please Please Help

    I updated my blackberry messenger and its asking me for my id and password I have tried doing another ID but its not letting me do anything now my messenger has gone and I have tried accessing my app word but it keeps saying that I am locked out for

  • Crystal Report 10 to Xi 3.1 - Migration

    Hi All, Is there any document or white paper available for Migration of CR 10 to Xi 3.1. I am looking for detail step by step document for the migration. Requesting to send the same . Thanks in advance. Regards, Sid

  • Backup problem of Oracle XE

    Hi, Greetings. OS: windows XP DB: Oracle 10g xe I wanted to backup the xe database. Firstly, I chose the simplest way according to the 2day DBA, clicking the "*backup database*" menu item. But I only got a popup dialog, showing messages like "*The NT

  • Why do I have 2 copies of the movie Skyfall??

    Recently bought "Skyfall", downloaded the HD and SD versions from iTunes Store. Both versions are showing side by side in Movies area. All the other movies I have in HD and SD show up as one title. Checked in the media folder and both versions of Sky

  • No data received with wget command on Solaris 10

    Dear All, When I use the 'ping' command is can ping to the server normally but when I try to use the 'wget' command to retrieve data from Server is cannot get anything. I got the error message as bellow ./wget no-check-certificate private-key=/cert/d