Reading .txt file on Windows Server 2008

I have a Java 7 application that we distribute, and it reads configurations from a .txt file distributed with it, in the same directory as the .jar file. On Windows 7, windows XP, Windows 8, this works fine, but on our server, running Windows Server 2008, this fails. It is a simple check that fails:
Path p = Paths.get("config.txt");
if(Files.isReadable(p))
This will not work on Windows Server 2008 r2. It suspect that it somehow hasn't got read permissions, but I'm not sure.
It also fails if the absolute path is specified.

And what if you use the regular old fashioned standard IO File class and not Files to check if the file is readable (File.canRead())?
Methinks (or to be honest: I guess) there is something odd with the creation of the Path object on your windows server file system, but I wouldn't be able to tell what exactly.

Similar Messages

  • Upload the MVC File in window server 2008

    i want to upload the mvc file in server 2008 
    installed iis7 in window server 2008. please forward the Pre-Requirements for upload the mvc file and how to upload the mvc file.
    i want to host mvc file in window server 2008. please help me. 
    Thank you

    On Tue, 10 Feb 2015 18:03:54 +0000, madudhula mahesh wrote:
    i want to upload the mvc file in server 2008 
    installed iis7 in window server 2008. please forward the Pre-Requirements for upload the mvc file and how to upload the mvc file.
    i want to host mvc file in window server 2008. please help me.
    This forum, as the name should indicate, is only for Windows Server 10
    issues. Since your question appears to be about IIS repost to:
    http://forums.iis.net
    Paul Adare - FIM CM MVP
    Q. how many hackers does it take to screw in a light bulb?
    A. Huh?...What? Oh, it's dark in here?

  • Missing Files in Windows Server 2008 server

    There are a lot of missing files in a server that we manage.
    There are no scheduled changes or activity prior to this incident.
    Is there a way to determine how the files were deleted?
    Are there any reported issue regarding sudden disappearance of files in Windows Server 2008?
    What are the events to look / find at the logs?

    Hi,
    You can check the event viewer to see if any related logs existing.
    If you enabled Audit Objecr Access with both success and failure events in group policy(Computer Configuration>Windows Settings>Security Settings>Local Policies>Audit Policy>Audit Object Access - Success/Failure), add auditing to the
    folders/drives and enable auditing for "Delete" and "Delete Subfolders and Files", then you can check that under security log in event viewer.
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • CHM files and Windows Server 2008

    RH 7, HTML
    Support person has a customer trying to view .chm files in Windows Server 2008. They went ahead and tried the "normal" registry fix to view chm files over a network, but that didn't not fix the issue.
    My understanding is that chm files can't be viewed in Windows Server at all, but thought I'd verify - is there any way to view chm files in Windows Server 2008?
    Thanks,
    -Jeff

    Jeff,
    I don't think that anything has changed in Windows 2008, and .chm files are certainly viewable in this version of Windows. However, it may be that the customer needs to tinker with the security settings in Internet Explorer to make remote .chm files viewable. See this article for details:
    http://weblog.helpware.net/?p=50
    To ensure that the correct registry changes are being made, the customer could try making them with the free HHReg utility. It's available from here:
    http://www.ec-software.com/products_hhreg.html
    Pete

  • How Create Dos boot able USB for Create Ghost for NTFS File and windows server 2008

    Hi
    How Create Dos boot able USB.
    Which show all Partition Drive in dos mode for NTFS file system.
    I have Windows Server 2008 which have NTFS File System of Hard disk.
    I have not CD / DVD Rome and I cannot attach the CD / DVD because we have no permeation by our organization.
     but i wanted to create Ghost.
    So i need boot pc by other media USB.
    Please help me.

    Hi
    I just assembled a cd which boots dos and can read and write to ntfs drives.
    Should you be interested in the iso image file which you can use to write to cd or usb please email me at [email protected]
    Thanks
    Nuno

  • Trying to zip / compress a file in Windows Server 2008 & SQL Server 2008 R2 server

    Hi,
    We are trying to zip / compress a xml file that has been created by retrieving data from SQL Server 2008 R2 database running on Windows Server 2008.
    To compress this file, we cannot use any external softwares like 7-zip or WinZip.
    So, we would like to know if there is any windows default compression tool that works on command line to compress the file?
    As this is a live server we cannot apply any other softwares.
    Please suggest any ways to do it in Windows Server 2008 machine.
    Thanks & Regards
    Kalyan

    Hello Kaylan,
    and for uncompress what can I use
    This is a way to do it in SSIS
    http://sqlblog.com/blogs/jorg_klein/archive/2009/08/27/ssis-unpack-a-zip-file-with-the-script-task.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can't install Adobe Reader using Firefox on Windows Server 2008 R2

    I am hoping someone can kindly help me out here.
    Using Firefox I went to http://get.adobe.com/reader/ and clicked the download button and received the Getplus add-on to Firefox.
    When Firefox restarts the getplus window opens but sits there and does nothing with the window remaining blank for ever..
    Each time I try it is the same
    I am logged into Windows Server 2008 R2 as Administrator but it might be a permissions problem as this is a new install of 2008 and seems pretty locked down.
    Thank you in advance

    Are these signs of Adobe failing?
    After subscribing to this forum, I received an email in German from Adobe......................
    Vielen Dank für Ihren Beitritt im Adobe-Club. Als Mitglied können Sie eine Reihe exklusiver Vorteile, Ressourcen und Dienstleistungen in Anspruch nehmen.
    Mitglieder können:
    * unseren Newsletter Adobe Minute Mail (deutsch) abonnieren
    * unseren Newsletter Adobe Edge (englisch) abonnieren
    * Informationen zu ihren Käufen und Transaktionen im Adobe Store aufrufen
    * ihr Adobe-Profil verwalten und aktualisieren
    * in der Adobe Exchange Dateien hoch- und herunterladen
    * Nachrichten in den Adobe-Foren veröffentlichen
    Ihre Adobe-Club-ID lautet
    Um Ihr Adobe-Profil und Ihre Voreinstellungen zu ändern oder um Adobe Edge zu abonnieren, loggen Sie sich einfach ein.
    Whatever, Adobe

  • Files Transfer from Windows Server 2008 R2 on Mac

    Hi,
    How can I transfer files from "Windows Server 2008 R2" on Mac? as now I am using 2 App (Microsoft Remote Desktop & Fast Remote Desktop) which allowed me everything but not transfer files on Mac, so any other recommendation or salutation?
    Thanks

    Hi,
    You need to configure folder redirection.
    Folder redirection enables access local folders during the remote session. Click the + button at the bottom of the dialog and choose a folder you want to have
    redirected.
    Configure Folder Redirection:
    1. Click the + button.
    2. In the Add Local Folder window, enter the following information:

    Name: Set a name for the folder to be available during the remote session.

    Path: Select the path to the folder to be available during the remote session.
    3. Click the close button to save the remote desktop.
    Getting Started with Remote Desktop Client on Mac
    http://technet.microsoft.com/library/dn473012
    Hope this helps.
    Jeremy Wu
    TechNet Community Support

  • Administrators unable to write to a text file created by another Administrator on Windows Server 2008.

    Why are Administrators unable to write to a text file created by another Administrator on Windows Server 2008?
     --- The Administrators already have full control so how do I fix this? ---
    Example:  On a Windows Server 2008 (SP1): user A (who belongs to the Administrators group) logs in and creates a directory C:\foo and creates a file readme.txt in the foo directory.  User B (also a member of the Administrators group) logs in and opens C:\foo\readme.txt in notepad. User B types something and tries to save the file. User B cannot save the file…an option to save as some other file name is presented. The security permissions of C:\foo\readme.txt show that Administrators have full control.  
    Work around 1: Explicitly add user B to have full control over the foo directory. The problem is that all the all other Administrators still need to be added (current and future).
    Work around 2: Change the Users security permission to be full control on the foo directory. (this seems dangerous!)
    It is interesting to not that this same procedure is not a problem in Windows Vista. (Any insight about the difference?)
    Sincerely,
    Ian 

    so there is no way to change this without literally shutting down the UAC?
    I have files that  I need to modify all the time, and it is very annoying to have to save as to my desktop modify and then copy and paste the file again.
    I would also rather not give myself permissions to the entire C:\ Drive even specified Folders or documents, etc......
    You can change these settings without bringing down the UAC
    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:Calibri; mso-fareast-font-family:Calibri; mso-hansi-font-family:Calibri;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->
    1.    Click Start, type gpedit.msc and press Enter.
    2.    Expand Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options.
    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:Calibri; mso-fareast-font-family:Calibri; mso-hansi-font-family:Calibri;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->
    3.    Double-click “User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode” on the right pane.
    a.    Choose “Elevate without prompting” and click OK.
    b.    Double-Click “User Account Control: Admin Approval Mode for the Built-in Administrator account”, Click Enable, Apply and then OK
    c.     Double-Click “User Account Control: Run all users, including administrators, as standard users”,Click Enable, Apply and then OK
    Then reboot the Server. You should now have the ability to modify any document, etc....

  • Windows server 2008 upgrade hangs at gathering files 0%

    Hii,
    While upgrading my Virtual Machine from Windows Server 2003 STD 32 Bit to Windows Server 2008 STD 32 Bit...it gets stuck at Gathering files 0%..
    I have tried my changing the ISO file and also copied the setup files to one of my local drive then to having the same issue...
    I have up graded almost 40 to 45 server but still didnt face such problem please suggest me any solution and i have also tried my googling the same but no luck...
    And for info its an VM server in ESXI 5.5

    Hi
    Might help:
    Open Windows Explorer on the system you are trying to upgrade AFTER a failed attempt
    There will be three new folders:
    $UPGRADE.~OS
    $WINDOWS.~BT
    $WINDOWS.~LS
    Go into the Security Properties and give "Everyone" Full Rights (on each folder)
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Microsoft Excel cannot access the file "-". There are several possible reasons. Windows Server 2008 R2 with Microsoft Office 2010

    I have a problem with starting the Excel Application under a particular user (service account).
    I try to schedule this C# script through an application X (not Windows Task Scheduler. And this
    application will always use a service account to run services on the server). If I run the C# script in
    command prompt under the same user, it runs. Under the application X, which uses the exact same
    user, to initiate the C# script, it fails to open the Excel application (not sufficient permission?).
    This script calls application.Workbooks.Open(<ExcelFileName>,0,false,Type.missing....). At this line
    of code, it gives the following error:
    Microsoft Excel cannot access the file "...". There are several possible reasons:
    -The file name or path does not exist.
    -The file is being used by another program.
    -The workbook you are trying to save has the same name as a currently open workbook.
    I tried all the methods that I found online as follow:
    Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop" (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop" (for 32 bit Windows).
    Changed the DCOM config for the Microsoft Excel application to include this user for Local/Remote Launch and Access.
    Enabled all macros in Excel application and set the Trust Center.
    Add the user to have full control on all folders that contain the Excel file.
    Under DCOM
    config, Microsoft Excel Application, if I modify the Identity tab to check on "This User" and enter the username/password to let Excel always run under that user. Then the application runs perfectly. However, other users can't run the excel application
    on their own with the following error: "Cannot use object linking and embedding". If I check "Use the launching user", then Excel can't be launched. No errors in the logs or events anywhere to check.
    Yet, still the same error. I think it's permission but I am not sure where and what to do for this to work.
    Now, normally, when I run this excel report, I can double-click on the file and it'd automatically run,
    save the new parameters into the current file and generate a new excel file (with date attached to the
    file name). That means there is a change (save) to the original file.
    Environment: Windows Server 2008 R2 and running Microsoft Excel 2010.
    I appreciate all your help!

    I am wondering if this has anything to do with having the user log into Excel.
    In point #5 above: Under DCOM config, Microsoft Excel Application, if I modify the Identity tab to check on "This User" and enter the username/password to let Excel always run under that user. Then the application runs perfectly. However, other
    users can't run the excel application on their own with the following error: "Cannot use object linking and embedding". If I check "Use the launching user", then Excel can't be launched. No errors in the logs or events anywhere to check.
    Because running with the launching user proposes an user to run the Excel application. However, I do not think there is any where that we can pass in the password for this user to Excel. However, this Excel has all the permissions to Excel application as
    well as the folders that have the Excel files.
    Please help!
    Thank you!

  • File and printer sharing for Microsoft Networks on Windows server 2008

    Hi Expert,
    I found that the properties of File and printer sharing for Microsoft Networks service disabled after I install the windows server 2008 64bits. I tried to install that service via adding the file and printer sharing services in the properties of local area connection, but it doesn't contain any service in the popup box.  Also, no such service file available in the disk when I tried to install the service from installation disk of windows server 2008 64bits. Is the file "sacsrv.dll" corresponding to the service name of file and printer sharing? I found it is in the directory of "Windows\system32".  I have no idea about where is the problem? Do I miss some components? Please tell me what can I do for it? Thanks!
    Best Wishes,

    Do any experts know the reason of this problem?  Thanks!

  • Laggy file operations windows 7 clients with windows server 2008 R2

    Hope this is posted in the right place..
    Ok so this is driving me insane...
    I have a DNS/file server running Windows Server 2008 R2, and 5 client pc's running windows 7 x64 and x86.
    All the client PC's have extremely laggy file operations when for example right clicking to create a new folder or opening certain files (AutoCAD). Talking about 3-10 second lag for a response.
    However if I do a straight file transfer to test the transfer speed its all normal. Everything is connected @ gigabit network speeds.
    This just seemed to happen one day a few months ago, and has remained ever since. Before that (couple years) it was not doing this...
    Anyone have any ideas, I'm at a loss... I've checked the performance monitor on the server nothing seems abnormal when this happens.
    Thank you,

    Hi, 
    Please test to disable all third party applications on file server to see if that is the cause. Sometimes such kind of issues are caused by antivirus program, firewall etc.
    A quick step is to boot into Clean Boot mode as provided in following article:
    http://support.microsoft.com/kb/929135
    If you have any feedback on our support, please send to [email protected]

  • File search on Server 2008 using Windows 7 workstation

    Trying to get Windows 7 clients to search a network file share using the search index on the file server, but doesnt seem to be working.
    My setup is: Windows Storage Server Standard 2008 (not R2), Windows 7 Standard workstation with mapped network drive pointing to file share on Storage Server. File Server role is installed on server as well as Windows Search Service, but when I run a test
    search on the server, I get entirely different results from running a test search on the Windows 7 client.
    I've heard of setting the file share to enable "Offline Mode" on the client workstation to allow the workstation to index the share, but I cant have every workstation downloading and indexing a copy of our file share (hundreds of gigabytes). I
    tried adding the mapped network drive to the Windows 7 Document Library, but I get the error message saying that the location cant be added because it's not indexed. Suggestions?
    Shaun

    Hi Shaun,
    First please check if Windows Search 4.0 could be installed on your server - it is for Windows Server 2008 so it may not able to be installed on a Windows Storage Server 2008.
    http://support.microsoft.com/kb/940157/en-us
    For remote indexing please see the Remote Query part of the following article:
    http://technet.microsoft.com/en-us/library/cc772446(v=ws.10).aspx
    Remote Query
    Windows Search 4.0 extends the ability to search across remote desktops. Previously, only Windows Vista users could query recognizable indexes on remote Vista computers; now, WS4 enables users to query remote computers running any supported operating system.
    Remote querying includes the following features:
    Queries work across all supported OSes (Windows XP, Server 2003, Home Server, and Vista). 
    All shared NTFS folders are automatically indexed (excludes all FAT file systems).
    All shared, and therefore indexed, locations can be remotely queried.
    The location on the remote computer must be shared and it must be indexed. With Group Policy, administrators can control whether shared locations are automatically indexed.
    If you have any feedback on our support, please send to [email protected]

  • Indexing .cfm files using Indexing Service on windows server 2008 and IIS 7.0

    Hi All,
    Anyone knows why .cfm files would not get indexed by Indexing Service on windows server 2008 and IIS 7.0.  This is a coldfusion website using Indexing Service for site search.  There are a lot of cfm pages indexed as unknown files.   Any clues on how this can be fixed?
    Thanks!

    You might try editing your registry so that *.cfm, *.cfc, and other ColdFusion related files are treated as text files by the Windows search feature.  See link below.
    http://www.dougknox.com/xp/tips/xp_bad_search.htm
    Disclaimer: I am not a Windows system admin.  You might try posting this question to a Windows specific forum.

Maybe you are looking for