Building Java executables

Can anyone give me a pointer for a process to build and exe using a set of classes I have ?

Probably the most wonderful aspect of Java is its cross-
platform capability. Creating an executable from Java
classes defeats this feature. If you really want to
create an executable, you will need to use a third-party
tool such as IBM's VisualAge for Java, or one of the
Java-to-C translators available and then compile the
resulting C code.
Mark

Similar Messages

  • Building java executable for windows

    Well, actually I have two qestions:
    1) how it is possible to build executable running under windows using usual Java tools, e. g. ant or something like this?
    2) if I'm using VS.NET I can't compile files wich import javax. ... etc. classes, what I should to in order to import them?
    Any suggestions welcome.

    Well, actually I have two qestions:
    1) how it is possible to build executable running
    You want a .exe at a guess, search the forums.
    All the regs. have answed this many many many times, and some very good answers exist on the forums.
    Normally, when people ask this, they really need to read:
    http://java.sun.com/docs/books/tutorial/jar/
    http://java.sun.com/products/javawebstart/
    But sometime (not very ofton) a ".exe" is needed:
    http://gcc.gnu.org/java/
    http://www.excelsior-usa.com/jet.html
    under windows using usual Java tools, e. g. ant or
    something like this?Sure, make a new task. For GCJ this would be very easy.
    2) if I'm using VS.NET I can't compile files wich
    import javax. ... etc. classes, what I should to in
    order to import them?Are you compiling to .NET or to Java Byte Code.
    If its Java Byte Code, I have no idea, if its .NET the below might work
    http://classpath.org
    http://www.ikvm.net/

  • Failed to build Java Mail API 1.4.5 with maven-3.0.4

    Hi,
    I am trying to build Java Mail 1.4.5 with Maven-3.0.4 using default settings of maven.
    It is getting failed to build due to following errors -
    [ERROR] COMPILATION ERROR :
    [INFO] -----------------------------------------------------------
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [INFO] 8 errors
    [INFO] -----------------------------------------------------------
    [INFO] ----------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ----------------------------------------------------------------------
    [INFO] Total time: 1:51.197s
    [INFO] Finished at: Tue Jan 08 13:06:01 IST 2013
    [INFO] Final Memory: 12M/67M
    [INFO] ----------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
    3.2:compile (default-compile) on project javax.mail: Compilation failure: Compil
    ation failure:
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
    rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on
    project javax.mail: Compilation failure
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
    ild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
    eStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
    cher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
    a:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
    uncher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
    352)
    Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
    ure
    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
    Mojo.java:656)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
    BuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:209)
    ... 19 more
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionSame issue I am facing when I am trying to build Java Mail with netbeans - 7.2.1, it getting failed with same version issue in Session.java class.
    How can I set this Version in Session.java class to get rid of this error?
    If we can use nexus repository then please let me know how to set this.
    Thanks,
    Neelam Sharma

    I answered this question here:
    http://stackoverflow.com/questions/14217596/failed-to-build-java-mail-api-1-4-5-with-maven-3-0-4/14288418#14288418

  • Error while building an executable from vi

    Hello,
    I am trying to make a .exe file from the VI which includes Vision Aquisition Software also and while building it I get a error message--
    Error 1502 occurred at AB_Source_VI.lvclass:Close_Reference.vi -> AB_Build.lvclass: Save.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_Create_Build_Application.vi -> EBUIP_Global_OnCommand.vi -> EBUIP_Global_OnCommand.vi.ProxyCaller
    Possible reason(s):
    LabVIEW: Cannot save a bad VI without its block diagram.
    Can anyone tell me how to solve this problem ?
    Thanks in advance.

    I had done that and did not work.  I did not get rid of the old build defination, but started a brand new one via Tools>Build Application (EXE) from VI...  I got the same error 1502.  Inspecting the offending VI did not yield any obvious problem with the block diagram. 
    Upon searching for error 1502, I found this Know Issue link:
    http://www.ni.com/white-paper/11869/en.  Issue ID 255617 stated:
    Error 1502 can occur if dependencies are placed in non executing case structures
    In previous versions of LabVIEW you could place VIs in a case structure with a constant wired the the case selector. This would load the VIs at runtime. If you have this pattern and attempt to build an executable you could receive error 1502
    Workaround: Don't use unreachable code
    So the issue is I have an case structure with hard coded boolean, so the other case is unreachable.

  • How to build JAVA script in CMD

    How to build JAVA script in CMD command prompt?
    I think it's build.all but it's not working plz help

    To build a Java class file (ie compile it) you need to call the Java compiler javac. There is software around to make this easier:
    - ANT a make like tool but with XML files usually called build.xml
    - Maven a more convention driven approach for much complexer systems
    - IDEs like JDeveloper, Netbeans, Eclipse, you name it.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • XJC Tool - For building Java classes from Schema

    Hi all,
    I am using XJC tool for Building java classes from Schema.
    Can we have any other tool for generating java classes from Schema?
    Thanks in advance,
    typurohit

    Solved my own problem and forgot to post the answer: the "xsd:import" is also considered as a targetNamespace, so each xsd:import needs a package specified as well when using oracg. It would be helpful if the Oracle documentation had stated that, but it does not point this out.

  • Build Java DC

    Hi,
    Is it possible to build Java DC without having NW Infrastructure installed? Is yes, how to do it?
    Any help would be appreciated. Thanks.

    Hi,
    This is back to my unanswer question inRe: Java DC Build Failed which lead me to build failed problem. Anyone hv any more idea to solve that kinda build issue?
    Any help would be appreciated. Thanks.
    p/s:I'm using NWDS v2.018.

  • Error when building an executable in BridgeVIEW

    Hi,
    Every time I try to build an executable in BridgeVIEW I get an error that I have to close all VIs before building an EXE, but I only  have the top level VI open. I tried shutting down the PC and restarting but nothing works. I have seen this in LabVIEW, but LV closes them for you.
    Any ideas?
    Thanks.

    Lupita wrote:
    HI,
    You are probably right. So here is what Ive tried:
    1) Restarting my PC. Opening a blank new VI and trying to build an application by adding my "main.vi" as a top level VI. This way I make sure there are NO VIs opened.
    The list that appears on the Build Application menu contains ALL VIs called by my main.vi.
    Thanks again.
    I can't really say that I remember a behaviour like this but considering that the latest BridgeVIEW version corresponds to LabVIEW 4.1 (which was never released) or so, I would say that this is so long ago that my memory might be flaky here.
    And the application builder back then was also not the same as it is now. I'm afraid unless you are going to use a more recent version of LabVIEW together with the DSC Toolkit (which is basically what BridgeVIEW evolved into) there is little cahnge that anybody can help you with this here.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • STANDA MOTOR AND BUILDING AN EXECUTABLE APPLICATION

    Hello,
    I have some problem to build a executable file from the main labview program.
    For other applications and devices i don't have any problems (i build
    executable files and use them on other computer without any problems).
    But with this stepper motor, the main program and the examples given by the
    comapany in Labview works and the executable files don't (By not working i have
    no particula error message but no remote control at all).
    Has someone met this problem?
    I think that there is something wrong during compilation (links are missing or
    something like that?)
    I would appreciate help on this point
    Thanks a lot
    Regards
    Julien

    the config file i rename it in *.txt in order to be able to send on the site
    Julien
    Attachments:
    config_julien_V1.txt ‏1 KB

  • Is it possible to build Java 1.5.0 from source?

    I have posted a similar question on the "New To Java" list, but have not received an answer. I think that what I am trying to do is far too advanced for the Newbie forum.
    I am attempting to build Java 1.5.0 from the source tarball I downloaded from java.sun.com - jdk-1_5_0-src.scsl.zip.
    Sun's own build instructions at http://java.sun.com/j2se/1.5.0/scsl/build-linux.html state: "A GNU gcc compiler version 3.2.2 is required or gcc 3.2.1-7 built with the latest binutils package, version 2.13."
    Since I have been completely unable to find gcc 3.2.1-7 anywhere on the internet, including at gnu.org, I used gcc 3.2.2.
    Unfortunately, when I run the make scsl comman, I receive an error saying that gcc 3.2.2 is not supported and that I have to use gcc 3.2.1-7. I don't have the exact error message in front of me but can get it if it matters.
    So it appears that Java 1.5.0 will not build with gcc 3.2.2. And I am not able to find gcc 3.2.1-7.
    Has anyone out there tried to build Java 1.5.0 from source? Does anyone know why gcc 3.2.2 does not work?
    And most importantly, does anyone know where I can find gcc 3.2.1-7?
    Thanks.

    Sun's own build instructions at
    http://java.sun.com/j2se/1.5.0/scsl/build-linux.html
    state: "A GNU gcc compiler version 3.2.2 isrequired
    or gcc 3.2.1-7 built with the latest binutils
    package, version 2.13."
    Since I have been completely unable to find gcc
    3.2.1-7 anywhere on the internet, including at
    gnu.org, Did you try extracting it from the online source
    control systems?No. I assumed that java.sun.com would be the definitive source for Java.
    >
    I used gcc 3.2.2.
    Unfortunately, when I run the make scsl comman, I
    receive an error saying that gcc 3.2.2 is not
    supported and that I have to use gcc 3.2.1-7. I
    don't have the exact error message in front of mebut
    can get it if it matters.
    So it appears that Java 1.5.0 will not build withgcc
    3.2.2. And I am not able to find gcc 3.2.1-7.
    I would suspect that 3.2.2 will work if you dig into
    the build tools.

  • How do I build an executable w/o installing the runtime engine in the OS?

    Hello everyone
    I have developped an application with LabView 8.01 and build an executable for a customer, this works great, if I have administrator rights. But my customer don't have full administrator rights and they are not able to install the software (Runtime Engine). In LabView 6.0.1, to solve this problem we added the lvrt.dll and some support files directly to the application builder as support files and it worked without to install the runtime engine in the operating system.
    How can this be done in LabView 8.0.1 and which files are needed?
    I am thankfull for any advice.

    hi,
    you always need admin rights to install software.
    I think it's not possible in labVIEW 8.01 to install the runtime without admin rights.
    The costumer only has to  the runtime one time, so he should try to contact his system administrator.
    I've found no workaround for it.
    Best regards.
    Christoph Strasser
    AE/NIG

  • I can't building java portlet in Jdeveloper 903

    hello, i want build java portlet in jdeveloper 903,jdeveloper 903 need copy following .jar file to jdeveloper 903 patch
    %OC4J_HOME%\j2ee\home\applib\jaxb-api.jar
    %OC4J_HOME%\j2ee\home\applib\jaxb-impl.jar
    %OC4J_HOME%\j2ee\home\applib\jaxb-libs.jar
    %OC4J_HOME%\j2ee\home\applib\namespace.jar
    %OC4J_HOME%\j2ee\home\applib\relaxngDatatype.jar
    %OC4J_HOME%\j2ee\home\applib\xsdlib.jar
    where can i find these .jar files and add these .jar files in jdeveloper. thanks!

    Are these part of the Portal PDK?
    -- Rob

  • When building an executable I get the error message var.lsb not found.

    When building that executable with LV 5.0 it will work, but it will not work on a korean version of WinNT 4.0.

    When exactly does the error message come up? When you're doing the build or when you attempt to run the executable?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Building an Executable - Not Enough Memory to complete this operation

    I am trying to build an executable from my project, it is quite a large program.  During the build, within the 'initializing build' phase, I get the error message 'not enough memory to complete this operation'.  I have a decent PC running XP and 4GB ram. LabVIEW is using about 1.2GB of ram when the problem occurs.
    This is an application that I've been working on for some time and I have experienced similiar problems before.  To get round it I have added the /3GB switch to the boot.ini file.  However that is no longer working, it complains of a problem loading a dll which seems to have only started happening since moving to LV2012.
    Does anybody have any experience with solving this problem please? It is a bit of a showstopper for me at the moment.
    Thank you,
    Martin

    Hi Martin,
    Adding the 3GB switch is a solution which should still work on your system. 
    I'm a little confused, is the system still complaining about not having enough memory? Or is it just the dll problem?
    And is the error message occuring during the build, or when trying to run the .exe?
    The dll in question is associated with DAQmx. 
    If it is a runtime problem rather than a build problem, it may be that you haven't included the DAQmx driver on the target machine, in which case the answer lies in this document: http://www.ni.com/white-paper/5406/en
    If I've misunderstood, please clarify the exact issue which is currently occuring, and we can continue to troubleshoot.
    Ian S
    Applications Engineer CLD
    National Instruments UK&Ireland

  • Building an executable

    Ive been trying to build an executable to run on a different computer, but I must be doing something wrong.  I have read the NI tips on this subject and I also have the Labview for Everyone book that I have been trying to solve my problem with but I just can't seem to figure it out.
    My program works on my computer, but on the computer I am installing it on (which also has the same version of labview installed) it runs but it doesn't do anything, it just hangs up.  It does not give me any error messages and the program does not break, it just keeps running but doesn't do anything.
    I have attached some screenshots to show how I am building the application in the project explorer.
    One thing I notice is that my application has a bunch of sub.vis, but none of them appear in the project explorer.  I was under the impression that it adds all sub.vis automatically, but maybe I am missing something.
    Also I am confused as to the difference between "Startup VIs" and "Always Included" shown in the image called "Application Builder."

    Adding a VI to a project does not automatically add all subVIs. It doesn't have to. You can add the subVIs yourself if you wish, but it's strictly not necessary. I typically like to see everything in the project file, but some folks don't. Startup VIs refers to the top-level VIs in the application. Normally you'd have just one, but you can have more than one. Always included refers to VIs that you load dynamically. Since they are not directly linked to a VI, in order to make sure they get included with the application you need to put them in that list. This is all explained in the LabVIEW manual. Did you read it?
    As for your issue, your code screenshot implies that you are talking to an instrument. Have you installed the required drivers on the target machine? If your subVIs are using VISA then you should install NI-VISA and NI-488.2. If you're using the plain GPIB functions, then you only need NI-488.2.
    Aside: your use of local variables like that is usually a red flag. Not in the sense that local variables are bad, but it's impossible to say from just the screenshot if you have some sort of race condition. Also, it's not clear what your intention is with error handling. If an error occurs on the first iteration of the loop, that will not prevent subsequent iterations from running, since the string of VIs are controlled from a tunnel, which means each iteration only ever sees the tunnel value at the start of the loop.

