Programmatically add folder to classpath

How can I programmatically add a folder (either on the local filesystem or through a URL across a network) to the classpath? If I'm trying to load a file test.properties, and I do a ResourceBundle.getInstance("test"), I'd like the folder that I add to the classpath to be searched in the process of finding test.properties. (I'd therefore need to add test.properties's containing folder to the classpath.)
The reason I need to do this programmatically is because within this web application, we're unable to modify the packaged WAR file or make the resources available to other web contexts by placing it in the common library directory of the web server. And being a web application, of course setting the CLASSPATH environment variable or setting the cp command-line flag won't help.
Thanks.

Right, I do that too. We have a web application with a configuration file (and some other things like log files) that are external to the EAR file. So I hard-code the directory where those things belong somewhere in the application. No need for desperate measures like class loaders, and anyway even if you did that you would still need to hard-code the place where the class loader should look.

Similar Messages

  • How to add folder in picture library programmatically

     
    Hi All,
    I tried to add folder using below code but getting error of "Missing FileLeaf"
    try
                    if (properties.List.Title.ToString() == Utility.ListName.Events.ToString())
                        using (SPSite objSite = properties.Site)
                            using (SPWeb objWeb = properties.Web)
                                SPListItem lstEvent = properties.ListItem;
                                string folderName = Convert.ToString(lstEvent["Title"]) + "_" + DateTime.Now.ToShortDateString();
                                if (!string.IsNullOrEmpty(folderName))
                                    SPList lstEventPictures = objWeb.Lists.TryGetList(Utility.LibraryName.EventPictures.ToString());
                                    if (lstEventPictures != null)
                                        objWeb.AllowUnsafeUpdates = true;
                                        //SPListItemCollection folders = lstEventPictures.Folders;
                                        //folders.Add(lstEventPictures.RootFolder.ServerRelativeUrl 
    , SPFileSystemObjectType.Folder , folderName);
                                        ///* create a folder under the path specified
                                        SPListItem folderItem = lstEventPictures.Items.Add(lstEventPictures.RootFolder.ServerRelativeUrl,
    SPFileSystemObjectType.Folder , folderName);
                                        ///* set the folder name and update */
                                        //folderItem["Title"] = folderName;
                                        folderItem.Update();
                                        lstEventPictures.Update();
                                        objWeb.AllowUnsafeUpdates = false;
                catch (Exception ex)
                    Utility.SPTraceLogError(ex);
    Help me to resolve. Thanks in advance.

    Hi DK,
    You can use below mentioned code to add folder in any of your library. You need to changes little bit code as per your requirement.
    /// <summary>
    /// Provide utilities methods related to folder management
    /// </summary>
    public static class SPFolderUtilities
        /// <summary>
        /// Ensures the specified folder exists.
        /// </summary>
        /// <param name="list">The list where to create the folder.</param>
        /// <param name="subFolderPath">The sub folder path.</param>
        /// <returns>
        /// The existing <see cref="SPFolder"/> or a newly created if it did not exists.
        /// </returns>
        public static SPFolder EnsureFolder(SPList list, string subFolderPath)
            Contract.Requires<ArgumentNullException>(list != null);
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(subFolderPath));
            if (!IO.SPPathUtilities.IsFileOrFolderNameValid(subFolderPath, true))
                throw new ArgumentException("Invalid characters in the file or folder name", "subFolderPath");
            var folderPaths = subFolderPath.Split('/');
            var currentFolder = list.RootFolder;
            for (int i = 0; i < folderPaths.Length; i++)
                currentFolder = list.ParentWeb.GetFolder(currentFolder.Url); // hacky refresh
                var subFolder = currentFolder.SubFolders.Cast<SPFolder>().FirstOrDefault(f => string.Compare(f.Name, folderPaths[i], true) == 0);
                if (subFolder == null)
                    var newFolderItem = list.Items.Add(currentFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder, folderPaths[i]);
                    newFolderItem.SystemUpdate();
                    subFolder = newFolderItem.Folder;
                currentFolder = subFolder;
            return currentFolder;
    And here is the specifc code that you can use for Picture library only
    Question
    Vote as helpful
    0
    Vote
    yes the code sample provided by you is to create a image library and then to add a folder to it but i'm not sure with the string.empty being passed to list.items.add. i would still recommend to use the solution suggested by me. to check if library exists or
    not what you have to do is 
    SPSite _MySite = new SPSite("SERVERIP");  
                    using (SPWeb currentweb = _MySite.OpenWeb())
    SPList imageLib = currentweb.Lists["NewImages]
    if( imageLib == null)
    Guid listId = currentweb.Lists.Add("NewImages", "Picture Library", SPListTemplateType.PictureLibrary);
     imageLib t = currentweb.Lists[listId];    
    SPDocumentLibrary
     _MyDocLibrary =
    (SPDocumentLibrary)
    imageLib ;
                     SPFolderCollection _MyFolders = _MyWeb.Folders;
                    _MyFolders.Add("http://adfsaccount:2222/My%20Images/" + <<subfolderName>> + "/");
                    _MyDocLibrary.Update();
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Add Folder to Document Library

    I created a document library. I can add new document to the document library. But I want to add folder my sharepoint site. How can I do this? Is it possible?

    Hi,
    To Create folder inside the document library , Just click on Files Tab at document Library Ribbon.then It will prompt for folder name (enter folder name ) and click on Save.
    If you want to create folder through Programmatically, Pls check below link.
    http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/programmatically-creating-folder-in-sharepoint-document-library/
    If you think it is helpful,Vote As Helpful! And if you see a reply being an answer to the question of the thread, click Mark As Answer.
    Mahesh

  • HT201272 frustrated! I bought music off my iphone & now trying to get it on my computer.  I see it under purchased and the files are on my computer but when I go to add folder or file to library, it doesn't recognize it or add the songs to my librarby.  H

    I don't understand what I am doing wrong.  Bought music straight off my phone.  When I log on my computer, I see it under purchased items.  I downloaded them to my computer and see the files with all my other music.  However, when I go to file, add folder to library...it doesn't do anything and the songs won't add to m library.  ????

    Open itunes, connect iphone, click File>Devices>Transfer Purchases

  • I'm trying to copy music from my PC to itunes. I open itunes, go to 'file', go to 'add folder to library', select the folder and nothing happens. What am I doing wrong?

    I'm trying to copy music from my PC to itunes. I open itunes, go to 'file', go to 'add folder to library', select the folder and nothing happens. What am I doing wrong?

    Hello there, gleab.
    The following Knowledge Base article reviews the ways to import content into iTunes:
    Adding music and other content to iTunes
    http://support.apple.com/kb/ht1473
    Also keep in mind which formats can be added:
    You can add audio files that are in AAC, MP3, WAV, AIFF, Apple Lossless, or Audible.com (.aa) format. If you have unprotected WMA content, iTunes for Windows can convert these files to one of these formats.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • ITunes crashes when try to add songs to library both drag-drop and Add folder/file option

    I got the old iTunes updated, it crashed when open. Then I uninstall and download the newest iTunes. Restart my laptop.
    I even start iTunes in safe mode but it keep crashing.
    I try Add folder first, then Add file, then drag and drop. None of them work and I only have 700MB total of songs, no vids
    There were no pop up for error code or anything, iTune just crash when I try one of those add options.
    If anyone can help I would really appreciate

    after I got offline yesterday, I tried drag-drop again, it worked.

  • Add Folder - is there a limit to the number of files you can add in one go?

    I have a fairly large collection (60GB+) of 192kbps mp3 files which are stored under My Music in a folder structure of Artists / Album, e.g. "My Music \ ACDC \ Back in Black\ Hells Bells.mp3"
    I recently bought an ipod and having installed itunes I wanted to add all my music. I figured out that the way to do this is to go File / Add Folder and select the "My Music" folder.
    However, itunes starts adding the mp3s and stops at the Bruce Springsteen folder. At this point the itunes library can see all the "A" folders and the "Bs" up to and including Bruce Springsteen. If I try the process again nothing happens.
    However, if I then try to add a specific folder e.g. "My Music \ Charlatans" it works.
    This suggests to me that the Add Folder option has a limit to the number of files it can process.
    Any thoughts on this would be appreciated as I'm not looking forward to manually adding a hundred or so folders.
      Windows XP  

    Well the part about putting songs in the "iTUnes Music" folder I only brought up because it seemed you liked things very organized. You could use iTunes to so all the organizeing. Plus once you add something to the iTUnes library, if you change ANYTHING about it in windows explorer, like its name, change the name of the folder its in or move it to another folder, iTUnes "Looses Track" of it. Its not like other programs that "Watch" files and folders for changes outside its "iTUnes Music" folder
    But to have iTUnes auto search, you have to delete a hidden pref file. After doing this, when you open iTUnes again it will throw up a setup wizard, just like its the first time ever installing it. Its in this wizard where you get your ONLY chance to have iTUnes auto search and add files from the system. Just goto the link below and follow Scott P's steps
    http://discussions.apple.com/message.jspa?messageID=607357
    Also since your new to the ipod, you my want to check out the "iPod 101" section so you can learn the ropes of everything
    http://www.apple.com/support/ipod101/

  • My itunes on my macbook pro does not have a "add folder to library option". Is there something wrong with my mac ?, my itunes on my macbook pro does not have a "add folder to library option". Is there something wrong with my mac ?

    I purchased a Mac Book Pro and find the Itunes a bit strange as the "add folder to library" option under the menu is not available
    is my itunes corrupt or what can i do to transfer folders to my itunes?
    please help

    Ruggernaut wrote:
    I purchased a Mac Book Pro and find the Itunes a bit strange as the "add folder to library" option under the menu is not available
    is my itunes corrupt or what can i do to transfer folders to my itunes?
    iTunes for Mac has never had an "Add folder to library" option. This is only available on Windows version.
    Select Add to library, select the folder then click OK.
    Or drag the folder(s) to the iTunes library at top left of iTunes.

  • HT1473 Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option wha

    Help I just moved my music files to a external hard drive and am using the new crappy version ( i know my opinion) of itunes and cant add the files to my libray it gives me the add file to library option but not the add folder to library option what am i doing wrong?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

  • How to add folder to itunes

    How do you add a folder from your computer to your music library vs. a file.

    Hi Kbosborne89,
    Thanks for visiting Apple Support Communities.
    You should have an option for adding folders to iTunes, as well as individual files. See this article for more information:
    iTunes: About the Add to Library, Import, and Convert functions
    http://support.apple.com/kb/ht1347
    If you want to add files to your iTunes library, you can drag files from the Finder to the appropriate icon on the left side of the iTunes window, or choose File > Add to Library (on Windows, choose Add File to Library or Add Folder to Library) and then select the song file or folder you want to add.
    All the best,
    Jeremy

  • My computer has just prompted me to download the newest version of Itunes and now there doesn't seem to be any option to "add folder" to library, just "add file to library" so have to do one song at a time and is very time consuming!!  Help?!

    My computer has prompted me to install the newest version of Itunes and now there doesn't appear to be any option to "add folder to library", only "add file to library" so have to do each song individually and very time consuming....help!  Anyone know if I can get this feature back?  Thanks so much, Charlotte

    Use CTRL+B to put the top menu bar back on screen. Add File to Library and Add Folder to Library are both under File.

  • Itunes will not add folder to library - no error messages

    I have an archive of about 4 thousand albums and have decided to use Itunes to manage them. Windows Media Player is terrible for large archives - it's database is poorly designed. Anyway, when I tell Itunes to add a folder (containing 1000 artists each in its folder)to its library it stops at around seventy every time. Also within the 70 artists folders it ingested I have several albums that didn't ingest.
    what's going on?
    on a related subject, Itunes does not seem to be smart enough to know that it already has a song in its library that you are trying to ingest.
    thanks for any help!
    Patrick
      Windows XP Pro  

    iTUnes for windows has a limit, not sure exactly what number that limit is yet but if you goto file>add folder to library it only catches so many til it reaches a limit then it stops.
    Also iTUnes is designed to add whats called "Duplicates" because it takes for granted your the smarter one. If you had to songs that are somewhat the same, one is the original, one is a remix, the tags might not note this. You may have .... Britney SPears - hit me one more time then another one thats a remix BUT the tags say the same thing "Britney SPears - hit me one more time" So instead of stoping the second song from coming in, it lets it in so later you can edit the tags to denote its a remix.
    Now since you have such a large swath of music all in there own lil folders, Id think the easy thing to do is let iTUnes auto search your system and add them all. Theres no feature like this built into iTUnes UI but theres a feature like this when you delete a hidden pref file. When this file is deleted and you open itunes again, you get a set up wizard, it in this wizard you get the option to have iTUnes search the whole system for music and media files.
    Go here to B noirs post about deleting this pref file http://discussions.apple.com/thread.jspa?threadID=531850&tstart=0

  • Can a user with Contribute privileges invoke SPFolder.SubFolders.Add(folder) Sharepoint 2010 API in a Webservice?

    We have a Webservice deployed on a Sharepoint 2010 deployment with a method as follows:
    public static string ensureParentFolder(SPWeb parentSite, string destinationUrl)
    destinationUrl = parentSite.GetFile(destinationUrl).Url;
    int index = destinationUrl.LastIndexOf("/");
    string parentFolderUrl = string.Empty;
    if (index > -1)
    parentFolderUrl = destinationUrl.Substring(0, index);
    SPFolder parentFolder
    = parentSite.GetFolder(parentFolderUrl);
    if (!parentFolder.Exists)
    SPFolder currentFolder = parentSite.RootFolder;
    foreach (string folder in parentFolderUrl.Split('/'))
    try
    currentFolder = currentFolder.SubFolders.Add(folder);
    catch (Exception ex)
    FINEOSLogger.Medium(LoggerCategory.FINEOSToSharePointDMS, "User could not create SP folder so elevating permissions");
    SPSecurity.RunWithElevatedPrivileges(delegate()
    currentFolder = currentFolder.SubFolders.Add(folder);
    return parentFolderUrl;
    When invoked by a User with only Contribute rights the SubFolders.Add( ) call appears to fail and the
    SPSecurity.RunWithElevatedPrivileges
    code is invoked, which also fails.
    1. So the first question is should you be able to invoke SubFolders.Add() with only Contribute?  It works with Design privileges for the Customer.  You can add folders on the Sharepoint website as a Contribute user so why not on the API. 
    Customer raising this as a security concern.
    2. Also why would the
    SPSecurity.RunWithElevatedPrivileges
    part fail, is the syntax incorrect for Sharepoint 2010?  We migrated this code from Sharepoint 2007 project.
    The error I get when I try run the code as a Contribute user is
    com.fineos.ta.dms.external.DMSException: The exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".] was caused by the exception [A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".]., Ta Exception info,Exception Class=class com.fineos.ta.dms.external.DMSException,Root cause ID=10,Root cause host=IEL163,Localized message=A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18"
    at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:149)
    at com.fineos.frontoffice.documentmanager.DocumentManager.saveToThirdPartyDMS(DocumentManager.java:280)
    at com.fineos.frontoffice.documentmanager.fileupload.UploadDocumentWidget.save(UploadDocumentWidget.java:401)
    at org.apache.jsp.sharedpages.documentmanager.fileupload.uploaddocumentpage_jsp._jspService(uploaddocumentpage_jsp.java:77)
    Caused by: com.fineos.integration.dms.external.services.SharePointDmsException: A SharePoint error occured "An Error occured in SharePoint". For user "FINEOS\bryces" uploading the file "Ru Ext_1501.txt", with title "Ru Ext_1501.txt", to the SharePoint Library "FINEOSDocumentLibrary/2015/02/23/13/18".
    at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:139)
    at com.fineos.integration.dms.internal.thirdparty.GenericDMS.add(GenericDMS.java:132)
    ... 88 more
    Caused by: org.apache.axis2.AxisFault: Error_occured_sharepoint [Message Details = An Exception occurred in SharePoint; System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied.
    at Microsoft.SharePoint.Library.SPRequest.AddOrDeleteUrl(String bstrUrl, String bstrDirName, Boolean bAdd, UInt32 dwDeleteOp, Int32 iUserId, Guid& pgDeleteTransactionId)
    at Microsoft.SharePoint.SPFolderCollection.AddInternal(String strUrl, Int32 userId)
    at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.<>c__DisplayClass9.<ensureParentFolder>b__5()
    at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
    at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
    at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
    at FINEOSIntegration.FINEOSToSharePointDMS.SharePointDMSUtilities.ensureParentFolder(SPWeb parentSite, String destinationUrl)
    at FINEOSIntegration.FINEOSToSharePointDMS.FINEOSToSharePointDMS.uploadDocument(String UserName, String FolderPath, String Filename, Byte[] File, DocumentProperties DocumentProperties, Boolean NotifyFINEOS, Boolean NotifyFINEOSSpecified, Boolean OverwriteIfExists, Boolean OverwriteIfExistsSpecified, String& DMSDocType)]
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
    at com.fineos.frontoffice.thirdpartydms.operationtypes.ThirdPartyDmsServicesStub.uploadDocument(ThirdPartyDmsServicesStub.java:761)
    at com.fineos.integration.dms.external.services.GenericDMSClient.uploadDocument(GenericDMSClient.java:119)
    ... 89 more
    Note that the user SPWeb being passed into the method is from an impersonated user, don't know if that matters.
    So the webservice payload contains the id of the user who wants to do the Sharepoint work while the webservice is invoked by anonymous or some other service user.  We then impersonate the user specified in the webservice payload like follows and use
    that web SPWeb from then on in the webservice methods:
    userToImpersonate = currentWeb.AllUsers[user];
    site = new SPSite(fileUrl, userToImpersonate.UserToken);
    web = site.OpenWeb();
    Any help appreciated.
    Thanks,
    Ruairi.

    Ideally, a user with Contribute permissions should be able to add folders. Not sure what is the issue there. But I can see that SPSecurity.RunWithElevatedPrivileges is not written properly. You must create a new SPSite object inside the delegate
    because SPSite objects created outside do not have Full Control even when referenced inside the delegate. Use the using keyword to ensure that the object is disposed in the delegate. Example:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(web.Site.ID))
    // implementation details omitted
    });See this for more information about SPSecurity.RunWithElevatedPrivilegeshttps://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges%28v=office.12%29.aspx?f=255&MSPPError=-2147217396
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Need help in adding a folder library (on external hard drive) to ITunes.  Older versions had "add folder to library" option...

    I have an external hard drive that has a huge music library that I wish to make my Library in ITunes.  I have already set the location of the library to the hard drive folder (under Preferences/Advanced).  In the older versions of ITunes there was an "add folder to library" option.  After selecting that option, ITunes would then take a long time to analyze the songs in the new folder and I could then transfer songs to my IPad.  The new ITunes has an "Add File to Library".  I selected *.* to include all artists and songs in the library, but ITunes does not begin to analyze the songs and artists in the hard drive.
    How do you get Itunes to recognize the songs and artists in the new song directory?.  

    As long as you don't have an existing library that is synced with a device or holds oodles of carefully crafted playlists, ratings etc. then...
    Hold down shift as you start iTunes. You should get an option to choose or create a library. Click create, browse to root of the external drive and click save so that your library is say X:\iTunes where X: is the letter of your external drive. All new content downloaded to the library will stay on the external drive.
    See this user tip for a backup strategy.
    tt2

  • How to programmatically add rectangle to a pdf file ?

    How to programmatically add rectangle to a pdf file ?
    There is several page pdfs, non-vector, black and white.
    Users are color blind and have disabilities.
    To train them, one adds a rectangle at a certain lower-left point and width,height specified for a page.
    The idea is to give the script the page and coordinates and size of rectangle to be added programmatically. Green rectangles are acceptable as the cones are most sensitive there.
    Also, additional feature to add bookmarks on the left in the order these rectangle data is provided to the script.
    The script could be "hard-wired" by a list of the rectangle coodinates, and page number, pasted inside acrobat and run or entered into acrobat in some way.
    Your script would help many disabled people who are distributed through out the world.
    Feel free to contact me by email if you wish.
    Dying Vets

    P.S.
    This rectangle does not have to be a full annotation rectangle which needs user,date and a lot of info.
    Something minimal like this would suffice
    1 0 0 RG % red for stroke color
    200 300 50 75 re
    As you can see that the native unit of the pdf file is the "point" having 72 in an inch.
    The file dpi would be given. However, one could assume that pixel for the rectangle lower-left and width/height are given.
    From the pixels and dpi, the points could be calculated if desired.

