How to compile a .xsd in runtime?

hi,
is there a way to compile .xsd schemes by calling the xjc in a java application? (not exec())

Hi,
If you extract the jaxb-xjc.jar you could find out more about which class to instantiate.
If you look at the manifest.mf file, it will tell you which file is the main class file used when executing the jar file.
This is the one:
com.sun.tools.xjc.Driver
Take a look at the code to see how you might go about creating the appropriate objects, and passing in the schema name.
I'm sure that you can find a way to parse the schema from another Java program through this method.
-Rob-

Similar Messages

  • How to compile menu in forms

    Dear All
    How to compile menu if anyone already using the menu
    if it is possible will you please reply.

    Thank you for sending me reply
    but my problem is when compile the menu if any user
    access the menu
    form builder doesn't allow to compile it. for that i
    have to down the form serverAre you sure you're talking about Oracle Forms Builder??
    You can compile your source .mmb even if there's any user running the runtime of your menu .mmx
    What you can't do is, you cannot replace (overwrite) the .mmx if there is any session using it.
    Tony

  • How to compile and add my own protocol

    I want to send a sms without user intervention i have got a code from net which specifies a separate protocol for message.
    Now i am unable to compile it .I need a kmidp20.zip file for it.
    Can anyone tell me how to compile it.
    I need it very urgently for my application
    I am Sending u the code.I found it at the web page
    http://www.mobile-j.de/snipsnap/space/J2ME/Sending+SMS+from+MIDlet+without+user+intervention
    This certainly don't works since "xsms" is not an registered protocol.
    So we add this protocol to the package com.symbian.midp.io.protocol.xsms: (To compile the com.symbian.midp.io.protocol.xsms.Protocol class you will need the "kmidp20.zip" from the Nokia Series_60_MIDP_SDK_2_1 (I guess an other version will do also) in your classpath.)
    package com.symbian.midp.io.protocol.xsms;import com.symbian.gcf.*;
    import com.symbian.javax.wireless.messaging.SMSConnectionSession;
    import java.io.IOException;
    import javax.microedition.io.Connection;public final class Protocol extends ProtocolBase
    public Protocol()
    super("sms", "sms");
    public void ensurePermission(String aName)
    // do nothing � hehe
    } public Connection openConnection(URI aUri, int aMode, boolean aTimeouts)
    throws IOException
    if(aUri.toString().startsWith("xsms")){
    aUri = new URI(aUri.toString().substring(1));
    } com.symbian.gcf.ConnectionSession session = SMSConnectionSession.getSession();
    String host = aUri.getHost();
    ConnectionEndPoint connection;
    if(isServerConnection(aUri))
    connection = null;
    } else
    if(aMode == 1)
    throw new IllegalArgumentException();
    connection = new SMSClientConnectionImpl(session, aUri, 2);
    connection.open();
    return connection;
    } protected boolean isServerConnection(URI aUri)
    return aUri.getHost().length() == 0;
    and we need this in that package:
    package com.symbian.midp.io.protocol.xsms;
    import com.symbian.gcf.*;
    import com.symbian.javax.wireless.messaging.*;
    import com.symbian.midp.runtime.Security;
    import com.symbian.util.BlockingOperation;
    import com.symbian.util.NativeError;
    import java.io.IOException;
    import java.io.InterruptedIOException;
    import javax.wireless.messaging.*;class SMSClientConnectionImpl extends DatagramConnectionEndPoint
    implements MessageConnection
    {    SMSClientConnectionImpl(ConnectionSession aSession, URI aUri, int aMode)
    throws IOException
    super(aSession, aUri, aMode);
    iUri = aUri;
    iSendPermissionArgs = new String[2];
    } public final Message newMessage(String aType)
    String address = null;
    if(iUri.getHost().length() > 0)
    address = iUri.toString();
    return newMessage(aType, address);
    } public final Message newMessage(String aType, String aAddress)
    Message msg;
    if(aType.equals("binary"))
    msg = new BinaryMessageImpl(aAddress, 0L);
    else
    if(aType.equals("text"))
    msg = new TextMessageImpl(aAddress, 0L);
    else
    throw new IllegalArgumentException();
    return msg;
    } public final int numberOfSegments(Message aMsg)
    MessageImpl messageImpl = getMessageImpl(aMsg);
    int numberOfSegments = 0;
    synchronized(super.iCloseOperation.getLock())
    if(super.iState != 2)
    numberOfSegments = messageImpl.populateSmsData(super.iNativePeerHandle, 0);
    if(numberOfSegments < 0)
    numberOfSegments = 0;
    return numberOfSegments;
    } public final void send(Message aMsg)
    throws IOException, InterruptedIOException
    String address = aMsg.getAddress();
    if(address == null)
    throw new IllegalArgumentException("No address");
    URI uri = new URI(address);
    MessageImpl messageImpl = getMessageImpl(aMsg);
    synchronized(super.iWriteOperation.getLock())
    synchronized(super.iWriteOperation)
    synchronized(super.iCloseOperation.getLock())
    ensureOpen();
    iSendPermissionArgs[0] = address;
    int numberOfSegments = messageImpl.populateSmsData(super.iNativePeerHandle, 1);
    if(numberOfSegments < 0)
    if(numberOfSegments == -40)
    throw new IllegalArgumentException("Message too big");
    NativeError.check(numberOfSegments);
    iSendPermissionArgs[1] = Integer.toString(numberOfSegments);
    checkSecurity("javax.wireless.messaging.sms.send", iSendPermissionArgs);
    int status = send(super.iNativePeerHandle, EMPTYBYTE_ARRAY, 0, 0, address);
    checkError(status);
    super.iWriteOperation.waitForCompletion();
    checkError(super.iWriteOperation.getResult());
    } public void setMessageListener(MessageListener aListener)
    throws IOException
    throw new IOException("Must be Server");
    } public Message receive()
    throws IOException, InterruptedIOException
    throw new IOException("Must be Server");
    } private static MessageImpl getMessageImpl(Message aMessage)
    MessageImpl messageImpl = null;
    try
    messageImpl = (MessageImpl)aMessage;
    catch(ClassCastException ex)
    throw new IllegalArgumentException("Not from newMessage()");
    return messageImpl;
    } protected static void checkSecurity(String aPermission, String aPermissionArgs[])
    // Security.ensurePermission(aPermission, aPermission, aPermissionArgs);
    } protected static final int MESSAGE_TYPE = 0;
    private static final String MUST_BE_SERVER_MSG = "Must be Server";
    private static final String SEND_PERMISSION = "javax.wireless.messaging.sms.send";
    private static final int SEND_PERMISSION_ARGS_TOTAL = 2;
    private static final int SEND_PERMISSION_ARGS_URI_INDEX = 0;
    private static final int SEND_PERMISSION_ARGS_SEGMENTS_INDEX = 1;
    private static final byte EMPTY_BYTE_ARRAY[] = new byte[0];
    private URI iUri;
    private String iSendPermissionArgs[];}

    I want to send a sms without user intervention i have got a code from net which specifies a separate protocol for message.
    Now i am unable to compile it .I need a kmidp20.zip file for it.
    Can anyone tell me how to compile it.
    I need it very urgently for my application
    I am Sending u the code.I found it at the web page
    http://www.mobile-j.de/snipsnap/space/J2ME/Sending+SMS+from+MIDlet+without+user+intervention
    This certainly don't works since "xsms" is not an registered protocol.
    So we add this protocol to the package com.symbian.midp.io.protocol.xsms: (To compile the com.symbian.midp.io.protocol.xsms.Protocol class you will need the "kmidp20.zip" from the Nokia Series_60_MIDP_SDK_2_1 (I guess an other version will do also) in your classpath.)
    package com.symbian.midp.io.protocol.xsms;import com.symbian.gcf.*;
    import com.symbian.javax.wireless.messaging.SMSConnectionSession;
    import java.io.IOException;
    import javax.microedition.io.Connection;public final class Protocol extends ProtocolBase
    public Protocol()
    super("sms", "sms");
    public void ensurePermission(String aName)
    // do nothing � hehe
    } public Connection openConnection(URI aUri, int aMode, boolean aTimeouts)
    throws IOException
    if(aUri.toString().startsWith("xsms")){
    aUri = new URI(aUri.toString().substring(1));
    } com.symbian.gcf.ConnectionSession session = SMSConnectionSession.getSession();
    String host = aUri.getHost();
    ConnectionEndPoint connection;
    if(isServerConnection(aUri))
    connection = null;
    } else
    if(aMode == 1)
    throw new IllegalArgumentException();
    connection = new SMSClientConnectionImpl(session, aUri, 2);
    connection.open();
    return connection;
    } protected boolean isServerConnection(URI aUri)
    return aUri.getHost().length() == 0;
    and we need this in that package:
    package com.symbian.midp.io.protocol.xsms;
    import com.symbian.gcf.*;
    import com.symbian.javax.wireless.messaging.*;
    import com.symbian.midp.runtime.Security;
    import com.symbian.util.BlockingOperation;
    import com.symbian.util.NativeError;
    import java.io.IOException;
    import java.io.InterruptedIOException;
    import javax.wireless.messaging.*;class SMSClientConnectionImpl extends DatagramConnectionEndPoint
    implements MessageConnection
    {    SMSClientConnectionImpl(ConnectionSession aSession, URI aUri, int aMode)
    throws IOException
    super(aSession, aUri, aMode);
    iUri = aUri;
    iSendPermissionArgs = new String[2];
    } public final Message newMessage(String aType)
    String address = null;
    if(iUri.getHost().length() > 0)
    address = iUri.toString();
    return newMessage(aType, address);
    } public final Message newMessage(String aType, String aAddress)
    Message msg;
    if(aType.equals("binary"))
    msg = new BinaryMessageImpl(aAddress, 0L);
    else
    if(aType.equals("text"))
    msg = new TextMessageImpl(aAddress, 0L);
    else
    throw new IllegalArgumentException();
    return msg;
    } public final int numberOfSegments(Message aMsg)
    MessageImpl messageImpl = getMessageImpl(aMsg);
    int numberOfSegments = 0;
    synchronized(super.iCloseOperation.getLock())
    if(super.iState != 2)
    numberOfSegments = messageImpl.populateSmsData(super.iNativePeerHandle, 0);
    if(numberOfSegments < 0)
    numberOfSegments = 0;
    return numberOfSegments;
    } public final void send(Message aMsg)
    throws IOException, InterruptedIOException
    String address = aMsg.getAddress();
    if(address == null)
    throw new IllegalArgumentException("No address");
    URI uri = new URI(address);
    MessageImpl messageImpl = getMessageImpl(aMsg);
    synchronized(super.iWriteOperation.getLock())
    synchronized(super.iWriteOperation)
    synchronized(super.iCloseOperation.getLock())
    ensureOpen();
    iSendPermissionArgs[0] = address;
    int numberOfSegments = messageImpl.populateSmsData(super.iNativePeerHandle, 1);
    if(numberOfSegments < 0)
    if(numberOfSegments == -40)
    throw new IllegalArgumentException("Message too big");
    NativeError.check(numberOfSegments);
    iSendPermissionArgs[1] = Integer.toString(numberOfSegments);
    checkSecurity("javax.wireless.messaging.sms.send", iSendPermissionArgs);
    int status = send(super.iNativePeerHandle, EMPTYBYTE_ARRAY, 0, 0, address);
    checkError(status);
    super.iWriteOperation.waitForCompletion();
    checkError(super.iWriteOperation.getResult());
    } public void setMessageListener(MessageListener aListener)
    throws IOException
    throw new IOException("Must be Server");
    } public Message receive()
    throws IOException, InterruptedIOException
    throw new IOException("Must be Server");
    } private static MessageImpl getMessageImpl(Message aMessage)
    MessageImpl messageImpl = null;
    try
    messageImpl = (MessageImpl)aMessage;
    catch(ClassCastException ex)
    throw new IllegalArgumentException("Not from newMessage()");
    return messageImpl;
    } protected static void checkSecurity(String aPermission, String aPermissionArgs[])
    // Security.ensurePermission(aPermission, aPermission, aPermissionArgs);
    } protected static final int MESSAGE_TYPE = 0;
    private static final String MUST_BE_SERVER_MSG = "Must be Server";
    private static final String SEND_PERMISSION = "javax.wireless.messaging.sms.send";
    private static final int SEND_PERMISSION_ARGS_TOTAL = 2;
    private static final int SEND_PERMISSION_ARGS_URI_INDEX = 0;
    private static final int SEND_PERMISSION_ARGS_SEGMENTS_INDEX = 1;
    private static final byte EMPTY_BYTE_ARRAY[] = new byte[0];
    private URI iUri;
    private String iSendPermissionArgs[];}

  • How to compile and run package programs in Java

    Hi,
    I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
    eg:
    package Test;
    class test1
    public void disp()
    //Any code;
    I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
    could anyone please help me.
    Thanks in Advance ,
    Ambika

    My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
    I've given my pgm and the thing I've got when I compiled it.
    Test.java
    package com.cert;
    public class Test
         public void display()
              System.out.println("Hai");
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
    javac: no source files
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
    Plz help me.
    thanks in advance
    Ambika

  • How to dynamic select based on runtime value ?

    how to dynamic select based on runtime value ?
    I want to write a select function, which do selecting based on parameters. eg,
    CREATE OR REPLACE FUNCTION myfunction
    (tableName VARCHAR2, pkName VARCHAR2, pkValue VARCHAR2, requestString VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    select requestString from tableName where pkName=pkValue;
    RETURN NULL;
    END;
    myfunction('users', 'user_id', '100', 'user_name'); it will select 'user_name' from table 'users' where 'user_id' = '100'.
    This way could save lots of coding. but it can't pass compiler. how to work out ?
    Thanks.

    While this may save code, if used frequently it will be ineffecient as all [explicative deleted]. The danger is that it would be used even for repeatable statements.
    This mode of operation ensures that every statement [calling the funciton] needs to be reparsed, which is extremely expensive in Oracle (in CPU cycles, recursive SQL and shared pool memory).
    Such reparsing is rarely a good thing for the environment ... it could easily lead to buying more CPU (bigger box) and therefore adding more Oracle license ... which could quickly exceed the typical developer's salary.
    However - if you really, really want to do this, look up 'execute immendiate' in the PL/SQL manuals.

  • Newbie question: how to compile servlet using tomcat?? Thank you

    How to set classpath? How to compile servlet.java?

    jsp is also converted into a servlet .java nd then into a class file
    this is index.jsp
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>untitled</title>
      </head>
      <body>
      </body>
    </html>this is _index.java
    /*@lineinfo:filename=/index.jsp*/
      /*@lineinfo:generated-code*/
    import oracle.jsp.runtime.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    public class _index extends com.orionserver.http.OrionHttpJspPage {
      public final String _globalsClassName = null;
      // ** Begin Declarations
      // ** End Declarations
      public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {
        response.setContentType( "text/html;charset=windows-1252");
        /* set up the intrinsic variables using the pageContext goober:
        ** session = HttpSession
        ** application = ServletContext
        ** out = JspWriter
        ** page = this
        ** config = ServletConfig
        ** all session/app beans declared in globals.jsa
        PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
        // Note: this is not emitted if the session directive == false
        HttpSession session = pageContext.getSession();
        if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
          pageContext.setAttribute(OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
          JspFactory.getDefaultFactory().releasePageContext(pageContext);
          return;
        int __jsp_tag_starteval;
        ServletContext application = pageContext.getServletContext();
        JspWriter out = pageContext.getOut();
        _index page = this;
        ServletConfig config = pageContext.getServletConfig();
        try {
          // global beans
          // end global beans
          out.write(__oracle_jsp_text[0]);
        catch( Throwable e) {
          try {
            if (out != null) out.clear();
          catch( Exception clearException) {
          pageContext.handlePageException( e);
        finally {
          OracleJspRuntime.extraHandlePCFinally(pageContext,false);
          JspFactory.getDefaultFactory().releasePageContext(pageContext);
      private static final char __oracle_jsp_text[][]=new char[1][];
      static {
        try {
        __oracle_jsp_text[0] =
        "\n<html>\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">\n    <title>untitled</title>\n  </head>\n  <body>\n  </body>\n</html>\n".toCharArray();
        catch (Throwable th) {
          System.err.println(th);
    }as you can see.. my IDE converts it into a java class so it can be conpiled to a class file.. by the way i use Oracle Jdeveloper 10g for this pupose of showing you what is happening to your jsp

  • How to compile opencl on mac 10.8.4 terminal.

    How to compile opencl on mac 10.8.4 terminal. I have tired "gcc -o main main.c -framework OpenCL". It cannot work.

    I know nothing about that application, but if it needs a Java runtime, you have to install the one distributed by Apple, not the one from Oracle.

  • How to compile only prism-es2 native on windows...

    Hi,
    I only desire to compile the JavaFX prism-es2 native for windows.
    (Because the prism-es2.dll is not included in JDK 8).
    The information I have from OpenJFX is:
    https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
    (Not very usefull).
    https://wiki.openjdk.java.net/display/Nashorn/Building+Nashorn
    http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html
    I do not wish to recompile the JDK 8 in totality !!!!!!
    Only the part Prism-es2 native... How I can do that ???
    I had taken the source code from:
    http://hg.openjdk.java.net/openjfx/8/master/rt
    Thank you ....

    -How to compile OpenJFX ?
    I try several ways (JDK1.6, JDK1.7, ...) to compile and all time,
    I receive a lot of errors.
    (Missing com.sun.javafx.font,
      I do not found these packages: com.sun.javafx.font and com.sun.javafx.text.
          (possibly auto-generated)
    And the use of ant with: -Dbuild.compiler=javac1.7 change absolutely nothing...
    =>This is how finally I compile sucessfully. (After one week of different tests !!!)
    +First, I follow the instructions of:
      https://wikis.oracle.com/display/OpenJDK/Building+OpenJFX
      http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#windows
    Take the source code:
      http://hg.openjdk.java.net/openjfx/8/master
      http://hg.openjdk.java.net/openjfx/8/master/rt
      http://hg.openjdk.java.net/openjfx/8/master/tests
    +From OpenJDK)
    -Basic Windows Check List:    (I follow all the instructions).
    1. Install the CYGWIN product.                          <--Done (The 64 bits version)
    2. Install the Bootstrap JDK, set ALT_BOOTDIR.          <--Done (JDK 1.8)
    3. Optional Import JDK, set ALT_JDK_IMPORT_PATH.    <--Not done(Not necessary for us)
    4. Install the Microsoft Visual Studio Compilers).  <--Done
       Visual Studio 2010 Express (Visual C++/C) installed.
       Windows SDK 7.1 installed (To build 64 bits). ==>WindowsSdkDir added.
       VS100COMNTOOLS is defined.
    5. Setup all environment variables for compilers (see compilers).   <--Done (64 bits)
        ...\Common7\Tools\vsvars32.bat not used because
            ...\VC\bin\amd64\vcvars64.bat is used for 64 bits.
       We set all manually for us)
        set CYGWIN=C:\ProgramFiles\cygwin64\bin
        set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
        set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
        set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
        set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
        set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
    6. Install Microsoft DirectX SDK.                         <--Done. (June 2010 version)
       (From: http://www.microsoft.com/en-ca/download/details.aspx?id=6812)
       set DXSDK_DIR=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
       set INCLUDE=%INCLUDE%;%DXSDK_DIR%\Include;
       set LIB=%LIB%;%DXSDK_DIR%\Lib\x64;
    7. Install Ant 1.7.1 or newer, make sure it is in your PATH and set ANT_HOME. <--Done.
       (The version 1.9.1)
    And also)
      -So it's important that the Visual Studio paths in PATH preceed the CYGWIN path /usr/bin.
          (due to link.exe)        <--Done
      -And for the: MSVCR100.DLL   <--Done
       set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64 (This is the only place found)
       set LIB=%LIB%;%ALT_MSVCRNN_DLL_PATH%;
    +From OpenJFX)
    I follow all the instructions...
    But for antlr, I use the version from: http://www.antlr3.org/download/
    -Change inside build-src\genVSproperties.bat
    to include my zzz_batch1\c_settings1.bat
    c_settings1.bat)
    REM ------------------------------------------------------------------------
    REM PATCH ZZZ....Visual Studio 2010...
    Rem Must be called by master\build-src\genVSproperties.bat
    REM Result is inside vs.properties
    REM No .NET\Framework...
    REM These lines will be installation-dependent.
    set CYGWIN=C:\ProgramFiles\cygwin64\bin
    set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
    set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
    set DXSDK=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
    set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64
    REM The following should be largely installation-independent.
    set VCINSTALLDIR=%VSINSTALLDIR%\VC
    REM
    set INCLUDE=%VCINSTALLDIR%\include;%WindowsSdkDir%\include;%DXSDK%\Include;%INCLUDE%
    set LIB=%VCINSTALLDIR%\lib\amd64;%WindowsSdkDir%\lib\x64;%DXSDK%\Lib\x64;%ALT_MSVCRNN_DLL_PATH%;%LIB%
    set LIBPATH=%VCINSTALLDIR%\lib;%LIBPATH%
    REM
    set DEVENVDIR=%VSINSTALLDIR%\Common7\IDE
    set DEVENVCMD=%DEVENVDIR%\VCExpress.exe
    REM
    set PATH=%VCINSTALLDIR%\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
    REM echo "%DEVENVDIR%" %DEVENVDIR%
    REM ------------------------------------------------------------------------
    genVSproperties.bat)
    if not exist "%DEVENVCMD%" set DEVENVCMD=%DEVENVDIR%\VCExpress.exe
    REM ZZZ Patch...
    call ..\zzz_batch1\c_settings1.bat
    REM Echo out a properties file
    Now I receive a lot of errors at the compilation:
    jar:
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
        [javac] Compiling 43 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
        [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\src\com\sun\javafx\tk\quantum\SceneState.java:49: error: constructor PresentableState in class PresentableState cannot be applied to given types;
        [javac]         super();
        [javac]         ^
        [javac]   required: View
    etc ...
    After search, I found that the compilation process, use the file:
       C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar
       I rename it: jfxrt.jarXXX
       (I don't know how this jar is included after some searchs).
       After the C:\zgroup1\userbase1\javafx1\open-jfx\master\artifacts\sdk\rt\lib\ext\jfxrt.jar
       causes the same errors. I create an empty jar named jfxrt.jar.
       Now I can recompile all, (After a clean)
       I clean all, I recompile but I have the another errors.
    I change the rt\build.xml:
           <condition property="include.ogl">
              <istrue value="${isWindows}"/>
            </condition>
         <!--
            Build targets...
          -->
        <target name="jar" depends="init">
            <ant antfile="${rt.root.dir}/javafx-accessible/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-logging/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/glass/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-beans/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-util-converter/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-anim/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-geom/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/pisces/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-compiler/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-runtime/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-sg-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-concurrent/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-quantum/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-sg-prism/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-embed-swing/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-controls/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-charts/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-decora-d3d"/>
            <antcall target="jar-decora-es2"/>
            <ant antfile="${rt.root.dir}/decora-jsw/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism-sw/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism-ps/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-decora-sse"/>
            <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-j2d/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-ps/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-null/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-prism-sw"/>
            <antcall target="jar-prism-d3d"/>
            <antcall target="jar-prism-es2-all"/>
            <ant antfile="${rt.root.dir}/javafx-beans-dt/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-fxml/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-javafx-android"/>
            <antcall target="jar-javafx-embed-swt"/>
            <ant antfile="${rt.root.dir}/javafx-builders/build.xml" target="jar" inheritAll="false"/>
        </target>
    I recompile and now:
    jar:
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
        [javac] Compiling 471 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
        [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\src\com\sun\webkit\dom\JSObject.java:30: error: cannot find symbol
        [javac] import netscape.javascript.JSException;
        [javac]                           ^
        [javac]   symbol:   class JSException
    --->Compile webview (and webview needs another packages, circular problems)...
    Recompile all is not really possible due to intersecting packages...
    I change rt\glass\glass\build.xml because missing)
        <property name="jfx.accessible.dir" value="${rt.dist.root.dir}/javafx-accessible"/>
        <property name="jfx.accessible.jar" value="${jfx.accessible.dir}/dist/javafx-accessible.jar"/>
    Now I recompile, I have errors but now I understand something.
    When master\artifacts\sdk\rt\lib\ext\jfxrt.jar is the empty version, I compile at a certain point.
    I copy the C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar to master\artifacts\sdk\rt\lib\ext
    and I able to go to another point. When errors, I take the empty version and alternatively I pass
    from the empty to full version.
    Finally I compile all and:
    dist:
         [echo] Creating merged openjfxrt.jar file
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib
          [jar] Building jar: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib\openjfxrt.jar
         [echo] Copying binaries
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin
         [copy] Copying 1 file to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin
    BUILD SUCCESSFUL
    I have my ES2 (Decora,Prism) part compiled with prism-es2.dll inside prism-es2-native.jar
    Now I will test all !!!

  • How to compile swf with ANT en ASC 2.0?

    He All,
    I used to compile a swf in Flash builder with this antscript below. But mxmlc in not supported anymore. Any idea how to compile the swf with ASC 2.0?
    <target name="compile.apple" depends="clean.apple">
      <echo message="Compiling swf"/>
      <mxmlc file="${app.projectfile}" output="${app.rootfile}" optimize="true" configname="airmobile" debug="false">
      <load-config filename="${app.rootdir}/resources/ant/build.config"/>
      <source-path path-element="${flex.sdkPath}/frameworks"/>
      <source-path path-element="${app.sourcedir}"/>
      <source-path path-element="${app.rootdir}/libs"/>
      <static-link-runtime-shared-libraries/>
      <compiler.library-path dir="${flex.sdkPath}/frameworks" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      <arg line="-swf-version=17" />
      <arg line="-define=CONFIG::debug,false" />
      <arg line="-define=CONFIG::device,true" />
      <arg line="-define=CONFIG::local.false" />
      <compiler.library-path dir="${app.rootdir}" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      </mxmlc>
      </target>

    He Peter,
    Thanks for your reply. I've made some steps, but still no perfect solution. I've managed to compile a swf with ant using only the AIR SDK.
    But, check these results
    - Compiled using Flash Builder release : 455 kb
    - Compiled with ant using mxmlc : 104 kb
    - Compiled with ant using compc : 139 kb
    Can you provide us an example, how to compile a swf using ant. For example, with an AIR mobile project.
    Thanks Peter.
    Tim.

  • How the compiler chooses which method to invoke?

      public class A {
            public void foo(Object o) {
                System.out.println("A.foo with an object");
      public class B extends A {
            public void foo(Object o) {
                System.out.println("B.foo with an object");   
            public void foo(String s) {
                System.out.println("B.foo with a string");   
    public class C {
        public static void main(String[] args) {
            String s = "hello";
            A a = new B();
            a.foo(s);
    }why the output is "B.foo with an object" and not "B.foo with a String".
    or more generally: how the compiler choses the method to invoke?

    or more generally: how the compiler choses the method
    to invoke?Variable a is declared as a reference to an A. The compiler only knows this. It doesn't know that the object it happens to be pointing at is a B. So it only looks at A's methods.
    A has only foo(Object), so it will call the method with the signature foo(Object).
    Which signature to use is determined at compile time, and is determined by the type of the reference.
    Now, as for whether A's foo or B's foo, that's where Java's polymorphism comes in. In this case, the VM looks at the object, not the reference, and calls the "deepest" (furthest from Object) class' method that matches that signature.
    Which class' implementation of that signature to call is determined at runtime, and is determined by the object, not the reference.

  • How to compile a java source from a java program

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

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

  • How to Compile (Overwrite .Fmx) if fmx file is opened?

    Hi,
    How to Compile (Overwrite .Fmx) if fmx file is opened? Is there any parameter to be set on server or something else?
    i am using 10g application server

    I think W1zard is refering to the setting/usage of FORMS_MMAP=FALSE, which means NOT working with memory mapping, that is the problem.
    Both metalink notes advise against Setting FORMS_MMAP=FALSE in Production environments.
    I also found another website where they advise against it for Production environments.
    We do not use it because of that...
    Excerpt from Metalink note 151618.1 - Unable to Replace .fmx Files 'On The Fly' During Forms Runtime
    When the FORMSxx_MMAP value to 0 or FALSE, Oracle Forms by-passes the default memory mapping
    and writes the file to memory for each time accessed. Thus, the executables are left closed
    on the file system, allowing for updates even during Forms Runtime. The disadvantage is that
    this may increase memory usage and reduce performance because the whole file structure
    is loaded into memory.
    For production systems, it is recommended that FORMSxx_MMAP should be unset or set to a value of 1 or TRUE
    Excerpt from Metalink note 286762.1 - How to Replace Forms Runtime Files in Production Environments 'On The Fly'
    One solution for this problem is to use parameter FORMS_MMAP/FORMS90_MMAP/
    FORMS60_MMAP/FORMS50_MMAP/FORMS45_MMAP as described
    in the following document :
    Note 151618.1 "Unable to Replace .fmx Files 'On The Fly' During Forms Runtime"
    However as described in this document, this parameter should not be used in production
    environments.http://orafrm.blogspot.com/2007/07/formsmmap.html
    Edited by: Rodolfo Ferrari on Jul 8, 2009 9:09 PM

  • How can I create a Forms9i Runtime for client distribution

    Currently we have an application developed in Forms 5.0.6.8.0 our Database has been upgraded to 9i DB. The application is working fine with this combination but we want to upgrade Forms in order to get Oracle Support. We just get the Developer Suite 9i package and we're trying to test our application with this software.
    How can I create the client runtime for Forms 9i?
    My application will work with Win 95 and 98?
    Thanks.

    Oracle9i Forms is web-only. Forms 6i is the last release of Forms to have client/server and character mode.
    You can test Forms from the Builder by installing iDS. To deploy Forms using iAS follow the documentation. It's all there in the deployment guide.
    iAS and Forms doco can be found on OTN.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • How to compile and register a Java CFX tag with multiple class files?

    All-
    If this is the wrong forum for CFX questions, please let me
    know.
    I need to determine how to compile and register a Java CFX
    tag that contains multiple class files. One class file implements
    the CustomTag interface and the other class files implement various
    supporting classes. All of the documentation that I have found
    talks about using a single class file. I am assuming that a JAR
    file will be involved, but I am not sure of the specifics.
    Thanks in advance for your help.
    -Josh

    Yes, it will involve a jar. Use your java IDE (eclipse,
    etcetera ..) to create a jar containing all of the classes. Check
    your ide's documentation for how to create jar files. After you
    have created the jar, place the jar in the CF class path so CF will
    recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
    must be restarted before it will detect the new jar. After
    restarting CF, register the CFX tag in the ColdFusion Administrator
    using the name of the class that implements the CustomTag
    interface.
    Though it is worth noting you can also instantiate java
    classes directly from ColdFusion (ie without using a CFX
    tag).

  • How to compile Oracle Linux source?

    I accidentally downloaded source DVD "Oracle Linux Release 5 Update 2 source - DVD" instead of installable ISO image. Is there anyway I can compile it to make bootable ISO image?
    I tried to search this forum as well as other places but couldn't find any information hence thought of opening a thread before I proceed to download correct file which will again take 10+ hrs with my Internet speed :(
    Any help is highly appreciated. Also I need to know which packages are required to be installed for compiling the source if at all that is possible. I am using Ubuntu 11.10 Desktop.
    Thanks in advance for any help and hope to get a reply soon :) I need to urgently install Oracle 11gR2 on it.
    Edited by: user6582219 on Apr 12, 2012 1:10 AM
    While browsing the forum for any possible solution I came to a thread that discuss installation of a package oracle-rdbms-server-11gR2-preinstall. When searched through search engine I came to know about recent certification Oracle 11gR2 on Oracle Linux 6, here is the link https://blogs.oracle.com/linux/entry/announcing_oracle_database_11g_r2
    https://blogs.oracle.com/linux/entry/announcing_oracle_database_11g_r2
    Thing is I already have Oracle Linux 6 Update 2 (the latest) installed on my machine in dual boot mode so I dropped the idea of installing version 5.2. As per the documentation 11gR2 was not certified earlier on Linux 6.2 so I thought of installing 5.2 but it is not necessary now.
    I would still appreciate if someone could answer my question just for knowing the procedure compiling source. May be it can help someone else trying to achieve this.
    I have another couple of important questions and need guidance from the experts over here. I am not sure if it is appropriate to open a new thread but for now I am posting them here.
    Before proceeding here are my environment details:
    Machine: x86 32 bit with 2 GB RAM/250 GB HD.
    OS: Kubuntu 11.10 Desktop and Oracle Linux 6 Update 2 in dual boot mode.
    Here are my partition details for your reference but as I am planning to do the installation from the scratch following new ideal scheme you can jump to last paragraph following the line "*********************************" for my questions.
    Unfortunately my partition plan went wrong and here is what I have now:
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x3d5ba9e1
    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 1002047 500000 83 Linux
    /dev/sda2 151525080 361253654 104864287+ 7 HPFS/NTFS/exFAT
    /dev/sda4 1003518 151001087 74998785 5 Extended
    /dev/sda5 1003520 7002111 2999296 82 Linux swap / Solaris
    /dev/sda6 7004160 11001855 1998848 83 Linux
    /dev/sda7 11003904 51001343 19998720 83 Linux
    /dev/sda8 51003392 110041087 29518848 83 Linux
    Partition table entries are not in disk order
    /dev/sda1 here is /tmp, /dev/sda2 is my data partition, I have separate /home / (root) partition for Kubuntu and remianing around 20 GB in extended partition is used for Oracle Linux 6.2 with default Oracle suggested LVM partition. I also have separate /boot for Kubuntu and I chose not to install grub while installing Oracle Linux. I later modified grub.cfg to add entries for Oracle Linux and now I can boot both OSs successfully.
    My issue now is I cannot extend 20 GB space (in extended partition) that I have given to Oracle though I have around 40 GB space available. This is because I alreay have 4 primary partitions (one for /boot others for "data" and one extended partition). So I have to make primary partition out of free space and install Oracle in a single partition without following recommended partition layout scheme.
    Now I want to do the installation of both the OS from the scratch and really need an advice on partition layout scheme. Here is summary of what I wan to achieve:
    1. Keep the "data" partition (primary) intact and carve an ideal partition layout for both the OS with separate /boot, /tmp, /home, swap (and may be for /usr???). Also may be I can share swap?
    2. How do I go about using LVM and is it recommended for this case? What would be ideal locations for each partitions and sizes? I already used 100 GB for "data" so now I want to keep 60 GB for Oracle Linux (and Oracle DB for which I will again make few sub-partitions) and remaining will be for Kubuntu.
    Well, I am not sure if this is the right place to ask these questions but since I can see very knowlegeable top contributors here that are willing to help novice users I thought of posting these questions.
    I would really really appreciate if someone can provide me rough draft of partition scheme in my case considering the sub-partitions needed for Oracle DB. I went thorugh number of forums and documentations to come up with solutuion and finally thought of getting help after much confusion.
    I really need to carefully plan this time because it's third time I am doing reinstallation from the scratch because of poor plan I followed previously.
    Thank you very much in advance and please let me know in case more information is needed from my side.
    Regards,
    Ramesh

    I accidentally downloaded source DVD "Oracle Linux Release 5 Update 2 source - DVD" instead of installable ISO image. Is there anyway I can compile it to make bootable ISO image?Google will be your best friend for such a question, for instance, "Creating a Custom centos Linux bootable ISO Image". There is no need to duplicate the effort. I recommend you download the correct installation DVD, e.g. 5.8
    Thing is I already have Oracle Linux 6 Update 2 (the latest) installed on my machine in dual boot mode so I dropped the idea of installing version 5.2. As per the documentation 11gR2 was not certified earlier on Linux 6.2 so I thought of installing 5.2 but it is not necessary now.So you don't need to install 5.2 anymore, but you want the information how to compile a installation DVD from the 5.2 source anyway?!
    I have another couple of important questions and need guidance from the experts over here. I am not sure if it is appropriate to open a new thread but for now I am posting them here.Questions may be important for you, but not necessarily for others. No one will complain if you create a new thread for particular questions or subjects. It is better to separate your topics and questions rather than creating a multi-mega thread, which does little to help anyone else but you. It means more work on your end, but it will be easier for anyone to participate or answer your questions, and it will allow you to better award answers.
    Regarding your partitioning questions: It is generally difficult to address such topics in a forum. You are asking for a book of information. My advice is to drop the old fashioned concepts of dual or triple boot options and install Oracle VirtualBox instead. It will make all of these questions obsolete and you can use whatever defaults when installing your virtual machine guest OS. Its a far more superior way of dealing with multiple operating systems on one and the same computer.
    I am using Ubuntu 11.10 Desktop.
    I need to urgently install Oracle 11gR2 on it.For what it's worth, if you can combine the two source below you should be able to install and run 11gR2 on Ubuntu 11.10.
    Install Oracle 11gR2 on Ubuntu Linux 11.04 (64-bit) Howto
    Install Oracle 11gR2 on Ubuntu Linux 11.04 (64-bit) Howto
    Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 howto
    However, check out VirtualBox.

Maybe you are looking for