Maybe you are looking for

  • BI content for SRM

    Hello, I would like to understand Concept of BI content for SRM. For some reason we cannot use BI. [structure of the system] BI7.0 SRM5.0(Decoupled Scenario) ECC6.0 ■transaction data(Decoupled Scenario) How does BI eliminate crossover of documents an

  • Canon IP1700 network connection to a windows pc how to?

    I have a windows pc with an IP1700 connected to it, I want to allow my macbook to network print to the printer, The macbook can see the ip1700 just fine, however, I does not have a driver for it. I downloaded the diver for osx from canon, its not a d

  • PSE 5 Organizer resize Media Player

    I use Adobe Photoshop Elements 5.0 with Premiere Elements 3.0 to organize and edit photos and videos. In the Organizer, each time I open a video in the catalog the player is too large - spans from the top blue bar down to UNDERNEATH the blue Toolbar.

  • Wireless bridge question....?

    Hi all, I have a wireless bridge between two buildings with 54 Mbps link. However theres around 90% packet loss between the two sites. What would be the best way to take care of packet loss.Any wireless experts..? Saurabh

  • I cannot burn my dvd

    Hi guys, I hope someone can help me In the last weeks, I cannot burn any dvd or cd When I try, appears an error message: code 0x8002006E I cannot burn with Toast and with Disk Utility too What can i do to solve it? Thank you and bye paolo