Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3999992
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:43:36+00:00 2026-05-20T07:43:36+00:00

I am trying to compile a library I wrote, using javac and I am

  • 0

I am trying to compile a library I wrote, using javac and I am getting the error: package org.json does not exist. My program includes org.json.JSONArray and org.json.JSONException.

I have this package installed on my computer because I have successfully compiled android apps that import org.json libraries. I’m pretty sure all I have to do is specify a -classpath but I have been unable to find where these files live on my system (ubuntu 10.10 64-bit sun-java6).

Having been unable to find these on my own system I downloaded the org.json files from here, but I was unable to compile them individually because they were co-dependent on each other.

So I have a couple questions:

  1. Does anyone know where the org.json
    package lives from android sdk
    install?
  2. Where might I find a tutorial
    explaining these basic concepts
    regarding compiling, and javac.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:43:36+00:00Added an answer on May 20, 2026 at 7:43 am

    Wherever you like. What you need to do is examine your CLASSPATH variable, and make sure it includes the directory with your library.

    Here’s the first thing:

      $ echo $CLASSPATH
    

    and you’ll see your classpath as it is.

    Now you need to find the jar file containing the org.json; consult the documentation, but it may be something as simple as json.jar. On most LINUX systems you can then just run

     $ locate json.jar
    

    And you’ll get a path name for the jarfile. Make sure that path is part of your CLASSPATH and you’ll be in fat city.

    Oh, and the “Getting started” tutorials at Sun Oracle are the easiest place to start.


    Actually, having looked at the files, they may not be packaged as a jar file. In that case, you want to put them into your sources starting at some top directory (src in this example.)

       /src
           /org/json/ ... put the json files here
           ... put your files here
    

    and when you compile, they’ll all be included, which will resolve all the dependencies.

    Again, the place to look for first steps is that tutorial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile the following simple DL library example code from Program-Library-HOWTO with
I am trying to learn the wxWidgets library, using MinGW and msys to compile
Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error: Undefined
I'm trying to parse a JSON string using the json library. This code works
I'm trying to compile a third-party library, but g++ is complaining about the following
I am trying to compile a slight part of second life library. Specifically, it
I was recently fighting some problems trying to compile an open source library on
I'm trying to use AppWeb, and i wrote a very simple program to embed
I'm trying to compile a program running on an HP UX server on a
I'm trying to compile GnuTLS library several times on Centos 6.2 but with no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.