Building a jar

I think I might have missed something here. I'm using the JMF with Java 1.6. I've created a jar, however it doesn't work on other computers. I'm sure it's something with the JFM jars, however I'm not sure. The jars are included in my project, however the exe doesn't work. What am I doing wrong?
Any help?

Are you using cross platvorm libraries in you jar file ?
You do know that when using windows performance back they relay on windows shared libraries dll -s.
They are located in c:\windows\system32\jm* and jsound.dll and when performance back is not installed on computer it probably wont work.
With application it's easy just create an installer which copies dll files into system32 directory.
I have made an installer which copies jmf jars to program files and dll -s to system32.
Then i use exe which launches java jvm.
Works on every (windows)computer and it does not matter if jmf is installed or not.
Ethan, i'm not sure you have the same problem that previous poster had.
What exceptions you get when you run this jar file from command prompt?

Similar Messages

  • 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,

  • How to build a jar file so the program can access its resources folder?

    I have a java program written by someone else in which I have made a trivial change (I changed the background color). The jar file runs but it does not find one of the resources file.
    Here is the project folder's structure
    mainClass.txt (manifest text file)
    folder resources (includes file Java does not find: order.txt, a text file)
    folder CFPT ( includes .class files)
    folder cpl (includes .class files)
    folder results
    I tried
    jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
    I get a lot of "adding: resources/..."
    including the one pertaining to the files which is later not found
    adding: resources/order.txt(in = 411) (out= 169)(deflated 58%)
    the code that chokes right now is the following,
    Object i = new Object();
    InputStream is = i.getClass().getResourceAsStream("/resources/" + resourceName);
    when I run java -jar CFPT0.jar the program runs
    but it soon gives an error, cannot find resourceName order.txt (is == null)
    I have Core Java Volume 1 page 498 but it does not help me figure out what I am doing wrong.
    Can somone help me build the jar file correctly so the program can find its resources?
    Is this a classpath issue? What do I need to do?

    My last mainClass.txt file content:
    Main-Class: CFPT.CFPTRunner
    Class-Path: ./resources ./results
    I also tried
    Class-Path: resources results
    Initially I only had the first line.
    I put back /resources in the java file as the / is necessary to indicate absolute path.
    Otherwise it looks relative to calling class.
    I tried adding the path on the second line of the manifest file per Wikipedia example
    http://en.wikipedia.org/wiki/Classpath
    I looked at
    http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
    If you use the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path both for class files and source files.
    http://java.sun.com/javase/6/docs/technotes/guides/lang/resources.html
    resources
    I took out the -d classes and compiled the .class files right with the java files in case that was the problem
    javac -classpath . CFPT/CFPTRunner.java
    jar cvmf mainClass.txt CFPT0.jar CFPT/*.class cpl/*.class resources results
    java -jar CFPT0.jar
    Still no go

  • Building a jar in an ant build.xml file

    Hi,
    i previously used netbeans to create a jar that you could doubleclick to have it automatically started (win 2000).
    The jar also included other jars like log4j, jdom and so.
    In Netbeans, i first made my project and those jars available via the filesystem. Then i just made a new jar, added my project and the startpoints of the other jars. For instance for the jdom.jar, i selected the org and everything beneath.
    Then i generated a standard manifest file and added this line:
    Main-Class: <package>/<mainclass>
    This worked ok fine.
    Now, for my question: i'm trying out ant and want to achieve the same as above. Building my project is not a problem. I specified the dependies on other jars like this:
      <target name="compile" depends="init" description="compile">
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" destdir="${build}">
          <classpath>
            <pathelement location="lib/jdom.jar"/>
            <pathelement location="lib/log4j-1.2.7.jar"/>
          </classpath>
        </javac>
      </target>Compiling doesn't produce an error.
    However i can't seem to figure out how to build a jar where the root of each jar is included in the content of my own jar so i don't have to distribute the jars seperately.
    This is what i had so far for my jar:
      <target name="dist" depends="compile" description="generate" >
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}/lib"/>
        <!-- Put everything in ${build} into customer-${DSTAMP}.jar file -->
        <jar jarfile="${dist}/lib/customer-${DSTAMP}.jar"
             basedir="${build}" manifest="${conf}/manifest.mf"/>
      </target>My manifest file:
    Manifest-Version: 1.0
    Main-Class: customer/clientAny idea of how to add the content of another jar to my own jar?
    Thanks

    Hhhm. stupid me, i found a sollution to this and it was on this very forum!
    This is the relevant thread:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=281090

  • How to improve ejbc performance while building a jar

    Hi All,
    We are wasting valuable time in in development stage while building a
    jar which
    has quite a few beans.
    We found out that ejbc is taking up most of the time. For example, a jar
    which has
    about 30 beans ejbc is taking up about 5 minutes to build the complete
    jar.
    We are not sure if we are doing something wrong or ejbc itself is slow ?
    It would help us tremendously if you can identify the problem and help
    us
    expedite the process.
    Thanks in advance
    -Sheshi

    You could put each bean in it's own JAR file, then only build
    the bean that is modified. Guaranteed to be 30 times faster.
    Mike
    "Chip Whiteside" <[email protected]> wrote:
    Use Jikes to handle the ejbc compile. It should give
    you a performance
    increase for the compile.
    "Sheshi Sankineni" <[email protected]> wrote
    in message
    news:[email protected]..
    Hi All,
    We are wasting valuable time in in development stagewhile building a
    jar which
    has quite a few beans.
    We found out that ejbc is taking up most of the time.For example, a jar
    which has
    about 30 beans ejbc is taking up about 5 minutes tobuild the complete
    jar.
    We are not sure if we are doing something wrong or ejbcitself is slow ?
    It would help us tremendously if you can identify theproblem and help
    us
    expedite the process.
    Thanks in advance
    -Sheshi

  • Build ADF jar from maven

    Can we use maven to build ADF jar from one project which contains reusable components such as page template and task flow and the ADF jar is being used in another UI projects?
    Thanks

    Have tried google?
    I found http://groups.google.com/group/adf-methodology/web/maven-and-jdeveloper-adf-projects?pli=1 for a start.
    Timo

  • Why use ojdeploy when building ViewController jar/war?

    Hi,
    It is known that ojdeploy is the recommended way to go when building/deploying an ADF app. The advantages are stated in many blog posts in the web.
    IMHO the most important reason for using ojdeploy instead of javac when creating an EAR is that javac CANNOT validate your BC. This means for example that if you refactor-rename an attribute of a VO and then commit only xml and not the related View Row Impl class, the build in your CI server will succeed if using only javac and fail if using ojdeploy (as it should be). So ojdeploy is the only way when building jars of Model projects if you want to be 100% sure the you have valid ADF code.
    The question is if the is a similar reason for using ojdeploy when building ViewController jars/wars??
    Thanx in advance for any feedback.
    Spyros Doulgeridis
    adfhowto.blogspot.com
    Edited by: spido on Jul 6, 2011 10:04 AM

    ojdeploy makes changes to your descriptors javac or jar does not know about. Actually nobody knows about the changes as you have to look into the war to see them. I'm not even sure that they are documented.
    Timo

  • Not able to build osb jar using osb 10.3

    Hi All,
    I am working on developing an osb jar from workspace(osb 10.3) using ant scripts.When i am trying to invoke an ant with target "export" it show an error "Java returned :13".I went through the entire post sent by respected people over the forum but i am not able to solve it.
    Script which i am using :
    <project name="ConfigExport">
    <property file="./build.properties"/>
    <property name="eclipse.home"
    value="${bea.home}/tools/eclipse_pkgs/2.0/eclipse_3.3.2/eclipse"/>
    <property name="weblogic.home" value= "${bea.home}/wlserver_10.3"/>
    <property name="metadata.dir" value="${workspace.dir}/.metadata"/>
    <target name="export">
    <available file="${metadata.dir}" type="dir"
    property="metadata.dir.exists"/>
    <java dir="${eclipse.home}"
    jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar"
    fork="true"
    failonerror="true"
    maxmemory="768m">
    <arg line="-data ${workspace.dir}"/>
    <arg line="-application com.bea.alsb.core.ConfigExport"/>
    <arg line="-configProject ${config.project}"/>
    <arg line="-configJar ${config.jar}"/>
    <sysproperty key="weblogic.home" value="${weblogic.home}"/>
    </java>
              <antcall target="deleteMetadata"/>
    </target>
         <target name="deleteMetadata" unless="metadata.dir.exists">
    <delete failonerror="false" includeemptydirs="true"
    dir="${metadata.dir}"/>
         </target>
    </project>
    It seems that on debugging the error in eclipse log say for ex: C:\bea\tools\eclipse_pkgs\2.0\eclipse_3.3.2\eclipse\configuration\
    show me an error saying : "java.lang.RuntimeException: Application "com.bea.alsb.core.ConfigExport" could not be found in the registry."
    It seems that com.bea.alsb.core.ConfigExport not able to find the class which is used to export an osb jar.Moreover in the thread posted basically talks about osb 11 so i am not able to find many folders like middleware,oracle,osb.home.
    Please let me know what is the possible solutions for this in osb 10.3.
    Regards,
    Rajeev Goel
    (Application Developer)

    see here Export from OEPE not working for an answer, that I copy/paste here:
    You have to verify if your OEPE instalation has the following file in the directory dropins (e.g C:\Oracle\middleware\oepe11.1.1.3\dropins)
    filename:
    oracle.osb.ide.link
    content:
    path=C:/Oracle/Middleware/Oracle_OSB1
    Under the Oracle_OSB1 you have an eclipse directory with needed plugins:
    e.g. C:/Oracle/Middleware/Oracle_OSB1/eclipse is not empty
    This is only a sample directory naming from Windows installation, I had a problem on RHEL 5.3 where installer did not put such files.
    Then I took the files from Windows installation.
    I suspect the files are installed "automatically" but I am not sure when.

  • How to configure maven to build EJB Jar?

    Hi!
    I would like to know how you setup Maven2 or alternatively Ant to build an EJB Jar.
    I have managed to do this in Maven by adding required jars to my local repository and added dependencies in the pom.xml file. This, however, do not seem like a good solution. I would like set some kind of classpath for maven to look for all libraries included in my application server.
    Could you please help me to solve this and I will be most grateful?!
    /Leo

    Hi,
    this is not an Eclipse forum but JDeveloper and ADF. Please try StackOverflow
    http://stackoverflow.com/questions/tagged/eclipse
    (Before I would search on StackOverflow if this question has been ansered before)
    Frank

  • Cannot build EJB jar file in NWDS

    hello,
    I changed java beans file, and tried to build jar file again, then the "build EJB archive" context menu is disabled so I can not make EJB jar file!
    So frustrated.. NWDS recognizes the changes in the java files , right? How come there 's no Build menu..
    Is there any pre-requisite to enable the menu?
    I have no idea how I can build jar file..
    Please give me a advice.. Thanks~!

    You might check the weblogic.developer.interest.ejb.tools new group.
    Make sure that the tool doesn't leave this ejbcgen directory around. It
    should delete
    that temp dir. When it doesn't it keeps all the old generated stuff around
    and your changes won't be
    reflected in the new jar.
    Rodrigo Ruiz Aguayo <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I have a problem with the EJBDeployerTool. When I want to update
    a class file (for example, because I corrected any problem), the
    deployer tool doesn't update the file correctly. It keeps the
    old version of the class file.
    In order to update a jar I have to copy the newer version in the
    .ejbdeployer/provider-projects directory by hand. Is it a bug?
    Is there any other way to do this? We are wasting too much time
    in this task, instead of programming :_(
    Thanks in advance,
    José Rodrigo Ruiz Aguayo e-mail : [email protected]
    I.T. en Informática de Sistemas webpage : ---------------------
    "Simulation is perfect, whenever we're not talking about reality"

  • Problem building EJB jar file using Eclipse

    Hi,
    Here's my file sturcture.
    ejb\x\y\z\test\
    ejb\x\y\z\test1\
    'ejb' is the root directory.
    The java source files under 'test' have a package name x.y.z.test.
    The java source files under 'test1' have a package name x.y.z.test1.
    I want to build a EJB jar file for 'test' and 'test1' separately. In eclipse when I create an EJB project, I specify the root folder as the source in the java build path settings. So the project explorer in Eclipse shows both the packages since they are under the same root folder. When I try to do 'Export - EJB Jar File', it includes both the 'test' and 'test1' in the .jar. Is there a way to build them separately ?
    Thanks,

    As far as I know, there is no way in Eclipse to specify a package prefix for a source folder. Assuming that you are not using an operating system with support for symbolic links at FS-level, the only way I can think of solving your problem is via linked folders and includes/excludes.
    1. Create two ejb projects in your workspace. Specify locations somewhere independent of where the root of your source tree is located.
    2. Right click on proj1 and select Properties / Java Build Path / Source.
    3. Click Link Source and specify the location to your source root on disk. Click Next.
    4. In the inclusion patterns section, add a pattern that captures classes appropriate for that module. Click Finish.
    5. Delete the original source directory that was created during project creation before leaving Build Path configuration dialog.
    6. Repeat steps 2-5 on the second project, except specify a different inclusion pattern.
    This should produce a project structure that Eclipse will be happy with, but you have to be a little bit careful. Even though you filtered out classes from the view of the java compiler for a particular project, you will still see them listed in the various navigational views (such as Package Explorer or Project Explorer). Don't modify these filtered out files. The project that is supposed to be building them will not react to changes in the other project. You will have to manually refresh (right click on project and select refresh) the other project before the java compiler will see changes.
    Hope this will help you out.
    - Konstantin

  • Building ejb jar

    Hello everyone!
    I am a new guy to Workshop, so I have a tiny problem:
    when I build EJBproject, Workshop puts all the generated sources in the jar. How could I workaround that? I'm using IDE build, WLS 8.1.
    TIA
    Kostaky

    As far as I know, there is no way in Eclipse to specify a package prefix for a source folder. Assuming that you are not using an operating system with support for symbolic links at FS-level, the only way I can think of solving your problem is via linked folders and includes/excludes.
    1. Create two ejb projects in your workspace. Specify locations somewhere independent of where the root of your source tree is located.
    2. Right click on proj1 and select Properties / Java Build Path / Source.
    3. Click Link Source and specify the location to your source root on disk. Click Next.
    4. In the inclusion patterns section, add a pattern that captures classes appropriate for that module. Click Finish.
    5. Delete the original source directory that was created during project creation before leaving Build Path configuration dialog.
    6. Repeat steps 2-5 on the second project, except specify a different inclusion pattern.
    This should produce a project structure that Eclipse will be happy with, but you have to be a little bit careful. Even though you filtered out classes from the view of the java compiler for a particular project, you will still see them listed in the various navigational views (such as Package Explorer or Project Explorer). Don't modify these filtered out files. The project that is supposed to be building them will not react to changes in the other project. You will have to manually refresh (right click on project and select refresh) the other project before the java compiler will see changes.
    Hope this will help you out.
    - Konstantin

  • Ant help - building a jar with image files.

    I have a jar that contains a handful of image files in a "resources" folder. I used the following command:
    jar -cf resources.jar resources/Now I need to make ANT do the same thing. I tried the following, with no success:
    <property name="build" location="bin"/>
    <property name="dist" location="jars"/>
    <jar jarfile="${dist}/resources.jar" basedir="${build}">
      <arg value="-cf" />
    </jar>In the above example, the "bin" directory contains the "resources" directory that I want to put into the jar. Basically, I need to know how to specify the "-cf" args, and how to specify the target directory as "resources." Can anyone tell me how this is done?
    Thanks.

    Hi micah,
    I can just give you an hint:
    With Ant each tasks has its own properties wich are described in xml. So for your jar generation you should look for the possibilities in the description of the ant task in.
    http://ant.apache.org/manual/index.html
    I guess you need some <include> elements in your <jar> target.
    Regards,
    Martin

  • Building ear, jar and war

    Do I need a special tool to build the ear, jar and war files necessary for a J2EE application?
    And where can I find such tools?

    you don't need a special tool, with the jdk you have a command jar who make special file. The syntax is jar -cvf name.jar <directory>. jar only display you the correctly syntax.
    For the ejb.jar you have to respect the tree of the application with the directory meta-inf
    For the project.war you do hace the web-inf directory with web.xml
    For the project.ear you have to add the .jar and the .war into and a dirctory meta-inf with the fila application.xml
    If you find this too difficult some products like Jdevelopper make this very correctly

  • Build a .jar from an applet

    Hi. I have the following code.
    import controller.Application;
    import model.Slideshow;
    import view.MainFrame;
    import java.applet.Applet;
    public class Main extends Applet {
        public void init() {
            Slideshow slideshow = new Slideshow("untitled.xml");
            Application app = new Application(slideshow);
            new MainFrame(app);
    }I can create the .jar file but when I open it a message of "couldn't finde main class" appears... obviously... it's an applet ! how can I create an excecutable file? thanks very much

    Akcents wrote:
    public class Main{
    public static void main(String[] args) {
    Slideshow slideshow = new Slideshow("untitled.xml");
    Application app = new Application(slideshow);
    new MainFrame(app);
    how can I make an executable file with this class????
    This question is quite different from your original question. Is it your intent to convert the application into an applet or are you interested in creating an [executable JAR file|http://java.sun.com/javase/6/docs/technotes/guides/jar/jarGuide.html]? If it's the latter, when bundling your application in a JAR file you'll need to update the [JAR file manifest|http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html] with a Main-Class entry. If it's the former, the following link will be helpful:
    [http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html |http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html ]

  • SQLJ: unable to find input file null   (Error while building EJB.jar file)

    Hi,
    I am working on open SQL/SQLJ with the following details
    Name:Employee application(adding an employee to MAXDB through SQLJ connection)
    FRONT-END:JSP/SERVLET
    Middle:Stateless bean with DAO(DB connection) coming from SQLJ
    Back-end:MAXDB
    I have following in abc.sqlj file
    #sql public context Connx with (dataSource = "java:comp/env/jdbc/SAPTSTDB")
    and creating instance and adding to DB in another say xyz.sqlj file
              Connx con = null;
              try{
                   con = new Connx();
                        #sql [con] {insert into TMP_DB1(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL)
                        values(:(employeeDTO.getEmployeeId()),
                                 :(employeeDTO.getFirstName()),
                                 :(employeeDTO.getLastName()),
                                 :(employeeDTO.getEmail()))};
    My build has no errors..but while building EJB archive with above sqlj files, am getting following error
    "SQLJ: unable to find input file null" for both sqlj files.
    Anybody faced this kind of issue, pls reply back.
    Thanks
    parveen

    Hi,
    I am working on open SQL/SQLJ with the following details
    Name:Employee application(adding an employee to MAXDB through SQLJ connection)
    FRONT-END:JSP/SERVLET
    Middle:Stateless bean with DAO(DB connection) coming from SQLJ
    Back-end:MAXDB
    I have following in abc.sqlj file
    #sql public context Connx with (dataSource = "java:comp/env/jdbc/SAPTSTDB")
    and creating instance and adding to DB in another say xyz.sqlj file
              Connx con = null;
              try{
                   con = new Connx();
                        #sql [con] {insert into TMP_DB1(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL)
                        values(:(employeeDTO.getEmployeeId()),
                                 :(employeeDTO.getFirstName()),
                                 :(employeeDTO.getLastName()),
                                 :(employeeDTO.getEmail()))};
    My build has no errors..but while building EJB archive with above sqlj files, am getting following error
    "SQLJ: unable to find input file null" for both sqlj files.
    Anybody faced this kind of issue, pls reply back.
    Thanks
    parveen

Maybe you are looking for

  • Report by Internal Order that includes cost element and order type

    Good Morning Gurus' Is there an SAP Standard Report that shows Internal order, cost element and order type?  I find many with order, but not order type. Thanks a million!!

  • Skinning of parameter "empty text " in table.

    hi everyone, How to do styling of empty text of default text in table .(It comes when there is no data in the table) such as "No data to display" ,I want to change its font ,font size etc. Please help.

  • Otherwise functional app. on IWS60sp1 and Struts 1.1 results in error

    An application that was running fine on Tomcat (Struts1.1) has been deployed (successfully!? according to the log) on IWS, but there's an error at runtime: [03/Dec/2003:14:32:49] info ( 680): jsp: init [03/Dec/2003:14:32:49] failure ( 680): Internal

  • Two problems with external services

    Hi, we got a WSDL including three external services. I successfully created a consumer proxy for the WSDL. When calling the methods of the consumer proxy from my WebDynpro application I get some errors. One of the external services is working fine. T

  • Cci resource adapter in weblogic

              Hi,           I am trying to install the cciblackbox-tx resource adapter that comes with           sun reference implementation. I successfully deployed the resource adapter and           created the stored procedures in cloudscape. I get a