Hot deployment of class files (non-EJB)

 

Also posting to the servlet newsgroup.
"Craig Ambrose" <[email protected]> wrote in message
news:[email protected]..
>
I am using WebLogic 6.1 and am interested in using auto-deployment indevelopment
mode of JSPs and class files that those JSPs rely on. I have a simpleWebLogic
application that gets deployed using the exploded directory format andwhen I
modify the JSPs or the class files that they use everything reloadsproperly and
a newly modified class file will be reloaded the next time the pageutilizing
the Java class is requested.
I have a much more complicated application (the one I am really doing workon)
and I can't get the hot deploy of the class files to take effect. The JSPswill
reload but I can't seem to cause the class loader to reload any changedclass
files. If I use the WebLogic Console and un-deploy and then re-deploy theapplication
then the class files will be reloaded, but I thought that wasn't necessaryfor
hot deployment. This complex application stores many things in the HTTPsession
context. I am wondering if that has an effect on the class loader fordependant
class files.
I'm pretty sure it is not a configuration issue as I have it working forthe simple
application. I have the application deployed under the.\config\<domainname>\applications
directory and am using the exploded directory format with the class filesalso
exploded in the WEB-INF\classes directory.
Any insights on dependancies of the hot depployment would be helpful.

Similar Messages

  • How to hot deploy java class?

    I write some java class and put them into the weblogic\class folder to
    replace the old java class files.
    When I run the program, the server still run the old java class.
    But when I restart the server, the server runs new java class.
    The server must restart, when I want to run new java class?
    thanks

    Does this work ??
    I was unable to achieve hot deployment using REDEPLOY file.
    Sheng Sheen <[email protected]> wrote in message
    news:[email protected]..
    You need to create a REDEPLOY file and touch the file.
    From the documentations:
    Dynamic Redeployment of Exploded Applications
    You can also dynamically redeploy applications or application components
    that have been deployed in exploded format. When an application has been
    deployed in exploded format, the Administration Server periodically looks
    for a file named REDEPLOY in the exploded application directory. If the
    timestamp on this file changes, the Administration Server redeploys the
    exploded directory.
    If you want to update files in an exploded application directory, do the
    following:
    a.. When you first deploy the exploded application, create an empty file
    named REDEPLOY in the directory where the exploded application resides.
    b.. To update the exploded application, copy the updated files over the
    existing files in that directory.
    c.. After copying the new files, touch the REDEPLOY file in the exploded
    directory to alter its timestamp.
    When the Administration Server detects the changed timestamp, it redeploys
    the contents of the exploded directory.
    "Alex" <[email protected]> wrote in message
    news:[email protected]..
    I write some java class and put them into the weblogic\class folder to
    replace the old java class files.
    When I run the program, the server still run the old java class.
    But when I restart the server, the server runs new java class.
    The server must restart, when I want to run new java class?
    thanks

  • Path Changes from hot deploy to war file deploy

    We are using hot-deploy in our development environment. When we move from
              hot-deploy to war file deployment in the test environment, we have to recode
              all of our servlets to point to a new URL for our JSPs. Obviously, this
              slows up war file deployment. We'd like to keep hot deploy for development
              purposes, but need to resolve this issue.
              Hot deploy environment:
              wlserver6.0sp1/config/mydomain/applications/DefaultWebApp_devserver linked
              to our content (JSP, HTML, source code, etc.) directory, in this case
              /u1/webapps/zq.
              wlserver6.0sp1/config/mydomain/applications/DefaultWebApp_devserver/WEB-INF/
              classes/com linked to our class library structure.
              Here's what works in hot deploy:
              gotoPage("/zq/jsp/ZipQuote.jsp", request, response );
              We must change it to this when we move to a war file:
              gotoPage("/jsp/ZipQuote.jsp", request, response );
              Here's gotoPage:
              private void gotoPage( String address, HttpServletRequest request,
              HttpServletResponse response )
              throws ServletException, IOException
              RequestDispatcher dispatcher =
              getServletContext().getRequestDispatcher( response.encodeURL( address ));
              dispatcher.forward( request, response );
              Is there anything in the web.xml file we can change so that we can continue
              to use
              gotoPage("/zq/jsp/page.jsp", request, response )
              like in the hot deploy environment? I've played around with the
              <servlet>/<jsp-file> and <servlet-mapping>/<url-pattern> pairs, but with no
              luck. Any suggestions? Anything with adding a package declaration to our
              JSPs and/or precompiling them in the war file?
              I suppose it would be possible to put a JspLoc variable in the
              <context-param> or <env-entry>. Then, gotoPage( JspLoc + "page.jsp",
              request, response ) would work in both environments, but that seems
              inelegant and would add complexity and overhead.
              Thanks,
              Eric
              <servlet>
              <servlet-name>ZipQuote</servlet-name>
              <jsp-file>/zq/jsp/ZipQuote.jsp</jsp-file>
              </servlet>
              <servlet-mapping>
              <servlet-name>ZipQuote</servlet-name>
              <url-pattern>/zq/jsp/ZipQuote.jsp</url-pattern>
              </servlet-mapping>
              

    OK, I've removed the link from applications/DefaultWebApp/zq to
              /u1/webapps/zq and linked applications/zq to /u1/webapps/zq instead. Still
              working out a couple issues (like acessing other classes), but this looks
              like it will work. Thanks for the help.
              "Dimitri Rakitine" <[email protected]> wrote in message
              news:[email protected]...
              > It sounds like in your development environment you deploy your application
              > as a defaultwebapp ("/"), and, in the test environment you deploy it as a
              > regular webapp with context-root "zq", so, you probably should change one
              > of these to match another.
              >
              > Eric F <[email protected]> wrote:
              > > We are using hot-deploy in our development environment. When we move
              from
              > > hot-deploy to war file deployment in the test environment, we have to
              recode
              > > all of our servlets to point to a new URL for our JSPs. Obviously, this
              > > slows up war file deployment. We'd like to keep hot deploy for
              development
              > > purposes, but need to resolve this issue.
              >
              > > Hot deploy environment:
              > > wlserver6.0sp1/config/mydomain/applications/DefaultWebApp_devserver
              linked
              > > to our content (JSP, HTML, source code, etc.) directory, in this case
              > > /u1/webapps/zq.
              > >
              wlserver6.0sp1/config/mydomain/applications/DefaultWebApp_devserver/WEB-INF/
              > > classes/com linked to our class library structure.
              >
              > > Here's what works in hot deploy:
              > > gotoPage("/zq/jsp/ZipQuote.jsp", request, response );
              >
              > > We must change it to this when we move to a war file:
              > > gotoPage("/jsp/ZipQuote.jsp", request, response );
              >
              > > Here's gotoPage:
              > > private void gotoPage( String address, HttpServletRequest request,
              > > HttpServletResponse response )
              > > throws ServletException, IOException
              > > {
              > > RequestDispatcher dispatcher =
              > >
              getServletContext().getRequestDispatcher( response.encodeURL( address ));
              > > dispatcher.forward( request, response );
              > > }
              >
              > > Is there anything in the web.xml file we can change so that we can
              continue
              > > to use
              > > gotoPage("/zq/jsp/page.jsp", request, response )
              > > like in the hot deploy environment? I've played around with the
              > > <servlet>/<jsp-file> and <servlet-mapping>/<url-pattern> pairs, but with
              no
              > > luck. Any suggestions? Anything with adding a package declaration to
              our
              > > JSPs and/or precompiling them in the war file?
              >
              > > I suppose it would be possible to put a JspLoc variable in the
              > > <context-param> or <env-entry>. Then, gotoPage( JspLoc + "page.jsp",
              > > request, response ) would work in both environments, but that seems
              > > inelegant and would add complexity and overhead.
              >
              > > Thanks,
              >
              > > Eric
              >
              > > <servlet>
              > > <servlet-name>ZipQuote</servlet-name>
              > > <jsp-file>/zq/jsp/ZipQuote.jsp</jsp-file>
              > > </servlet>
              > > <servlet-mapping>
              > > <servlet-name>ZipQuote</servlet-name>
              > > <url-pattern>/zq/jsp/ZipQuote.jsp</url-pattern>
              > > </servlet-mapping>
              >
              >
              >
              > --
              > Dimitri
              

  • Deployment of class file in oracle 10g Application Server

    Hi,
    I have a class file
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
    res.setContentType ("text/html");
    PrintWriter out = res.getWriter();
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<BIG>Hello World</BIG>");
    out.println("</BODY></HTML>");
    now I like to deploy(in oracle 10g Application Server) and run this file.
    please help me.

    Hi
    You have to deploy Servlet as a WAR File. I hope you already have web.xml file which u can get automatically in eclsipse during creation of servelet. I am not sure what ide u r using here. If u have created servlet in eclipse then I would suggest create a project dynamic webproject if u have not where IDE create all required files autmatiicaly and even you can deploy application from there itself.
    If you wanted to deploy manually then follow below steps (if u have war file)
    I am assuming you already created a Weblogic Domain and have admin username/password. Start your domain. Login into weblogic console like http://host:port/console and use admin username/password. Then from Deployments section, deploy the above WAR file. In Weblogic you can deploy JAR (EJBs, java files), WAR (web jsp, html, webservices, servlets) or EAR (JAR + WAR). In your case its just a WAR file.
    Thanks
    Sujit Singh

  • Dependent Class files of EJBs...

    I have few dependent class files related to all EJBs (for example common exceptione). Right now all these dependent classes are duplicated in all the EJB jars. Is there any way get rid out of this duplication (other than putting in to system class path). i.e one single jar containing all dependent class files should be deployed along with the (EJBs jars - dependent calsses) in the EAR file.
    Thanx in Adv,
    Potluri

    Hi,
    you can set a classapth in the MANIFEST.MF filewith the parameter Class-Path for relative URLs

  • Hot Deployment without compressed files

    Hi,
    I would like to know how can I perform a deployment (better a hot deployment) using Application Server R3 or R2 without WAR, JAR or EAR files.
    Can you help me with that issue ?

    Hi,
    I would like to know how can I perform a deployment (better a hot deployment) using Application Server R3 or R2 without WAR, JAR or EAR files.
    Can you help me with that issue ?

  • Deploying not *.class files

    Greetings:
    I have a web project where I use Velocity templates. My *.vm files are located in a subdirectory called templates inside adfmsrc folder. Consequently, we could say that they are in templates package. However, when I tried call these VM files I got a ResourceNotFoundException. Analyzing the directory where my web application was deployed ( C:/Oracle/Middleware/jdeveloper/system11.1.1.6.38.62.29/o.j2ee/drs/MyWebApp ) I saw that templates folder and its VM files are not in WEB-INF/classes. My conclusion was that JDeveloper was not deploying templates package. In Project properties dialog I went to Project Source Paths -> Resources, Included tab and added adfmsrc/templates subfolder. But even then it did not work. Does someone have a beter suggestion?
    Thanks,
    Rafael Afonso

    Actually, it is necessary go to Project Properties -> Compiler and add .vm extension in fileld Copy Files Types to Output Directory.
    Thanks.

  • Deploying java class file

    how do i deploy an application so that they are executable when i just double click them....i've tried jar files but i need to type the command in the command line to execute them...

    how do i deploy an application so that they are executable when i just double >click them....i've tried jar files but i need to type the command in the command >line to execute them...Normally, if you have JRE installed and configured properly, a double click on your jar file (with manifest file and Main-Class Entry) should work;
    You can even create a .bat (.sh) file to execute your jar.

  • Hot Deploy Servlet in JAR file problem

    I've been playing with hot deploying servlets in WLS 5.1. I have SP2
              installed. I have things working fine with individual servlet class files. I
              decided to try hot deploying with jar files.
              I created a servlet, added it to a jar file, and then added the jar file to
              the 'weblogic.http.servlet.classpath'. I then restarted the server. I
              started the console and was able to hot deploy the servlet. So far so good.
              My next test is what failed. I modified the servlet, and rebuilt the jar
              file. I went back to the console, selected the servlet and hit the redeploy
              button. I went back to the browser and hit refresh - nothing, still the old
              servlet.
              It appears that WLS isn't reloading the jar file and the updated servlet.
              Everything works with individual class files.
              Does anyone know how I can cause the reload of updated servlets embedded
              within a jar file?
              Weblogic group - If there is no way now, will support be added soon?
              Thanks,
              Rick
              

    Hi,
              If I use weblogic.servlet.ServletServlet to try just the servlet , It
              works correctly.But When I develop it in a web application , there is a lot
              of hypelink to this servlet,thus I can't use the relative path reference to
              that servlet.I try to set the name of weblogic.servlet.ServletServlet same
              as the webapp,It doesn't work,how do I solve this problem?
              Thank you
              Pan
              Subject: Re: Hot deploy Servlet in webapp
              > http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
              >
              > It even explains why you shouldn't use it in production environment.
              >
              > Dimitri
              

  • Deploying the JSPs, Servlets and Java class files

    Hello All,
    I'm very new to the Oracle 9i AS. We are using Version 1.0.2.2.
    How do we deploy the JSPs, Servlets, and Java class files (simple class files, not EJBs)?
    plese give us the procedure and stpes how to deply or the links for the same.
    Thanks,
    Santhosh.

    Hi
    I guess u r running apache-jserv as servlet engine for your jsp and servlets. If its so, jsp files can be run without any additonal configuration by putting the jsp file under document root or any subdirectory and for running servlets u have to add classpath entries for your servlet in jserv.properties file.
    To make sure that your servlet engine is working, try
    http://servername:port/servlet/IsItWorking, if u get success msg that means servlet engine is working fine.
    Hope this will help
    Regards
    Kumaran

  • How to call a class file in a jsp without deploying anything in j2ee

    Hi,
    I am new in J2EE. I have some jsps, which I configured using web.properties(documentroot=c:/jsp/). I am able to get
    those pages by the web browser. I have some import statements in some jsps, now I
    am trying to access those page but it is failing, it says
    org.apache.jasper.JasperException: Unable to compile class for
    JSPD:\j2sdkee1.3\repository\pradip\web\_0002fLogin_0002ejspLogin_jsp_0.java:1:
    Class com.gui.UPMGuiGlobalConstants not found in import.
    import com.gui.UPMGuiGlobalConstants;
    Actually I have not deployed any class file or jsps.. Now my question is can I access
    these jsps without deploying anything, like can I put my .jar file in any j2ee
    directory(like lib or anywhere else, I already tried after putting in /lib) and restart the
    j2ee and use it. So how can I call a class file from a jsp without any kind of
    deployment?
    Please send me the reply as soon as possible.
    Regds,
    Pradip

    After you put the jar containing the class to import into the WEB-INF/lib directory, you still need to include it in the jsp.
    Putting the jar into the lib dir, will make it available to the vm, but as in any other java class, you still need to import it into the class, that the jsp will be compiled into.
    And you do that by putting
    <%@page import="com.gui.UPMGuiGlobalConstants" %>somewhere near the top of your jsp. (well you don't need to put it there, but it good style ;)
    That should do it.

  • Hot deployment

    Hi,
    I have a gateway which instantiates and runs applications. Each application implements an interface so the gateways only sees the class at type (interface).
    I have a huge problem in that we have a number of developers working on these applications. There are constantly bug fixes, new functionality etc. that must be added.
    How can I hot deploy these classes? I cannot restart the entire gateway every time I upload a class. This affects all the other applications.
    I have looked at dynamic class loading but this is going to take some serious time to create a custom class loader that will actually destroy old class loaders when creating new ones.
    Is there a simpler way to enable my gateway for hot deployment?
    thanks!

    Creating a new classLoader does not take a lot, and you can tell it NOT to cache the class.
    Also, you can simply destroy all current references to a class when running, replace the class file, and then allow code to call the class object again - thus reading the new class file.
    It's not typically a good idea to deploy-in-production any code.

  • Hot deploying web applications

              Hi,
              Is there a concept of hot-deploying whole web apps?
              I know that servlets and ejb's can be hot-deployed,
              but can context-paths be mapped to web apps without
              having to change the weblogic properties file and
              restarting the server?
              Thanks,
              j.joseph benavidez
              [email protected]
              

    We currently do not support hot deployment of war files. You can, hot
              deploy servlets and JSP.
              We plan to offer this functionality in a future release.
              Thanks,
              Michael
              Michael Girdley
              Product Manager, WebLogic Server & Express
              BEA Systems Inc
              Joseph Benavidez <[email protected]> wrote in message
              news:[email protected]..
              >
              >
              > Hi,
              >
              > Is there a concept of hot-deploying whole web apps?
              > I know that servlets and ejb's can be hot-deployed,
              > but can context-paths be mapped to web apps without
              > having to change the weblogic properties file and
              > restarting the server?
              >
              > Thanks,
              > j.joseph benavidez
              > [email protected]
              

  • Copying a new .class file for WLS to use, proper way?

    Hello. I'm doing some servlet development and I would like to know what is
    the proper way to deploy any .class files and servlets (also .class files)?
    If I just copy them into the proper directory, am I supposed to have to
    restart the server? Is that normal, or should WLS just pick up the new one?
    It does that with JSPs, can it do that with servlets and supporting classes?
    Thanks.

    I found out that I was copying the wrong file to the right place (.java
    instead of the .class :<). So once I fixed that small little :> problem, I
    was off and running. Thank you for your help! :>
    "Slava Imeshev" <[email protected]> wrote in message
    news:[email protected]..
    Hi Peter,
    Normally weblogic will redeploy automatically application, either web
    or ejb, without restarting the server, when it's copied to applications
    directory on the server. Applications should be properly packaged.Servlets
    and supported files should be in war file, ejb-s in ejb-jar files.
    I'm not sure if it would work right for plain unpacked class files.
    Regards,
    Slava Imeshev
    "PeterH" <!REMOVEBeforeSending! > wrote in message
    news:[email protected]..
    Hello. I'm doing some servlet development and I would like to know whatis
    the proper way to deploy any .class files and servlets (also .classfiles)?
    If I just copy them into the proper directory, am I supposed to have to
    restart the server? Is that normal, or should WLS just pick up the newone?
    It does that with JSPs, can it do that with servlets and supportingclasses?
    Thanks.

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

Maybe you are looking for

  • Runtime error in DB02 IMPORT_OBJECT_DESTROYED

    Hi Guys, When i call up Tx : DB02 and choose Space Statistics under Tablepace Tab, runtime error is occurring "  IMPORT_OBJECT_DESTROYED". The short dump mentions as : Error analysis Unable to import the dataset because it has an unexpected format. I

  • Logger warning on Beehive's class

    Hi all, When I start OCSG 4.1 I always have warning as follows: log4j:WARN No appenders could be found for logger (org.apache.beehive.netui.pageflow.internal.AdapterManager). log4j:WARN Please initialize the log4j system properly. I have directed LOG

  • Loading html file that is stylizied with css in Flash

    Anyone know of any tutorials of how to do this with AS3 or give me a quick break down of how to load html files? Thanks.

  • Link to document on desktop

    Does anyone know of a way to put a link to a document in GroupWise on the desktop? I would like to use Zenworks to launch a desktop icon to do that. Matt

  • Connected to an active network but unable to load web pages

    Hi, I am using an old Powerbook with OS 10.2.x and am trying to add it to an existing network at home. The network is a DSL/ADSL connection, which is received by a modem and is passed on to a wired/wireless router. I have a PC which connects successf