Searching Java Compiler from Sun

Hello
I have Download the JAVA SDK 1.4 Standard from SUN. I have find 4 demo Java Applications but no JAVA Compiler.
Now someone how I can get the full Java compiler with all librarys and Documentation?
Kind regards
Sven

If you install the JDK1.4 you should have the compiler. You'll see it under {JAVAHOME}\bin. To compile a java file, you'll have to use javac.
The API documentation is a seperate download.

Similar Messages

  • Invoking the java compiler from programs

    HI, I'm a high school java student in the AP Java course. A project that I have been interested in for a while is making a simple IDE, but to do this I need to compile and run programs from within my program.
    What I have tried:
    The method Compiler.compileClasses("name of file i wanted to compile");
    The method System.loadLibrary(System.getProperty("java.compiler"));
    The JavaCompiler class in javax.tools. this is my source code.
    import javax.tools.*;
    public class CompileTest
         public static void main(String[] args)
              String fileToCompile ="Test.java";
              JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
              int compilationResult =     compiler.run(null, null, null, fileToCompile);
              if(compilationResult == 0)
                   System.out.println("Compilation is successful");
              else
                   System.out.println("Compilation Failed");
    After this threw NullPointerExceptions I put the line System.out.println(ToolProvider.getSystemJavaCompiler()); and the output was null.
    Any help would be appreciated.
    Also, if anyone knows how to run the subsequent class file, that would also be a big help

    To run the program, load the class file with a classloader, which will give you a Class object. You then use reflection to find the public static void main(String[] args) Method object, then use Method's invoke method to call main.
    You should deal with any exceptions from the program so that it doesn't break your IDE.
    It would probably be a good idea to run the program in its own classloader which you could trash after it finishes running so you don't leave resources hanging around.
    And finally you probably need to deal with the case where the program calls System.exit(). That could be tricky. (translation, I haven't the foggiest idea how to handle it but I'm sure its possible).
    Also there is the issue of background threads (non daemon and daemon) running after main completes. What ya gonna do?
    Runtime.exec() is looking mighty attractive right now.
    Bruce

  • Java Training from Sun

    Has anyone taken any of the courses listed on the following website:
    http://www.sun.com/training/catalog/java/delivery.xml#wlc
    If so, how did you benefit from the content? How is the course arranged? Is it very interactive? Does it have audio to accompany all or most of the video? How would you compare this training to other cbt or book training?
    Any thoughts would be appreciated.

    Solon magrizos is by far the most interesting professor I�ve had throughout my university career. I think a lot of the faculty has managed to fall into a routine where year after year they do the same old thing and become increasingly distanced from their students. Prof. Baron (or Jake as he tells us to call him) goes out of his way to make sure this doesn�t happen. He updates his courses year after year to make sure we�re using relevant examples and always brings in guest speakers for relevant topics. I highly recommend that you go out of your way to take any course you can with him.

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Compiling java code from a running java application

    How does compiling of java code from a running java application work?
    I found a class: com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class works.

    How does compiling of java code from a running java
    application work?Probably most reliably using Runtime.exec().
    I found a class:
    com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class
    works.For a purpose. You are not supposed to use this class. With the next JRE release or implementation, it might not exist anymore - it's not part of the standard API.

  • Compiling java classes from JDeveloper

    Hi guys... perhaps this thred need to be created in JDeveloper fourm, it so please let me know.
    I generated the classes from a web service which complie without errors and exedcute correctly. When trying to compile the main stub in Oracle database, I get an error "CONNOT RESOLVE SYMBOL" reviewing the java class, I see that extends the wrapper generated by Jdev. So I try to complie the extendable class, after trying to generate and compile it in the database, I get the error: "class$ is reserved for internal use" The code has the next line:
    static java.lang.Class class$(java.lang.String param1)
    Is this error launched from the oracle database? My guess is that maybe Im missing some library or something and thats why I can create the such Java Name procedures. But I will like if anyone could guide me through this exception.
    Thanks
    JP

    Do you have .jar (or the .class) files created after the compile from JDeveloper?
    If you do, you can load all of them using the command line utility loadjava:
    $ loadjava
    loadjava: Usage: loadjava [-definer] [-encoding encoding] [-force] [-genmissing] [-genmissingjar jar] [-grant grants] [-help] [-nousage] [-noverify] [-oci8] [-order] [-resolve] [-resolver resolver] [-schema schema] [-synonym] [-thin] [-tableschema schema] [-user user/password@database] [-verbose] classes..jars..resources..properties...
    $

  • Trying to compile a .java file from another .java file

    Hello,
    I'm trying to compile a .java file from another .java file using Runtime.exec...
    String c[]=new String[3];
    c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
    Process p=Runtime.exec(c);
    If anyone can help me in atleast getting the command prompt when Runtime.exec("cmd.exe") is executed...that would be great...I tried out notepad.exe, calc, explorer instead of cmd.exe...all the commands display their respective windows..except cmd.exe...the command prompt doesnt appear...
    Please help me ASAP....
    Thanks for your help in advance...
    Regards.
    AKhila.

    try this. ur code will be compliled and will get .class file. but console won't appear. is it a must for u?
    public class Exec{
         public static void main(String a[]) throws Exception{
              String c[]=new String[3];
              c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
              Process p=Runtime.getRuntime().exec(c);
              // or Runtime.getRuntime().exec("javac Hello.java");

  • Oracle8i on RH 6.0 w/ Java 2 SDK v.1.2.2 from SUN

    I'm trying to run the OUI to install the Oracle 8i client tools on an intel platform workstation w/ RH 6.0 and the new JAVA 2 SDK v.1.2.2 from Sun Microsystems. Is there any way to make this work, or do I have to go back to the Blackdown release of the JRE 1.1.6 v5?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rrarabie ():
    I'm trying to run the OUI to install the Oracle 8i client tools on an intel platform workstation w/ RH 6.0 and the new JAVA 2 SDK v.1.2.2 from Sun Microsystems. Is there any way to make this work, or do I have to go back to the Blackdown release of the JRE 1.1.6 v5?<HR></BLOCKQUOTE>
    According to the doc titled "User Friendly Install Of Oracle8i on Redhat Linux 6.1"
    ..." use the EXACT versions i.e not newer/older versions"
    "JRE version 1.1.6v5 .........".
    Good luck

  • Is it possible to compile & run other java files from one file

    hi friends,
    i need to run 2,3 java sourse files(first.java,second.java etc) from one file.i tried the Runtime.getRunTime().exec( cmd) but here cmd must be a executable file
    what is need is to compile and run the files (first.java,second.java) from one other source file
    pls. help me in this matter,
    with warm regards,
    Vishal

    Sure:public class Test {
       public static void main(String[] args) {
          try {
             Runtime r = Runtime.getRuntime();
             r.exec("javac Test2.java");
          } catch (Exception e) {
    public class Test2 {
       public static void main(String[] args) {
          System.out.println("Hello World!");
    }Note that Test and Test2 are in two seperate files.

  • Java SE training from Sun

    The GA Launch date for Java SE 6 is Dec 7, 2006. Sun will have several courses updating to the latest SE platform. Watch this forum and http://www.sun.com/training/catalog/java/j2se.xml.
    Any requests for Java SE training can be made here also.

    The first Java SE 6 course from Sun will be WJO-1001: New Features in the Java SE 6 Platform. It will be a web-based course of approximately 6 hours. The release will be in December.

  • Migration from Sun Java System Portal Server to the Oracle Portal

    Hi, I'm in charge of evaluate the viability of a project that comprises the migration from Sun Java System Portal Server to the Oracle Portal. so I'm wondering if there is a kind of out of box migration tool in Oracle Portal or exists some guidelines to do the migration. In the other hand there is the option of migrate from Sun Java System Portal Server to Oracle WebCenter?
    Thanks in advance!

    The migration path for Sun Portal Server is Oracle WebCenter Suite. WebCenter is a significantly different architecture so there are no tools planned for the migration. However, we do plan to document and publish a whitepaper once we've assisted a few of the initial customer migrations.

  • How to compile a java source from a java program

    Hi .
    I would like to know how to compile my java source from inside an execution of a java program.
    Is there another way than rather use :
    Runtime.getRuntime().exec("javac myFile"); ?

    you can and cann't use the source code of javac... or maybe use jikes...

  • Execute compiler from my java program??

    Hi,
    How can I call java compiler and interpreter from my own java program?? I've tried this code :
    public static void main(String[] args) {
        try {
            Runtime r = Runtime.getRuntime();
            r.exec("javac Test.java");
        } catch (Exception err) {
            err.printStackTrace();
    }but it didn't work. An exception was thrown, it sounds something like "error javac=2", or something like that. The exception was thrown on line r.exec. I tried change the command with r.exec("java -version"). But nothing happenned (I thought I will get string with my java version on it, like when I type the same command on console), but no error was thrown too. But when I tried this one : r.exec("java Test"), the exception was thrown. What's going on? I've compiled the Test.java using NetBeans, and moved the Test.class into user folder (C:\Document And settings\Timotius Pamungkas), but get the same exception. I've already set the path and classpath. But when I tried r.exec("calc"), windows calculator appeared.
    What's going on?? How can i compile java source code from and execute the calss file or jar file my own java program?

    Read this:
    When Runtime Exec Won't

  • Run time java compiler

    Last year I researched oracle spatial technology and created prototype using oracle 9i, standalone oc4j. In order to start oc4j, i had to download java 1.4.2 from sun site. everything worked fine.
    Now I am expanding on the prototype on different machine but am using oracle 10g. I followed the same steps (installed 10g, oc4j, downloaded j2se 1.4.2 and installed). When I start oc4j by following command
    java -jar oc4j.jar, I get
    error message stating Error loading package at file:/E:/oracle_downloads/oc4j/j2ee/home/applications/admin_ejb.jar, javac.exe no
    t found under F:\oracle\product\10.1.0\db_1\jre\1.4.2, please use a valid jdk or
    specify the location of your java compiler in server.xml using the <java-compil
    er .../> tag.
    I am not sure how do I specify location of java compiler in server.xml file sysntactically. I do not not recall this step with oracle 9i.
    I edited server.xml and http-wev-site.xml as per instructions in my spatial class for mapviewer application but I need help on how to enter the location of java compiler file in server.xml file.
    Thank you

    You cannot use the JRE java to start oc4j. Must install a complete 1.4.2 J2SDK (not JRE) then use the java binary under its bin directory to start oc4j (not the one under jre/bin directory).
    lj

  • How to run a java program without Java Compiler

    I have a small project and I want share it with my friends but my friend'pc have not
    Java compiler.
    for example, I writen a application like YM, then 2cp can sent,receive messege. My cumputer run as Server, and my frien PC run as client.
    How can my friend run it? or how to create an icon in dektop tu run a java program..??..
    (sorry about my English but U still understand what i mean (:-:)) )

    To run a program you don't need a Java compiler. Just the Java Runtime Engine. That can be downloaded from the Sun website and comes with an installer.
    You could then turn your application into an executable jar file and start it somehow like jar myYM.
    There is also software that packs a Java program into an executable file. I've never used that but one that comes to my mind is JexePack. It's for free if you can live with a copyright message popping up every time you start the program.
    http://www.duckware.com/jexepack/index.html

Maybe you are looking for

  • How to see my PC's/ Macs in my workgroup from my Mac running Leopard

    I am having trouble viewing any other computers (PC's and my G3 iMac) from my Quicksilver running OS 10.5. In previous versions of OS X I would click on the network icon on the left side of the finder window and I could see them, but now that's no lo

  • Printing multi pages in Illustrator

    Hi, Is it Possable to creat a Script that will print multiple pages from illustator but it ask you what Paper size you want e.g. A4 or A3 i know it is possible to make one and it ask how many pages you want. but i unfortunatly can't make it change pa

  • Creating a screen in report program and calling that screen in program.

    Hi, I have a report program and I want to give output in different screen. can any one tell me how to create a screen in executable program and calling that screen in program in END-OF-SELECTION for displaying results. Thanks a lot. Kiran

  • Cannot access Existing Accoun Wizard Settings to change to IMAP?

    I cleared the check boxes - Check for new messages at start up Download messages every x minutes I clicked on FILE - NEW - EXISTING MAIL ACCOUNT - but it just opened the Wizard called 'Mail Account set up' When alternatively I open the Server Setting

  • Macbook won't let me update - anything!

    Everytime I download something to install it keeps it as a removable device on the desktop and kills it once opened. I try and update iTunes and it said I need an OS X update. I currently use 10.5.8 so I went to download 10.6 and it tells me I need 1