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

  • SEARCH
  • Home
  • 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 6973315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:05:32+00:00 2026-05-27T17:05:32+00:00

I have following command that runs on Windows: java -classpath lib/prov-jdk14-132.jar;../EncUtility com.xxxx.projects.disc.bowl.FileChooseApp Now I

  • 0

I have following command that runs on Windows:

java -classpath lib/prov-jdk14-132.jar;../EncUtility com.xxxx.projects.disc.bowl.FileChooseApp

Now I am using nano command to make executable with following command in OS X:

java -classpath ../EncUtility/lib/prov-jdk14-132.jar:../EncUtility com.xxxx.projects.disc.bowl.FileChooseApp

This command runs perfectly in a terminal but when I use nano command to make utility then it shows the following error:

cp_mac1$ /Users/cp_mac1/Desktop/EncUtility/start ; exit;
Exception in thread "main" java.lang.NoClassDefFoundError: com/xxxx/projects/disc/bowl/FileChooseApp
Caused by: java.lang.ClassNotFoundException: com.xxxx.projects.disc.bowl.FileChooseApp
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
logout

[Process completed]

I have figure out that it uses extra /start in path. But i am not able to solve it even using cd ..

  • 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-27T17:05:33+00:00Added an answer on May 27, 2026 at 5:05 pm

    Your script is being run in a different folder than where it is stored…

    The current working directory, when you start your script, is not the location of the script, it’s whatever folder you happened to be in when you ran it.

    Try using the snippet from Getting the source directory of a Bash script from within to set the working directory, from which your paths should be relative: e.g.

      #!/bin/bash
      SOURCE="${BASH_SOURCE[0]}"
      while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
      DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
    
      cd $DIR/..
      exec java -classpath EncUtility/lib/prov-jdk14-132.jar:EncUtility \
                com.xxxx.projects.disc.bowl.FileChooseApp
    

    The preamble does various shell magics to resolve where the script actually is stored. The cd then changes the working directory to the folder containing that, and the exec is just for a tiny efficiency: it replaces your script’s executable process with the Java VM, rather than starting it as a child process. (Note that nothing beyond the exec would run in your script.)

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

Sidebar

Related Questions

I have a bash script that runs (something like) the following command: vim -E
We have a node js script that runs a command to execute the following
I have the following SQL command that I need to save as a csv
I have a setup.exe project that I run with the following command-line arguments to
I have the following function that deletes the LaTeX command surrounding the current cursor
I currently have a .command file for Mac that contains the following: for f
I have successfully created a Java program that runs fine on my development computer,
I have an application that runs (listens to incoming TCP data) from the command
I have the following code which assembles and runs fine on Windows XP 32
I have a load of C# code that runs aspnet_regiis from the command line

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.