Test Packages and import library error.

Maybe somebody can help me. I'm working with a developer who created our project in NetBeans and uploaded to a CVS. (I am using JSE8) Because he did this it did not generate a "Test Packages" source folder. When I go to my local machine and create a folder named "test" the project creates the correct icon folder.
1. At this point I select generate test (junit test) of my class in the package com.ca.web.utils
2. in Test Packages it creates a package named com.ca.web.utils and then the test class classATest.
3. My imports would not reference the class in the source package it only reference my TestClass in the Test Package.
for example,
Src
com.ca.web.utils
classA
test
com.ca.web.utils
classATest
and in my classATest when i attempt to reference classA
import com.ca.web.utils. (only class in intelisense is classATest)
Can anybody help?

Seems if we add the "test" file package to the CVS itself that fixed the problem.

Similar Messages

  • How to create package and import from jar file?

    Hi all,
    I am writing a software and I am not sure how to create a package for the classes.
    Say I have two classes in the same directory as follows:
    testA.java
    ==========
    package AB;
    public class testA
    public static void main(String[] args){
         testB myB = new testB();
         System.out.println("A test");
    testB.java
    ===========
    package AB;
    public class testB
    public testB(){
         System.out.println("B constructor");
    both file compile without the package heading;
    both file compile using: javac -classpath .\ *.java
    Question 1:
    I cannot run testA by: java -classpath .\ testA
    I think it is a syntax error. What is the correct one?
    If I run testA by: java testA
    The only output I get is: A test
    But I am expecting: B constructor /n A test
    What went wrong?
    Question 2:
    I need to use APIs of another software. I have downloaded a .jar file (xxx.jar) with all the classes in it. And I have put "import xxx.*;" in my source file. But the compiler complains about the importing. What is the right way to copmile it?
    I have read a couple of tutorials but they don't answer my question.
    (I am using windows2000 and don't have the classpath variable.)
    Hope some one can help.
    Thanks a lot

    Try moving testA out of the package and importing 'AB.*;'
    If you have:
    ./testA.class
    ./AB/testb.class
    Then to execute testA from ./ type: java -cp . testA

  • Package and import

    I have a problem about the syntax package and import . If i create a class file that call "Play.java" and keep it at directory call "test".
    Now , i create the main file that call the "Play" class and this current file keep at directory that call "demo". That is mean the "demo" directory includes the main file and "test" subdirectory. So , what should i do ?
    Thanks.

    I would assume that you have two files and want one of them to belong to a package. If the main directory you are working out of is c:\demo\ (/demo/ on a *nix system) you would have the following in that directory.
    c:\demo\MainProgramClass.java
    c:\demo\test\
    The c:\demo\test subdirectory would then contain a class called Play.java (c:\demo\test\Play.java)
    Right?
    That means the Play.java class belongs to the package 'test', so you would include the following at the start of the Play.java file:
    package test;
    Your MainProgramClass.java file (or whatever you named it) should contain the following import statement:
    import test.*;
    This will import all of the files in the test package (basically everything in the test directory). You could also use 'import test.Play;' if you only want to import the Play class.
    Hope this is what you wanted,
    Ryan

  • I want to de-install mac-excel test version and get the error message: you have not the privileges to de-install. Please login with the Mac-OS account you have installed mac-excel originally'. I don't know this account anymore. I am sysadm

    I want to de-install mac-excel test version and get the error message: 'You have not the privileges to de-install. Please login with the Mac-OS account you have installed mac-excel originally'. I don't know this account anymore. Possibly it does not exist anymore. anybody out there who can help ?

    Hi, I may suggest to activate the root account and try the uninstall process from that account. To do so, you have to:
    Go to System Preferences a open up the Users pane;
    On the left side of the pane, you shuold see Login Options;
    Enabled editing option clicking on the lock (it will ask your password);
    Once the pane is enabled, you should see something like Server Account Network (sorry my OS is in italian, so I don't exactly know the right translation), and right next to it a button;
    Click on that button, and a new pane shows up. Click on Open Directory Utility, and on the upper bar of OS X click on Edit;
    Select Enable Root Account (you can set a password, or not);
    Done that, you should log out and when the login window show up, type on the user field "root" and the password you choose;
    Theorically, from this account you will be able to unistall the application.
    After completing your task, I reccomend you to disable the root account, just by loggin in your personal account and repeating the steps I described before. Hope it helps

  • Keyword package and import

    helo,
    someone, pls tell me the difference between using package and import? wat are the difference things that they include in our source file?
    in simple terms pls.
    thanks

    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

  • Very Basic Package and Import question

    Thanks in advance ...
    - I read/tried all tutorials and documents on the matter
    - the programs are from "Java 2 from scratch" book (Steven Haines)
    - I suspect the problems result from using new SDK 1.4.2 version versus SDK 1.2.1 (that the book uses)
    OK, here we go :
    package Stock1.PortfolioTotalsPanel;
    - first line in PortfolioTotalsPanels.java file
    package Stock1.StockTablePanel;
    - first line in StockTablePanel.java file
    package Stock1.StockTableTabPanel;
    - first line in StockTableTabPanel.java file
    --- then:
    Import Stock1.PortfolioTotalsPanel ;
    Import Stock1.StockTablePanel ;
    NOW : I guess I have to compile 'PortfolioTotalsPanels' and 'StockTablePanel' on their own - which I did successfully and kept the '.class' in the same directory (folder) - Stock1
    When trying to compile 'StockTableTabPanel.java' file...
    StockTableTabPanel.java : cannot resolve symbol
    Symbol : class StockTablePanel
    Location: class Stock1.StockTableTabPanel.StockTableTabPanel
    StockTablePanel stockTablePanel = new StockTablePanel();
    ...and the same error message for 'StockTablePanel' class.
    - I noticed the last line has 'stockTablePanel' instead of 'StockTablePanel' ...not sure if it makes a difference..same with the 'portfolioTotalsPanel'
    I'm out of ideas...HELP !!

    package Stock1.PortfolioTotalsPanel;
    - first line in PortfolioTotalsPanels.java file
    package Stock1.StockTablePanel;
    - first line in StockTablePanel.java file
    package Stock1.StockTableTabPanel;
    - first line in StockTableTabPanel.java file
    --- then:
    Import Stock1.PortfolioTotalsPanel ;
    Import Stock1.StockTablePanel ;
    NOW : I guess I have to compile
    'PortfolioTotalsPanels' and 'StockTablePanel' on their
    own - which I did successfully and kept the '.class'
    in the same directory (folder) - Stock1Both of your source files are in a directory named Stock1, right? Change directory so that you are in the directory above Stock1:
    c:\javastuff\Stock1> cd ..
    c:\javastuff> javac Stock1/StockTablePanel.java Stock1/PortfoloiTotalsPanels.java
    to run them, run them from this root directory:
    c:\javastuff> java Stock1.StockTablePanel
    assuming that that class has a main() method.

  • Issues distributing packages and receiving Win32 Error = 0

    Within the last month or so, we've been experiencing issues distributing various packages to our DP's. There doesn't seem to be any rhyme or reason to it; it can be any combination of packages and DP's.
    We've noticed that just before the Win32 error occurs, the following 4 lines usually precede the error:
    UpdateStagedFile failed; 0x80070040
    UpdateStagedFolderRdc failed; 0x80070040
    UpdateStagedFolderRdc failed; 0x80070040
    UpdateStagedFolderRdcW failed; 0x80070040
    We've had an open ticket with MS for over a week now, but there hasn't been any progress. 
    Any light you guys could shed on this would be greatly appreciated!

    This is a known issue for SCCM 2012. A official fix will be released in the near future. If you want to test instantly, contact CSS to open a case to get a test fix.
    There is a KB for this issue (English not available currently)
    http://support.microsoft.com/kb/2927111/fr
    Juke Chou
    TechNet Community Support

  • How to make a package and import it later

    Hi folks,
    this is a very basic question but it is not working to me so i will appreciate your comments.
    I had programmed many classes that are going to be used in many projects so they must be part of a library. Tell me whether or not this procedure is correct ?
    Compile those classes into .class files. Create a package with the jar application putting the .class files into a single file called my_utils ( .jar or .zip ?). Import the package from other projects using the import directive and storing the my_utils file in the project's library directory. Is this correct ?
    Many thanks in advance
    Marla.

    If you want to create a package and then put the package into a jar file, first compile into .class files (in appropriate package directories), then jar all of the .class files.
    Here's a link for a tutorial on packages. http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
    Here's a link for a jar file tutorial. http://java.sun.com/docs/books/tutorial/jar/index.html
    You do not have put the .class files into a jar. Java packages are used for organizing classes, managing class name space, and controlling access to classes. Java jar files are a way to put multiple classes into a single file while compressing the content. Jar files can contain multiple packages and packages do not have to be inside of jar files.

  • Launch failure and shared library error

    Hello all,
    I need help! I think I may have accidentally trashed an important file or folder. I cannot launch MS Word or any of my MS office 04 applications. I get a warning that says Application Launch Failure . . . can't be launched because of a shared library error: "*<Microsoft Word><CarbonLib><CFMPriv_ATS>"
    I can open Word files using Pages, but not with Word. I reloaded MS Word but still cannot launch it. Can anybody tell me what happened and what i can do about it? Any help is greatly appreciated.
    Thanks,
    Mark
    PowerBook G4   Mac OS X (10.4.8)  

    Hi, Gorillaproff. Welcome to the Discussions.
    See my "Troubleshooting shared library errors" FAQ.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Import Library Error two functions with same name on different namespaces

    Im trying impor a library developed by me. In this library have two functions ShowMenu. First function be inside into a class and its declared as
    void __fastcall TTrayicon:howMenu(). The second function has declared as extern "C" __declspec(dllexport) ShowMenu(int x, int y).
    When i use de assistant to import this library i select the library and its header file. But in the next step the assistant show to me the first function.
    Anyone explain what's happen?

    I'm not sure what kind of answer you're looking for. LabVIEW's Import Library wizard does not always properly handle accessing functions in standard C++ DLLs. See this for more info.

  • How to assign test cases to test package and test catlog?

    how to assign test cases(stwb_tc) to test package(stwb_2) and test catlog(stwb_1)?

    Hi
         goto to transaction stwb_1 enter the text and you will a get a screen now
    goto to Menu
    EDIT->Nodes->insert->As subnode
    on the selecting you will get the option to add a test case (stwb_tc) or  a test caltalogue.
    Please reward if useful..

  • Java Packages and Imports

    Hi,
    I have 2 java classes
    A.java
    B.java
    ### A.java ###
    import B;
    public class A
    public static void main(String[] args)
    public class B
    public void foo()
    when I compile B , it works fine, but when i compile A.
    it gives following error
    '.' expected
    why java doesn't allow to create & import a class without package, is there any workaround to resolve this issue
    this is a sample code i have posted, but actually I am facing the same problem in my current project. even if i include that class in classpath error doesn't go away.
    Please suggest what can be done to resolve this issue.
    Thanks in advance.
    NP

    - the default package (the package with no name)It does? Not for me.Gosh, you're right, it doesn't. Sorry.
    Actually, I never use it, my post was a copy/past from damned tutorial...
    - Tim - Harakiri - aaarrhhggg...

  • Please tell how to use package and import?

    Hi,
    My classes are in different packages
    for eg
    package manage.ui
    package manage.data
    package manage.layer
    if I try to import
    import manage.layer.*;
    in a class in manage.ui
    it shows
    package manage.layer does not exist
    Please help to find the problem?????

    Are your classes placed in a folder stucture that mirrors the package structure? So, like this:
    -manage(folder)
    --ui(subfolder of manage)
    --data(subfolder of manage)
    --layer(subfolder of manage)

  • Export and import list error(Import-SPWeb)

    Hi!
    I try to understand import(and export) processes in SharePoint. I've made a .cmp backup of one list. After that I delete some elements. And now I try to import list from cmp file to the same site but it fails - The element 'WebPart' in namespace 'urn:deployment-manifest-schema'
    has invalid child element 'Joins' in namespace 'urn:deployment-manifest-schema'. I didn't make any changes on the site. 
    Also, I have a question - Can I use export for archiving lists? 
    For example - I have a list with 3000 elements. I make a backup and delete them. When I need them again, I import list - and restored items appear in list. 

    An Exported list can't be re-imported into the same site.  Export is used to make a template that can be used to Import the list to a new site.
    Its also not a good choice for making backups since there are limits on how much content can be included in the export.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Aperture 3 - Error Importing Library

    Hi folks!
    My Macbook's hard drive crashed so I had to reinstall OSX 10.6 and use the time machine to bring the stuff back.
    After reinstalling everything I also updated OSX to 10.6.7 and and finally updated Aperture to 3.1.2 via App Store.
    Then I tried to open the Aperture 3 and this happened:
    Error Importing Library
    Now if I go to File/Switch to Library/Other/New... there is a new library called "Aperture Library (current default)"  (Version 3.1.2) including zero versions and masters.
    My old library is automatically renamed as "Aperture Library_Original" including 17xxx versions... (Version 3.1.1)
    I've tried to rebuild the library etc etc but it won't do it and gives the same Error Importing Library error all the time.
    Now I even reinstalled everything again, installed 10.6.6 and now my Aperture is also 3.1.1. Still the same error comes..
    Do you guys/girls have any idea what to try next?
    Thank you in advance!
    Tohlo
    Finland

    Oops, not sure whether using References or Managed.. But I would bet that Managed..
    Those other 2010 folders are from the time before Aperture 3, I purchased Aperture about 2 months ago via App Store.
    Default Picture folder contains Aperture Libraries, iPhoto library, Photo Booth folder and few of those random 2010_ picture folders.. Don't even know why those are there anyway..
    but but.. I'm now already starting to think that I've almost all of the pics in iPhoto..
    If in Finder I right-click my old Aperture Library and choose "Show content" (or something like that, my OSX is in Finnish) -  I'm able to find those few new albums and their photos which are not in iPhoto.. If I just copy those to iPhoto and Import it again.. Naturally I would loose the project structure I've created in Aperture and few edited photos.. but at least I would get my Aperture back again and forget that this incident ever happened..

Maybe you are looking for