DrClap, schapel, jschell whats better architecture jar files or class files

What would be a better architecture for deployment. Jar files or class files. We were recently having a debate at work as to generate installation scripts that put jar files on the system where the app is being installed or to make the script generate class files at the desired location.
It would be good to know as to what you ppl think and what are the pros and cons of both.
Some claimed with class files it would be easier to put in patches later on and I kinda agree with that. However your thoughts would be appreciated.
Come on DrClap, schapel, jschell, jsalonen....... I am a fan of yours already

This, of course, is why topics shouldn't be addressed to individuals - they are likely to never see it. Today is the first time I have seen this, and that is due solely to a search that I was running.
Why would you use one over the other?
----Distribution costs
It takes more time to send a bunch of class files down the wire than a single jar file. However, it takes more time to send a jar than a single class file. So there is a delicate trade off in a web application where one is using java. If you send the jar every time it is modified the entire jar must be moved. Class files take less time, but all of them must be moved for a new person.
So in this case if you have a fixed based of users (internal use), and a majority of the files do not change then class files are better. If the user base is transitory and large (external use) then a jar file is probably better.
----Usage:
You can use reflection to dynamically add functionality to an application. If you use a jar file then the application must be restarted for the changes to take effect. If you use class files then the application does not have to be restarted. Obviously the second only works if you have some way to dynamically notify the application that new classes are available - like a database.
This becomes very relevant if you do not want to restart the application and you do not have a distributed application base in place.
Also the older classes, even if not used, are still loaded in the application unless it is restarted (presuming a class loader is not used.) Most of the time this does not make difference.
Since in the above it is likely that there is not a large distribution problem, when the usage is a concern then the best strategy is as class files. They allow the most flexibility and there is unlikely to be any concern at all how it is packaged.
-------Misc
Speed. Someone suggested speed. Guessing I would say that the jar file is going to be faster. Once the Sun jvm gets the file it doesn't let go. And as pointed out opening files is rather costly. However, I doubt this is going to be a significant cost on any system. Startup costs, although sometimes annoying, are seldom significant in terms of application performance.
Security. The is a certain level of security with a jar file. You have one jar file and distribute it to the help desk people. And one of them deletes it accidently. It is going to be a lot easier to figure that out than if they deleted one class file. Additionally it is probably easier to encrypt/decrypt a jar file (if you really must) than class files.
Dynamic class loading. If you are storing classes in non-traditional places, like a database rather than files, then it is probably going to be easier if you do it as class files.
Testing. It is easier to replace a class file in a testing environment to fix a bug than a jar file. Particularily if the make process for the jar file rebuilds everything.

Similar Messages

  • Conversion of a .jar OR a .class file into a .exe  file

    Can anyone tell me as how to convert a .jar OR a .class file into a .exe file
    I need to know as soon as possible.

    Okay I will tell you the steps:
    Look in the top right hand corner of the page.
    There should be a box with a red title line. Inside the
    title should be the letters 'S E A R C and H'.
    In the white part of th box should be a smaller line, in which you can type.
    type in "conversion .jar .class .exe" or some similar string.
    Then click on the button next to the text box.
    Read the page of results you get.
    Click on the first link and read what is said on the connecting page.
    If that doesn't help, use your browser's back button and click on the next link, and repeat util your question is answered.

  • How to Compile Jsp File in Class File , Protect my JSP from outworld

    Hello Friends
    My name is chandra prakash, I'm new for u. I've develop a web based software completely in JSP, some files are also written in Java Script. This software have aprox. 40 files --> 30 in JSP + 2 in Java Script + 8 image files .
    Each JSP calls another. and run this on 58 clints machine simultaneusly. we used Oracle 9iAS as back end and Oracle9iAS web Server . Where we found less clients like 20-30 we use Tomcat 5.0 web server .Sir problem is this we don't wan't to leave our jsp source code on server.
    Is any method or third party tool by which we can convert our JSP source file in CLASS file as like real class files provide by javac.
    For this perpose we make a folder and put all files in it. Create a context on Tomcat for this folder.Create a data source for this in tomcat. Bcase this program uses Data source and connect many times to database & fetches many type of data from database. We use servlet files of tomcat for this context in WORK folder of Tomcat. and after that rename our Source file Folder. and again run our program through batch file i'm strange program runs 2-3 steps, after few times it start producing errors.
    Sir do u hava work on this field can u help me to protect this JSP source code.
    I've Use Jikes.com compiler but not get any succes, It may be i'm not using correctly .
    Pls sir give me any suggesition.
    Chandra prakash

    1. Highlight your web project or the individual file
    2. Right click
    3. Select Rebuild to build all jsp files or Make to rebuilt only changed files

  • How to create a Jar with only class files?

    Dear all,
    I want to create a jar file with only classes.My class files and java files are in different folders under com .
    say
    com
    in com there are two folders
    folder 1 -- subfolder 1
    folder 2 -- subfolder 2
    like this.
    If i want to create a jar file from com directory how should i give the jar command.Again my jar should contain only .class files.
    Any help will be appreciated
    Thanks
    lekshmi

    It doesn't work.Says "No such class or directory"
    Any other way Or is it possible to do so?Read the link I posted and create the statement to make your structure. I was thinking you were inside the com directory but if you are above it you will need something like this instead:
    jar -cf test.jar com\*.class com\subfolder1\*.class com\subfoler2\*.class
    But either way don't just copy and past this. Think about what is does so that you can make it work for you.
    Also, you might want to look into using Ant if you are going to be building this a lot.

  • What is my JAR "fully qualified class name " ?

    I have created a application, and I have packaged it into a JAR Recipe using Studio one.
    It compiles fine, and I can runn it manually fine too.
    Now I need to run it as a NT service and because of this, I need the "fully qualified class name".
    I guess you need to know the structure of my JAR recipe file. It is very simple, it contains three packages and one class file.
    Jar Recipe name: EventLogic_Notificator
    Content:
    - DB (package)
    - NmsObjects (package)
    - Logger (package)
    - EventLogic_Notificator.class
    Manifest:
    Manifest-Version: 1.0
    Created-By: Fabian Castillo
    Specified-By: EventLogic_Notificator.jarContent
    Main-Class: EventLogic_Notificator
    Thanks alot.
    sincerly fabin.

    Sorry, I din't explain my self well, english is my second languaje.
    I have programmed a java app. and I need it to run all the time. That's why I'm using a JavaService.exe tool that allows me to run my java app as a service.
    On of the parameter that I have to pass to this javaService.exe tool is the fully quailified class name.
    I have tried many times and in the log.txt I can see that I'm entering the fully qualified class name wrong.
    Thanks for the help..
    FAbian.
    What is the fully qualified name from my JAR structure.

  • Which jar has ConnectionProperties class file?

    Hi,
    I am trying to connect to the SAP system. I am unable to find the <b>ConnectionProperties class file</b>. It is not there in com.sap.portal.ivs.connectorservice_api jar file.
    Please let me know where this class file is and send me the appropriate jar file.
    I tried going to libraries.zip, but it is not there either.

    Hi Akhilesh,
    There is no such jar file in the installation. I have com.sap.portal.ivs.<b>connectorservice_api.jar</b>. There is a underscore before api. This jar does not have the ConnectionProperties class.
    If you have this jar, please mail me. My ID is <b>[email protected]</b>
    Thanks in advance,
    Regards,
    Madhu

  • How to convert a .jad file to .class file in JAVA Swings.

    Hi all,
    Sorry for the interruption.I am also facing the same problem.I am using DEJDecompiler.But my application is not J2ME But J2EE.( a Swing application).I opened .class file and made some changes but I dont know how to convert into a .class file again.
    I tried saving .jad file to .java file.Then it is showing lot of errors in Eclipse Platform.I doubt if there are any errors in the .class file already,then how could the program would run.I put all the programs in the respective platforms only and then testing.It fails.
    (2) one more question,is if I do not need to disturb any existing coding and need to create a seperate java file which will do my customisation,then what should I do.I could not get any interfaces in the program.
    Please help me as the matter is most urgent.
    Thanks in advance
    With regds
    Satheesh.K

    I tried saving .jad file to .java file.Then it is
    showing lot of errors in Eclipse Platform.I doubt if
    there are any errors in the .class file already,then
    how could the program would run.I put all the programs
    in the respective platforms only and then testing.It
    fails.So who's Java program/library are you trying to steal?
    (2) one more question,is if I do not need to disturb
    any existing coding and need to create a seperate java
    file which will do my customisation,then what should I
    do.I could not get any interfaces in the program.
    Please help me as the matter is most urgent.Wow, you urgently need to steal someones program/library. The best person to give you advice urgently is the owner of the program/library you are trying to steal.
    Thanks in advancePlease don't thank me because I'm not going to help you!
    With regds
    Satheesh.K

  • Classes12.jar with connection.class file

    Hi All,
    I want to download classes12.jar file which contains connection.class which is used for datasoruce.Can you please get me the download URL for the same.Please help me out as i got classes12.jar file but it doesnt contain the connection.class,if it doesnt have the connection.class it gives me a JMS:112 error which says invalid connection.
    Do please help me out in getting the classes12.jar file link for download.
    Thnaks in advance.
    Regards,
    Kalyan

    What is the Oracle database version? What is the JDK version? Various versions of classes12.jar are available.
    Please download classes12.jar from
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

  • Do we have to separate java source files and class files after compiled..

    Hi,
    I really confussed with this:
    I have compiled java source files into a package and tried to use but the classes can not be found. Should I separate class and source files after compiled with packages names. I hope you understand what i mean.
    Thank you
    So Jag

    You can choose to separate the source files or not. It sounds like your problem has to do with Classpath and packages.
    If the file c:\base\compute\engine\mysourcefile.java starts with the statement "package engine;" then the fully qualified name of the class is is engine.mysourcefile. If the file c:\base\compute\client\mysourcefile.java starts with the statement "package client;" then its fully qualified name is client.mysourcefile.
    In your source files, whenever you refer to a class from another class, the compiler needs the fully qualified class name. You can either import the class or use the fully qualified name. In order for the compiler to find the class, the c:\base\compute directory must be in the Classpath (assuming the package definitions from above).
    Finally, to launch an application given the above, the command would be "java client.mysourcefile" assuming the main method is in client.mysourcefile.

  • Creating executable file for class file

    Hi,
    Im trying to create an .exe file for my application. Is it possible?
    I know that my program will become platform-dependent...

    Thanks. I was hopping it wasnt so expensive... :)
    Best regards.

  • Difference between .jar, .war and .ear file

    Hi,
    I am pretty new to J2EE technology.
    I would like to know what is the difference between .jar, .war and .ear files and how they are deployed on webserver.
    Thanks,

    Files with a .jar extension or JAR files, are essentially just a collection of files compressed using the ZIP/ZLIB compression format.
    JAR (short for Java Archive) files were introduced in the early days of Java as a means to conveniently package and distribute Java applications and components. Since then, a number of additions to the Java platform have followed suit. The introduction of the EAR file is one such addition.
    An EAR (Enterprise Archive) file is a JAR file that contains a J2EE application.
    A J2EE application is a group of Web modules that collectively perform as a single entity.
    A Web Module is an entity consisting of one or more resources such as HTML files, Java class files, XML files, etc. Web Modules are packaged in Web Archive (WAR) files.
    Looking at it from a top-down view, EAR files contain JAR files and WAR files. Packaging resources in WAR files, JAR files and eventually EAR files, makes it easy to reuse and reassemble components as new J2EE applications and distribute them to new environments.
    For example, Tomcat deals only with WAR files.
    So, in order to auto-deploy a Web application to a Tomcat environment, you must place an application's WAR file in the appropriate directory or use Tomcat's deployment tools to manually deploy the file.
    If you already have an EAR file that contains the WAR file, you can extract the WAR file and use it as is. If you do not have the EAR file or the WAR file, you can use any number of compliant tools to create the WAR file. Tomcat is a servlet/JSP container available from the jakarta.apache.org site.

  • Which jar file has WFTaskUpdate.class file ?

    Hi BPEL Champs;
    For TaskList application, we have payload-body.jsp file which has the below <form> element :-
    <form id="PayloadJSPHTML" name="PayloadJSPHTML"
    action="WFTaskUpdate"
    method="post" onSubmit="return validateData(this)">
    I want to know which jar contains the .class file for :-
    oracle.bpel.services.workflow.worklist.servlet.WFTaskUpdate
    Or do anybody knows the location of WFTaskUpdate.java servlet in worklistapp folder ?
    Please do help and co-operate.

    C:\OraBPEL\bpel\system\services\lib\bpm-services.jar contains WFTaskUpdate.class file.

  • Extracting class files of a certain package from a jar.

    Hi,
    I want to extract all the class files belonging to a certain package from a JAR file containing class files belonging to a different packages.
    Can I do this using the jar tool, or use some other unzipping tool?
    If it is best to use an unzipping tool which one can I use for windows?
    Thanks,
    Niranjan.

    jar xf file.jar path/to/dir
    For more info see http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/jar.html.

  • Finding loaded Class file from particular Jar

    Hi,
    I have multiple jars containing same class file.
    How can I find out that the loaded Class file belongs to particular jar?
    Thanks
    madan

    In most cases it's possible with ProtectionDomain and CodeSource:ProtectionDomain pd = YourClass.class.getProtectionDomain();
    CodeSource cs = pd.getCodeSource();
    if (cs != null) {
        System.out.println("It came from " + cd.getLocation());
    } else {
        System.out.println("Location unknown.");
    }For further information see
    [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getProtectionDomain()]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getProtectionDomain()
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/ProtectionDomain.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/CodeSource.html

  • Convert .class files into .java files???

    Does anybody know how to convert x.class file back to a x.java file. Or in other terms, extract .java files from a jarfile??
    Thanks for any help
    /carlos

    Does anybody know how to convert x.class file back to a x.java file.As Dr.Clap said, that's decompiling.
    Or in other terms, extract .java files from a jarfile??That isn't quite the same thing. You can decompile a .class that's in a jar, but a .class file doesn't have to be in a jar and a file in a jar isn't necessarily a .class.

Maybe you are looking for

  • Error in configuring content server

    Dear All i am configuring external content  server I have defined my content repositories using tcode OAC0. parameters are as follows: content repository : ZXYZ ( XYZ is my content repository) Document Area : DMS Storage type :HTTP content Server Ver

  • Using Toplink with Oracle Spatial (missing right parenthesis error)

    Hi, I always get the following error when I try to create spatial query with toplink. Internal Exception: java.sql.SQLException: ORA-00907: missing right parenthesis Any idea ? Also, there is no trace of my point in the generated sql.... Here is the

  • Auto rotation table in oracle

    Hi, Is there any strcuture or fucntion that can make the table have something like rotation. I mean the record can be first in first delete. So,for example , even the table have limit row for example , 100 row . so, the new data can be replace the ol

  • Duplicate albums, deleted then later reappear

    Have albums which duplicate themselves. I have deleted them using delete button, emptied trash, close iPhoto, and voila, they are back when I reopen iPhoto. Same album names, now there are duplicate albums. Power PC G5   Mac OS X (10.3.9)  

  • I am installing Adobe Audition 3.0 (freeware) on my PC--installer needs a serial

    I am installing Adobe Audition 3.0 (freeware) on my PC--installer needs a serial #--which I don't have as it's freeware.  Please advise!