Endorsed Standards Overriding Mechanism

Hi all,
is the 'Endorsed Standards Overriding Mechanism' supported in JNLP files? I couldn't get any information from the JNLP Specs or in this forum.
There must be a way to do this; since I expect others having problems with the standard xml parser / xslt processor bundled with the JRE, too.
I just want to use a specific version of eg. Xalan and Xerces in my webstart application. And normally you use the 'Endorsed Standards Overriding Mechanism' to accomplish this. However, with Webstart I couldn't get it to work.
Daniel

I don't think you can do this through the JNLP in a reasonable way. We had the same problem and we ended up using creating the Xerces parser in a somewhat hard-coded manner. See http://forum.java.sun.com/thread.jsp?forum=38&thread=231995

Similar Messages

  • Endorsed Standards Override Mechanism

    Has anybody had the need to do this? (http://java.sun.com/j2se/1.4.2/docs/guide/standards/)
    I jave a third party jar file that complains about needing a xml parser that supports DOM3 calls. It included a Sun JAXP 1.3 parser. But it suggests that if you use Java 1.4 that you need to do this "Endorsed Standards Override Mechanism" thing. Do you know how to do this for JDEV 10.1.2? Does run under 1.3.1 OK.

    The message suggests to set an option xendorsed="true" on the <wsimport> task. This task ist normally found in your ant build file build.xml of your NetBean project.

  • Attn: Sun. Can we distribute the JRE with a program we write?

    I'm trying to find out whether it's legal to distribute the JRE with a program I write. If you look at the license agreement when you download the JRE, first it has the regular license agreement, which says that you can't. But then it has the "supplemental" license agreement (and it says that this "modifies" the regular license agreement). In section 2 of the supplemental license agreement, it quite clearly states that you can as long as you don't modify it and you include some little messages in your documentation.
    So I'm hoping to get an answer from someone who actually works for Sun. It seems pretty clear to me that we ARE allowed to distribute the JRE with a program, but people keep sending me emails when I tell them about it - saying things like "You can't program in Java because you can't distribute it."
    What I want to do is have an installation program that installs my game and then installs Java (with Sun's JRE installer - this is included ONLY so that it can run my game, as stated in the supplemental license agreement). I should also mention that I do actually intend to SELL this program, so if that's a problem, please say so. Anyways, could someone from Sun tell me whether this is allowed or not? I don't want to break the law.
    - Steve Fletcher

    The JRE includes a readme file that explicitly states that distribution is permissible, given certain conditions. In particular, look at the 1st paragraph below:
    Reproduced here:
    README
    Java(TM) 2 Runtime Environment, Standard Edition
    Version 1.4.1
    The Java(TM) 2 Runtime Environment is intended for software developers
    and vendors to redistribute with their applications.
    The Java 2 Runtime Environment contains the Java virtual machine,
    runtime class libraries, and Java application launcher that are
    necessary to run programs written in the Java programming language.
    It is not a development environment and does not contain development
    tools such as compilers or debuggers. For development tools, see the
    Java 2 SDK, Standard Edition.
    =======================================================================
    Deploying Applications with the Java 2 Runtime Environment
    =======================================================================
    When you deploy an application written in the Java programming
    language, your software bundle will probably consist of the following
    parts:
    Your own class, resource, and data files.
    A runtime environment.
    An installation procedure or program.
    You already have the first part, of course. The remainder of this
    document covers the other two parts. See also the Notes for Developers
    page on the Java Software website:
    http://java.sun.com/j2se/1.4.1/runtime.html
    Runtime Environment
    To run your application, a user needs the Java 2 Runtime Environment,
    which is freely available from Sun for application developers to
    redistribute.
    The final step in the deployment process occurs when the software is
    installed on individual user system. Installation consists of copying
    software onto the user's system, then configuring the user's system
    to support that software. You should ensure that your installation
    procedure does not overwrite existing JRE installations, as they may
    be required by other applications.
    =======================================================================
    Redistribution of the Java 2 Runtime Environment
    =======================================================================
    The term "vendors" used here refers to licensees, developers, and
    independent software vendors (ISVs) who license and distribute the
    Java 2 Runtime Environment with their programs.
    Vendors must follow the terms of the Java 2 Runtime Environment Binary
    Code License agreement.
    Required vs. Optional Files
    The files that make up the Java 2 Runtime Environment are divided into
    two categories: required and optional. Optional files may be excluded
    from redistributions of the Java 2 Runtime Environment at the
    licensee's discretion.
    The following section contains a list of the files and directories that
    may optionally be omitted from redistributions with the Java 2 Runtime
    Environment. All files not in these lists of optional files must be
    included in redistributions of the runtime environment.
    Optional Files and Directories
    The following files may be optionally excluded from redistributions:
    lib/charsets.jar
    Character conversion classes
    jre/lib/ext/
    sunjce_provider.jar - the SunJCE provider for Java
    Cryptography APIs
    localedata.jar - contains many of the resources
    needed for non US English locales
    ldapsec.jar - contains security features supported
    by the LDAP service provider
    dnsns.jar - for the InetAddress wrapper of JNDI DNS provider
    bin/rmid
    Java RMI Activation System Daemon
    bin/rmiregistry
    Java Remote Object Registry
    bin/tnameserv
    Java IDL Name Server
    bin/keytool
    Key and Certificate Management Tool
    bin/kinit and jre/bin/kinit
    Used to obtain and cache Kerberos ticket-granting tickets
    bin/klist and jre/bin/klist
    Kerberos display entries in credentials cache and keytab
    bin/ktab and jre/bin/ktab
    Kerberos key table manager
    bin/policytool
    Policy File Creation and Management Tool
    bin/orbd
    Object Request Broker Daemon
    bin/servertool
    Java IDL Server Tool
    In addition, the Java Web Start product may be excluded from
    redistributions. Depending on the platform, the Java Web Start
    product is contained in a file named as follows. The actual
    product version number would replace the <version number> notation.
    javaws-<version number>-solaris-sparc-i.zip
    javaws-<version number>-solaris-i586-i.zip
    javaws-<version number>-linux-i586-i.zip
    javaws-<version number>-windows-i586-i.exe
    Redistribution of Java 2 SDK Files
    The limited set of files from the SDK listed below may be included in
    vendor redistributions of the Java 2 Runtime Environment. All paths
    are relative to the top-level directory of the SDK.
    - jre/lib/cmm/PYCC.pf
    Color profile. This file is required only if one wishes to
    convert between the PYCC color space and another color space.
    - All .ttf font files in the jre/lib/fonts directory. Note that the
    LucidaSansRegular.ttf font is already contained in the Java 2
    Runtime Environment, so there is no need to bring that file over
    from the SDK.
    - jre/lib/audio/soundbank.gm
    This MIDI soundbank is present in the Java 2 SDK, but it has
    been removed from the Java 2 Runtime Environment in order to
    reduce the size of the Runtime Environment's download bundle.
    However, a soundbank file is necessary for MIDI playback, and
    therefore the SDK's soundbank.gm file may be included in
    redistributions of the Runtime Environment at the vendor's
    discretion. Several versions of enhanced MIDI soundbanks are
    available from the Java Sound web site:
    http://java.sun.com/products/java-media/sound/
    These alternative soundbanks may be included in redistributions
    of the Java 2 Runtime Environment.
    - The javac bytecode compiler, consisting of the following files:
    bin/javac [Solaris(TM) Operating Environment
                                 and Linux]
    bin/sparcv9/javac [Solaris Operating Environment
                                 (SPARC(TM) Platform Edition)]
    bin/javac.exe [Microsoft Windows]
    lib/tools.jar [All platforms]
    - jre\bin\server\
    On Microsoft Windows platforms, the Java 2 SDK includes both
    the Java HotSpot Server VM and Java HotSpot Client VM. However,
    the Java 2 Runtime Environment for Microsoft Windows platforms
    includes only the Java HotSpot Client VM. Those wishing to use
    the Java HotSpot Server VM with the Java 2 Runtime Environment
    may copy the SDK's jre\bin\server folder to a bin\server
    directory in the Java Runtime Environment. Software vendors may
    redistribute the Java HotSpot Server VM with their
    redistributions of the Java Runtime Environment.
    Unlimited Strength Java Cryptography Extension
    Due to import control restrictions for some countries, the Java
    Cryptography Extension (JCE) policy files shipped with the Java 2 SDK,
    Standard Edition and the Java 2 Runtime Environment allow strong but
    limited cryptography to be used. These files are located at:
    <java-home>/lib/security/local_policy.jar
    <java-home>lib/security/US_export_policy.jar
    where <java-home> is the jre directory of the Java 2 SDK or the
    top-level directory of the Java 2 Runtime Environment.
    An unlimited strength version of these files indicating no restrictions
    on cryptographic strengths is available on the Java 2 SDK web site for
    those living in eligible countries. Those living in eligible countries
    may download the unlimited strength version and replace the strong
    cryptography jar files with the unlimited strength files.
    Endorsed Standards Override Mechanism
    An endorsed standard is a Java API defined through a standards
    process other than the Java Community Process(SM) (JCP(SM)). Because
    endorsed standards are defined outside the JCP, it is anticipated that
    such standards will be revised between releases of the Java 2
    Platform. In order to take advantage of new revisions to endorsed
    standards, developers and software vendors may use the Endorsed
    Standards Override Mechanism to provide newer versions of an endorsed
    standard than those included in the Java 2 Platform as released by Sun
    Microsystems.
    For more information on the Endorsed Standards Override Mechanism,
    including the list of platform packages that it may be used to
    override, see
    http://java.sun.com/j2se/1.4.1/docs/guide/standards/
    Classes in the packages listed on that web page may be replaced only
    by classes implementing a more recent version of the API as defined
    by the appropriate standards body.
    In addition to the packages listed in the document at the above
    URL, which are part of the Java 2 Platform, Standard Edition
    (J2SE(TM)) specification, redistributors of Sun's J2SE
    Reference Implementation are allowed to override classes whose
    sole purpose is to implement the functionality provided by
    public APIs defined in these Endorsed Standards packages.
    Redistributors may also override classes in the org.w3c.dom.*
    packages, or other classes whose sole purpose is to implement
    these APIs.
    Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle,
    Santa Clara, California 95054, U.S.A. All rights reserved

  • Create service attempt not working

    I am using NetBean 6.7 to build client service using Tomcat 6.1.20.
    Everytime I attempt to build it gives me back the message:
    You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API.
    Use the endorsed standards override mechanism
    (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <wsimport>.
    Can I correct this issue without downloading anymore software and how do I correct it?
    I tried finding xendorsed and it didnt show in any of my Tomcat files.
    Please advise.

    The message suggests to set an option xendorsed="true" on the <wsimport> task. This task ist normally found in your ant build file build.xml of your NetBean project.

  • Help compiling a web service

    I think I have tried everything to compile the web service in the web service tutorial. I was using Netbeans 5.5 and was receiving an error. I switched to version 6.0 Dev to see if it would work and I'm now receiving the following error...
    C:\Documents and Settings\Gary\WSTest\nbproject\build-impl.xml:315: You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API. Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <wsgen>.
    I downloaded jax-ws 2.1 and jaxb 2.1 and added those libraries to the project.
    I created an endorsed folder under the c:\program files\java\jre1.6.0 folder and copied the files from jaxws-ri/lib to it.
    I don't know how to set xendorsed on wsgen.
    I can't seem to get any thing to work.
    Thanks for any help!!!!
    Gary

    You might have better luck posting in the Java Technologies for Web Services forum.

  • By-passing JRE 1.4 parsers

    Our application is downloaded to the client via a browser and consists of two jars, one for the application itself, the other containing XML parsers, a cut down version of JAXP
    On JRE 1.3 all runs well since it uses the parsers contained in the downloaded jar, however when running under 1.4 the plug-in uses its own bundled parsers which our application does not like.
    How can I force the plug-in to use the parsers contained in the jar downloaded to the client instead of its own ?
    By the way, if I run the app using appletviewer on 1.4 everything works fine, so whats happening there ?
    Thanks.

    There's a feature called "Endorsed Standards Override Mechanism" which you can read about here:
    http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html
    You may be able to use that to force the use of your parsers, although from the list of overridable packages it looks like you can't. The way I use Saxon instead of JAXP to do XSLT transformations is to put this line of code in my initialization:System.setProperty("javax.xml.transform.TransformerFactory","com.icl.saxon.TransformerFactoryImpl");and there are similar properties for SAXParserFactory and DocumentBuilderFactory, I suppose, but I haven't used them. However if your cut-down JAXP classes have the same names as those in the full-blown JAXP, that isn't going to work for you either.
    I just had a look at the documentation for DocumentBuilderFactory's constructor, and it does mention the name of the system property that you can use; it also mentions a couple of other techniques you can use to control what class is loaded by the factory.

  • Overriding or nulling accessibility class metatag (JAWS)

    I am trying to disable the AccessibilityImplementation in parent components and allow children components, for example (disable a datagrid's accessibility implementation and allow the labels and text input (from that same datagrid control item renderers),  to expose their accessiblity name to jaws).
    I was able to do it, and it works perfectly using the monkey patch approach, I copied the source code from mx.controls.Datagrid.as and removed the line 534 [AccessibilityClass(implementation="mx.accessibility.DataGridAccImpl")] and it works as we need. We can also do our own AccessibilityImplementation as we need.
    The question is..  can we from an extended class, set to null the accessibilityclass meta tag value
    the following code throws a compile error, please check
    package mx.controls
    [AccessibilityClass(implementation=null)]
    public class ExDataGrid extends DataGrid
      public function ExDataGrid()
    thanks in advance

    RK-JAVA wrote:
    In one of the threads
    [http://forums.sun.com/thread.jspa?forumID=31&threadID=5328422|http://forums.sun.com/thread.jspa?forumID=31&threadID=5328422]
    I think reply 7 of 7 puts some good points.
    it says,
    The question then becomes of course why cannot variables be overridden?
    Well, technically I suppose they could be but the purpose of overriding is to change the behaviour of subclasses
    and variables don't represent behavior, they represent stateand it seems variables have nothing got to do with overriding, it is just the latest attribute up the stack that is used.Well, I was uj_ once so I wrote that. -:)
    It's just another way to express my reply #2 in this thread.
    There's a division of labour between methods and variables. Non-private methods represent the behavior of a type, whereas variables represent implementation and object state none of which should be exposed in a type. And because the purpose of the overriding mechanism is to modify the behaviour of subtypes, overriding really doesn't make sense for variables.
    There's a greyzone here though and that concerns so called "properties". Are they behavior or are they state? Well, it's bad encapsulation to expose naked variables in a type so if a variable represents a "property" it should be embedded in a getter/setter pair. This means that "properties" should be represented by methods in the type. The question now is whether a subtype should be able to override and modify a "property" defined by the superttype? Well as a programmer you can prevent that by declaring the "property's" getter/setter methods final.
    The conclusion I'm making is that naked variables never belong in a type so making them overridable makes no sense. If a variable represents a "property" it should be exposed via a getter/setter pair. The programmer then can decide whether this "property" should be overridable by declaring the getter/setter pair final or not.

  • Runtime Error that Seems to be Related to Dialog Boxes

    Although I am currently taking a college course in Java and my code is based on a couple of questions from my Java textbook, I would like to make it perfectly clear that this is NOT homework. This is self-assigned for studying purposes and my professor will probably never see this, let alone grade it. Regardless, I suspect this to be a configuration-related issue as I had no such problems running this program in a Vista machine on campus. Assuming I am right, there shouldn't be any issue with any of this community's policies as I won't need to receive any "answer" code to solve this issue.
    In NetBeans, my program compiles and works fine, but produces a couple of runtime errors. Any idea what could be going on here?
    Here's my code:
    import java.util.Scanner;       // Needed for console input.
    import javax.swing.JOptionPane; // Needed for dialog boxes.
       This program performs the actions requested in questions 2.35 and 2.36 in the textbook.
    * @author Dan
    public class Pages98To99 {
        public static void main(String[]args){
            // Asks the user for what answer he/she wants to see.
            System.out.println("Do you want to see the answer to 2.35 or 2.36?");
            Scanner keyboard = new Scanner(System.in);  // Creates a scanner object.
            double answer = keyboard.nextDouble();
            if (answer == 2.35){
                //2.35
                JOptionPane.showMessageDialog(null, "Greetings Earthling.");
                JOptionPane.showInputDialog("Enter a number.");}
            else if (answer == 2.36){
                //2.36
                String str = JOptionPane.showInputDialog("Please enter your age.");
                                                     // Gets age.
                int age = Integer.parseInt(str);}    /* Converts age from a string to an
                                                        integer.*/
            else
                JOptionPane.showMessageDialog(null, "Go to another program.");
            System.exit(0); // Ends the program
    }Here are the runtime errors produced by NetBeans:
    2010-02-15 21:23:54.659 java[3891] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0xf203, name = 'java.ServiceProvider' See /usr/include/servers/bootstrap_defs.h for the error codes. 2010-02-15 21:23:54.660 java[3891] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)The following is a troubleshooting terminal session using both the newer version of JDK courtesy of SoyLatte ( [http://landonf.bikemonkey.org/static/soylatte/|http://landonf.bikemonkey.org/static/soylatte/] ), which fails to produce a dialog box) as well as the older one supplied by Apple as part of my OS (which like in NetBeans works fine otherwise) as well.
    Last login: Sat Feb 20 00:12:55 on ttyp1
    Welcome to Darwin!
    Dans-MacBook:~ Dan$ cd /Volumes/Lexar/NetBeansProjects/MacBook-Made/test/;echo $PATH;java -version;javac -version;javac Pages98To99.java;java Pages98To99;PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin;java -version;javac -version;javac Pages98To99.java;java Pages98To99
    /sw/bin:/sw/sbin:/Applications/soylatte16-i386-1.0.3/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
    java version "1.6.0_03-p3"
    Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
    Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed mode)
    javac 1.6.0_03-p3
    Do you want to see the answer to 2.35 or 2.36?
    0
    Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:169)
            at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
            at sun.awt.X11.XToolkit.(XToolkit.java:89)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:169)
            at java.awt.Toolkit$2.run(Toolkit.java:836)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
            at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:120)
            at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
            at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
            at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
            at javax.swing.UIManager.setLookAndFeel(UIManager.java:537)
            at javax.swing.UIManager.setLookAndFeel(UIManager.java:577)
            at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1331)
            at javax.swing.UIManager.initialize(UIManager.java:1418)
            at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)
            at javax.swing.UIManager.getDefaults(UIManager.java:656)
            at javax.swing.UIManager.getString(UIManager.java:802)
            at javax.swing.UIManager.getString(UIManager.java:819)
            at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:592)
            at Pages98To99.main(Pages98To99.java:29)
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-306)
    Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing)
    javac 1.5.0_19
    javac: no source files
    Usage: javac 
    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 used
      -classpath           Specify where to find user class files
      -cp                  Specify where to find user class files
      -sourcepath          Specify where to find input source files
      -bootclasspath       Override location of bootstrap class files
      -extdirs             Override location of installed extensions
      -endorseddirs        Override location of endorsed standards path
      -d              Specify where to place generated class files
      -encoding        Specify character encoding used by source files
      -source           Provide source compatibility with specified release
      -target           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                   Pass  directly to the runtime system
    Do you want to see the answer to 2.35 or 2.36?
    0
    2010-02-20 00:16:09.967 java[4618] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0xf103, name = 'java.ServiceProvider'
    See /usr/include/servers/bootstrap_defs.h for the error codes.
    2010-02-20 00:16:09.968 java[4618] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)
    Dans-MacBook:/Volumes/Lexar/NetBeansProjects/MacBook-Made/test Dan$ Edited by: Viewer07 on Mar 6, 2010 12:15 AM

    In terminal I've been using a JDK from Soylatte. I haven't tampered with the JDK that NetBeans uses.
    About NetBeans (from the menubar returns the following):
    Product Version: NetBeans IDE 6.8 (Build 200912041610)
    Java: 1.5.0_19; Java HotSpot(TM) Client VM 1.5.0_19-138
    System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb)
    Userdir: /Users/Dan/.netbeans/6.8

  • How to Compile and run Smart Card Application

    hi
    any one can help me reagrding Javacard API. i download the JavaCard Development Kit from sun and install on my machine but i didn't get all java files and class files of JavaCard API. where i obtain those files so my application get compile and run.
    pls help me i m new in this technology.
    Thanks in Advance.

    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

  • Java command still not working - please help

    i have installed jdk1.6.0_05. The javac command works fine but the java command does not work at all. even when i try java HelloWorld i receive this exception message
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Caused by: java.lang.ClassNotFoundException: HelloWorld
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help (you to SUN)!!

    bart@kerberos:~$ javac -help
    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 used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -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
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced 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
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemSee the bold part.
    More information: [http://java.sun.com/docs/books/tutorial/java/package/managingfiles.html]

  • Java Software Development Kit (SDK) for Java 6 on Leopard.

    Does anyone know if the Java Software Development Kit (SDK) comes with Leopard, or if one needs to sign up for an Apple developer account to obtain it?
    I typed the following command on the Terminal command line: 
        javac
    The output of that command was:
    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 used
      -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
    I would like to use Java version 6.

    Hi John,
    I sort of remember Java 6  being IntelMac only...
    Once you’ve gotten logged in, go to Downloads, select “Java” on the right hand side of the page, and download the Java SE 6 beta. Note: this is only available for Intel Macs running Tiger or Leopard — if you’ve got a G4 or G5, you’re out of luck right now
    http://www.metaphoriclabs.com/articles/installing-java-6-on-mac-os-x/
    But here they are...
    http://ituploads.com/apple/macintosh-os-x-java-jdk/
    Can I do Java 6 development in OS X?...
    http://stackoverflow.com/questions/739418/can-i-do-java-6-development-in-os-x

  • Unable to debug the application in RAD

    Hi All,
    I am unable to run the application in debug mode (. i .e debug mode is not working).
    Even after running the server mode it is giving erroe saying that
    " Unable to install breakpoint . Please modify your compiler options to genarate the line number attributes."
    Please advise me on this. what options do i need to set inorder to run the server in the debug mode.

    Did you try this?
    h:\>javac
    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 used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -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
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses defa
    ult discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly reference
    d 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
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemBruce

  • 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

  • Javac: invalid flag: C:\XML\web.xml

    Hi,
    I created a file web.xml in JCreator. When I tried to compile the file, it showed:
    javac: invalid flag: C:\XML\web.xml.
    Does any know how to solve the problem?
    Thanks in advance.
    Dan

    The following is the full message showed after the compiling. It also happened to *.jsp files.
    --------------------Configuration: <Default>--------------------
    javac: invalid flag: C:\XML\web.xml
    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 used
    -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
    Process completed.

  • Verifying OpenOffice document signature

    Hi all,
    When you sign an ODT document throught OpenOffice interface, an XML Signature file is generated inside ODT file structure: documentsignatures.xml.
    I'm trying to verify this XML Signature using JDK 6 JSR 105 implementation, but i have some problems ...
    I try a simple verification uncompressing ODT file (JAR file) and accessing documentsignatures.xml directly:
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document d = db.parse("documentsignatures.xml");
    NodeList nl = d.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
    X509Certificate cert = X509Certificate.getInstance(new FileInputStream("rootca.der"));
    DOMValidateContext valContext = new DOMValidateContext(cert.getPublicKey(), nl.item(0));
    XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM");
    XMLSignature signature = fac.unmarshalXMLSignature(valContext);
    if (signature.validate(valContext)) {
        System.out.println("OK");
    else {
        System.out.println("BAD SIGNATURE");
    }But i get an exception:
    Exception in thread "main" javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: java.lang.NullPointerException
    at org.jcp.xml.dsig.internal.dom.DOMReference.dereference(DOMReference.java:352)
    at org.jcp.xml.dsig.internal.dom.DOMReference.validate(DOMReference.java:311)
    at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.validate(DOMXMLSignature.java:230)
    at VerifyODTSignature.main(VerifyODTSignature.java:63)It seems like a problem with reference resolution ... So i modify the initial code to handle an "URIDereferencer":
    DOMValidateContext valContext = new DOMValidateContext(cert.getPublicKey(), nl.item(0));
    valContext.setURIDereferencer(new URIDereferencer() {
           public Data dereference(URIReference uriReference, XMLCryptoContext context) throws URIReferenceException
                    OctetStreamData osd = null;
                    try
                        osd = new OctetStreamData(new FileInputStream("/referenced_xml_files/" + uriReference.getURI()));
                    catch (Exception e)
                        e.printStackTrace();
                    return osd;
            });But i get an:
    Exception in thread "main" javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.dsig.TransformException: java.lang.ArrayIndexOutOfBoundsException: 23
    at org.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:390)
    at org.jcp.xml.dsig.internal.dom.DOMReference.validate(DOMReference.java:312)
    at org.jcp.xml.dsig.internal.dom.DOMXMLSignature.validate(DOMXMLSignature.java:230)
    at VerifyODTSignature.main(VerifyODTSignature.java:62)I supose that i'm not usign URIDereferencer properly, but i could'n find documentation or samples regarding this issues :(
    Please, somebody can help me?
    Thanks in advance!!!!
    Edited by: borillo on Mar 4, 2008 8:23 AM

    Hi all,
    Finally Sean Mullan have found the problem. Here is his answer:
    I finally found some time to debug into this problem. It is a bug in the canonicalization code and I will open a bug to have it fixed in JDK 6. It is only triggered if an element has over 23 attributes and the
    office element in content.xml has 24 attributes!
    The only workaround I can think of is to use a Apache XMLSec jar and override the implementation in the JDK. You can do this with the endorsed override mechanism of the JDK. What you need to do is download the following jars:
    1) Java XMLSec (1.4 or later): http://xml.apache.org/security/dist/java-library/
    2) Commons Logging:
    http://commons.apache.org/downloads/download_logging.cgi
    You need the commons logging library because the Apache implementation uses that instead of the JDK logging mechanism.
    Put these two jars in a lib directory, and then specify that lib directory as the endorsed directory when running your application, for example:
    java -Djava.endorsed.dirs=lib ...
    This should work.
    HTH,
    Sean
    """

Maybe you are looking for