Re: Help a newbie please?



On Apr 8, 4:03 pm, Lew <l...@xxxxxxxxxxxxx> wrote:
SpreadTooThin wrote:
As I am in xcode, and xcode uses a build.xml file.  Should I not
modify the build.xml file somehow?

If you read the Ant documentation they document how to specify
classpaths.


So then I modify the jarpath?

(I think that's like an ant standard)

Precisely like.

Like totally almost. :)


Also, given the names of the jar [sic] files I mentioned above, should my
code import them?

You import classes, not JARs.

I mean
import j2ssh.*;
or
import j2ssh-common-0.2.9;
import j2ssh-daemon-0.2.9;
import j2ssh-ant-0.2.9;
import j2ssh-core-0.2.9;

No.  Those imports are meaningless.

Use 'import' to specify the fully-qualified name (FQN) of a class so
that you can use the simple name in the rest of the code.  Check out
the Java tutorial on java.sun.com.

As an example, if you use the type java.util.Collection, you can
either refer to it by the FQN in your code:


Right like 'using namespace something' in c++... If I understand you.

public class Foo
{
  private java.util.Collection stuff;
  ...

}

or import the name (not the class!):

import java.util.Collection;
public class Foo
{
  private Collection stuff;
  ...

}

The purpose of 'import' is strictly a convenience for source code to
make names shorter and more readable.  It has no relevance to bytecode
and doesn't do anything to classes.

Read the tutorial.

--
Lew

Ok but I'm still wondering what the FQN is of methods / names in the
jar files are.
and the syntax of the import line. I mean can you tell from the jar
file?

.



Relevant Pages

  • Re: Alter Table + Add Column w/ variable field name
    ... As I mentioned it was a syntax error in the Alter Table statement. ... The first thing I do is delete the old table and then import an Excel spreadsheet with the accounts that they want to scrape the mainframe for. ... The problem is that I have to figure out how to specify the properites of the fields. ... Does any of this make sense and does anyone know how to modify the properties of a table in VBA? ...
    (microsoft.public.access.tablesdbdesign)
  • Re: const struct members
    ... to specify that it will only be changing certain members of the ... Since modify_b can't modify 'a' and modify_a can't modify 'b', ... members and making it difficult to assign/modify things. ... protection due to the object oriented feature of binding code with data. ...
    (comp.lang.c)
  • Re: Help a newbie please?
    ... If you read the Ant documentation they document how to specify ... Use 'import' to specify the fully-qualified name of a class so ... private Collection stuff; ...
    (comp.lang.java.programmer)
  • Re: Using document library web parts
    ... You modify the web part and specify the View ... Engelbert ... > The library itself has had its default 'allitems' view adjusted so that ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: C:ant or C: oolsant
    ... | Buildfile: build.xml does not exist! ... Read the ant documentation http://ant.apache.org/manual/, ... PATH needs the ant/bin directory on it ... Programs that have duplicated logic are hard to modify. ...
    (comp.lang.java.help)