Filename question

i am designing a Student class which implements the Student interface, the Student interface is:
* A simple interface to allow access to student
* properties from a class data file.
public interface Student {
//some methods
which i named Student.java
then i want to have a class like:
public class Student implements Student{
//some methods
and now the filename for this class must be Student.java. but there already exist a Student.java. any suggestion will be appreciated. thanks.

then i want to have a class like:
public class Student implements Student{
//some methods
and now the filename for this class must be
Student.java. but there already exist a Student.java.
any suggestion will be appreciated. thanks.My suggestion would be to stop wanting to have that class. Call it something else.

Similar Messages

  • URLConnection to filename question

    Not sure if this is the right forum for this but I hope so.
    I have a program which I created that takes a http address and then downloads the file from that address.
    The program looks at the entered URL and downloads its content into a temp file with an arbitrarily name.
    Then, a JFileChooser opens, which is supposed to, by default, suggest the name of the file which was just downloaded.
    This works in MOST situations, but my problem is that if I have a url which redirects, for example, if i pasted the link to a download on a site like for example filehippo.com was what i tested with....
    I gave it the URL: http://www.filehippo.com/download/file/4aac52cca0ce60fd95312eebf41deffc096823c22c2cbf043f4b6dfd323a4b3a/ which is just a trial version of "CC cleaner" or something, but instead of suggesting the name as like install cccleaner.exe or whatever it is supposed to be it is suggesting the name "null" because there is no filename included in that url.
    My question is how can i get the filename which a URLConnection is pointing to / redirecting to 100% so that this will always be correct?
    Thanks
    Robert
    Edited by: rnoack on Jan 27, 2009 11:32 PM

