Classpath for java packages

I am trying to execute java files which are present in C:\dss\dss_tests\src\src_devTests\com\ti\debug\engine\scripting folder. When I am executing it its shows lot of error because the class path for packages are not set. So, I set the class path C:\dss\dss_tests\lib\com\ti\debug\engine\scripting because all the class files are present in this location. And some of the jar files contain packages and I have given the path where all jar files are present. Still some errors occur due to some unknown packages. I tried to search in all the folders but I couldn?t find that packages.
the errors i am getting is
C:\dss\dss_tests\src\src_devTests\com\ti\debug\engine\scripting>javac Argc.java
Argc.java:7: package com.ti.ccstudio.scripting.environment does not exist
import com.ti.ccstudio.scripting.environment.ScriptingException;
^
Argc.java:8: cannot find symbol
symbol : class IDspValue
location: package com.ti.debug.engine
import com.ti.debug.engine.IDspValue;
^
Argc.java:19: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:19: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:38: cannot find symbol
symbol : class ScriptingException
location: class com.ti.debug.engine.scripting.Argc
expectedExceptions={ScriptingException.class})
^
Argc.java:39: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:39: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:60: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:60: package Target does not exist
@ISA(or={Target.ISA.C64, Target.ISA.C55})
^
Argc.java:24: cannot access com.ti.debug.engine.scripting.DebugSession
file com\ti\debug\engine\scripting\DebugSession.class not found
debugSession.memory.loadProgram(PROG_256BYTE_ARGS, args);
^
Argc.java:67: cannot find symbol
symbol : class IDspValue
location: class com.ti.debug.engine.scripting.Argc
IDspValue dspValueChar = debugSession.getDspUser().createDspVal
ue(Target.DSP_VALUE_TYPE.DSP_CHAR, 0);
^
Argc.java:67: package Target does not exist
IDspValue dspValueChar = debugSession.getDspUser().createDspVal
ue(Target.DSP_VALUE_TYPE.DSP_CHAR, 0);
^
Argc.java:91: package Memory does not exist
long[] data = debugSession.memory.readData(debug
Session.memory.getPage(Memory.Page.DATA), address, sizeOfChar, charArray.length,
false);
^
13 errors
and the main java file is
**package com.ti.debug.engine.scripting;**
**import static org.testng.Assert.assertEquals;**
**import org.testng.annotations.DataProvider;**
**import org.testng.annotations.Test;**
**import com.ti.ccstudio.scripting.environment.ScriptingException;**
**import com.ti.debug.engine.IDspValue;**
**import com.ti.debug.engine.scripting.DSSTestHarness;**
**import com.ti.debug.engine.scripting.annotations.ISA;**
**public class Argc extends DSSTestHarness {**
**     private final String PROG_NO_ARGS           = "/args/Debug_NoArgs/args.out";**
**     private final String PROG_8BYTE_ARGS      = "/args/Debug_8Byte_Args/args.out";**
**     private final String PROG_256BYTE_ARGS      = "/args/Debug_256Byte_Args/args.out";**
**     @Test(groups="development")**
**     @ISA(or={Target.ISA.C64, Target.ISA.C55})**
**     public void testArgcLength() throws Exception {**
**          // Load the program with Arguments**
**          Object[] args = {1,2,3,4,5,6,7,8,9};**
**          debugSession.memory.loadProgram(PROG_256BYTE_ARGS, args);**
**          // Restart the CPU**
**          debugSession.target.restart();**
**          // Did we calculate argc correctly?**
**          debugSession.breakpoint.add("argstest.c", 14);      // 1sp printf**
**          debugSession.target.run();**
**          int argc_got = (int)debugSession.expression.evaluate("(int)argc");**
**          assertEquals(argc_got, args.length, "argc not calculated correctly");**
**     @Test(groups="development",**
**          expectedExceptions={ScriptingException.class})**
**     @ISA(or={Target.ISA.C64, Target.ISA.C55})**
**     public void testNoAgsSection() throws Exception {**
**          // Load the program with Arguments**
**          Object[] args = {1,2,3,4,5,6,7,8,9};**
**          debugSession.memory.loadProgram(PROG_NO_ARGS, args);**
**     @DataProvider(name = "createArgs")**
**     public Object[][] createArgs() {**
**          return new Object[][] {**
**                    {"Null array",           null},**
**                    {"Zero args",           new Object[] {}},**
**                    {"One arg",           new Object[] {"One"}},**
**                    {"Multiple args",      new Object[] {"One", "Two", new Integer(3), new Integer(4), "Five"}}**
**     @Test(groups="development",**
**          dataProvider = "createArgs")**
**     @ISA(or={Target.ISA.C64, Target.ISA.C55})**
**     public void testArgcArgv(String description, Object[] args) throws Exception {**
**          // Load our program**
**          debugSession.memory.loadProgram(PROG_256BYTE_ARGS, args);**
**          // Figure out how big a char is**
**          IDspValue dspValueChar     = debugSession.getDspUser().createDspValue(Target.DSP_VALUE_TYPE.DSP_CHAR, 0);**
**          int sizeOfChar                = dspValueChar.bitSizeOf();**
**          dspValueChar.dispose();**
**          // Restart the CPU**
**          debugSession.target.restart();**
**          // Did we calculate argc correctly?**
**          debugSession.breakpoint.add("argstest.c", 20);      // Inside Loop**
**          if (args != null)**
**               for (int i = 0; i < args.length; i++)**
**                    // Get the current argument as a string**
**                    String currentArgument = args.toString() + "\0";**
**                    char[] charArray = currentArgument.toCharArray();**
**                    debugSession.target.run();**
**                    // Get the address of our char***
**                    long address = debugSession.expression.evaluate("theArg");**
**                    // Read characters beginning at that address**
**                    long[] data = debugSession.memory.readData(debugSession.memory.getPage(Memory.Page.DATA), address, sizeOfChar, charArray.length, false);**
**                    // Build a string**
**                    String readArg = "";**
**                    for (int j = 0; j < data.length; j++)**
**                         readArg += Character.toString((char)data[j]);**
**                    assertEquals(readArg, currentArgument, "Read argv[" + i + "]");**
please help to execute this java file
Please help me on this

Hi kav,
So, I set the class path C:\dss\dss_tests\lib\com\ti\debug\engine\scripting because all the class files are present in this location.How do you set that? You have to set the classpath jar by jar, here is an example of a classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
     <classpathentry kind="src" path="src"/>
     <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     <classpathentry kind="lib" path="C:/control/drivers/terajdbc4.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/activation.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/commons-net-1.4.1.jar" sourcepath="lib/commons-net-1.4.1"/>
     <classpathentry kind="lib" path="C:/control/drivers/db2java.zip"/>
     <classpathentry kind="lib" path="C:/control/drivers/jakarta-oro-2.0.8.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/jakarta-regexp-1.5.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/log4j-1.2.15.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/mail.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/sqljdbc.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/tdgssconfig.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/tdgssjava.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/db2jcc.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/db2jcc_license_cisuz.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/db2jcc_license_cu.jar"/>
     <classpathentry kind="lib" path="C:/control/drivers/charsets.jar"/>
     <classpathentry kind="output" path="bin"/>
</classpath>I hope it helped!
MJAlbert

Similar Messages

  • Starting tomcat server after setting classpath for java

    Sorry if this is nothing to do with java, it is more to do with starting tomcat server.
    Tomcat server has been working totally fine, but when I wanted to compile a java servlet I wrote for it, I needed to run a BAT file called gojava in MS-DOS that had the classpath for java to work properly. I then attempted to run Tomcat, but just got 'bad command'. As long as I don't start up java by setting the classpath, tomcat will work, but as I need java to write servlets and then to test them without restarting my PC each time, how do I get tomcat to work?
    Thanks
    Hannah

    Sounds like your batch file is changing your path, not your classpath. If you're getting "Bad command or filename" when attempting to run Tomcat, it can't find the executable. Check out the .bat file and see what it's doing (maybe even post it here for further clarity). If it's changing your path at all, make sure it includes a %path% to indicate that it simply wants to append items to the path, not overwrite it completely. Sorry if i'm way off base with my suggestions, but it sounds like that's where the problem's going to be, especially if rebooting resolves the problem.

  • Problem in setting path and classpath for java in RedHat linux 9

    Hi ,
    i am not able to set the PATH and CLASSPATH for j2sdk1.4.2_06
    I have tried with export PATH=$PATH:/usr/j2sdk1.4.2_06/bin
    and export CLASSPATH=$CLASSPATH:/usr/j2sdk1.4.2_06/lib
    in terminal
    but i want to configure it as permenant way for the jre and jdk
    and we should only type java or javac according to the requirement
    regards mihir...

    type those in .bashrc ... save and exit
    then at prompt, type 'source .bashrc'
    this is the permanent solution ...
    bhalo thakun

  • Classpath for java and javac

    Hi,
    I'm a bit confused as to when include the "current" path to java/javac's "-classpath". For instance, if the project has the following structure:
    test
      |___foo (package "foo")
             |___B.java (extends foo.A)
             |___A.javaand the "current" directory is at "test/", then a simple "javac foo/B.java" or "java foo.B" works. However, if the structure of the project is altered to the following:
    test
      |___foo  (package "foo")
      |      |___B.java (extends foo.A and imports boo.C)
      |      |___A.java
      |
      |___myapp (just a directory)
              |____boo (package "boo")
                    |____C.javathen in order to compile or run foo.B when the current directory is at "test/", I have to explicitly specify the "current" directory (or "."), i.e.
    javac -classpath myapp/:. foo/B.java or java -cp myapp/:. foo.B
    Why is it that in the first example, the current directory need not to be specified (".") but in the second example, it must? Is it because as soon as "-classpath/-cp" option is included in the command line, java ignores the default current path ("./")?
    Sincerely,

    If nothing is specified via -cp and no CLASSPATH is set, then the default classpath contains one entry, which is the current directory (a.k.a the classpath is ".").
    If you set the classpath, then the classpath is exactly what you set it to and doesn't include any default.
    That's the only reasonable way to model such things, because if you included the current directory in all cases, then that would produce many unexpected side effects.

  • Set classpath for java in fedora core 1?

    i am new to programming java on linux and im having trouble finding out how to set classpath in the shell, permenently. i have the sdk installed and tried the usual "hello world" test and failed. the response i would get a message telling me javac is not a bash command. i have no clue how to set classpaths in linux so i would much appreciate it if someone would show me thanks

    Ok, there is two ways to achieve this. Either by setting it globally for all the user, or only for your self. If you are working on your own station and have super user access, you can set it up for all th eusers, if not, just set it for your self. How ??
    for all the users, modify the file /etc/profile and include this:
    PATH=$PATH:/path/to/jdk/bin:.
    CLASSPATH=$CLASSPATH:/path/to/jdk/lib/tools.jar:/path/to/jdk/lib/rt.jar
    export PATH CLASSPATH
    If you want to add it only for ur self then, modify the lsame line in ~/.bash_profile
    hope this helps

  • Setting Classpath for java in UNIX machine

    Hi
    I need to work in JAVA in UNIX machine. But, I don't know how to set the classpath in the unix machine. If anyone knows, please let me know.

    setenv CLASSPATH .:/homes/code:${CLASSPATH}
    http://www.cise.ufl.edu/class/cop3530fa04/WinHowTo.htm

  • Classpath for java class for Business Operation

    I am running wls 7.0 with wli on Solaris.
    I am running studio on my developemt w2k pc and connectioning to my unix wls.
    I want to define a business operation using my FCV.class. Where should I put the
    class (pc or server) and where do I need to append my classpath information ?

    Business operations can only access classes from the application and extension
    classpath. This is a WLI limitation.
    Giora
    "Davidson Hutton" <[email protected]> wrote:
    >
    I am running wls 7.0 with wli on Solaris.
    I am running studio on my developemt w2k pc and connectioning to my unix
    wls.
    I want to define a business operation using my FCV.class. Where should
    I put the
    class (pc or server) and where do I need to append my classpath information

  • JAVA classpath: How to find classpath for a given java process

    I want to find the classpath for java process outside of the process.
    example:
    Lets say I execute the following command
    java -classpath foobar.jar;shoobar.jar javatest
    Is there a way to find the classpath from a different program given the process id that is created for the above command?
    Ami shukla

    Perhaps through an externally connected debugger? Beyond that, the only thing I can think of would be to modify the source to report that information for you.

  • Classpath and java.exe, help me, guys

    if i don't use -classpath for java.exe, what else i can do which affects -classpath or class enviromnent?
    thx

    You can set the classpath in your system environment or in your IDE (if you use one)

  • Packages: Making a classpath for a program

    My laptop's hard drive recently failed so I've had to revert to a desktop with a 1.1 GHz processor. Eclipse (the java program I was using barely run on this machine. I had used Eclipse to manage everything with Java, now it time for me to actually how packages work.
    I've read some tutorials about it and figured out how to do basic imports of packages and where to place the files and such, but I don't know how one class in one package gets access to another in a different package. Here is how I have got packages to work so far. I have one class in /dir/. This is the main class with the 'public static void main' method. The name of this class is Test. Test imports a class in /dir/testPackage/ , called Test2 I figured out that you have to put 'package testPackage' at the start of Test2. Now this all works, Test can import and use Test2 with 'import testPackage.Test2'
    This all works, but now I want to know how to import classes that are not in the same directory, or classes that are up one directory in a different package. Using my earlier example, lets say the Test class was in the directory /dir/anotherPackage/ how would it import the package in /dir/testPackage/ ? I could not figure this out.
    Any help on this subject would be great.

    Hi,
    don't get me wrong, but knowing about imports and classpaths in standard java applications is something I consider quite basic...
    So let me give it a try:
    - there is no limitation like "you may only import classes of subpackages"; if you have your classes in a directory called "src", and one class is called foo.ClassA and the other is called bar.ClassB, ClassB may simply import ClassA using the following:
    package bar;
    import foo.ClassA;
    public class ClassB {
       // your code...
    }- a classpath is some different concept: for the above example, the classpath would have to be the "src" directory, nothing of any java-packages that is contained in it! You may have spread your classes in different directories (e.g. c:\src1, c:\src2, ...) and combine all of those to a compound classpath when starting your java application. The classes in your application do not need to know, which class resides in which part of the classpath - they only need the java package names to reference classes!
    I hope this was of any help.
    Bye.

  • "error while evaluating Java script for the package"

    Okay, this is a new one on me! Anyone ever get this message? I don't know what is going on with my iMac, all I know is that about a month ago my iTunes was working fine, and when I just went to use it, it tells me "you can not use the application iTunes with this version of Mac OS X. So I thought maybe something was wrong with my iTunes and downloaded it again and i got the "error while evaluating Java script for the package" when I tried to reinstall iTunes. Another issue I am having is with updates. I haven't received an update for a long time and when I manually check, it tells me there are none.

    Okay, this is a new one on me! Anyone ever get this message? I don't know what is going on with my iMac, all I know is that about a month ago my iTunes was working fine, and when I just went to use it, it tells me "you can not use the application iTunes with this version of Mac OS X. So I thought maybe something was wrong with my iTunes and downloaded it again and i got the "error while evaluating Java script for the package" when I tried to reinstall iTunes. Another issue I am having is with updates. I haven't received an update for a long time and when I manually check, it tells me there are none.

  • Java package for pixel interpolation..

    who has a java package for pixel interpolation?. we need it for our recognition system.. thanks!!

    Try JAi Java Advanced Imaging. You have a plethora of usefull classes in this APi.
    Hope you can find this helpfull to you.
    http://java.sun.com/products/java-media/jai/
    Regards
    Nas.

  • 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

  • Is there a standard package available for JAVA for MM in Enterprise Portal

    Hi
    I would like to know if there is a standard package available for JAVA in MM for Enterprise Portal as we want to create purchase requests in the portal and send them to SAP .

    Standman--
    If you want a somewhat more powerful tool (albeit more complicated) check out TOra:
    http://sourceforge.net/projects/tora/
    As an Oracle DBA I've used this at client's sites when I can't pay for PL/SQL Developer to be installed, and it has quite a few useful things built into it. I think that it's going to see a boom in popularity now that Oracle came out with XE.
    ~Jer

  • How can we generate the java doc for default package

    hello....
    i using Netbeans 6.5 with JDK 1.5 and JRE 1.6. I generated comment and selected generate javadoc option from Netbeans.
    It genearted javadoc for all packages except the default package.Please help me to generate javadoc for default package.

    You need to pass in source filenames (rather than package names) with the javadoc command on the command line. (I don't know if this can be done in NetBeans)
    "I have refined this fix to handle classes in unnamed packages. A link with the label <unnamed package> now appears at the top of the packge list when classes in unnamed packages are specified on the command line."
    stddoclet: Include package info when passing in source filenames (*.java)
    10-Fix Delivered,
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4359386
    Also see:
    stddoclet: Want default (i.e. unnamed) package to appear in package list
    11-Closed, duplicate of 4359386
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4213968

Maybe you are looking for

  • My iPad no longer connects to my home wifi

    I have an iPad 3 with wifi and cellular connectivity. The iPad is always left on and connected to my home wifi. This morning I picked it up and launched safari but it wasn't connected to my wifi. It can locate the the network, but will not connect. I

  • Use one as Many

    Hi When we use this node function why we need the third parameter ? We already mentioned the parameter to be used many times and the number of times it should appear by the first two parameters itself ? So why we need the third paramter ? I went thro

  • Image not loading on Applet

    I am using the following 2 types of codes for loading an image : 1.Image img = getImage(getDocumentBase(),getParameter("pupil.gif")); here img comes as null. 2. Toolkit tool = Toolkit.getDefaultToolkit(); img = tool.getImage("pupil.gif"); here img di

  • I cannot install any apps from my creative cloud.

    "There was a problem installing Photoshop CC" For more information see the specific error below "Installation Failed" Erros encountered during installation. 3.9

  • Set checkbox session state using Jquery / dynamic action

    Hello Folks, I'm trying a simple dynamic action to disable & set element value upon making a radio box selection. What I'd like is: a) if i chose "Vendor" as "Traditional" (default value) I would like to set the "SNAP" flag as Checked and "Status" te