Java File access while File opened

I have to check if a file is already opened or not under windows 9x/ME/NT/2000.
A try give me a FileNotFoundException . I check the file and Java also modified this
file . I don't want this to appened again, so i would accept any suggestion so that if
files are already opened under other programs than mine, my programm will alert the user
and say it skipped the file or something like that.
In advance thanks a lot (sorry no more duke dollar available).

It seems after several tests that this function is somehow buggy, and don't
really say if a file is open with another application or not.
I found another way : i try to rename the file, if i couldn't succeded, then the file
is open with another application. The only problem is that this function seems to be
a little buggy too, so sometimes it says me a file is open whereas it isn"t open.
Hope this may help someone.

Similar Messages

  • File.setLastModified() while file is open? Should it work?

    Does a file have to be closed to use setLastModified() to change its modification date?
    I have a RandomAccessFile that I am writing to, but the modified time doesn't change when it is written to. I would like use setLastModified() to update the time, but it returns false unless I close the RandomAccessFile first. For example, the code below only works if I uncomment the close() below.
    Does anyone know if there is a way to update the modified time without closing the file? I am running this on WinXP with JDK 1.3.1 and have tried it with 1.4.2 as well.
    File file = new File("c:\\work\\", "FILETEST.txt");
    file.createNewFile();
    RandomAccessFile raf = new RandomAccessFile(file, "rw");
    //raf.close();
    System.out.println("Before=" + file.lastModified());
    Thread.sleep(1000);
    System.out.println(file.setLastModified(System.currentTimeMillis()));
    System.out.println("After=" + file.lastModified());
    Thanks
    Aaron

    I dont get a 0 with lastmodified, I get the same time I had before I wrote to the file, When I try this with a FileOutputStream, it does update the time thought - it seems that RandomAccessFile does not update the modified time while FileOutputStream does when these are written to.
    Beside this, it doesnt seem that setlastModified does anything on a RandomAccessFile until it is closed. I am looking for a way to do that.

  • Exclusive file access while doing backup?

    Hello!
    I am hosting a minecraft server on my old 900MhZ homeserver [it DOES run really well, arch is doing an amazing job ] and I made a little bash script to daily backup the current savegame, which I run via cron:
    #!/bin/bash
    MC_PATH="/home/tom/mc_bukkit/dasiro"
    BKP_PATH=/home/tom/_backup
    if [ -d "$MC_PATH" ]; then
    filename=minecraftsave_`date "+%Y-%m-%d_%H-%M-%S"`.tar.xz
    tar --create --xz --file $BKP_PATH/$filename $MC_PATH
    find $BKP_PATH -name "minecraftsave*" -mtime +14 | xargs rm
    fi
    The problem is that most often it is run I get tar: ./mc_bukkit/dasiro/region/r.-1.0.mcr: file changed as we read it.
    Is it possible to "lock" the file for a few seconds while the backup is run? Maybe there is a possibility... It is no problem if the server "freezes" for a few seconds. Thank you!
    Last edited by cyberius (2011-05-14 08:03:03)

    Take a look at lvm and specifically lvmsnapshots.
    If you have the files you wish to backup on a lvm partition, then you can create a lvm snapshot, which is a frozen snapshot of the partition. The original partition is untouched and goes about it's business.  You can then mount the snapshot like any other filesystem and make a backup of it's contents.

  • Muse crashed while saving my file, now the file is corrupt.

    I was making some new changes to my Muse site (literally 2) and went to save it. Muse, even though it opened the file from recent sites, asked me to locate the file when I said "Save." So I navigated to where the file was saved and hit "Save" again. Muse crashed. Upon re-opening Muse it asked if I wanted to re-open the file and I said yes. I get the error "Cannot Open File" with "This Adobe Muse site cannot be opened." and no records in main.active table followed by an OK button.
    So now, I am assuming I have to re-build my Muse site from scratch, or leave it unchanged on the business catalyst site. Is there any way to recover it from where it is hosted? If I rebuild it, will that cause a problem with that host space?
    Ugh.

    Please send me the original file (before being opened and resaved with the latest Muse). Given it's size, e-mail should likely work, but using a service such as WeTransfer, Adobe SendNow, Dropbox, etc. may be more convenient. Please send it to [email protected] along with a link to this thread.
    It would be helpful if you could also send the MuseLog.txt file from your Document folder. Muse may have logged some relevant errors along the way.
    Am I correct the .muse file was stored on an SMB mounted file server while being opened and worked on in Muse?
    A few bits of information that may be helpful:
    - The speed of Save is proportional to the scope of the changes since the last Save, thus Save is usually very fast.
    - The speed of Save As is proportional to the total size of your file and currently runs fairly exhaustive diagnostics prior to the actual save and also compacts the file after the save, thus it's very slow compared to Save.
    - Whenever a file is converted from an older version of Muse when you next go to Save, Muse will bring up a Save As dialog. This is to encourage you to save to a new file name, so you have the old file should you need to go back to the prior version of Muse for any reason. If you proceed to overwrite the file from the previous version of Muse, Muse should display a warning message discouraging you from overwriting but providing the choice to continue. It sounds like you never received this dialog? Regardless, overwriting should work without a problem.
    - Working on a .muse file stored on a file server will be hundreds of times slower than working on the same file stored on your local hard drive. The underlying database library Muse uses for creating and accessing .muse files has not been optimized or use an a file server. It makes many many small reads and writes. These are fast when a file is stored locally, but painfully slow over a network to a file server.
    Small world... more than 25 years ago I was installing Webasto sunroofs/moonroofs.

  • Auditing all users file access - too much information

    Hi, I have enabled a GPO With the following: Computer Configuration\Policies\Windows Settings\Security Settings\Advanced Audit Policy Configuration\Audit Policies\Object Access -> Audit File System -
    Success on a file server.
    After that, I have enabled successful Create files/Create Folders on a folder for the built-in group Everyone.
    That part works fine, I can see when users are creating files on the folders. But I also get a lot of Extreme amounts of other events logged in the Security log, and everything is coming from the backup agent running on the server (NetBackup in this case).
    How come that a backup agent is creating the events like this? It makes filtering much harder afterwards. The business requirements is to audit Everyone who is adding files to a specific folder, not all the rest of the server. The server
    is Win2008 R2.
    Example:
    An attempt was made to access an object.
    Subject:
    Security ID: SYSTEM
    Account Name: FILESERVER01$
    Account Domain: MYDOMAIN
    Logon ID: 0x3e7
    Object:
    Object Server: Security
    Object Type: File
    Object Name: \Device\HarddiskVolumeShadowCopy58\Windows\winsxs\amd64_microsoft-windows-audio-audiocore_31bf3856ad364e35_6.1.7601.18619_none_d4cab625fb3adf96\audiosrv.dll
    Handle ID: 0x3c4
    Process Information:
    Process ID: 0x1048
    Process Name: C:\Program Files\VERITAS\NetBackup\bin\bpbkar32.exe
    Access Request Information:
    Accesses: WriteAttributes

    Hi Steve,
    I feel your pain, I turned on logging on a file server and found the security log filling 4GB in a couple of hours. I think the key is being very selective about what you audit. I found this article useful and it had some powershell and ideas for helping
    make sense of the information overload - http://blogs.technet.com/b/mspfe/archive/2013/08/27/auditing-file-access-on-file-servers.aspx
    In my opinion though you really need a third party solution to make this viable, two I've looked at are
    Netwrix File Server Auditor and
    FileAudit which seem very similar in functionality and ease of use. These basically read in the event log to provide long term archive and reporting on it.
    Good luck,
    Tim

  • Can java software access media on the phone?

    Hello
    Can homemade java software access mp3-files, images, sms, phone book etc. on a mobile phone?

    FileConnection API, PIM API,...
    have you read some docs on J2ME ?

  • Java.io.IOException: Too many open files while deploying in soa 11g

    hi all,
    I am getting a strange error while deploying any composite .. it's a hello world kinda composite but while i am trying to deploy it i am getting "java.io.IOException: Too many open files" while deployment.. i have tried to deploy it in 2-3 ways but all of them resulted in the same error..bouncing the soa server might be an option but can someone give an insight as why it is happening and can it be resolved without restarting the server..
    Thanks

    yes..so this problem is with unix only ..coz i previously worked in Windows ..never got this problem..

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • Getting java.io.IOException: Too many open files+ClassNotFoundException

    Dear All
    We have a web application deployed on Rational Application Developer 6.0 (Operating System is Windows 2000 professional) our users are randomly getting java.io.IOException: Too many open files+ClassNotFoundException when they click on some servlet or jsp link, but they are getting this error randomly for example when they click some link they may get these exceptions but refreshing page or clicking once again on same link executes servlet successfully.If anyone could help on this topic we will be grateful
    Thanks

    I think this these two exceptions are occuring in differrent environment
    java.io.IOException is occuring under heavy load to web server its stack trace is as follows:
    JSPG0225E: An error occurred at line: 2 in the statically included file: /SessionCheck.jsp
    JSPG0093E: Generated servlet error from file: /Admin/AdminInsuranceCertificates.jsp
    E:\WebSphere_6\AppServer\profiles\AUSECert\temp\centraNode04\server1\AUSECert\Vero.war\Admin\_AdminInsuranceCertificates.java:259: cannot access com.bplus.natmar.LoginDetails
    bad class file: E:\WebSphere_6\AppServer\java\jre\lib\core.jar(java/io/Writer.class)
    unable to access file: E:\WebSphere_6\AppServer\profiles\AUSECert\installedApps\centraNode04Cell\AUSECert.ear\Vero.war\WEB-INF\classes\com\bplus\natmar\LoginDetails.class (Too many open files)
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    (source unavailable)
    1 error
    ]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /Admin/AdminInsuranceCertificates.jsp failed to compile :
    this error always occurs in reference to logindetails class this clas is used to make a session check on different roles in our project for e.g., user having end user role should not be able to log in as a user having admin role
    we have included a sessioncheck.jsp in our every jsp page in this jsp we have simply used logindetails class as useBean and called its getresource() method
    above stacktrace is from our live application server
    while testing same project on our local system we are not getting too many open files exception but we are getting following ClassNotFoundException
    [11/30/05 17:11:42:797 EST] 0000004a SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'mainEdit.jsp' and IsEndUser=1
    [11/30/05 17:12:50:891 EST] 000001eb SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:17:40:828 EST] 0000008d SystemOut O AppURL is: http://www.VeroECert.com/Vero/indexU.jsp
    [11/30/05 17:17:58:141 EST] 0000008b SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:20:41:703 EST] 00000034 ServletWrappe E SRVE0026E: [Servlet Error]-[com.servlet.UserHelpServlet]: java.lang.ClassNotFoundException: com.servlet.UserHelpServlet
         at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.beans.Beans.instantiate(Beans.java:202)
         at java.beans.Beans.instantiate(Beans.java:63)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper$3.run(ServletWrapper.java:1384)
         at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1312)
         at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84)
         at com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:238)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2841)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
         at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    this error is occuring on concurrent clicks suppose three users click on same button then it is possible that one user gets correct output while other users experience this exception
    Also one more point we are not using web.xml for calling servlets we are directly calling it giving its full path.
    Thanks

  • Access denied error while writing a file to the file system - myfileupload.saveas() throws system.unauthorizedexception

    hi,
    as part of my requirement , i have to perform read and  write  operations of  few files [ using the file upload control in my custom visual web part] and on submit button click.
    but while writing these files - with the help of  fileupload control - and when i use  myfileupload.saveas(mylocation);
    - i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
    it throws system.unauthorizedexception.
    i have given full control on that folder where i was trying to store my attached files. and also  after following asp.net forums,
    i have added  iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
    but unfortunately  that didnt happen.
    also
    a) i am trying the code with runwithelevatedprivileges(delegate() )  code
    b) shared the drive within the  d :drive where i want o save the files.
    c) given the full privieleges for the app pool identity- in my case , its
    network service.
    the  other strange thing is that, the same code works perfectly in  other machine, where the same sp, vs 2012  etc were installed .
    would like to know, any other changes/ steps i need to make it on this  server, where i am getting the  error.
    help is  appreciated!

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • The report terminated with error:  REP-110: File test2. cannot be opened. REP-1070: An error occurred while opening or saving a document.

    Hi,
    I'm getting the below error for reports.
    The report terminated with error:
    REP-110: File test2. cannot be opened. REP-1070: An error occurred while opening or saving a document. REP-0110: File test2. cannot be opened. .
    When checked Environment using url 'http://host:port/reports/rwservlet/showenv?server=your_repserver_name"
    found below
    ==================================================
    Reports Servlet Environment Variables 11.1.1.4.0
    Security Mode Non-secure
    HTTP Environment Variables 11.1.1.4.0
    SERVER_NAME   09.14.4.41
    SERVER_PORT   8888
    SCRIPT_NAME   /rwservlet
    SERVER_PROTOCOL   HTTP/1.1
    SERVER_SOFTWARE   undefined
    GATEWAY_INTERFACE   undefined
    SERVER_PORT_SECURE   undefined
    ACCEPT   image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    REQUEST_METHOD   GET
    REMOTE_HOST   test-wam-app
    REMOTE_ADDR   09.14.4.41
    REMOTE_USER   undefined
    AUTH_TYPE   undefined
    PATH_INFO   showenv
    QUERY_STRING   server=RptSvr_test-wam-app_wamtest
    PATH_TRANSLATED   undefined
    CONTENT_LENGTH   undefined
    CONTENT_TYPE   undefined
    AUTHORIZATION   undefined
    USER-AGENT   Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3; MS-RTC LM 8)
    REMOTE_IDENT   undefined
    REFERER   undefined
    Oracle Reports Services - Servlet Environment Variables  Select to jump to the top of the page  Return to Top
    KeyMapFile   /u03/apptest/FMW_11.1.1/user_projects/domains/WamTest/config/fmwconfig/servers/WLS_REPORTS/applications/reports_11.1.1.2.0/configuration/cgicmd.dat
    DBAUTH   /u03/apptest/FMW_11.1.1/apphome/reports/templates/rwdbauth.htm
    SYSAUTH   /u03/apptest/FMW_11.1.1/apphome/reports/templates/rwsysauth.htm
    server   rep_wls_reports_test-wam-app_wamtest1
    DIAGNOSTIC   yes
    ERRORTEMPLATE   /u03/apptest/FMW_11.1.1/apphome/reports/templates/rwerror.htm
    SERVER_IN_PROCESS   yes
    COOKIEEXPIRE   30
    ENCRYPTIONKEY   reports9i
    DIAGHEADTAGS   undefined
    DIAGBODYTAGS   undefined
    HELPURL   undefined
    RELOAD_KEYMAP   undefined
    IMAGEURL   http://09.14.4.41:8888/reports/rwservlet 
    SINGLESIGNON   no
    Oracle Reports Services - Server and Engine Environment Variables  Select to jump to the top of the page  Return to Top
    PATH   /u01/wamtest/FMW_11.1.1/apphome/jdk/bin:/u01/wamtest/FMW_11.1.1/apphome/bin:/u01/wamtest/FMW_11.1.1/apphome/jdk/bin:/u01/wamtest/FMW_11.1.1/apphome/bin:/u01/wamtest/FMW_11.1.1/apphome/bin:/u01/wamtest/FMW_11.1.1/apphome/bin:/u01/java/jdk1.6.0_23/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    DISPLAY  
    LD_LIBRARY_PATH   /u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64/server:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/../lib/amd64:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64/native_threads:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64:/u01/wamtest/FMW_11.1.1/apphome/lib:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64/server:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64/native_threads:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64:/u01/wamtest/FMW_11.1.1/apphome/lib:/u01/wamtest/FMW_11.1.1/apphome/jdk/jre/lib/amd64/server:/u01/wamtest/FMW_11.1.1/apphome/opmn/lib:/u01/wamtest/FMW_11.1.1/apphome/lib
    ORACLE_HOME   /u01/wamtest/FMW_11.1.1/apphome
    TNS_ADMIN   /u01/wamtest/FMW_11.1.1/instance1/config
    NLS_LANG   AMERICAN_AMERICA.WE8ISO8859P1
    USER_NLS_LANG  
    RW   /u01/wamtest/FMW_11.1.1/apphome/reports
    REPORTS_PATH   /u01/wamtest/FMW_11.1.1/apphome/reports/templates:/u01/wamtest/FMW_11.1.1/apphome/reports/samples/demo:/u01/wamtest/FMW_11.1.1/apphome/reports/integ:/u01/wamtest/FMW_11.1.1/apphome/reports/printers:/u01/wamtest/FMW_11.1.1/instance1/reports/fonts:/u01/wamtest/FMW_11.1.1/apphome/reports/templates:/u01/wamtest/FMW_11.1.1/apphome/reports/samples/demo:/u01/wamtest/FMW_11.1.1/apphome/reports/integ:/u01/wamtest/FMW_11.1.1/apphome/reports/printers:/u01/wamtest/FMW_11.1.1/instance1/reports/fonts:
    REPORTS_TMP   /tmp
    REPORTS_TAGLIB_URI   /WEB-INF/lib/reports_tld.jar
    java.class.path   /u01/wamtest/FMW_11.1.1/apphome/reports/jlib/rwrun.jar
    sourceDir  
    tempDir  
    useDataCache  
    ignoreDataParameter
    =========================================================================
    ORACLE_HOME is on mount point u03, checked config.properties but no mention of mount point /u01.
    Dont know from where /u01 came. Could you please help me re configuring the env pointing to /u03.
    Reports server is up though without any issues.
    Regards,
    Djay

    Ensure that the report name is correct. Also ensure that the report exist in REPORTS_PATH environment variable. Otherwise run the report including the reports path.
    E.g.
    report=<reports directory>/test2.rdf

  • Error while trying access video file in KM Content

    Hi All,
    I are having an issue while trying to access video files located in KM.
    When we try to access the file we get and error : getting content of document failed: /usr/sap/pa8/SYS/global/config/cm/ep/content/73/47/6176162974773.CONTENT (no such file or directory)
    The file is a .wmv file and has a size of 49 MB. Whereas some other files of size 34 MB opens up with no issues.
    This is happening on production environment but the same works fine in pre prod environment.
    I am trying to access the file from Content Administration -> KM Content
    This issue is happening for multiple files of larger size in that environment. Please suggest how to rectify the issue.
    Regards,
    Somnath.

    Hi Somnath
    The issue you are facing is dealt in the below Note. Kindly check if you are at the specified SP and
    Patch level as per your Portal Version according to the note or not.
    1849886 - Content could be lost when using DBFS repository
    Regards
    Santarshi Samanta

  • Closing Console window while running Java application from Batch file

    Hi all,
    I have made a small application using Java swings,now i have made a jar file of my application and calling this jar file through batch file,when user clicks on that batch file it runs "java -jar applicationname.jar" command,but problem is that when i run that file from batch file it opens Dos console window at baclk of the screen which looks weird for a desktop application,i dnt want that Dos console window visible at the backend while my application is running,i have searched regarding this on google but found nothing usefull,if anybody can please help regarding that it will be a great releif for me,i have been stuck on this problem from last two days.
    Thanks.
    Simer

    warnerja wrote:
    georgemc wrote:
    warnerja wrote:
    start java -jar applicationname.jar
    That'll pop up another consoleI'm under the impression that the console window he is seeing is the one which cmd.exe opens when it is executing the batch file. And that batch file won't return until the java process has completed because he didn't start it in the background to let the batch file continue and terminate.
    So I don't think just simply substituting java with javaw will do much good either. Still think he needs a "start" command in that batch file.
    So now he can try:
    start java -jar ...
    or
    start javaw -jar ...Fair point

  • File Access with unsigned Applet through editing the java.policy file

    I'am starting to lose my hair on this...
    I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of the applet.
    first of all, if i wrote in the java.policy file
    grant {
      permission java.security.AllPermission; 
    };everything is working perfekt.
    But I have not the intention to open the gates for any applet out there, so i want to limit the access to my applet. With every of the following versions I get at best an
    java.security.AccessControlException: access denied (java.io.FilePermission...
    My Setup
    My Java Version: jre1.6.0_02
    My applet is located unter the url
    http://admin.mydomain.com/applet.jar
    In Html i tryed the following different versions of loading the applet - none worked
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet codebase="http://admin.mydomain.com" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
    <applet name="shortcut" code="start.class" archive="http://admin.mydomain.com/applet.jar" width="0" height="0"></applet>in java.policy i tryed following versions with every html applet load version
    grant codeBase "http://admin.x-press.de/-" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/+" {
      permission java.security.AllPermission; 
    grant codeBase "http://admin.x-press.de/applet.jar" {
      permission java.security.AllPermission; 
    };why is it with
    grant {
      permission java.security.AllPermission; 
    };working, and not with the other versions?
    i am almost bold now, please try to save my last hair from falling down.
    any suggestion would be nice
    thanks, feyyaz
    Message was edited by:
    feyyazdogu

    I read the mentioned documentation and your right, some of my versions were wrong, but after reading the doumentation again i came to following result which should had worked but didn't.
    java.policy
    grant codeBase "http://admin.mydomain.com/*" {
      permission java.security.AllPermission;
    HTML File
    <applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" height="0" width="0"></applet>if I am entering http://admin.mydomain.com/applet.jar i can download the jar, so the archive lays in the correct directory.
    what i am doing wrong? do i have to change an additional file somewhere else?

  • "java.io.IOException: Too many open files"  in LinuX

    Hi Developers,
    * I am continiously running and processing more than 2000 XML files by using SAX and DOM.....
    * My process is as follows,
    - Converting the XML file as Document object by DOM....
    - And that DOM will be used while creating log file report, that log file will be created after executing all XML files..
    * After processing approx 1000 files, it throws *"java.io.IOException: Too many open files" in LinuX system* ....
    * I have googled more and more in all sites including sun forum also, but they are telling only to increase the system config by ULIMIT in linux....If i increase that its executing well without exception........
    * My question is, Is it possible to do it by JAVA code itself or any other VM arguments like -Xms512m and -Xmx512m.....
    * Please let me know , if you have any idea.....
    Thanks And Regards,
    JavaImran

    Doh! I forgot to post my little code sample...
    package forums.crap;
    import java.io.*;
    import java.util.*;
    public class TooManyFileHandles
      private static final int HOW_MANY = 8*1024;
      public static void main(String[] args) {
        List<PrintWriter> writers = new ArrayList<PrintWriter>(HOW_MANY);
        try {
          try {
            for (int i=1; i<=HOW_MANY; i++ ) {
              writers.add(new PrintWriter("file"+i+".txt"));
          } finally {
            for (PrintWriter w : writers) {
              if(w!=null)w.close();
        } catch (Exception e) {
          e.printStackTrace();
    }... and the problem still isn't OOME ;-)
    Cheers. Keith.

Maybe you are looking for

  • Help! Poor performance/very slow in performing GR

    Hi, I have a production situation where the GR in the system is very slow. The moment "post" button was clicked, it takes approximately 25msec for the system to return the material document number. BASIS which showed that the kernel portion took up t

  • Character.digit(char, int) doesn't know the diff of 'a' and 'A'

    I did Character.digit('a', 16) and Character.digit('A', 16), and they both gave me 10. Is there a function that can decipher between capitals and lowercase. I am trying to create a random sequence of characters...and I can't seem to figure out a good

  • CUSTOMER MASTER SCREEN  RELATED TABLES..

    HI I WANT TO KNOW ABT ALL THE TBALES  RELATED TO CUSTOMER MASTER (XD01 )APPLICATION..  WHEN EVER WE CREATE A CUSTOMER THROGH THIS SCREEN  THAT DATA WILL STORE INTO SOME TABLES.. WHAT  ARE THOSE TABLES..(FOR EXAMPLE: KNA1 ,ect..) like this.. what are

  • Looking of tip on nested select statments

    Hi -- I am trying to count the distinct value of field in the table, but when processer get to this line and (b.emplid = z.emplid). It gives me error invalid table name. I used the z as an alias for the selection... would you please tell what I am do

  • Calculating reference based sum in variety of tables

    Hello there. Can anybody tell me if there is a way to calculate reference based sum in variety of tables? For example - I've got a sheet with some tables in it. There are header row and header column in each table. Each header column contains various