Accessing a file not in the same directory
I would like to get the first line of a txt file and perform certain analysis on it, I can do this when the file is located in the same directory but i'm experiencing problems when it comes to trying to get a file outside of my current folder .
What do I need to do when I recieve the string from the user containing the directory and name of the file (e.g. C:\Test\file.txt).
Any help would be appreciated
refer following code.
String path = "C:\\Test\\file.txt";
BufferedReader reader = new BufferedReader(new FileReader(new File(path)));
System.out.println(reader.readLine());
Similar Messages
-
For example, she often works away and we both obviously would like access to the photo library while she is away.
Upon her return I would then need to sync the library with any new photos either of us has taken. We also both have iPhones with separate apple id's so would need to sync both to a single library if possible?There is not yet a reliable way to keep an Photo library on a network volume, that you can access remotely and share between multiple users. The syncing over the network will corrupt the libraries, and merging two iPhoto libraries requires third party tools, like iPhoto Library Manager.
With Aperture instead of iPhoto you could merge libraries, but still not have the library on a server for remote access.
It would be easier, if both of you kept your own copies of the iPhoto library on your macs and used the shared photo streams to add any new photos taken by each other. -
Playing files not in the music directory with mpd
Can mpd play files that are not in it's music directory?
if so How?um - i think that defeats the point of the daemon? i think it assumes you have all your music in one place - which i guess most people do - playing one song at random is not really it's game as far as i know
-
In effect, I want to have my providers router working upstairs and the aiport express downstairs connected via wi fi. The airport would have a different network name, then allowing me to connect the children to the access point. This would allow me to turn their network off at times of day etc.
any ideas ?I want to have my providers router working upstairs and the aiport express downstairs connected via wi fi
Sorry, but the AirPort Express....or any other Apple router......cannot do this.
In order to do what you want, you will need to establish an Ethernet connection from one of the LAN <-> ports on your "main" router to the WAN "O" port on the AirPort Express.
Configure the AirPort Express to "create a wireless network" using a wireless network name, and password that you select. As far as controlling connections, you can use the settings in Timed Access to establish rules about when the kids and cannot connect. -
Jar file is not working after deleting all packages from the same directory
hello
i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
Please tell me what may be the reason???
thanks in advancedhello
i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
Please tell me what may be the reason???
thanks in advanced -
How to Save XML file in the same directory as the swf file automatically?
Hi all,
I'm really new here with flash and actionscript 3, so i might not make any sense, probably. Any input is greatly appreciated.
So here's my problem, i'm trying to make a Top Score history for a flash game, which i load from an XML file. The problem comes to when i want to update the XML file. how do i do that automatically without prompting the user (ofcourse). I want it to be saved automatically to the same directory as the flash file.
here's my code right now, but it prompts the user where it wants to be saved, which i don't want to happen:
var xml:XML = <XML>
<topScoreList>
</topScoreList>
</XML>;
for(var i:Number=0; i<10; i++)
var Record:XML = <Record>
<score></score>
<playerName></playerName>
</Record>;
Record.score.appendChild(topScores[i].toString()); //topScores[] -> class variable containing scores
Record.playerName.appendChild(topNames[i].toString()); //topNames[] -> class variable containing names
xml.topScoreList.appendChild(Record);
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(xml);
var fr:FileReference = new FileReference();
fr.save(ba, "topScoreList.xml");yeah that makes sense, actually - after reading a dozen more forums. It's really weird tho that flash doesn't have a Buffer writer, unlike other programming frameworks.
But yeah, thanks. i'll start reading on flash.net.SharedObject, correct ? Thanks.
Anyways, if anyone out there has a different input, will be greatly appreciated!! -
I miss not having the same fonts as cs3 ie Bradshaw Handwriting, Lucinda and Papyrus. How can I access these on cs5? I have not found the fonts for this program to my liking.
I can't find any reference to a handwriting font named Bradshaw anywhere. Are you sure you have the name right? ITC Bradley Hand Regular, along with Papyrus and the Lucida (no "n") family are all included with recent versions of Windows, though, and should be in your font list in CS5 if you are, in fact, running Windows.
Is this the same machine that has CS3 installed? Did you remove CS3? Do the fonts show up in any other programs? Indesign can see fonts that are installed in the system fonts, the Common Files > Adobe > Fonts folder, and the private fonts folder for InDesign in the application folder. If the fonts show in CS3, but not elsewhere, they are probably in the CS3 InDesign Fonts folder. -
The executible I build with the application builder does not function the same as my VI file.
I am using a USB 6008 device with the newest DAQmx drivers and Labview
8.2 to make analog voltage readings. Within my main VI I first
create a data folder in the same location as the VI using a property
node and then use case statements to call two sub VIs that create a
data file within the data folder and then collects data. When I use the
application builder to create an executible the resulting file does not
operate the same as the origional VI. The program appears to be
reacting to button presses on the GUI, but there is no indication that
the data folder is being created or that any measurements are buing
made. Are there any known issues that may account for this
anomily?
-Mike
Message Edited by TMBurleson on 10-16-2006 03:09 PMAre you using the VI Path property, using a reference to the current VI?
I could be wrong, but if you're attempting to use a path relative to the current VI, I think that does indeed change in a built application. If your VI used to be C:\somewhere\foo.VI, then after building its path would actually be C:\somewhere\foo.EXE\foo.vi . Thus, if foo.VI used to try to make a folder like C:\somewhere\datafolder, the built application would be trying to make C:\somewhere\foo.EXE\datafolder , which wouldn't work.
This is sort of a shot in the dark, but does this sound like it might be the case?
EDIT: Dennis beat me to it.Message Edited by kehander on 10-16-2006 03:26 PM -
Hello,
Is it possible to have the file projectname_edge.js in a subfolder? Not in the same folder with projectname.html.
It seems that edge.5.0.1.min.js looks for dependencies only in the same place as the main file of the project. Moving projectname_edge.js to other folder (js, script, etc) causes the animation not to run. Can I store it in different folder? I would like to put it into "Content" or "Scripts" folder on the server.
I am trying to integrate edge animation into ASP.NET MVC application, and I do not have any index.html file. I am inserting the <!--Adobe Edge Runtime--> section into the view (the .cshtml file stored in subfolder). Having the projectname_edge.js in the main server path require to deal with security settings, so I would like to put it in 'Scripts'.
I found the video showing the solution for the older API: http://www.edgedocks.com/content/edge-animate-publish-files-and-js-folder but it is no longer valid with Edge 5.0 API
Any ideas how to achieve this?
Thank you in advance!
EricThank You! This is exactly what I looked for!
Additionaly having runtime projectname_edge.js in htmlroot in ASP.NET MVC website, is slowing down the animation show up. Now (with subfolder) it working fast and fluid
Many, many thanks! -
Team,
I am trying to Install Exchange on my Lab, getting below error
message.
The Schema Role is installed on Root Domain and trying to install
exchange on Child domain.
1 Root Domain - 1 Child domain. both are located on single site.
“Setup encountered a problem while validating
the state of Active Directory: Exchange organization-level objects have not been created, and setup cannot create them because the local computer is not in the same domain and site as the schema master. Run setup with the /prepareAD parameter and wait for
replication to complete.”
Followed below articles:
http://support.risualblogs.com/blog/2012/02/21/exchange-2010-sp2-upgrade-issue-exchange-organization-level-objects-have-not-been-created-and-setup-cannot-create-them-because-the-local-computer-is-not-in-the-same-domain-and-site-as-the-sche/
http://www.petenetlive.com/KB/Article/0000793.htm
transferred the schema roles to different server on root domain, still no luck.
can someone please help me.
regards
Srinivasa k
Srinivasa KHi Srinivasa,
I guess, you didn't completed the initial setup schemaprep and adprep before starting the installation. You can do it as follows:
1. Open command Prompt as administrator and browse to the root of installation cd and run Setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms
After finishing this,
2. Setup.exe /PrepareAD /OrganizationName:"<organization name>" /IAcceptExchangeServerLicenseTerms
3. To prepare all domains within the forest run Setup.exe /PrepareAllDomains /IAcceptExchangeServerLicenseTerms. If you want to prepare a specific domain run Setup.exe /PrepareDomain:<FQDN of the domain you want to prepare> /IAcceptExchangeServerLicenseTerms
4. Once you complete all of the 3 steps, install the pre-requisities for Exchange 2013
5. Finally, run the setup program
Hope this will help you
Regards from Visit ExchangeOnline |
Visit WindowsAdmin -
HI
i restored a sharepoint web 80 application in our test domain
and after when i browse the new web application
it says
Cannot make a cache safe URL for "1025/styles/Themable/corev4.css", file not found. Please verify that the file exists under the layouts directory.
adilHi adil,
According to your description, my understanding is that you encountered the error “Cannot make a cache safe URL for "1025/styles/Themable/corev4.css", file not found. Please verify that the file
exists under the layouts directory.” .
The issue happens in
We have customized master page
In the master page, we use path the script/style file like this: <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/coe/mainCOE.css%>"
runat="server"/>
While using the dynamic path in a multiple languages enabled site, language Id(1033 etc) will be added to the path automatically. That cause the file to be not found.
To solve the issue, please download the Arabic language pack http://www.microsoft.com/en-us/download/details.aspx?id=3411 ,
install it on your SharePoint and refresh your browser.
Reference:
http://sharepoint-community.net/profiles/blogs/cannot-make-a-cache-safe-url-for-1036-sytles-themable-corev4-css
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Acrobat Pro "save as" function in the file menu does not show the current directory of the file
I have installed CC but Acrobat Pro gives me headaches.
The "save as" function in the file menu does not show the current directory of the file but something I have worked on in the past.
It forces me to navigates through my hard disk for this very straightforward thing in normal conditions. I precise: Acrobat is the only software reacting like that.
I use Windows7 professional 64bits.I use what seems to be the latest version available on the Cloud:
To illustrate my point, I open a directory with explorer and double-click on the only PDF in there:
So here it is, open:
When I do a "Save as", it takes me to a totally different place on the disk!
Very annoying...
Thanks for your time!
JJ -
can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks
See http://kb.mozillazine.org/Links_to_local_pages_do_not_work
-
In Keynote09, if i set custom presenter display settings (large presenter notes), and i save the file, will i see my notes in the same way on another computer?
Are the presenter display setting saved in the file?
Thanks for your help!it wont.
Presenter note display is set per machine.
Surprising nobody in this community knew this. -
Does a wrapper html file need to be in the same directory? Need advice
I'm doing some RnD experiments for an upcoming project and I would like to use Edge.
What I'm trying to do is load 2 different compsites in a wrapper.html file that is level above the compsites. For instance my setup is
project/wrapper.html
project/product1/product1.html
project/product2/product2.html
In my wrapper file I have this, but this doesn't work
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Untitled</title>
<!--Adobe Edge Runtime-->
<script type="text/javascript" charset="utf-8" src="product1/product1_edgePreload.js"></script>
<style>
.edgeLoad-EDGE-68005601 { visibility:hidden; }
</style>
<!--Adobe Edge Runtime End-->
</head>
<body style="margin:0;padding:0;">
<div id="Stage" class="EDGE-68005601">
</div>
</body>
</html>
But when I move the wrapper.html file into the same directory as product1 and modify .js path and it loads fine? So my question is how do people normally load multiple compsites that resided in a different directory? What is the best method for accomplishing this? If anyone can point me in the right direction please. Thanks in advance.You will need to update the new loction for even the product1_edge.js file and the product1_edgeActions.js file in the product1_edgePreload.js file.
Open up the product1.edgePreload.js file.
Search for 'aloader'.
Under this there should be a ' load: "product1_edge.js" ' change it to ' load: "product1/product1_edge.js" '
and do the same for product1_edgeActions.js file too.
Bascially when you update the location of the edge preload file you will have to update the location of the animate assets like the edge file,edge actions,images etc.All these file locations work relative to the html file loading them.
Maybe you are looking for
-
Mac mini refuses to recognize existing TM backup set
I just got my mac mini fixed with a new logic board, and I have it connected to a 250GB external FW drive. Time machine was running on a partition on the external drive quite happily since I bought it in November, but since getting it back from the r
-
How do I make my Apple Airport Base Station wireless connection secure please?
-
[SOLVED] l2tp-ipsec-vpn-daemon from AUR fails to build
Please let me know if there are other details that require posting:- ==> Starting build()... /usr/bin/qmake -o qttmp-Release.mk -after "OBJECTS_DIR=build/Release" "DESTDIR=dist/Release" nbproject/qt-Release.pro mv -f qttmp-Release.mk nbproject/qt-Rel
-
Storer: Error in parsing:Could not process
ZENworks for Desktops 6.5 SP2 Netware 6.5 SP2 Sybase DB 8.0.2 (4339) ZENworks Agents (still) 4.01xxx ZENworks Inventory Service Console Massages: Starting the Upgrade service. The database has already been set to the Ready state. The Upgrade service
-
Turning Business Content on a Test/QAS Box
I have turned on Business Content on our BW DEV box for CRM. Can I turn on the same Business Content on our BW QAS box and remap? My issue is that the transports of the business content turned on for CRM in DEV Opportunities ODS, InfoCube, and Info