Skip to main content

Packages

  • Chapter
  • First Online:
Java in Two Semesters

Part of the book series: Texts in Computer Science ((TCS))

  • 210k Accesses

Abstract

By the end of this chapter students should be able to:

  • identify the role of packages in organizing classes;

  • create and deploy their own packages in Java;

  • access classes residing in their own packages;

  • run Java applications from the command line;

  • deploy Java applications as JAR files;

  • access libraries that are not part of the standard Java framework to access data on a remote database using the Java Database Connectivity (JDBC) and Hibernate ORM technologies.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 79.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    1 We will stick to the standard Java convention of beginning package names with a lower-case letter.

  2. 2.

    If you are developing a class from scratch that you wish to add into a package, your Java IDE can be used so that the package line is inserted into your code for you and the required directory structure created. If you are using your Java IDE to revisit classes previously written outside of a package (as in this example), you may need to ensure that the resulting directory structure is reflected in the project you are working in. Refer to your IDE’s documentation for details about how to do this.

  3. 3.

    When installing Java an environment variable called PATH should automatically have been set so the operating system can locate the necessary Java tools to compile, run and deploy Java programs. If this has not been done refer to your operating system’s instructions for setting this variable The PATH variable should point to the bin folder in your JDK folder, for example C:\ProgramFiles\Java\jdk1.8.0_121\bin.

  4. 4.

    The system administrator will, of course, have had to set up the correct permissions for the database.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Quentin Charatan .

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Charatan, Q., Kans, A. (2019). Packages. In: Java in Two Semesters. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-99420-8_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-99420-8_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-99419-2

  • Online ISBN: 978-3-319-99420-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics