set javac classpath


 
Thread Tools Search this Thread
Top Forums Programming set javac classpath
# 1  
Old 12-13-2011
set javac classpath

I have several jar files in a specific folder, but I can't get javac to understand it.

How do I set the classpath for javac. It is NOT the same classpath as the java command. And it's not enough with one jar file. I have several.
# 2  
Old 12-13-2011
Quote:
The class path can be set using either the -classpath option when calling an SDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value.

[sdkTool] -classpath classpath1:classpath2...

-or-

export CLASSPATH=classpath1:classpath2...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Fedora java classpath

What is the proper way to set your java classpath? (0 Replies)
Discussion started by: cokedude
0 Replies

2. Shell Programming and Scripting

How to override Classpath?

Hi, When I login to my HP-UX and fire the "set" command I see that the weblogic 9.2 classpath is already set. However, I wish to override the classpath to weblogic version 10.3 I have a script call setWLSEnv.sh that has the desired classpath. Thus, in my unix script i write .... (6 Replies)
Discussion started by: mohtashims
6 Replies

3. Programming

Classpath of JAVA

Hello, ABC question as I could not get a direct answer: How to locate the default IO class of JAVA? My question was triggered by the row in most java programimport java.io.* as I am very curious where the io class is located in my Mint14 (Ubuntu12.10). I am aware it is similar to use DBI in PERL,... (1 Reply)
Discussion started by: yifangt
1 Replies

4. Solaris

Java and Javac problems

Ok need some help getting Java working I have the JRE JDK as well as the Netbeands IDE installed. But still having issues getting java and javac working from command line. Running Solaris 11 64 box. root@solaris:/usr/jdk/instances/jdk1.7.0/bin# dir amd64 javadoc jsadebugd ... (11 Replies)
Discussion started by: Fingerz
11 Replies

5. Programming

regarding classpath java

Hi, I have a below command.... $JAVA_HOME/bin/java -cp "/usr/orabase/product/10.2.0/lib:/usr/java/javajar/common/sched.jar:/usr/orabase/product/10.2.0/jdbc/lib/ojdbc14_g.jar:/usr/orabase/product/10.2.0/jdbc/lib/classes12.jar" com.abrt.smart.Smart I want to know where the Smart.class is... (1 Reply)
Discussion started by: PRKS
1 Replies

6. UNIX for Advanced & Expert Users

how to set jar classpath in unix

while running one script am gettng below error ERROR (class path) : /sbcimp/run/pkgs/MsgTechJavaUtils/1.4/lib/MsgTechUtils.jar does not exist. means need to set the class path in env i guess can someone suggest how to set this in redhat 5.3 ? (1 Reply)
Discussion started by: mail2sant
1 Replies

7. Programming

Classpath

This question is realted to UNIX and Java. I sing in to a UNIX server and I want to change my CLASSPATH locally, so it won't affect any other users CLASSPATHS. Is the command 'export PATH=...' the way to do it? Thanks. (4 Replies)
Discussion started by: Rachel Ross
4 Replies

8. UNIX for Dummies Questions & Answers

Classpath

This question is realted to UNIX and Java. I sing in to a UNIX server and I want to change my CLASSPATH locally, so it won't affect any other users CLASSPATHS. Is the command 'export PATH=...' the way to do it? Thanks. Duplicate post (0 Replies)
Discussion started by: Rachel Ross
0 Replies

9. Shell Programming and Scripting

how to set classpath in cron

i have written shell script that script has path to java programwhen irun this script in terminal i get the output but when irun in cron it gives me eror.plz send me code to set classpath #! /bin/bash javac Copy.java /usr/bin/java Copy plz help me out how should i write classpath... (1 Reply)
Discussion started by: sari
1 Replies

10. UNIX for Dummies Questions & Answers

piping with javac command

how to i use javac on a file after searching for it? example: find . -name '*.java' -size -24 -links -2 -atime -4 what would happen if "find" found >1 .java files? also, i'm a little confused on the -size property... mix up between -2 and +2... what's the difference? (1 Reply)
Discussion started by: quipy
1 Replies
Login or Register to Ask a Question