Performance of javac in 1.5 vs 1.4.2

Our tests indicate javac in JDK 1.5 seems to be quite a bit slower than JDK 1.4.2. I have a test that tries to compile 100 Java files using 1.5 and 1.4.2:
#Results from JDK 1.5 javac
% /usr/bin/time /dx/oracleom/jdk1.5.0/bin/javac *.java
real 40.7
user 1:01.3
sys 3.2
#Results from JDK 1.4.2 javac
% /usr/bin/time javac *.java
real 28.7
user 27.0
sys 0.8
#Results from JDK 1.5 with -client option
% /usr/bin/time /dx/oracleom/jdk1.5.0/bin/javac -J-client *.java
real 51.0
user 48.1
sys 1.4
Are there any options that helps to improve javac performance in JDK1.5? Is using the -J-client option appropriate?
(The test is run on a 12-CPU 400Mhz Solaris 9 machine. Tests on a Intel-Linux machine shows similar degradation)
Thanks
Sam

#Results from JDK 1.5 javac
% /usr/bin/time /dx/oracleom/jdk1.5.0/bin/javac
*.java
real 40.7
user 1:01.3
sys 3.2
#Results from JDK 1.4.2 javac
% /usr/bin/time javac *.java
real 28.7
user 27.0
sys 0.8
Are there any options that helps to improve javac
performance in JDK1.5? Is using the -J-client option
appropriate?You will have to measure both ways to answer that: using -J-client and -J-server
How much time is spent in GC? If there is any significant amount, you should be able to eliminate that by increasing the size of the heap.
For more information, take a look at:
Tuning Garbage Collection with the 5.0 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
Ergonomics in the 5.0 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/ergo5.html
Performance Documentation for the Java HotSpot VM
http://java.sun.com/docs/hotspot/index.html
Hope this helps.
"Troubleshooting Guide for J2SE 5.0",
http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

