Updating a JAR file in a shared folder

Hi,
I have a JDK 6 Swing app running in a Windows Terminal Server. All users share the same JAR file. I start it using a bat file something like this:
start /b c:\progra~1\java\jre\bin\javaw -jar gestor.jarAll works fine when users share the same JAR.
However, when I try to update JAR file to a new version, "sometimes" (not always) when there are some users with JAR file running by JVM, it occurs some strange behaviours with the app, errors like JVM would become lost/crazy with a JAR in RAM and other JAR in disk.
Is not this a good approach to update the app? Is it better to disconnect all users before update app?

I don't know what SUNs policy on this is. But if I were you, I'd create a link (shortcut in windows) to the JAR file, and when you have a new version, put it in the same folder as the previous release, but with a different name, and update the link/shortcut. Users should only know about the link/shortcut. Depending on the behaviour of the windows shortcut, users using the JAR file will still use the old file as you update the link to point to the new file. Feasible?

Similar Messages

  • Java Applets cannot work in IE when PAC file is in shared folder

    I have a PAC file (proxy auto config) residing in a shared folder, i.e. \\fileserver\share\proxy.pac. My IE and firefox is configured to point to the PAC file. Java applet is working fine in Firefox but fails to run in IE.
    From the Java console, the applet seems to be trying to access the internet via DIRECT connection. The applet works properly when I configured IE to point to a PAC file in a web server, ie http://webserver/proxy.pac or in the local drive, ie file://c:\proxy.pac. My objective is to configure IE to point to a PAC file in a shared folder and make it work. Can anyone help?
    Below are the logs from both IE and Firefox Java Console (thrimed):
    1) IE:
    Java Plug-in 1.6.0_13
    Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\xxx
    network: No certificate info for unsigned JAR file: https://internet-banking.dbs.com.sg/IB/Login2.jar
    network: Cache entry found [url: https://internet-banking.dbs.com.sg/IB/Login2.jar, version: null]
    network: Connecting https://internet-banking.dbs.com.sg/IB/Login2.jar with proxy=DIRECT
    network: CleanupThread used 299461 us
    network: Connecting http://internet-banking.dbs.com.sg:443/ with proxy=DIRECT
    network: Connecting https://internet-banking.dbs.com.sg/IB/Login2.jar with proxy=DIRECT
    network: Connecting http://internet-banking.dbs.com.sg:443/ with proxy=DIRECT
    java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
         at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
         at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
         at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
         at sun.misc.URLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getResource(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    network: Connecting https://internet-banking.dbs.com.sg/IB/Login2.jar with proxy=DIRECT
    network: Connecting http://internet-banking.dbs.com.sg:443/ with proxy=DIRECT
    2) Firefox:
    Java Plug-in 1.6.0_13
    Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\xxx
    network: No certificate info for unsigned JAR file: https://internet-banking.dbs.com.sg/IB/Login2.jar
    network: Cache entry found [url: https://internet-banking.dbs.com.sg/IB/Login2.jar, version: null]
    network: Connecting https://internet-banking.dbs.com.sg/IB/Login2.jar with proxy=HTTP @ mocwsg01.m1.com.sg/10.33.90.91:8080
    network: CleanupThread used 306588 us
    security: Loading Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
    security: Loaded Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
    security: Loading SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
    security: Loaded SSL Root CA certificates from C:\Program Files\Java\jre6\lib\security\cacerts
    security: Loading Deployment SSL certificates from C:\Documents and Settings\xxx\Application Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loaded Deployment SSL certificates from C:\Documents and Settings\xxx\Application Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment denied certificate store
    network: ResponseCode for https://internet-banking.dbs.com.sg/IB/Login2.jar : 200
    network: Encoding for https://internet-banking.dbs.com.sg/IB/Login2.jar : null
    network: Disconnect connection to https://internet-banking.dbs.com.sg/IB/Login2.jar
    basic: Applet loaded.
    basic: Applet resized and added to parent container
    basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 1677884 us, pluginInit dt 1844261 us, TotalTime: 3522145 us
    basic: Applet initialized
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@15ee671
    basic: Applet made visible
    basic: Starting applet
    basic: Applet started
    basic: Told clients applet is started

    Did you ever resolve this issue ? We have recently moved from a http based pac file to using file://netlogon share/proxy.pac. Recievng similar errors as you describe with various applets. Seems to work ok when using the same pac file launched by http rather than file. Seems to be various BUG's marginally related to similar issues but nothing to confirm that its a real problem.
    Be great if anyone has an answer to this.
    Thanks

  • Error while updating a jar file

    I am trying to update a jar file using teh following command
    jar -uf project.jar fileMy.prop
    however while doing that i get the following error
    java.io.IOException: Error in writing existing jar file
    at sun.tools.jar.Main.run(Main.java:179)
    at sun.tools.jar.Main.main(Main.java:904)

    Perhaps some process (your java program perhaps) is still running that has the file open still? You'll need to shut down the process(es) that have it open. Or you don't have proper rights to the directory/file. Not a java issue.

  • How to upload a text file from a shared folder and provide an o/p

    how to upload a text file from a shared folder and provide an o/p  containing the details in each order in the text file

    Hi,
    Use <b>GUI_UPLOAD</b> to upload a text file from a shared folder.
    Use <b>GUI_DOWNLOAD</b> to download data in a file on the presentation server or use <b>OPEN DATASET, TRANSFER</b> and <b>CLOSE DATASET</b> statements to download data to the application server.
    Now, I hope the code for data fetching, if required, is already present in the report.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • All files in a shared folder don't have permissions

    I have two users on my mac and am having some issues with sharing files.  I created a shared folder and gave the other user read/write permissions.  When I log in as that user, the folder can be accessed, but some of the files in that folder cannot be accessed.  These are all photos, and for the most part I'm dropping them into the shared folder from iPhoto. 
    I tried it again by using the Public folder with the same result.  However, there isn't consistency with the actual files that don't have permission.  In other words, the shared folder I created may have a file that does not have permission, but that same file does have permission when I dropped it in the Public folder.  So it is totally random as to which files in the shared folder don't have permission to be accessed. 
    I also tried to simply drag the files to the other user.  Same result. 
    Can anybody help me with this?  I'm stumped as I thought once a folder was shared that all contents are accesible.

    Sharing a folder does give others access to it, but it does not change the permissions of the files inside.  Other users can probably read everything, but they can't modify files that they do not own unless the owner of those files has changed the permissions to allow it, or other steps have been taken to provide additional access such as the use of an Access Control List (ACL).
    Apple doesn't include a GUI utility for manipulating ACLs, so your choices are to use a third-party utility such as TinkerTool System (not free) or the Terminal application.  The Drop Box folder in your user's Public folder has an ACL entry that gives access to change just about everything on files that are dropped there, so a Terminal example that sets similar permissions for everyone (a particular user group can also be used) would be:
    1.  copy and paste the folowing into the Terminal window (there is a trailing space):
    chmod -R +a "everyone allow list,add_file,search,delete,add_subdirectory,delete_child,chown,file_inherit,directory_inherit"
    2.  drag the desired folder into the Terminal window (this copies the path)
    3.  press return
    Note that ACL entries only work on items that have been created in the folder - not moved there - so you should use option drag to make a new copy in the shared folder.

  • How can i add update signed jar file

    I am developing an applet which requires signing to run in a browser.
    I am developing supporting classes. But these class files have to be added
    to the jar. Isnt it??
    But to test the applet i need to load it in the browser each time i modify the class files. So the jar file need to be updated every time. But an
    IOError
    is being displayed when i try to update the signed jar file.
    How can i update signed jar file?? Or is there any othe way to test the signed applet during development??

    How can i update signed jar file?You can't, the signature is there to make sure the content of the jare hasn't been messed
    with.
    Either recreate the jar and re sign it or set up a policy during testing.

  • Transfer of file to a shared folder on remote machine

    Hi,
    I want to transfer a file present on windows machine A to a shared folder (\\16.192.54.56\Test) on machine B having ip as 16.192.54.56, using java.
    I tried using the renameTo api of File class but its not helping. It gives permission denied exception. I am able to open the shared folder from machine A using the shared folder path (\\16.192.54.56\Test) through the run command. So, that means there is no permission issue on the shared folder.
    Could anybody please guide me as to how can i resolve this issue.
    ~Brij

    Hi,
    Please pardon me for not providing the complete information.
    I have kind of root caused the issue. Let me explain the issue in detail.
    I have a logic to move a file to a shared folder on remote machine, inside my application running on a different machine. Now when i run my application using
    command prompt, the logic of moving the file to the shared folder works fine.
            try
                File fDest = new File(""\\\\15.154.52.100\\TestDir\\test");
                File fSrc = File.createTempFile("testExport", "txt");
               final int BUFFER = 2048;
               InputStream in = new FileInputStream(fSrc);
               OutputStream out = new FileOutputStream(fDest);
               // Transfer bytes from in to out
               byte[] buf = new byte[BUFFER];
              int len;
              while ( (len = in.read(buf)) > 0)
                  out.write(buf, 0, len);
              in.close();
             out.close();
             fSrc.delete())
            catch (Exception ex)
                ex.printStackTrace();
    {code}
    But when i run my application as a windows service, the logic does not work.
    I noticed that when we run our application as windows service, the owner of JVM is System and it looks like it will not have Network access permission.
    But, when we run our application through command prompt or as a standalone application, then the owner will be the user who started the application. This user will have the Network access permission.
    Please correct me if the above assumption is correct. If this is the case then how can i make my application (running as windows service), to have network access permission.
    ~Brij                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem in updating a jar file

    Hi ...
    Anyone help me for updating a jar file in windows.
    I am updating a jar file Using Runtime.exec() method.. But it shows an error like this:
    java.io.IOException: Error in writing existing jar file
    at sun.tools.jar.Main.run(Main.java:198)
    at sun.tools.jar.Main.main(Main.java:1022)
    I am using jdk1.6 and ant tool for build.

    Stick to your old thread please.
    [http://forums.sun.com/thread.jspa?threadID=5320704&messageID=10371347#10371347]
    I'll delete this one soon.

  • Read text file in a shared folder in another PC

    Hi All,
    Is it posible to use OPEN DATASET, READ DATASET, CLOSE DATASET to read a text file in a shared folder in a another PC (Not the Application server)
    Pradeep

    Hi pradeep,
    1. Normally any PC is restricted by username and password,
      and it may happen that folders / files are not shared on that machine.
    2. So there are two approaches, if we want to use
      OPEN DATASET commands to read file from other machine.
    a) Basis team will MAP that computer and folder
        on the application server
        at the OS Level (Unix/AIX/Windows etc)
        and that logical drive+path we can in our abap syntax
        just like we use other normal path on application server.
       This may also require the basis team to know
        the username and password of other computer for mapping purpose.
    b) Another approach is we use FTP_OPEN function modules
        and other related FTP_* Fms.
       But the pre-requisite for this is that the FTP server
        should be running on the other computer.
       Also we should know the ftp username and password for it.
    regards,
    amit m.

  • Executing a jar file from an arbitrary folder

    I got a small problem in detemining the path of my application's jar file. I am starting the application by executing a batch, lets say MyApp.bat (using it on windows and unix), this batch file consists of one line 'java -jar MyApp.jar', MyApp.jar being in the same folder.
    Now lets say MyApp.bat and MyApp.jar are in folder 'A' and my current working directory is a parallel folder 'B', so I can invoke the batch file from there(!) by executing '../A/MyApp.bat'. But now the VM tries to find MyApp in the current working directory which is still 'B' and not 'A'. A simple solution would be to use a script which determines the directory of MyApp.jar and include the generated path in the call to the VM (I didn't try yet, but I guess this will awkward doing it on windows)
    Since I don't think I am the first person executing a java program via a script from an arbitrary folder in a file system, I hoped that there might be a more elegant way. Unfortunately I couldn't find another solution yet.
    Regards,
    Stefan

    In MyApp.bat your line should read (NT/2K/XP/2003/Vista):java -jar "%~dp0MyApp.jar"Regards

  • File copy from SHARED folder to Application server

    Hi
    I have a file which is in a shared folder. My requirement is to copy this file into the application server.
    The function module C13Z_FILE_UPLOAD_BINARY is working fine with local files. But I could not use it to copy the file in shared folder.
    Please help me out.
    Points will be awarded for sure !!
    Thanks

    hi,
    use OPEN DATASET ... TRANSFER ... CLOSE DATASET to transfter the data on to the required file path ... else use transaction
    CG3Z - to upload file from presentation server to application server.
    Regards,
    Santosh

  • Encrypting A Single File in a Shared Folder

    Hello all.
    I would like to encrypt a single file to place in my shared folder for my wife to access.
    Is there a way to do this?
    Thanks in advance!

    An encrypted disk image should do it - see http://docs.info.apple.com/article.html?artnum=107333

  • Updating a jar file

    I am using the following ant file in eclipse to build jar files when I ask the project to be built
    <project name="atg" default="create-jar">
        <target name="create-jar">
            <jar jarfile="${jarlocation}/classesDAS.jar">
                <fileset dir="WebContent/WEB-INF/classes" includes="**/*.class"/>
                <fileset dir="WebContent/WEB-INF/classes" includes="**/*.properties"/>
            </jar>
        </target>
    </project>Is there a possibility that I modify this file to rather update jar files rather than creating new ones??????

    Something did occur to me.... If you use update, then
    presumably Ant works by taking newer/modified files
    that have timestamps after the modified time of the
    Jar... IF you were to move things around to other
    packages, or directories for non-class files, in your
    development process, then you could end up with
    duplicate items in different locations in the Jar,
    which could lead to hard to find bugs later if you
    forgot to update the paths elsewhere, or end up
    updating the wrong files. So IMO, it's safer all
    around to just let it create a new Jar so that it's
    always clean.Thanx all of you for taking out some time to advise me. I really appreciate that. The reason I am more interested in update is because of the situation I am trapped in. We are using a third party API to talk to the oracle database. Though I personally would prefer using JDBC myself but here I have no choice as its a decision made at much higher levels. Now there are advantages with this API that it maintains a cache and you donot have to do SQL queries all the time, but I was having problem since a few days as it would not always provide me with the right results. Since I was the one assigned to look into it I decided to decompile some of the classes and put them into a project in WSAD/Eclipse. Now there are thousands of classes in this jar file and I donot want to decompile all of them and add them to the project what I was wondering was to add this ant script to the project file add some debug statements and hopfully it would change only the files I want it to rather than creating a new jar file with just 10 files rather than all of them. This was the background of my question. So what do u suggest now. I donot want to do jar -uvf after moving class files everytime I compile thats why I wanted to use ant.

  • Can not edit file on network shared folder after upgrading to windows 7

    Merry Christmas and happy new year,
    Due to some configuration changes on a specific application, I have forced to upgrade OS of a few number of workstations from Windows XP to windows 7. After upgrading I am facing a strange problem on WIN7 workstations. These workstation are member of a Windows
    2008 R2 Active Directory domain which also has a Windows 2003 advanced server additional domain controller. Also there are a number of shared folders on some member servers (all windows 2003) which are mapped as network drives at user logon. Before upgrading
    mentioned workstations to WIN7, users was able to edit his/her files on all of mapped network drive according to his/her permissions without any problem on their WINXP workstations, But after installing windows 7 they begin facing problem on one of these mapped
    network drives and the problem exactly is when they edit a file, in more specific word an excel file, and then try to save, the excel returns an error message of "document not saved" and exit the excel program. It becomes more strange when you learn
    that the edited excel file is disappeared and replace with some "tmp" file. If user copy the excel file to his/her own desktop, edit it and then copy it back to its original place on mapped network drive, it will be replaced normally with its older
    version. In other words if user wants to edit an excel file on that specific network drive, he/she must edits it somewhere else and then replace it on the network drive. If the same user uses a WINXP box, there will be no problem.
    Can anybody help me to fix the issue?
    TIA
    Bijan

    Thank you Karen,
    The problem is fixed, but my case was none of what you suggested. In fact I have
    another problem which I described in another question and it was of the root of this excel file issue. I describe what I have done to fix the latter problem hope to help fixing similar issues to mine.
    Okay, as it is described in the
    question, I was not able to open a shared folder with its UNC address while it could be mapped as a network drive without any problem. I examined what I was replied and some other ways, came to no result. I decided investigate a similar shared folder in
    permissions to problematic one to see if the problem is repeated. So I created a folder and shared it with similar permissions and examined it. Surprisingly there was no problem. It was wise to remove sharing of the problematic folder and share it again to
    see if the problem resist. But when I tried to remove sharing I received an error message saying that
    the shared folder is related to a DFS root. When I took a look at the DFS roots of domain there was no sign of the problematic folder (that made me recall that I created a DFS root with problematic folder mistakenly and removed that DFS root).
    After little searching, I found out that the problem could be caused by traces of the removed DFS root. Yep! I found the suspect! The registry key
    HKLM\Software\Microsoft\DFS\Domain\problematic shared folder. I removed the key restarted DFS service and log off and on and Bingo!
    This problem pops up a few more questions:
    1) Why is not the registry key related to removed DFS root deleted from the registry of windows 2003 server?
    2) Why was I able to browse this ex-DFS root shared folder without any problem in windows XP while it was problematic in windows 7?
    3) As there is no special client service for DFS and user can access DFS root targets like other shared folders what is the deference between shared resource access mechanisms in windows XP and windows 7 that caused the problem?
    Bests,
    Bijan

  • How do you get a new file in a shared folder to inherit permissions

    I have a shared folder that I share with a co-worker and having trouble with the permissions for new files/folders.
    When he creates a new file or new folder, the permissions for that file/folder are set as read only for myself. The parent shared folder is set at "Read/Write" for both of us.
    Is it possible to control the permissions for new files/folders?

    Actually, that property used to go in the entry for that sharepoint in the "NetInfo" database, and really only worked properly when 'afpuse_parentowner' was also set. The .plist file controls the behaviour of the afp server as a whole, not that of individual share points.
    I'm not sure what the "DirectoryService" equivalent is - a lot of the things have similar names but differ in "case", but some things are completely different or absent.
    Unfortunately, I'm not equipped to test these things myself but changes can be made using 'dscl', or possibly by editing the flat files directly in a manner similar to what is described here:
    http://www.macgeekery.com/hacks/software/netinfo_dead

Maybe you are looking for

  • How to push idoc from r/3

    how to push idoc from r/3

  • Import MBOX

    Hi I recently migrated from Windows 7 to Mac. I used Migration Assistant to migrate all data including Mails (I used Outlook earlier). After migration, I wanted to use Outlook again in Mac but realised that all my mails have been included in the defa

  • Quantifying results of QoS

    I'm testing QoS in our environment and want to be able to show management some hard results of the QoS configuration. I'm trying a simple test of uploading a large file from site A to site B, and during this period of congestion am pinging a host tha

  • How can I draw a image in transparent mode

    I write a applet which derived from JApplet. I want to draw a icon on It's content panel transparently, but it seems that ImageIcon can't handle *.ico. What should I do?

  • Can I import contacts to outlook for mac with iphone?

    Can I import contacts to Outlook for Mac using my iphone?  I turned on sync in outlook and in itunes, but still not syncing.