Bundling .jar files to .app in Mavericks?

So I just updated to Mavericks like everyone else because it's free. However I am a Java developer and I would like to bundle my .jar files into a Mac executable. However, a few things have changed with Mavericks, as with all updates to OS X. For one thing, there's no /usr/share/ant/ directory. There's /usr/share/, but not an ant/ folder.
So my point is this: do you know of a good updated site that shows jar bundling?

This is how I managed to do it. I use NetBeans to compile to a .jar file. You also need to have the Java jdk1.7.0_45.jdk installed.
A) Download apache-ant-1.9.3-bin.tar.gz from http://ant.apache.org/bindownload.cgi to your Downloads folder
B) In the terminal do the following (taken with some changes from http://stackoverflow.com/questions/3222804/how-can-i-install-apache-ant-on-mac-o s-x)
cd ~/Downloads # Let's get into your downloads folder.
tar -xvzf apache-ant-1.9.3-bin.tar.gz # Extract the folder
sudo mkdir -p /usr/local # Ensure that /usr/local exists
sudo cp -rf apache-ant-1.9.3 /usr/local/apache-ant # Copy it into /usr/local
# Add the new version of Ant to current terminal session
export PATH=/usr/local/apache-ant/bin:"$PATH"
# Add the new version of Ant to future terminal sessions
echo 'export PATH=/usr/local/apache-ant/bin:"$PATH"' >> ~/.profile
C) Get appbundler-1.0.jar  from http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.h tml
There is some good detailed information there also about bundling.You may need to set your JAVA_HOME parameter.
D) Then comes the bundling procedure:
1) Compile your source code to get a .jar file in the dist folder.
2) Make a bundle file or if you use Netbeans, edit the file build.xml in the top project folder.
<taskdef name="bundleapp"
             classname="com.oracle.appbundler.AppBundlerTask"  
             classpath="lib/appbundler-1.0.jar" />
    <target name="bundle">
        <bundleapp outputdirectory="dist"
            name="MySourceName"
            displayname="MySourceName"
            identifier="package.MySourceName"
            mainclassname="package.MySourceName">
            <classpath file="dist/MySourceName.jar" />
            <option value="-Dapple.laf.useScreenMenuBar=true"/>
       </bundleapp>
    </target>
Edit the above text in some simple text editor and exchange MySourceName with your project name and  “package” with your package name. The line <option value="-Dapple.laf.useScreenMenuBar=true"/> will make your menu be placed in the Mac style.
Note! Beware of the difference “ and ". The corrrect one is the latter. TextEdit changed my hyphens to the bad ones which screwed up the bundling..
The edited file should reside in the top project folder under the name build.xml.
3) Place the appbundler-1.0.jar in a new “lib” folder in the top project folder.
4) Run terminal . Go to your Netbeans project folder using the cd command. The do
   ant bundle
and wait for BUILD SUCCESSFUL
The bundled Mac application will reside in the dist folder.
How to fix a specific icon to the application:
5) Open the bundled Mac application by CTRL-click and choose “Show Package Contents”
6) Double-click the Contents folder to open it. Put your tailor-made application icon “XXX.icns” in the Resources folder. Open the Info.plist and change Generic.icns to XXX.icns. Close the application folders. Sometimes the icon will only show up afterf you copy the application to another folder
Optional (This will make your application very big as it includes the Java jdk in the application, I didn't do this step. The only advantage is that it will make the application independent on the user having Java installed.a )
7) To include the jdk, open the app folder and put a copy of the jdk1.7.0_45.jdk in the Plugins folder.
Edit the Info.plist by adding a new child: JVMRuntime containing a string, jdk1.7.0_45.jdk