Maybe you are looking for

  • Error in RFC Adapter PI 7.10 maximum size of requests for one LUW

    Hello all, I have a big issue on our Development - SAP PI 7.10 System. If I try to push a RFC from a Client System I get follow error messagei in the Runtime Workbench (RWB)  back: processing error to be caused by: com.sap.aii.adapter.rfc.core.server

  • Hard drive polling seemingly solved

    A while back I asked for advice about what might be causing intermittent HD access. For quite a while I have had one of my external drives make a sound roughly every 6 seconds as if a small bit of data were being written. Recently I did a backup to t

  • [SOLVED] Use ISO for kernel upgrade?

    Wondering if I can use the new ISO to upgrade my kernel, if so maybe a hint or two on how. See, it's the wifi thing. It's my only connection to the internet and my Atheros chipset wasn't supported by madwifi 4 weeks ago when I did my install (so I us

  • Parser Generator - bug in generating classes

    If there are two elements defined in a DTD that are only different in capitalisation of the first letter (e.g. Event and event) - then the Weblogic Parser Generator generates duplicate method names for getEvent and getEventAttributes and fails to bui

  • When I try to use my JBL speaker, it won't connect to Bluetooth at all with my iPad Air

    My iPad Air won't connect to Bluetooth so I can use my iPad Air and JBL speaker. I keeps saying it is searching for devices.....any idea what to do. I'm using wi-fi