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 8745243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:58:32+00:00 2026-06-13T11:58:32+00:00

I am following this tutorial to make a program that interacts with the database.

  • 0

I am following this tutorial to make a program that interacts with the database. I am stuck at the last step where I run it. The given example is
C:\test>java -cp c:\test\postgresql-8.3-603.jdbc4.jar;c:\test JDBCExample

I have both the .class file and the .jar for the JDBC in my home directory. I tried

java -cp /home/JohnF/postgresql-9.2-1000.jdbc4.jar;/home/JohnF/QueryDB.class and I get “cannot exectue binary file”
I tried
java -cp /home/JohnF/postgresql-9.2-1000.jdbc4.jar;/home/JohnF/QueryDB and I get “no such file or directory”
I tried
java -cp /home/JohnF/postgresql-9.2-1000.jdbc4.jar;/home/JohnF QueryDB and I get “JohnF is a directory”

I used chmod to set the file permissions to 777. How do I get this to run?

  • 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-06-13T11:58:33+00:00Added an answer on June 13, 2026 at 11:58 am

    You are using semicolon as classpath separator – this will not work on Linux.
    Try replacing “;” with “:” in classpath and it should work.

    Edit: explanation of what is happening here.
    In Linux, “;” is command separator. Your line of

    java -cp /home/JohnF/postgresql-9.2-1000.jdbc4.jar;/home/JohnF QueryDB

    is really expanded into 2 executed one by one:

    java -cp /home/JohnF/postgresql-9.2-1000.jdbc4.jar
    /home/JohnF QueryDB
    

    First one does nothing and successfully quits.
    Second tries to invoke /home/JohnF as executable, and this is really not an executable, but a directory!

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

Sidebar

Related Questions

I'm following this tutorial on building a widget IN that tutorial, he's testing whether
After following a tutorial online to make a basic program which uses Get and
I am following this tutorial http://wicket.wordpress.com/2010/01/08/template-for-building-authenticated-webapplication/ in order to learn how to make login
I was setting up a camera following this tutorial . My problem is that
I am following this tutorial to make a repeater control: http://www.w3schools.com/ASPNET/aspnet_repeater.asp I have successfully
I'm following this tutorial on web2py where you get to make a testdriven environment.
I'm following this tutorial to use 3DES encryption, and i needed to make some
I am following this tutorial, trying to learn to make Magento extensions, however, in
Following this tutorial and running into trouble. [TestMethod] [ExpectedException(typeof(Exception))] public void VerifyPropertyNameMethod_NonExistentPropertyString_ThrowsException() { var
Following this tutorial (http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/handling-concurrency-with-the-entity-framework-in-an-asp-net-mvc-application), I learned how to save data and do concurrency checks

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.