1

In the following scenario:

APP_HOME=/Users/me/Documents/workspace/Mimer/bin
javac -cp $APP_HOME/lib/*.jar::  BCClient.java

Assuming $APP_HOME/lib contains all the jars needed

What would cause the following:

BCClient.java:35: package com.thoughtworks.xstream does not exist
..

It looks like files libraries needed by the .java are not found, except that when i do the following code fails with the same error

javac -cp "$APP_HOME/lib/xstream-1.2.1.jar;$APP_HOME/lib/xpp3_min-1.1.3.4.O.jar"  BCClient.java
1
  • What is the use of :: in the classpath? You don't need any : at the end, only as delimiter. Commented May 12, 2012 at 23:50

1 Answer 1

2

This should work with a compiler Java 6+. But if you execute this command from a shell that perform wildcard expansion, then you need to put the wildcards in quotes. More details can be found here.

/Library/Java/Home/bin/javac -cp "$APP_HOME/lib/*.jar:." BCClient.java

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.