Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

importing custom packages into an IDE?

import

  • Please log in to reply
2 replies to this topic

#1 Cruel Hand

Cruel Hand

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 195 posts
  • Programming Language:Java, Objective-C, Visual Basic .NET
  • Learning:C, Java, C++, Objective-C, PHP, (Visual) Basic, Python, JavaScript, Perl, Ruby, PL/SQL, Pascal, Assembly, Haskell

Posted 17 November 2011 - 06:56 PM

I have eclipse and I'm reading this java programming book for beginners and it uses a custom class. The class can be downloaded here so everyone knows what I'm referring to: The jpb Package.

how do I import it so I can use it in eclipse? I've saved the files in a folder titled "jpb" just like the site says to and I also did

import jpb.*;

in my IDE like the site says but I get this error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 

	at SellStocks.main(SellStocks.java:4)

any help will be greatly appreciated, thanks! :)
  • 0

#2 lethalwire

lethalwire

    while(false){ ... }

  • Senior Member
  • PipPipPipPipPipPip
  • 766 posts
  • Programming Language:C, Java, PHP, JavaScript
  • Learning:PHP

Posted 17 November 2011 - 09:11 PM

Just create a new project, then manually create a package in eclipse called jpb.
After this, download the 3 java files from the site, and copy the 3 files. (Select the 3 files, copy).

Now jump back to eclipse, while having the jpb package selected, (the one you created), paste the files. They should automatically show up after this.
  • 0

#3 Cruel Hand

Cruel Hand

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 195 posts
  • Programming Language:Java, Objective-C, Visual Basic .NET
  • Learning:C, Java, C++, Objective-C, PHP, (Visual) Basic, Python, JavaScript, Perl, Ruby, PL/SQL, Pascal, Assembly, Haskell

Posted 19 November 2011 - 03:58 PM

it worked, thanks!
  • 0





Also tagged with one or more of these keywords: import

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download