    Check this out
    try {
                // TODO code application logic here
                URL u=new URL("http://www.filehippo.com/download/file/4aac52cca0ce60fd95312eebf41deffc096823c22c2cbf043f4b6dfd323a4b3a/");
                HttpURLConnection con=(HttpURLConnection) u.openConnection();
                con.setDoOutput(true);
                con.setDoInput(true);
                OutputStream out = con.getOutputStream();
                InputStream in = con.getInputStream();
                if(con.getFollowRedirects())
                    System.out.println(con.getURL());
            } catch (UnknownHostException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    Output: http://fs7.filehippo.com/9006/ac2f91079423421eb40b9a8ca428da4d/ccsetup216.exe

  • Library filename question

    library filenames:
    I imported a large folder of photos to the library that had the proper filenames from the camera.  When they appeared in the library, every photo has the same filename:  DSCN0023.  Additionally, all of the other photos in all of the other albums in the library show that same name.  What gives?

    What happens when you right-click an image and select <Show in Explorer / Finder>.
    Does it take you to the correct image, i.e. is the correct image highlighted?
    And what is the filename of the image that is displayed in Explorer / Finder ? Does it show the proper (correct) filename?
    BTW: Are you on a Mac or Windows?

  • FileReference#download() and filename question

    On the server side I set a HTTP header as
    Content-Disposition: attachment; filename=myfilename.txt
    Is it possible to get this information in Flex client? The FileReference#download() function gives a possibility for a name to set on the file browser, but I can't figure out how to get it from the server. By default, the function uses the remote URL.
    Any ideas?
    Thanks.

    Lawcats please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install the Adobe Creative applications included with your membership.

  • PSCC - Filename question

    Hi Guys,
    Using Photoshop CC, does anyone know what the asterisk means inside the tab name? This is on the inside of the bracket, outside it would mean not saved. I'm using 16 bit files throughout and the ProPhoto RGB Workspace. Files are transferred in and out of Lightroom 5.2 as my front-end .
    e.g. Nikon D700-4162-ME.tif @ 21.9% (RGB/16*)
    Thanks,
    Lyndon

    That's an interesting question.  I've just learned something:
    http://www.earthboundlight.com/phototips/photoshop-pound-sign-asterik-title-bar.html

  • Adobe droplet question, involving Place command and filenames

    Suppose I have two files called, (a) "background.tif" and (b) "Image001.tif".
    Background.tif is a simple black layer, sized to 1500 x 1000 px.  Image001.tif may be cropped to any size.
    I want to do the following in a droplet:
        1. Place (File/Place) "Image001.tif" in "background.tif", knowing it'll be centered and resized as needed automatically.
        2. Save the new file for the web as "Image001.jpg",
        3. close both files without saving (I only need the resulting JPG).
    My goal - I have several hundred files that all need web-ready JPGs created with a standard size black background, so that they'll fit a web gallery that can only handle a fixed set of dimensions.
    Questions:
    1. Is this even possible via automation?
    2. If so, how do I ensure that the JPG that gets created has the same name as the source image file; i.e. "image001.jpg", and then "image002.jpg", etc.?
    3. is there a better way to create the end result, rather than using the place command; i.e. doing this with the original image file instead (thus solving the filenaming question)?
    Running PS CS6 on Win7/64.
    Many thanks!
    Jerry

    Hi csuebele,
    The only requirement is that the final result is 1500 x 1000 px.  The black is used to fill in the sides/tops as necessary.  Since this is to be automated, I need each new file to have a unique name of course (otherwise succeeding files will overwrite their predecessor).
    For example, say I have a file called image001.tif that is cropped to 2400w x 3000h px. I need this to fit a container that's 1500 x 1000 px, with black filling this out.
    Manually I would
    1. Open a black TIFF that's already 1500x1000.
    2. Place the 2400x3000 px image in the black tiff.
    3.  PS then resizes and centers the image to fit, while preserving the aspect ratio. 
    4. Thus the image is now sized to be 800w x 1000h px , with black filling the sides equally; i.e. 750 px of black on either side.
    5. I then save that "new" version of the black file for the web, and then close w/o saving.
    6. End result is a 1500x1000 file called image001.JPG.
    Please see attached for 2 examples:
    Example of a portrait image:
    Example of a landscape image:

  • Parse XML AppleScript

    I have found some tutorials online which have got me to the stage I am at with my applescript below, however I am now stuck.
    I would be grateful if anyone could help me.
    I have this XML in a document below.
    <?xml version="1.0" encoding="UTF-8"?>
    <Question Parameters>
    <Question>Which of these two colours do you like most?</Question>
    <Response1>Red</Response1>
    <Response2>Blue</Response2>
    <Filename>Choose A Colour</Filename>
    </Question Parameters>
    I have the action below in Automator which runs a script. My functionality is to open the text file and move the xml text as a string in a variable. Then move the value of an xml element name "Response1" into a new variable.
    on run {input, parameters}
    tell application "TextEdit" to get text of document 1 as string
    set myXMLSource to result as Unicode text
    tell application "System Events"
    set myResponseText to value of XML element named "Response1" of myXMLSource
    end tell
    end run
    All I keep getting is an error asking me to "Check the actionʼs properties and try running the workflow again.", but my script looks exactly like the tutorials I have been reading.
    Any suggestions?
    Message was edited by: dwigg

    Hi,
    I'd suggest that you sort out the AppleScript itself, in Script Editor, before trying to run it in Automator. The Automator error is a generic "This AppleScript doesn't work, I'm giving up now"-type message.
    I know very little about XML, and the System Events XML suite is not well documented beyond what can be found in SE's AppleScript dictionary.
    However, I think you have two problems. First, you're not telling System Events that you want it to deal with XML data. Second, once that bit's fixed, I don't think that <Question Parameters> is a valid XML tag (it's got a space in it.)
    Save the following into a text-only file:
    <xml>
    <Question_parameters>
    <Question>Which of these two colours do you like most?
    </Question>
    <Response1>Red</Response1>
    <Response2>Blue</Response2>
    <Filename>Choose A Colour</Filename>
    </Question_parameters>
    </xml>
    What you've got there is three levels of xml data, and you have to do some digging through the elements to get the information you require (and you have to know the structure of your data file).
    Try this Applescript:
    set the_file to ((choose file without invisibles) as string) -- navigate to and choose the file you just saved
    tell application "System Events"
    set xml_data to contents of XML file the_file
    tell xml_data to set level_1 to XML element 1 -- the "xml" level
    tell xml_data to set level_2 to XML element 1 of level_1 --the "Question_parameters" level
    tell xml_data to set level_3 to XML elements of level_2 -- level 3 is the level you're after
    tell xml_data to set data_count to count level_3
    display dialog data_count -- level 3 has four xml elements
    set value_1 to value of item 2 of level_3 -- value of Response1
    set value_2 to value of item 3 of level_3 -- value of Response2
    set the_question to value of item 1 of level_3
    display dialog "Response 1 is " & value_1 & return & "Response 2 is " & value_2 with title the_question
    end tell
    Look in Script Editor's Event Log to see what's going on.
    Hope this helps a bit. Can you provide a link to your tutorials?
    H
    Message was edited by: HD

  • I have a question about extracting pages.  When I do the function, adobe saves the individual files as " file name space page number ", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I a

    I have a question about extracting pages.  When I do the function, adobe saves the individual files as "<file name><space><page number>", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I am using excel to concatenate some data to dynamically build a hyperlink to these extraced files.  It casues me problems, however, for the space to be the the file name.  Is there any way to change the default behavoir of this function to perhaps use a dash or underscore instead of a space?

    No, you can't change the default naming scheme. You can do it yourself if you extract the pages using a script instead of using the built-in command.

