Overwrite class file that launched app?

Here's a wacky one for you:
I have a single bootstrap class file residing on customers' machines that launches a remote application. This bootstrap class file cannot be updated or changed directly. The only hope for making any changes to it is to have the remote application it launches update it.
In more general terms, there is a Java class file X (with a main method) that launches remote Java application Y (in a jar file at a URL). Is it possible for application Y to overwrite the contents of class file X on disk?
I realize that deploying a file that could not be easily changed was STUPID, STUPID, STUPID, but that is the situation I am now facing.
Thanks for any help,
Steve C.

> Then as you indicate, the program was designed
incorrectly and you want to find a way to make it work
without re-designing it. So are you saying you want
to fix a bug that's in a piece of code, but without
changing the code? Doesn't make sense does it?Everything in the system is updatable except for that one file. That file was designed incorrectly and needs to be redesigned. So at this point I need to use the parts of the system that can be updated to update that one file that is difficult to update. Whatever mechanism that is used to change that file must run that file as it << currently is >>, and that is why I cannot use Runtime.exec().
Thanks for your input,
Steve C.

Similar Messages

  • How can I make an ant file that launches an AS project app in a debug flash player that traces to the flex console?

    How can I make an ant file that launches an AS project app in a debug flash player that traces to the flex console?
    Basically I like the control over the compiling process that I get by using Ant - but I really want traces to come up immediately without having to switch contexts.
    I have an ant file that successfully launches a swf in the flashplayer - but I don't know how to make the flex console start displaying the trace output. I assume that I will have to point it to the appropriate trace output file - but I am not sure how to have ant even address the console.  Is this possible?
    Here is the the target node from my ANT file:
        <target name="launch">
            <exec executable="${FLASHPLAYER_EXE}" errorproperty="trace.output">
                <arg line="'${DEPLOY_DIR}\test.swf'" />
            </exec>
        </target>
    Thanks for any thoughts, or alternatives!

    For the record, I ended up using Logwatcher - it worked perfectly.
    http://graysky.sourceforge.net/

  • In which directory should i keep java class files in oracle apps

    hi
    I have one problem, In which Top & directory should i keep java class files in oracle apps
    krishna

    Hi
    By itself its available in oracle\visappl\au\11.5.0\java\
    thats were the location needs to be placed in the apps.zip.
    Thanks
    Riyas

  • Overwrite class files

    Hi all;
    I have a question about the class files. Let's say that I have some errors when I compile the code. I make the corrections and recompile the code again. However, for some reason the new class files are not overwriting the previous ones.
    Therefore every time I compile the code I have to go to the file manager and delete the old class files.
    I am sure this a very basic problem. Has anybody got an idea. Is is because of the class path?
    Thanks in advance

    Thats queer... if the class is an applet then it could be that the JVM has not loaded the updated version. I know that when I make applets, I have to close all the internet windows usually to shut down the java plugin console and jvm. Then I recompile with my changes and then reload the applet, it's a slow process, but it works.
    In the case of a regualar Java program I'd suggest checking out settings in Windows, as javac.exe replaces without notice or conformation on its own. Or maybe the files are going somewhere else? Anyways, that sounds more like a Windows setting thing if it's doing it with an application.

  • I would like to know how I might find the OSX 10.9 Install file that the app store put on my hard drive.  Any help is greatly appreciated in advance.

    The app store download is so slow at my house that I don't want to do it more than once and I don't see the file anywhere, even looked for hidden files.  But Directory structure is dense and I surely haven't looked everywhere yet. 
    I would like to archive it on media that is physically independent of my mac.
    Any help is greatly appreciated in advance.

    You can make a bootable USB stick to install using this free program.
    Bootable USB Flash Drive – Diskmaker X

  • Server allows overwriting files that are open by other users.

    We're having a problem with Snow Leopard Server not warning a user when they attempt to overwrite a file that is open by another user.
    Running Snow Leopard Server 10.6.8 on an Xserve with an Xserve RAID. Have about 25-30 Mac clients, running 10.6.8 or 10.7.3. Users running Adobe CS5.5
    Here's the scenario:
    User edits a file in InDesign, then saves a PDF of that file to the server. The user's supervisor reviews the file, and perhaps adds comments to it, but not necessarily.
    The user edits the ID file again, and saves a new PDF over the old one. When we were running Server 10.4.x, the user would have been warned that the PDF file was open by another user, and would have been prevented from saving. Under SL Server, no warning takes place, and the file is overwritten.
    At this point, a couple of things can happen.
    1: The new file is written, and the changes can be seen by the user. The supervisor's computer does not see the new version of the file. Quicklook and opening the file into Acrobat 10 will still show the old file. Disconnecting and reconnecting fixes this.
    2: The new file is written, but it is corrupted, and not openable by either party. If neither one opens the file right away, this could go unnoticed.
    I've tested this scenario between two Lion machines, and the "file-open" warning occurs like it should.
    Is there a setting in SL Server that I need to look at, or is this a bug?
    Our short-term fix is to have the user always save to a new filename. This can work, but it's cumbersome.

    We're having a problem with Snow Leopard Server not warning a user when they attempt to overwrite a file that is open by another user.
    Running Snow Leopard Server 10.6.8 on an Xserve with an Xserve RAID. Have about 25-30 Mac clients, running 10.6.8 or 10.7.3. Users running Adobe CS5.5
    Here's the scenario:
    User edits a file in InDesign, then saves a PDF of that file to the server. The user's supervisor reviews the file, and perhaps adds comments to it, but not necessarily.
    The user edits the ID file again, and saves a new PDF over the old one. When we were running Server 10.4.x, the user would have been warned that the PDF file was open by another user, and would have been prevented from saving. Under SL Server, no warning takes place, and the file is overwritten.
    At this point, a couple of things can happen.
    1: The new file is written, and the changes can be seen by the user. The supervisor's computer does not see the new version of the file. Quicklook and opening the file into Acrobat 10 will still show the old file. Disconnecting and reconnecting fixes this.
    2: The new file is written, but it is corrupted, and not openable by either party. If neither one opens the file right away, this could go unnoticed.
    I've tested this scenario between two Lion machines, and the "file-open" warning occurs like it should.
    Is there a setting in SL Server that I need to look at, or is this a bug?
    Our short-term fix is to have the user always save to a new filename. This can work, but it's cumbersome.

  • Access JAR File while running App with Java Web Start

    Hello guys,
    I want to delpoy my application so that I can run it when I click on the appropriate button in a web page.
    I have a Jar file for all the files that the app needs. No, not all of the files are included.
    Indeed, I use JAR files such jdom.jar or postgres...jar that I must use in within my application.
    How can I access these JAR files knowing that I can't point to files in a JAR file A from within a JAR file B, if the JAR file B contains the JAR file A?
    The main JAR file that I put on the web server can be seen as the JAR file B and the other JAR files must be stored somewhere for the java classes within the main JAR file to have access to them.
    I wonder whether there is another way to structure the project.
    Thanks.

    Hi Andrew.
    I have followed your suggestions and here is what my .jnlp file look like:
    <tt>
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/koedops" href="beta.jnlp">
         <information>
              <title>KOEDOPS</title>
              <vendor>Pr. Fischer</vendor>
              <homepage href="http://localhost:8080/" />
              <description>Downloading koedops with Java Web Start</description>
         </information>
         <resources>
              <j2se version="1.6+" />
              <jar href="beta.jar" main="true"/>
              <jar href="jcalendar-1.3.3.jar" />
              <jar href="jdom.jar" />
              <jar href="postgresql-8.4-701.jdbc4.jar" />
         </resources>
         <application-desc main-class="general.Application" />
    </jnlp>               
    </tt>
    The three other jar-files reside in the same directory as the .jnlp file and the beta.jar file on the tomcat server.
    When I launch the application though nothing happens upon the download. In contrast, if I change the main class to a class file that requires no extra library, it runs perfectly.
    I can't be sure whether the jar-files are successfully accessed.
    Regards.
    Edmond

  • How to use/call .class file in jdeveloper

    I have a .class file that is run as part of cron job on the UNIX server. It has three parameters - so the call goes something like this java exampleClass1 param1 param2 param3.
    I need to import it into my Jdeveloper project so it can be called from a web application. Please help.
    I tried importing the directory as a library(was I supposed to jar it first?) and updated classpath to use the directory with this class file too. But in my code...how do I call exampleClass1?

    If the exampleClass1 does have a public method which is called from the main method, when you run it from the command line
    should work like this
    // sample class
    public class ExampleClass1
        // C'tor
        public ExampleClass1 ()
        public void testmethodWith3Params(String aS1, String aS2, String aS3)
            // do the work here
        public static void main(String[] args)
            String p1;
            String p3;
            String p3;
            ExampleClass1 xyz = new ExampleClass1();
            // read the params into p1,p2 and p3
            // omited the code
           // call the worker method
           xyz.testmethodWith3Params(p1,p2,p3);
    // now instead to call the main method you call the workter methos from your web app like
    ExampleClass1 aaa = new ExampleClass1 ();
    aaa.testmethodWith3Params(param1, param2,param3);
    ...If you don't have a method (or don't know it) you can call it via the main method like
    String [] param= {p1,p2,p3};
    ExampleClass1.main(param);Timo

  • Where to keep the java class file which is being used from a form?

    Hi,
    Actually I am developing a form which has a bean area and the data will be displayed in the bean area in the form of grid. And I will register this form with apps and will run the from Oracle apps. I want to know that there is a java class file that is being refered by the form, where should this java class file be placed and is there any other places where any changes are required so that the form runs correctly from the Oracle apps and can find the java class file.
    I am very thankful to each and everyone who will be able answer this question of my.

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • Java class files location of OSB resources

    What is the location of the java class files that get generated when OSB project/resources are deployed to the server ?

    Hi Lisan,
    Which version are you using? Folder strucure differs for 11i and R12 versions.
    All the class files will be placed under the JAVA_TOP folder. From there you have to follow your package structure. Here it is oracle/apps/xxogl/f04/cp/file
    HTH,
    Syed.

  • Can we make the .class file into executable one? Urgent

    I just made some java programs, which consist of some GUI and robot, and I need to make them into executable file, mean .exe file. From this forum, there was a suggestion to use Excelsior JET that can make .class files into .exe files.
    and when I tried to use the program, it did the job well, but when I try to put the .exe file into another PC, it can not run as if I run it on the system that I made the .exe file.
    Is there anyone experience this before? is there other solution? and is the the .exe file that has just been generated already include all .class file that are needed by the main .class file that has been converted into .exe?
    Thnks for the helps...

    It is sort of possible.
    A good way of doing this is to use an application called Install Anywhere. With this, you can create an installation file for your application, and it does create an executable. Ive used this a few times myself, and it is really easy to use.
    I think another app to do this is one called JToExe (i think), and this basically creates an executable.
    I hope this helps,
    Osh

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • How to load a .class file dynamically?

    Hello World ;)
    Does anyone know, how I can create an object of a class, that was compiled during the runtime?
    The facts:
    - The user puts a grammar in. Saved to file. ANTLR generates Scanner and Parser (Java Code .java)
    - I compile these file, so XYScanner.class and XYParser.class are available.
    - Now I want to create an object of XYScanner (the classnames are not fixed, but I know the filename). I tried to call the constructor of XYScanner (using reflection) but nothing works and now I am really despaired!
    Isn't there any way to instantiate the class in a way like
    Class c = Class.forName("/home/mark/XYScanner");
    c scan = new c("input.txt");
    The normal call would be:
    XYLexer lex = new XYLexer(new ANTLRFileStream("input.txt"));The problem using reflection is now that the parameter is a ANTLRFileStream, not only an Integer, as in this example shown:
    Class cls = Class.forName("method2");
    Class partypes[] = new Class[2];
    partypes[0] = Integer.TYPE;
    partypes[1] = Integer.TYPE;
    Method meth = cls.getMethod("add", partypes);
    method2 methobj = new method2();
    Object arglist[] = new Object[2];
    arglist[0] = new Integer(37);
    arglist[1] = new Integer(47);
    Object retobj = meth.invoke(methobj, arglist);
    Integer retval = (Integer)retobj;
    System.out.println(retval.intValue());Has anyone an idea? Thanks for each comment in advance!!!

    Dump all of your class files into a directory.
    Use the File class to list all files and iterateover
    the files.NastyNot really, when you are dynamically creating code, I would expect the output to be centralized, not spread out all over the place.
    >
    Use a URLClassloader to load the URL that isobtained
    for each file with file.toURI().toURL()(file.toURL()
    is depricated in 1.6)Wrong, the URL you give it must be that of the
    directory, not the class file.No, I did this quite recently, you can give it a specific class file to load.
    >
    Load all of the classes in this directory, thatway
    any anonymous classes are loaded as well.Anonymous classes automatically loaded when the real
    one isIt can't load it if it doesn't know where the code is. Since you haven't used a URL classloader to load once class file at a time, you would never encounter this. But if you loaded a class file that had an anonymous classfile it needed, would it know where to look for it?
    >
    From this point you should be able to just get a
    class with Class.forName(name)No. Class.forName uses the classloader of the class
    it's called in, which will be the system classloader.
    It won't find classes loaded by a URLClassLoader.got me there.

  • Class file location

    I am not sure if this would be an admin type question but
    here goes:
    I have a Coldfusion 6.1 server riding on Weblogic 8 ish and I
    am trying to do a small java example... *sigh*
    I am getting a "class not found" error and so I went looking
    for my classpath, since it didn't seem to be what was default in
    the documentation. *sigh*
    So I find that it is defaulting to .jar files and no
    directories. I can see that there are class files that are out in
    our coldfusion land so how does it see these? I am pretty ignorant
    of weblogic. I was curious how they can be reading the files, if
    they are, when the paths that I see only point to jar files. So, no
    explanation is too simple, please use small words and type slow for
    me. How should/do I change the path since I have to change it in
    Weblogic not CF admin. Is there some kind of default folder I am
    missing? I even tried adding my class to cfclasses under the cf
    file directory. Any help (and I need a lot) would be greatly
    appreciated.
    Thank you in advance for your infinite patience and any help
    you can provide!!!
    ~Va :-)

    I f you want to try the jar method, here's a quicky on how to
    jar up your file as a package.
    in a work folder, create a folder structure for your package,
    convention uses reverse internet domain (i.e.
    com.adobe.packagename)
    for this one, we'll use a simple one level package called
    ironyx. So create a folder called ironyx.
    copy the java file you want to package up into the ironyx
    folder
    at the top of the java file place the following;
    package ironyx;
    Compile the java file.
    Using a command prompt in the parent folder of the ironyx
    folder, type the following;
    jar -cf ironyx.jar ironyx
    This will jar up the ironyx folder contents, including both
    the java and class files into an ironyx.jar file. You can delete
    the source java files prior to creation of the jar file if you
    wish.
    Copy the jar file to ColdFusion WEB-INF\lib directory, bounce
    the cf instance
    A typical cf execution might look like
    <cfset mySimpleMath=
    CreateObject("java","ironyx.SimpleMath")>
    <!--- Usually you Initialize the object, but that depends
    on the constructors of the class--->
    <cfset mySimpleMath.init()>
    <!--- Execute the method --->
    <cfset result = mySimpleMath.addNumbers(num1, num2)>
    Note: If you're using the SimpleMath class file from
    http://builder.com.com/5100-6370-5177283.html,
    they have a text formatting error for the method. There should be
    spaces in publicintaddNumbers and it should look like
    public int addNumbers

  • Class file missing from war file deployment

    I have a web application that is being deployed to a war file. I have deployed several times successfully. Then with the latest changes, there is a class file that does not get included into the war file. It does get compiled and does exist in the project directory.
    The class file is in a seperate project from the project where the war file deployment profile is; however both projects are in the same workspace.
    There are several other classes in the project that contains the missing class file that does get included in the war file. I don't see anywhere in the profile where these files are selected individually.
    I'm at a loss as to how to fix this problem other than add the file after deployment.
    Appreciate any help or ideas...
    Keith...

    Hi Keith,
    You may want to follow this thread....
    class object missing from ear file
    Brigette

Maybe you are looking for

  • IPhoto responds very slowly.

    iPhoto responds very slowly. I presume is because the application "faces" who is on. how off faces

  • Error when calling procedure from application proces

    I've installed the doclib packaged application on a fresh 10g install (with HTTP Server). everything works fine, except when I want to 'view' a document: You don't have permission to access /pls/apex/P******O.get_doc on this server Oracle-Application

  • Update 5.0.1 nothing works

    After Update to 5.0.1 notning works... Tried to boot to pad, still nothing works "Settings" and other standard Buttoms works fine, but Facebook and other Apps simply dont react

  • Mouse Acceleration Problem...

    http://db.tidbits.com/article/8893 Yeah I have a Macbook. But at school, for web design, they use Pc's and for graphics they use iMacs. I have noticed the different in the pc and mac mouse accuracy. I feel like on the PC, I dont really have to work s

  • Migration from Brio8 version to Hyperion Interactive reporting version11

    Hi, We are migrating from Brio8 environment to Hyperion Interactive Reporting version 11 environment. I am referring hs_migration.pdf version 11. I am using migration utility tool to do migration. my question is if I am migrating artifacts from Brio