How do I compile my Swing project to native code?

I love to use the Java programming language. I want to create an application for Windows that can run without the JVM, JRE or any other runtime environment. I want to write my application in Java (because of the outstanding language structure) and be able to distribute it like any other application that can be downloaded from the internet without having to supply several megabytes of support files.
I have been looking around for native compilers, found JOVE, Excelsior JET etc., but they all seems to require some kind of runtime environment on the target computer. Can it be that hard to make a Java compiler that extracts what it needs from used libraries and puts it together with application code to a single program .exe file. Just the way most programming language compilers do! I don't care if the concept of being able to run applications on different OS is disposed. Sure, I could use another language, but I just happen to like Java!
Could anyone suggest a compiler that does this? I would apprieciate it alot! Thanks

Hello Swing components could easily be translated to IBM SWT, I found IBM SWT easy to use and eclipse platform just a perfect development tool. Excelsior then allows you to produce a fully compiled version of classes, given that they do not contain SWT/Swing.
I hope you will find this information useful.
P.S.
Anyone knows whether JRE-free applications could contain JDBC:ODBC connectivity? My application work fine, everything is fully compiled BUT JDBC.

Similar Messages

  • How do I compile my Java project?

    How do I compile my Java project? The "Build" option is missing from the right-click menu of my Project Explorer and I can't find a compile button.

    On 08/05/2015 12:42 PM, Chris Wilkinson wrote:
    > How do I compile my Java project? The "Build" option is missing from
    > the right-click menu of my Project Explorer and I can't find a compile
    > button.
    Examine the Project menu. You'll see that, by default, Build
    Automatically is checked. Each time you make a change to a Java file,
    Eclipse rebuilds it into a .class file. To force the entire project to
    be rebuilt, whether it needs it or not, select Project -> Clean.
    Is this what you're looking for?

  • How can speed up my java program ? native code compilation ?

    Hello everyone, I know that there are so many post related to compiling to native code.
    My situation is that I wrote a little program that gets executed upto 50 times per second. This program basically gets a set of parameters and after validating them, they get inserted into a SQL Server 2000 table.
    I need this program to be faster ?
    I was thinking of writting this again on c++ but I don't know how to do it and I must do it myself.
    Thanks for you time,
    Sincerly Fabian.

    When we get 1500 traps in one second, the CPU
    utilization gets overloaded and the server crashes.C++ will be slightly faster if you are truly CPU-bound, assembly will be faster still. However, at some point nothing will be able to keep up. So the real question is whether Java provides enough development-level support and cross-platform capability to justify its slightly slower performance.
    Some things to think about:
    1) Are you running multiple threads to process incoming messages? You might be better off buffering the messages and processing them on a single or pooled thread. If the message traffic is truly bursty, and you don't need real-time response (which is illusory anyway), this should reduce your load.
    2) To echo another poster, are you really invoking a program for each message? Can you run that operation within the same JVM? There's a significant cost for each program start, as well as for context switches.
    3) You mentioned that you're writing to a database. Can you batch the writes? Individual writes result in more network round-trips, as well as more context switches.

  • How can i execute my swing project?

    i am new about java.. i am trying to do something with jbuilder.. but i can't have any exe file.. i want to know how the last users will use my programs.. do they have to write java commands?.. thanks..

    There is no exe file generated in Java.
    Only .class files.
    You launch the app after compiling with the command : java MyMainClass corresponding to the
    MyMainClass.class file the compiled result of the command javac MyMainClass.java (containing your main method).
    Denis

  • How do I compile my Java directly to machine code?

    Let's say I'm making an application that isn't going to be run from the internet, so I wish to compile it directly to Windows (or UNIX or whatever) so that it runs faster. I would like to compile java code to machine code, not to byte code. Is there any way to do this?

    I'd not develop such an application in java to be frank. In any case there are several exe generators available (example zerog). But they mandate you have JRE installed on the machine where you are going to run your exe, else your exe would comtain jre in which case he size would be enormous. Either way you are a loser.

  • How to access an object's variable from native code

    i am passing an object in a native method.i have to change the value of the object's variable.how do i access the variable of object and assign it new value from c++ code.when i try to access it i get a message that the variable must have a class/sruct/union type.
    pl. help.

    I'll tell You if You send me the structure of this object in Java. And a name of field what are You thinking about.
    Maciek

  • How to use HTTPSERVICE in Actionscript project.

    Hello all,
    I am doing an actionscript project, I want to use httpservice to send a data to server . Is any one knows how to use httpservice in actionscript project?
    thanx

    following code may help:
    import mx.rpc.http.HTTPService;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    private function callHTTPSERVIDE():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Server.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    //handle your result here
    private function faultHandler( event:FaultEvent ):void
    // code for fault handling.

  • Please help!! how to compile/run  Swing

    Hi all! please tell me how can I compile and run Swing classes in
    Forte.
    I have a window frame (WindowA class)that calls another window frame(windowB class)
    They are stored in the same directory but saved with different name.
    Please help..
    thanks in advance

    oh i just read your other post. you can call another class simply by
    just writing
    newClass x = new newClass();
    or just :
    new newClass();
    works i think :)
    put that line in the actionPerformed method,
    and if newClass() has a frame, it'll come up in a new window.
    You did handle the button with an ActionListener right?

  • How to make the java files compile for a project created outside of Eclipse

    Hi^^,
    I have created a project outside of Eclipse. It has the following folders
    1. config
    2. source
    3. WEB-INF
    I want to execute the project on remote server. Will it compile automatically creating a new folder for .class files corresponding to the source folder or do i need to include a build.xml to enable the project to create a new folder for .class files. Also pls tell me how do I write this build.xml
    Please advise.

    Hi^^,
    Actually I have created a project without using eclipse.
    My source files are inside WEB-INF/source
    Now I want to compile the files using build.xml so that I can create class files. I am using the following build.xml
    <project name="jsp" default="all" basedir="./">
      <property environment="env"/>
      <property file="ArmorJSP.properties"/>
      <!-- set global properties for this build -->
      <property name="source" value="."/>
      <target name="all" depends="copy, jspc, testservlet"/>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled jsp classes into it -->
      <target name="jspc">
        <!-- Run ejbc to create the deployable jar file -->
        <java classname="weblogic.jspc" fork="yes">
          <arg line="-webapp ${APPLICATION_HOME} -compileAll -d ${APPLICATION_WEB_CLASSES} ${source}/*.jsp"/>
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </java>
      </target>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled Servlets classes into it -->
      <target name="testservlet">
        <!-- Run ejbc to create the deployable jar file -->
        <javac destdir="${APPLICATION_WEB_CLASSES}" srcdir="${source}" includes="*.java">
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </javac>
      </target>
      <target name="copy">
        <copy todir="${APPLICATION_HOME}">
          <fileset dir="${source}">
            <include name="*.jsp"/>
          </fileset>
        </copy>
      </target>
    </project>I do not know how to compile the project using this build.xml
    The motive of doing all this is to understand how is Eclipse doing the build project step. I simply cannot find any build.xml inside any of my projects created in Eclipse however when right click on the project and choose build project, it compiles excellently. ???
    Edited by: pksingh79 on Nov 24, 2008 1:19 PM

  • Cann't launch the ADF Swing Project

    Hello,
    I have created java-application(swing,adf bc) in Jdev10.1.3, and created the Java Web Start(JNLP) files for the application ,run ant target: sign. it created all files ,build ok.
    but when I run the local.html in the Jdev1013, it open IE window, then I clicke the Launch JClient Link and it asks me to download the local.jsp file or open the file.
    If I download , the file "local.jsp.jnlp" would be saved, if I open, it display beblow:
    <?xml version="1.0" encoding="Big5" ?>
    - <jnlp spec="1.0" codebase="http://127.0.0.1:8991/TestJClient-View-context-root">
    - <information>
    <title>Title</title>
    <vendor>Vendor</vendor>
    <description>My ADF Swing Project</description>
    </information>
    - <security>
    <all-permissions />
    </security>
    - <resources>
    <j2se version="1.3+" />
    <jar href="client.jar" />
    <jar href="mymt.zip" />
    <extension name="common" href="localmt.jsp" />
    </resources>
    <application-desc main-class="test.view.test" />
    </jnlp>
    I review the local.jsp in Jdev1013, find some error "should not exist the element jnlp" about below:
    <?xml version="1.0" encoding="Big5"?>
    <jnlp spec="1.0" codebase="<%= buf.toString() %> ">
    Maybe that is jdev1013 bug.
    Anyone know the reason or how to deal with the error ?
    Thanks

    Hi,
    you are mixing releases here. You start with JClient in JDeveloper 10.1.2 and end up with ADF Swing in 10.1.3. Now what is the release you have the problem with. For 10.1.2 we have a whitepaper explaining how to use Java WebStart. We didn't upgrade this paper for 10.1.3, but I get Web Start deployment working when i tried it last time in JDeveloper 10.1.3.
    Note that no file should be downloaded to teh client and instead the JSP file should be executed to generate the JNLP file
    Frank

  • How to make compiler do inline optimization in WTK?

    Hello:
    I'm a freshman in WTK. I found that my project is running very slow, so I wrote the following test to find the time cost of function call. I found that in this test, it spent 94ms, 1076ms and 2016ms in simulator, for 0, 1, and 2 function calls in each cycle (300,000 times).
    By this result, I think function call may be very expensive and may became the bottleneck of performance in my project.
    public static runTest(){
            long i = 0;
            long j = 0;
            long begin = System.currentTimeMillis();
            int times = 300000;
            for (i = 0; i < times ; i++){
                j = j + i;
            long end = System.currentTimeMillis();
            System.out.println("The result no call is " + (end - begin) );
            begin  = System.currentTimeMillis();
            for (i = 0; i < times ; i++){
                j += set(i);
            end =System.currentTimeMillis();
            System.out.println("The result 1 call is " + (end - begin) );
            begin  = System.currentTimeMillis();
            for (i = 0; i < times ; i++){
                j += set2(i);
            end = System.currentTimeMillis();
            System.out.println("The result 2 call is " + (end - begin) );
    private static long set2(long i) {
         return set(i);
    private static long set(long i) {
            return i;
    }I work in eclipse ,and make sure i've checked "Inline finally blocks" check box.
    I also run the same code in pc, and find the function call may have been optimized to "inline" by compiler (The times changed to 300,000,000, and result is 2016ms, 2281ms, and 2266ms), i also make sure changed the "compiler compliance level" to 1.3
    In an ideal situation, the compiler can find "set(i)" is exactly "i" and change all"set(i)" to "i";
    I wonder if the compiler can change some function to such "inline" in WTK. I don't know how compiler works in WTK, but as a freshman in WTK, i think there may have some optimization option i don't know. Can someone tell me how to make compile do this stuff?
    Thx a lot!

    ...javac make something inline while WTK not...I doubt this. I think that code that was inlined by javac, will remain inlined when executed by WTK. You can check that in more details at compiler forum if needed. Javac remains the same, inlines are there - I don't think this changes.
    What WTK probably can (and maybe even should) change is *hotspot* optimization settings when it emulates execution of MIDlets by real device.
    As for your problem, could it be described as follows: MIDlets run slower than you'd expect of a typical desktop Java applications?
    If yes then WTK User Guide seem to have an explanation for that: +"...Compared to the desktop-based emulator, a real MIDP device usually has a slower processor, less memory, and a slower network connection, and might have a different type of display. The Sun Java Wireless Toolkit for CLDC enables you to simulate the constrained environment of a real device..."+ (quoted from chapter Adjusting Emulator Performance). To me this reads like WTK forces Java machine to slow down execution of MIDlets in order to make it feel closer to a typical mobile device.

  • How to use Maven Java EE projects in NB?

    Hi,
    I probably just missing something than it is an error. Our company uses Maven, and JBoss. Most programmers unfortunatelly uses Eclipse so I do not have anyone to ask. I've checkouted project from SVN, it was correctly recognised by NB as Maven project, I can build it (with some warning, but build is successful). But I cannot run or debug it. Maybe it's because those actions aren't defined by someone who created this project I don't know. Actually I do not know nothing about maven, yet. Question is, how to run or debug this project on my local JBoss server. I did not find way how to do it ...
    thanks in advance
    martin.

    Ok, I say it in this way. I do not know anything about maven, and never used it before. What I DO know, that Eclipse IS NOT Netbeans. In this situation it means that on our project, which I do not know whether it is proper EE maven project or not, I can in Netbeans set ONLY VM options AND some maven action which, as I already said, do not know anything at all, so I cannot even tell whether or not they can be used to solve my problem.
    As I already said what I get from svn IS NOT EE project BUT maven project, this is where netbeans and eclipse differs, since there are no maven projects in eclipse(or at least nobody here heard about them). I do know how to work with EE projects in NB, but I'm talking about maven projects here.
    How others do it. Start JBoss from their eclipse in debug mode, COMPILE EVERYTHING LIKE NORMAL - MAVEN_FREE PROJECT (which I cannot do in NB) deploy all .jars manually in their OS to appropriate JBoss directory, then set breakpoints, do some action in browser and then miracously somehow they get into debug mode in eclipse. I cannot build maven project like simple EE project in NB, when I try to work with what I find in private repository like it's result of normal build, then it does not work since dependencies aren't set correctly so I have to fix them manually and do not know how to do it.
    Look, I know that you can stop pain of person suffering from cancer by shooting his head off, but that's not the cure we're looking for. I've heard that maven was originally intended for simplifying development process and I cannot afford 90minutes procedure in my RunBuilds&TestAsOftenAsPossible work style.
    Actually, there is JUST ONE person in whole firm(not in our city), who know something about maven, others are just lost. That's the reason why I'm asking here to find out what's wrong. I'm looking FOR PROPER WAY how to do it.No for screwing screws with hammer.

  • How do you compile Flex-dependent classes with ASC?

    Hi,
    I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.
    So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."
    I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.
    Thanks,
    - max

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br />  How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly &quot;[Compiler] Error #1181: Forward reference to base class (base<br />class name).&quot; <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • Eclipse Swing project import Jdeveloper

    Hello I build my Swing Porject in Eclipse. How can i integrate this swing classes in jdeveloper and work with them.
    I import the swing projecti file->new->projects->project from existing source. but i have not a design view.
    How i can generate the new JBinit method in my swing code?
    How i can binding this swing in ADF?
    I see the videos but there is not a example how i build this.
    example Code (eclipse):
    class RegistryPanel {
    private JTextArea nutzung = new JTextArea(10,50);
         private JScrollPane pane = new JScrollPane(nutzung);
         private JLabel uberschrift = new JLabel("Registrierung");
         private JButton accept = new JButton("Akzeptieren und Registrieren");
         private JButton cancel = new JButton("Abbrechen");
         public RegistryPanel(boolean auswahlFensterAnzeigen){
              uberschrift.setFont(new Font("Calibri",Font.BOLD, 20));
              this.setLayout(gbl);
              anrede.addItem(" ");
              anrede.addItem("Herr");
              anrede.addItem("Frau");
         // ‹berschrift
              gbc = wpc.gbcCreator(0, 0);
              this.add(uberschrift);
         //1. Zeile
              gbc = wpc.gbcCreator(0, 1);
              gbc.anchor = GridBagConstraints.EAST;
              gbc.insets = new Insets(0, 0, 10, 0);
              this.add(new JLabel("Anrede*"), gbc);
         ...

    Hi,
    we do have plans for supporting NetBeans' Matisse in a future version of JDeveloper. Until then JDeveloper expects the layout definition to be part of the jbinit() method. However, adding the required libraries to the JDeveloper project you should be able to at least use the code editor for further developing the project
    Frank

  • How to suppress compiler errors without excluding database objects from the "Schema Compare" tool (using VS2013/SSDT)

    Hi,
    In short: How to suppress compiler errors without excluding the object from the "Schema Compare" tool ??
    A bit longer:
    We have a SQL Server 2008 project in Visual Studio 2013 running SQL Server Data Tool.
    An old database, with a lot of history in, has been imported into SSDT and there are many syntax errors preventing the project from compiling/running. An typical error is: "SQL70001: This statement is not recognized in this context".
    Running the "faulty" scripts on the server, executes just fine. I understand that there are syntax errors and they should be rewritten, but it's not gonna happen just like that - it is a slow process over a long period of time.
    I know it is possible to change Build Action to None, but that also exclude the object from appearing in the Schema Compare function/window.
    So - how to ignore some compiler errors and still having the objects to appear when doing "Schema Compare" ??
    Thank you in advance.

    Hi Steven,
    Thanks for your comments.
    Well, it sure does help in the future, but right now i would prefer the other way - to suppress some errors and still allow the scripts to build.
    The thing is that if we "rewrite" the objects into create scripts, then we have a huge test job ahead of us + the database environments (PROD vs DEV and UAT) does not share the same AD or DB users and therefore grants is lost if dropping/creating
    objects, right!
    If you drop a object before creating it, the drop will also drop the roles and grants and since they don't share user table, the create will not be able to add the permissions again. There might be a solution to that, but it is going to be very complicated
    for some newbies like us. We need something we can trust.
    BR
    Peter

Maybe you are looking for

  • Error when creating aggregate table

    Hello, I am creating an aggregate table using the Aggregate Persistence Wizard. When trying to run the batch file, I am receiving an error: "Could not connect to the Oracle BI Server instance". But then, the Oracle BI Server is running and I am able

  • Macbook pro not connecting wirelessly to my FiOS

    I just got a Macbook Pro last Wednesday immediately after having Verizon FiOS installed in my house on Tuesday. Unfortunately I can't get Airport to connect to the internet at my house. I would say it's just FiOS but my neighbor has the exact same se

  • Firefox stalls loading Google search promoted items

    Using Firefox 24.0 in Windows 8 Pro 64. If I click on a promoted item (yellow background) in Google search results, both left click or rightclick/ new tab, the item deepends and does not load (blank tab and a URL related to Google). Other items in th

  • Basic HTML support from CS5 stripped?

    Look, I've been using DW since Macromedia owned it. I also just upgraded from CS3 to CS5, due to the issue with OS X Lion.  I do a weekly newsletter for someone and it's all basic HTML so all email clients and/or providers display it the same. The CS

  • 2821 compact flash problem

    Hi all, I have a problem with a compact flash of a router 2821, i tried to upgrade the IOS version or the router when i restarted the router went to rommon and it does not recognize the flash, it saids that there is no flash available on the router.