How to get the capacity of the disk in java oracle

Hi, Experts.

I try to get the drive capacity c: in oracle, for this, I use java, but I had a few problems, because in oracle file i/o class, it does not work as expected. This is my sample code:

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED TEST.DISKS_FREE as
 
import java.io.File;
 
import java.sql.*;

 
public class DiskFreeSpace
 
{
  
public static long loadDisk() throws SQLException
  
{
  
File file = new File("c:");
  
long freeSpace = file.getFreeSpace();
  
return freeSpace;
 
}
}

When I compile this code, throw this error:

[Error]  (0: 0): DISKS_FREE:14: cannot find symbol
[Error]  (0: 0): symbol  : method getFreeSpace()
[Error]  (0: 0): location: class java.io.File
[Error]  (0: 0):   long freeSpace = file.getFreeSpace();
[Error]  (0: 0):   ^
[Error]  (0: 0): 1 error

This means that compliler is the method getFreeSpace() in java.io.File, however if I test this in java jdk5, same that use oracle 11 g 2, works perfect.

I post this issue previously in StackOverflow without success.

Thanks in advance.

Prior to Java 6, you can use this: FileSystemUtils (common IO 2.4 API)

is no more than a specific OS command line execution, so you can probably only implement if you do not want to load the entire jar in the db.

