Results 1 to 2 of 2
  1. #1
    minujj is offline Member
    Join Date
    Aug 2009
    Posts
    3
    Rep Power
    0

    Smile Avoiding hardcoding of sensetive information in my java program

    Hello all,

    I am connecting to a mail server using JavaMail. For doing this, I need to hard code a username, password and a server IP address. I want to know of a way how can I avoid hardcoding this sensetive information. Prompting the user to enter these details maynot be the solution as I am scheduling the application to run every day at a specified time. So somehow, the application needs to connect to the mail server so that it can perform its specified function. Any ideas?


    Thanks and Regards,

    Minotee Joshi
    Support Engineer
    ProStor Systems, Boulder, CO 80301

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    6

    Default

    You could put the username/password/IP in a config file that you can read from. Granted you trust the machine you run it from. :)

Similar Threads

  1. Avoiding system.exit()
    By swati.jyoti in forum New To Java
    Replies: 5
    Last Post: 07-01-2009, 11:17 AM
  2. Avoiding refresh
    By java_srinivasan in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 06-25-2008, 10:01 AM
  3. avoiding if statements
    By valoyivd in forum New To Java
    Replies: 1
    Last Post: 04-02-2008, 10:08 AM
  4. Swing program to display JVM information
    By satya007 in forum AWT / Swing
    Replies: 3
    Last Post: 11-13-2007, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •