Automatical jar file structure in SunOne studio (forte)?

Hi everyone!
I wonder if anyone knows how to jar a folder structure in SunOne (former forte). I have a "myRoot" folder which I would like jar to "myRoot.jar". But I also want the subfolders to be jar:ed. I.e. I have myRoot/test/ and I want to jar them so that I may reach "test" this way: "myRoot.test" .
I know how to create a jar from one folder, but do the subfolders hang on automatically or do I have to specify them as well?
best regards,
Linda Eric

I don't know about SunOne specifically but, in general, jar does it's work on subdirectories, too. So, if you ran the command line version of jar, you might do something like this:
jar -cvf myRoot.jar ./myRoot
Which would jar up the whole myRoot tree. You can verify what's in the jar file by running the following:
jar -tf myRoot.jar
Which lists everything in the archive. Hope that helps -
Sam

Similar Messages

  • Importing jar files in Sun Java Studio

    Hi
    I am new to java and have recently installed Sun Java Studio Enterprise. As a part of assignment, I have been provided a jar file and use it.
    But i have not been able to load it into my program. How do i load it ?

    Hi
    I am new to java and have recently installed Sun Java Studio Enterprise. As a part of assignment, I have been provided a jar file and use it.
    But i have not been able to load it into my program. How do i load it ?

  • Rt.jar file structure?

    hi can someone explain me the contents and file structure of rt.jar
    pls add -verbose as an argument and try to find out something from the console.

    It is common courtesy to acknowledge contributors to previous threads. Or at the very least you should be assigning the duke dollars you posted to your threads.
    So please return to [http://forum.java.sun.com/thread.jspa?threadID=5310786_|http://forum.java.sun.com/thread.jspa?threadID=5310786] and make some sort of acklowledging gesture to the responses you were given.

  • Bundled Tomcat File Structure and Sun Studio Enterprise 8

    I am having trouble using form authorization with Enterprise 8,
    the bundled Tomcat and MySql.
    Request clarification on what tomcat-users.xml is used by Ent 8.
    I see the following in my configuration:
    1) apache-tomcat-5.5.15-embed/conf/tomcat-users.xml
    2) apache-tomcat-5.5.15/conf/tomcat-users.xml
    3) C:\Program Files\Sun\jstudio_ent8\ide\enterprise1\jakarta-tomcat-5.5.7\conf\tomcat-users.xml
    4) C:\Document and Settings\motel\.jstudio\Ent8\jakarta-tomcat-5.5.7_base\conf\tomcat-users.xml
    I assume the first two are some type of windows cached.
    Further, #3 I assume is initial or default tomcat-user file.
    So is #4 the file that I want to edit so that my IDE can work with Tomcat?
    Thank you for any help and guidance,
    Craig

    I assume the first two are some type of windows cached.
    Further, #3 I assume is initial or default tomcat-user file.I would agree with you; regarding the first two files, it is not clear how they came about since they don't seem to be in either the ide directory or ide-user directory; and also because the directories seem to point to a different version of tomcat, namely 5.15 instead of the ide-bundled 5.7... It is even possible that the first two are not related to JSE ide at all...
    Regarding 3 and 4, your guess is right; 3 is the initial installation directory. This directory is not used by the ide at all for actually working with the tomcat server; this is because the ide-userdir is customizable via the command-line. You can have several user directories at the same time and switch between them by running './runide.exe -userdir <this-sessions-user-dir>'. Naturally the different sessions cannot use the same tomcat server since that would lead to conflicts. So the ide first copies the server installation to the current user directory and then runs the tomcat from there.

  • File structure of logic pro/studio

    hi
    can someone explain the file structure of logic studio/logic pro please?
    (on the pc, most things were in the for example: emagic folder in program files).
    is there an equivalent of program files folder on mac? where i can explore apps
    would logic pro install into one folder? nice and simple?
    would it be ok to install logic pro all on internal system drive (macbook).
    or external hard drive essential?
    does logic pro require 2 hard drives? one for installation and one for audio data/recording onto?
    thanks

    *Logic Pro itself will be installed in the application folder - just the app itself
    *Additional Content like Loops - IRs for Space Designer or Plug In components and Presets for 3rd party Plug Ins will be installed in HD/Library/Audio/
    and
    *HD/Application Support/Logic (Channel Strip settings/EXS Factory Samples and Instruments/KCs/Templates/Ultrabeat samples/Tuning tables and so on)
    For your own presets and channelstrip settings the same folder will be created in your Useraccount.
    You can install all the Jam Packs and Loops on an external drive during the installation process when you have a Desktop computer. On a Laptop you'll have to install it to your system drive first and then move it to an external
    which leads me to your next question
    *Yes it is very much advisable (but not a "must") to run Samples/Loops from an external drive and if you're recording a lot of Audio then get another external for the Audio files. Daisy chaining FW drives works well, getting an additional eSATA drive with an adaptor card will give you an additional port and is a good solution
    Message was edited by: Sampleconstruct

  • How can I build automatically jar with Eclipse?

    Hi,
    I try to build automatically jar file each time when I save my project.Until now I used right click and Export to jar but that take me more time and it is not efficiently.I have try to configure an new builder from project->properties-> builders options but when I Clean it give me the following error:
    The file does not exist for the external tool named MY_Builder
    Please help me If you can, all that I try to find is to generate automatically jar file each time when I save or clean the project,no matter the method as long as it's working on Eclipse
    Many thanks,

    Hello,
    But How can I do that ? I make a new ant compiler but I have some errors:(. I don't know how to configure this ant.Can u help me please?
    Thanks,

  • Creating jar file for entity bean

    I am trying to deploy an entity bean..i compiled all the java files and created a dir by name META_INF and copied ejb-jar.xml
    and the other two .xml files which are needed to this dir. then using ,ant i tried to create the jar file ,,but it is giving the following error
    during the process ..PLs Help me
    Buildfile: build.xml
    clean:
    [delete] Deleting directory D:\ejb\entity\build
    [delete] Deleting directory D:\ejb\entity\dist
    init:
    [mkdir] Created dir: D:\ejb\entity\build
    [mkdir] Created dir: D:\ejb\entity\build\META-INF
    [mkdir] Created dir: D:\ejb\entity\dist
    compile_ejb:
    [javac] Compiling 3 source files to D:\ejb\entity\build
    jar_ejb:
    [jar] Building jar: D:\ejb\entity\dist\Cabin.jar
    ejbc:
    [java] java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    [java]      at weblogic.ejb20.dd.xml.DDUtils.getEntry(DDUtils.java:332)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.getEjbJarXml(DDUtils.java:236)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.loadEJBJarDescriptorFromJarFile(DDUtils.java:151)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:139)
    [java]      at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:130)
    [java]      at weblogic.ejbc20.runBody(ejbc20.java:338)
    [java]      at weblogic.utils.compiler.Tool.run(Tool.java:79)
    [java]      at weblogic.ejbc.main(ejbc.java:21)
    [java] ERROR: java.io.FileNotFoundException: META-INF/ejb-jar.xml not found in jar file
    compile_webapp:
    Total time: 20 second

    The Ejb jar file structure for WebLogic server:
    META-INF/ejb-jar.xml
    META-INF/weblogic-ejb-jar.xml
    META-INF/weblogic-cmp-rdbms-jar.xml
    Ejb Bean Class
    Remote interface
    Home interface

  • Can't start RMI server using JAR file

    I found it interesting that if I start my RMI server from
    a plain directory, everything goes fine.
    But if I jar all these necessary files into a jar file,
    and start my RMI server with command below
    java -jar server.jar
    UnmarshalException and ClassNotFoundException are
    thrown to indecate that my stub class can't be found
    (which I'm sure my stub class is in jar file)
    Why is jar file so special that it can't act like
    what it originally does when it hasn't been jared?
    or I really should take care of some configuration
    before I really can run a jar file?
    thanks

    To clarify few things...
    What I don't understand is that when I convert all my
    directories and class files properly into the jar file, they
    just can't work properly.
    I don't know if it's a problem of JAR file,
    or it's RMI that make this JAR file special?
    I'll simulate my JAR file structure that listed below,
    these structure works fine when they have'nt been
    converted into JAR file.
    META-INF/
    META-INF/MANIFEST.MF
    a/b/x1.class
    a/b/x2.class
    a/b/c/Y.class
    a/b/c/Y_Skel.class
    a/b/c/Y_Stub.class
    And when I use command "java -jar server.jar"
    to run my application, ClassNotFound exception
    is thrown to indecate my stub class is not found.
    Is there anything I can do to correct this?
    thanks

  • Problem deploying and using custom Tags in jar files

    I am trying to create a custom tag library of Java classes, package them in a JAR file, and use them in another web application. Here is the JAR file structure, named mytags.jar:
    META-INF
    META-INF/manifest.mf
    META-INF/taglib.tld
    mytags/FooBar.class
    mytags/Another.class
    ...Here is the taglib.tld file:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <taglib xmlns="http://java.sun.com/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
    version="2.0">
       <tlib-version>1.0</tlib-version>
       <short-name>foo</short-name>
       <uri>fooTags</uri>
       <info>My tags</info>
       <tag>
         <name>fooBar</name>
         <tag-class>mytags.FooBar</tag-class>
         <body-content>empty</body-content>
         <attribute>
           <name>name</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
         </attribute>
      </tag>
    </taglib>The FooBar class has getName(String) and setName() methods.
    In the web application, I have copied mytags.jar into the WEB-INF/lib directory. I've verified that it lands in the corresponding directory for my appserver (I'm using Tomcat 6.0.10).
    Here's the header for my JSP:
    <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib uri="fooTags" prefix="foo" %>
    <foo:fooBar name="dummy" />
    ...When I access my page, the browser sits there and spins, not able to do anything. I know that some of the content is executed, but it is not able to get to the fooTags. I have tried replacing fooTags with WEB-INF/lib/mytags.jar, to no effect.
    According to the docs, I should not need to include anything in web.xml to reference the fooTags. The tag library classes are valid, since I used them as local tags prior to moving them into a Jar library.
    Any help would be appreciated

    Take the code of the jsp file :
    <%@ page language="java" %>
    <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
    <html>
       <head>
         <title> First Struts Application </title>
       </head>
         <body>
            <table width="500" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td> </td>
            </tr>
            <tr bgcolor="#36566E">
              <td height="68" width="48%">
                <div align="left">
                  <img src="images/hht.gif" width="220" height="74">
                </div>
              </td>
            </tr>
            <tr>
             <td> </td>
            </tr>     
           </table>
           <html:form action="Lookup"
                      name="lookupForm"
                      type="wiley.LookupForm" >
           <table width="45%" border="0">
            <tr>
              <td>Symbol:</td>
              <td><html:text property="symbol" /> </td>
            </tr>
             <tr>       
              <td colspan="2" align="center"><html:submit/> </td>
             </tr>       
            </table>              
          </html:form>
         </body>
    </html>

  • Imported par file to NWDS, jar file missing. Where find par file structure?

    Hi All,
    We want to implement idle session timeout on the portal.  We found a wiki here on the subject.  In order to implement the solution we need to make adjuestments to com.sap.portal.navigation.masthead.par.bak.  When we import this par file to Netweaver Developer Studio, the libraries and jar files are missing.  So obviously it errors then in portal as files are missing.
    So I could add them manually but I don't know what the file structure is on this par file so don't where to add what.  Does anyone know?
    Also when I export the file after manually adding the missing files, will it export all the files or will it behave the same way as the import and leave out the additional files?
    If anyone could help, I'd really appreciate it,
    Kind regards,
    Liz.

    Hi Bala,
    I thought of that just before you responded and it worked!!  Thanks for the response..
    Regards,
    Liz.

  • Deploying a JAR file from Forte

    I have written an application using the Forte CE IDE. Now I want to deploy it to other PCs running JRE1.3, so I used the JAR packager to create a JAR file and I ensured the manifest had the Start class specified. Unfortunately, when I try to run this application via the command line on either another machine or my own (outside of Forte), I get the message
    Exception in thread "main" java.lang.NoClassDefFoundError: <start class name>
    I have used the "java -jar" command.
    The start class is in the jar file.
    The start class name is in the manifest.
    I must have missed something, and I am at my wits end.
    Has anyone else had similar problems deploying applications from Forte? Or can anyone offer advice or a link to some comprehensive documentation on how to accomplish deployment? The help function in Forte was no help at all.
    Thanks.

    Are you sure that there is a newline after your lines in the manifest?
    Hit return after each line to make sure!

  • Running Jar Files created in Sun Java Studio

    Hi everyone,
    I am still trying to explore the functionalities (especially as regards deployment issues) of this robust IDE. However I do have a problem. I have developed a very basic program that connects to a database (MSSQL) using Java Studio 8. However after building the jar file, if I try to execute the jar file it gives me this message
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver.....
    But all goes well within the IDE and it runs well if I use my notepad or vi editor,compile it from the command line and execute the generated class file. The classpath have been set for all the necessary jdbc jar files.
    Any Help Will Be Appreciated

    1. Sun Java Studio Enterprise 8 is based on NetBeans 4.1 which does not provide direct support for packing an application. One alternative you may want to consider is to use NetBeans 5.0 (http://www.netbeans.info/downloads/download.php?type=5.0) or JSE 8.1 which is based on NB5.0 and which is now in beta (http://developers.sun.com/prodtech/javatools/jsenterprise/downloads/index.jsp).
    You may want to refer to http://www.netbeans.org/kb/articles/javase-deploy.html for packing and deploying a standalone application is NB5.0 or JSE8.1.
    2. Using JSE8, you may want to try copying all the library jars (including database drivers) used by your application to your projects dist directory manually and then package them all into one jar.
    3. You should not have to know the exact location of the jdbc jar on the client machine. How are you instantiating the driver in your code? Are you using 'Class.forName()'? If so, java should be able to pick up the driver from the classpath. (Pl. ref to http://forum.sun.com/jive/thread.jspa?forumID=122&threadID=62696, which may be of help).

  • Update automatically a JAR file

    He folks!
    Here is what i want to:
    1.
    Develop a little dummy java applet (just for testing), placed in a jar file.
    2.
    That applet should be signed as a trusted applet, so that it can do some more
    stuff on the client and
    3.
    Every time the user starts the applet on his client, the applet should
    check on the server, if there is a newer version, and if so
    update itself automatically, if not just start the jar file on the client machine.
    Does anyone have any suggestions how to do that, or where to get some informations
    about that topic?
    greetings
    Normen

    Every time the user starts the applet on his client,
    the applet should
    check on the server, if there is a newer version, and
    if so
    update itself automatically, if not just start the jar
    file on the client machine.That is already done automatically. If you want to bind the caching to a certain version number, or understand more about applet caching, you should read this single page: http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/applet_caching.html

  • Automatically includng dependecies in jar files

    We are using JBuilder 6 on our project. The archive builder wizard has the ability to automatically determine the dependencies of the classes you select and include them in the jar. This I like. The problem is we want to be able to source control the content list or 'plan' for building the jar so that we can distibute it to other members of the team. There doesn't seem to be a way to save this info in JBuilder. Is there are tool that has similar features that uses a batch file or something else that we can save?

    To make a .bat file:
    1. open a text editor and a new (blank) document
    2. put your command line arguments for creating your
    Jar into the document. You should be able to either
    copy this from JBuilder, or just inspect the jar file
    and see what you need to include
    ex. (In your file) jar -myJar.jar *.class
    3 Save the file with the extension .batThanks for trying to help but I know how to create a batch file and I know hoe to create a jar file using the jar tool.
    What I want is tha ability to pick out the classes I 'really' need and have a tool that determines the dependencies. We have a group of people working on the same code base. If a class' dependencies change most of the developers will never know. If we did what you are suggesting, we would spend more time maintaining the batch file than it takes to set up the archive in JBuilder with much less reliability.
    For example. We have a session bean coded in JBuilder and we want to load the classes into our server (we didn't spring for the enterprise edition.) In JBuilder we can create an archive, select the remote home and bean classes, tell it to include all dependencies and it will create the jar with all the classes we need to deploy the session bean. This is an easy one. The problem is that I can't take my 'plan' i.e. the three classes in the content pane of the wizard and import them into my co-workers JBuilder environment. He or she must create the archive from scatch. This isn't a big deal as long as everyone follows naming conventions and the number of classes that are 'needed' is small but we have some cases where we need to specify a dozen or more classes in the content pane.

  • Automatic launch of .jar files

    how to configure Java to automatically launch .jar files on double click in Windows and single click in Linux

    Windows should be set up to run jar files when you install a JRE or JDK. I don't know about Linux. If it doesn't happen automatically, you must tell the OS that when you click a jar file, it should launch the jvm with the parameter "-jar [filename]".
    To make your jar files executable, include a parameter called "Main-Class" in the manifest file, containing the name of the main class of your application. So if your main class (the one with the main-method) is called mypackage.myapplication.MyMain.class, the manifest file should have the entry    Main-Class : mypackage.myapplication.MyMain

Maybe you are looking for