  • Oracle to File, filename and order by question

    Hello
    I am writing a simple interface, source is an oracle table and destination is a flat file.
    I have two questions:
    1) the file name should be in the form allocation_ddmmyyyy.txt, where ddmmyyyy is the current date. which is the best way to accomplish this?
    2) the file should be sorted with some criteria, which could be easily achieved with an order by clause in the source datastore, but looks this is not possible. How could I do this?

    Hello.
    My Idea follows
    (1) You create ODI Variables,then you may set ODI Variables to resource Name of data-store.
    detail Example (i) you create the ODI-Variable "FILENAME" to GLOBAL
    detail Example (ii) you set #FILENAME to resource name of data-store.
    detail Example (iii) startscen.sh SCENARIONAME VERSION CONTEXT GLOBAL.FILENAME=allocation_ddmmyyyy.txt
    (in other method, invocation API, ODI Public Web Services via Oracle WebServiceProxy API/BPEL PartnerLink invoke)
    (2) you customise IKM. you add "order by criteria" to the command "Insert new rows" 's SQL.
    If criteria is not const, you should use ODI Variables or Java Variables.
    othewise,you may use harcord literal.
    Please challenge my idea.
    Message was edited by:
    futokiyo

  • Language:  Filename with characters for arabic turns question mark

    Language: Filename with characters for arabic turns question mark
    OS: Solaris 9
    Machine: Sun-Fire 25K
    There is an adobe distiller software that is configured and a java apps. There are postscript files that are being converted to .pdf format using the adobe distiller. Using the GUI (using the Exceed; for remote access), when they use GUI to convert the postscripts to pdf files, the long filenames have the corresponding characters for arabic reading purpose. This is OK.
    When we use the windows RUN to telnet the server and convert the postscripts to pdf, it gives a question marks characters in the filenames ( this; is a sample; filename; ?? ??? ??; right.pdf )
    We are not sure now if we have to add a package of arabic or a patch to resolve this problem.
    Message was edited by:
    yurioira32
    Message was edited by:
    yurioira32

