Retrieve the class path!! need help

Hi all
I tried to retrieve the class path using the below method:
URL srcUrl = ClassLoader.getSystemResource(fileName)
Since the class path has some space in it, this srcUrl seems to be wrong
the returned value would look like this, "%20" represnts the spaces in the path. So is there a way to avoid this, and to return the path correctly?
D:\PROJECT\ReportDesigner\Run%20report%20designer%20from%20a%20share\
thanks in advance
madumm

File srcDir = new File(srcUrl.getFile());Well you just can't do that, can you? URL.getFile() returns the filename part of the URL, but it's still URL-encoded. You have to convert each %20 to a space, and do a few other possible transformations as well. See java.net.URLDecoder.

Similar Messages

  • Simple question about environment variables and setting the class path???

    ok I have been trying for a few months now ontrying to set the class path..
    I work with windows vista..
    on the environment variables user variables,
    I have the name of the variable as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    where javac is...
    on the system variables I have
    its name as class
    and the value as C:\Program Files\Java\jdk1.6.0_04\bin;.
    why is this not reading javac

    The PATH environment variable should have as an entry the directory containing your javac executable. The CLASSPATH should have have entries which define your library directories and entries which are your jar file libraries. In the early days, probably the only CLATHPATH entry you will need will be a '.' to indicate the current directory.
    The Java tutorial covers ALL of this.

  • HT4759 I've lost my iPhone & recently too, my laptop which I saved all my iCloud data has been reformatted. So now I hv problem to trace all the notes that I kept. I only managed to get my contacts and calendar,unfortunately not the NOTES. Need help..TQ

    I've lost my iPhone & recently too, my laptop which I saved all my iCloud data has been reformatted. So now I have problem to trace all the notes that I kept. I only managed to get my contacts and calendar,unfortunately not the NOTES. Need help how to retrieve my notes from the iCloud..TQ

    Lord K.  Thank you. Yes I am within the 90 time period, however I travel Intertionally and I can not receive not make a call to Apple. I was just at the Genius Bar in Chicago and they said, don't worry about it.  It just floats out there, however, I can not recover my messages on a flash drive. I need to go back to my old computer which I don't have with me.  My messages were in folders for a lawsuit.  It is going to take an incredible amount of work for me to, you have no Idea.  We are talking thousands of pages!  I the defendent will have them during discovery so I am not so worried.  However, I can not bring them to him on a Flashdrive when I meet with him without an extraordinary amount of presssure on my part.  THis is not just some little email issue. This is suing EXPEDIA and Tripadviosr.com

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • I teach Continuing education classes to Real Estate agents and I need to issue them certificates at the class, whihc need to be signed by me and it needs to contain their info on the certificate. The certificate is currently saved in a word format.What i'

    I teach Continuing education classes to Real Estate agents and I need to issue them certificates at the class, whihc need to be signed by me and it needs to contain their info on the certificate. The certificate is currently saved in a word format.What i'm trying to accomplish is to do a "mail merge " ( as some classes i have as many as 150 attendees) for the document, digitally sign each one with my signature on the certificate and then e-mail it out to the respective attendees. can this be done? if so How?

    This is the step that I took after inputting my signature.
    On the right, after saving my document, I click "Get Others to Sign."  I was confused because it says that it's powered by EchoSign.  Like I stated before, my clients are able to sign this document when I send it to them, but it is returned to me with their signature (not in the signature field, but at the end of the document), and my signature is missing.  I tested this on myself - my signature is missing when they receive it. 

  • My screen is completely white, i've tried holding lock and home buttons as seen on you tube something called 'white screen of death' its goes black (think it switches off) then back to the white screen need help fast please!

    my screen is completely white, i've tried holding lock and home buttons as seen on you tube something called 'white screen of death' its goes black (think it switches off) then back to the white screen need help fast please!

    If you have not done a factory reset on the device, I recommend doing a complete  factory reset.  
    Factory Reset  - Warning this will reset device back to original factory settings.
    This method will not erase any MDN/MIN information
    Turn off the phone 
    Press Power + Volume Up/Down at the same time and hold until display will show a triage android screen 
    Display will show: 
    Reboot system Now 
    Apply sdcard:update.zip 
    Wipe Data/Factory Reset 
    Wipe Cache Partition
    Use VOL Down key to scroll down to "Wipe Data/Factory Reset", press home icon to select option and wipe device. 
    Display shows "All user data will be wiped out", press VOLUME Up to continue or VOLUME Down to exit. 
    Press Volume Up 
    Press Home to select "Reset System Now" - device will reboot
    If the problem persist I recommend having a store technician take a look at the device.
    Copy and paste the link below into your browser's address bar for the store locator.  
    http://www.verizonwireless.com/b2c/storelocator/index.jsp

  • Class xyz is not in the class path

    When I used:
    <jsp:useBean id="blast" scope="session"class="hr.pbf.pnf.castorblast2.BlastOutput"/>
    (or other class) , I get an warning: "The class hr.pbf.pnf.castorblast2.BlastOutput" is not in the class path ???

    Hi,
    The possible reason could be that class is not present in project class path.
    Check the following location to make sure the project is configured with source and required libraries
    - Project > Properties > Java Build Path > Source Tab / Libraries Tab
    M7 Support

  • I have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest from itouch to laptop please??

    i have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest of the songs (from my cd's) from itouch to laptop please??

    See this previous discussion:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    The Mac OS X and iOS versions are separate products

  • How do I retrieve the .exe path?

    How do I retrieve the .exe path?  In Window_Loaded I have:
                System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
    but Visual Studio does not like "Assembly" ... does not exist in the current context.
    bhs67

    System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
    Or import System.Reflection at the top:
    using System.Reflection;
    Armin

  • Lost on the Class Path

    I'm having some serious trouble with class package path issues ... ugh!
    I've downloaded a fairly complex and well programmed FLA file and other source files in AS 3.0, and just started to adapt it for a custom application.  When I published the FLA and packages in FLash CS3, everything worked perfectly.  Then I just got Flash CS4 a few days ago, and so opened the same application in CS4, and also published it fine.  Yet, once I started to make some very simple customizations, such as create a new MovieClip, and then added "linkage" to the MovieClip in the library, the trouble started. Getting the new external class to associate to the new MovieClip was not working (although it was in the same location as the other package file, with the same class package designation), so of course I went to take a look at the preferences and set the general class path.  Interestingly, the class path was completely blank (I just installed CS4 that day).  Yet then, why was the application still working initially with no class path set?  All of your original classes were loading fine, and the application was working.  So, then when I went into actually set a class path (my new class is in the same folder: .../com/parkerandkent/components/classic/photogallery ), I start getting all kinds of errors ... and now, even if I revert back to having no class path at all, the application does not work at all (when it originally did with no class path at all).  Strange!  I am very confused about what is going on.
    There are 5 primary .as package files, all of which are linked to MovieClips in the Library:
    ClassicPhotoGallery.as
    Photo.as
    Thumb.as
    Thumbs.as
    CallTag.as (the new class)
    I've checked the properties linkage for each of these, and they all appear correct also.
    Currently, I have all of these class paths set:
       - "/Users/mac/_EXTRA/ArtMuse/GALLERY"
       - " "/Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery"
    Currently, I get these these error messages, which are referring to only 3 of 5 total .as files (which are all in the same location, and all have the same class path designation - and none of these files is the new class I made, which now appears to be referenced okay).
    Photo.as Line 1:
    5001: The name of package 'com.parkerandkent.components.classic.photogallery' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. /Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery/Photo .as
    Thumb.as Line 1:
    5001: The name of package 'com.parkerandkent.components.classic.photogallery' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. /Users/mac/_EXTRA/ArtMuse/GALLERY/com/parkerandkent/components/classic/photogallery/Thumb .as

    Again, the class path package designation is the same for all 5 .as files:
    package com.parkerandkent.components.classic.photogallery {
    yet the application is not working, and I get only those errors posted above.
    If I remove all source path designations, then I get NO error messages, and yet the application does not work (although, I swear it was working this way originally).

  • How to run a jar file which needs another jar to be in the class path

    Hi,
    I need to execute a jar, which needs another jar to be in the classpath.
    If I run like
    java -classpath <jar1 name> -jar <main jar>
    It is giving classnotfoundexception, where as the class is available in the <jar1 name>.
    so, currently I am doing like this
    In the manifest file i have given like
    Main-Class: <class name>
    Class-Path: <jar name> <jar name2>
    then it is running fine. But, if I want to change the jar location again I need to changed the manifest file.
    Is there any way to do this? Pls help me.

    How about
    java -cp jar1.jar;jar2.jar com.acme.MainClass
    You won't need to worry about the manifest file after that and you can make a bat files (or .sh file in *nix) for it.                                                                                                                                                                                                                                                                                                                                                                       

  • I need to get photos off a water damaged iPhone 3GS. Can I take out the component that has the photos (is this the main board?) and put it into another of the same phone to retrieve the photos? Please help

    I need to get photos off a water damaged iPhone 3GS. It spent time underwater, saltwater. I let it dry for a week, turned it on, the apple symbol came on, then it died. I need to retrieve my photos off it. Can I take out the component that has the photos (is this the main board?) and put it into another of the same phone to retrieve the photos? Please help

    You're talking about the logic board. The two most likely things to get toasted, with water damage, are the battery(it shorts out), & the logic board. The worst water damage would be salt water. I'm afraid your logic board is toast.

  • Retrieving the Full Path of the Document / Folder in Search results

    Hello,
    We have a custom portlet to perform search in knowledge directory. We are able to retrieve the results from knowledge directory and would like to know on one enhancement feature.
    Would like to know if it is possible to retrieve the directory structure / path of the document / folder. Something like "\Knowledge Directory\Customer Service\...." I have seen this path come up in search results when using Portal Admin. Not sure if it is available when using the idk.dll
    Below is a sample code in C#. Would you know if there is a way I can retrieve the directory strcuture. If so, what method would give me that value? I tried GetURL, but that gives me the URL of the document http://portal/.....as compared to the path.
    ===== 
    using Plumtree.Remote.Portlet; 
    using Plumtree.Remote.PRC; 
    using Plumtree.Remote.PRC.Search;
    //Establishing Session with Portal
    IRemoteSession session = RemoteSessionFactory.GetExplicitLoginContext(new Uri(portletPortalAPIPref), username, password);
    ISearchFactory searchFactory = session.GetSearchFactory();
    searchRequest = searchFactory.CreatePortalSearchRequest();
    searchRequest.SetQuery(txtSearchText.Text);
                //Setting up the Search Parameters – Objects to Search, Order By, Number of Results
      ObjectClass[] objectTypes = { ObjectClass.Document, ObjectClass.DocumentFolder };
      searchRequest.SetObjectTypesToSearch(objectTypes);
       searchRequest.SetResultsOrderBy(PlumtreeField.NAME);
       searchRequest.SetOrderAscending(true);
      searchRequest.SetResultsCount(0, RecordCount);
    //Executing the Search
    searchResponse = searchRequest.Execute();
    resultSet = searchResponse.GetResultSet();
      //iterate through the results
    IEnumerator resultsfolder = resultSet.GetResults();
    while (resultsfolder.MoveNext())
                        IPortalSearchResult result = (IPortalSearchResult)resultsfolder.Current;
    Convert.ToString(result.GetRank() + 1);
    result.GetIconURL().ToString();
    result.GetURL().ToString();
    result.GetName().ToString();
    result.GetExcerpt().ToString();
    result.GetLastModified().ToString();
    result.GetClassID().ToString();
    result.GetObjectID().ToString();

    Have you tried getting the extended data and the Parent Folder ID. (Plumtree.Remote.PRC.IExtendedData)
    Using an additional object search to get the Path for the Parent Folder ID.
    Here is a snippet that may help
    Plumtree.Remote.PRC.IObjectManager objectManager = session.GetObjectManager(Plumtree.Remote.PRC.ObjectClass.<your class to return>);
    Plumtree.Remote.PRC.IObjectQueryRow qResults = objectManager.QuerySingleObject(<id of object to return>);
    if (qResults != null)
        Plumtree.Remote.PRC.IExtendedData ied = qResults.GetExtendedData();
        if (ied != null)
           sResult =  ied.GetStringValue(<property you want to return>);

  • Stand alone class and the class path

    Hi,
    I have a simple Java project in Eclipse environment. The project has it's class path,
    that contains a jar file that I need to use.
    The project runs perfect in the Eclipse.
    Now, I need to take the main class out of my project, to function alone in another environment.
    My problem is that out of the environment, I don't know how the class should know that classpath.
    I moved that jar to the same folder that the class located in, but I don't know how to tell it that the jar is there.
    My goal is to run my standalone class from another java class.
    I'm afraid that examples in command environment wouldn't help me.
    Thanks a lot for any help !

    moshi wrote:
    I have a simple Java project in Eclipse environment. The project has it's class path,
    that contains a jar file that I need to use.Ok, so you have a class that you have written that depends on an external library. Fair enough.
    The project runs perfect in the Eclipse.
    Now, I need to take the main class out of my project, to function alone in another environment.Maybe (just maybe!) defining what exactly that "other environment" is could help us help you.
    My problem is that out of the environment, I don't know how the class should know that classpath.Well, obviously that depends on what that other environment is.
    You must have some way to influence that other environments classpath, or you couldn't even get it to call/use your class.
    I moved that jar to the same folder that the class located in, but I don't know how to tell it that the jar is there.Now you're just guessing.
    My goal is to run my standalone class from another java class. That's simple enough, you probably do it all the time.
    I'm afraid that examples in command environment wouldn't help me.And why exactly is that?
    Do you realize that you tell us far too little about your problem for us to be able to actually help you?

Maybe you are looking for

  • Dell Inspiron 11 3000 series

    I have an acer aspire one that has been trucking along for nearly 6 years now with almost continuous use (about a year of non-use time in there, but that's it). I use it primarily for taking notes in class and such, but it also sees a lot of programm

  • Sync With Apple Mail

    Hi All I have just bought an iPhone and I am really confused about the Mail side of things and was hoping someone could put me straight. I use Apple's mail client into POP3 accounts and .Mac mail. Before I had the iPhone I had my POP3 email set in in

  • Bex reporting filters using wildcards in 2004s, BI 7.0

    Hi ALL, We have reporting requirements to filter records on text. For eg: In our Infoprovider we have a char field with text value 1. "ABC EFG HIJ" 2. "EFG STV ABC" 3. "MNO QRS UVW" In our reports i need to show only those records with does not conta

  • How do I get a client to sign his signature on my Mac?

    I was given a touch screen PC laptop for work. It is used for generating contracts and at the end of the contract I have the client sign his or her name. Since it is a PC and crashes 90% of the time or gives me an error message I have decided to try

  • Error: "Enumerated value expected" when exporting an artboard to TIFF

    Hi I´m trying to export a simple artboard using TIFF as extension. So here´s a simple code: var doc = app.activeDocument op = new ExportOptionsTIFF op.antiAliasing = true  op.imageColorSpace = ImageColorSpace.CMYK op.embedICCProfile = true        op.