Stupid Question but need help

Hey Guys
This is going to sound like a stupid question, but ive been wrecking my head now for about 2 hours on it, and cant find any help on the net.
Im looking to create an image to add to a j2me application. And basically it cant find the image.
The image is in my c:\images folder and its called pike.jpg, when i use the following the code it does not find the image
image = Image.createImage("C:/images/pike.jpg");
image = Image.createImage("C/images/pike.jpg");
image = Image.createImage("C:/\images/pike.jpg");
image = Image.createImage("C:\\images/pike.jpg");Yet when i place it in my working directory and use
image = Image.createImage("/pike.jpg");It works fine, basically how do i point to the directory c:\images\pike.jpg in java
Thanks

Mr.E.H. wrote:
The MIDP one.
http://java.sun.com/javame/reference/apis/jsr118/
Thanks. Now that is clarified, I can see from the documentation:
The name parameter is a resource name as defined by Class.getResourceAsStream(name) . The rules for resolving resource names are defined in the Application Resource Files section of the java.lang package documentation.
So it's not a file name. The string you pass must be findable via the classpath.
So, if C:\images is included in your classpath (which you'll need to do for this example), then just use "/pike.jpg" and have that file live in the images directory only.

Similar Messages

  • Stupid question, but need help none the less...

    I'm one step away from testing out my new system with a K8N Neo Platinum board, but I don't know where to plug in the ground wires. I have a Lian Li PC65B and there's a ground 1 and 2 wire, where do I plug them in?

    Uhhh, I didn't see a ground wire from teh PSU, *runs back to check*.....but in my case has two single pin, like power switch or reset switch size, connectors, that say ground 1 and ground 2.

  • Cant Ask Question But Need Help

    Hello I am new to this site but I am not new to cisco. I have a cisco dcp3925 router and I cant seem to find the ac adapter for it and it takes a 15V 1.5A Adapter and I am trying to figure out on where to buy a used one or a new one. Can anyone point me in the right direction ? also everytime I tried to ask a question in the community it would just bring up other questions nor answers

    Have you tried contacting Cisco to see if they can give you a part number? Otherwise, you could try ebay....

  • Really dumb question but need help anyway

    I was trying to move an audio book from Downloads to a flash drive. When I looked on the white box icon on the desktop it opened showing the whole
    desktop and everything on it. When I looked on the side of the Finder, the flash drive was not there. When I selected all on the flash drive and hit
    delete, everything on the actual desktop was gone. Command Z. When I dragged the icon to the trash, the flash drive did not shut off.
    This takes real talent on my part, drat it. Help!
    Message was edited by: cam812

    Please close topic. Im sorry for wasted post. Forgot about utilities folder.

  • Dumb question, but need help with bootcamp

    I havnt messed with my bootcamp since 2009 and frankly forgot how to find bootcamp assistant. I type it in my finder and get nothing, also looked in my system preferences. I need to get rid of it because I sold it and want to return it to fac specs. Thank for any help

    Please close topic. Im sorry for wasted post. Forgot about utilities folder.

  • Dumb Question but need help.

    After adding all the songs into Itunes and updating my Ipod and everything is copied over just find into the Ipod, can I clear everything in my library in I tunes?

    Yes; set the iPod to manual mode to stop the songs being deleted from the iPod when they are deleted in iTunes. If you do this, you should keep a copy of your music library somewhere else, such as on an external hard disk.
    (11752)

  • This is a stupid question but I needed to ask because I don't want to go there and not being able to buy it, but can I get the iPhone 5 brought straight there when I go to an apple store?

    This is a stupid question but I needed to ask because I don't want to go there and not being able to buy it, but can I get the iPhone 5 brought straight there when I go to an apple store?

    And I meant go to the apple store physically without preordering it online, and I meant the Southampton one. So could I just stroll in apple store and buy a iPhone 5 in Southampton apple store and buy the iPhone 5 straight away? Because I didn't want to have to wait? I just want to go in and buy it and go out with it, if you guys get what I mean? And felipeV if it is in stock could I just buy it and leave with my iPhone 5?

  • Please help me! I'm sure this is a stupid questions, but I can't figure out how to name a blank documents...

    Please help me! I'm sure this is a stupid questions, but I can't figure out how to name a blank document...thanks

    Lynn
    Had me stumped for a while too ...
    On the screen that presents all your "Blank" documents, simply touch the word "Blank" under the preview (not the actual preview) and you'll get a dialogue to name your document.
    Simon

  • This is probably a stupid question, but what does the red circle with a number in it mean on iCal? It looks just like the emails notification. I do not have anything do or up in my cal.

    This is probably a stupid question, but what does the red circle with a number in it mean on iCal? It looks just like the emails notification. I do not have anything do or up in my cal.

    Actually, another person on the "more like this" had the right answer. It meant I had a notification for an invite that I needed to respond to.
    Hope this helps you as much as it helped me.
    D

  • HT204053 Stupid question, but how do I get to/access my iCloud?!

    Stupid question, but how do I get to/access my iCloud? All this time, I've been under the impression that every time I plug in & lock my screen, things on my phone are backed up in my cloud, but I've never been able to find it to check! And, yes, I'm blonde! Please help me!

    You can't see the backup, all you can do is confirm that it was successfully completed.  To do this, go to Settings>iCloud>Storage & Backup and look at the very bottom under Back Up Now.  It will show the time/date of your most recent backup.  If you see this, you do have a backup in iCloud and can restore it to your device in the future if you ever need to.  (You also can't see any of the files in a backup, you can only restore it to your device.)

  • Stupid Question, but.......

    I run TM on three Macs (two iMacs and a MacBook Pro). I really do not know much about TM other than once set-up it runs pretty much on its own backing up the computers. Does it back everything up including iTunes? I know that this is probably a stupid question but if it does back up iTunes, is there a need to separately back up iTunes to DVDs/CDs or another external drive?
    Thanks!

    thebark4 wrote:
    I know that this is probably a stupid question but if it does back up iTunes, is there a need to separately back up iTunes to DVDs/CDs or another external drive?
    Definitely NOT a stupid question. And the answer is . . . it depends on how much risk you want to take. As great as locally-attached external drives and Time Capsules are, they may not protect you from fire, flood, theft, or direct lightning strike on your power lines. So if your music (or other data) is really important to you, and difficult, expensive, or impossible to replace, then yes, you need an off-site backup in addition to TM.
    There are many ways to do this. Some folks alternate between a pair of portable externals with Time Machine, keeping one attached for a week or so, then swapping with the other in their safe deposit box, workplace, relative's house, etc. (You do have to tell TM when you do this, and shouldn't go much longer than 7 days between swaps.)
    Others copy their data to DVD/RW(s) periodically, and take them off-site.
    Still others use a different app, like CarbonCopyCloner or SuperDuper, to copy just their iTunes folder, and/or iMovie folder, etc., to a smaller portable external and take that off-site.
    Still others, if their data isn't too large, store a copy online, either via a MobileMe subscription on their iDisk, or with a 3rd-party service like Mozy.
    And there is an option within iTunes to do incremental backups to CDs/DVDs. I haven't used it, but it's been recommended here.
    This may seem a bit like wearing a belt plus suspenders, but backups are one area where many of us have learned, often the hard way, that +Paranoia is Prudent!+

  • Hi! This might be a stupid question, but I just bought an IPod G5 60 GB. When you firstconnect your IPod you have to setup your ID. I'm using my brothers computer, who has an IPod too, so now I'm wondering when I set up my ID with his Itunes does his Ip

    Hi!
    This might be a stupid question, but I just bought an IPod G5 60 GB. When you firstconnect your IPod you have to setup your ID. I'm using my brothers computer, who has an IPod too, so now I'm wondering when I set up my ID with his Itunes does his Ipod still work with it??? Or would his ITunes just see my IPod? Or does his Ipod ID change to my ID?
    Or does it work without any problems, to setup two IDs on the same computer??
    Thanks!

    Hi!
    This might be a stupid question, but I just bought an IPod G5 60 GB. When you firstconnect your IPod you have to setup your ID. I'm using my brothers computer, who has an IPod too, so now I'm wondering when I set up my ID with his Itunes does his Ipod still work with it??? Or would his ITunes just see my IPod? Or does his Ipod ID change to my ID?
    Or does it work without any problems, to setup two IDs on the same computer??
    Thanks!

  • I am new to this but need help. Lion and iCloud have never worked on my desk top or MacBook Pro.  Slow or Stop!  Is there any way to fix the problem?

    I am new to this but need help. Lion and iCloud have never worked on my desk top or MacBook Pro.  Slow or Stop!  Is there any way to fix the problem?

    We need more information. I'm not sure what you mean by both Lion and iCloud have never worked.

  • HT201269 I'm not a tech person, but need help with my Itunes account in transferring money and downloads onto new phone I purchased 2 weeks ago when my Iphone was stolen. I don't know how to get the money or music on new phone?

    Need help with Itunes transferrs and can I use my Edge phone as a router?

    I'm not a tech person, but need help with my Itunes account in transferring money and downloads onto new phone
    Is this an iPhone?
    Set it up using the AppleID you used on the previous iPhone.

  • I am un able to send mail as it gets stuck in my outbox. I am sure the solution is simple but need help?

    I am un able to send mail as it gets stuck in my outbox. This is a recent phenomena. I am sure the solution is simple but need help?

    I looked everywhere for a solution - and I finally figured it out! Deleting my accounts didn't work, but here is what worked. This worked when my Gmail accounts were not sending properly. I'm not sure if it works for other e-mail services.
    1. While in Mac Mail, click "Mail" in the top left corner of the screen
    2. Click "Preferences"
    3. Click "Accounts"
    4. Select your account that isn't sending properly
    5. In "Outgoing Mail Server (SMTP)" there will be two options - Gmail & Gmail (offline)
    Make sure that "Gmail" is selected and NOT "Gmail (offline)"
    If you navigate to another section in Preferences, it will ask you to SAVE - make sure you save your changes!
    It worked for me, hope it works for you!

Maybe you are looking for

  • Clips added to timeline do not show up in sceneline

    Hi Can someone please guide me to fix this problem. I have imported AVCHD videos from an HD camcord into my files and folders. Then I've opened up these files in the premiere elements organizer, dragged them onto the timeline. A pop up appears asking

  • USER EXIT to be added in IT2001

    Hey Experts, I have the following requirment and i havnt worked on HR ABAP. Please provide me the solution and how to reach the user exit in the infotype. User exit needs to be added to IT 2001 to include the logic mentioned below: a.     For every n

  • Can I password protect my FTP website

    My site was built in iWeb 3.0.4, and originally hosted on MobileMe. Now it's hosted by a local service provider via FTP, so the "Make my published site private" option is not available to me any more. I'd actually like to build an Intranet for my com

  • Documents in the BBDD

    Hi, I would like to know where Oracle puts the docs into the BBDD ?? thanks.

  • Banshee - error: No such file or directory

    When i try to run banshee i received this message: No such file or directory System.IO.FileNotFoundException: No such file or directory ---> Mono.Unix.UnixIOException: No such file or directory [ENOENT]. at Mono.Unix.UnixMarshal.ThrowExceptionForLast