Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: how to edit hosts file in windows7 using java program ?

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post how to edit hosts file in windows7 using java program ?

    Hi all,
    I am developed a java program for editing hosts file. this is working in Windows XP and not working in Windows 7.

    Any one please help regarding "how to edit hosts file in windows 7 using java program "


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: how to edit hosts file in windows7 using java program ?

    Quote Originally Posted by vijay_p
    this is working in Windows XP and not working in Windows 7
    This is not enough information for us to go by.

    What doesn't work? Are any errors generated? We haven't seen any of your code.
    I suggest you research the difference between the Windows XP and Windows 7 hosts file.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    11
    My Mood
    Sad
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to edit hosts file in windows7 using java program ?

    Quote Originally Posted by JavaPF View Post
    This is not enough information for us to go by.

    What doesn't work? Are any errors generated? We haven't seen any of your code.
    I suggest you research the difference between the Windows XP and Windows 7 hosts file.

    Windows 7 is not allowing editing/modifying hosts file (hosts file is system file) using java program.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: how to edit hosts file in windows7 using java program ?

    Something about security and administrative privileges.

Similar Threads

  1. Allow user input to edit text file??
    By dannyyy in forum Java Theory & Questions
    Replies: 2
    Last Post: April 6th, 2011, 06:53 AM
  2. Opening a file with a java program
    By hafunui in forum Java Theory & Questions
    Replies: 4
    Last Post: March 1st, 2011, 04:52 PM
  3. Replies: 2
    Last Post: August 1st, 2010, 06:29 AM
  4. JFrame Edit
    By n00b123 in forum AWT / Java Swing
    Replies: 1
    Last Post: May 19th, 2010, 08:23 PM
  5. java program to copy a text file to onother text file
    By francoc in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: April 23rd, 2010, 03:10 PM

Tags for this Thread