Similar Messages

  • Controlling javac optimization when compiling

    Could someone tell me how to control the optimization performed by javac? Prior to JDK 1.5, javac had a command-line optimization flag, but nothing like it is documented for 1.5.
    I ask because I've been using Eclipse 3.1 to debug JDK-compiled Java and Java-via-JSP classes, mostly like a dream. But occasionally I can't step into code selections, usually the very ones causing an Exception - the debugger jumps straight to the Exception handling code. I assume this is because the compiler has done some optimization. btw, I'm compiling using JDK 1.5.0 javac, not whatever Eclipse/Ant would give me.
    Thanks in advance.
    Jon

    Not sure what you mean.
    javac (1.4.2)
    javac (1.5.0)

  • Flocking3D (Java3d) Question

    Hi Guys,
    I am trying to get a program running from the "Killer Game Programming" O'reilly book.
    The code I am try to run is the Chapter 22 code "Flocking3d"
    When I perform a javac *.java on the folder containing the files from the book I get 100 errors.
    I have everything installed including Java3D.
    I can post some of the errors if it helps.
    Many thanks.
                       ^
    CheckerFloor.java:11: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    CheckerFloor.java:12: package com.sun.j3d.utils.geometry does not exist
    import com.sun.j3d.utils.geometry.Text2D;
                                     ^
    CheckerFloor.java:13: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    CheckerFloor.java:22: cannot find symbol
    symbol  : class Color3f
    location: class CheckerFloor
      private final static Color3f blue = new Color3f(0.0f, 0.1f, 0.4f);
                           ^
                           ^
    PreyBoid.java:16: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    PreyBoid.java:17: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    PreyBoid.java:22: cannot find symbol
    symbol  : class Color3f
    location: class PreyBoid
      private final static Color3f orange = new Color3f(1.0f,0.75f,0.0f);
                           ^
    WrapFlocking3D.java:17: package com.sun.j3d.utils.universe does not exist
    import com.sun.j3d.utils.universe.*;
    ^
    WrapFlocking3D.java:18: package com.sun.j3d.utils.geometry does not exist
    import com.sun.j3d.utils.geometry.*;
    ^
    WrapFlocking3D.java:19: package javax.media.j3d does not exist
    import javax.media.j3d.*;
    ^
    WrapFlocking3D.java:20: package javax.vecmath does not exist
    import javax.vecmath.*;
    ^
    WrapFlocking3D.java:21: package com.sun.j3d.utils.behaviors.vp does not exist
    import com.sun.j3d.utils.behaviors.vp.*;
    ^
    WrapFlocking3D.java:31: cannot find symbol
    symbol  : class Point3d
    location: class WrapFlocking3D
      private static final Point3d USERPOSN = new Point3d(0,5,20);
                           ^
    WrapFlocking3D.java:36: cannot find symbol
    symbol  : class SimpleUniverse
    location: class WrapFlocking3D
      private SimpleUniverse su;
              ^
    WrapFlocking3D.java:37: cannot find symbol
    symbol  : class BranchGroup
    location: class WrapFlocking3D
      private BranchGroup sceneBG;
              ^
    WrapFlocking3D.java:38: cannot find symbol
    symbol  : class BoundingSphere
    location: class WrapFlocking3D
      private BoundingSphere bounds;   // for environment nodes
              ^
    WrapFlocking3D.java:116: cannot find symbol
    symbol  : class Canvas3D
    location: class WrapFlocking3D
      private void orbitControls(Canvas3D c)
                                 ^
    Boid.java:51: cannot find symbol
    symbol  : class Point3f
    location: class Boid
          new Point3f( -(float)FLOOR_LEN/2.0f, 0.05f, -(float)FLOOR_LEN/2.0f);
              ^
    Boid.java:53: cannot find symbol
    symbol  : class Point3f
    location: class Boid
          new Point3f( (float)FLOOR_LEN/2.0f, 8.0f, (float)FLOOR_LEN/2.0f);
              ^
    Boid.java:69: cannot find symbol
    symbol  : class Vector3f
    location: class Boid
      protected Vector3f boidPos = new Vector3f();
                                       ^
    Boid.java:70: cannot find symbol
    symbol  : class Vector3f
    location: class Boid
      protected Vector3f boidVel = new Vector3f();
                                       ^
    Boid.java:72: cannot find symbol
    symbol  : class TransformGroup
    location: class Boid
      private TransformGroup boidTG = new TransformGroup();
                                          ^
    100 errors

    My folder where my .java files for the flocking3d program is:
    C:\Flocking3D
    And my Java3D folder is:
    C:\Program Files\Java\Java3D\1.5.2
    this folder has the following sub folders:
    bin
    lib
    What would I need to type to tell my compiler where to find the java3D classes?
    Regards

  • Problems installing sdk1.4.2_08 on Windows Xp

    Hi, Im having problems getting the program to work. I've downloaded the files, used the install wizard and I've added the following to my path " c:\j2sdk1.4.2_08\bin". I've then gone to the command prompt and typed javac and java and it all seems to work fine. I can then perform the javac command on the java file to create a class file, but when I type java <filename>
    I get an NoSuchClassException error , but there is nothing wrong with my class. I've taken it back to a simple file that prints out one line, but I still get the same message. Can anyone suggest what could be wrong?

    Use this command:
    java -classpath . <classname>
    Make sure the "." (dot) and surrounding spaces are present, and don't include the .java extension on the classname. Issue the command from the directory that contains the classfile.
    If that works, learn how to use the classpath parameter. See the javac and java command usage instructions.

  • PROBLEM BUILDING CDC WITH RED HAT 9.0

    HI, i'm trying to build CDC with the following command:
    make CVM_JAVABIN=/usr/java/jdk1.3/bin CVM_GNU_TOOLS_PATH=/usr/bin CVM_DEBUG=true
    It start to make some new direcotries, but later the following error occurs:
    ... mkdir ../../build/linux-i686/obj
    ... mkdir ../../build/linux-i686/btclasses
    ... mkdir ../../build/linux-i686/testclasses
    ... mkdir ../../build/linux-i686/cdc_classes
    Checking for build-time classes to compile ...
    Compiling build-time classes...
    error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null,
    null, null
    100 errors
    make: *** [.compile.btclasses] Error 1
    Do you know what can i do? I'm using jdse1.3.1 and red hat linux 9.0.Thanks very much.

    Hi,
    I ran into the same problem with RH 9.0. To fix this problem you have two options:
    1. Use jdk 1.4.x - if you use this jdk to perform the compile, you'll won't receive this error.
    2. Modify your make file that performs the javac and make the following change: javac -encoding "ISO-8859-1"
    Both of those approaches should get rid of that error.
    Hope this helps?
    Cheers,
    Jeff

  • Illegal Operation in Windows

    I recently installed the J2SDK onto my machine at home (which runs windows ME). On occasion, I'll get an Illegal operation whenever I perform a javac or a java in my DOS window, (Fault Location: 0500:0681). Once this happens, I can't run either of those until I restart my computer.
    I've installed the J2SDK on a few machines before (linux and Windows 98) and have never had such problems. Any quick fixes?
    Thanks in advance.

    Stick to Windows 98 - it sounds like you have a copy. The OEM guys in the city I live in almost universally suggest 98 over ME, and in most cases spend quite a bit of effort talking customers into spending less money in their store, because they know that ME will cause more issues than the sale is worth.

  • OC4J infinity loop in javac.exe compiling JSP

    Hi,
    i have a very strange problem with OC4J 10.1.3.5.0 and one JSP page. It occurs under Windows/OC4J (dev environment) and under Linux/OAS (in production environment).
    I try to explain as best as possible.
    I have an application running OK in OC4J. In this application I have a simple JSP that contains very little java code, like this:
    <%@ include file="/wtn/gen/checkAccess.jsp" %>
    <%@page info="mySite.com"
            language="java"
            errorPage="/wtn/gen/error.jsp"
            import="java.util.Locale,
                    com.mySite.util.Util,
                    com.mySite.Const,
                    com.mySite.LoginBussines"%>
    <%
        boolean b1 = LoginBussines.isB1(request) ? true : false;
        String domain = LoginBussines.getDomain(request);
        String url = "";
        if (b1) {
           url = "/web/" + locale + "/home.html";
        } else {
           url = "/web/" + locale + "/index.html";
    %>
    <html>
      <head>
          <title>JSP Page</title>
          <% out.println("<meta http-equiv='REFRESH' content='0;url=http://" + domain + url + "' />"); %>
      </head>
      <body>
      </body>
    </html>Well, this JSP don't have any error and it works fine normally.
    Problem ocurred:
    When I delete the precompiled JSP from persistence/_pages for force .java generation and re-compilation, OC4J generate .java correctly and launch a javac.exe process for compile the servlet .java. This compilation through javac.exe don't finish, remain permanent running and the compilation of JSP does not finish.
    The web application remain sleep while javac.exe process perform ghost operations. Finally (after 5 minuts aprox.) the OC4J stop waiting and show blank page.
    The javac.exe remains alive in Operating System.
    *(strange) Cause:*
    I know the cause but I find no explanation :-(...
    The cause is the import of com.mySite.LoginBussines. This class is correctly (compiled by Eclipse and Ant) and run OK when is called from a servlet or another class running in OC4J. But when this class is imported in a JSP, the javac go crazy and remain try to compile permanently...
    *(very strange) Workaround:*
    When I delete any code line of this class (one or more, no matter), arbitrary line of any method in this Class, recompile class and try again, it's work fine!
    NOTE: the size of LoginBussines.class it's around 66.897 bytes. I don't know if it's relevant.
    Please, someone know what's going on? Someone has encountered this problem?
    Thank you so much!
    Edited by: 890752 on 11-oct-2011 4:40
    Edited by: 890752 on 11-oct-2011 6:08

    Robert,
    It appears that you have only installed the Java Runtime Environment (JRE). You need to install the Software Development Kit (SDK). Get version 1.4.2_05, since this is what your version of OC4J requires. Go to the following Web page
    http://java.sun.com/j2se/1.4.2/download.html
    And look for the "Download J2SE SDK" link -- which appears below the heading:
    J2SE v 1.4.2_05 SDK
    Good Luck,
    Avi.

  • Wlcompile - nested javac elements not working with ant 1.6.1

    Hi
    I have a problem with Ant 1.6.1 and wlcompile.
    I get the following error: The <wlcompile> type doesn’t support the nested “javac”
    element.
    Heres the error msg I get in debug mode:
    BUILD FAILED
    C:\P2Development\dev\testing\test.xml:3: The <wlcompile> type doesn't support
    the nested "javac" element.
         at org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:573)
         at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:624)
         at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:691)
         at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
         at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:320)
         at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
         at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
         at org.apache.tools.ant.Task.perform(Task.java:363)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    I’m using windows 2000. I’ve tried with weblogic.jar from Weblogic Server 8.1
    SP1 and SP2. I’ve tried with JDK 1.4.1_02 and 1.4.2_04. If I’m using Ant 1.5.3
    then everything works perfectly.
    I’ve tried to remove the WLS included Ant version to avoid conflicts with Ant
    1.6.1 and Ant 1.5.3 (that comes with Weblogic server). I’ve tried to uninstall
    Weblogic Server and just keep weblogic.jar, but I still get the same error. I’ve
    tried to put weblogic.jar on the classpath, still not working. I’ve tried to remove
    all jar files from $ANT_HOME/lib except those jar files needed to run my test
    project - ant.jar and ant-launcher.jar, but still doesn’t work. If I change $ANT_HOME
    to Ant 1.5.3 and run Ant 1.5.3 then everything works. So it seems to have something
    to do with Ant 1.6.1.
    Here’s my example code:
    <project name="wlcompile_test" default="test" basedir=".">
         <target name="test" depends="init">
    <wlcompile srcdir="${src.dir}" destdir="${build.dir}">
    <javac debug="${build.debuginfo}" debuglevel="${build.debuglevel}"
    nowarn="${build.nowarn}" deprecation="${build.deprecated}" source="${build.source.version}"/>
    </wlcompile>
         </target>
    <target name="clean" depends="init">
    <delete dir="${build.dir}"/>
    </target>
    <target name="init">
    <taskdef name="wlcompile" classname="weblogic.ant.taskdefs.build.WLCompileTask"
    classpath="C:\P2Development\weblogic.jar"/>
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="classes"/>
    <property name="build.compiler" value="modern"/>
    <property name="build.compiler.pedantic" value="true"/>
    <property name="build.debuginfo" value="true"/>
    <property name="build.debuglevel" value="lines,vars,source"/>
    <property name="build.deprecated" value="false"/>
    <property name="build.nowarn" value="off"/>
    <property name="build.source.version" value="1.4"/>
    <mkdir dir="${build.dir}"/>
    </target>
    </project>
    And I try to run “ant test”
    It doesn’t work with Ant 1.6.1 and weblogic.jar from WLS 8.1 SP1 and SP2. But
    it works perfectly if I change to Ant 1.5.3.
    Here’s a link to the Ant wlcompile task documentation from BEA:
    http://e-docs.bea.com/wls/docs81/programming/environment.html#1098348
    Regards,
    Tobias Wallter

    Yes, this one is fixed in 8.1 SP3. If you need a patch before then,
    contact [email protected] and reference CR136493.
    -- Rob
    Tobias Wallter wrote:
    Hi
    I have a problem with Ant 1.6.1 and wlcompile.
    I get the following error: The <wlcompile> type doesn?t support the nested ?javac?
    element.
    Heres the error msg I get in debug mode:
    BUILD FAILED
    C:\P2Development\dev\testing\test.xml:3: The <wlcompile> type doesn't support
    the nested "javac" element.
         at org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:573)
         at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:624)
         at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:691)
         at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
         at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:320)
         at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
         at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
         at org.apache.tools.ant.Task.perform(Task.java:363)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    I?m using windows 2000. I?ve tried with weblogic.jar from Weblogic Server 8.1
    SP1 and SP2. I?ve tried with JDK 1.4.1_02 and 1.4.2_04. If I?m using Ant 1.5.3
    then everything works perfectly.
    I?ve tried to remove the WLS included Ant version to avoid conflicts with Ant
    1.6.1 and Ant 1.5.3 (that comes with Weblogic server). I?ve tried to uninstall
    Weblogic Server and just keep weblogic.jar, but I still get the same error. I?ve
    tried to put weblogic.jar on the classpath, still not working. I?ve tried to remove
    all jar files from $ANT_HOME/lib except those jar files needed to run my test
    project - ant.jar and ant-launcher.jar, but still doesn?t work. If I change $ANT_HOME
    to Ant 1.5.3 and run Ant 1.5.3 then everything works. So it seems to have something
    to do with Ant 1.6.1.
    Here?s my example code:
    <project name="wlcompile_test" default="test" basedir=".">
         <target name="test" depends="init">
    <wlcompile srcdir="${src.dir}" destdir="${build.dir}">
    <javac debug="${build.debuginfo}" debuglevel="${build.debuglevel}"
    nowarn="${build.nowarn}" deprecation="${build.deprecated}" source="${build.source.version}"/>
    </wlcompile>
         </target>
    <target name="clean" depends="init">
    <delete dir="${build.dir}"/>
    </target>
    <target name="init">
    <taskdef name="wlcompile" classname="weblogic.ant.taskdefs.build.WLCompileTask"
    classpath="C:\P2Development\weblogic.jar"/>
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="classes"/>
    <property name="build.compiler" value="modern"/>
    <property name="build.compiler.pedantic" value="true"/>
    <property name="build.debuginfo" value="true"/>
    <property name="build.debuglevel" value="lines,vars,source"/>
    <property name="build.deprecated" value="false"/>
    <property name="build.nowarn" value="off"/>
    <property name="build.source.version" value="1.4"/>
    <mkdir dir="${build.dir}"/>
    </target>
    </project>
    And I try to run ?ant test?
    It doesn?t work with Ant 1.6.1 and weblogic.jar from WLS 8.1 SP1 and SP2. But
    it works perfectly if I change to Ant 1.5.3.
    Here?s a link to the Ant wlcompile task documentation from BEA:
    http://e-docs.bea.com/wls/docs81/programming/environment.html#1098348
    Regards,
    Tobias Wallter

  • Javac : command not found ?? A simple question.

    Hello.
    I need to somehow tell linux where to find javac so that I don't need
    to type in /usr/local/jdk1.4/javac HelloWorldApp.java every time I need
    to run javac. I have seen how to do this in windows but I don't know how to do it in Linux
    I know it's a simple question, I'm just new to Linux.
    Your help is appreciated.

    The answer depends on the shell you use.
    The default on linux is bash, so do this: In your home directory there is a file with the name .bashrc. Commands in that file are performed every time you start the shell.
    In that file, add the command "export PATH=/usr/local/jdk1.4/bin:$PATH". Then "source .bashrc" so that the change takes effect. You can verify that the directory has been added with "echo $PATH".
    If you want to set the path for all users and not just yourself, make the change in the system startup files. This depends on your distro; the right file might be /etc/profile or /etc/profile.local or /etc/bashrc.

  • Difference between javac and eclipse compiler

    I have the following code:
    public class Test {
         public static void main(String[] args) {          
              Integer i = 0;
              double d = 1.5d;
              i += d;
              System.out.println(i);
    }javac gives me the following error:
    Test.java:5: inconvertible types
    found   : double
    required: java.lang.Integer
                    i += d;
                         ^
    1 errorThe Eclipse compiler, however, gladly compiles and the JRE runs it, outputting "1".
    The question is: which compiler is correct?
    javac version 1.6.0_04
    java version "1.6.0_04"
    Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
    Eclipse JDT version 3.3.1.r332_v20080131

    Integer is probably 32-bit while Double is 64-bit.
    Your code is doing the following;
    - widening the original Integer to Double,
    - performing double-precision addition,
    - assigning the double-precision result to the original Integer.
    Without an explicit cast, your code is asking the compiler to implicitly narrow the double, potentially throwing away data.

  • Java performance

    I've finished my program in jdk1.4, but , i' m aware of the JRE 1.5 better performance , but will it make a difference in performance , making the class runtime with using the 1.5 javac or using the old 1.4 javac, even though it will run with JRE 1.5?

    Some specific functionality is faster, but most functionality is the same. I would sugegst testing your problem and I would ask myself do I really need it to run faster, how easy is it to migrate to 1.5 now?

  • Preformance issue with JAVAC

    I have seen a considerable performance degradation when running multiple instance of javac.
    Actually I was running a javac ant task and at the same time I do a build all for the same project (codebase) using eclipse IDE.
    It is dead slow; normally it takes 5 min to execute the ant task which is now taking around 1 hr.
    Same is the case with eclipse.
    Is this a known issue? If not, can someone file a bug with Sun in order to get it fixed?

    A slowdown that big is most likely caused by paging. Use the tools for your O/S to see if that's the case. If so close some other apps, have the builds use smaller java heaps, buy more memory, or do just one at a time :-).
    -John

  • Best possible javac environment?

    Hi All,
    I'm trying to spec out the best possible machine for doing java compiles.
    From what I've read, javac does not support more than 1 processor - is this a limitation of the compiler only being single-threaded?
    Either way, does anyone know if this is available yet, or planned?
    Also, is there any known performance benefit of compiling on any one platform over another?
    Any words of advice would be appreciated,
    Thanks,
    Mark

    If you mean to ask whether the quality of compilation will
    improve with a change in the platform, then i'm afraid the answer is no.
    The quality of compilation will remain the same irrespective of which
    platform you are using.
    However, the quality of compilation might vary according to which vendor's
    jvm you are using. If you are using Microsoft java then the quality will be slightly
    inferior to that of Sun's jdk. This is because there are a number of bugs in microsoft's
    implementation of java - unsolved bugs, i mean.
    cheers.

  • BUG: OJC creates different classes than JAVAC making them incompatible

    Using the new JDeveloper 10g production release, I saw this behaviour when I used a class compiled in JDev (with OJC) passed over RMI to a server running classes compiled with in Ant (with JAVAC).
    I took the problematic class and stripped away parts of it until I have isolated the cause - seems related to class variable members initialization.
    I will provide several exapmles, where I used several modifications, giving the output of JAVAP for the same class, once compiled by JAVAC and once by OJC, highlighting the diff.
    Example #1:
    public class Test { static final int CONSTANT = 0; }JAVAC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        static final int CONSTANT;
        public Test();
    }OJC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        static final int CONSTANT;
        static {};
        public Test();
    Example #2:
    public class Test { final int CONSTANT = 0; }JAVAC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        final int CONSTANT;
        public Test();
    }OJC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        final int CONSTANT;
        void $init$();
        public Test();
    Example #3:
    public class Test { static int CONSTANT = 0; }JAVAC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        static int CONSTANT;
        public Test();
        static {};
    }OJC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        static int CONSTANT;
        static {};
        public Test();
    Example #4:
    public class Test { int CONSTANT = 0; }JAVAC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        int CONSTANT;
        public Test();
    }OJC:
    Compiled from "Test.java"
    public class Test extends java.lang.Object{
        int CONSTANT;
        void $init$();
        public Test();
    }I also have two examples where both compilers produce the same output for JAVAP:
    public class Test { static int CONSTANT; }
    public class Test { int CONSTANT; }I hope this is enough information to solve this.
    Classes compiled with OJC should not be incompatible with classes compiled with JAVAC with the same settings!
    Regards,
    Yaniv Kunda

    I'm sorry but I'm too busy with an urgent project to set up a RMI client/server testbed for this to test this problem, but all the example I gave are ones I've performed myself, and which all work - a simple class containing a constant (in several variations of its modifiers) compiled once with JAVAC and once with OJC produced different classes.
    I simply used javap to find out the difference between the classes, and highlighted the differences in bold - that would be a good place to start looking for the bug.
    Besides I'm not sure how to create a test that loads two versions of the same class not using RMI (perhaps via a special ClassLoader?)
    Regards,
    Yaniv Kunda

  • PrepareLogin Performance Issue

    Hi Experts,
    Can you please help me know what are the things I should consider
    because I have performance issue
    when my application is executing "preparelogin.do" it is taking about 30 minutes:
    https://myserver:50001/myappb2b/user/preparelogin.do?secure=ON
    I have the followng config.xml:
    <action path="/preparelogin" type="com.sap.isa.user.action.PrepareLoginBaseAction">
         <forward name="success" path="/login.do"/>
         <forward name="failure" path="/logon/login.jsp"/>
         <forward name="darklogin" path="/login.do"/>
         <forward name="umelogin" path="/base/empty.jsp"/>
    </action>
    <action path="/login" type="com.sap.isa.user.action.LoginBaseAction">
         <forward name="success" path="/toModule.do?prefix=&amp;page=/postLogin.do"/>
         <forward name="failure" path="/logon/login.jsp"/>
         <forward name="pwchange" path="/logon/pwchange.jsp"/>
         <forward name="failureUME" path="/base/error_ume.jsp"/>
    </action>
    <!-- generic forward to switch application modules -->
    <action path="/toModule" type="org.apache.struts.actions.SwitchAction"/>
    <!-- return point for the E-Commerce Logon Module after successful logon -->
    <action path="/postLogin" forward="/b2b/postlogin.do"/>
    <action path="/b2b/postlogin" type="com.sap.isa.isacore.action.b2b.PostLoginAction">
    <forward name="success" path="/b2b/campaignfromMIG.do"/>
    </action>
    Can you please give me idea what may be the possible cause of login performance when it executes PrepareLoginBaseAction? Or are there configurations I need to look at?
    My application uses LDAP authentication then goes to SAP UME authentication.
    Thank you very much in advance.
    jemaru

    Check some of my notes here:
    [http://wiki.colar.net/sap_crm5_0_isa_trex_performance_settings]
    In particular check the JDBC connection(this cause issue very similar to yours) and gateway connection sections, those can cause serious issues like this, this default settings use to be seriously too low, until recent releases.
    A problem in production is harder to debug / trace, but if you can, do the single activity trace as somebody suggested.
    Another option is to increase the logging, that will give you infos on how long each RFC / action class take and should allow you to locate what's slow.
    When the logs are on, they are huge and it's hard to find the relevant data, so i have a small script here, that helps finding the interesting stuff (after turning on logging, you run the script and it will print out interesting lines found in the logs).
    See: [http://wiki.colar.net/isa_action_rfc_tracer]  ... you can use that script, or alternatively use tail/grep to do the same thing (if on *nix)
    Note: edit the script, set the correct SID for your system and set showRFC to true.
    compile it (javac) and run it (java)
    More infos on tracing / debugging options:
    [http://wiki.colar.net/b2c_customization]
    Edited by: Thibaut Colar on Oct 12, 2010 10:37 AM

Maybe you are looking for

  • Illustrator quits with the following error message. Can you please help me?

    Process:         Adobe Illustrator [700] Path:            /Applications/Adobe Illustrator CC/Adobe Illustrator.app/Contents/MacOS/Adobe Illustrator Identifier:      com.adobe.illustrator Version:         256 (17.0.0) Code Type:       X86-64 (Native)

  • Im coming across a problem on photoshop cc 2014

    I am trying to create a 3d text and its not letting me use the 3d tools or any tools at all. I try to use the filter gallery and none of it works, I have enough memory to do so and have got a graphics card capable but it still wont let me 3d render e

  • ITunes and PC with Windows 7 will not recognize my iPod....

    however iPod still works fine on an XP machine.  Our iPad is also working fine on the Windows 7 machine, including in iTunes.  The Windows 7 machine says the disk needs to be reformatted whenever I plugin the iPod. I have tried all of the possible fi

  • ZEN2 and 4.83SP2 ??!!

    Hi, I know it is not supported, but is there a way to make it work ? TIA Alex Leibovici Swiss Red Cross

  • Case help

    I'm using 9.2.0.5.0 I have a case in a where clause. The select is: SELECT description,dist FROM posdist WHERE posname LIKE 'NAPOS' AND to_char(nvl(active,9)) in CASE 2 WHEN 1 THEN '1' WHEN 3 THEN '9' WHEN 2 THEN (1,9) END; The column "active" is num