(Homepage: http://commons.apache.org/proper/commons-io/description.html)

Tags: Database

Similar Questions

  • Reinstalling Windows, how to get the disk recovery or a license Windows from Dell?

    I'm fixing an Alienware M17x R4 for my client.

    I talked with support before X mas 3 times. They said that they send the restore CD TOMORROW. I have the actual recorded call. Then they called 2 DAYS later and said that they could not confirm address, which is apparently derived from the record of initial purchase (?). Then they say that they send CD TOMORROW again. I'm about to give up Dell and buy a freaking OEM license. In fact, who suggested what Dell support! But then I have to load the Windows license to the client and tell them that Dell is hopeless.

    I would use a product key sticker to install since the OEM disc, but Dell has no more than 10 Windows.

    My QUESTION is; All the difficulty in getting the Dell Windows CD, I mean, it's really worth?

    Technically Dell sold a windows license but have not given one for the client, so it's a fraud.

    The key to the COA is incorporated in starting UEFI by Windows 8 moving forward, as such, as long that you install the correct version of Windows came with the computer, you should not put in any key.

  • How to get the disks to reinstall Windows 7 Home Premium?

    Original title: I keep my windows 7 Home Premium OA paper (disks).  How can I get a?

    I own a Sony Vaio.  It cames with Windows 7 Home Premium installed on it.  BUT NO DISKS.  Now, he seems to have a bug and I want to format and re install my windows.  I have a Microsoft certicate on the laptop.  How to make a paper copy of my software?

    You should consult the documentation supplied with your Sony's Vaio computer on how to reinstall Windows 7. Usually this requires that you start in a recovery environment.

    Please see this article on how to reinstall Windows 7 on a Sony Vaio

    http://eSupport.Sony.com/us/Perl/support-info.pl?template_id=1&info_id=507#driver

  • How to get the DBCA in Linux environment

    Hello

    I hv installed Oracle 10 g on SuSe Linux and works very well with the web console
    (http://machine-name:1158 / em /)

    but I hv problems to get the oracle tools that appear in the start menu in the windows installation.
    (DBCA, Net Manager, isqlplus etc..)

    So, how to get the DBCA and other oracle 10g tools in the Linux environment.

    thanx

    Set your path env variable in your .bashrc or .bash_profile file

    export PATH = $ORACLE_HOME/bin: $PATH

    Then just issue the command at the command prompt

    dbca Linux]
    netmgr Linux]

    NB: If you are on a remote computer, you must set the DISPLAY variable too

    or you can directly in your bin folder where you can see all the utilities... you can run it as

    Linux]. / dbca

    Concerning
    Nishant

  • I was getting a new hard drive to my HP laptop. Since I have a key for Windows Vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    I was getting a new hard drive to my HP laptop. Since I have a key for Windows Vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    original title: reinstall Windows Vista

    I was getting a new hard drive to my HP laptop.  Since I have a key for windows vista from the purchase of the laptop, how can I get the disk to re install the operating system?

    Contact HP (if they had not initially you provided with support or the media manufacturing process or you have lost the media and/or you don't want EU to some tools to clone the old drive to the new or can not do...) for a copy of the media restore/recovery of your system.

    http://www.ZDNet.com/blog/Bott/lost-your-Windows-discs-how-to-get-replacement-media-legally/4320?PG=3

  • Satellite A500 PSAM3A - how to get the HARD market under Vista 64-bit disk Protection System

    Hello

    I would like to know how to get the HARD drive Protection system up and running under Vista Home Premium 64 bit operating system. I downloaded the program 64 bit of Toshiba for this program and install it I tried but doesn't seem to work. I have uninstalled and try to install the program, but still does not work.

    Unable to find the problem, why it won't work. If anyone knows how to solve this problem it would be a great
    help for me. If anyone knows how to solve this problem please answer me as soon as possible.

    Thank you for your time.

    Kind regards
    Nigel.

    Hello!

    What you downloaded exactly on the Toshiba site?

    As written Akuma you must install first added value Package you will find also on the Toshiba site. Check this box!

    An interesting thing: it does not work if you are using the preinstalled operating system? It should have everything installed for your laptop.

    Good bye

  • How to get the icons to display correctly in the Finder?

    At the time of the "classic" Mac OS, if the icons are not correctly display in the Finder, we could 'rebuild the desktop file' to correct the problem. I've recently updated to Yosemite, and most things work well, but for some reason, most of the files in the Finder .webloc now show as blank icons (but not all; a few show the correct icon). There is no model, I can see: some very old .webloc files now show a white icon (where I know that their icons used to be correct), while the most recent show the icon of correct - although I just created four (by dragging the URL of the Safari, the usual method) which are all empty. Sometimes they appear with the older icon, with the symbol @ (although those who seem to have changed vacuum after running and restart maintenance). I tried from an external disk, repair permissions and repair the file system, as well as cleaning with the utility of Maintenance (which clears the web browser and other caches), nothing works. Does anyone know how to get the computer to display these icons correctly?

    May be a corrupt .plist.

    Make a backup, preferably 2 backups on 2 separate drives.

    Go to Finder and select your user folder. With this Finder window as the windshield, select Finder/display/display options for presenting or order - J.  When the display options opens, check "show the library folder. This should make your visible user library folder in your user folder.  Select the library. Then go to Preferences/com.apple.finder.plist and com.apple.desktop.plist.  Move the .plists on your desktop.

    Relaunch the Finder by restarting the computer and test. If it works fine, delete the plists from the desktop.

    If the same, return the .plists to where you obtained since, by crushing the latest.

    Thanks to leonie for certain information contained in this.

  • Windows vista Home premium recovery question - how to get the source for windows vista home edition premium as the recovery does not work since the recovery partition

    How to get the source to windows vista Home premium recovery is not from the recovery partition and gives me an error message

    Hello

    Contact the computer manufacturer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    or borrow a vista microsoft dvd; not a HP, Acer recovery disk etc

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    http://www.theeldergeek.com/Vista/vista_clean_installation.html

    How to replace Microsoft software or hardware, order service packs and replace product manuals

    http://support.Microsoft.com/kb/326246

  • How to get the PE9 DVD to play on the new blue ray players?

    I upgraded to PE9 because my PE2 dvd play on my new blue ray LG or Sony players.    Unfortunately, PE9 discs do not play or the other.   How to make the disks that are going to play?   It is a real disappointment, since my goal is to change the years of family videos and make a nice set of DVD pick up and watch it with the family.   I can't believe that people that I send to the family to go including our buy a DVD player (and some of them do not work either)...

    Help?   He is not much of interest to one program editing if you cannot produce a final result for video display!

    p.s. I'm happy to do all the work around that will work... burn a file on the disk and access through the data area of the BR player?    Use another program to take the exit PE9 conversion and make it playable on dvd s... anything that works is fair game.

    Thank you

    David

    David,

    DVDs created with pre will normally play on most players, if DVD or BD. However, no DVD, or BD player is certified to play ANY disc - DVD-video or BD. They are certified only to read discs replicated in trade. Some players are better at handling serious records, than others. This ARTICLE will give you more background and some suggestions to get the best possible disc.

    In a Word, two major considerations are the brand of blank media. What brand do you use?

    Then, and although it is less important than a few years ago, the media type may play a role. What type, - R, or + R, are you using?

    Burning speed can contribute to the quality of combustion, but forwards, we limit ourselves here. Pre will be a speed of blank media, the speed factor of the burner, and then choose the highest speed. Normally, it will be OK, but when things do not work, I recommend a different workflow:

    Burn the project to the file. This will create a VIDEO_TS folder, where you choose for the Destination, which will include the necessary IFO, BUP and VOB, files. At this point, I would like to use DVD software to test the game the VIDEO_TS folder. Then, we use a burning utility, as big, free ImgBurn to do the physical burn on the disc and choose the VIDEO_TS folder (with files). Here, you can adjust the burning speed. I recommend about 1/2 down the list of possible speeds. It takes more than a few minutes, but is often the secret to burning discs with high playability.

    I'd also look on from the mfgr of the multi-lecteur. Web site and then download and install the latest firmware for this model drive.

    Once finished, test the drive in the Multi-lecteur on the computer using the DVD playback software. If it works, then the disk is fine, but could not yet be seen by a set-top player, and this is where the first two steps we just get the best possible drive.

    Good luck

    Hunt

  • How to get the text have the same effect as the video?

    Hello

    For the first time post here, but I wonder how to get the text of the titles have the same effect as the video behind her.

    For my video, I use 'bad tv' and other effects such as Gaussian that obviously changes the appearance of video, creating the look of VHS. However, I then inserted text via the title, but it normally appears. How can I make this text have the same effects as the video behind it?

    A friend told me I might need to add text to the video first, then do the effects, I have not tried, but wonder if there is an easier way, as this would require me to restart.

    EDIT: That's what I'm looking for. https://youtu.be/7_2PHQI89dI?t=24s The text has the same effect as the video.

    Thank you

    One way is to create a clip made up based on the title and the original clip. Then apply the effect.

    Another way is to use an adjustment layer.

    Good luck.

    Russ

  • How to get the podcast of the website on the phone

    I was told to put that feed into the PODCASTING app on your iOS device.

    The site in question is https://randirhodes.com/how-to-get-the-podcast/

    I paid for a premium podcast, now how o I get this podcast to appear on my iphone 6 s more in the podcast app?

    Podcasts > select my Podcasts > press the '+' > Add Podcast > paste the URL that you got on the site.

  • How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be.

    How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be. I started with the last update that I rebooted.

    Hello
    to change the homepage when opening firefox-press 'Alt' and click on tools-> Options.

    Main menu, you can change the URL.

    If the problem persists, you can follow these simple steps:

    Enter about: config in the address bar and press ENTER. Accept the message of 'dragons' to see the Advanced preferences screen. Use the above search box to enter the below pref.

    You can assign an empty string to stop your Firefox to retrieve "extracts" and brandLogo changes the browser.aboutHomeSnippets.updateUrl pref. Right-click this pref and select Edit then clear the value as pref in the box that appears, and then click OK. Who will also disable "snippets" that appear under the container of the research on the default home page.

    Then you must open the folder of your profile, via help > Troubleshooting Information > profile folder > > button view folder. Then close Firefox. Your profile file open with Firefox closed (Firefox '3-bar' menu key > exit/Quit), wait or two minutes, then remove the storage\moz-safe-about + home folder in the Firefox profile folder to remove the brandLogo and stored in IndexedDB code snippets to make Firefox use the default brandLogo and a defined default code snippet.

    If you later change your mind about these changes, you can reset the pref browser.aboutHomeSnippets.updateUrl via the context menu and Reset allows to retrieve the default value using the storage\moz-chest-fort-about + home folder again.

  • where and how to get the new Firefox add - one of who is spying on us. Please mail to...

    Heard speak adds the new on Fire Fox. Where and how to get the new Firefox add - one of who is spying on us. Please mail to maheshubhayakar at rediffmail.com

    edited by email address - moderator

    It is helpful if you provide a link to the article you were reading.

  • Re: How to get the Tempo to work properly?

    Hello

    I have problems with the service of Tempo.

    I don't get updates via this application (all the settings of this application are accurate, i.e. "full control"). I know this because there are updates available online to my laptop via the pilot site of toshiba.

    When I installed first Tempo, updates for about a month, I received, and then all of a sudden, no update came through. My firewall is blocking either of this application.

    I tried to reinstall the application, but no change in the situation.

    Does anyone know if ALL updates are available via the website of driver toshiba out tempo? Because, in the month that this service worked, I got an update of the bios, but I recently saw a bios update online and Tempo has not always reports that it is available.

    Any ideas on how to get the Tempo to work properly?

    Thank you.

    I saw in your other thread you have installed SP1 on your Vista laptop.
    There may be some compatibility problems between SP1 and Tempo

    And Yes, as far as I know Tempo bring all available updates!

  • I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    I rolled again Firefox 4.0 to 3.6 and now my navigation bar still looks like instead of 3.6 4.0 how to get the old layout back?

    The fastest way is to use the option 'Restore the default toolbar set' as shown here - https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

Maybe you are looking for

  • My 1st tab is opened in Unicode mode, but the 2nd tab opens in the West - WHY? Need both in Unicode.

    My home page has two tabs; the 1st is Google.com and the 2nd is webmail.juno.com.When I opened in IE8, the two legs have the Unicode (UTF-8) encoding.When I open it in Firefox, the 1st has encoding Unicode (UTF-8) BUT the 2nd tab has ALWAYS WHY Weste

  • Uprgrading want 23-d010 EA

    Dear Sirs I bought this: Like 23-d010 ea It works perfectly, but now I need an upgrade. I want to add more memory and a better video card, given that the one I have is underperforming. I am an engineer, it wouldn't be hard to change, but I do not kno

  • upgrading to windows 7 hp Pavilion 500-096

    I'm trying to find the driver for windows 7 on pc HP Pavilion 500-096. Miss me the network driver, driver Ethernet, USB, PCI driver driver and controller SM. I wonder if someone can point to the compatible drivers for it. Thank you

  • HP Pavilion DV2500 DBAN which driver and utility to install?

    Hello everyone, I just DBAN my HARD drive and reinstall Windows Vista x 32 on my HP Pavilion DV2500. Now, I need to install all the drivers and software HP utility & driver download support page. What driver or software do I download everything first

  • Move the files to the 2nd disk on the computer

    I have an Acer duo drive computer. My C drive is "dangerously full. I want to spend a bunch of stuff on my other my main C drive D drive. But do not know how to proceed.