Dynamically determine location for a file relatively to current CLASSPATH
Hi All,
I am quite new to Java and I have a problem.
I am trying to write a program that can dynamically determine the location of a file (the class that handles this will only have the relative path/file name).
Eg.
File f = new File(config/MyMainCfg.file);
The class will then need to be "smart" enough to locate the file "config/MyMainCfg.file" in relative to the current CLASSPATH.
Hence, if the current CLASSPATH is /usr/local/myclasspath, then the file should be able to be located at "/usr/local/myclasspath/config/MyMainCfg.file".
My main question is:
(1) If the CLASSPATH contains multiple values (i.e. CLASSPATH=path_1:path_2:path_3), how do I correctly determine the current CLASSPATH that the currently executing program is using?
I have a method that does something like that. A few lines of it below:
// Get location class loaded from
public final static String getHomeLoc(Object obj, String className) {
URL ourLoc = obj.getClass().getResource(className);
... code gets ourLoc.toString() and parses it.
// Called by:
String loc = getHomeLoc(this, "MyClassname.class");
Similar Messages
-
When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder. How can i fix this problem?
Anyone can help to advice how to solve this issue ?
-
how can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,…"
It sounds like if you open Preferences in Word there will be a place where you can specify where to store autorecover files. Right now it sounds like it's pointing to somewhere that doesn't exist.
-
I cannot update or install updates on itunes. It says that the location for that file does not exist. I cant even uninstall itunes as the same error message comes up.
Hi vindog60,
Thank you for using Apple Support Communities.
To troubleshoot this issue where you get an installation error with iTunes on your Windows PC, please follow the steps in the article linked to below.
Issues installing iTunes for Windows - Apple Support
Cheers,
Alex H. -
I just upgraded my mac book to 10.6.8 and downloaded the new version of itunes. When I try to open it and error message appears saying, "The iTunes Library file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder."
I have tried a few things but iTunes closes right after i click okay. Anyone know anything?Look in your Home > Music folder. There should be an iTunes folder there and it should have a number of files and folders including one called library.itl You want to guide iTunes to that file. If you don't see that file or folder then in your next post you will have to be very specific as to what you do see or how you have your iTunes set up because that's where it should be according to default settings.
-
Every time I have to upgrade iTunes it gives me this messege:'The default location for this file is in the "iTunes" folder in the "Music" folder.' the file should be there but I don't understand why it does this every time Apple upgrades the Itunes library. Its on the computer somewhere but it only affects this login on my computer (meaning on this Windows Account). Why does my iTunes do this? Then I have to spend hours placing all my libraries back together and all my music back into the library. Which usually takes me a few days to sort all out. What is wrong with my iTunes? The iTunes folder is a folder in my Music folder where I store the iTunes music/files/libraries at on my computer so I can have all of the iTunes files in one place on my computer.
I have a Windows 7 operating system my computer runs from.
-
itunes library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder, I keep getting this message everytime I try to install Itunes after having to remove windows 8.1 and go back to windows 8. I have uninstalled and reinstalled and it keeps telling me the same thing. What do I do?
Hi Renee31,
If you are having issues with the library.itl file in iTunes, you may find the following articles helpful:
iTunes: What are the iTunes library files?
http://support.apple.com/kb/ht1660
Apple Support: Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
http://support.apple.com/kb/HT1923
Regards,
- Brenden -
iTunes will not open. I get a message that says, "The iTunes Library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the music folder". How can I fix this?
Hi pgarard1,
If you are having issues with launching iTunes after an update, you may want to take a look at the troubleshooting in the following article:
iTunes for Windows: Doesn't open after upgrading in Windows Vista or Windows 7
http://support.apple.com/kb/TS2363
Regards,
- Brenden -
I have been trying for over 2 weeks now trying to get my iTunes to open up so I can use my iTunes but I have not had any luck since I up graded to the new itunes. I have tried uninstalling (all apple programs) and reinstalling and nothing seems to work. Everytime I try to open my iTunes I receive the following message - The iTunes Library.itl file cannot be found or created. The default location for this file is in the "i Tunes" folder in the "Music" folder. Please help as I'm getting very frustrated and want to throw every apple device in the trash!!!
FYI: I thought about getting the iPhone but since I"m not having very good luck getting assistance with my iPod/iTunes I think I will rethink my decision.Found the solution.
-
I can't open my Itunes keep receiving error message- The iTunes Library.itl file cannot be found or created. The default location for this file is in the "i Tunes" folder in the "Music" folder. I have even tried removing and reinstalling iTunes and it still does work because I continue to receive this error message. Please Help!
Anyone can help to advice how to solve this issue ?
-
I am trying to open iTunes on my Windows 7 PC and am getting the following message...the itunes library can not be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder. Any ideas?
Let's try this first. Hold down the Shift key while you try to launch iTunes. You should eventually see the following dialog:
Click "Choose library". Browse to inside the following location (depending on what operating system you're running):
Operating System
Default location of iTunes library
Microsoft Windows XP
\Documents and Settings\[your username]\My Documents\My Music\iTunes\
Microsoft Windows Vista
\Users\[your username]\Music\iTunes\
Microsoft Windows 7
\Users\[your username]\My Music\iTunes\
... and open the iTunes library you find in there. -
I keep getting the following message The iTunes library cannot be found or created. The default location for this file is in the iTunes folder in the music folder. All of my playlists have disappeared and I am trying to recover them however I now can't even open iTunes!
Hi crazymaiden,
I have two articles for you here that should be able to help you troubleshoot this issue with your ability to launch iTunes:
Troubleshooting iTunes installation on Mac OS X
http://support.apple.com/kb/HT2311
iTunes: How to re-create your iTunes library and playlists
http://support.apple.com/kb/HT1451
Take care, and thanks for visiting the Apple Support Communities.
-Braden -
my iTunes has stopped working on my mac book pro 13" when i try oping it it saysThe iTunes Library file cannot be found or created. The default location for this file is in the “iTunes” folder in the “Music” folder. i dont know what to do i need my itunes back
Hi pgarard1,
If you are having issues with launching iTunes after an update, you may want to take a look at the troubleshooting in the following article:
iTunes for Windows: Doesn't open after upgrading in Windows Vista or Windows 7
http://support.apple.com/kb/TS2363
Regards,
- Brenden -
ORA-27078: unable to determine limit for open files
I installed Oracle XE on my Gengoooraclexe@ghost ~ $ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-JUN-2011 16:51:29
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 25-JUN-2011 10:03:30
Uptime 0 days 6 hr. 48 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ghost.emacs.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
Poraclexe@ghost ~ $ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jun 25 07:19:58 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> show user
USER is "SYS"
SQL> startup
ORA-27078: unable to determine limit for open files
Linux Error: 1: Operation not permitted
Additional information: 1
Additional information: 1
Additional information: -2958340
SQL> startup force
ORA-27078: unable to determine limit for open files
Linux Error: 1: Operation not permitted
Additional information: 1
Additional information: 1
Additional information: -3378372
SQL> startup
ORA-03113: end-of-file on communication channel
SQL> exit
Disconnectedunable to determine limit for open filessee http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm#BABJFAIA
Is that a debian flavored distro? -
Changing Location for Assignment Files
I create lots of InCopy assignments from InDesign. (Using CC for both) For each New Assignment I have to change all the options: "Location for Assignment File", "All Spreads", "Link Image Files when Packaging". Is there a way to set the defaults for these? I waste a lot of time and often make mistakes doing this manually for each new assignment I create.
Thank you.Thanks,
I figured that out minutes after I posted on this forum.
Regards,
Jim Brown,
Harris Corporation, Multimedia Center
Maybe you are looking for
-
Satellite 1605cds: RAM not reported in Windows 2000
Hello I have a 2nd hand Toshiba Satellite 1605cds/4.3 (an amd k6-2 450 mhz based system). It has 32 MB of ram on board, and a so-dimm slot to put in a memory of 128 MB. But I have read this webpage: http://fandelem.com/toshiba2.html where it says tha
-
Where can I learn how to setup and use the new features in Mountain Lion?
Where can I learn how to setup and use the new features in Mountain Lion?
-
Information cannot be saved at this time.
When I try to confirm my daughter's AppleID, I get the message that the info cannot be saved. It won't let me sign into her account. I set it up with an allowance, and all of that seemed to work correctly. We both got the confirmation emails. But,
-
URL checksum when using page alias
Hello to all. I'm using Apex v4.1.1.00.23, and I'm having a problem when using page aliases in URLs. When creating a list with links to Apex pages, if I use a page alias, then no checksum is generated. I tried this using the "classic" way to create l
-
Unable to transfer purchased apps from iphone to window 7
I tried all the solution which been offered from apple support but i still unable to transfer purchased apps from iphone to window 7. Please show me what to do =(