Compile to exe instead of class

so, if you want to make exe use a real languages.
is that it? means java is only for web.. usless outside web??...

Furthermore, JAVA IS NOT ONLY FOR THE WEB...eat, sleep and awake to what I'm telling you every day!! One of the virtues of Java is that it can be used for either the web or stand alone applications. If you have an applet coded up, then it's not to hard to transform it to an application and vice versa. The only difference between applets and applications is the containers they run in (e.g., applets run in browsers and applications run in windows).
When I first got into CS, Java was the first language I had to learn to program in, while simultaneously hearing about how more powerful C++ was. I'm now a senior at Virginia Tech, which C++ is their core language for their curriculum, and can tell you that Java is always my option when coding up personal projects. Why...because I can use one language for applets, applications, CGI scripting, server side programming, database access and so on, as well as running on multiple platforms without recoding.
POINT: If you are going to learn just one language, make sure it's Java!

Similar Messages

  • Y not compile to .exe ?

    Hi Friends,
    Why can't we go for a compiler which generates .exe instead of .class files ?
    Let the code be platform dependent, but if we know that our application is gonna run on a given OS & given hardware configuration, can't we generate a .exe specific to that configuration so that the application can be optimised in speed and performance ?
    For this to work out we need configuration-specific jvms and built-in jar files.
    And finally is java slower than C++ by any chance ?
    Thanks a lot

    Why can't we go for a compiler which generates .exe
    instead of .class files ?You can, you just need another program which does it.
    Java has other ways of packaging applications e.g. Jar and JWS which are platform indpendant.
    Let the code be platform dependent, but if we know
    that our application is gonna run on a given OS &
    given hardware configuration, can't we generate a
    .exe specific to that configuration so that the
    application can be optimised in speed and performance ?The JVM compiles the code to the platform at run time. What you suggest can make install simpler, but does not provide performance improvements. In fact it can mean you cannot use performance improvements provided by a JVM produced after you build you .exe.
    And finally is java slower than C++ by any chance ?Can be. For CPU bound applications C++ tends to be much faster. For most real world applications I would suggest it is possible to deliver a Java application faster than the same application in C++.
    For a limited total budget for a project, Java can be faster. i.e. you can spend more money on the hardware for the money you save in developing the application.
    This depends on the applications requirements of course!

  • Compiling into exe, is it possible???

    Hello people. I am new to java-tech and I was wondering if there is any way that i can compile into an exe instead of a .class file and launch my programs through the OS and not VM.

    Hello people. I am new to java-tech and I was
    wondering if there is any way that i can compile into
    an exe instead of a .class file
    Sure, check out the GNU Compiler Collection or the commercial compilers.
    If your app has a GUI... Tough luck.
    and launch my programs
    through the OS and not VM.There are ways to make launching through VM very transparent to the user, mind you.
    On unix systems the ultimate transparency can be achieved with binfmt. web start, executable jars, custom launchers, etc come close enough elsewhere.

  • Command line compiler (rhcl.exe) adds on rogue full pathways into [Merge Files] of .hhp

    I'm using RH 9 and generating chm outputs on my Win 7 64-bit computer.
    I have a core chm help file and several sub chm helps that get merged into it.
    I have a batch file that regularly compiles our help files locally and then copies them into a common local directory. It then copies them up to a mapped network drive where they are picked up by the nightly build of our installer.
    The problem I have, is that the command line compiler (rhcl.exe) is adding on a full pathway for all the sub helps listed in the [Merge Files] section of the core help's .hhp file, causing these problems:
    1) First of all, the pathways are wrong. The pathway it puts on is from the location of my .xpj file of my core help project. The output directory for the compiler is actually sending all the helps to a different local directory.
    2) These need to be relative, and should not have full pathways. The full pathways make it so that when I click on a subhelp TOC entry that subhelp's topic opens up in an entirely different window instead of merged into the core help's window. (See #13 on Peter's helpful site here about the problem with absolute paths: http://www.grainge.org/pages/authoring/rh9/using_rh9.htm)
    Here' what I want it to look like (the good):
    [MERGE FILES]
    pcdmisportable.chm
    pcdmistutor.chm
    pcdmisvision.chm
    pcdmislaser.chm
    pcdmiscmm.chm
    pcdmisUJB.chm
    pcdbasic.chm
    toolkitmodulesvwmp.chm
    pcdmisdci.chm
    toolkitmodules.chm
    pcdmisnc.chm
    pcdmisip.chm
    toolkitmodulesblade.chm
    pcdmisregistry.chm
    pcdmisfixturing.chm
    Here's what it looked like after the command line compile (the bad and the ugly):
    [MERGE FILES]
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisportable.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmistutor.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisvision.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmislaser.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmiscmm.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisUJB.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdbasic.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\toolkitmodulesvwmp.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisdci.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\toolkitmodules.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisnc.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisip.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\toolkitmodulesblade.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisregistry.chm
    d:\hg\pcdmisqa\pcdlrn\help\corehelp\pcdmisfixturing.chm
    I've done the following ....
    I've checked my .xpj file and they have relative paths only.
    I've deleted my .cpd file.
    I've removed chm references from my rhbag.apj.
    ... and the hhp file still gets modified with pathways to my core project
    directory tacked on:
    It's strange; because if I compile without the command line, by opening the project and running the generation inside of RH, I don't get the problem where it re-writes the [Merge Files] section with the pathnames.
    Any ideas on where are these rogue full pathways coming from and how I can fix it? Or is it just a bug with the command line version of the compiler that Adobe will need to fix?

    I don't use command line generation but to the best of my knowledge, this has not been fixed.
    Please follow this link.
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Having downloaded update 10.5, the artists section of my iPod no longer recognises artists who feature on compilation albums. Instead it groups them under the album artist, ie various artists. Any suggestions?

    Having downloaded iTunes update 10.5, my iPod no longer recognises in the artists section those artists who feature on various artists' compilation albums. Instead the iPod groups them under various artists, and, if you are looking for a particular artist,who only features on a compilation, you have to remember or search to see which various artist album they feature on - all very frustrating, especially as it worked OK before the update. So far I've not updated any more - so I've not taken 10.5.1 or 10.5.2 because 10.5 caused me so many problems, but I'm wondering if the solution could be in those updates
    I've tried amending the iTunes library artist and album artist, and it is possible to get the iPod to recognise the artists, but the downside is that the library then removes the artist from the album, and you then have to play those tracks individually
    Has anyone suffered the same problem and, if so, has a solution been found?

    Having downloaded iTunes update 10.5, my iPod no longer recognises in the artists section those artists who feature on various artists' compilation albums. Instead the iPod groups them under various artists, and, if you are looking for a particular artist,who only features on a compilation, you have to remember or search to see which various artist album they feature on - all very frustrating, especially as it worked OK before the update. So far I've not updated any more - so I've not taken 10.5.1 or 10.5.2 because 10.5 caused me so many problems, but I'm wondering if the solution could be in those updates
    I've tried amending the iTunes library artist and album artist, and it is possible to get the iPod to recognise the artists, but the downside is that the library then removes the artist from the album, and you then have to play those tracks individually
    Has anyone suffered the same problem and, if so, has a solution been found?

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • [svn] 1176: compiler: moving all the graphing classes to...

    Revision: 1176
    Author: [email protected]
    Date: 2008-04-10 10:38:20 -0700 (Thu, 10 Apr 2008)
    Log Message:
    compiler: moving all the graphing classes to... the util.graph package (ala asc)!
    Bugs: n/a
    QA: No
    Doc: No
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerAPI.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/swc/SwcMovie.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/linker/ConsoleApplication.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/linker/DependencyWalker.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/linker/FlexMovie.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/linker/SimpleMovie.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Project.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/Algorithms.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/DependencyGraph.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/Edge.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/Graph.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/Vertex.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/graph/Visitor.java
    Removed Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/DependencyGraph.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Algorithms.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Edge.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Graph.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Vertex.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Visitor.java

    We had this same case. I used web adi to moved the the classes to the right catalogues/offerings. Use the OTA_EVENT_API.UPDATE_CLASS procedure and OTA_EVENTS_V view to get all class listings. Find the right activity_version_id and parent_offering_id of the catalogue you want the classes to moved to. Use this values to change the values of the activity_version_id and parent_offering_id of the classes you will be moving.

  • Missing compile-abc.exe to test "-useLegacyAOT no" with Air SDK 4.0 beta?

    i get the following error:
    SDK is missing file C:\Program Files (x86)\FlashDevelop\Tools\air40beta\lib\aot/bin/compile-abc/compile-abc.exe
    here's my command line:
    adt -package -target ipa-ad-hoc  -useLegacyAOT no -storetype pkcs12 -keystore "cert\iphone_dev.p12" -storepass **** -provisioning-profile cert\MorphEm_development.mobileprovision "dist\MorphEm-ad-hoc.ipa" "application.xml" -extdir extensions\package -C bin-ios . -C "icons/ios" .

    We are aware of the issue and investigating it.As if now,-useLegacyAOT switch is not working on windows.For more information please see this:
    http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air4-0_flashplayer12-0_release notes.pdf
    Thanks,
    Sakshi
    Adobe AIR Team

  • Compile-abc.exe crash when package a nape physics game with -useLegacyAOT no

    I try package a nape physics game use with -useLegacyAOT no,the progress compile-abc.exe show a crash dialog window.
    my game is include nape physics swc(http://napephys.com/index.html),if remove from game to package that ok.
    I trying update AIR SDK Ver 4.0.0.1619 to 13.0.0.55,but it's have no resolved.
    the sample swf can download from http://cbmland.com/g/Bns.swf
    i'm english is poor,thanks!

    Hi,
    Crash is reproducible at our end as well and we are investigating it. Thanks for reporting the issue.
    -Nimisha

  • IOS improved packaging SDK is missing compile-abc.exe error

    I am trying to test out the new and improved iOS packaging on my Windows machine and I am having some trouble getting it to work. I am using AIR 4.0.1170 for Flex developers and as the announcement says, added "-useLegacyAOT no" to my packaging options in FB. I believe it is in the correct spot because moving it to other places in the packaging options gives me syntax errors and when I do "-useLegacyAOT yes", it packages just fine, but takes a really long time. I keep getting the following error:
    SDK is missing file C:\{my 4.0 sdk path}/lib/aot/bin/compile-abc/compile-abc.exe
    Sure enough, navigating to that path shows compile-abc does not exist. Any ideas of what I may be doing wrong?

    We are aware of the issue and investigating it.As if now,-useLegacyAOT switch is not working on windows.For more information please see this:
    http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air4-0_flashplayer12-0_release notes.pdf
    Thanks,
    Sakshi
    Adobe AIR Team

  • Compile-abc.exe is not a valid win32 application

    I'm trying to use
    -useLegacyAOT no
    in the adt command line and I get an error:
    compile-abc.exe is not a valid Win32 application

    I am experiencing the same problem, I am using:
    AIR SDK 15 release version (v. 15.0.0.249)
    Windows XP Home Edition Service Pack 2
    Since in AIR 15 the faster iOS compiler is the default I am not using the -useLegacyAOT argument.
    The full command line is:
    adt -package -target ipa-ad-hoc -connect 192.168.1.87 -storetype pkcs12 -keystore "xxxx.p12" -storepass xxxx -provisioning-profile xxxx.mobileprovision "dist\xxxx-ad-hoc.ipa" "application_ios.xml" -C bin . -C "icons/ios" . -extdir lib/
    Here's a screenshot of the error message:
    EDIT:
    I also submitted a bug report for it, in case anybody wants to vote for it, its number is 3821809:
    Bug#3821809 - compile-abc.exe is not a valid win32 application

  • RFE: faster javac compilation using invocation instead of running javac.exe

    Sun's JDK contains the Java compiler in tools.jar.
    Why not use it instead of running javac.exe?
    It should also simplify the code for cross platform compatibility...
    Regards,
    Yaniv Kunda

    I meant that JDev would invoke the compiler from the libs of the project JDK.
    But this is indeed a sort of a hack because the libs are not documented and are sun-specific (a problem with other JDKs).
    Anyway, I was just reading a bit on Java 6 (Mustang) and saw that an API (per JSR-199 : http://jcp.org/en/jsr/detail?id=199) for java compilation is one of its new features!
    This feature is documented in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4164450.
    I guess it would be a feature for a newer major release of JDev, but nevertheless important to mention.
    Regards,
    Yaniv Kunda

  • How to create and exe from a class file.

    I want to create an application and want to distribute it. I am using simplw awt gui interface. I have compiled the program and have got the required class file. If I want an executable how can I go for it.
    There are many files provided by java library which are exe but are created using java API eg. policytool.exe. Please Help.
    Ashwini Bagga,
    Jaipur(Rajasthan)
    INDIA.

    Java uses the JVM to parse the class files. It cannot be converted to a .exe file
    but if you want to distribute it, i suggest you use InstallAnywhere which makes it into an exe installer.
    In the end it still uses the virtual machine...
    If i am wrong anywhere pls correct me thanks...

  • Error while using .jar file instead of class file.

    Hello friends,
    I created a java class which are referred and called from other jsp\xml and java files. I compiled this java class and everything is working properly. However, I do not want to use class files but want to use jar files instead. So, I created a jar file of this class file by using the command "jar -cvf jarfilename.jar".I kept the jar file in its respective folder .Also, I removed the class file from its path, just to see that the jar file will work automatically.
    Unfortunately, I am getting an error:
    java.lang.RuntimeException: Component.createComponent(...) Component class not found: <java class path>. I also tried giving the path of this jar file in the classpath. This also does not seem working.
    How to solve this problem?
    Thanks,
    Ranjith M.V
    Edited by: RanjithM.V on May 11, 2008 10:34 PM

    You probably populated the jar file incorrectly.
    A common mistake is to include the path that you had on the classpath, in the jar file.
    So a person will have a classpath like this: /foo/
    And a class in a package bar, like this:
    package bar;So that other classes would include the file like this:
    import bar.TheClass;And the class file is on the filesystem like this:
    .../foo/bar/TheClass.classThen they'll create the jar file including the foo directory, so if they list the jar's contents, they'll see the above (/foo/bar/TheClass.class). But this is wrong. It should start off so that the jar entries start with the top-level package names (like /bar/TheClass.class).
    Maybe you've done that.

  • Error Compiling With java.mail.Session class

    Hi,
    The Java compiler issues an error message (below) during compilation of the following line:
    Session session = Session.getDefaultInstance( fMailServerConfig, null );
    The error message is:
    bad class file: c:\j2ee_sdk\lib\j2ee.jar(javax/mail/Session.class)
    class file has wrong version 48.0, should be 47.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    javax.mail.Session session = javax.mail.Session.getDefaultInstance( fMailServerConfig, null );
    I have tried switching between JDKs by changing the JAVA_HOME environment variable between JDKs 1.3.x to 1.4.x to 1.5.x and also to the JDK installed with the 2005 Q1 J2EE installation that I am using.
    Any ideas on how to resolve this problem? And help would be GREATLY appreciated.
    Thanks!!!
    Stuart Hoffman

    in Session session = Session.getDefaultInstance( fMailServerConfig, null ); pass the object of properties class instead of mailServerconfig
    now your problem are solved

Maybe you are looking for