Amir
Amir

Reputation: 1979

how make excutable for my java application with JDeveloper

I want to create an excutable file for my java project, previous time I do it by Jbuilder or netbean as I remember but I dont know how I should do it in JDeveloper to make Excutable file(EXE file)

please advice me, please describe clearly...

EDIT: It's simple desktop application.it is not web application....

EDIT2: I remove that part for checking argument and run my program I face with this problem: what should I do?

Executing: C:\JDeveloper\mywork\SourceManagmentTools\Client\deploy\SMT.exe
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: oracle/jdeveloper/layout/VerticalFlowLayout
    at Main.GUI.SmMainFrame.<init>(SmMainFrame.java:134)
    at Main.GUI.SmRun.<init>(SmRun.java:25)
    at Main.GUI.SmRun$1.run(SmRun.java:82)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: oracle.jdeveloper.layout.VerticalFlowLayout
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 17 more

Upvotes: 0

Views: 4119

Answers (3)

Amir
Amir

Reputation: 1979

it so simple guys... I solved my problem in this way...simplest way....

first of all check the version of java that installed in your client computer, you check by this command in CMD: java -version

after you make sure about java version you need to make a bat file. [conflict in version maybe cause null except] after that you should know which external package u used in this project... for example I used 1 file for connecting to oracle database "ojdbc14" and the other for GUI, after that you can simply run your program or even pass parameter to them by just mention them at end of name of runable of your class:

java -client -classpath ojdbc14.jar;lipstikLF-1.1.jar;swing-layout.jar;smt.jar Main.GUI.SmRun rimrim

I guess those library we used in our project need also run, but I am not sure, I just suggest this work

java -client -classpath <name of you library>;<name of you library>;<name of your jar file> nameOfPackage.nameOfRunClass parameter[if any]

I will so appreciate if anybody add some useful info to this post

Upvotes: 0

Edwin Dalorzo
Edwin Dalorzo

Reputation: 78639

Have you considered Launch4j?

Regarding your configuration problem, the Launch4J documetation says:

Additional JVM options at runtime

When you create a wrapper or launcher all configuration details are compiled into the executable and cannot be changed without recreating it or hacking with a resource editor. Launch4j 2.1.2 introduces a new feature that allows to pass additional JVM options at runtime from an .l4j.ini file. Now you can specify the options in the configuration file, ini file or in both, but you cannot override them. The ini file's name must correspond to the executable's (myapp.exe : myapp.l4j.ini). The arguments should be separated with spaces or new lines, environment variable expansion is supported, for example:

# Launch4j runtime config
-Dswing.aatext=true
-Dsomevar="%SOMEVAR%"
-Xms16m

Other alternatives that you may consider are JSmooth,WinRun4J.

Upvotes: 1

Andrew Thompson
Andrew Thompson

Reputation: 168845

If your desktop application has a GUI, and you can distribute it from a site, look to Java Web Start.

JWS provides a 'one-click' installation option for the end user, automatic updates, desktop integration, splash screens and much more. It is part of the standard Java(1) distribution (since 1.4.2) & is supported by Oracle.


(1) JWS works with standard Jar files - no exe needed, which means it will work on *nix & Mac.

Upvotes: 0

Related Questions