    Solution found, I'll post the work around to those who might encounter the same problem.
    Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
    The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
    isoConvert = new String(buf, "ISO-8859-1");
    out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);

  • A question about ascii nulls in filenames.

    This code :
    public class FileTest {
        public static void testFile(File f){
            try{
                System.out.println("testFile: exists[" + f.exists() + "] " +
                        "canonical[" + f.getCanonicalPath() + "] " +
                        "file[" + f + "]");
                FileReader fr = new FileReader(f);
                BufferedReader br = new BufferedReader(fr);
                String data;
                while( (data = br.readLine()) != null ){
                    System.out.println("  data[" + data +"]");
                br.close();
            }catch(IOException ioe){
                System.out.println("  Error testing file : " + ioe.getMessage());
        public static void main(String[] args) {
            File f;
            f = new File("c:/test/hello_world.txt");
            testFile(f);
            f = new File("c:/test/hello_world.txt/junk");
            testFile(f);
            f = new File("c:/test/hello_world.txt" + (char)0 + "/junk");
            testFile(f);
    }Produces this output:
    testFile: exists[true] canonical[C:\test\hello_world.txt] file[c:\test\hello_world.txt]
      data[Hello World.]
    testFile: exists[false] canonical[C:\test\hello_world.txt\junk] file[c:\test\hello_world.txt\junk]
      Error testing file : c:\test\hello_world.txt\junk (The system cannot find the path specified)
    testFile: exists[true] canonical[C:\test\hello_world.txt] file[c:\test\hello_world.txt?\junk]
      data[Hello World.]The interesting point is that the code opens and reads the file with a conviently placed ascii null in the filename.
    Now from a lower level I'm pretty sure what is going on here. The name is being converted to a zero terminated C string and then sent to the OS which opens the file.
    My question is, does any one have any references/links that point out if this is valid behaviour. My "Java" opinion is that the file doesn't exist. My "C" opinion is it is behaving correctly, but this isn't C.
    Any thoughts?
    Thanks,
    Michael

    (The system cannot find the path specified)it's an illegal file name as far as the os is concerned. you wouldn't be able to do it in c either.

  • Why are special chars used in Labview filenames supplied by NI? By special chars, I mean ampersands, questions marks, Plus signs, slashes etc. Thats just bad practice in an otherwise good product.

    I would like to request that National not use such filenames anymore. Spaces should also be avoided. Just use a format such as MyFileNameWillSuffice.vi.

    > Perl. I carry that naming style from those languages. Questions marks
    > used to be (maybe still are) used as wild card characters. I have run
    > into problems on a Solaris machine when there were spaces in the file
    > names. Plus signs slashes (/ or \) are a definite nono. So should
    > !@#$%^&*()|.
    >
    > All those other languages have defined coding standards which serve to
    > make code more readable and easier to maintain.
    The LabVIEW coding guidelines warn against using some of those symbols,
    but it isn't nearly as limiting as you might want. The reason for this
    is that you rarely use VI names on a command line. If you are using
    them, then simply "" the path. Feel free to further limit the
    characters used in naming your own VIs, but
    the names of VIs in vi.lib
    and toolkits have already been determined and have in many cases been in
    use for five to ten years. They do not cause problems.
    Just for the record, LV is also localized into several languages
    including Japanese and many of those customers use their native language
    and native characters. Again, this doesn't cause problems.
    Greg McKaskle

  • Adobe Lightroom 2.5 question...filename box

    Hey everyone,
    Quick question hopefully someone can help me out.
    When I go the the File Name box in the Library mode I click on the box to rename it but for some reason it always pops up with the Rename 1 Photo box.
    Im not to fond of the additional window popping up...I would rather name that photo when I click on it.
    Is there something that I clicked that caused this option to not operate?
    Thanks,

    I've also run into this behavior-- IMO an intermittent bug. No idea what causes it to show up.
    Restarting LR seems to make it go away.

  • Quick question, getting the filename of file just loaded by a loader

    How do i detect the file that a loader has just completed?
    I wish to load a series of small files, and am using the loader functions
        url = "image"+index+".png";
        var request:URLRequest = new URLRequest(url);
        loader.load(request);
       loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteHandler);
    and then an event handler
        private functionloadCompleteHandler(event:Event):void
              //do stuff
    however, i am firing of a number of these load requests, and do not want to assume they will be complete in the order they were triggered, so I want a way of detecting which load has just been completed, can this be deduced from the even (url field was blank).
    I had an attempt with a custom event handler, but am unsure how to make it trigger on load completion.
    thanks Ben

    hmm, I am trying to get that from the on completion event, as I do not know the order in which events will complete.
    The debugger says the url associated with the event (both target and curretTarget) is NULL and the LoaderUrl points to the main app swf object.
    I simply want to be able to interigate the loadCompleted event, to determine which load completed.
    thanks ben

  • Filename in non-english are not saved correctly

    hi
    I recently (last week) installed archlinux.
    I come from manjaro so I am to some extent familiar with archlinux.
    now I am trying to solve some issues that have poped up in arch that there were not in manjaro( mostly because manjaro was pre-configured).
    when I use jdownloader to save youtube videos the files names are displayed correctly in jdownloader but not in konsole or dolphin file manager. (they are shown as "????" characters).
    this happens for Persian and Russian characters.
    I thought this was jdownloader issue but this doesn't happen on my pc that has a manjaro installed on it.
    and another thing that makes it weird is that if i create files in dolphin with say Persian language they are shown and treated correctly. but the ones that are created by jdownloader have this issue.
    and another related symptome is that some files that I download from subtitle websites that are in zip format and have some rare European characters in them (like the French and German ones) I cant open them or extract them in dolphin file manager.
    I had a similar issue like this in manajro but in manajro I used file-roller to open the files and that app would work with this files correctly.
    but in archlinux even file-roller has this issue.
    can somebody help me with this?

    Lone_Wolf wrote:
    rezad,
    it was a long time ago i had that problem and locale handling is like a black box to me.
    It's easy to reverse if it doesn't help though, why don't you try it ?
    I have tried it.
    adding other encoding before the famous en-US,UTF-8 one gives warning for default lang and falling back.
    I see these error when running apps from command line.
    adding other encodings after that encoding doesn't show this warning but i have a suspicion that it mean that other encoding are suppressed,
    i have to try it with a file with a wired but known encoding and then adding that encoding to config and testing again.
    my problem is how do i find the filename encoding?(not find content encoding)
    this is the file in question. can somebody tell me what is the filename encoding?
    https://www.sendspace.com/file/fwmxpc
    EDIT:  my findings on this matter.
    even adding all the langs to /etc/locale.gen and then using locale-gen command doesnt fix this. cause this are different issues.
    this problem as a whole doesn't have a solution, cause linux unlike windows doesn't have a default inbuilt filename encoding and it all depends on your environment.
    linux just treat the filename in the encoding you tell it. so it cant detect anything cause there is nothing to detect.
    from its perspective filename are just binary data ready to be interpreted as wished by the user.
    widows on the other hand uses UTF-16.
    plz if anybody have another contradicting point ,then reply but plz dont say I have to use correct encoding. the only way to fix it is using convmv util and that requires finding the correct original encoding.
    thanks for all the replys.
    Last edited by rezad (2015-04-20 14:45:14)

Maybe you are looking for