Similar Messages

  • Regenerate Jar files on apps and DB tier at same time?

    The process of regenerating product jar files takes about 30 minutes on each tier (apps tier has forms and web server while DB tier has Database, concurrent manager). Can i regenerate on bot tiers simultaneously via adadmin?
    Thanks

    from node 1
    Generate Applications Files
    1. Generate message files
    2. Generate form files
    3. Generate report files
    4. Generate graphics files
    5. Generate product JAR files
    6. Return to Main Menu
    Enter your choice [6] : 1
    AD utilities can support a maximum of 999 workers. Your
    current database configuration supports a maximum of 117 workers.
    Oracle recommends that you use between 16 and 32 workers.
    Enter the number of workers [16] :
    Your current character set is "WE8ISO8859P1".
    Do you want to generate Oracle Message files
    using this character set [Yes] ?
    Enter list of products ('all' for all products) [all] :
    The current set of installed languages is: US
    Please select languages for generating Oracle Message files.
    You may select all of the above languages, or just a subset.
    Enter list of languages ('all' for all of the above) [all] :
    You selected the following languages: US
    Is this the correct set of languages [Yes] ?
    Setting up environment...
    Generating message files...
    Creating FND_INSTALL_PROCESSES table...
    The table FND_INSTALL_PROCESSES created by AD Administration already exists.
    If you are sure you do not want to keep the information from the failed
    AD Administration session,you may drop FND_INSTALL_PROCESSES table and
    continue with AD Administration.
    If you choose not to drop FND_INSTALL_PROCESSES table, AD Administration
    cannot continue successfully.
    Drop FND_INSTALL_PROCESSES table [No] ?
    from node 2:
    Generate Applications Files
    1. Generate message files
    2. Generate form files
    3. Generate report files
    4. Generate graphics files
    5. Generate product JAR files
    6. Return to Main Menu
    Enter your choice [6] : 1
    AD utilities can support a maximum of 999 workers. Your
    current database configuration supports a maximum of 117 workers.
    Oracle recommends that you use between 16 and 32 workers.
    Enter the number of workers [16] :
    Your current character set is "WE8ISO8859P1".
    Do you want to generate Oracle Message files
    using this character set [Yes] ?
    Enter list of products ('all' for all products) [all] :
    The current set of installed languages is: US
    Please select languages for generating Oracle Message files.
    You may select all of the above languages, or just a subset.
    Enter list of languages ('all' for all of the above) [all] :
    You selected the following languages: US
    Is this the correct set of languages [Yes] ?
    Setting up environment...
    Generating message files...
    Creating FND_INSTALL_PROCESSES table...
    The table FND_INSTALL_PROCESSES created by AD Administration already exists.
    If you are sure you do not want to keep the information from the failed
    AD Administration session,you may drop FND_INSTALL_PROCESSES table and
    continue with AD Administration.
    If you choose not to drop FND_INSTALL_PROCESSES table, AD Administration
    cannot continue successfully.
    Drop FND_INSTALL_PROCESSES table [No] ? yes
    Dropping FND_INSTALL_PROCESSES table...
    FND_INSTALL_PROCESSES table dropped.
    Dropping AD_DEFERRED_JOBS table...
    AD_DEFERRED_JOBS table dropped.
    Writing dependencies of jobs to run to appldep.txt file...
    There are now 59 jobs remaining (current phase=admin):
    0 running, 59 ready to run and 0 waiting.
    Reading completed jobs from restart file (if any).
    There are now 59 jobs remaining (current phase=admin):
    0 running, 59 ready to run and 0 waiting.
    Starting worker processes.
    Worker process 1 started.
    Worker process 2 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 3 started.
    Worker process 4 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 5 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 6 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 7 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 8 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 9 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 10 started.
    Worker process 11 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 12 started.
    Worker process 13 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 14 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 15 started.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Worker process 16 started.
    Checking if all jobs have their actual and symbolic arguments in sync....
    Done.
    Writing jobs to run to restart file.
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Reading jobs from FND_INSTALL_PROCESSES table ...
    ************* Start of AD Worker session *************
    AD Worker version: 11.5.0
    AD Worker started at: Sat Jan 08 2011 17:28:07
    APPL_TOP is set to /u15/tec2/appl
    Done reading jobs from FND_INSTALL_PROCESSES table ...
    Telling workers to read 'todo' restart file.
    Done.
    Starting phase 1000 (admin): Administration
    There are now 59 jobs remaining (current phase=admin):
    0 running, 59 ready to run and 0 waiting.

  • Jar file dictionary app becomes invisible & can't ...

    Hi guys, I have downloaded & installed on my E90 a couple of dictionaries of jar.files applications, they weren't yet registered but after I backed up to Nokia PC suite, they seem to have vanished, icon & all.
    When I try to reinstall the phone indicates it already exist, I can't seem to find any trace of them, how is this possible? Please assist, thanks.

    I can't even uninstall these apparently invisible apps or files on my E90, I know they exist somewhere on memory card.
    These strange occurrence is affecting my confidence with software products & the stability of this phone, the worse thing is even reinstalling doesn't change the situation. I've never experience this on other smartphones I previously owned.

  • Unable to load classes from jar files inside APP-INF/lib in EAR.

    Weblogic version: 10.3.3
    Platform: Linux x86-64 bit
    We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
    for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
    in 10.3.2 version of weblogic.
    We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
    Any pointers would be appreciated.

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • WEB-INF\lib\ Jar files

    Hello
    I have a war module with this:
    /index.html
    /pages/ (my pages)
    /pages/js (my js)
    /pages/images (my images)
    /WEB-INF/classes/ (my servlet classes)
    /WEB-INF/lib/ (my lib jar files)
    /WEB-INF/web.xml (descriptor)
    ok,
    I run deploy tool,
    open this war file (module), (ex mod1.war)
    convert to ias module, modify the descriptor,
    verify (everything ok)
    save module
    create ear (ex ap1.ear)
    put this module within this ear
    create and save ear descriptor
    save ear
    verify (everything ok)
    deploy ear.
    ok,
    Why decompress my lib jar files in:
    /APPS/ap1/mod1/WEB-INF/lib
    These wil be fine if decompress the entire jars, but only extracts the class
    files and no the xxxx.properties neither messages.txt; exactly
    no extracts files that aren't .class. ???
    Are there any workaround to this that isn't copy the files? Figure not to
    have ftp acces in a sun? What we have to do?
    Thanks.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • Updating files inside App Bundle

    This is dealing with an app bundles in the normal desktop environment.
    I have a bundle I've created that has already been distributed. We've updated the code in the Jar file some and want to push this new Jar out to the existing bundles. There are user created files inside the existing bundles that should not be lost so simply creating a new bundle to replace the old isn't an option. Is there a recommended way to accomplish what I'm trying to do?

    KenW2 wrote:
    Am I getting trolled by lazarus because I made a n00b mistake and he's a jerk, or did I deserve that helpful reply because I'm stoopid?
    Neither of the above, Ken. Consider it an honor to have successfully invoked that visit. Q Lazarus has a mission here that few or none of us understand. Yet I know his work is not done.
    If some context would help, refer to the list of aliases provided by KT, and try to appreciate the author's unique style. I don't think it's overstatement to say that some of these contributions have elevated rudeness and abuse into an art form. In time--I got over my first helpful reply(TM) in just two short weeks--you may recognize the work of an authentic American crank, possibly one of the last of his kind. If you haven't done so already, try to see Clint Eastwood's +Gran Torino+. This is how I often imagine my hero--though Walt Kowalski had a front lawn to protect, and I don't think I know anyone in San Franscicso who owns a front lawn.
    That said, I must tell you that the programmer channeling Walt is an expert in most of the topics which earn his comments. Would you rather see a surgeon with a pleasant, supportive bedside manner, or one who knows what he's doing? His advice is almost always good, and on the days he remembers his meds, you'll find solid answers to the most difficult questions in the forum.
    Welcome to the Dev. Forum, Ken! I hope you'll be back whenever you can use some help, and whenever you can help someone else here.
    \- Ray

  • Will converting a .jar into a .app in jar bundler allow it to be run on macs that dont have java installed?

    hi everyone,
    I'm wondering if i were to take a .jar file and bundle it in jar bundler (making a .app), would this .app be able to run even on macs without the java JRE installed?
    thanks

    Please don't write Java apps.

  • Can all macs run .app files or .jar files?

    Hi everyone,
    I'm very confused concerning .app and .jar files. Do all macs natively have the capability to run .jar files?
    If not, could i use the jar bundler to create an .app file (would that run on all macs)?
    thanks

    .jar files are Java files. They may or may not run on most Macs because most Macs do not have Java installed. But one can bundle the Jave interpreter so that Java need not be present on the target computer.
    .app files are true executable applications.

  • Can't run JavaFX app as a jar file from command line

    I'm trying to build a JavaFX app from scratch (that is, by including the jar file from the JavaFX SDK rather than by using the special JavaFX project type from NetBeans). It runs fine in NetBeans. However, when I try to launch it as a jar file from the command line (using "java -jar dist\TestApp") I get the following. Has anybody seen this before, and if so how can I fix it?:
    *** Fallback to Prism SW pipeline
    Exception in thread "main" java.lang.RuntimeException: java.lang.UnsatisfiedLink
    Error: Can't load library: C:\dev\TestApp\dist\bin\mat.dll
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:
    289)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:68)
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherIm
    pl.java:145)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:
    27)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:97)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\dev\RedactionT
    oolPrototype\RedactionToolPrototype.Core\dist\bin\mat.dll
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoad
    er.java:155)
    at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoad
    er.java:85)
    at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:
    30)
    at com.sun.glass.ui.Application$1.run(Application.java:28)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:26)
    at com.sun.glass.ui.win.WinApplication.<clinit>(WinApplication.java:33)
    at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatform
    Factory.java:20)
    at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatform
    Factory.java:17)
    at com.sun.glass.ui.Application.Run(Application.java:51)
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:
    279)
    ... 5 more

    Unsatisfied link means that Java is trying to access a native library, but it cannot be found. As to why this error is being thrown, here is my guess:
    If you open up one of the sample jars with a zip viewer, you will see that the Manifest file has the following entries:
    >
    Manifest-Version: 1.0
    JavaFX-Version: 2.0
    implementation-vendor: Oracle
    implementation-title: BrickBreaker
    implementation-version: 1.0
    JavaFX-Application-Class: brickbreaker.Main
    Created-By: JavaFX Packager
    Main-Class: com/javafx/main/Main
    >
    In other words, a JavaFX project works a bit differently than a normal Java project. com/javafx/main/Main is used as the Main class and your "Main" class is called later.
    If you are trying to build this from a normal Java project, then com/javafx/main/Main will not be created and it will call your Main class right away. Thus, whatever setup is needed to run JavaFX will not occur.

  • App runs in Eclipse environment but not from jar file with no error message

    When I upgraded my jre to 5.0 my app does not run. After fixing the properties problem I had a few days ago it is now at least compiling and running within Eclpse
    However, when I export to a jar file it runs to a certain point and then just goes away with no error message!!! I've narrowed it down to the exact point where it dies but don't understand why it dies and especially gives me no errors whatsoever. It just goes away.
    It is creating an instance of a new class when it dies.
    Can someone please help me?

    Ok, well it doesn't. Anyway, I'm still having the same problems. I can run my jar file to a certain point and then the application just stops. I know this because I've put come message boxes in the application to let me know where in the app the system is.
    It always dies when it is instantiating the new class called HeidiFrame; done by:
    HeidiFrame heidiFrame = null;
    if I put code in between the above line and before the below line, this code will work fine
    heidiFrame = new HeidiFrame();
    but if I put code after the above line, nothing happens
    As I said this all worked fine until I upgraded to Java 1.5
    If you look at http://java.sun.com/javase/technologies/compatibility.jsp there are 23 compatibility issues with the new release. We're using xml stuff so that was my first problem and the code wouldn't even compiile. Once I added in libraries, the code compiled and ran beautifully.
    However, when creating my jar file so I can deploy this application , I've discovered that the jar file will only run to a certain point, as I've stated previously. So, that's my problem. Not that I can't run it from the command prompt, which I can't, but it's a gui application. I've tried changing things in the classpath file and the manifest to no avail. Nothing changes. The application starts but when it goes to instantiate the HeidiFrame class, which is the class that actually builds the gui it dies and goes bye bye.

  • LinkageError while trying to use war-file bundled jars

    Good day.
    I have a servlet for which I want to use the latest JAX-WS 2.1.4 jars. I compile my servlet, and include in the WEB-INF/lib/ directory those same JAX-WS 2.1.4 jars. According to the classloading scheme under the SJWS v7.0, I can enable my servlet to actually use those jars, rather than the functional equivalent, but older, versions the container would provide, by setting delegate="false" in the servlet's sun-web.xml file.
    http://docs.sun.com/app/docs/doc/819-2634/6n4tl5ko9?l=en&a=view
    When I deploy this servlet, and a client makes a request of it, however, I'm getting an odd exception:
    java.lang.LinkageError: JAXB 2.0 API jar is being loaded (from jar:file:/sun/webserver7/lib/webserv-jwsdp.jar!/javax/xml/bind/annotation/XmlSchema.class), but this RI (from jar:file:/sun/webserver7/https-msoa5/web-app/msoa5/tManager/WEB-INF/lib/jaxb-impl.jar!/com/su
    n/xml/bind/v2/model/impl/ModelBuilder.class) requires JAXB 2.1 API jar.
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
    at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
    at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
    at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
    at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
    at javax.xml.ws.spi.Provider.provider(Provider.java:76)
    at javax.xml.ws.Service.<init>(Service.java:57)
    at com.sun.fast.eventmgr.wsdl.WsdltventManagerV4Service.<init>(WsdltventManagerV4Service.java:46)
    My WEB-INF/lib/ directory contains the jaxb jars, which leaves me puzzled as to why the linkage error. Here is the set of jars in the WEB-INF/lib directory:
    sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/FastInfoset.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/activation.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/http.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxb-api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxb-impl.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxb-xjc.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxws-api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxws-rt.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jaxws-tools.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jsr173_api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jsr181-api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/jsr250-api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/mimepull.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/resolver.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/saaj-api.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/saaj-impl.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/sjsxp.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/stax-ex.jar
    /sun/webserver7/https-msoa5/web-app/msoa5/EventManager/WEB-INF/lib/streambuffer.jar
    Any suggestions on what the problem might be?
    Thanks.

    Thanks for the reply.
    The jar containing the sought class would be WEB-INF/lib/jaxb-api.jar per this brute force inspection:
    $ for i in $(find WEB-INF/lib/ -name \*.jar); do echo "---$i"; jar tf $i |grep javax/xml/bind/annotation/XmlSchema.class; done
    ---WEB-INF/lib/jaxb-xjc.jar
    ---WEB-INF/lib/streambuffer.jar
    ---WEB-INF/lib/jaxws-tools.jar
    ---WEB-INF/lib/FastInfoset.jar
    ---WEB-INF/lib/jaxb-api.jar
    javax/xml/bind/annotation/XmlSchema.class
    ---WEB-INF/lib/http.jar
    ---WEB-INF/lib/jsr173_api.jar
    ---WEB-INF/lib/jaxb-impl.jar
    ---WEB-INF/lib/activation.jar
    ---WEB-INF/lib/stax-ex.jar
    ---WEB-INF/lib/jsr181-api.jar
    ---WEB-INF/lib/jaxws-api.jar
    ---WEB-INF/lib/saaj-api.jar
    ---WEB-INF/lib/mimepull.jar
    ---WEB-INF/lib/jaxws-rt.jar
    ---WEB-INF/lib/saaj-impl.jar
    ---WEB-INF/lib/sjsxp.jar
    ---WEB-INF/lib/resolver.jar
    ---WEB-INF/lib/jsr250-api.jar

  • How to bundle java help class into jar file ?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    I think you'd be better off just adding the jh.jar as
    a classpath argument and running it like that:
    java -classpath /myjavalibdir/jh.jar -jar myjar.jar
    ...otherwise you're stepping into redistribution of
    binary issues licensing-wise. That won't work either; when you run java with the -jar option, it ignores both the -classpath option and the CLASSPATH environment variable. However, it will see jh.jar automatically if you put it in the <path-to-java>/jre/lib/ext directory. But for distribution purposes, it might be simpler just to combime the contents of jh.jar into myjar.jar (if you use Ant, its <jar> task makes that very easy). Or, you can just run it this way:java -classpath myjar.jar;jar/jh.jar MyMainClassBTW, I don't think redistribution is a problem; otherwise how anyone even use JavaHelp?

  • Bundling in jar file doubt

    my application uses the some image file and properties file i want to bundle all the required files into single jar file and while double click it should lonch
    how can i acchive this

    You're getting on my nerves, buddy. Most of your questions could be answeed by a little research.
    ClassLoader.getResource
    ClassLoader.getResourceAsStream
    Exectualble JARs
    If you now ask me to elaborate, I'll report you for abuse.

  • Bundling a native library in a jar file

    Is it possible to bundle a native library ( a windows dll ) in a jar file. How to let the vm know that the native dll is in a jar file.
    Is this possible?
    thanks
    --kiran                                                                                                                                                                                                                                                                                                                                                   

    hello all
    i cann't find out (or don't understand) the way what i need. i mean how can i copy the dll file(s) in the windows system diractory? i can put the dll in the jar file then how can i copy that dll after extract?
    "daney" said that he have done it.
    This certianly is possible. I have done it.
    You have to extract the dll from the jar file and write it to a temporary >file in the file system. Then call System.load() on the file you just >extracted.
    Do you want to delete the temporary file when you are done with it? >That is a bit more difficult, but it is possible if you use a ClassLoader >to run your code containing native methods.anybody have any idea how he has done? please give some details if anyone have worked on it before.i am waiting for the solutions.
    thanks
    bashar

  • Deploying Java Desktop App using executable JAR files

    Hi there.
    Today I am very optimistic about java. I am a beginner, and I had tried (in my few free time) to understand how to deploy java desktop apps.
    I am using the lattest NetBeans IDE to do the programming and it is very very fast and optimized.
    Going to the point, I tried some time ago to deploy an application (made with this IDE) using JAR files, but even though the application run well on my IDE, when I packed it, it rised an error saying that
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    I was using an absolute layout on my JFrame forms and this AbsoluteLayout is provided by netbeans and not by the normal SDK.
    I then looked for the absolute layout class and found a jar file in the following path:
    C:\netbeans\modules\ext\AbsoluteLayout.jar
    So I mounted the Jar file in my File Systems and then added the contents of the file to myApp.Jar file.
    I used the automated Jar Recipe Packaging feature of netbeans, that is why I needed to mount the AbsoluteLayout.jar file into my file systems.
    Now it runs fine by just right clicking the MyApp.jar file from Windows Explorer.
    In a next reply to this topic I will include some sample code so that anybody requiring to do such implementation can take this for help.
    Regards!
    JN

    Well,
    I will take some time here to show the basic source code and procedure to create a desktop application, pack it up in a Jar file for deployment, add other classes or jars to the deployment jar file and finally open the jar file as an executable. This applies for either windows and linux environments.
    Take in count i am using Netbeans IDE 3.x (3.5)
    First I open the IDE and create a new project called MyDesktopApp. This is done by going to the menu Project / Project Manager. Then click on the New button and specify the project name and click on OK.
    At this point, the Filesystems tab in the project explorer is empty. So I mount a directory to store myDesktopApp in it. I selected c:\MyDesktopApp but you can select any name you want.
    To mount the directory you follow these steps:
    1. Right-click on File Systems
    2. From the contextual menu select Mount > Local Directory
    3. In the filechooser window, you just browse it and SELECT the directory to mount. Be aware that you can even create the directory on this window. Do not enter (double-click) into the directory you want to mount, just select it and click on finish...
    4.Then the directory entry appears under the filesystems node of the project explorer.
    Now you have to create your application. You can either create a package (special configured and tracked directory) or you can create the clases directly inside the directory. For tidy project, I will create the package.
    To create the package follow these instructions:
    1. Right-click on the mounted directory and from the contextual menu select New > Java Package
    2. In the New Wizard - Java Package window, type the package name and click on finish. I use the "MyDesktopApp" as package name.
    OK. Now the package is created under the mounted directory. Now we have to create the Main Class. In this case I will use a JFRAME as the main class but you can create any class you want.
    To create the JFRAME as main class follow these steps:
    1. Right click on the java package you just created and select New>JFRAME from the contextual menu. If you do not see the JFRAME option on the NEW sub menu you will have to select the All Templates option. I explain the All Templates option now on, it will be easier to use the JFRAME if available. Once you use JFRAME with the all templates then the JFRAME will show up in further NEW usage.
    2. So finally we used the All Templates, and you select the Java GUI Forms > JFRAME form option and click on NEXT.
    3. Give it a name. (I used MyDesktopAppFrm) and click on finish. Be aware you can set advanced options by clicking on next. But for the purposes of this topic we will use default options so click on FINISH
    4. A new JFRAME form appears inside your package. Right click on the form and select Set layout > Absolute Layout.
    5. Add some controls and code. I added a label and a button. And coded the ActionPerformed event of the button to say hello! on the label. this is up to you. The code just looks as follows:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    jLabel1.setText("Hello folks!");
    6. Compile and execute the form.
    Let's say this is our Desktop Application. Now We will pack it in a Jar in two steps...
    A. Create a JAR file (Recipe)
    1. Right-click on your package and select New > All Tempaltes (Long Route) You can also select New > JAR Recipe if available.
    2. On the New Wizard Window, choose the JAR ARchives > JAR Recipe template and click on NEXT
    3. I used MyDesktopApp as the file name and Defaults and then click on Next.
    4. Specify the JAR Contents. Select the Package (not the mounted folder) from the mounted file system and click on add and then click on NEXT twice...
    5. On the JAR Manifest window, click on GENERATE
    6. Edit the manifest in the window to add the following code:
    Main-Class: MyDesktopApp.MyDesktopAppFrm
    7. Ensure the Main-Class definition is the same as your java package and JFRAME name. Click on FINISH
    8. At this point we have a jar file in your project directory but this file wont run because it is missing some Netbeans clases that we will add in the next set of steps... Just to check, compile the file (right click on the JAR file and compile) and try to execute. It must compile but must not execute.(well if it executes you are done. It may execute if you did not set the lay out of the form as AbsoluteLayout)
    B. Add the AbsoluteLayOut to the JAR
    1. Right click on File Systems and select Mount > Archive Files
    2. Look for your netbeans installation folder and select the following file:
    .../netbeans/modules/ext/AbsoluteLayout.jar
    3. Click on finish
    4. Now the JAR File is mounted in the file systems.
    5. Right-click on your MyDesktopApp.JAR file and select properties.
    6. Look for the contents property click once on it and then on its elipsis button [...]
    7. From the FileSystems box in the Contents window, select the AbsoluteLayOut file and click on Add
    8. Then the system asks you if you are sure. Of course you are so click OK. (If not sure, just read the message text and click OK...:-))
    9. Click on OK
    10. Compile your JAR Recipe (right click on it and Compile)
    11. Now you must be able to run the file by right clicking it and EXECUTE.
    12. Also you must be able to run the file by double clicking the file from a Windows Explorer. You may receive a message asking to select the program to run the file with. You must browse and select the Javaw.exe file in the bin directory of your Java RUn Time installation. This is typically located at C:\j2sdk1.4.0_01\jre\bin or something like that. Use the File-Search feature of window to locate the JAVAW.exe file if needed.
    I hope this long explanation helps somebody to deploy Java Desktop applications. Please reply the message if it helps you just to know it was useful.
    Thanks for your time....
    JN

Maybe you are looking for

  • I am trying to use a F

    lexmotion PCI-7344 with LabView for use as a Parabolic Antenna controller. The Problem is feedback from each axis (AZ & EL). Each axis uses 2 Synchro's (1:1 & 36:1 for Course & Fine 90V / 60Hz) for feedback. I have no choice in using synchro's as fee

  • Print options available in IE 5.2

    I'm hoping someone can find a way to implement Internet Explorer-type print options in Safari, or tell me of another browser with those options. I still use IE 5.2.3, the last version made for the Mac, when I want to print web pages because the Print

  • ITunes 11.1.5 No album covers anymore?

    Hi, I upgraded my iTunes recently and I was negatively surprised that it changed the iTunes Media's location without my agreement.  After that I changed again the location and I consolidated all my music.  Fortunately everything is in the right place

  • Deleting the storage location

    Hi, Can some one tell me how to delete the storage location. The situation is like this: Sales order has been created  for three different materials for a particular customer for a sales area. When out bound delivery was created for this order for on

  • Child projects will not open after new window is created in the master

    I am using Robohelp 9 (html) to created a Microsoft html file.  I have a master and child project.  My master projected uses a (WebHelp pro) window and the child uses a (HTML Help) Window.   Topics from the child project to open in the main window in