Resolving Symbolic Paths Programmat​ically in LV 8.5

Hello,
I make use of a user-specified path variable in labview, and many of the VIs I use expect an absolute path. I'd like to be able to resolve symbolic paths programmatically in LabVIEW 8.5. I found this page showing a private Resolve Symbolic Path  method, but can't seem to locate it within the "invoke method" node. Beyond that, I've dug up surprisingly little on how to do this exactly.
Any help or suggestions would be appreciated, thanks.

The method is a private method. 
If you need this function, see this LAVA post for a version of the VI you see in the LabVIEW wiki page.
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Similar Messages

  • Cannot resolve symbol: class EJBObject

    Using javac I get this compile error on this file Calculator.java
    Calculator.java:1: cannot resolve symbol
    symbol : class EJBObject
    location: package ejb
    import javax.ejb.EJBObject;
    ^
    Calculator.java:5: cannot resolve symbol
    symbol : class EJBObject
    location: interface Calculator
    public interface Calculator extends EJBObject {
    Source code for Calculator.java
    import javax.ejb.EJBObject;
    import java.rmi.*;
    public interface Calculator extends EJBObject {
         public long add (int x, int y) throws RemoteException;
         public long subtract (int x, int y) throws RemoteException;

    This code is from a book, so I will assume its a classpath problem. My
    classpath looks like:
    "C\QTJava.zip".;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\locale
    Also the following enviorment varibales have been set to:
    J2EE_HOME
    C:\Development\Java\j2sdkee1.3.1
    JAVA_HOME
    C:\Development\Java\jdk1.3.1
    Path
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;%JAVA_HOME%\bin;%J2EE_HOME%\bin
    I can run j2EE, like "j2EE -verbose" (no problems)
    also run cloudscape, like "cloudscape -start" (no problems)
    also can run deploytool, like "deploytool" (no problems, & deploy sample ear files from cd book)
    Your help is appreicated.

  • JSP page "cannot resolve symbol"

    Hi,
    I'm using j2sdk1.4.2_01 and tomcat-5.0.13. I'm developing within Eclipse 3.0.0 with the Tomcat plugin.
    In my project ("Agenda2") i only created one class ("Persona"), that is correctely compiled (%TOMCAT_HOME%\webapps\Agenda2\WEB-INF\src\Persona.java results in %TOMCAT_HOME%\webapps\Agenda2\WEB-INF\classes\Persona.class, and 0 problems are shown in the Problems list.
    In %TOMCAT_HOME%\webapps\Agenda2 i have my Edit.jsp, that begins with these lines:
    <%@ page language="java" contentType="text/html" %>
    <HTML>
    <HEAD>
    <TITLE>Edit</TITLE>
    </HEAD>
    <BODY>
    <jsp:useBean id="personaAtt" class="Persona">
        <jsp:setProperty name="personaAtt" property="*" />
    </jsp:useBean>
    ....When i call the JSP from the browser, i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 8 in the jsp file: /Edit.jsp
    Generated servlet error:
        [javac] Compiling 1 source file
    C:\Programmi\Java\tomcat-5.0.13\webapps\Agenda2\work\org\apache\jsp\Edit_jsp.java:48: cannot resolve symbol
    symbol  : class Persona
    location: class org.apache.jsp.Edit_jsp
          Persona personaAtt = null;
          ^The error message mentions line 8, which is the one following <BODY>, that is
    <jsp:useBean id="personaAtt" class="Persona">My impression is that there is some path problem, but despite my tries i can't get it.
    The folders tree under %TOMCAT_HOME%\webapps\Agenda2\ is:
    -WEB-INF
    --classes
    --lib
    --src
    -work
    --org
    ---apache
    ----jspDoes anybody can see the problem ?

    Thanks! I'm going to try to put the class into a package as both you have suggested, and i'll post here the result.
    In the meantime i have a related newbie question:
    putting the class into a package, is this kind of a workaround, or it's the "normal thing" ?
    I mean, is it mandatory to put classes into a package in order to import them from JSP pages ?
    It was my understanding that it isn't mandatory, but - from your replies and many other posts in this forum - i'm starting to think that i'm wrong.

  • Oracle jdbc drivers - cannot resolve symbol

    while i'm not new to java, i am new to jdbc. need to connect a java app to an oracle database (hosted by a 3rd party). i have all the connection info. i've crafted a test program, but cannot get it to compile.
    here's the code:
    import java.sql.*;
    public class SimpleJDBC
         public static void main(String[] args) throws SQLException, ClassNotFoundException
         Class.forName(oracle.jdbc.driver.OracleDriver);
         System.out.println("Driver loaded");
         Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@database.host:1521:class"); //, "username", "password");
         System.out.println("Database connected");
         Statement statement = conn.createStatement();
         ResultSet results = statement.executeQuery("select first_name, last_name from user_tbl where last_name = 'Kendall'");
         while(results.next())
              System.out.println(results.getString(1) + "\t" + results.getString(2));
         conn.close();
    }i've set the classpath to the location of the ojdbc14.jar, and it shows in the classpath when i do a "set" on the cmd line. i've tried it in netbeans, eclipse, and straight cmd line.
    i always come up with the same message (cannot resolve symbol) on the line where i call Class.forName(oracle.jdbc.driver.OracleDriver);.
    i've tried compiling and setting the classpath at the same time. i added the ojdbc14.jar to the compile/build paths in both the ides. i even tried using the old classes12.jar. nothing has worked.
    i can't figure out what else there is. within the ides, the intellisense will actually let me put that line in (piece by piece), but then it shows an error.
    any suggestions?

    Place the string name of the driver in quotes.
    - Saish

  • Cannot resolve symbol - cannot resolve symbol

    I am importing import java.awt.Desktop in my java file, but while compiling i am getting the error as follows
    SslClient.java:10: cannot resolve symbol
    symbol : class Desktop
    location: package awt
    import java.awt.Desktop;
    ^
    SslClient.java:156: cannot resolve symbol
    symbol : class Desktop
    location: class SslClient
    Desktop desktop = null;
    ^
    I am having jdk 1.6.
    Edited by: johngrg on Jan 29, 2008 9:55 AM

    java -version
    java version "1.6.0_04"
    Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
    Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
    javac -version
    javac: invalid flag: -version
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are used
    -classpath <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -help Print a synopsis of standard options

  • Import javax.ejb.EJBHome; cannot resolve symbol

    Hi i wonder if anyone can help me. I have read alot of the posts regarding this issue and have tried everything to do with the paths and environmental variables and even reinstalled everything.
    import javax.ejb.EJBHome; cannot resolve symbol
    This is the problem i keep getting and here are the paths that i set:
    SET PATH=c:\j2sdkee1.3\bin;c:\jdk1.3.1_01\bin;c:\jakarta-ant-1.3\bin
    SET ANT_HOME=c:\jakarta-ant-1.3
    SET JAVA_HOME=c:\jdk1.3.1_01
    SET J2EE_HOME=c:\j2sdkee1.3
    SET CLASSPATH=c:\j2sdkee1.3\lib\j2ee.jar;c:\jakarta-ant-1.3\lib\ant.jar;c:\jdk1.3.1_01\lib\tools.jar
    What am i doing wrong???

    Im not sure, everything looks ok to me, but here is what i tried:
    I wrote this little test class, and compiled it
    import javax.ejb.EJBHome;
    public class test
    public test()
    I got the same error you did (or similar)
    D:\>javac test.java
    test.java:1: package javax.ejb does not exist
    import javax.ejb.EJBHome;
    ^
    1 error
    then I added the j2ee.jar to my classpath and everything worked fine.
    here are my env vars:
    JAVA_HOME=d:\dev\jdk
    J2EE_HOME=d:\dev\j2sdkee
    CLASSPATH=...;%J2EE_HOME%\lib\j2ee.jar
    If I were you I would double check all the paths you have set up then try a simple case like the one above. If your running NT/2000 make sure the JAVA_HOME, J2EE_HOME and CLASSPATH are system variables not user variables. Another thing you can try is adding the j2ee.jar to the classpath with the -classpath compiler switch.
    javac -classpath %CLASSPATH%;d:\dev\j2sdkee\lib\j2ee.jar test.java
    Other than those things I'm not sure
    Good Luck

  • Yet another cannot resolve symbol

    I'm having a similar problem to many others that have posted here but having tried every suggestion I'm still stuck.
    My Platform: java 2 1.4.1_01 on WinNT 4.0 SP 6a.
    I've created a class Career which compiles without any problems. I have also created a CareerList class which takes an array of Career objects as an attribute, and it's here that the 'cannot resolve symbol' error occurs.
    CareerList.java:10: cannot resolve symbol
    symbol : class Career
    location: class CareerList
    private Career[] careers;
    I have calls to Career objects occuring 4 times within CareerList and get this error occurs wherever the Career class is called, whether it's an array or an individual object.
    It appears that it cannot find the Career class, although it is there. I am running javac from the directory where all the required classes are held and have also tinkered with the classpath settings.
    I have set the Path variable inside the System Variables to point to <java_home>\bin, and have also tried setting the CLASSPATH inside User Variables to the directory where the class files are stored. This has not solved the problem.
    There does not appear to be any typo's within the code.
    Any ideas what it could be would be greatly appreciated as I've been stuck at this point for a couple of days.

    If you want the root directory of some package(s) to be c:\java\programs\c and the root directory of other package(s) to be c:\java\programs\d, then you have to have those directories in the Classpath - that's how classes are found. This will work but it means adding to your classpath with (nearly) each package.
    Or, you could make c:\java\programs the root directory of all packages.
    Or, you could use the -classpath option of javac and java so you would only include needed directories.
    Or, you could just use the current directory (.) as your classpath.
    You can use all or any combination of the above options as well. I use the second and fourth options, but I do not program for a living so my needs are simple.

  • Cannot Resolve Symbol Frustrations

    Here is the code:
    private void populateTabbedPane()
    tabbedPane.addTab("Welcome", null, new HTBegin(),
    "Welcome to Hot Tub");
    tabbedPane.addTab("Start", null, new HTStartup(),
    "Start up Tub");
    Here is the error:
    C:\Java\Steve>javac -d . Hottub.java
    Hottub.java:44: cannot resolve symbol
    symbol : method addTab (java.lang.String,<null>,hottub.HTStartup,java.lang.String)
    location: class javax.swing.JTabbedPane
    tabbedPane.addTab("Start", null, new HTStartup(),
    ...............^
    1 error
    Notice it is on the second addTab and NOT the first. HTBegin and HTStartup classes exist and are found when the -verbose is added to the compile. Yet this error occurs on all of the addTab functions below the first.
    As an addition, If I comment out the first addTab line and just run with the second line, the same error occurs. I have deleted and re-typed the line many times.
    I'm just learning this language but this seems nuts!
    My path is PATH=C:\BITWARE\;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\READIBMW;C:\JAVA\STEVE;C:\JAVA\BIN
    Any suggestions?

    I think I have solved the issue with the following. As requested, HTStartup is displayed as it was when I originally posted the question. There is not much to it so I figured that wasn't the issue. Especially when the error appears to be the addTab statement from the main line class.
    package hottub;
    import javax.swing.*;
    import java.awt.*;
    public class HTStartup
    {  // Open Class
    } // Close Class
    This is what I changed it to:
    package hottub;
    import javax.swing.*;
    import java.awt.*;
    public class HTStartup extends JPanel
    {  // Open Class
    } // Close Class
    The compile is clean with the addition of extends JPanel. The mainline class compiles.
    Thanks for the help!

  • Another DiveLog can't resolve symbol error

    I am using NetBeans to go through the DiveLog tutorial, which I have first typed, then cut/pasted in (hence I've not included it here). On compilation I get the following error:
    divelog/DiveLog.java [41:1] cannot resolve symbol
    symbol : method addTab (java.lang.String,<nulltype>,divelog.Welcome,java.lang.String)
    location: class javax.swing.JTabbedPane
    tabbedPane.addTab("Welcome",
    ^
    1 error
    Errors compiling divelog (->).
    The rest of the line looks like this:
    tabbedPane.addTab("Welcome",
         null,
         new Welcome(),
         "Welcome to the Dive Log");
    (Note that I have cut out all the other tabs, just to focus the mind)
    As I am sure you expect if I set the component parameter to null (rather than new Welcome()) it compiles just fine.
    I have read the troubleshooting tips on the tutorial, and understand that I am not compiling the whole package, but as far as I know I am! I highlight the package and compile all, I have compiled the project, and both with the same result. I have also read many, many newsgroup entries on the same subject and I have been trying all the various solutions for the last two days.
    I note that whilst the others have an error that points to Welcome, the error message I get is on the symbol addTab.
    I get the same error if I javac it too. (from the Divelog directory I typed javac -classpath d:\java\myjava\ DiveLog.java, and also tried setting a CLASSPATH environmental variable)
    I have my path (environmental variable) set to: d:\java\j2sdk_nb\j2sdk1.4.2\bin
    I have also set CLASSPATH to d:\java\myJava
    Please remember the pain of newbie!
    Thanks, Myles
    PS I am working in Windows XP

    The compiler is saying that in the JTabbedPane class, there is no method that takes a String, a null, a divelog.Welcome, and another String as parameters. I am guessing that in the divelog.Welcome class source code, you are missing something like the bolded text below.
    public class Welcome extends JPanel
    I'm making this guess because the JTabbedPane needs a Component for the third argument. If you still can't make sense of this, post the page of the tutorial so we can look at it.

  • "cannot resolve symbol" when compiling a class that calls methods

    I am currently taking a Intro to Java class. This problem has my instructor baffled. If I have two classes saved in separate files, for example:
    one class might contain the constructor with get and set statements,
    the other class contains the main() method and calls the constructor.
    The first file compiles clean. When I compile the second file, I get the "cannot resolve symbol error" referring to the first class.
    If I copy both files to floppy and take them to school. I can compile and run them with no problem.
    If I copy the constructor file to the second file and delete the "public" from the class declaration of the constructor, it will compile and run at home.
    At home, I am running Windows ME. At school, Windows 2000 Professional.
    The textbook that we are using came with a CD from which I downloaded the SDK and Runtime Environment. I have tried uninstalling and reinstalling. I have also tried downloading directly from the Sun website and still the error persists.
    I came across a new twist tonight. I copied class files from the CD to my hard drive. 4 separate files. 3 of which are called by the 4th.
    I can run these with no problem.
    Any ideas, why I would have compile errors????
    Thanks!!

    Oooops ... violated....
    Well first a constructor should have the same name as the class name so in our case what we have actually created is a static method statementOfPhilosophy() in class SetUpSite and not a constructor.
    Now why does second class report unresolved symbol ???
    Look at this line
    Class XYZ=new XYZ();
    sounds familiar, well this is what is missing from your second class, since there is no object how can it call a method ...
    why the precompiled classes run is cuz they contain the right code perhaps so my suggestion to you is,
    1) Review the meaning and implementation of Constructors
    2) Ask your instructor to do the same ( no pun intended ... )
    3) Check out this for understanding PATH & CLASSPATH http://www.geocities.com/gaurav007_2000/java/
    4) Look at the "import" statement, when we have code in different files and we need to incorporate some code in another it is always a good idea to use import statement, that solves quite a few errors.
    5) Finally forgive any goof up on this reply, I have looked at source code after 12 months of hibernation post dot com doom ... so m a bit rusty... shall get better soon though :)
    warm regards and good wishes,
    Gaurav
    CW :-> Mother of all computer languages.
    I HAM ( Radio-Active )
    * OS has no significance in this error
    ** uninstalling and reinstalling ? r u nuttttttts ??? don't ever do that again unless your compiler fails to start, as long as it is giving a valid error it is working man ... all we need to do is to interpret the error and try to fix the code not the machine or compiler.

  • 'Cannot Resolve Symbol' error when importing custom class

    I get this error...
    c:\mydocu~1\n307\auto.java:14: cannot resolve symbol
    symbol: class Box
    import Box;
    ^
    when I try to compile auto.java, the applet that's supposed to import the class Box, which I built to be like a message box in VB. Here is the code for Box...
    import java.awt.*;
    import java.awt.event.*;
    public class Box extends Window{
         Label lblMsg = new Label();
         Button cmdOk = new Button("OK");
         Panel pnlSouth = new Panel();
         EventHandler ehdlr=new EventHandler(this);
         public Box(Frame parent){
              super(parent);
              setLayout(new BorderLayout());
              add(lblMsg, BorderLayout.NORTH);
              add(pnlSouth, BorderLayout.SOUTH);
              pnlSouth.setLayout(new FlowLayout());
              pnlSouth.add(cmdOk);
              cmdOk.addActionListener(ehdlr);
              this.addWindowListener(ehdlr);
         public void speak(String msg){
              lblMsg.setText(msg);
              this.setLocation(200,200);
              this.setSize(200,200);
              this.setVisible(true);
         private class EventHandler extends WindowAdapter
                        implements ActionListener{
              Window theWindow;
              public EventHandler(Window a){
                   theWindow=a;
              public void actionPerformed(ActionEvent e){
                   theWindow.setVisible(false);
    AND HERE IS THE CODE FOR AUTO...
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import Box;
    public class auto extends Applet implements ActionListener{
         Panel pnlCenter=new Panel();
         Panel pnlSouth=new Panel();
         Panel pnlNorth=new Panel();
         Panel pnlCenterleft=new Panel();
         Panel pnlCenterright=new Panel();
         Button cmdSubmit=new Button("Submit");
         Button cmdNext=new Button("Next");
         Button cmdPrev=new Button("Previous");
         Label lblLoc=new Label("LOCATION:");
         Label lblDate=new Label("DATE:");
         Label lblMile=new Label("MILEAGE:");
         Label lblCost=new Label("COST:");
         Label lblDesc=new Label("DESCRIPTION:");
         Label lblFind=new Label("FIND LOCATION:");
         Label lblDisp=new Label();
         TextField txtLoc=new TextField();
         TextField txtDate=new TextField();
         TextField txtMile=new TextField();
         TextField txtCost=new TextField();
         TextArea txtDesc=new TextArea();
         TextField txtFind=new TextField();
         Box bxOne = new Box((Frame(this).getParent()));
         /*by declaring these four variables here, they are instance level, meaning they are
         available to the whole applet*/
         String textFile="auto.txt";
         String list[] = new String[100];
         String sort[] = new String[100];
         int counter=0;
         int count=0;
         String currentLine="";
         int i;
         int sortcount;
         public void init(){
              this.setLayout(new BorderLayout());
              this.add(pnlNorth, BorderLayout.NORTH);
              this.add(pnlCenter, BorderLayout.CENTER);
              this.add(pnlSouth, BorderLayout.SOUTH);
              pnlNorth.setLayout(new FlowLayout());
              pnlNorth.add(new Label("VIEW RECORDS"));
              pnlCenter.setLayout(new GridLayout(1,2));
              pnlCenter.add(pnlCenterleft);
              pnlCenter.add(pnlCenterright);
              pnlCenterleft.setLayout(new GridLayout(0,1));
              pnlCenterleft.add(lblLoc);
              pnlCenterleft.add(lblDate);
              pnlCenterleft.add(lblMile);
              pnlCenterleft.add(lblCost);
              pnlCenterleft.add(lblDesc);
              pnlCenterleft.add(lblFind);
              pnlCenterright.setLayout(new GridLayout(0,1));
              pnlCenterright.add(txtLoc);
              pnlCenterright.add(txtDate);
              pnlCenterright.add(txtMile);
              pnlCenterright.add(txtCost);
              pnlCenterright.add(txtDesc);
              pnlCenterright.add(txtFind);
              pnlSouth.setLayout(new FlowLayout());
              pnlSouth.add(cmdPrev);
              pnlSouth.add(lblDisp);
              pnlSouth.add(cmdSubmit);
              pnlSouth.add(cmdNext);
              lblDisp.setText("0 of 0");
              cmdPrev.addActionListener(this);
              cmdNext.addActionListener(this);
              cmdSubmit.addActionListener(this);
         public void actionPerformed(ActionEvent e){
              String command=e.getActionCommand();
              if (command.equals("Next")){
                   if(txtLoc.getText().equals("")){
                        reader();
                        transfer();
                        writer();
                        bxOne.speak("Viewing all records");
                   }else{
                        if(counter<count-2){
                             counter++;
                             writer();
                        }else{
                             //don't move
              } else if (command.equals("Previous")){
                   if(txtLoc.getText().equals("")){
                        //do nothing
                   }else{
                        if(counter>0){
                             counter--;
                             writer();
                        }else{
                             //don't move
              } else {
                   txtLoc.setText("");
                   txtDate.setText("");
                   txtMile.setText("");
                   txtCost.setText("");
                   txtDesc.setText("");
                   reader();
                   sorter();
                   writer();
         private void writer(){
              StringTokenizer stCurrent=new StringTokenizer(sort[counter], "\t");
              txtLoc.setText(stCurrent.nextToken());
              txtDate.setText(stCurrent.nextToken());
              txtMile.setText(stCurrent.nextToken());
              txtCost.setText(stCurrent.nextToken());
              txtDesc.setText(stCurrent.nextToken());
              lblDisp.setText(String.valueOf(counter+1) + " of " + String.valueOf(count-1));
         private void reader(){
              try{
                   URL textURL=new URL(getDocumentBase(), textFile);
                   InputStream issIn=textURL.openStream();
                   InputStreamReader isrIn=new InputStreamReader(issIn);
                   BufferedReader brIn=new BufferedReader(isrIn);
                   while(currentLine!=null){
                        currentLine=brIn.readLine();
                        list[count]=currentLine;
                        count++;
              }catch(MalformedURLException exc){
              System.out.println("MalformedURLException Error");
              }catch(IOException exc){
              System.out.println("IOException Error");
              }catch(NullPointerException exc){
              System.out.println("NullPointerException Error");
         private void transfer(){
              for(i=0;i<count;i++){
                   sort=list[i];
         private void sorter(){
              sortcount=0;
              String find=txtFind.getText();
              System.out.println(String.valueOf(count));
              for(i=0;i<count-1;i++){
                   StringTokenizer st=new StringTokenizer(list[i], "\t");
                   String next=st.nextToken();
                   if (find.equals(next)){
                        sort[sortcount]=list[i];
                        sortcount++;
              count=sortcount+1;
    Any help is greatly appreciated.
    2Willis4

    Hi agian,
    I looked closer at your code, I think if you play around with directories and paths, you'll get it, and I think also when you import, you have to have put the class in a package...? Maybe? Blind leading the blind here! So at the top of your box class you have to say something like
    package org.blah.lala
    and you have to have that directory structure for the class files org/blah/lala/Box.class
    Does that make sense?
    And then when you import you say:
    import org.blah.lala.Box
    (I think)
    I cna only imagine that this 'help' I am giving you would be hilarious to a more experienced programmer!
    Anyway, best of luck.

  • "Cannot resolve symbol" error when importing a package

    I'm new to Java and have been trying to make use of a toolikt which uses an imported package. Basically my problem is that I've been trying to compile a file called CookBook.java which contains the following import statements at the top of the file:
    package gate;
    import java.util.*;
    import java.net.*;
    import java.io.*;
    import junit.framework.*;
    import gate.*;
    import gate.util.*;
    import gate.creole.*;
    import gate.creole.nerc.*;
    I then compile this using the following command line:
    /cygdrive/c/jdk1.3.1_01/bin/javac.exe      \
         -classpath "C:\cygwin\home\stevens1\gate_src\gate\build\gate.jar" \
         -extdirs "C:\cygwin\home\stevens1\gate_src\gate\lib\ext"     \
         -d . CookBook.java
    (The extdirs command is required, acording to the manual, because the toolkit is implemented as two files for security reasons: gate.jar and guk.jar) These two flags should point to all the .jar files required by the application.
    However, that command produces the following errors:
    CookBook.java:140: cannot resolve symbol
    symbol : method assertTrue (java.lang.String,boolean)
    location: class gate.CookBook
    assertTrue(
    ^
    CookBook.java:146: cannot resolve symbol
    symbol : variable GateConstants
    location: class gate.CookBook
    GateConstants.ORIGINAL_MARKUPS_ANNOT_SET_NAME);
    ^
    CookBook.java:152: cannot resolve symbol
    symbol : method assertTrue (java.lang.String,boolean)
    location: class gate.CookBook
    assertTrue(
    ^
    One thing I've not been clear on is whether the files (CookBook.java) need to be in a directory with a special name. I've tried playing about with different ones but without much success.
    Any suggestions to help a completely confused Java rookie would really be apreciated!
    thanks in advance
    mark

    I then compile this using the following command line:
    /cygdrive/c/jdk1.3.1_01/bin/javac.exe \
    -classpath "C:\cygwin\home\stevens\gate_src\gate\build\gate.jar" \
    -extdirs "C:\cygwin\home\stevens1\gate_src\gate\lib\ext" \
    -d . CookBook.javaThere are a couple of issues with your compile...
    Most notably, by setting the classpath to your build jar, you are compiling against old classes. If you set your classpath rather to the base of your package hierarchy, then javac will to some degree review and recompile dependencies, against your current source files. If you specify a target directory with -d, class files will be examined in this location if they aren't in the class path (And their source file is not in the compile-path)
    Also, if you are compiling packages, I've found a good practice to be to compile from the base of the package structure, so your command will be more likejavac \
    -classpath . \
    -extdirs "C:\cygwin\home\stevens1\gate_src\gate\lib\ext" \
    gate\\CookBook.javaIt seems to make it easier for the compiler to 'correctly' look up dependencies.
    Hope that helps, at least a little,
    -Troy

  • Packages & "cannot resolve symbol"

    Hello all,
    I'm a Software Engineer that has recently moved from C/C++ to
    Java. I actually have a fairly good background in simple Java
    programming and OO from University and am finding the transition
    quite painless.
    However, I've come across something which will probably go into
    the "slaps forehead" books, but I'm really quite stuck!
    I've just started a new after-hours project, basically writing
    a simple email client in Java with specific features, and I just
    can't seem to get packages to work. No matter what I do (and I
    HAVE cruised the Java tutorials and books for two days now), I
    always keep getting the dreaded "cannot resolve symbol" message
    about classes in my packages.
    I am running on an old Win98 PC here at home, and this is the
    content of my autoexec.bat:
    PATH=C:\j2sdk1.4.1_01\bin;C:\j2sdk1.4.1_01;C:\adrianp;%PATH%
    SET CLASSPATH=.;C:\adrianp;%PATH%
    My source code is located in C:\adrianp\messaging\jmail and the
    files in that directory have the statement at their very top:
    package adrianp.messaging.jmail;
    Please note that the content of my autoexec.bat has been hacked
    to bits left, right and centre, and this is only the CURRENT
    version. Basically, I just can't seem to get the source and/or
    class files in C:\adrianp hierarchy to be found, no matter what
    I do.
    I've tried everything that various forums have suggested, but
    nothing works.
    When I remove the package stamement, everything works fine, but
    of course, this application will soon grow to a rather large
    number of source files, so I'd like to break them down into
    packages. Keeping everything in one directory is not slowing
    down my progress for now, but the fact that I can't organise
    this into packages is driving me batty!
    Please let me know if there is something I'm missing here.
    Thanks,
    Adrian Planinc

    My source code is located in C:\adrianp\messaging\jmail and the
    files in that directory have the statement at their very top:
    package adrianp.messaging.jmail; The package statement above means that the directory containing the adrianp directory must be in your classpath - in other words, C:\ must be in your classpath. Since you have . in your classpath, you could compile if "cd c:\" before compiling (of course, you have to give the correct path to the file you are trying to compile), or you could use the -classpath option of javac.

  • Visual Studio 2012 cannot resolve symbol or Errors control is not a member of class

    Visual Studio 2012 Web Site Project (Note not a Web application, so there are not Designer.vb files) > Site works perfectly fine and using IIS and attaching to IIS to debug code.
    However, if I try to build the site inside of Visual Studio I am getting lots of Errors ‘pnlName’ is not a member of ‘Page_Name’ In the code behind I am getting errors ‘Cannot resolve symbol ‘pnlName’
    .ascx Page
    <li style="margin-right:0;" id="pnlName" runat="server"><a href="/cart" title="Checkout" class="global-checkout">Checkout</a></li>
    .ascx.vb page
    Me.pnlName.Attributes.Remove("style")
    I have cleaned, rebuild and nothing gets rid of these errors, but again the site works as designed, but I would like to launch and debug inside of Visual Studio.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://moojjoo.blogspot.com

    Cor,
    What I am stating is this is a solution using the Web Site Project instead of a
    Web Application Project.
    Web Site projects do not require Designer.vb files, Web Application Projects add Designer.vb files in the solution.   
    Background: I have been hired to support a very successful e-commerce site that was built by a 3rd party vendor (I had no input on the contract or specification, because I would have went with
    MVC).  The site works 100% correctly, however from my 2003 - 2015 experience with Visual Studio and Web Development being in Web Forms and MVC I have always built ASP.NET Solutions using the Web Application Project Templates, which compiles the code down
    to .dlls.  
    A Web Site project does not compile the code, but simply uses the .vb files and they have to be migrated to the server with the .aspx files. http://msdn.microsoft.com/en-us/library/dd547590%28v=vs.110%29.aspx
    Currently the only way I can debug this Solution is to attach to the w3wp.exe process running locally on my work station. 
    The Solution is comprised of two Web Sites, which I cannot get it to compile because of the following errors -
     'webServerControlName' is not a member of '(Protected Code Behind Class Name)'  I am reaching out to the MSDN community to see if anyone has experienced this issue with
    Web Site Projects.
    I hope that clears up the Project Type question.
    Moojjoo MCP, MCTS
    MCP Virtual Business Card
    http://moojjoo.blogspot.com

  • Getting error message Cannot Resolve Symbol when trying to compile a class

    Hello All -
    I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
    the following error message:
    D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
    ConnectionPool.java
    ConnectionPool.java:158: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    private void addConnection(PooledConnection value) {
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    The code is listed as follows for PooledConnection.java (it compiles fine)
    package cal;
    import java.sql.*;
    public class PooledConnection {
    // Real JDBC Connection
    private Connection connection = null;
    // boolean flag used to determine if connection is in use
    private boolean inuse = false;
    // Constructor that takes the passed in JDBC Connection
    // and stores it in the connection attribute.
    public PooledConnection(Connection value) {
    if ( value != null ) {
    connection = value;
    // Returns a reference to the JDBC Connection
    public Connection getConnection() {
    // get the JDBC Connection
    return connection;
    // Set the status of the PooledConnection.
    public void setInUse(boolean value) {
    inuse = value;
    // Returns the current status of the PooledConnection.
    public boolean inUse() {
    return inuse;
    // Close the real JDBC Connection
    public void close() {
    try {
    connection.close();
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    Now the code for ConnectionPool.java class that gives the cannot
    resolve symbol error
    package cal;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
    // JDBC Driver Name
    private String driver = null;
    // URL of database
    private String url = null;
    // Initial number of connections.
    private int size = 0;
    // Username
    private String username = new String("");
    // Password
    private String password = new String("");
    // Vector of JDBC Connections
    private Vector pool = null;
    public ConnectionPool() {
    // Set the value of the JDBC Driver
    public void setDriver(String value) {
    if ( value != null ) {
    driver = value;
    // Get the value of the JDBC Driver
    public String getDriver() {
    return driver;
    // Set the URL Pointing to the Datasource
    public void setURL(String value ) {
    if ( value != null ) {
    url = value;
    // Get the URL Pointing to the Datasource
    public String getURL() {
    return url;
    // Set the initial number of connections
    public void setSize(int value) {
    if ( value > 1 ) {
    size = value;
    // Get the initial number of connections
    public int getSize() {
    return size;
    // Set the username
    public void setUsername(String value) {
    if ( value != null ) {
    username = value;
    // Get the username
    public String getUserName() {
    return username;
    // Set the password
    public void setPassword(String value) {
    if ( value != null ) {
    password = value;
    // Get the password
    public String getPassword() {
    return password;
    // Creates and returns a connection
    private Connection createConnection() throws Exception {
    Connection con = null;
    // Create a Connection
    con = DriverManager.getConnection(url,
    username, password);
    return con;
    // Initialize the pool
    public synchronized void initializePool() throws Exception {
    // Check our initial values
    if ( driver == null ) {
    throw new Exception("No Driver Name Specified!");
    if ( url == null ) {
    throw new Exception("No URL Specified!");
    if ( size < 1 ) {
    throw new Exception("Pool size is less than 1!");
    // Create the Connections
    try {
    // Load the Driver class file
    Class.forName(driver);
    // Create Connections based on the size member
    for ( int x = 0; x < size; x++ ) {
    Connection con = createConnection();
    if ( con != null ) {
    // Create a PooledConnection to encapsulate the
    // real JDBC Connection
    PooledConnection pcon = new PooledConnection(con);
    // Add the Connection to the pool.
    addConnection(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // Adds the PooledConnection to the pool
    private void addConnection(PooledConnection value) {
    // If the pool is null, create a new vector
    // with the initial size of "size"
    if ( pool == null ) {
    pool = new Vector(size);
    // Add the PooledConnection Object to the vector
    pool.addElement(value);
    public synchronized void releaseConnection(Connection con) {
    // find the PooledConnection Object
    for ( int x = 0; x < pool.size(); x++ ) {
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // Check for correct Connection
    if ( pcon.getConnection() == con ) {
    System.err.println("Releasing Connection " + x);
    // Set its inuse attribute to false, which
    // releases it for use
    pcon.setInUse(false);
    break;
    // Find an available connection
    public synchronized Connection getConnection()
    throws Exception {
    PooledConnection pcon = null;
    // find a connection not in use
    for ( int x = 0; x < pool.size(); x++ ) {
    pcon = (PooledConnection)pool.elementAt(x);
    // Check to see if the Connection is in use
    if ( pcon.inUse() == false ) {
    // Mark it as in use
    pcon.setInUse(true);
    // return the JDBC Connection stored in the
    // PooledConnection object
    return pcon.getConnection();
    // Could not find a free connection,
    // create and add a new one
    try {
    // Create a new JDBC Connection
    Connection con = createConnection();
    // Create a new PooledConnection, passing it the JDBC
    // Connection
    pcon = new PooledConnection(con);
    // Mark the connection as in use
    pcon.setInUse(true);
    // Add the new PooledConnection object to the pool
    pool.addElement(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // return the new Connection
    return pcon.getConnection();
    // When shutting down the pool, you need to first empty it.
    public synchronized void emptyPool() {
    // Iterate over the entire pool closing the
    // JDBC Connections.
    for ( int x = 0; x < pool.size(); x++ ) {
    System.err.println("Closing JDBC Connection " + x);
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // If the PooledConnection is not in use, close it
    if ( pcon.inUse() == false ) {
    pcon.close();
    else {
    // If it is still in use, sleep for 30 seconds and
    // force close.
    try {
    java.lang.Thread.sleep(30000);
    pcon.close();
    catch (InterruptedException ie) {
    System.err.println(ie.getMessage());
    I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
    Any help would be greatly appreciated.
    tnx..
    addi

    Is ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
    javac cal/ConnectionPool.

Maybe you are looking for

  • Shared home folder for OSX and Windows

    Hello, I am wondering if it is possible to have a shared home folder for Windows and OSX. We have an AD and ODS. Is this possible, if it is, using CIFS? Hope hearing from anyone Best Regards.

  • Windows AND iTunes wont recognize my nano please help!!!

    This makes no sense!!! my dads computer wont recognize my ipod or charge it up but my moms will and dad has iTunes! please help me!

  • How do i auto reply on Mac Mail 3.6?

    Hello helpers. I'm running Mail 3.6 (old - I'm due to get new Mac soon). How do I set a Rule to auto-reply telling people I'm away, please? Last time I tried it, it was a disaster - resending old msgs out to 100s of people. Thanks, any help really ap

  • Are the "Previews" for each movie a indicator for quality?

    I just got my Apple TV today and although I haven't bought any movies from it, I was wondering if when you're viewing a preview/trailer for a movie if that trailer is a good indication of the quality of the film? I was watching a trailer for "Next Th

  • Can i use US iphone4 in india?

    my uncle have bought a iphone4 for me...he is in US and he brings for me to india ..how can i use it? any solution? because i dont want my iphone useless ..i want it to use it in india.. pls help...