Keep javadoc comments in class files

Hi there,
is there a way to keep javadoc comments in classfiles?
Reason: Not any company can spread the source for their algorithms, but as customer requests grow to use it with eclipse, code completion and javadoc, there is a need for such "feature".
Any ideas? Not documented tricks?
Ty

Ty, for you reply - this in response ... maybe you can support it ;-)
Your report has been assigned an internal review ID of 719676,
which is NOT visible on the Sun Developer Network (SDN).

Similar Messages

  • Sample Javadoc comments for classes or methods using generics?

    Can anyone show me a sample Javadoc comment for a class or a method that uses generics. All my attempts so far ended up in warnings from the Javadoc tool..
    I also looked in the Sun forums, in the Javadoc documentation, but nowhere could I find anything that would help me write correct javadoc comments.
    Any luck for you guys?
    Thanks a lot,
    -Laurent

    Thanks man, sorry it must seem obvious to you, but
    for some reason I couldn't get it to work.No. The first time I also had to ask.
    Now an even more difficult (for me) question: how
    would you refer to that method in a @see or {@link
    ..} javadoc comment?Manually erase the method:
    * The see tag refers to this method
    * @param <T> a type variable
    * @see #foo(Object)
    <T> void foo(T t) {}

  • Javadoc comments for classes included in the sdk

    My question is pretty simple: For any class that I come across in the online java documention provided on this site, can I assume if the javadoc page does not include a @since tag, that it has been there since java 1.0?
    Specifically, I'm wondering about java.text.ChoiceFormat
    Thanks

    API of package java.text:
    Since: JDK1.1
    I guess this includes ChoiceFormat.

  • Organizing class files (in the filesystem)

    Hi, I'm new to Java and the JDC. I have run into one issue, in my explorations in Java, and that is organizing the class files and source code files. I understand that I can organize them in any way that I like, but I was curious if there is a standard system that other Java developers use (like the /usr/local convention on Unix).
    Should I create a /usr/local/java directory and then store class and source files in subdirectories of that? And then add the class directory to the CLASSPATH? How about downloaded source code that I didn't write -- that seems like it would then go in yet another directory.
    So far I've got everything stored in ~/dev/java (a directory I created for this purpose), but it seems like it's bound to get unmanageable if I don't order it better. And I'm just curious what others with more experience do.
    Thanks!
    Erik

    Anyway, back to why. If as you mentioned you keep all of your class files off a given root folder, then you can add that folder root to the classpath.
    Okay, I have the domain "erikprice.com". So then I would create a hierarchy like this (?) :
    - ~
      - dev
        - Java
          - com
            - erikprice
              - packageA
              - packageB
              - packageC
                 ...etc...And then, if I add ~/dev/Java/com to my CLASSPATH, all of the classes in the various packages below that will be accessible to the compiler? Or do I have to explicitly put ~/dev/Java/com/erikprice into the classpath?
    Also, if I have downloaded someone else's source code (such as a Jakarta project or something), it seems like I should put its root folder in with my personal root folder. In other words, like this:
    - ~
      - dev
        - Java
          - com
            - erikprice
          - org
            - apache
              - xml
                - xerces
                  - packageA
                  - packageB
                - xalan
                  - packageA
                  - packageB
                  ...etc...Does this seem right? If I understand correctly, I will have to add the org directory to the CLASSPATH too. Can I save all of this trouble by putting just ~/dev/Java into the CLASSPATH so that all of the packages below (com/erikprice/*, org/apache/xml/*, org/someotherproject/*) are available?
    The trick of this is that I'm trying to organize both my own Java files as well as those that I've downloaded to study from. Thanks for your input, MLangstaff.

  • In which directory should i keep java class files in oracle apps

    hi
    I have one problem, In which Top & directory should i keep java class files in oracle apps
    krishna

    Hi
    By itself its available in oracle\visappl\au\11.5.0\java\
    thats were the location needs to be placed in the apps.zip.
    Thanks
    Riyas

  • Getting javadoc comments of the base class

    Hi,
    I have a class Foo1, and a class Foo2 which extends Foo1.
    All the method are implemented in Foo1, Foo2 simply extends this class and does not override any of the methods. Is it possible that I could get the javadoc comments for all the methods in Foo2. I have a requirement to do this.
    Please let me know, how we can achieve this.
    Thanks.

    Hi,
    Yes, you can easily do this by writing a doclet. Read the documentation at:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/index.html
    This will teach you how to write a doclet:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/overview.html
    The API you should learn is:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/javadoc/doclet/index.html
    If you have a ClassDoc representing Foo2, you can get all the methods comments by calling ClassDoc.superClass().methods(). That would return you all the methods in Foo1, which have the method comments you want since they are inherited by Foo2.
    -Jamie

  • Is .class file contains comment statement

    Hi,
    Is .class file contains comment statement , ( ie )which i gave in comment line in my .java file.
    Thanks in advance.
    Regards,
    kumar

    I don't have a file Is.class so I can't tell, but indeed if the Java compiler created the file from some source it won't contain any comments that existed in that source.

  • Where to keep the java class file which is being used from a form?

    Hi,
    Actually I am developing a form which has a bean area and the data will be displayed in the bean area in the form of grid. And I will register this form with apps and will run the from Oracle apps. I want to know that there is a java class file that is being refered by the form, where should this java class file be placed and is there any other places where any changes are required so that the form runs correctly from the Oracle apps and can find the java class file.
    I am very thankful to each and everyone who will be able answer this question of my.

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • Can't create a .class file

    Hello
    I am glade to know this forum, I bet it is muche better than my instructor, any how ..
    I am trying to do my first java program, the progam is working properly on netbeans 4.1 with jdk1.5.0, but when I go to the command prompt on windows XP it dose not work,
    other programs work in the command prompt but mine dose not
    what is good is that I know the problem, it is that I don't have the .class file I have the .java, and as I read it was supposed to be created automatically on neatbeans but unfortunatly it is not. can I creat it somehow ??!!
    any sugestions ??

    I did a google search and found this thread.
    Just to keep information at finger tips etc.
    I installed the recent JDK from JavaSun place for Windows (XP).
    I could not compile a class file from a java file in Netbeans.
    To compile a class file from a java file I needed to use javac.
    Using cmd prompt (Command prompt) I could not use Javac (I forgot about PATH vars).
    Right click my computer, properties in menu, advanced tab, Environment variables, Edit the path variable, add the directory c:\proram files\java\jdk????\bin\ (??? being the version of your jdk), then run cmd then javac works! (remembering of course to have ; seperator!)
    ADDTIONAL INFO:
    Should I set the PATH variable?
    Set the PATH variable if you want to be able to conveniently run the JDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:
    C:> "\Program Files\Java\jdk1.6.0_<version>\bin\javac" MyClass.java
    It's useful to set the PATH permanently so it will persist after rebooting.
    How do I set the PATH permanently?
    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows, according to whether you are on Microsoft Windows NT or 98/2000/ME.
    Message was edited by:
    g000we

  • [svn] 3275: Initial check in for support for asdoc comments in mxml files.

    Revision: 3275
    Author: [email protected]
    Date: 2008-09-19 15:01:57 -0700 (Fri, 19 Sep 2008)
    Log Message:
    Initial check in for support for asdoc comments in mxml files.
    For adding comments at the class level or to properties defined inside mxml use the syntax
    Other tags supported in asdoc should also work. for example @see, @includeExamples etc.
    QA: Yes
    Doc:
    Reviewed By: Paul
    Tests: checkintests
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocAPI.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/MxmlCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/Node.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDef.vm
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/PropertyDeclaration .java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/UninitializedProper tyDeclaration.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/ASDocConfiguration.java
    Added Paths:
    flex/sdk/trunk/asdoc/templates/images/AirIcon12x12.gif
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/MxmlCommentUtil.java

    @John - no luck on the plugin angle. In checking both JDev installs that previously had the problems, they have the default extensions.
    @Dave - at the time I can't say we noticed any migration notices, we certainly didn't see the migration dialog though. However the application in SVN was built on the same version of JDev so I don't expect a migration to find any changes anyhow.
    However on your second point we always check out into an empty directory, as we're checking out the whole application. As such if as you say the migration utilities is always called, shouldn't that mean we always see the projects modified? We certainly don't, we're on a day by day basis checking out whole applications to different directories and we don't see that behaviour.
    In turn reconsidering the modified .jpr file, from what I saw it looks to me that the whole project file is re-set to it's original state. Initially the problem detected was the libraries attached to the project were gone so we couldn't compile, but in close inspection it seems the whole .jpr file has been modified to a rather vanilla setup.
    One thing I can say when we originally experienced the problem (and from memory this was true in the dim dark past when it also occurred another time), is it was a check out from a SVN tags directory, not the trunk. In thinking about it, it may be the first check out from the tags directory that we see the issue. However to get around the issue we just revert the project file in the tags directory, we don't actually change the SVN repository code (ie. commit), so the issue should keep occurring. Yet at the moment if we check out the same tags directory, the issue doesn't occur?
    Hmmm?
    Btw Dave, are you an Oracle employee?
    CM.

  • Trying to move inner class to a class file

    Hi folks,
    I keep getting an error which puzzles me. I cut the following class (MyDocumentListener) out of an outer class (CenterPanel).
    MyDocumentListener compiles OK but...
    Now when I compile the outerclass I get the folowing error:
    C:\divelog> javac -classpath C:\ CenterPanel.java
    CenterPanel.java:54: cannot access divelog.MyDocumentListener
    bad class file: C:\divelog\MyDocumentListener.class
    class file contains wrong class: MyDocumentListener
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define
    the listener class
    ^
    1 error
    ... yes I checked, it is there..
    C:\divelog>dir m*.j*
    Directory of C:\divelog
    MYDOCU~1 JAV 936 03-04-03 11:16p MyDocumentListener.java
    ====================================================================
    MyDocumentListener tests to see if the current document has changed.
    Required fields: boolean documentWasChanged;
    import javax.swing.event.*;
    // ------ Document listener class -----------
    public class MyDocumentListener implements DocumentListener {
    public void insertUpdate(DocumentEvent e) {
    wasChanged(e);
    public void removeUpdate(DocumentEvent e) {
    wasChanged(e);
    public void changedUpdate(DocumentEvent e) {
    public boolean wasChanged(DocumentEvent e) {
    // indicate that the document was changed
    //and test before opening another file or closing the application.
    boolean documentWasChanged = true;
    return documentWasChanged;
    } // close class MyDocumentListener
    ====================================================================
    package divelog;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    // import javax.swing.text.JTextComponent.*;
    import javax.swing.text.*;
    public class CenterPanel extends JPanel implements ActionListener
    { // Opens class
    static private final String newline = "\n";
    private JTextArea comments;
    private JScrollPane scrollpane;
    private JButton saveButton, openButton;
    private JLabel whiteshark;
    private Box box;
    private BufferedReader br ;
    private String str;
    private JTextArea instruct;
    private File defaultDirectory = new File("C://divelog");
    private File fileDirectory = null;
    private File currentFile= null;
    // public boolean changed;
    public boolean documentWasChanged;
    public CenterPanel()
    { // open constructor CenterPanel
    setBackground(Color.white);
    comments = new JTextArea("Enter comments, such as " +
    "location, water conditions, sea life you observed," +
    " and problems you may have encountered.", 15, 10);
    comments.setLineWrap(true);
    comments.setWrapStyleWord(true);
    comments.setEditable(true);
    comments.setFont(new Font("Times-Roman", Font.PLAIN, 14));
    // add a document listener for changes to the text,
    // query before opening a new file to decide if we need to save changes.
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    comments.getDocument().addDocumentListener(myDocumentListener); // create the reference for the class
    scrollpane = new JScrollPane(comments);
    scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    saveButton = new JButton("Save Comments", new ImageIcon("images/Save16.gif"));
    saveButton.addActionListener( this );
    saveButton.setToolTipText("Click this button to save the current file.");
    openButton = new JButton("Open File...", new ImageIcon("images/Open16.gif"));
    openButton.addActionListener( this );
    openButton.setToolTipText("Click this button to open a file.");
    whiteshark = new JLabel("", new ImageIcon("images/gwhite.gif"), JLabel.CENTER);
    Box boxH;
    boxH = Box.createHorizontalBox();
    boxH.add(openButton);
    boxH.add(Box.createHorizontalStrut(15));
    boxH.add(saveButton);
    box = Box.createVerticalBox();
    box.add(scrollpane);
    box.add(Box.createVerticalStrut(10));
    box.add(boxH);
    box.add(Box.createVerticalStrut(15));
    box.add(whiteshark);
    add(box);
    } // closes constructor CenterPanel
    public void actionPerformed( ActionEvent evt )
    { // open method actionPerformed
    // --------- test to see if the current file was modified and give an option to save first.
    if (documentWasChanged) // add and IF filename not null
    // ----- display pop-up alert --------------------------------------------------------------
    int confirm = JOptionPane.showConfirmDialog(null,
    "Click OK to discard current changes, \n or Cancel to save before proceeding.", // msg
    "Unsaved Modifications!", // title
    JOptionPane.OK_CANCEL_OPTION, // buttons displayed
    // JOptionPane.ERROR_MESSAGE
    // JOptionPane.INFORMATION_MESSAGE
    // JOptionPane.PLAIN_MESSAGE
    // JOptionPane.QUESTION_MESSAGE
    JOptionPane.WARNING_MESSAGE,
    null);
    if (confirm != JOptionPane.YES_OPTION) //user wants to save changes
    try {
    // let user save the file
    catch(Exception e) {}
    else // let user open a new file
    } // close "if (documentWasChanged)" - display pop-up alert ----------
    JFileChooser jfc = new JFileChooser();
         //Add a custom file filter and disable the default "Accept All" file filter.
    jfc.addChoosableFileFilter(new JTFilter()); // /** found in Utils.java /*
    jfc.setAcceptAllFileFilterUsed(false);
    // -- open the default directory --
    // public void setCurrentDirectory(File dir)
    // jfc.setCurrentDirectory(new File("C://divelog"));
    jfc.setCurrentDirectory(defaultDirectory);
    jfc.setSize(400, 300);
    jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    Container parent = saveButton.getParent();
    //========================= Test Button Actions ================================
    //========================= Open Button ================================
    if (evt.getSource() == openButton)
    int choice = jfc.showOpenDialog(CenterPanel.this);
    File file = jfc.getSelectedFile();
    // --------- change test was here -----------
    /* a: */
    if (file != null && choice == JFileChooser.APPROVE_OPTION)
    String filename = jfc.getSelectedFile().getAbsolutePath();
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    try
    { //opens try         
    comments.getLineCount( );
    // -- clear the old data before importing the new file --
    comments.selectAll();
    comments.replaceSelection("");
    // -- get the new data ---
    br = new BufferedReader (new FileReader(file));
    while ((str = br.readLine()) != null)
    {//opens while
    comments.append(str);
    } //closes while
    } // close try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Open command not successful:" + ioe + newline);
    } // close catch
    // ---- display the values of the directory variables -----------------------
    comments.append(
    newline + "The f directory variable contains: " + f +
    newline + "The fileDirectory variable contains: " + fileDirectory +
    newline + "The defaultDirectory variable contains: " + defaultDirectory );
    else
    comments.append("Open command cancelled by user." + newline);
    } //close if statement /* a: */
    //========================= Save Button ================================
    } else if (evt.getSource() == saveButton)
    int choice = jfc.showSaveDialog(CenterPanel.this);
    if (choice == JFileChooser.APPROVE_OPTION)
    File fileName = jfc.getSelectedFile();
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    //check for existing files. Warn users & ask if they want to overwrite
    for(int i = 0; i < fileName.length(); i ++) {
    File tmp = null;
    tmp = (fileName);
    if (tmp.exists()) // display pop-up alert
    //public static int showConfirmDialog( Component parentComponent,
    // Object message,
    // String title,
    // int optionType,
    // int messageType,
    // Icon icon);
    int confirm = JOptionPane.showConfirmDialog(null,
    fileName + " already exists on " + fileDirectory
    + "\n \nContinue?", // msg
    "Warning! Overwrite File!", // title
    JOptionPane.OK_CANCEL_OPTION, // buttons displayed
                        // JOptionPane.ERROR_MESSAGE
                        // JOptionPane.INFORMATION_MESSAGE
                        // JOptionPane.PLAIN_MESSAGE
                        // JOptionPane.QUESTION_MESSAGE
    JOptionPane.WARNING_MESSAGE,
    null);
    if (confirm != JOptionPane.YES_OPTION)
    { //user cancels the file overwrite.
    try {
    jfc.cancelSelection();
    break;
    catch(Exception e) {}
    // ----- Save the file if everything is OK ----------------------------
    try
    { // opens try
    BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
    bw.write(comments.getText());
    bw.flush();
    bw.close();
    comments.append( newline + newline + "Saving: " + fileName.getName() + "." + newline);
    break;
    } // closes try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Save command unsuccessful:" + ioe + newline);
    } // close catch
    } // if exists
    } //close for loop
    else
    comments.append(newline + "Save command cancelled by user." + newline);
    // ========= }
    } // end-if save button
    } // close method actionPerformed
    } //close constructor CenterPanel
    // <<<<<<<<<<<<<<<<<
    // <<<<<<<<<<<<<<<<< MyDocumentListener class was here <<<<<<<<<<<<<<<<<
    // <<<<<<<<<<<<<<<<<
    } // Closes class CenterPanel

    You didn't put your MyDocumentListener class in the package divelog.
    Add
    package divelog;to the top of MyDocumentListener.java and recompile.

  • Decompiling of class files

    Why is it possible to reverse engineer or de-compile .class files. Is there an easy workaround for this problem that does not require buying expensive software to compile a java program into platform-specific form?

    it is possible to decompile .class files because JRE has to be able to read and parse and understand your code... (i mean your bytecode that you have got from compiler)
    if you want to protect your code from being decompyled and reused by your competitors, then you should odfuscate your code...
    (examples of obfuscated C code my be found from http://www.ioccc.org unfortunatelly i don't know if there is such thing for obfuscated java code anywhere)
    this doesn't make your code unusable for others, but makes it bit more difficult to reuse your code.
    i personally see no reason why i should keep in ecret what my programs source looked like, but you may have your reasons... so i dodn't judge you...
    well... i just rememberd that as a homeassignment i had at school to write some program... and i just had found one decompiler... so i looked up a program from internet that did exactly what i had to do and decompiled it....
    i couldn't use it because it had used lot's of private variables that where named byte1, byte2, ... and so on... and in every method they these same names for different variables...
    so the code was unusable for me, allthough it comiled with no errors
    another way to make your code less usable for others is to write it in your own language 8if your native language is english then using it would not misslead others too much, but i have found some chinese code that had variable names something like "katakana" etc. and also some comments that were no use for me... (since i dond't understand chinese, not even if it's written with lattin letters)
    also you might want to look from internet for articles that explain how to write unmaintainable code...
    http://mindprod.com/unmain.html
    but in such case you'd be out of luck when you have to debug the same code after some weeks... :P
    i hope that you got some ideas of some things related to your question...
    L.

  • Error while converting class file to exp and jca file

    error while converting *.class file to *.exp and *.jca file
    =====================================================================================================================
    linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
    error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
    error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
    conversion completed with 2 errors and 0 warnings.
    =====================================================================================================================

    i compile a file javacard use this command:
    ===
    javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
    ===
    and try to convert this class use this command
    ===
    /home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    ===
    result convert:
    ===
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
    converting com.sun.javacard.samples.Identity.Identity
    error: export file framework.exp of package javacard.framework not found.
    conversion completed with 1 errors and 0 warnings.
    ===
    why ??
    please your comment for this problem.
    thank 4 all.

  • Urgent,java Error when compiling class file for jsp

    Hi!
    Reference to statement is ambbiguous,both class java.sql.statement in java.sql and class.java.beans.statement in java beans match.
    this is my file . When i comment the java.import.bean headre it does compile but my server is not able to recognize the class file.,Cud someone help me.
    THis is my source file
    package dbmg;
    //import java.beans.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DbBean
    Connection con;
    ResultSet rs;
    String sql;
    boolean queryType;
    int edited;
    public DbBean() throws Exception
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:Forums");
    public void setQueryType(String s)
    queryType=s.equalsIgnoreCase("select");
    public void setSql(String s)
    sql = s;
    synchronized public void processRequest(HttpServletRequest req) throws
    Exception
    if (queryType)
    Statement stmt=con.createStatement();
    rs=stmt.executeQuery(sql);
    else
    PreparedStatement ps=null;
    ps=con.prepareStatement(sql);
    int count=0;
    String sqlParam,paramValue;
    boolean set=true;
    while (set)
    count++;
    sqlParam="param"+String.valueOf(count);
         if (sqlParam==null)
              set=false;
              continue;
    paramValue=req.getParameter(sqlParam);
         if (paramValue==null)
    set=false;
    continue;
              else
                   paramValue=paramValue.trim();
    try
                   ps.setString(count,paramValue);
              catch(Exception ex)
                   set=false;
                   continue;
    try
    edited=ps.executeUpdate();
    catch(SQLException e)
    edited=0;
    public Connection getConnection()
    return con;
    public ResultSet getResultSet()
    return rs;
    public int stored()
    return edited;
    public void closeCon() throws Exception
    con.close();
    rs = null;

    No need of commenting your import statement. Whenever there is ambiguity, you can use full class name (with package).
    Like,
    java.sql.Statement stmt=con.createStatement();
    Now there is no ambiguity.
    Sudha

  • How to load a .class file dynamically?

    Hello World ;)
    Does anyone know, how I can create an object of a class, that was compiled during the runtime?
    The facts:
    - The user puts a grammar in. Saved to file. ANTLR generates Scanner and Parser (Java Code .java)
    - I compile these file, so XYScanner.class and XYParser.class are available.
    - Now I want to create an object of XYScanner (the classnames are not fixed, but I know the filename). I tried to call the constructor of XYScanner (using reflection) but nothing works and now I am really despaired!
    Isn't there any way to instantiate the class in a way like
    Class c = Class.forName("/home/mark/XYScanner");
    c scan = new c("input.txt");
    The normal call would be:
    XYLexer lex = new XYLexer(new ANTLRFileStream("input.txt"));The problem using reflection is now that the parameter is a ANTLRFileStream, not only an Integer, as in this example shown:
    Class cls = Class.forName("method2");
    Class partypes[] = new Class[2];
    partypes[0] = Integer.TYPE;
    partypes[1] = Integer.TYPE;
    Method meth = cls.getMethod("add", partypes);
    method2 methobj = new method2();
    Object arglist[] = new Object[2];
    arglist[0] = new Integer(37);
    arglist[1] = new Integer(47);
    Object retobj = meth.invoke(methobj, arglist);
    Integer retval = (Integer)retobj;
    System.out.println(retval.intValue());Has anyone an idea? Thanks for each comment in advance!!!

    Dump all of your class files into a directory.
    Use the File class to list all files and iterateover
    the files.NastyNot really, when you are dynamically creating code, I would expect the output to be centralized, not spread out all over the place.
    >
    Use a URLClassloader to load the URL that isobtained
    for each file with file.toURI().toURL()(file.toURL()
    is depricated in 1.6)Wrong, the URL you give it must be that of the
    directory, not the class file.No, I did this quite recently, you can give it a specific class file to load.
    >
    Load all of the classes in this directory, thatway
    any anonymous classes are loaded as well.Anonymous classes automatically loaded when the real
    one isIt can't load it if it doesn't know where the code is. Since you haven't used a URL classloader to load once class file at a time, you would never encounter this. But if you loaded a class file that had an anonymous classfile it needed, would it know where to look for it?
    >
    From this point you should be able to just get a
    class with Class.forName(name)No. Class.forName uses the classloader of the class
    it's called in, which will be the system classloader.
    It won't find classes loaded by a URLClassLoader.got me there.

Maybe you are looking for

  • TS3274 Why won't my webcam camera work, either for iChat or as a camera?

    Have a blank screen when I try and use the web cam located on the desktop.

  • Help in creating sql loader control file

    I am having a csv file representing in this format. I have several lines like this "XXX", "YYY","ZZZ","01/01/2005", "AAA" So when I created the control file having, I am having problem with inserting the date. I tried to you use the date column name

  • Critical error with default host

    Hi, I am relatively new to Web Logic and think I have made an error within the Web Logic Console with the default host parameter. As a result, I can no longer start up my WLS. Is there a way I can edit this parameter outside of the Web Logic Console?

  • What is the best way of embedding a PDF in an article?

    The only way I was able to get this to work was using a web overlay to link to an online source. I don't want to create a button that links to the PDF. I want to embed a PDF that is in the HTMLResources.zip.

  • Pwermax not running - or not

    I have to return one of my Maxtor 6Y080M0 Plus SATA HDD back to ebuyer.  To get a RMA number I am told to run Powermax and get the generated error code.  When I run it the program runs, (from floppy), but stops at 'searching for drives' (up to 1 minu