How to compile java to exe by JDeveloper?

How to compile java to exe by JDeveloper?

You used to be able to use exegen to generate stand alone executables for Windows, but this no longer works in later versions of Windows. It works for Windows 98 and NT. For example
exegen/main:schedserv /out:sched.exe schedserv.class scheduler.class
will generate the executable sched.exe from the two class files.
Probably MicroSoft decided to make life a bit harder for Java users.

Similar Messages

  • I want to compile java for *.exe program?

    I want to compile java for *.exe program?
    Thanks

    I want to compile java for *.exe program?
    ThanksYou're welcome, but the correct answer was allready
    given in previous response.oops, late again, must edit.
    You're welcome, but the correct answer was allready given in the first response.

  • Compile Java to exe

    Hello everybody!
    Does anyone of you know, how to compile a java file to a single windows executable (*.exe)? Is that possible?
    What programes do I need, and what is needed on the computer on which to run the *.exe ?
    CU
    Netzmeister2k

    Plz try ZERO G Install Anywhere program ... You can download it from http:\\www.zerog.com.... I think now a free version is available for personal use ... other wise you have to purchase it .... You can download it from the site ..... In my opinion , I used zerog instally anywhere software ... it is best for java classes to exe ..... You can make exe with JVM and with out JVM .... it depends you ... I recommend this software ........Bye

  • How to compile Java files using Ant in Eclipse

    Hi All ,
    I would like to compile all Java files using Ant in Eclipse.Since am very new to Ant and Eclipse can someone help me to create a build.xml file and let me know how to compile all the java files.
    For ex , I have placed my java files inside the path C:\HEC\Terab.Initially the Terab folder holds 7 jar files which i had decompiled using JD compiler and placed the unzipped 7 folders (which contains the java files ).Now i have imported the HEC project into Eclipse using New ->Project ->Java Project.after importig it throwed me an error saying missing jar files.again i copied the jar files and placed inside Terab folder with other 7 folder.
    Now How i can compile the java files and convert in to class files.Then after compiling the files i will again need to jar all the 7 folder.
    Please tell me the steps i need to follow.How to write an build.xml file ? where i should keep it ? only one build.xml file is enough or should i write 7 build.xml file for each folder ? Please help me out...
    Thanks & Regards
    Kar1983

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • How to compile .java to .class in .jar file

    Hey. I have code to make a .jar file, read .java files, and save them as .class files in the .jar file. When I open the .jar file, it says that the magic numbers on the classes are wrong. So I figured that Java must compile the .java files to .class files in bytecode.
    Question: What's the code to compile a string from a .java file to a .class file?
    Here's my code:
    try {
                // Name of jar file to write
                String archiveFile = Name + ".jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("Main.class"));
                StringBuffer sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("Main.txt")));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("MainScreen.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("MainScreen.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("GCanvas.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("GCanvas.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this, ex.toString(), "BUG!", JOptionPane.INFORMATION_MESSAGE);
                ex.printStackTrace();
            }Thanks,
    -Gandolf

    So I'm guessing that none of you guys have the knowledge on how to compile a java application within a java application. I was thinking that it had something to do with javac... but I'm unsure.
    If no one can answer the question, could someone point me to an expert who would know?
    -Gandolf

  • How to compile java programs in j2EE 1.4 SDK

    hi,
    i HAVE JUST INSTALLED NEW J2EE 1.4 SDK , IT HAS BEED INSTALLED SUCCESFULLY BUT I AM UNABLE TO COMPILE JAVA PROGRAMS WHICH I USED TO RUN IN SDK 1.4 ,OR EVEN NEW WRITTEN EXAMPLES. CAN ANYONE PLZ HELP ME.

    J2EE by itself is not capable of compiling Java. It requires that a J2SDK be installed first - this is what compiles and runs Java programs. Did you install the combination J2SDK and J2EE, or just the J2EE?
    If both are installed, then you should be able to compile and run as you used to..

  • How to compile .java files in windows server

    Hi All,
    I want to compile my CO.java file in server directly how can i do that my server is windows server
    If it is Linux i can login through putty and go to java top and then file location then i use to do javac filename.java then i use to get filename.class but now same thing i did in windows server which is not working please sugget how to do its bit urgent.

    Why do you want to compile it on the server and not in jdeveloper? You should be able to issue the javac command from the prompt. Your unix account must have permissions to that command though.
    For more info on the javac command:
    http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/javac.html
    Kristofer Cruz

  • How to compile java files in a bunch of drectories?

    I have a bunch of java files in a bunch of different directories. How can I compile them all at once? Please note I also do not know how to get javac to work outside the java directory.

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Can anyone tell me how  to compile java in different directory?

    My javac path file is D:/java/jdk1.5/bin/
    I create java file and save it in different directory eg) java file name is Main.java in f:
    F:/Main
    How can i compile and run the Main java file
    Edited by: Sanjeevi on Mar 4, 2008 9:20 AM

    C:\>D:
    D:\>cd Main
    D:\Main\>d:\java\jdk1.5\bin\javac Main.java
    // ... some output, hopefully no errors
    D:\Main\>D:\java\jdk1.5\bin\java MainAlternatively, make sure that D:\java\jdk1.5\bin is on your path and simply call javac and java.

  • How to compile java programs? There is no javac for me!

    Hi, I'm starting to learn java and downloaded the java 1.4.0.1 standard edition from this website. However, after I installed the program, there is no javac to be found while there is a java.exe. I need javac to compile my program before I can interpret it but it is nowhere to be found!
    Did I download the wrong SDK version? I thank anyone in advance who can help me in the right direction!

    You must have the SDK to create programs. The Jre is a component of the SDK that can be downloaded separately if you only want to run programs.
    SDK downloads from here, use the row "Windows (all languages, including English)" and be sure to select the SDK COLUMN, not the JRE:
    http://java.sun.com/j2se/1.4/download.html

  • How to Compile java project on command prompt

    Hello Friends,
    I have created one java project in eclipse. It has 3 packages, 4 external jars and one Link source (meaning it uses other java package that is not in the same project folder)
    It runs perfectly using eclipse.
    Now I want to compile my project and want to run that project.
    I tried using "javac -classpath........." but it didn't work for me. Here is the command I used:
    I am running this command under my main project folder
    javac -classpath ./../../../lib/tools/lib/blur/blur_formats-1.0.jar;./../lib/commons-codec/commons-codec-1.3.jar;./../lib/commons-httpclient/commons-httpclient-3.1.jar;./../lib/commons-logging/commons-logging-1.1.1.jar;./../lib/org.json/org.json.jar;./../lib/smack/3_0_4/smack.jar;./../../../device/branches/viper/Service/blur/common/push/src* ./src/com.proj.hnm.push.StartService.java*
    1) /device/branches/viper/Service/blur/common/push/src - is a different package I am referring (not in my current project folder) - it has java files in com.pushsync package
    2) ./src/com.proj.hnm.push.StartService.java is my main class, com.proj.hnm package also contains another 2 package, and those other packages also have .java files
    Please tell me how do I run my java project?
    Thanks

    Hi
    Since it works fine in Eclipse you should install the [Fat Jar eclipse plugin|http://fjep.sourceforge.net/] which will pack everything thats in your eclipse project into a single jar file. Then you can run: java -jar myProject.jar and it should work.

  • How to compile java file in Tomcat ?

    Hi all,
    I have a java file named Ch1Servlet.java under project1/src directory
    there is classes directory project1/classes and web.xml under src directory
    project1/src directory.
    Now to compile i have to give %javac -classpath /your path/tomcat/common/lib/servlet-api.jar -d classes src/Ch1Servlet.java
    What is this your path ? Tomcat 5.0 is installed in C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib with servlet-api.jar
    Please help me out.
    Best Regards
    Taton
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Ch1Servlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
    PrintWriter out = response.getWriter();
    java.util.Date today = new java.util.Date();
    out.println("<html>"+"<body>"+"<h1 align = center>HF\'s Chapter 1 Servlet</h1>"+"<br>"+today+"</body>"+"</html>");
    }

    understand 1 thing..ur tomcat is not a compiler as u
    think..its a poor web server only..
    Its not mandatory that u need to put the source files
    in tomcat folder.u can put ur java files where ever u
    want..put servlet.jar in ur classpath.
    then start compiling ur java files..once u are done
    with compiling copy the class files alone to ur
    web-inf classes folder.
    thats it!!!
    regards
    shanuservlets12.jar

  • How to compile java servlet

    this the error i encounter.. i have read some of the posted topics on it but i dont understand how i can create my own classpath..where should i do that..what should i write...how i have to save it...pls help me...
    C:\currentyaazmin1\java>javac login2.java
    login2.java:9: Package javax.servlet.http not found in import.
    import javax.servlet.http.*;
    ^
    login2.java:11: Package javax.servlet not found in import.
    import javax.servlet.*;
    ^
    login2.java:16: Superclass HttpServlet of class login2 not found.
    public class login2 extends HttpServlet
    ^
    3 errors
    i have already installed jdk1.3 an jsdk2.1...i also copied javax folder from jsdk2.1 and pasted in c:....still i encouter the same thing... pls help

    Download j2ee is recommended to solve any compling such as servlets and swing
    http://java.sun.com/j2ee/download.html
    Once done all you do is include j2ee.jar and you have xml, servlets, rmi the works!! :)
    However since you download the servelet component only, search in you hard drive for ".jar" file.
    You can open the .jar file with a WinZip and you can check if it as javax.servlet.http.* by looking at the far right for javax/servlet/http
    Once you know the jar file to include. Next is to put it in the classpath. The most simple way using NT example, how Windows 95/98 is similar. Go to:
    Control Panel -> Double Click on System -> Click on Environment tab
    Type below in Variable: CLASSPATH
    Type in Value: PATH TO SERVLET;.;
    Don't forget the ;.; (the dot for currnet path to run)
    If you need to add more to the classpath, seperate by classpath.
    Log off and log back in as your user. No need to reset the machine.
    The system will pick the new CLASSPATH.
    Test on dos as "echo %CLASSPATH%" to see what its set to.

  • How to compile .java - .CAP?

    Hi everyone,
    I have a lot of problem to compile my java file and to create my .CAP file.
    In consequence, I thinked that I will be perfect to create a tutorial, but firstly I need to learn :)
    PreCondicions
    -We have Windows SO ("posteriori" I will try to do a tutorial with Linux SO)
    -We have a JavaCard compatible with JavaCard 2.2.1
    -We need a source java file (.java) with our code -> In our case we use a HelloWorld.java of Sun-Oracle.
    First Step: .java -> .class
    -Open cmd (ms-dos)
    -Go to the path of HelloWorld.java
    -We can use the next command:
    C:\java_card_kit-2_2_1\provesMarti>javac -g -source 1.3 -target  1.1 -classpath .\classes;..\lib\api.jar;..\lib\installer.jar HelloWorld.java-Note: The tags "-source 1.3 -target 1.1" are necessary in JavaCard 2.2.1
    -We obtain HelloWorld.class :)
    Second Step: ????
    From here I need your help,
    I rode the documentation of JCDK but I don't obtain a clear idea.
    Moreover, every time that I use "converter" I obtaint this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/6/0_2
    0\src/zip;C:\JcTool\;
    Caused by: java.lang.ClassNotFoundException: Files\Java\jdk1.6.0_20\src.zip;C:\J
    cTool\;
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: Files\Java\jdk1.6.0_20\src.zip;C:\JcTool\;.  Prog
    ram will exit.Can you help me, please?
    Thanks!!
    Martí

    Hi,
    What happens if you try to compile a simple hello world Java class from the command line (standard Java and no JC code)? It seems like your path or classpath is messed up.
    Cheers,
    Shane

Maybe you are looking for

  • Extended notifications and UWL

    Hi Friends,   I am using Extended notifications for sending notifications to lotus notes. In the notification we can maintain shortcut to open the workitem in SAP GUI. But the users use only UWL to access work items.So Is there any way to maintain th

  • Does ipod nano work with ipod photo dock, s-video out?

    Does the ipod nano work with the ipod photo dock, with an s-video out? Will apple make one for the nano specifically?

  • Mac Formatted Ipod on PC

    My Ipod is currently PC formatted. If I were to format it for Mac would it still work as an external hard drive on a PC, or would I have to use special software.

  • LED TV vs. LED Monitor

    I currently have a MacBook Pro and I'm looking into setting up a docking station for it so I can use it as a desktop. However I don't intend on paying $999 for the Apple thunderbolt display, so thats not an option. My question is I have a 26" LED 108

  • Finding my lost phone

    Can Verizon send a message to a lost phone?