LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-26-2004, 05:44 PM   #1
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 443

Rep: Reputation: 30
relative/absolute paths in Java


i have a program that reads in images; however, I'm having trouble displaying hte images using relative paths. My computer at home with java 1.5.0, the "/file\\image.gif" the path works fine, but when i'm compiling and runing on another machine i can't see the pictures, using relative path, it only works for absolute. the java at other computers are all 1.4.2_05. Is there something i'm doing wrong? or is this a bug in java?

thanks,
djgerbavore
 
Old 10-26-2004, 06:15 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,482

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
/file\\image.gif is not a relative path, path\\image.gif or path/image.gif are, depending on the platform. Are you running on windows ?
See the path.separator system property.
 
Old 10-26-2004, 08:01 PM   #3
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 443

Original Poster
Rep: Reputation: 30
yes i'm running windows for this current project.


thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: ln and relative paths tortle Programming 8 05-10-2010 05:50 AM
Absolute and relative paths Gins Linux - General 6 11-08-2008 08:48 PM
Symbolic Links, directories, and relative paths (../). Can it be done? jimwillsher Linux - Newbie 1 03-11-2005 05:27 PM
locating and edition .profile for java paths Madaize Linux - Newbie 1 11-06-2004 11:41 PM
program that generates relative paths? TheMaXX Linux - Software 1 10-21-2003 02:17 PM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration