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

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.

  • 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

  • How to set Classpath for MySQL

    Hi
    I want to connect to my mySQL db with a java program , but I don't know how to install the mySQL connector driver. Can anyone help me? or indicate somewhere where I might find the answer?
    And how to set Classpath for MySQL.
    my program gives an exception ClassNotFound.
    Exception :com.mysql.jdbc.Driver
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at Files.main(Files.java:352)
    Plz help me
    Thanx
    Lalit

    to make your life easy i tried to connect..
    what you have to do is.. you mysql database server should be running
    next you have to download one of the version of mysql driver.. i downloaded mysql-connector-java-5.0.5
    go to my computer right click - >advance tab -> click on environment variable -> put you path e.g. C:\Program Files\Java\jarFiles\mysql-connector-java-5.0.5\mysql-connector-java-5.0.5-bin.jar
    into your classpath in a user variable section..
    Try this code
    import java.sql.*;
    public class MySqlConnect{
         public static void main(String [] args){
              try{
                   Class.forName("com.mysql.jdbc.Driver");
                   String url ="jdbc:mysql://localhost:3306/test";
                   Connection con =DriverManager.getConnection(url,"root", "password");
                   System.out.println("Connection: " + con);
              }catch(ClassNotFoundException cnfe){
                   cnfe.printStackTrace();
              }catch(SQLException se){
                   se.printStackTrace();
    }have fun
    Gurnah

  • 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

  • Can I set classpath for OAS 10g?

    Hi,<br>
    <br>
    I have OAS on my workstation. Here are the details.<br>
    Server : Oracle Application Server 10g Release 3 <br>
    Version : 10.1.3.1.0 SOA4<br>
    Build : 061008.0900.00025<br>
    Platform : Windows XP - SP2<br>
    <br>
    I want to set an explicit classpath for complete OAS 10g as such and not to an individual oc4j application. Will I be able to do it?<br>
    I saw the System Properties after my server started.<br>
    It has a name-value pair as "java.class.path oc4j.jar".<br>
    So, I assume all my classpath settings (done thru Environment Variables from My Computer) are lost.?<br> I want to set it explicitly during the server startup itself. Can I do that?<br>
    I tried setting below in the opmn.xml <br>
    <process-set id="ASG" numprocs="1"><br>
         <module-data>          <br>                         <category id="start-parameters">     <br>               <data id="start-executable" value="C:\Oracle\product\10.1.3.1\OracleAS_1\jdk\bin\java"/>     <br>               <data id="start-args" value="-classpath C:\abc\properties\"/><br>
    I appended my properties folder after all the jar files present in that tag.<br>
    But its not loading any of my properties files.<br>
    <br>
    Can someone please help me out.<br>
    <br>
    Regards,<br>
    <br>
    Prashanth Babu.

    No, the iPad does not support multiple user accounts or preferences.

  • How to set classpath for J2ME

    how to set class path for j2me. I downloaded J2ME Wireless tool kit. And set the classpath "set classpath=c:\J2mewtk\lib\midpapi.zip;.;". but i could compile java file. .how to set.
    With regards
    Santhosh

    When you are downloading j2MEWTK, everything is included within it. You dont require MIDP seperately. When you are runnung the ktoolbar , which is provided with J2mewtk, the preverifier runs and creates the required jad file for you. You dont need a forte to run these.
    If you want to download MIDP seperately, that also is possible. Then you have to go for command line arguments. Please refer to Sun's MIDP page for details.
    Let me know, if you face any further problem

  • Setting classpath within java application

    Hi
    Sorry if this question has already been asked, I've searched for it but couldn't find it.
    I've written a class (see below) that when given a directory will add all of the jar files to the classpath.
    The classpath is updated to include all of the jar files but if I try to use a class within one of these jar files then an exception is generated stating that the class can't be found.
    Can anyone help me with this problem? I thought that I would only need to update the classpath.
    Thanks,
    Rob
    public class Jar {
         public static void addJarsToClasspath(String root) {
              File f = new File(root);
              if (f.exists()) {
                   File[] jars = f.listFiles(new FilenameFilter(){
                        public boolean accept(File dir, String file) {
                             return ((String)dir.getName()+file).endsWith(".jar");
                   String classpath = System.getProperty("java.class.path");
                   for (int i=0; i<jars.length; i++) {
                             classpath = classpath.concat(":"+root+"/"+jars.getName());
                   System.setProperty("java.class.path",classpath);
                   System.out.println(System.getProperty("java.class.path"));

    You can do this with batch files in Windows NT/2000:
    1) create a batch file called "setcp.bat" containing the following:
    for %%i in (C:\myPath\*.jar) do call appendcp.bat %%i
    2) create another batch file called "appendcp.bat" containing the following:
    set CLASSPATH=%CLASSPATH%;%1
    Now you can run setcp.bat and it will add all JAR files in C:\myPath to your CLASSPATH.
    Jesper

  • How to set classpath from java class ??

    I have tried to use System.setProperty("java.class.path", "my class path string ") to set classpath dynamically. But it is not working. How to set it dynamically from java class ?? Thanks , gary

    Look into the java.net.URLClassLoader. You can't set the classpath after the fact but you can specify URL's that will checked when you try to load a class with that loader.

  • Set classpath from java code

    Hi,
    Is it possible to set new classpath from java code? Something like System.setClasspath(String);
    Many thanks
    Miso

    You aren't the first one to wonder whether that would work, so don't call yourself stupid on that account.
    Not taking 15 minutes to set up and run a test to actually see if it works... well, if you really needed the answer, that would be different.

  • Set JAVA_OPTS for Tomcat in unix

    Hi all,
    I've faced a problem on setting multiple system properties in the JAVA_OPTS for Tomcat in Unix.
    Example:
    JAVA_OPTS=-Dmypath="/home/" -Dmypath2="/home2/"
    I've tried in Windows and it works fine but not sure why in Unix it can't be done. Will be very appreciate if someone can help.

    Nope. If your application requires more than one retrieval from System Property, it will require more than one -D in the startup. However, it only works for Windows environment not unix.

  • JDEV 11G TP3: exception when setting preferences for java code style

    I got this exception when calling the panel in the preferences settings for java code style.
    How to restore it ?
    java.lang.NullPointerException
         at oracle.jdevimpl.style.profile.ProfileModel$ProfileComparator.compare(ProfileModel.java:409)
         at java.util.Arrays.mergeSort(Arrays.java:1284)
         at java.util.Arrays.sort(Arrays.java:1223)
         at java.util.Collections.sort(Collections.java:159)
         at oracle.jdevimpl.style.profile.ProfileModel.<init>(ProfileModel.java:72)
         at oracle.jdevimpl.style.preferences.CodingStylePreferencesPanel.<init>(CodingStylePreferencesPanel.java:144)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at oracle.ide.panels.MetaTraversable.newTraversable(MetaTraversable.java:315)
         at oracle.ide.panels.MetaTraversable.newTraversable(MetaTraversable.java:219)
         at oracle.ide.panels.MDDPanel.getTraversable(MDDPanel.java:1243)
         at oracle.ide.panels.MDDPanel.mav$getTraversable(MDDPanel.java:116)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1506)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1414)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1408)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:525)
         at java.awt.Dialog$2.run(Dialog.java:553)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:551)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:225)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:808)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:593)
         at oracle.ide.cmd.IdeSettingsCommand.doit(IdeSettingsCommand.java:45)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.jdevimpl.vcs.cvs.CVSPreferencesCommand.doit(CVSPreferencesCommand.java:46)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:531)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:784)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:481)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    I got this exception for menu tools\preference\extensions.
    I erased folder C:\JDeveloper\myDirectory\system11.1.1.0.22.49.49 and the error appeared.
    Jun 12, 2008 11:20:55 PM oracle.ide.panels.MDDPanel exitTraversable
    SEVERE: Exception exiting traversable oracle.ideimpl.extension.preference.ExtensionOptionsPanel[,0,0,485x391,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
    java.lang.NullPointerException
         at oracle.ideimpl.extension.preference.ExtensionOptionsPanel.disabledIdsHaveChanged(ExtensionOptionsPanel.java:191)
         at oracle.ideimpl.extension.preference.ExtensionOptionsPanel.onExit(ExtensionOptionsPanel.java:182)
         at oracle.ide.panels.MDDPanel.exitTraversable(MDDPanel.java:1160)
         at oracle.ide.panels.MDDPanel.mav$exitTraversable(MDDPanel.java:116)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1470)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1414)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1408)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:525)
         at java.awt.Dialog$2.run(Dialog.java:553)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:551)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:225)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:808)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:593)
         at oracle.ide.cmd.IdeSettingsCommand.doit(IdeSettingsCommand.java:45)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.jdevimpl.vcs.cvs.CVSPreferencesCommand.doit(CVSPreferencesCommand.java:46)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:536)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:843)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Message was edited by:
    ericardezp

  • How to set classpath for classes in war files

    Hi All,
    After deploying the WAR file I could access the JSP files but gives classnotfound exception when the information is expected from the java servlet.DO I need to set the classpath if yes how to do for the war file.
    thanks

    The web.xml,file structure and error is below let me know if more information is required.
    As you said weblogic is looking for the classes in lib directory inspite of having the classes in web-inf/classes directory.
    web-app>
    <servlet>
    <servlet-name>ControllerServlet</servlet-name>
    <servlet-class>com.test.site.pds.Controller</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ControllerServlet</servlet-name>
    <url-pattern>/controller</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    File Structure:
    C:\test\PDSWebApp\WEB-INF\classes\com\test\site\pds\*.class
    PDSWebApp
         css
         html
         images
         javascript
         jsp
         WEB-INF
         classes
         com/test/site/pds/*.java
         lib
         servlets
    The error:
    javax.servlet.ServletException: [HTTP:101249][ServletContext(id=18129862,name=PdsApp,context-path=/PdsApp)]: Servlet class com.test.site.pds.Controller for servlet ControllerServlet could not be loaded because the requested class was not found in the classpath C:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\PdsApp.war;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\classes12.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-beanutils.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-collections-2.1.1.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-lang-2.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\displaytag-1.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\jstl.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\standard.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\_wl_cls_gen.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp.
    java.lang.ClassNotFoundException: com.test.site.pds.Controller.

  • 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

  • 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.

Maybe you are looking for

  • Vendor text font needs to be changes to appear in PO header.

    Hi , I am trying to fit some vendor text (P. org level) from vendor master in PO header area. The PO header area is restricted and i dont want to change my PO form. So, i can currently fit only 3 - 4 lines of text while i need to fit 6 lines of text.

  • Local vs. Remote Response Why such a diff?

    I'm trying to find out why there is such a difference in query finish times and how to improve the time. ftp is fast between the machines. The network folks say everthing is ok there though the sniffer sees many Parses. Changing the arraysize in SQL*

  • Nokia N97 mini firmware

    First of all I would like to excuse me for my bad English as I am from Latvia! Recently I have bought a new Nokia N97 mini. I have backed up everything and written down all the name of software that I afterwards uninstalled as I thought that it would

  • Need your expertise in abdobe flex development

    hi exprts, i am an ABAP developer with fair knowledge in ABAP webdynpro. I am trying to learn integrating adobe flex component into webdynpro. i went through the SDN blogs by thomas jung and created one application as well, which is working fine. Now

  • Where are my podcasts downloaded to?

    I have been able to setup a few podcasts and I've even watched some of the files download, however, I can't figure out where my iMac is storing these files. I want to download them to my mp3 player. Thanks!