Results 1 to 2 of 2
  1. #1
    anil.bharadia is offline Member
    Join Date
    Aug 2008
    Location
    india
    Posts
    3
    Rep Power
    0

    Default How to set Image file path

    I have used getImage(path) method of toolkit
Then i set path to '' e:/anil/msg.png ''
    But this do not work
 Then i tried to copy msg.png file to the folder in which my .java file exist

    This works
    
But i want to use the file that is not in same folder

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    Placing the image in the same directory as the .java source file should have no effect on getImage().

    I did notice that what you typed has a trailing blank. Is that in your code? Java can get really picky...

    What error message are you getting?

Similar Threads

  1. Platform dependent File Path....
    By sanjayksaini in forum Advanced Java
    Replies: 7
    Last Post: 11-30-2008, 03:12 AM
  2. how can i give a file path to java stream ?
    By sheckoo in forum New To Java
    Replies: 2
    Last Post: 11-05-2008, 08:42 AM
  3. file path
    By Arsench in forum New To Java
    Replies: 7
    Last Post: 10-30-2008, 05:39 AM
  4. Replies: 6
    Last Post: 08-06-2008, 01:41 PM
  5. Regular expression for file path
    By ravian in forum New To Java
    Replies: 3
    Last Post: 01-25-2008, 08:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •