Package name ends in ".java" causes failure

I /think/ I've identified a bug in javadoc: javadoc will not allow module names which end in ".java". (maybe this is a feature).
It seems that javadoc should check for directory status or have some other check other than just string comparison to determine if a file should be parsed or considered to be a package.
Has anyone else encountered this?
In my source code there are several instances of packages which end in ".java" -- javadoc is unable to parse these packages & instead tries to "Load source file' when it should try to "Load source files for package..."
Example:
javadoc com.mycompany.modules.java com.mycompany.jsp
Error message:
Loading source file com.mycompany.modules.java...
error: cannot read: com.mycompany.modules.java
Loading source files for package com.mycompany.modules...
Loading source files for package com.mycompany.modules.jsp...
1 error

This bug was fixed in 1.4.1:
http://developer.java.sun.com/developer/bugParade/bugs/4507380.html
-Doug Kramer
Javadoc team

Similar Messages

  • Package name ending with .java

    Hi,
    I have some trouble with a package name ending with "fragments.java". When I use 'packagenames' javadoc complains when it reaches that package.
    I'm guessing javadoc thinks it's a source file and tries to parse it as such.
    I have found a workaround by using 'subpackages' instead of 'packagenames' but I want it work with ant, which doesn't support the subpackages flag.
    Is there a way to get around this?
    - Henrik

    Not at all.
    Assume that there is a package called something.smthing.java
    Then this won't work:
    <javadoc sourcepath="${src_dir}" destdir="${doc_dir}"
    packagenames="something.*"/>
    It will give the following error message because it thinks it is a source file:
    [javadoc] Loading source file something.smthing.java...
    [javadoc] error: cannot read: something.smthing.java
    So, you can get around that by doing like this instead:
    <javadoc sourcepath="${src_dir}" destdir="${doc_dir}"
    packagenames="something"
    additionalparam="-subpackages something"/>
    Which gives the -subpackages option to javadoc.

  • The package name in the java files are modified

    Hey All,
    After creating a Portal Web Project, I imported the existing web applications to Weblogic Workshop. Then I found that the package names in the Java source codes are modified. The <folder name>. is added to the existing package name.
    For example,
    package com.symphonia.script.engine;
    is changed into
    package ScriptingEngine.com.symphonia.script.engine;
    because ScriptingEngine is the folder name.
    The package name of some other Java codes are doubled.
    For example,
    package symphonia.util;
    is changed into
    package syms-util.com.symphonia.util;
    Are there any ways to avoid this package rewriting when importing web applications to the Workshop?
    Thanks!
    Jeff

    To avoid path modifications add all 'base' paths(paths form which you will store the source code) to 'source paths' to Tools-->Project Properties-->Selected-project
    Then you add files/directories to one of the source-paths.
    They should not have any package modifications.
    HTH,
    Raj

  • Bad package name of main-class, javafx 1.3, java 7u15

    Hello,
    I'm facing the same problem as what I read in this previous thread from someone else:
    Bad package name of main-class
    I originally tried to hijack it and rip ownership of that thread away for my own issue but a kind forum moderator has split my post away to let it stand on its own, as I should have done to begin with.
    My question is ...
    ... and I don't have any solution. I am using a javaFX app (1.3) which works perfectly with jre 1.6_11 and 1.7_11, but not with 1.7_15. The exception "Bad package name of main-class" is logged in the console.
    I read on the Internet that fixes in java 1.7_13 cause problems to all self-signed applet. So I signed mine with a trusted certificate delivered by my company, and I checked what pmgrundy said 2 posts before, but it didn't solve the problem.
    My jnlp file is corresponding to the example given in the official tutorial for applet deployment (http://docs.oracle.com/javafx/1.3/tutorials/deploy-applet/#configure), so the main targeted class is "com.sun.javafx.runtime.adapter.Applet".
    Do you have information that can help me in solving this problem ?
    Thanks in advance,
    Sébastien.

    Some additional information to the problem, if it can help :
    With JRE 6u43 : the applet is initialized and working properly. So the problem might not be due to the security fixes, as this version is including them.
    With JRE 7u15 & 7u17 : I tried to run the applet with the runtime v1.3.0_b412, then v1.3.1_b101a, but the problem is the same.
    When tracing is enabled through the Java Control Panel, the following lines are displayed at the end of the log :
    basic: passing security checks; secureArgs:true, allSigned:false
    basic: continuing launch in this VM
    preloader: Delivering: DownloadEvent[type=verify,loaded=1, total=1, percent=100]
    preloader: Start progressCheck thread
    basic: exception: Bad package name of main-class.
    ExitException[ 3]java.lang.SecurityException: Bad package name of main-class
         at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    preloader: Delivering: ErrorEvent[url=null label=Bad package name of main-class cause=Bad package name of main-class
    preloader: Stop progressCheck thread
    ui: Show default error panel
    security: Reset deny session certificate storeI think that the lines preceding those lines are about the validation of the different jars included, using the certificates. When the certificates are not installed on the user workstation, 2 dialog boxes are displayed during the applet validation, so as to ask the users if the applet should be run (and the JavaFX runtime). The certificates are well displayed as trusted. Then, after acceptance, the error occurs.
    Edited by: sebadavi on Mar 13, 2013 5:07 AM

  • Package name for Toplink generated file

    Is there is way to specify a package name for the java file generated when you export a project.
    Thanks,
    Rajiv

    Yes, select the project in the mapping workbench, click on the "Defaults" tab.
    There's a checkbox called "Specify Project Package".
    Darren
    Is there is way to specify a package name for the java file generated when you export a project.
    Thanks,
    Rajiv

  • Binding file for controlling package name

    I looked at the related links, tried a few examples, not much success...
    I realize this can be solved with more effort, but just trying the easy path, so ... ignore this if looks unreasonable, I know how busy developers feel...
    Is there a good example to conform to these requirements:
    Basically i would like binding file as a child element for wsdlc running in JAXWS mode that will follow package naming rules for JAXRPC... meaning:
    Java files generated from xsd will match package name with xsd name space, while for JWS classes control specific package name ...
    Most of my attempts failed due to xpath complaining for not finding any element for the node ...
    Binding attempt 1: make all classes serializable
    ============================
         <jaxws:bindings
                        xs:schemaLocation="Customer.xsd"
    node="/xs:schema">
    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <jxb:serializable/>
    </jxb:globalBindings>
    </jaxws:bindings>
    Binding attempt 2: keep same name for xsd classes
    ============================
    <schemaBindings>
    [ <package> com.myown.pack</package> ]
    [ <nameXmlTransform> http://xmlschema.my.xsd.com/CustomerCall </nameXmlTransform> ]*

    Yes, select the project in the mapping workbench, click on the "Defaults" tab.
    There's a checkbox called "Specify Project Package".
    Darren
    Is there is way to specify a package name for the java file generated when you export a project.
    Thanks,
    Rajiv

  • Will a jni header accept a package name with "." in between

    My java class for native function call is included in a package with name like "xxx.yyy.zzz"
    So when I edit the jni class in header file generated to include the package name ,it shows error.
    Is it possible to write jni class for a native function defined in java class which such package name?

    My java class is like this.
    package aaa.bbb.ccc;
    public class Sample{
         static {
              try {
                   System.loadLibrary("WMSMS");
              } catch (UnsatisfiedLinkError e) {
                   System.err.println("WMSMS.dll failed to load. \n" + e);
                   System.exit(1);
         final static native int SendSMS(boolean a, boolean b, String SMSC,String phno, String msg);
         public static int sendSMS(String phoneno, String message){
              int msent = SendSMS(false,true,"",phoneno,message);
              return msent;
    }The header file generated has function like:
    JNIEXPORT jint JNICALL  Java_Sample_SendSMS
      (JNIEnv *, jclass, jboolean, jboolean, jstring, jstring, jstring);So I changed it to
    JNIEXPORT jint JNICALL Java_aaa.bbb.ccc_WMSMS_SendSMS
      (JNIEnv *, jclass, jboolean, jboolean, jstring, jstring, jstring);But then the cpp code showed errors on compiling.
    I dont want to change package name ,since all other classes of the project are included in it and we use this format to easily distinguish the packages (for more clarity) .
    Otherwise using a simple package name works fine and i m able to call the cpp dll with the jni.

  • Deploy java stored proc. publishes java class names without package name

    Hi to All,
    Using JDevStudio 10132 I've created a 'Loadjava and Java Stored Procedure' deployment profile for my project. I've added my static method to the deplyment profile, but it generates script without java packege name, only pure class name.
    For example it executes: ...
    CREATE OR REPLACE PROCEDURE Procedure1(p1 IN VARCHAR2) AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'CryptoHelper.Procedure1(java.lang.String)';
    instead of
    CREATE OR REPLACE PROCEDURE Procedure1(p1 IN VARCHAR2) AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'mypackege.xxx.yyy.CryptoHelper.Procedure1(java.lang.String)';
    The CryproHelper class is definitely in mypackage.xxx.yyy package and JDeveloper Application Navigator shows correctly it.
    Any ideas?
    thx fo answers

    Hi,
    I've just been doing this on 10133 and found exactly the same thing. It's an easy fix to edit the package body - but it's rather annoying to have to manually do something that should just work.
    Steve
    *Hand editing the .deploy file to add in the package name works.
    Message was edited by:
    spilgrim

  • JSC2 Support for Traditional Java Package Names

    We have been looking for some encouraging words in the JSC2 documentation concerning the use of traditional java package organization for our creator projects but have been unable to find any. JSC2 appears to use a new project directory structure for its own purposes. However, there is no mention of package naming improvements in response to past requests from JSC1 users. We still very much want to organize our project content in the familiar java "com.company.ourproject.ourfeature" style. Is it the intention of the Creator developers to provide improvement in support for custom package names in JSC2 that is beyond what was possible in JSC1? Any insightful comments would be greatly appreciated.

    Hi,
    Please go through the following thread which discusses about the package structure:
    http://swforum.sun.com/jive/thread.jspa?threadID=53439&tstart=0
    Hope this heps
    Cheers
    Giri :-)
    Creator Team

  • Prohibited package name: java.sql

    hi,
    i am trying to push a java application onto a JRun 3.1 server connecting to a oracle 8 database. in my servlet initialization, i use a connection pool to gain a connection to the database.
    Class.forName("oracle.jdbc.OracleDriver");
    outConn = DriverManager.getConnection(outUrl, outUsername, outPassword);
    //throws error at the above line
    this will throw an error:
    java.lang.SecurityException: Prohibited package name: java.sql
    this error is most peculiar because it runs fine locally on my developers version of JRun 3.1. but when i push it to a licensed version on a different server it gives this error. any hints?

    I believe that class name for the Oracle JDBC driver is oracle.jdbc.driver.OracleDriver. The one you posted is incorrect.

  • IOException: Prohibited package name: java.lang

    Hi!
    I have problems when trying to call a method that throws an exception over RMI-iiop. Instead of the exceptions that should be thrown I get an IOException and a stackTrace is printed out in the console(even if the exception is caught) The server is WL8.1 SP3 with java 1.4.2 and the client runs under java 1.3.1_09-b03.
    It works when the client runs under java 1.4.2. I also wrote a small testapplication outside of WL and it works fine too(using RMI-iiop, tnameserv and suns ORB, server under java 1.4.2 and client under java 1.3.1_09-b03).
    But when trying to call the method in WL i get the exception below instead of the one that is thrown.
    java.io.IOException: Prohibited package name: java.lang
         at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:272)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:245)     at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:207)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1058)
    I have also tried to use suns ORB in WL but still get the same problem. Everything works fine except when an exception is thrown by the remote method.
    Any ideas what the problem could be?

    Hi, thank you for the answer.
    But I still think it can be a WL-problem. I can get an application outside of WL to work between java 1.4.2 and java 1.3.1. Even when sending a new exception created and compiled under 1.4.2 and sent to the 1.3.1-JVM, it is recieved correctly by the 1.3.1-JVM and thrown.
    I also tried to change WL to use SUNs ORB which I use in my test but still get the same problem so it feels like the problem is with WL's JNDI..
    /Jonas
    Jonas Mohlin <[email protected]> writes:
    Well the problem is because of the change in format
    java.lang.Throwable in
    J2SE 1.4. There are known bugs in the Sun 1.3.1 ORBs
    that prevent this
    working with a vanilla 1.3.1 client - and we can only
    support a WLS IIOP
    client running with 1.3.1 in this scenario (e.g. WLS
    7.0).
    andy
    Hi!
    I have problems when trying to call a method thatthrows an exception over RMI-iiop. Instead of the
    exceptions that should be thrown I get an IOException
    and a stackTrace is printed out in the console(even
    if the exception is caught) The server is WL8.1 SP3
    with java 1.4.2 and the client runs under java
    1.3.1_09-b03.
    It works when the client runs under java 1.4.2. Ialso wrote a small testapplication outside of WL and
    it works fine too(using RMI-iiop, tnameserv and suns
    ORB, server under java 1.4.2 and client under java
    1.3.1_09-b03).
    But when trying to call the method in WL i get theexception below instead of the one that is thrown.
    java.io.IOException: Prohibited package name:java.lang
         atcom.sun.corba.se.internal.io.IIOPInputStream.throwExce
    ptionType(Native Method)
         atcom.sun.corba.se.internal.io.IIOPInputStream.simpleRea
    dObject(IIOPInputStream.java:272)
         atcom.sun.corba.se.internal.io.ValueHandlerImpl.readValu
    eInternal(ValueHandlerImpl.java:245)     at
    com.sun.corba.se.internal.io.ValueHandlerImpl.readValu
    e(ValueHandlerImpl.java:207)
         atcom.sun.corba.se.internal.iiop.CDRInputStream.read_val
    ue(CDRInputStream.java:1058)
    I have also tried to use suns ORB in WL but stillget the same problem. Everything works fine except
    when an exception is thrown by the remote method.
    Any ideas what the problem could be?--

  • Not allowed to import classes without package names?

    Hi,
    I have a few questions on Packages and importing?
    1. Is the following true that it is illegal to import classes in the same package as the current class, will this cause a comilation error? If this is the case where in the Java Language specification is this actually written as I could not find it?
    2. This has probably been answered by question 1 but if I have 2 classes in the same package and if I import 1 of the classes into the other class, is it illegal to import it by just using the class name and not the package name as well, ie
    if the package name is ie.tcd
    and the 2 class names are exp1.class and exp2.class, can I do this in class 2
    package ie.tcd;
    import exp1;
    public class exp2 {
    3. Is it illegal to import classes that are not explicitly part of any package or must a class be part of a package to be imported. I read somewhere that while this was always illegal it is only after jdk 1.4.2 that this is being enforced? If this is the case where in the Java Language specification is this actually written as I could not find it either?
    Thanks very much for any help,
    John

    Was just also wondering, 1 other thing, I am looking
    at someone elses code they have 2 classes (Class A
    and Class B) in the same package (pkg). The person
    imports class A into B:
    package pkg;
    import A;
    public class B {
    Is this legal code (or was it ever)?Not if A is really in pkg.A. If there is an A in the unnamed package it was legal, or at least it was understood by the compiler, and now it isn't (to both).
    Can you import or is there a point in importing a class in the same
    package?Only by naming the package in the import statement. If the current and the import statement are in the same package the import is redundant.
    If there is a point would you import just be
    using the class name (this would be illegal after jdk
    1.4) or should you use the whole package name even
    though it is in the package anyways?As I understand it you must always use the whole package name in imports.

  • Full package name?

    All,
    I am very new to Javadoc. I would like to know how (if possible) to eliminate the full package name from any descriptions. For example, if I have a method that returns a Hashtable, the Javadoc that gets generated looks like this:
    public static java.util.Hashtable newMethod()
    I would like it to look like this:
    public static Hashtable newMethod()
    I'm using the Eclipse tool, and that is actually calling Javadoc and passing the appropriate parms (v1.4).
    I'm new to Javadoc, so I don't know if the generated method (with the package name) is preferred. I've also read some of the forum's comments on how to get started with this. I'm attempting to consolidate the lengthy Javadoc documentation, and some of the comments I've read have been helpful.
    Thanks,
    Van Williams

    The default should display the package name only
    for classes not in the "current" package.
    For 1.4, use "-noqualifier all" to prevent the package
    name from appearing ahead of the class name
    for all packages. This is further described at:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/javadoc.html#noqualifier
    You can reduce the confusion this may cause
    by using -linkoffline to create links to
    classes not being documented, such as to
    java.util.HashTable in your example. This
    is further described at:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/javadoc.html#linkoffline
    -Doug Kramer
    Javadoc team

  • Mapping namespace to generated package name (clientgen)

    Hello,
    We have a need to map the namespace of the generated bean artifacts from clientgen to a different package name. This could be done prior to weblogic 10 with the typePackageName attribute of clientgen but this is no longer supported in weblogic 10. Is there another way to do this? Note we cannot change the namespace of the webservice wsdl we are generating the client for.
    Thank you!
    Julia Allen

    Use the <binding> child element to specify one of the following:
    * For JAX-WS, one or more customization files that specify one or more of the following:
    o JAX-WS and JAXB custom binding declarations. For more information, see “Customizing XML Schema-to-Java Mapping Using Binding Declarations” in Getting Started With WebLogic Web Services Using JAX-WS.
    o SOAP handler files. For more information, see “Creating and Using SOAP Message Handlers” in Programming Advance Features of WebLogic Web Services Using JAX-WS.
    * For JAX-RPC, one or more XMLBeans configuration files, which by convention end in .xsdconfig. Use this element if your Web Service uses Apache XMLBeans data types as parameters or return values.
    The <binding> element is similar to the standard Ant <Fileset> element and has all the same attributes. See the Apache Ant documentation on the Fileset element for the full list of attributes you can specify.
    Note:      The <binding> element replaces the <xsdConfig> element, which is deprecated as of version 10.0 of WebLogic Server.
    See here for detail.

  • SwingWorker misses a package name

    I hope someone will insert a package name in the 4th version
    of SwingWorker. For the time being I add it by hands.
    I can compile it ok with javac, but JBuilder 8 for some
    reason complains when it sees
    import SwingWorker;that it expects a dot at the end of line, where it finds
    a semiconon.
    See also
    http://forum.java.sun.com/thread.jsp?forum=31&thread=232760

    It should be fine if the class is in your classpath.Nope. I created a small jar with two classes as follows:
    // A.java
    public class A
       public void method() { System.out.println("class A");}
    // -----8<------
    // p/A.java
    package p;
    public class A
       public void method() { System.out.println("class p/A");}
    }Thenjavac A.java p/A.java
    jar cf A.jar A.class p/A.class
    javac -classpath A.jar test/B.javaThe last command suceeds if class B is defined as// test/B.java
    // package test;
    // uncommenting the previous line results in:
    // test/B.java:18: cannot resolve symbol
    // symbol  : class A
    // location: class test.B
    //              new A().method();
    //                    ^
    // 1 error
    public class B
            public static void main(String [] args)
                    new p.A().method();
                    new A().method();
    }But it fails as described if B lives in a package.

Maybe you are looking for

  • When using iChat, what could be causing the person I am chatting with to see my daughter's name instead of my name?

    I had a regular chat buddy tell me that I was showing up in his chat window as Rosie (Last Name) instead of Michael (Last Name). I had noticed once or twice before when I had gone to Apple support to sign up for an Express Support call (where they ca

  • How to transfer domain name to Adobe Catalyst

    I currently have a website/domain name and email address through Clikpic. I have now changed directions and designed my own website with muse. How do I go about transferring everything to Adobe.

  • Closing lid fans turn on

    Hello, So I've had lots of issues with bootcamp on my 2014 13" Air. Specs: i7 8GB memory 250GB SSD OSX 10.9.5 with all security updates Bootcamp with windows 7 pro 64bit Bootcamp drivers 5.1.5640 Since I purchased it, I've been running bootcamp and h

  • Error #1009 in /computeSelectionIndexInContainer()

    TypeError: Error #1009: Cannot access a property or method of a null object reference. at flashx.textLayout.edit::SelectionManager$/computeSelectionIndexInContainer() at flashx.textLayout.edit::SelectionManager$/ http://ns.adobe.com/textLayout/intern

  • Missing lib32 libraries when creating 32bit perlbrew

    Hey guys, Trying to build a 32bit perlbrew here, unfortunately some core libraries seem to be missing from multilib: perlbrew install perl-5.18.1 -Accflags="-m32 -march=i686 -L/usr/lib32" -Aldflags="-m32 -march=i686 -L/usr/lib32" -Alddlflags="-shared