Executable JAR using JDeveloper

Hello

I created a very small office with JDeveloper Application.

What I want to do is to create an executable JAR file. I mean, is there any option in this tool such as in Eclipse. Once executable JAR is created, I must be able to run it simply by double-clicking on the JAR file.

So can some1 please help me with the steps?

JDeveloper: 11.1.1.6.0

For executable jar, you will need to add:

Main-Class: your_package.YourClass

in META-INF/MANIFEST. MF file within the jar.

I don't think JDeveloper support custom files you can modify this content after the jar is created (for example, with a tool for zip/rar/7z)

In addition, if your application requires some extra pots, you will need to add this line to manifest:

Class-Path: additional.jar

Dario

Tags: Java

Similar Questions

  • Memory used by the Windows executable jar file

    I wrote a java program that locates my position of mouse pointer, and then it moves on the screen using the Robot class. I created a file executable (executable) jar of this java single file and executed. Then I went to Task Manager processes list and saw that the exe is 11MB, which seems pretty huge for me. Anyone know why its occupying 11 MB of memory? And is it normal to occupy this physical memory much?

    Only 11MB? What is your problem? In order to execute a jar file, the JAVA virtual machine must be loaded into memory, so this 11 is actually JVM + your jar file, as well as all resources used.

  • Why - jar option used to install software that is located in the executable jar file?

    Hi all
    I have a question, I have a generic installer that is used to install oracle weblogic 10.3 in unix (i.e., who is in the .jar extension) platform which is the executable jar file.

    To install this software that do use - jar installation option
    java-jar net_server < version > _generic.jar

    My question why we use - jar option of install or extract the software

    can any one clarify my doubts...

    Thanks in advance
    Aerts

    Published by: sumanth_abhi on January 27, 2009 23:50
  • Deploy on executable jar file

    Hi all.

    I have a special need to deploy an application into an executable jar file (so it could be run as java-jar xxxxxx.jar). It is an app of the ADF, and there just the model layer. It has a main method that works perfectly inside the JDeveloper runtime.

    I use ADF components (entity objects, see objects, Application Module, etc.).

    I tried to deploy it in a jar file and libraries has added to its deployment profile. When I try to run it, I always get:

    Exception in thread "main" oracle.jbo.JboException: Houston-29000: Unexpected exception caught: oracle.jbo.ConfigException, msg = Houston-33003: the MyConnection_Dep login name is not defined.

    MyConnection_Dep is the login used in JDeveloper and defined in the Module of the Application, but it looks like the data connection are not deployed.

    Which can be missing? Any help would be appreciated.

    Thanks in advance

    In fact, it worked today. I used

    public class amConnection implements {EnvInfoProvider}

    public Object getInfo (String string, object environment) {}

    EnvHashtable Hashtable = (Hashtable) environment;

    envHashtable.put (Configuration.DB_USERNAME_PROPERTY, "username");

    envHashtable.put (Configuration.DB_PASSWORD_PROPERTY, "password");

    envHashtable.put (Configuration.DB_CONNECT_STRING_PROPERTY, "jdbc:oracle:thin:@myserver.domain.com:1521:xxx");

    Returns a null value.

    }

    All required jars are packed. It works very well.

    Thanks anyway

  • Displacement of the executable jar breaks the function of the app economy

    Since last week, I tried to deploy my application of office as an executable jar file, but I am facing the following problem: when I move the jar from its original location of construction, my application become impossible to write in external files. I first thought that the problem was the dependent path; However, when installs the app can still load the data in these files.

    The solution is probably simple, but for some reason, I still find .

    The application consists of a jar file and a folder named "files" containing text files (for example, library.data) to which the serialized objects are written.

    I wouldn't be surprised if the problem has to do with the file xml, but any change, I've tried so far have failed. If it is likely that this is the problem, I'll be happy to post a copy of it on demand.

    public static void saveLibraryToFile() {
        File file = new File(System.getProperty("user.dir")+"\\files\\library.data");
        if (file != null && file.exists()) {
            library = new Library(sortedAccounts, accountCategoriesMap, accountCategoriesList);
            try {
                FileOutputStream fos = new FileOutputStream(file);
                BufferedOutputStream bos = new BufferedOutputStream(fos);
                ObjectOutputStream oos = new ObjectOutputStream(bos);
                oos.writeObject(library);
                oos.close();
            } catch (Exception e) { // catches ANY exception
                System.out.println(e);
            }
        } else {
            System.out.println("this is not supposed to happen!");
        }
    }
    

    Any help would be greatly appreciated.

    (PS: A complete set for most of the relevant codes that I use, including the complete xml file Ant, located at:)

    ( http://stackoverflow.com/questions/22732274/java-save-method-stops-working-when-jar-is-moved)

    I partially solved my problem after reviewing the error from the console. Thank you baftos for me having to look it up.

    Apparently, all this time, my problem was caused by trying to launch the application after move on the desktop. If I move the application to another directory, such as C:\randomFolder, the app works very well.

    Being resolved, out of curiosity, is their anyway completely deny this problem and allow to run the application from anywhere? Or is it simply impossible because of the various security risks?

    ---EDIT-----------------------------------

    So the problem was more to do with the files/folders to access authorization and privileges.

    (check the rp0428 response below for more information)

  • Executable JAR to Eclipse with DLL

    Hello

    Is it possible to export an executable jar to Eclipse that understands and uses a dll?

    My simple application uses an "external" API - JIntelliType - a jar file and a dll belongs to it.
    I can run the well project of Eclipse, but I can't export to executable jar. I'm a little lost amongst classpath, path, path of construction, location of the native library, library referenced,...
    But perhaps it does not matter because after trying to get the issue on the net, I don't know if it is possible to do this with Eclipse (not without additional plugin at least).

    Could someone help me with this please?

    Thank you in advance!

    lemonboston

    Your issue is deployment. In Eclipse, you set up your development environment to include native binary files in the working directory projects. As soon as you leave Eclipse you have no more facilities and you will have to do with what the JDK has to offer. So your real question is: I have a pot and a DLL, the DLL depends on the pot. How can I run the application such that the DLL can be loaded by it?

    The answer is: you can provide through a property system (java.library.path) who must analyze the Java directory (and ultimately the OS) binary for native speakers, or you can simply place the DLL in the same directory as the jar. The working directory current (the directory where Java is invoked) is still on the pat of binary search of the operating system.

    The java tool documentation is here:

    http://download.Oracle.com/javase/6/docs/TechNotes/tools/Windows/Java.html

    To move a property of the system as a parameter, you would do something like:

    -Djava.library.path=path/to/libs java-jar yourjar.jar

  • How to create an executable JAR correct?

    Hello

    I have the following directory structure, it is the way in which the application is running and running Netbeans:
    -TicTacToe (directory)
    --board.jpg
    --manifest.txt
    --piece-black.png
    --piece-white.png
    --build (directory)
    ---classes (directory)
    ----MessagesBundle_en_GB.properties
    ----MessagesBundle_en_US.properties
    ----MessagesBundle_en.properties
    ----MessagesBundle_pl_PL.properties
    ----MessagesBundle_pl.properties
    ----MessagesBundle.properties
    ----com (directory)
    -----piotrraczko (directory)
    ------tictactoe (directory)
    -------here several class files, where TicTacToe.class should be the entry point
    I need to contain all of these files into an executable JAR file. How can I do it correctly? I tried this (where manifest.txt contains the entry point information):
    jar cfvm TicTacToe.jar manifest.txt board.jpg piece-black.png piece-white.png ./build/classes/
    But when I then try to run the JAR file I get this error:
    -bash: ./TicTacToe.jar: cannot execute binary file
    Thank you
    PR.

    Published by: Aardenon on August 8, 2011 12:10

    You must use Class.getResource () or getResourceAsStream().

    Obviously if an image file is inside a jar file, it is not visible to the file system (not that is not in any directory).

    The above methods responsible for the classpath, working with pots and jars exploded.

  • Re: How to configure Ant in adf application using Jdeveloper 11.1.2.3.0?

    Hi all

    I use jdev 11.1.2.3.0.

    Any can help me how to configure Ant in adf application using Jdeveloper 11.1.2.3.0?

    With respect,

    satishkumarN

    HI Sissi,

    Your question is not able to understand. I guess you are looking for building project using ant for deployment.

    Please find the links below

    Construction projects with Ant

    Use of Maven in JDeveloper 11.1.2: asked to build ADF with Maven using Ant ojdeploy

    One size does not fit all: using ojdeploy and Ant to create pots of ADF library

    Thank you

    Nitesh

  • Using JDeveloper with OFA extension without EBS

    Hey everyone;

    Well, my question is can I use JDeveloper woth OAF exstensions to develop the app without using EBS?

    Why would you do that?
    ADF offers much better functionality for your applications, if you don't develop of EBS.
    Just select the latest version of JDeveloper and use it for your independent applications.

  • Creating a jar using api

    Hi all

    Using JDK 6, I need to use api jar to create a jar for a simple JavaFX application. I used to use api jar to create files jar for Java applications, but now I need to do the same for JavaFx applications. The problem is the referencing 'Jfxrt.jar' of JavaFX. I can't put it in the directory where the 'jfxrt.jar' is on the way to class because the directory name includes spaces, and the names of entries cannot have spaces, e.g. "c:\Program file...". ». What can I do?

    Thank you

    Hi gen,.

    I don't know what the average pot in the api. Do you mean this api? http://docs.Oracle.com/javase/1.4.2/docs/API/Java/util/jar/package-summary.html

    Or you want to jar file using the command line?

    If you use the command line, then either you can define Class-Path to the "Manifest.MF" or you can run the jar using Classpath

    With the help of the "manifest. MF.

    Manifest-Version: 1.0
    Class-Path: . file:///C:/Program%20Files%20(x86)/Java/jdk1.7.0_09/jre/lib/jfxrt.jar
    Main-Class: test.HelloWorld
    

    For more info goto manifest here: http://docs.oracle.com/javase/tutorial/deployment/jar/defman.html

    With the help of option - cp when running command line Jar

    Syntax: java -cp "current path;path of your jfxrt" -jar JarfileName.jar
    Example: java -cp ".;C:\Program Files (x86)\Java\jdk1.7.0_09\jre\lib\jfxrt.jar" Test.jar
    

    Using one of the above approach can run the jar file containing the class of javafx

    Thank you
    Narayan

  • How to access a project using JDeveloper Extension libraries

    Hello

    I am working on a class for JDeveloper Extension loader. My scenario is:

    1. I created a new java using JDeveloper Extension file.
    2 based on setup of libraries in the project properties, COMPILE this new java file and load the current ContextClassLoader.
    3. use the class responsible for doing something else (generate a new artifact).

    Step 3 is unlikely to change, so what I have to do is to compile the new java file and load it into the ClassLoader. However, I can not get the list of libraries in the context of the project dependencies. When I look in the JDeveloper extension API, I found this example:

    Import oracle.jdeveloper.model.JProjectLibraries;
    Import oracle.jdeveloper.library.JDK;
    Import oracle.jdeveloper.library.JLibrary;

    Connect the adapter.
    JProjectLibraries projLibs = JProjectLibraries.getInstance (project);

    Download the project JDK.
    JDK jdk = projLibs.getJDK ();

    Get an array of libraries referenced by this project.
    Library [libs = projLibs.getLibraries ();

    However, I can not find oracle.jdeveloper.model.JProjectLibraries under JDevelop 11.1.2.0.0 (11 GR 2). The document is 11 GR 1 material. I don't know if this one is obsolete, or is it anyway to get the list of library to a project.

    I tried the following:

    JdevClassLocatorFactory jdevClassLocator = new JdevClassLocatorFactory();
    ProjectClassLocator projClassLocator = (ProjectClassLocator) jdevClassLocator.getProjectLocator (app, currentProject);
    projClassLocator.getLibrariesFor (currentProject);

    However, getLibrariesFor (Project) is a protected method, non-public method. Is there anyway that I can compile and load the java file newly created programmatically?

    Best regards

    Harry

    Harry,

    For the execution of a project class path, use oracle.jdeveloper.model.PathsConfiguration.getInstance (project) .getRunClassPath () which includes required to carry pots and .class files.

    Keimpe Bronkhorst
    JDeveloper team

  • How to deploy ADF to EAR without using jdeveloper?

    I can deploy a web application to adf in the EAR file using jdeveloper.
    How do online order?

    I agree with Aino that Maven is a possibility – however, there are a LOT of upfront work to properly put in place. If Maven is a standard of company where you work, then it may be worthwhile to invest the time. I still think that ojdeploy is the simplest option today.

    John

  • How to develop applications for EBS using jdeveloper 11 g?

    There is "workspace configured oracle applications" in oracle jdeveloper 9i. Why not in jdeveloper 11g?
    How to develop applications for EBS using jdeveloper 11 g?

    Thank you!

    Yes, once you hear the magic words (OFA)...

    In fact, no versions of JDeveloper you get OTN support OFA, only very specific downloads OAF you get from https://support.oracle.com do.

    John

  • using jdeveloper to develop jsp/servlet

    Hello

    I'm trying to use jdeveloper to develop jsp/servlet
    But on my jdeveloper 11, do not seem any project jsp/servlet, why?
    any addon?

    Note: I have install in basic installation and java edition

    Thank you!
    Francis SZE

    Servlet + JSP are part of J2EE, and you must have the studio edition.

    When you create the application, the second screen of the wizard allows you to specify the technologies. You can also double click on the project and click on the category 'Technology extended' to do the same.

    John

  • Consume peoplesoft Web services using Jdeveloper authentication failure

    Hello

    I use Jdeveloper 11 g to consume the webservice of peoplesoft and following the exact steps in the following article.
    http://www.Oracle.com/technology/tech/fmw4apps/PeopleSoft/OFM-PSFT-blog-postings.HTML#Web-services
    The Web service I use is different from the example I use the production version of the wsdl file.
    After following all the steps, the generated proxy creates not poseurs of the getter for user name, password (Basic authentication).
    Is it supposed to auto generate or what I need to encode?
    I did the code of the getter set username and password and provide the credentials, but I get an error authentication failed.

    java.rmi.RemoteException: SOAPFaultException - FaultString FaultCode [http://schemas.xmlsoap.org/soap/envelope/ {} Client.Authentication] [did not receive message weblogic.wsee.util.AccessException: a code of 401 error (unauthorized) was returned by the server to http://ps-dev-web.kc.lan:30710/PSIGW/HttpListeningConnector.] Please check that the username and password are set correctly and that you are authorized to access the requested method.
    -> Http://ps-dev-web.kc.lan:30710/PSIGW/HttpListeningConnector server returned a code of 401 error (unauthorized). Please check that the username and password are set correctly and that you are authorized to access the requested method.
    ] FaultActor detail [null] [< detail > < bea_fault:stacktrace xmlns:bea_fault = "http://www.bea.com/servers/wls70/webservice/fault/1.0.0" > weblogic.wsee.util.AccessException: a code of 401 error (unauthorized) was returned by the server to http://ps-dev-web.kc.lan:30710/PSIGW/HttpListeningConnector.] Please check that the username and password are set correctly and that you are authorized to access the requested method.
    at weblogic.wsee.connection.transport.http.HTTPClientTransport.handleErrorResponse(HTTPClientTransport.java:373)

    The code I used to generate getter, setter is

    -These methods have not generated-
    public String getPassword() {}
    (String) return ((heel) port). getProperty (Stub.PASSWORD_PROPERTY);
    }

    public void setPassword (String password) {}
    ((Heel) port). setProperty (Stub.PASSWORD_PROPERTY, password);
    }

    public String getUsername() {}
    (String) return ((heel) port). getProperty (Stub.USERNAME_PROPERTY);
    }

    {} public void setUsername (String username)
    ((Heel) port). setProperty (Stub.USERNAME_PROPERTY, username);
    }
    I don't know where I'm going wrong, credentials, I used the work normally but do not work with this application.
    I'd appreciate if I can get some light on this issue.

    Thank you
    Ash

    Published by: [email protected] on June 2, 2010 07:56

    In your case, the settings are not IN/OUT but OUTSIDE.
    To create the owner and get the values after the operation, you must do something like this:

    Create the parameters of the licensee
    Holder nt new holder =();
    Holder det holder new =();

    Make the call
    port.createCompIntfcKCMWEBCASECI (nt, det);

    Get the value
    System.out.println ("Value is" + nt.) Value();

    Thank you
    Vishal

Maybe you are looking for