Explicitly specify classes but keep package frame...

I'm trying to generate the Javadoc for a set of classes. Unfortunately those classes belong to the same package as some other classes on the classpath (essentially core and extensions but not separately packaged).
When I try to Javadoc the extension source it generates documentation for all the core source too (contained in a JAR on the classpath). This documentation is, of course, lacking all relevant commentary since it comes from the compiled code rather than the source.
I know I can't exclude the core files from the documentation step.
I have tried explicitly naming all the classes that I want documented but this results in the loss of the package frame (top-left frame). This is inconsistent with the other documentation that's been generated and is, needless to say, a real pain!
The only thing I can think of is to copy all relevant core documentation over the top of the new core documentation to avoid having loads of empty class docs. This is likely to become a bit of a maintenance nightmare.
If anyone's hit upon similar issues or got any advice then I'd like to hear it.
Many thanks,
K.

Doug,
Here's part of the script that's used to build the project and its Javadocs (the package names have been changed to protect the guilty):
set CLASSPATH=../lib/core-1_0.jar;../lib/servlet.jar
set JAVA_PACKAGES=com.blah.contentmanagement com.blah.database
set PACKAGE_NAME=content-management-1_0
cd src
javadoc -package -sourcepath . -stylesheetfile %STYLESHEET% -windowtitle %PACKAGE_NAME% -d ..\doc\api %JAVA_PACKAGES%The project being built is for content management, hence the desire to Javadoc the contentmanagement package. However, another package, the database package, has some content management classes in it. Their Javadoc commentary is being generated alright.
The problem arises because the core packages in the core-1_0 JAR file also contain core database classes, also in the com.blah.database package.
The Javadoc command issued above results in Javadocs being generated for all com.blah.database classes, including those in the core-1_0.jar file. Obviously those present in the JAR are being generated with empty commentary.
As mentioned previously, explicitly specifying the classes removes the package frame (in JDK 1.3 anyway) and so isn't an option. It would also represent a maintenance problem going forward.
I realise that the package structure being employed in this project is unusual; I'm trying to split legacy code to separate what can be reused!
Hope this provides sufficient information,
K.

Similar Messages

  • Package names missing when specifying classes

    Hi!
    I need to generate Javadoc for some (not all) of the classes in one of the packages. So I specified the class names in the batch file (thanks again, Doug!) instead of specifying the package name. Now only the classes in the package have HTMLs, but the package is missing from overview-tree.html, package-list, index.html and whatever.
    Any ideas?
    Thanks!

    Hi Doug:
    I used your link, installed 1.4, and now get the following message when I try to generate Javadoc with MIF Doclet:
    javadoc: In doclet class com.sun.tools.doclets.mif.MIFDoclet, method start has thrown an exception java.lang.reflect.In
    vocationTargetException
    java.lang.NoSuchMethodError: com.sun.tools.doclets.DirectoryManager.createDirectory(Ljava/lang/String;)V
    at com.sun.tools.doclets.mif.MIFObjectWriter.genWriter(MIFObjectWriter.java:98)
    at com.sun.tools.doclets.mif.MIFObjectWriter.init(MIFObjectWriter.java:76)
    at com.sun.tools.doclets.mif.MIFObjectWriter.<init>(MIFObjectWriter.java:50)
    at com.sun.tools.doclets.mif.MIFOverviewObjectWriter.<init>(MIFOverviewObjectWriter.java:64)
    at com.sun.tools.doclets.mif.MIFConfiguration.initOptions(MIFConfiguration.java:746)
    at com.sun.tools.doclets.mif.MIFDoclet.start(MIFDoclet.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
    at java.lang.reflect.Method.invoke(Method.java:313)
    at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:196)
    at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:95)
    at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:289)
    at com.sun.tools.javadoc.Start.begin(Start.java:114)
    When I try to generate "regular" HTML Javadoc (without MIF Doclet), I get the following:
    Building tree for all the packages and classes...
    javadoc: In doclet class com.sun.tools.doclets.standard.Standard, method start has thrown an exception java.lang.reflec
    t.InvocationTargetException
    java.lang.ClassCastException: com.sun.tools.javac.v8.code.Type$ErrorType
    at com.sun.tools.javadoc.ClassDocImpl.<init>(ClassDocImpl.java:111)
    at com.sun.tools.javadoc.ClassDocImpl.<init>(ClassDocImpl.java:134)
    at com.sun.tools.javadoc.DocEnv.getClassDoc(DocEnv.java:388)
    at com.sun.tools.javadoc.ClassDocImpl.superclass(ClassDocImpl.java:353)
    at com.sun.tools.doclets.ClassTree.processClass(ClassTree.java:139)
    at com.sun.tools.doclets.ClassTree.processClass(ClassTree.java:144)
    at com.sun.tools.doclets.ClassTree.buildTree(ClassTree.java:108)
    at com.sun.tools.doclets.ClassTree.<init>(ClassTree.java:67)
    at com.sun.tools.doclets.standard.Standard.startGeneration(Standard.java:105)
    at com.sun.tools.doclets.standard.Standard.start(Standard.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
    at java.lang.reflect.Method.invoke(Method.java:313)
    at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:196)
    at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:95)
    at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:289)
    at com.sun.tools.javadoc.Start.begin(Start.java:114)
    at com.sun.tools.javadoc.Main.execute(Main.java:44)
    at com.sun.tools.javadoc.Main.main(Main.java:34)
    In both cases, nothing is generated....
    What am I doing wrong?
    Thanks
    Benzi

  • I am trying to update itunes but keep getting 'The feature you are trying to use is on a network resource that is unavailable - Click OK to try again, or enter an alternate path folder containing the installation package 'itunes64msi' in the box below'. ,

    I am trying to update itunes but keep getting 'The feature you are trying to use is on a network resource that is unavailable - Click OK to try again, or enter an alternate path folder containing the installation package 'itunes64msi' in the box below'.
    I am unable to install and also i cannot uninstall itunes, can anyone HELP PLEASSSSSSEEEEEE!!

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Im trying to download itunes 10.5 but keep getting error message that says: There is a problem with this Windows Installer package. A problem run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

    im trying to download itunes 10.5 but keep getting error message that says: There is a problem with this Windows Installer package. A problem run as part of the setup did not finish as expected. Contact your support personnel or package vendor. I am using windows XP 32 bit, all the other computers in my house downloaded just fine, no problems, however this is the computer my iphone is set up to, ive tried doing a virus scan, windows update, downloading other things, updating everything possible, everything works fine, its just itunes that wont download, anyone have any other ideas?

    Yes, I had found a similar solution also.  I'm running XP Pro, SP3.  I went Control Panels/ Add-Remove programmes/apple software update/ change/ repair.  Then run the 10.5 exe.
    While the programme updated from version 8 of iTunes, my new iTunes is now a mess.  Not all of my music was in the same folder previously but it all showed up on iTunes.  Now many albums have been left out, some have only a few tracks and some have two copies of some tracks as well as having other tracks missing.  I haven't begun to work on that.

  • How do I delete a dashed image frame, but keep the image?

    How do I delete a dashed image frame, but keep the image?

    It may stroke, on the control panel set stroke color to none, and weight to zero [0].

  • Question regarding palcing cache related classes into a package

    Hi all,
    I have a question regarding placing classes into packages. Actually I am writing cache feature which caches the results which were evaluated previously. Since it is a cache, I don't want to expose it outside because it is only for internal purpose. I have 10 classes related to this cache feature. All of them are used by cache manager (the manager class which manages cache) only. So I thought it would make sense if I keep all the classes into a separate package.
    But the problem I have is, since the cache related classes are not exposed outside so I can't make them public. If they are not public I can't access them in the other packages of my code. I can't either make it public or private. Can someone suggest a solution for my problem?

    haki2 wrote:
    But the problem I have is, since the cache related classes are not exposed outside so I can't make them public. If they are not public I can't access them in the other packages of my code.Well, you shouldn't access them in your non-cache code.
    As far as I understand, the only class that other code needs to access is the cache manager. That one must be public. All other classes can be package-private (a.k.a default access). This way they can access each other and the cache manager can access them, but other code can't.

  • Importing class from default package of a JAR

    I want to create objects of a class contained in a JAR. The JAR has many classes in numerous packages, however the class that I want to use is in the default package. I'm using eclipse and have added the JAR to the build path, but eclipse complains that the class name cannot be resolved. Is there some way to specify an import statement to look in the default package of a particular JAR? Any advice is appreciated.

    jg2009 wrote:
    I was under the impression that classes without a defined package were technically considered to be part of the so-called default package. But, in answer to your question, yes this class does not appear to part of any package.
    Just to provide so additional information, the class that I want to instantiate is an Applet, so it is designed to be called from an html object tag, and have access to all of the other classes in its JAR. There is a system that provides access to underlying data via the following components: html form <-> javascript <-> applet <-> serverlets <-> data
    I want to automate certain data operations, but the only way to access the underlying data is via the applet. Am I out of luck, or is there some way that I can instantiate the applet?All jverd said is right, assuming it is your code and you can change it: basically move everything to a package. But I think your problem is that the jar is a 3rd party jar and you cannot change it. If this is the case, you can use the 'default package' (the terminology is correct) by having your own class(es) in the default package or by using reflection (last time I tried reflection would work). Both are rather bad solutions, but if you really, really want...
    Note: Java actively discourages the use of the 'default package' and more so recently, this is why I am not even sure that reflection would still work.

  • How to run a java class from its package directory

    Hi,
    I hope someone can help me on the following ....
    Let say I have a Test.java class with the package definition: "package com.ams.eai.mq.fileAdapter;". I compiled the class into the directory c:\myJava\client\com\ams\eai\mq\fileAdapter. I have c:\myJava\client specified in my classPath and Path. Why is it when I go to the mentioned directory and enter at the prompt >java Test, I get java.lang.NoClassDefFoundError: test (wrong name: com/ams/eai/mq/fileAdapter/test).
    What directory am I supposed to be in to run my Test class ? Is there some other path that I need to specify but didn't ?
    Thanks for any help.

    You have to type out the fully qualified class name:
    java com.ams.eai.mq.fileAdapter.Test
    Even if you had the entire dir structure, "c:\myJava\client\com\ams\eai\mq\fileAdapter" in your classpath you'd still have to fully qualify the name of the "Test" class. What if there was another class named "Test" in a different package in your CP? The VM would have no way of knowing which "Test.class" you'd want to run.

  • In your lab05, replace instructor's Tokenizer class and MyStackQueue packag

    Objective:
    The objective of this lab is to get you some experience in processing strings character by
    character and in implementing stacks and queues in a class package.
    The programming assignment:
    In your lab05, replace instructor’s Tokenizer class and MyStackQueue package with your own.
    Requirements:
    1. You must use an array to implement your queue.
    2. You must use a linked list to implement your stack.
    3. You must use the following frame work to implement your tokenizer.
    class Tokenizer {
    private char [] Buf;
    private int cur;
    Tokenizer(String infixExpression) {
    Buf = infixExpression.toCharArray();
    cur = 0;
    Token nextToken() {
    1. Skip blanks.
    2. if (cur>=Buf.length) return null;
    3. If the next character is a digit, keep reading until a non-digit is read.
    Convert the string of digits into an integer.
    String Digits = new String(Buf, start, len);
    int num = Integer.valueOf(Digits).intValue();
    Create and return an operand.
    4. Otherwise, use the next character to create and return an operator.
    class Tokenizer {
         private char[] Buf;
         private int cur;
         Tokenizer(String infixExpression) {
              Buf = infixExpression.toCharArray();
              cur = 0;
         Token nextToken() {
              int bufLength = Buf.length;
              Object obj = null;
              // ignore blank space
              while (cur < bufLength && Buf[cur] == ' ') {
                   cur++;
              // if given string having only space return null
              if (cur >= Buf.length)
                   return null;
              StringBuilder value = new StringBuilder();
              // Iterate through each element of string array and construct an string
              // for consecutive digits
              while (cur < bufLength && Buf[cur] <= '9' && Buf[cur] >= '0') {
                   value.append(Buf[cur]);
                   cur++;
              // if digits are there convert all digits as an integer value and create
              // operand
              if (value.length() > 0) {
                   obj = new Operand(Integer.parseInt(value.toString()));
              // if at cur position no digit is present then create operand with the
              // same non digit value
              else {
                   obj = new Operator(Buf[cur]);
                   cur++;
              return ((Token) (obj));
    package StackAndQueue;
    public class Queue {
         private int front;
         private int rear;
         private int capacity;
         private Object S[];
         public Queue() {
              front = 0;
              rear = -1;
              capacity = 100;
              S = new Object[capacity];
         public boolean isEmpty() {
              return S[front] == null;
         public void enqueue(Object obj) {
              int insertionPoint = (rear + 1) % capacity;
              if (S[insertionPoint] == null) {
                   S[insertionPoint] = obj;
                   rear = insertionPoint;
              } else {
                   System.out.println("Queue capacity is full");
         public Object dequeue() {
              if (S[front] != null) {
                   Object obj = S[front];
                   S[front] = null;
                   front = (front + 1) % capacity;
                   return obj;
              } else {
                   System.out.println("Queue is empty");
                   return null;
         public String toString() {
              StringBuilder state = new StringBuilder("[");
              for (int i = front; i < capacity; i++) {
                   if (S[i] != null) {
                        state.append(S[i] + ", ");
              for (int i = 0; i < front; i++) {
                   if (S[i] != null) {
                        state.append(S[i] + ", ");
              if (state.length() > 1) {
                   state.delete(state.length() - 2, state.length() - 1);
              state.append("]");
              return state.toString();
    package StackAndQueue;
    import java.util.LinkedList;
    import java.util.List;
    public class Stack {
         List<Object> linkedList = null;
         public Stack() {
              linkedList = new LinkedList<Object>();
         public boolean isEmpty() {
              return linkedList.size() == 0;
         public void push(Object obj) {
              linkedList.add(obj);
         public Object pop() {
              int topIndex = linkedList.size() - 1;
              if (topIndex >= 0) {
                   Object obj = linkedList.get(topIndex);
                   linkedList.remove(topIndex);
                   return obj;
              } else {
                   return null;
         public Object top() {
              int topIndex = linkedList.size() - 1;
              if (topIndex >= 0) {
                   return linkedList.get(topIndex);
              } else {
                   return null;
    }

    So you want us to do what ?
    Edited by: sabre150 on Oct 9, 2012 3:17 PM
    Cross posted to http://www.coderanch.com/t/594750/Servlets/java/your-lab-replace-instructor-Tokenizer .

  • I686 -- x86_64 upgrade - steps i took to keep packages/settings/data

    So i successfully upgraded from i686 to x86_64 over the weekend; took me two tries but once i stopped making stupid mistakes it was actually pretty easy.  i'd like to document what i did (and some easy places to go wrong) here in this forum post, then maybe if i get the time, look into where and how to post a wiki entry.  [anyone who would like to put forth the effort is more than welcome to convert this to a wiki themselves]
    My Scenario:
    i had a working 686 install on a 250G drive with 2GB memory.  i bought a new 500G drive and 4GB memory to use in this ugrade.  i also had a 320G drive to store backup data for use in the transition.
    The Steps:
    first, backup /etc and /home/username to another drive that'll be accessible in your new system. 
    cp -a /etc /home/username /backup_dir/
    [sidenote]i used tar the first time but that was a pain.  when i finally went to restore, i got /etc/etc then i got /etc/* directly in / and then i had /home/username/home/username.  meh, my fault mostly but annoying nonetheless.  go with cp -a, it maintains the permissions and mod times and it's recursive by default including dot-files.  much easier if you've got the space.[/sidenote] 
    second, create a list of installed packages to be reinstalled into the new system.
    pacman -Qqe | grep -vx "$(pacman -Qqm)" > /backup_dir/pacman.lst
    pacman -Qqm > /backup_dir/aur.lst
    next, swap out your drives and install arch64 onto your new drive using whatever method you're comfortable with from the install cd.
    note: with a clean out-of-the-box HDD i couldn't get the first [pata] boot live cd option to work, so i had to use legacy IDE.  this could be an isolated incident, i dunno; on my second attempt however (after the drive had already been formatted twice) i could use the first [recommended] option and these instructions continue from there.
    now assuming all went well (i had to reformat/install a few times due to grub errors ), you should be rebooted into your new working 64bit system at this point.
    the first thing i did was [-Syu then...] make a directory to mount my backup drive, add it's entry to fstab and mount it; if this were an ubuntu64 transition, i'd spell that out for you...
    now, back up a few key /etc files that we don't want to modify during the restore (all of these are probably not needed, but on my second attempt at this i wasn't taking any chances...)
    cp -a /etc/{fstab,pacman.conf,pacman.d,makepkg.conf} /backup_dir/
    note: you _could_ just copy these files directly into /backup_dir/etc (overwriting your 686 backups) then they'll come over when you restore, but i like to separate steps sometimes to prevent errors, do whatever you feel comfortable with.
    next, reinstall all of your packages.  thanks to the beauty that is pacman, this is a trivial (albeit timeconsuming) step.  aur.lst won't be used in this post but will come in handy later when you want to manually reinstall any foreign packages you had in your 32 bit system.  also, check the announcements forum about the klibc error(s), it will probably be required for you.
    note: if you're comfortable editing pacman.conf and pacman.d/mirrorlist, do so now to maximize your download speed in the next step (don't forget to [re-]back them up to /backup_dir)
    cat /backup_dir/pacman.lst | xargs pacman -S --noconfirm --needed
    this will take forever.  go get dinner and come back to see how it went.
    once that's all done we can restore /etc and /home then put back the files we didn't want modified
    cp -a /backup_dir/etc /
    cp -a /backup_dir/username /home/
    cp -a /backup_dir/{fstab,pacman.conf,pacman.d,makepkg.conf} /etc/
    now... gingerly... carefully... reboot.  hopefully, if you've been diligent, all should be well and it should look like your 686 system. 
    go ahead and re install any packages you got from AUR at this point. 
    Things to Note:
    as i just did this yesterday, i'm still finding the little things that didn't get restored with this method, i'll list them below as i find them.
    1. crontabs, dunno where they're stored but i had to recreate mine
    2. firefox... error, "can't find GRE between version..."
    fixed with:
    sudo xulrunner --register-global
    3. mySQL db's (my amarok db) is stored in /var/lib by default.  backup/restore it or recreate it after your upgrade.
    4. some programs store config/theme files in /usr/share (slim, some kde icons...) it's nothing important but keep it in mind if you've modified things in there.
    5. backing up /usr or /opt might be a good idea; backing up /var is _not_ a good idea as it contains all your 32 bit packages
    good luck!
    pat
    Last edited by brisbin33 (2009-08-24 14:21:52)

    fukawi2 wrote:
    Could you boot the 64-bit LiveCD and mount your existing installation to /mnt/sda1, then:
    pacman -Sy
    pacman -Qqe --dbpath /mnt/sda1/var/lib/pacman > /tmp/packages.txt
    for PKG in `cat /tmp/packages.txt` ; do
    pacman -S --root /mnt/sda1 --logfile /mnt/sda1/var/log/pacman.log --noconfirm $PKG
    done
    I decided to give this a shot on my laptop this evening, mostly out of boredom.
    I had to make a few tweaks to your commands to get it to reinstall the packages.  When you use --root with pacman it will look for the the log file and database relative to that root (unless it is specified in pacman.conf which it isn't atleast in the usb install image I used), so you need to specify the dbpath back to the installer's filesystem.  Alternatively you could do pacman -Syu --dbpath /mnt/var/lib/pacman and update the one in the existing install. Pacman will also freak out about existing files so giving it the -f option is needed too.
    for PKG in `cat /tmp/packages.txt` ; do
    pacman -Sf --root /mnt/ --dbpath /mnt/var/lib/pacman --logfile /mnt/var/log/pacman.log --noconfirm $PKG
    done
    That will get it to reinstall everything.
    I didn't bother to update my i686 install before I did this and ldconfig was yelling about some modules with the same soname but are a different type, older vesions that didn't get overwritten.  I'm thinking bringing the system up to date first would have prevented this, and it may have been the root of the problem I was having next.
    After that I booted from the hard drive and it would hang with a few messages stating "runaway loop modprobe binfmt-464c".  Tried reinstalling grub and some other tricks I found with google but nothing got it going.  This probably had something to do with some 32bit leftovers some where, and ldconfig not running cleanly.  I wasn't about to go through and try to delete all of the offending modules, so I cut my losses and did a fresh install.  Good thing I had the sense to back up first.  Now I just have to wait for all of the packages to download again.
    Andy
    Last edited by phydeaux (2009-02-16 02:23:29)

  • How do I find classes in a package

    Hi,
    I am working on an automation tool which is to be used for testing public API's in our product. The tool is supposed to work this way:
    1. A developer of the API adds a new java file containing the test code for the API in a particular package (which the tool defines). Then he compiles and places the stuff in a jar. There is also a driver class in this same package path defined by the test tool. E.g.
    driver class: com.aaa.bbb.DriverClass
    new API test file: com.aaa.bbb.TestFile
    Now the driver file's job is to find out all the other classes in this particular package and then do some processing. When I tried doing the getPackage() on this driver class to find out about the package I got back a null.
    Question 1: How can I get the package for a particular class (An ugly way to do this would be to strip it out from the classname)
    Question 2: How can I find out what other classes are there in a package?
    Thanks in advance on this.
    Nikhil Singhal
    You can also send me mails at
    [email protected]

    hai
    i have the same problem to finding the classes in package...
    in my case i know the jars name and i have loaded
    classes using code
    ResourceBundle bundle = ResourceBundle.getBundle("source\\ClasssPath");
    StringTokenizer stToke = new StringTokenizer(bundle.getString("ClassPath"),";");
    String temp;
    ClassLoader classLoader = ClassLoader.getSystemClassLoader();
    while(stToke.hasMoreTokens())
         temp = stToke.nextToken().trim();
    if(temp.endsWith(".jar"))
    JarFile jar = new JarFile(new File(temp));
         Enumeration en = jar.entries();
         String pathStr;
         while(en.hasMoreElements())
         pathStr = en.nextElement().toString();
         System.out.println("pathStr ="+pathStr);
         if(pathStr.endsWith(".class"))
              System.out.println( classLoader.getResource(pathStr));
              System.out.println(classLoader.loadClass(pathStr.substring(0,pathStr.indexOf(".class")).replace('/','.').trim()));
         else classLoader.loadClass(temp);
    here i am getting the classes in that package using code
         String[] filLis = new File("//it//sella//converter//ptlf//startup//").list();
         int length = filLis.length;
         while(length-- >0)
         System.out.println(">"+filLis[length]);
    but its returnign the class when this classes in locale folder(i.e)its not getting the classes in loaded memory...
    so how to retrieve the class files names using package structure name...
    (i am having more then 20 jars files, inthat inside the jar samepackage structue may appear in more then one jars )
    pls help me in this field..
    Thanx

  • How can I clean all data in a database but keep all datafile still same nam

    hi,
    How can I get a easy way to clean all data in a database but keep all datafiles still same name and location just like a new created database?
    dbca has two choice: create templet without datafile or with all datafiles but not empty datafiles.
    thanks

    What version is your database? DBCA in 10gR2 allows you to create a template from an existing database using only the structure. From DBCA
    From an existing database (structure only)
    The template will contain structural information about the source database including database options, tablespaces, datafiles, and initialization parameters specified in the source database. User defined schemas and thier data will not be part of the created template.

  • Class name and package name clashing

    When i have a class and a package with the same name, I cannot access classes in the package. For example I have 3 classes and 1 package as below
    - Test.java
    - PackageName.java
    + PackageName // this is a directory
    - MyClass.java
    Below are the codes of .java files
    Test.java
    =======
    public class Test { PackageName.MyClass a = new PackageName.MyClass ();}
    PackageName.java
    ===============
    public class PackageName{ }
    MyClass.java
    ==========
    package PackageName; public class MyClass { }
    I can compile PackageName.java and MyClass.java but not Test.java. It says
    cannot resolve symbol
    symbol : class MyClass
    location: class PackageName
    PackageName.MyClass a = new PackageName.MyClass ();
    But if I remove the PackageName.java, I can compile Test.java perfectly. I think when I use PackageName.MyClass, java thinks that I try to access an inner class MyClass of PackageName class, and that does not exists. Is there any way to solve this ambiguation, other than making the package name and class name different? Thank you very much.

    This works fine: just add an import to Test.java.
    import PackageName.MyClass;
    public class Test
        public static void main(String [] args)
            MyClass a = new MyClass();
    public class PackageName {}
    package PackageName;
    public class MyClass {}It's a pretty wacky, useless example, but it works.
    Plus I thought inner classes would have a dollar sign in their .class file names. When I compile this:
    public class OuterClass
        public static void main(String [] args)
            OuterClass outer = new OuterClass();
            System.out.println(outer);
        public String toString() { return "I'm an OuterClass"; }
        class InnerClass
            public String toString() { return "I'm an InnerClass"; }
    }I see two .class files: OuterClass.class and OuterClass$InnerClass.class
    Why make up examples like this? It's hard enough writing code, and it's easy to disambiguate for the compiler.

  • HT204053 We have apple computer and set up 1 apple id and for music on iPods.  Now we have 3 apple phones and want to share the music but keep our contacts separate. what should we do.

    We started with an apple computer and set up 1 apple id and for music on iPods.  Now we have 3 apple phones and want to share the music but keep our contacts separate. what should we do? Right now we have the same apple id on the PC, ipodtouch, ipod, and 3 phones.  They said make seperate clouds?

    Hello there MizzouTrojan,
    If I understand correctly you want all 6 devices to have access to a single calendar that each device gets notifications for and can edit. You can do that with an private iCloud shared calendar. First sign into www.icloud.com and use these steps from the following article to share a calendar:
    iCloud: Share a calendar with others
    Share a calendar privately
    Click the Share button to the right of the calendar name in the sidebar, then select Private Calendar.
    Note:    You can also share the same calendar publicly. For instructions, see the next task, “Share a calendar publicly.” 
    Type the invitee’s email address in the Add Person field and press Return.
    Click the pop-up menu with the invitee’s name and choose access privileges (View & Edit or View Only). 
    For each person you want to share the calendar with, repeat steps 2 and 3.
    When you’ve invited everyone and set their privileges, click OK.
    Invitation emails are sent from your iCloud email address to the participants you specified.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Find classes in a package

    I'm new to java. What's the best way to find all classes in a standard package (e.g. java.awt). I'm trying to create a list for classes in a package in java.
    thanks

    I guess you're talking about finding them in a running program (like scanning).
    Well, I'm searching a solution for a similar problem.
    Unfortunately, java classes are loaded on demand. That is, if you're not using kung.foo.MyClass in your code, its not known by the vm, so you can't find it using VM calls.
    Since this behavior is the same for packages, you can test this behavior if you're scanning packages using Package.getPackages():
    public class PackageTester {
      // drops the package info on screen.
      public static void listAll (String message , Package [] data) {
        System.out.println ( ) ;
        System.out.println ( message) ;
        System.out.println ( "Amount of passed classes : "+data.length) ;
        for (int i = 0 ; i < data.length; i++)
              System.out.println ( data.toString()) ;
    public static void main (Strinbg [] args) {
    // get a list of all known packages
    Package [] state1 = Package.getPackages() ;
    // load a yet unknown class
    MyClass kong.foo.myClass = new kong.foo.MyClass () ;
    // reload all packages
    Package [] state2 = Package.getPackages() ;
    // print lists to screen
    listAll ("packages before loading MyClass" , state1) ;
    listAll ("packages after loading MyClass" , state2) ;
    Didnt check, but the code should compile.
    This means that, if you want to scan for classes in the vm, you'll have to say the vm which classes you're scanning for. Of course, this is nonsense.
    The most complete way is to scan all files starting at the classpath-entries, and looking for .class-files in directories and .jar/.zip-files. This is much work to do, but it seems to be the only useful solution to solve this nasty problem. You could use tools, which surely are available; but its not an elegant solution.
    Sorry.

Maybe you are looking for

  • How to Search strings with and without quotes

    Hello, I need to search a string with quote and without quote the same way Ex: Wendy's If user enters wendys without ' also need to return all the Wendy's..! I appreciate any help...! Thanks RG

  • Is it possible to do localization

    Post Author: clara CA Forum: .NET Hi all, Is it possible to do localization to the text object in a report as we do to a text box control in VS 2005? If it is , how ? Clara Thank you very much

  • File renaming weirdness

    I hope someone can straighten me out here. I moved a bunch of jpegs to the desk top so I could rename them. I created a folder and tried to move them there. It copied the jpegs to the folder but the originals stayed on the desktop. anyway, when I tri

  • My games keeps clash out,what can I do?

    What can I do? Every SOFTWARE of my iPad keeps clashing:my games, youtube, and lots of stuff. After I tried lot's of times, it's still doing that, I don't know what to do Pls help!

  • Kernel panic, mac mini crash

    Hello, I have this problem many times... My mac crash on boot, and I have this error. How can I do ? Thanks Interval Since Last Panic Report:  180765 sec Panics Since Last Report:          7 Anonymous UUID:                    D732853C-3D4C-406F-8A7B-