Which java compiler ?

hello all ;
i am going to learn java programming from now on . I dont know which java GUI compiler should i use ?
or should i use command line interpreter ?
ANd tell me also what is the difference between Java and Java2 ?
which one should i go for ?
any help will be appreciated .
Sincerely,
zeen1

There are tons of options for a GUI. I prefer to use Jext (www.jext.org) for writing the code and compiling using a command line, but there are many more options, some of which are sure to follow my post.
Java 2 is equivalent to Java 1.3. Sun decided the jump from 1.2 to 1.3 was significant enough to warrant a new name (hence the 2). As with most software, the higher version just gives more features; many more classes are included. But Java 2 is basically the same language as Java.

Similar Messages

  • Which java keyword cannot be used inside the body of a static method?

    Which java keyword cannot be used inside the body of a static method, but may be used without problems in a non-static method?

    But javac doesn't complain. So I was not partially wrong -- I was completely wrong.It's still better not to use the "this", though. When you explictly reference a static member via an instance reference (theFoo.bar or this.bar, as opposed to Foo.bar) the JLS requires a check that the reference is non-null. Clearly "this" is always non-null, but javac still puts in half of the check. Take the simple class public class Test {
        static int field;
        public void setField(int i) {this.field=i;}
        public void staticSetField(int i) {field=i;}
    } and observe the bytecodes produced: $ javap -c Test
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
    static int field;
    public Test();
      Code:
       0:   aload_0
       1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
       4:   return
    public void setField(int);
      Code:
       0:   aload_0
       1:   pop
       2:   iload_1
       3:   putstatic       #2; //Field field:I
       6:   return
    public void staticSetField(int);
      Code:
       0:   iload_1
       1:   putstatic       #2; //Field field:I
       4:   return
    }The JIT will get rid of it, but you may as well avoid the waste in the first place. (And if you really do want to check that the reference is non-null, do the check explicitly so that maintainers know it's intentional).

  • Java Compilation Process and how it relates to portability

    I need to know more about the java compilation process, how it achieves porability and its drawback and benifits. Can anyone help me with a link or an answer?
    Help would be much appriciated!

    javac, the Java compiler, is written in Java itself. It generates .class
    files from your .java source files. Those .class files are loaded by the
    JVM (the Java Virtual Machine) and executed. The javac compiler
    itself consists of just a bunch of those .class files and the compiler
    doesn't even know on what platform it is running while compiling
    your .java files.
    If you simply carry over the tools.jar file (and some other .jars) in which
    the package com.sun.tools.javac resides to another platform where a
    JVM is installed you can compile your .java files on that other platform
    too. And those compiled classes will run on that platform too ;-)
    kind regards,
    Jos

  • Which Java Version to develop Java-XML Programs

    Hello,
    I was wondering if someone could help me figure out which java bundle to download to be able to compile and run java files using the XML parser classes, and also, do I need any third party api's or somthing to use SAX and DOM.
    Sincerely
    Fredrik G�rander

    do I need any third party api's or somthing to use SAX and DOMSince it doesn't come with Java you are going to need something.
    I would suggest finding that first and then getting the jdk/jre that matches the version that it requires.

  • Java compilation and running within jsp page

    hi,
    i need of a jsp page that has a textarea in which the java coding are entered and this coding is compiled and executed. The execution result is printed.
    Please guide me.

    I don't think you can invoke java compiler or run time environment at client side (browser). Even if you use applet, i think you will not be able to do it at client side. Moreover, though java virtual machine will be available in your target user's browser, but you should not expect a java compiler in users machine.
    I have seen exam sites where they have added java code compilation and execution ability. To achieve this you can do:
    1. In your JSP page use text area where user can edit java code.
    2. Provide two buttons - 'Compile' and 'Run'.
    3. On click of 'Compile' send the code to server side. In server machine create a file in a temporary location in disk and save the code content received from client.
    4. Invoke 'javac' command (as a separate process) to compile the java class created in step 3. This process will give you error/output back which you can send back to user.
    5. In case of 'Run' you must first invoke above mentioned 'Compile' service and then another service ('Run') to actually run you java class. You can build 'Run' service in similar way.
    Here you challenge would be managing multiple client requests (to compile and run java class) at the same time.
    Code to compile and run java classes:
    import java.io.*;
    * A class to compile and run java classes.
    * @author Mrityunjoy Saha
    public class JavaProcessor{
         public static void main(String[] args){
              // Option 1 to compile and option 2 to run.
              int option=1;
              if(args.length > 0){
                   option=Integer.parseInt(args[0]);
              JavaProcessor p=new JavaProcessor();
              if(option==1){
                   p.compile();
              } else {
                   p.run();
         public void run(){
              String file="FoodTest";
              String directory="C:/Users/mrityunjoy_saha/Documents/Test";     
              executeCommand("java", directory, file);
         public void compile(){
              String file="FoodTest.java";
              String directory="C:/Users/mrityunjoy_saha/Documents/Test";     
              executeCommand("javac", directory, file);
         public void executeCommand(String command, String directory, String file){
              try{
                   String[] envp=null;
                   // Make sure that you have done Java setup in your machine.
                   // To test this try invoking javac command in command prompt.
                   Process p=Runtime.getRuntime().exec(command+" "+file,envp,new File(directory));
                   BufferedReader errorStream=new BufferedReader(new InputStreamReader(p.getErrorStream()));
                   String readData="";
                   while((readData=errorStream.readLine())!=null){
                        System.out.println(readData);
                   BufferedReader outStream=new BufferedReader(new InputStreamReader(p.getInputStream()));
                   readData="";
                   while((readData=outStream.readLine())!=null){
                        System.out.println(readData);
              catch(IOException ioe){
                   ioe.printStackTrace();
    }Thanks,
    Mrityunjoy

  • Java compile and run time questions

    Hello, I have two generic question about java compile and run:
    1. When I used javac to compile my project, it complained some classes can't be found. I added the jar file which contains these needed classes to the jre/lib/ext/ directory. The compiler no longer complains. But I'm confused. I thought the jar files in jre/lib/ext/ only used for java run time, not the compile time. Can someone help me to explain this?
    2. If I need certain user defined jar file in the classpath to compile my application, does that imply that I have to have that jar file if I want to run my project?
    Thanks in advance.

    1. lib/ext is used for generally finding classes, it doesn't matter whether you are compiling or running.
    2. Yes, you will.

  • 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

  • Constants with Java Compiler ?

    When recompiling java files which contains CONSTANTS, I mean static final variables,
    I should also recompile the classes from
    which these constants are referred to. Otherwise
    I get buggy results. Is this an aimed result of
    Java or a bug of Java, I wonder ?

    my statement is TRUE also if the member is not declared as "final". When a Java Compiler do work,
    it replaces "REFERENCES TO MEMBERS ASSIGNED CONSTANT VALUES" with their compile-time assigned values. Thus,
    --------- here is A.java ----------
    public class A {
    public static void main(String [] str) {
    System.out.println(""+ b.b);
    ---- here is B.java --------------
    public class B {
    static final int b = 10;
    after producing A.class and B.class , if reproduce
    B.class to have member b = 20 then,
    java A
    is gonna print out 10, so not displaying the real value ??
    I think One class' compilation should not be dependent
    to others classes' compilation. It seems to be a BUG of Java ? Does'nt ?
    When recompiling java files which containsCONSTANTS,
    I mean static final variables,
    I should also recompile the classes from
    which these constants are referred to. Otherwise
    I get buggy results. Is this an aimed result of
    Java or a bug of Java, I wonder ?static final int number = 3;
    MyClass.number will be parsed to 3, since it's
    guaranteed not to change unless you of course modify
    the source.

  • Configure XCode to use most recent Java compiler

    How or where do I tell Xcode what version of the Java compiler to use?
    Xcode is unable to compile a "for-each" statement ("for-each loops not supported in -source 1.3"). But /usr/bin/javac compiles the same source file correctly.
    /usr/bin/javac -version = javac 1.5.0_07
    Evidently there is more than one Java compiler on my machine, and Xcode is using an older version. I cannot find any help for this in the documentation.
    And -- very sorry to post to inappropriate forum. I'm hoping to catch a mod's attention and have him/her move to appropriate one, which I can't find.
    Tiredly,
    Chap

    Try the Unix or Developers forums under OS X Technologies.

  • Example code for java compiler with a simple GUI

    There is no question here (though discussion of the code is welcome).
    /* Update 1 */
    Now available as a stand alone or webstart app.! The STBC (see the web page*) has its own web page and has been improved to allow the user to browse to a tools.jar if one is not found on the runtime classpath, or in the JRE running the code.
    * See [http://pscode.org/stbc/].
    /* End: Update 1 */
    This simple example of using the JavaCompiler made available in Java 1.6 might be of use to check that your SSCCE is actually what it claims to be!
    If an SSCCE claims to display a runtime problem, it should compile cleanly when pasted into the text area above the Compile button. For a compilation problem, the code should show the same output errors seen in your own editor (at least until the last line of the output in the text area).
    import java.awt.BorderLayout;
    import java.awt.Font;
    import java.awt.EventQueue;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JLabel;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import javax.swing.SwingWorker;
    import javax.swing.border.EmptyBorder;
    import java.util.ArrayList;
    import java.net.URI;
    import java.io.ByteArrayOutputStream;
    import java.io.OutputStreamWriter;
    import javax.tools.ToolProvider;
    import javax.tools.JavaCompiler;
    import javax.tools.SimpleJavaFileObject;
    /** A simple Java compiler with a GUI.  Java 1.6+.
    @author Andrew Thompson
    @version 2008-06-13
    public class GuiCompiler extends JPanel {
      /** Instance of the compiler used for all compilations. */
      JavaCompiler compiler;
      /** The name of the public class.  For 'HelloWorld.java',
      this would be 'HelloWorld'. */
      JTextField name;
      /** The source code to be compiled. */
      JTextArea sourceCode;
      /** Errors and messages from the compiler. */
      JTextArea output;
      JButton compile;
      static int pad = 5;
      GuiCompiler() {
        super( new BorderLayout(pad,pad) );
        setBorder( new EmptyBorder(7,4,7,4) );
      /** A worker to perform each compilation. Disables
      the GUI input elements during the work. */
      class SourceCompilation extends SwingWorker<String, Object> {
        @Override
        public String doInBackground() {
          return compileCode();
        @Override
        protected void done() {
          try {
            enableComponents(true);
          } catch (Exception ignore) {
      /** Construct the GUI. */
      public void initGui() {
        JPanel input = new JPanel( new BorderLayout(pad,pad) );
        Font outputFont = new Font("Monospaced",Font.PLAIN,12);
        sourceCode = new JTextArea("Paste code here..", 15, 60);
        sourceCode.setFont( outputFont );
        input.add( new JScrollPane( sourceCode ),
          BorderLayout.CENTER );
        sourceCode.select(0,sourceCode.getText().length());
        JPanel namePanel = new JPanel(new BorderLayout(pad,pad));
        name = new JTextField(15);
        name.setToolTipText("Name of the public class");
        namePanel.add( name, BorderLayout.CENTER );
        namePanel.add( new JLabel("Class name"), BorderLayout.WEST );
        input.add( namePanel, BorderLayout.NORTH );
        compile = new JButton( "Compile" );
        compile.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              (new SourceCompilation()).execute();
        input.add( compile, BorderLayout.SOUTH );
        this.add( input, BorderLayout.CENTER );
        output = new JTextArea("", 5, 40);
        output.setFont( outputFont );
        output.setEditable(false);
        this.add( new JScrollPane( output ), BorderLayout.SOUTH );
      /** Compile the code in the source input area. */
      public String compileCode() {
        output.setText( "Compiling.." );
        enableComponents(false);
        String compResult = null;
        if (compiler==null) {
          compiler = ToolProvider.getSystemJavaCompiler();
        if ( compiler!=null ) {
          String code = sourceCode.getText();
          String sourceName = name.getText().trim();
          if ( sourceName.toLowerCase().endsWith(".java") ) {
            sourceName = sourceName.substring(
              0,sourceName.length()-5 );
          JavaSourceFromString javaString = new JavaSourceFromString(
            sourceName,
            code);
          ArrayList<JavaSourceFromString> al =
            new ArrayList<JavaSourceFromString>();
          al.add( javaString );
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          OutputStreamWriter osw = new OutputStreamWriter( baos );
          JavaCompiler.CompilationTask task = compiler.getTask(
            osw,
            null,
            null,
            null,
            null,
            al);
          boolean success = task.call();
          output.setText( baos.toString().replaceAll("\t", "  ") );
          compResult = "Compiled without errors: " + success;
          output.append( compResult );
          output.setCaretPosition(0);
        } else {
          output.setText( "No compilation possible - sorry!" );
          JOptionPane.showMessageDialog(this,
            "No compiler is available to this runtime!",
            "Compiler not found",
            JOptionPane.ERROR_MESSAGE
          System.exit(-1);
        return compResult;
      /** Set the main GUI input components enabled
      according to the enable flag. */
      public void enableComponents(boolean enable) {
        compile.setEnabled(enable);
        name.setEnabled(enable);
        sourceCode.setEnabled(enable);
      public static void main(String[] args) throws Exception {
        Runnable r = new Runnable() {
          public void run() {
            JFrame f = new JFrame("SSCCE text based compiler");
            f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            GuiCompiler compilerPane = new GuiCompiler();
            compilerPane.initGui();
            f.getContentPane().add(compilerPane);
            f.pack();
            f.setMinimumSize( f.getSize() );
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        EventQueue.invokeLater(r);
    * A file object used to represent source coming from a string.
    * This example is from the JavaDocs for JavaCompiler.
    class JavaSourceFromString extends SimpleJavaFileObject {
      * The source code of this "file".
      final String code;
      * Constructs a new JavaSourceFromString.
      * @param name the name of the compilation unit represented
        by this file object
      * @param code the source code for the compilation unit
        represented by this file object
      JavaSourceFromString(String name, String code) {
        super(URI.create(
          "string:///" +
          name.replace('.','/') +
          Kind.SOURCE.extension),
          Kind.SOURCE);
        this.code = code;
      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors) {
        return code;
    }Edit 1:
    Added..
            f.setMinimumSize( f.getSize() );Edited by: AndrewThompson64 on Jun 13, 2008 12:24 PM
    Edited by: AndrewThompson64 on Jun 23, 2008 5:54 AM

    kevjava wrote: Some things that I think would be useful:
    Suggestions reordered to suit my reply..
    kevjava wrote: 2. Line numbering, and/or a line counter so you can see how much scrolling you're going to be imposing on the forum readers.
    Good idea, and since the line count is only a handful of lines of code to implement, I took that option. See the [line count|http://pscode.org/stbc/help.html#linecount] section of the (new) [STBC Help|http://pscode.org/stbc/help.html] page for more details. (Insert plaintiff whining about the arbitrary limits set - here).
    I considered adding line length checking, but the [Text Width Checker|http://pscode.org/twc/] ('sold separately') already has that covered, and I would prefer to keep this tool more specific to compilation, which leads me to..
    kevjava wrote: 1. A button to run the code, to see that it demonstrates the problem that you wish for the forum to solve...
    Interesting idea, but I think that is better suited to a more full blown (but still relatively simple) GUId compiler. I am not fully decided that running a class is unsuited to STBC, but I am more likely to implement a clickable list of compilation errors, than a 'run' button.
    On the other hand I am thinking the clickable error list is also better suited to an altogether more abled compiler, so don't hold your breath to see either in the STBC.
    You might note I have not bothered to update the screenshots to show the line count label. That is because I am still considering error lists and running code, and open to further suggestion (not because I am just slack!). If the screenshots update to include the line count but nothing else, take that as a sign. ;-)
    Thanks for your ideas. The line count alone is worth a few Dukes.

  • Tomcat/Java Compiler crash

    The following issue is running on a HP/UX 11i V2 Itanium Superdome server.
    We have a vendor application being deployed with Tomcat. The versions of Tomcat and java are:
    Tomcat is 5.0.28 (required by vendor)
    java is 1.4.2.10 (required by vendor)
    Tomcat is randomly crashing with the following:
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]: Error 0
    si_code [2]: SEGV_ACCERR [addr: 0xc00]
    Aborting...
    Unexpected Signal : 11 occurred at PC=0xC56EF780
    Function=_ZN7RegMask3ANDERKS_
    Compiler thread crashed while compiling a method!
    Compiled method class=ibi.broker.util.RCDES
    Compiled method name=getStringFromHexString
    Compiled method signature=(Ljava/lang/String;)Ljava/lang/String;
    Library=/opt/java1.4/jre/lib/IA64N/server/libjvm.so
    Current Java thread:
    "CompilerThread0" daemon prio=7 tid=00064c50 nid=9 lwp_id=3017 runnable [0x00000
    000..0x6a4001f8]
    This is a problem with java compiling a method out of a class/jar file, correct? So, I added the following directive in the catalina.sh file for the JAVA_OPTS:
    -XX:CompileCommand= exclude,ibi/broker/util/RCDES,getStringFromHexString
    This should prevent the suspect method from getting compiled. And it does. The catalina.out file has
    ### Excluding compile: ibi.broker.util.RCDES::getStringFromHexString
    which verifies this.
    Well, then vendor thinks this is a problem with either Tomcat or Java.
    So, does anyone think this is really a Tomcat or Java problem or a problem with the vendors method? I was able to find the jar file with the class file that contains this method. Since this is in a class file, is there a way to manually compile this method to see if I can reproduce the problem?

    The JVM should never segfault. Unless you are using JNI it shouldn't be possible to write code that causes this sort of behaviour.
    So when you see a segfault it usually boils down to (in no particular order) one of:
    1. Hardware problem
    2. JNI (mis)use
    3. JVM bug.
    Check with the vendor to see if their app includes any JNI logic. If not, try it on known good hardware. If it still falls over, raise a bug with Sun.

  • Java compiler failed

    I know this has to be a simple solution but I am new to Java. When I try and compile the Hello World program I am getting:
    Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\Users\Chris\AppData\Local\Temp\rapc_29286710.dir -bootcla ...
    I have set my path up through the control panel and still nothing. Any help would be greatly appreciated!

    This is the file:
    * HelloWorld.java
    * The sentinal sample!
    * Copyright © 1998-2008 Research In Motion Ltd.
    * Note: For the sake of simplicity, this sample application may not leverage
    * resource bundles and resource strings. However, it is STRONGLY recommended
    * that application developers make use of the localization features available
    * within the BlackBerry development platform to ensure a seamless application
    * experience across a variety of languages and geographies. For more information
    * on localizing your application, please refer to the BlackBerry Java Development
    * Environment Development Guide associated with this release.
    package com.rim.samples.device.helloworlddemo;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.RichTextField;
    * BlackBerry applications that provide a user interface must extend
    * UiApplication.
    public class HelloWorldDemo extends UiApplication
    * Entry point for application.
    public static void main(String[] args)
    // Create a new instance of the application.
    HelloWorldDemo theApp = new HelloWorldDemo();
    // To make the application enter the event thread and start processing messages,
    // we invoke the enterEventDispatcher() method.
    theApp.enterEventDispatcher();
    * <p>The default constructor. Creates all of the RIM UI components and pushes the
    * application's root screen onto the UI stack.
    public HelloWorldDemo()
    // Push the main screen instance onto the UI stack for rendering.
    pushScreen(new HelloWorldScreen());
    * Create a new screen that extends MainScreen, which provides default standard
    * behavior for BlackBerry applications.
    /*package*/ final class HelloWorldScreen extends MainScreen
    * HelloWorldScreen constructor.
    public HelloWorldScreen()
    // Add a field to the title region of the screen. We use a simple LabelField
    // here. The ELLIPSIS option truncates the label text with "..." if the text
    // is too long for the space available.
    LabelField title = new LabelField("Hello World Demo" , LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    setTitle(title);
    // Add a read only text field (RichTextField) to the screen. The RichTextField
    // is focusable by default. In this case we provide a style to make the field
    // non-focusable.
    add(new RichTextField("Hello World!" ,Field.NON_FOCUSABLE));
    * Display a dialog box to the user with "Goodbye!" when the application
    * is closed.
    * @see net.rim.device.api.ui.Screen#close()
    public void close()
    // Display a farewell message before closing application.
    Dialog.alert("Goodbye!");
    System.exit(0);
    super.close();
    This is what I get when I build:
    Building Helloworldproject
    C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\rapc.exe -quiet import=..\lib\net_rim_api.jar codename=Helloworldproject Helloworldproject.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Helloworld1.java"
    C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Helloworld1.java:30: class HelloWorldDemo is public, should be declared in a file named HelloWorldDemo.java
    public class HelloWorldDemo extends UiApplication
    ^
    1 error
    Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\Users\Chris\AppData\Local\Temp\rapc_29286710.dir -bootcla ...
    Error while building project

  • Compiling Java compiler code?

    Hi..
    I came to know that java compiler itself is written in Java language. If i am wright then please tell me what is the compiler used to compile and produce *"javac"* executable file.

    ejp wrote:
    Originally, i.e. in about 1994, there had to be a compiler written in another language, probably C++, but that would have been dropped immediately there was a working Java version.Just for the record: IBM produced a Java compiler written in C++, called Jikes. It was a very active project and actively used in many places. It was the fastest Java compiler there was at the time (remember: JVMs weren't always as optimized as they are these days), which made it the primary compiler for many developers. At some point, however the Java compilers written in Java started to get as fast as Jikes (at least partially because the JVM got faster) and the advantage of Jikes was reduced. These days I hardly ever see Jikes used in actual development.
    Also, don't confuse Jikes with the [Jikes RVM|http://jikesrvm.org/], which is a Java virtual machine written in Java. So to summarize: Projects containing "Jikes" in their name seem to focus on implementing Java-related infrastructure parts using the "wrong" language.
    Edited by: JoachimSauer on Jul 8, 2010 10:30 AM

  • How to find the version number of Java compiler used

    Is there a simple programatical way to extract what version of Java compiler was used to create a certain class file (the byte code) from within the program?
    Actually, by checking the file is ok too.

    Thanks for the program. I've run it and I got 1.4.2as
    an output.
    Can I assume I'me using SDK 1.4.2 through netBeansIDE
    3.5.1 (which it came with bundled)?if you would remove J2SDK 1.4.0, then you could be
    sure that your netbeans is NOT using it anymore...
    howevere, you could also set some settings inside
    netbean, and voila... you could set it to use
    whichever sdk version you want...
    but if you are not sure which one of these it
    currently uses, then i assume that it is sdk 1.4.0,
    because i have no reason to believe othervise.This is from my old AUTOEXEC.BAT:
    SET CLASSPATH=.
    SET PATH=C:\j2sdk1.4.0_01\bin
    I installed netBeans IDE 3.5.1 a few weeks ago, but did not change my AUTOEXEC.BAT file for a while.
    Then I changed AUTOEXEC file to the following:
    SET CLASSPATH=.
    SET PATH=C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin
    IDE kept working, but DOS stopped recognizing javac command.
    After getting suggestions from some people here, I changed the AUTOEXEC to:
    SET CLASSPATH=.
    SET PATH=C:\Progra~1\j2sdk_nb\j2sdk1.4.2\bin
    IDE still works, and I can compile from DOS now.
    SDK 1.4.2 must have been installed (or at least unpacked) by IDE 3.5.1.
    Does anybody know how to change settings on IDE 3.5.1 to make it use whichever SDK I want to try?

  • Trouble opening Java Compiler

    I am attempting to learn Java from scratch but am having trouble getting to first base ie. opening the Java Compiler on my Windows XP.
    I have purchased "Learning Java" by O'REILLY which comes with a CDROM containing software including a Java Compiler called JAVAC.
    Any thoughts anyone?
    Cheers

    you have to install the java compiler. The best place to do that from is java.sun.com. Follow this link
    http://java.sun.com/j2se/1.5.0/download.jsp and download the jdk
    and then you can follow the install instructions for windows XP. and after installation, you have to setup something called environment variables for Java. I can never remember how to do that, you can find out how to that from the installation guide of jdk. and after all of that, you will be able to run java programs

Maybe you are looking for