Native compilation of Java on Oracle9i

We are trying to use the Java native compilation tool, NCOMP, that comes with Oracle9i to improve the execution speed of our Java classes. However, for this to work you have to install a C compiler, only some of which are approved by Oracle for this purpose on a given platform. The question is which ones are approved for use with NT/2000 ! The Oracle documentation is not at all clear. The README file associated with this says that approved compilers are listed in Settings_windows_nt.properties. However this just lists settings and does not explicitly state which C compiler it's trying to use ! The settings appear to indicate that it is MS Visual C++, BUT if so which version ? Professional, Enterprise, 5.0, 6.0 ??? Is this the only approved compiler ??? No where on the entire web seems to list this info. ! Any suggestions ?

Hi,
A month ago I got a note from Metalink claiming that ONLY Microsoft Visual C/C++ is certified againts ORacle 9i for WindowsNT/2000.
FYI I managed to get it working. However the NCOMP tool and it's manual are quite beta-ish and I would not recommend NCOMP easily.
Regards,
Martijn
Email me if you need further info on how to set NCOMP up.

Similar Messages

  • Compile a Java code to a native machine code

    Hi Everyone,
    What tool do I need to compile a Java code to a native machine code? Is there any free tool?
    Cecilia

    google.com is a good place to start

  • JAVA NATIVE COMPILER

    Hello,
    Is there a compiler for compiling my JAVA program in native code for win32 and Linux(x86).(free or not)
    I use SWING for the interface.
    Best regards

    Hi,
    I am not sure of a direct compiler but you can do this in two steps.
    1. Compile your Java Source into normal Java Classes using any of the normal Java Compilers.
    2. Convert these Byte code files (Java Classes) into executable files.
    There are a few options for doing this sort of thing...
    Windows
    http://www.excelsior-usa.com/jetdl.html
    ..more information about this can be obtained under the FAQ section...
    http://www.excelsior-usa.com/jetfaq.html#id2
    Another options is...
    http://www.bravozulu.com/Products/JToExe/Download/download.html
    with information about it at...
    http://www.bravozulu.com/Products/JToExe/jtoexe.html
    Unix
    Not sure of any Free stanalone programs for Unix flavours but there is an alternative here...
    http://www.ifrance.com/vonarnim/vainstall/
    Hope this helps.
    Best Regards,
    Manish

  • How much can a native compiler improve performance of a java application?

    Hello,
    we have a customer with low-end machines who complains very much about the
    starting time of an application of us. I dont't know the exact configuration
    of the clients but i think the bad perfrmance is because the client has too
    few memory and has to swap when the jvm starts.
    Could a native compiler like Excelsior JET be a solution or would the
    imporvement be only marginal?
    Anyone who has experience in this topic?
    Thank you in advance!

    Could a native compiler like Excelsior JET be a solution or would the
    imporvement be only marginal?Excelsior JET only packages up the class files and a JRE into a big blob so that it looks like a single executable. It doesn't actually generate native code for your classes.
    There are some limited pure-native compilers (e.g. GCJ - the GNU compiler for Java). Because you also need native-compiled libraries, and those are quite incomplete, only certain basic programs can be compiled down to native form without some major tweaking today.
    As to whether it'll improve your performance or not: if your program is computationally intensive (does lots of floating-point math, or other CPU-intensive algorithms), it may improve. If it's I/O, network or database bound, you'll see very little improvement, if any. If it's graphics-bound, you may see some improvement, though the native Swing support with GCJ is limited at this time.
    Even with long computationally-intensive programs, you may or may not see an improvement. If you use the server VM (java -server ...), then it does similar things behind your back (optimizing compiles), so that eventually your program speeds up a fair amount (though not to pure-native speeds).

  • Java native compilation

    Is there a good way of compiling a Java file to a windows executable?
    It must be able to support Swing and cost nothing.
    Is it even worth looking for such a program?
    Please help because the Google searches are driving me crazy!

    Java compiles to native bytecode which runs in a JVM which is a platform native executable.
    Problem solved, Java compiles to native code.
    Now move along.

  • Compiles in Java 5.0 but not 6.0

    I did my homework on my school computer (in eclipse) and compiled in in 6.0 and everything worked. Then I saved it to a usb drive
    and brought it home. I tried to run it on my computer (in eclipse) in 6.0 and it gave me this error:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)when I tried to run it. The weird thing is, if I change eclipse's preferences to compile in 5.0 everything works fine. I just don't understand
    why it compiled in 6.0 at school but won't work on my home computer in 6.0? I'm worried that my teacher might grade the assignment in
    6.0 because if he does I'll get a 0 even though everything works 100% in 5.0.
    I was just wondering if anyone could shed some light on this for me. Thanks in advance!
    Here is my assignment (just giving this so you know what the program is suppose to do):
    http://www2.ics.hawaii.edu/~esb/2008spring.ics211/hw9.html
    It basically reads from a file and adds items in the file to a PriorityQueue using a heap as the data structure. It keeps track of levels
    traversed to re-establish the heap property. How long add/poll take in realTime. And when add/poll occurs in simulatedTime.
    Here's my program:
    import java.io.*;
    import java.util.*;
    public class KinseyAnthony9<T> {
         private static String name = "";
         private static long deadline;
         private static long duration;
         private static int time;
         private static int simulatedTime = 0;
         private static boolean add;
         public static void ProcessLine(Scanner line){
              if(line.next().equalsIgnoreCase("schedule")){
                   add = true;
                   if(line.hasNext()){
                        name = line.next();
                   if(line.hasNext()){
                        deadline = Long.parseLong(line.next());
                   if(line.hasNext()){
                        duration = Long.parseLong(line.next());
                   else {
                        System.out.print("There is a format error in the supplied file");
                        System.exit(1);
                   return;
              else {
                   add = false;
                   if(line.hasNext()){
                        time = Integer.parseInt(line.next());
                   else {
                        System.out.print("There is a format error in the supplied file");
                        System.exit(1);
         public static void main(String[] param) {
              Comparator<MyProc> procCompare = new ProcComparator();
              MyPQueue<MyProc> myQueue = new MyPQueue<MyProc>(procCompare);
    //          PriorityQueue<MyProc> myQueue = new PriorityQueue<MyProc>(1000, procCompare);
              if(param.length == 1) {
                   try {
                        File readMe = new File(param[0]);
                        Scanner readFile = new Scanner(readMe);
                        String line = "";
                        while(readFile.hasNextLine()) {
                             line = readFile.nextLine();
                             Scanner readLine = new Scanner(line);
                             ProcessLine(readLine);
                             if(add) {
                                  System.out.println(simulatedTime + ": adding " + name + " with deadline " + deadline + " and duration " + duration + ".");
                                  myQueue.add(new MyProc(name, deadline, duration));
                             else if(!add) {
                                  String procName = "";
                                  long procDeadline = 0;
                                  long procDuration = 0;
                                  while(simulatedTime != time) {
                                       Scanner procScan = null;
                                       int queueSize = myQueue.size();
                                       if(queueSize <= 0) {
                                            simulatedTime = time;
                                            break;
                                       if(queueSize > 0) {
                                            procScan = new Scanner(myQueue.peek().toString());
                                            procName = procScan.next();
                                            procDeadline = Long.parseLong(procScan.next());
                                            procDuration = Long.parseLong(procScan.next());
                                            System.out.println(simulatedTime + ": performing " + procName + " with deadline " + procDeadline + " and duration " + procDuration + ".");
                                            myQueue.poll();
                                            simulatedTime += procDuration;
                                            if(simulatedTime > time) {
                                                 System.out.println((simulatedTime-procDuration) + ": adding " + procName + " with deadline " + procDeadline + " and duration " + (simulatedTime-time) + ".");
                                                 myQueue.add(new MyProc(name, deadline, (simulatedTime-time)));
                                                 simulatedTime = time;
                                                 break;
                                            else if(simulatedTime <= time) {
                                                 if(procDeadline < simulatedTime) {
                                                      System.out.println(simulatedTime + ": done performing " + procName + " (late).");
                                                 else {
                                                      System.out.println(simulatedTime + ": done performing " + procName + ".");
                   //catch any exception that might occur
                   catch(Exception e){
                        System.out.println(e); //print out the error
                        System.exit(1); //exit
              //Check if more than one or less than one parameter is entered
              else {
                   //if so give an error
                   System.out.println("Error with parameter.");
                   System.exit(1); //exit
    class ProcComparator implements Comparator<MyProc>{
         public int compare(MyProc x, MyProc y){
              long result = x.getDeadline() - y.getDeadline();
              if(result < 0)
                   return -1;
              else if(result > 0)
                   return 1;
              else
                   return 0;
    class MyPQueue<T>{
         public MyHeap<T> theHeap;
         public MyPQueue(Comparator<T> comp) {
              theHeap = new MyHeap<T>(comp);
         public boolean add(T item){
              if(theHeap.add(item)) return true;
              else return false;
         public T peek(){
              return theHeap.peek();
         public int size(){
              return theHeap.numItems();
         public T poll(){
              T result = null;
              if(theHeap.numItems() == 0) return result;
              try{
                   result = theHeap.remove();
              catch(Exception e){
                   System.out.println(e);
                   System.exit(1);
              return result;
         public String toString(){
              return theHeap.toString();
    @SuppressWarnings("unchecked")
    class MyHeap<T>{
         private Comparator<T> heapComparator = null;
         private final int MAX_SIZE = 1000;
         private T heap[];
         private int rTraverseCount = 0;
         private int aTraverseCount = 0;
         public MyHeap(Comparator<T> comp){
              heapComparator = comp;
              heap = (T[])new Object[MAX_SIZE];
         public int numItems() {
              int numItems = 0;
              for(int i = 0; heap[i] != null; i++) {
                   numItems++;
              return numItems;
         public T peek() {
              if(numItems() == 0) return null;
              return heap[0];
         public boolean add(T item) {
              long start = System.nanoTime();
              long time;
              int numItems = numItems();
              if(numItems == 0) {
                   heap[numItems] = item;
                   System.out.println("--> " + aTraverseCount +" levels were traversed to re-heapify the tree.");
                  time = System.nanoTime() - start;
                   System.out.println("--> It took " + time + "ns to complete the add operation.");
                   return true;
              else if(numItems > 0) {
                   heap[numItems] = item;
                   siftUp(0, numItems);
                   if(aTraverseCount == 1)
                        System.out.println("--> " + aTraverseCount +" level was traversed to re-heapify the tree.");
                   else
                        System.out.println("--> " + aTraverseCount +" levels were traversed to re-heapify the tree.");
                   aTraverseCount = 0;
                   time = System.nanoTime() - start;
                   System.out.println("--> It took " + time + "ns to complete the add operation.");
                   return true;
              return false;
         public T remove() throws Exception{
              long start = System.nanoTime();
              long time;
              int numItems = numItems();
              T result = heap[0];
              if(numItems == 0){
                   throw new Exception("NoSuchElementException");
              if(numItems == 1){
                   heap[0] = null;
                   time = System.nanoTime() - start;
                   System.out.println("--> It took " + time + "ns to complete the remove operation.");
                   System.out.println("--> " + rTraverseCount +" levels were traversed to re-heapify the tree.");
                   return result;
              else {
                   heap[0] = heap[numItems - 1];
                   heap[numItems - 1] = null;
                   removalswap(0);
                   if(rTraverseCount-1 == 1)
                        System.out.println("--> " + (rTraverseCount-1) +" level was traversed to re-heapify the tree.");
                   else
                        System.out.println("--> " + (rTraverseCount-1) +" levels were traversed to re-heapify the tree.");
                   rTraverseCount = 0;
              time = System.nanoTime() - start;
              System.out.println("--> It took " + time + "ns to complete the remove operation.");
              return result;
         public void removalswap(int root) {
              rTraverseCount++;
              T valueHolder = heap[root];
              int left = (2*root) + 1;
              int right = (2*root) + 2;
              if(heap[right] != null && heap[left] != null){ //make sure left and right children aren't null
                   if(heapComparator.compare(heap[root],heap[left]) <= 0 &&  //if root is less than or equal
                      heapComparator.compare(heap[root],heap[right]) <= 0) return; //to its children return
                   if(heapComparator.compare(heap[root],heap[left]) > 0){ //if root is greater than left
                        if(heapComparator.compare(heap[left], heap[right]) > 0){ //compare left and right
                             heap[root] = heap[right]; //and swap with the smaller of the two
                             heap[right] = valueHolder;//in this case right is smaller so swap with right
                             removalswap(right);
                        else { //in this case left is smaller so swap with left
                             heap[root] = heap[left];
                             heap[left] = valueHolder;
                             removalswap(left);
                   else if(heapComparator.compare(heap[root],heap[right]) > 0){ //root can be greater than left
                             heap[root] = heap[right]; //but smaller than right. In this case just swap with the
                             heap[right] = valueHolder; //right child.
                             removalswap(right);               
              else if(heap[right] == null && heap[left] != null){ //the right child can be null while the left child
                   if(heapComparator.compare(heap[root],heap[left]) <= 0) return;//is not, but the left child will never
                   else { //be null if the right child isn't. If this is the case see if the root is greater than the
                        heap[root] = heap[left]; //left child and swap if so.
                        heap[left] = valueHolder;
                        removalswap(left);
         public void siftUp(int root, int end) {
              int child = end;
              int parent = (child-1)/2;
              while(child > root){
                   parent = (child-1)/2;
                   if(heapComparator.compare(heap[parent], heap[child]) > 0) {
                        swap(parent,child);
                        child = parent;
                   else{
                        return;
         public void swap(int parent, int child){
              aTraverseCount++;
              T holdValue = heap[parent];
              heap[parent] = heap[child];
              heap[child] = holdValue;
         public String toString(){
              int i = 0;
              String heapPrint = "";
              while(heap[i] != null){
                   heapPrint += heap;
                   i++;
              return heapPrint;
    class MyProc {
         private String name;
         private long deadline;
         private long duration;
         public MyProc(String n, long dl, long dur) {
              name = n;
              deadline = dl;
              duration = dur;
         //Acessors
         public String getName() {
              return name;
         public long getDeadline() {
              return deadline;
         public long getDuration() {
              return duration;
         //Mutators
         public void setName(String n) {
              name = n;
         public void setDeadline(long dl) {
              deadline = dl;
         public void setDuration(long dur) {
              duration = dur;
         public String toString(){
              return name + " " + deadline + " " + duration;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    But if I run that in terminal I get this:
    anthony-computer:~ anthonyjk$ java -version
    java version "1.5.0_13"Yes - commandline/Terminal, that's what I meant.
    So long as the program doesn't use any 1.6-only features, then will it will compile OK both at school (using1.6) and at home (using 1.5). Eclipse can be told to produce .class files that are compatible with a particular runtime. In your case the school compiler was producing 1.6 class files that are no good when you take them home. Hence the need to recompile, telling Eclipse you want 1.5 compatible .class files.
    Or - as I mentioned - download and install the most recent JDK for use at home. There'll be less confusion that way

  • How to compile ALL java files in OR UNDER a given directory?

    G'Day Folkies,
    At face value, TikeSwing looks like the money shot for enforcing MVC in my version of minesweeper http://forum.java.sun.com/thread.jspa?forumID=54&threadID=5248903
    I'm attempting to build the "Hello World" example which comes with TikeSwing.
    http://www.javaworld.com/javaworld/jw-06-2005/jw-0620-tikeswing.html
    It compiles ok
    C:\Java\lib\tikeswing-1.5\example\src\fi\mmm\hello>javac -d C:\Java\home\classes -cp C:\Java\lib\tikeswing-1.5\src;C:\Java\lib\tikes
    wing-1.5\lib\commons-beanutils.jar;C:\Java\lib\tikeswing-1.5\lib\commons-lang-2.0.jar;C:\Java\lib\tikeswing-1.5\lib\commons-logging.
    jar;C:\Java\lib\tikeswing-1.5\lib\log4j.jar;C:\Java\lib\tikeswing-1.5\example\src;. HelloApplication.java
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    But it doesn't run
    I presume that javac isn't detecting all dependancies, presumably because Tike "decouples M from V from C" using reflections.
    C:\Java\lib\tikeswing-1.5\example\src\fi\mmm\hello>java -cp C:\Java\home\classes;C:\Java\lib\tikeswing-1.5\lib\commons-beanutils.jar
    ;C:\Java\lib\tikeswing-1.5\lib\commons-lang-2.0.jar;C:\Java\lib\tikeswing-1.5\lib\commons-logging.jar;C:\Java\lib\tikeswing-1.5\lib\
    log4j.jar;C:\Java\lib\tikeswing-1.5\example\src;C:\Java\lib\tikeswing-1.5\src;. fi.mmm.hello.HelloApplication
    Exception in thread "main" java.lang.NoClassDefFoundError: fi/mmm/yhteinen/swing/core/component/YFrame
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at fi.mmm.hello.HelloController.<init>(HelloController.java:8)
            at fi.mmm.hello.HelloApplication.main(HelloApplication.java:8)So, Please, is there a way of telling javac to just build *.java in or under C:\Java\lib\tikeswing-1.5\src\ ... regardless of dependencies?
    Thanking You for any thoughts. Keith.

    FYI.... Here's the quick and dirty, slower than a wet week, ugly, but effective batch script
    set TIKE=C:\Java\lib\tikeswing-1.5
    set SRC=%TIKE%\src
    set LIB=%TIKE%\lib
    set CLASSPATH=%LIB%\commons-beanutils.jar;%LIB%\commons-lang-2.0.jar;%LIB%\commons-logging.jar;%LIB%\log4j.jar;.
    FOR /R %SRC% %%f IN (*.java) DO javac -d C:\Java\home\classes -cp %CLASSPATH% %%f
    @ECHO OFF
    REM http://www.robvanderwoude.com/ntfor.html
    REM Walks the directory tree rooted at [drive:]path, executing the FOR statement
    REM in each directory of the tree. If no directory specification is specified
    REM after /R then the current directory is assumed. If set is just a single
    REM period (.) character then it will just enumerate the directory tree.I can't figure out how do the equivalent of javac `dir /s /b *.java` (ie: cmd doesn't seem to have a built-in facility for expanding the results of a command into the command line) which would be a lot quicker and cleaner.
    Cheers all. Thanx for the help. I appreciate it.

  • Javac compiler throws java.nio.BufferOverflowException!!Why?

    An exception has occurred in the compiler (1.4.1). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
    java.nio.BufferOverflowException
    at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
    at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:186)
    at java.lang.StringCoding.decode(StringCoding.java:222)
    at java.lang.StringCoding.decode(StringCoding.java:228)
    at java.lang.String.<init>(String.java:383)
    at java.lang.String.<init>(String.java:404)
    at java.io.UnixFileSystem.list(Native Method)
    at java.io.File.list(File.java:914)
    at com.sun.tools.javac.v8.code.ClassReader.list(ClassReader.java:1224)
    at com.sun.tools.javac.v8.code.ClassReader.listAll(ClassReader.java:1320)
    at com.sun.tools.javac.v8.code.ClassReader.fillIn(ClassReader.java:1340)
    at com.sun.tools.javac.v8.code.ClassReader.complete(ClassReader.java:1049)
    at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:332)
    at com.sun.tools.javac.v8.comp.Enter.visitTopLevel(Enter.java:467)
    at com.sun.tools.javac.v8.tree.Tree$TopLevel.accept(Tree.java:390)
    at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:442)
    at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:456)
    at com.sun.tools.javac.v8.comp.Enter.complete(Enter.java:588)
    at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:574)
    at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:334)
    at com.sun.tools.javac.v8.Main.compile(Main.java:520)
    at com.sun.tools.javac.Main.compile(Main.java:36)
    at com.sun.tools.javac.Main.main(Main.java:27)

    See this bug:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4949631

  • Native Compilation

    Has there been any further word from Oracle on the status of making Java native compilation, or at least just in time compilation, an available option inside JServer (Aurora)?
    null

    It will be in 8.1.7. For further details, see FAQ at:
    http://technet.oracle.com/products/oracle8i/htdocs/jserver_faq/index.html#_64_
    take care
    John.
    Oracle JServer Development Team

  • Does native compiling improve application performance ?

    Hi,
    I've got familiar with Excelsior Native Compiler since a week ago. They claim on their website that compiling Java classes directly to native code (machine code) will improve the performance of the application. However, JAlbum (http://jalbum.net) says that its JAR files of the application run "basically at the same speed" compared to the native compiled one for windows.
    Does really compiling Java classes to native code improve performance? I'm not talking about the startup speed, but the whole application performance.
    Thanks...

    Youve really been spreading that article aroundthis
    morning, George, lol.
    It was actually a really good read this morning.
    Thanks for posting it.I know! just realized that's about the 3rd or 4th
    time I've posted it today. just a coincidence, thoughcan't promote that book enough though. Should be required reading (just like Effective Java).

  • Will native compiling improve performance?

    Hi,
    I've got familiar with Excelsior Native Compiler since a week ago. They claim on their website that compiling Java classes to native code (machine code) will improve the performance of the application. However, JAlbum (http://jalbum.net) says that its JAR files of the application run "basically at the same speed" compared to the native compiled one for windows.
    Will really compiling Java classes to native code improve performance? I'm not talking about the startup speed, I mean the whole application performance.
    Thanks...

    depends on what the app is doing
    many things in java run as fast as native code, especially if you're using a later version of java
    i guess there's one way to find out :-)

  • Is there a free native compiler?

    Does anyone know of a free native compiler.

    Excelsior (http://www.excelsior-usa.com/) recently released a free (as in beer) edition of JET.
    For Linux, there's GCJ (http://gcc.gnu.org/java/).

  • PLSQL Native Compilation - PGA dependency

    Hi Gurus,
    Need your valuable inputs on Native Compilation enabled instance. Documentation says that natively compiled plsql code is loaded to PGA instead of SGA. Can somebody throw some light in direction of new additional size requirements for pga_aggregate_target. Will the old PGT value will do just fine.
    the main reason for asking above queustion is
    We are seeing following issue after enabling native compilation
    Cause: FDPSTP failed due to ORA-04030: out of process memory when trying to allocate 16408 bytes (koh-kghu sessi,koc koctx)
    ORA-06512: at "APPS.MSC_CL_COLLECTION", line 3504
    this doesnt occur, if we disable native compilation
    what does koh-kghu sessi,koc koctx actually mean ?
    vasu

    http://technet.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a89856/12_tune.htm#48419

  • My class only compiles in Java 1.6 and not in Java 1.5

    Hi, my java class wont compile in java 1.5, it only compiles in Java 1.6. How can i compile the following?
    import java.util.*;
    public class ShoppingBasket
         Vector products;
         public ShoppingBasket() { products = new Vector(); }
         public void addProduct(Product product)
         boolean flag = false;
         for(Enumeration e = getProducts(); e.hasMoreElements();)
              { Product item = (Product)e.nextElement();
                   if(item.getId().equals(product.id))
                   {flag = true; item.quantity++; break; }
              if(!flag){ products.addElement(product);}
         public void deleteProduct(String str)
              for(Enumeration e=getProducts();
              e.hasMoreElements();)
              { Product item = (Product)e.nextElement();
                   if(item.getId().equals(str))
                   {products.removeElement(item); break; }
         public void emptyBasket(){products = new Vector();}
         public int getProductNumber(){ return products.size();}
         public Enumeration getProducts() { return products.elements(); }
         public double getTotal()
         Enumeration e = getProducts();
         double total; Product item;
         for(total=0.0D;e.hasMoreElements();     total+= item.getTotal())
         {item = (Product)e.nextElement(); }
         return total;
    }It should link with a class called Product which compiles fine... the errors i get are below:
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:6: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            public void addProduct(Product product)
                                   ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:10: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:10: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:20: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:20: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:35: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            double total; Product item;
                          ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:36: inconvertible types
    found   : <nulltype>
    required: double
            for(total=0.0D;e.hasMoreElements();     total+= item.getTotal())
                                                                         ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:37: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            {item = (Product)e.nextElement(); }
                     ^
    8 errors

    fahafiz wrote:
    ah, so should i put the classes into the folder which the classpath is assigned to?More likely you should assign your classpath to whatever folder your classes are in.
    Put your files where they make sense, and then fill in classpath accordingly:
    javac -classpath classpath MyFile.java(I think, it's been a while since I compiled from the command-line, see http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html)

  • How to compile a java file which is in memory?

    how to compile a java file which is in memory?
    such as:
    String s="class MyClass {....}";
    how to compile the string?
    thx

    come on ...That was a perfectly valid solution.
    Do you know how to call the sun.* compiler? If not then search the forums for it. If that interface still exists (which it might not in newer versions) you then will create a string stream from your class and pass it to that.

Maybe you are looking for