Results 1 to 13 of 13
  1. #1
    gorgon777 is offline Member
    Join Date
    Jan 2014
    Posts
    15
    Rep Power
    0

    Default Help with import in Eclipse

    Hi there,

    I am pretty new to using Eclipse. I am trying to import a com.microsoft.schemas.sharepoint,soap library but the intellisense does not pick it up. I am assuming I need to somehow first setup the use of the soap library before I try to import it?

    The folders all exists with the .java and .class files present in the location C:\desktop\workspace\HelloWorld\

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    Eclipse is not Visual Studio, it does not have intellisense. Yes you manually manage the project classpath, that is just basic Java knowledge. If you don't know what the classpath is then I would suggest you start to research that right now and only then continue to figure out how to get things done using Eclipse. Eclipse itself has a built in help manual that is quite complete, try looking there for an answer after you have learned the basics.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    gorgon777 is offline Member
    Join Date
    Jan 2014
    Posts
    15
    Rep Power
    0

    Default Re: Help with import in Eclipse

    Quote Originally Posted by gimbal2 View Post
    Eclipse is not Visual Studio, it does not have intellisense. Yes you manually manage the project classpath, that is just basic Java knowledge. If you don't know what the classpath is then I would suggest you start to research that right now and only then continue to figure out how to get things done using Eclipse. Eclipse itself has a built in help manual that is quite complete, try looking there for an answer after you have learned the basics.
    Actually Eclipse does provide suggestions to me when i type 'import com.' as the first line. It lists various entries related to Oracle and Sun but not Microsoft as i am trying to do. Manually managing the classpath I know how to do, and it is set to the default project path where all the files are located. But upon trying to import, the editor does not recognize it.

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    Yes Eclipse has code completion, most IDEs do. But intellisense is a Visual Studio specific feature, it pays to learn the proper names and terminology in your working environment so you don't cause confusion or get confused yourself. If you start to talk about Visual Studio features one might start to assume that you're actually asking about C# and not Java for example.

    In stead of keeping your problem description as shallow as it is, why don't you go ahead and describe in detail what you did to "set the classpath". Because when I use Eclipse, I have to configure the project settings properly so Eclipse builds the classpath for me. I am very curious what you have done so far.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    gorgon777 is offline Member
    Join Date
    Jan 2014
    Posts
    15
    Rep Power
    0

    Default Re: Help with import in Eclipse

    Ah yes, apologies for the confusion there.

    So far, to configure the classpath, I went to Run >> Run Configurations >> Advanced >> Add Classpath variable, after which i browsed to the folder containing the classes downloaded from the Lists.wsdl. This made the com folder appear in the list.

    I have also tried adding the folder directly to the project by right-clicking it, selecting properties and adding the class folder so it appears in the Explorer.

    Both the above methods don't seem to allow me to import the folder in my code. Hope that is clear enough:)

  6. #6
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    Well adding a classpath variable is certainly not what you want to do. What you want to achieve is to get a folder of classes on the classpath of your Eclipse project. You manage such things under the build path in the project properties; there you add class folders and library jars to your project which will put them on the classpath (inside Eclipse, at least).
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,431
    Blog Entries
    7
    Rep Power
    20

    Default Re: Help with import in Eclipse

    You could make Eclipse change its workspace and make it point to your directory, or you could Eclipse import that directory to import the project ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  8. #8
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    I don't think there is an actual other project to speak of, just source files and classes generated from a WSDL.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,431
    Blog Entries
    7
    Rep Power
    20

    Default Re: Help with import in Eclipse

    Quote Originally Posted by gimbal2 View Post
    I don't think there is an actual other project to speak of, just source files and classes generated from a WSDL.
    Eclipse is quite clever: if you create a new project in your workspace and Eclipse finds a folder with that name, its wizard tries to make an Eclipse project out of it ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  10. #10
    gorgon777 is offline Member
    Join Date
    Jan 2014
    Posts
    15
    Rep Power
    0

    Default Re: Help with import in Eclipse

    Quote Originally Posted by gimbal2 View Post
    Well adding a classpath variable is certainly not what you want to do. What you want to achieve is to get a folder of classes on the classpath of your Eclipse project. You manage such things under the build path in the project properties; there you add class folders and library jars to your project which will put them on the classpath (inside Eclipse, at least).
    Thank you for that pointer. I had to go to Project -> Properties -> Java Build Path -> Sources Tab and set it there for it to be picked up. Thanks for your help :)

  11. #11
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    Quote Originally Posted by JosAH View Post
    Eclipse is quite clever: if you create a new project in your workspace and Eclipse finds a folder with that name, its wizard tries to make an Eclipse project out of it ...

    kind regards,

    Jos
    I'll take your word for it, I don't trust Eclipse's cleverness and use only Mavenized projects :)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  12. #12
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,431
    Blog Entries
    7
    Rep Power
    20

    Default Re: Help with import in Eclipse

    Quote Originally Posted by gimbal2 View Post
    I'll take your word for it, I don't trust Eclipse's cleverness and use only Mavenized projects :)
    So you do trust Maven, do you?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  13. #13
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,840
    Rep Power
    5

    Default Re: Help with import in Eclipse

    I have sold my soul to it!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. How do I import foreign packages to eclipse?
    By EscSequenceAlpha in forum Eclipse
    Replies: 1
    Last Post: 04-06-2012, 03:14 AM
  2. How to import web app to eclipse ????
    By mlotfi in forum Eclipse
    Replies: 0
    Last Post: 02-25-2012, 05:07 AM
  3. Eclipse 3.5<import *.jar -Need help>
    By roughjj in forum Eclipse
    Replies: 1
    Last Post: 09-09-2009, 09:24 AM
  4. how to import existing Tomcat app into Eclipse
    By mikewertheim in forum Eclipse
    Replies: 1
    Last Post: 02-20-2009, 04:07 PM
  5. How to import a package in Eclipse?
    By naipulb in forum New To Java
    Replies: 2
    Last Post: 06-09-2008, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •