Problems attempting to compile java code

Any help would be greatly appreciated.  I'm attempting to compile sample code provided by Chase Paymentech.

The command that I'm running is "javac -classpath /home/danp/JPMC_MSDK_1.0.0/src ORBOnlineAuth.java".  I receive a bunch of errors saying that a bunch of packages don't exist.

The missing package messages include "error: org.apache.log4j does not exist".  I do have log4j, but it's located elsewhere on my server (not in org.apache).  

How can I point the compiler to  use log4j in the directory where it's already residing?

-Dan
Dan PackerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin MillerCTOCommented:
I found this solution applicable for using Eclipse:

configure the classpath and add the location of the log4j.properties files by clicking on: Run->Run Configuration -> [classpath tab] -> click on user Entries -> Advanced -> Select Add Folder -> select the location of your log4j.properties file
0
CEHJCommented:
You can start off with this:

javac .;<put the full path to the log4j jar here> ORBOnlineAuth.java

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dan PackerAuthor Commented:
Thanks CHEJ - I tried that, but I still get the same result - error: package org.apache.log4j does not exist.

I had to change the semicolon to a colon to get as far as I did.  I (think) I need the directory /home/mfg/danp/JPMC_MSDK_1.0.0/src in my classpath because the java code imports a bunch of packages under that directory.

Here's the command that I'm running with part of the result below.

[mfg@slsdev06 java]$ javac -classpath /apps/sas/2017ee/servers/tomcat/webapps/qadui/WEB-INF/lib:/home/mfg/danp/JPMC_MSDK_1.0.0/src ORBOnlineAuth.java
/home/mfg/danp/JPMC_MSDK_1.0.0/src/com/jpmc/cms/sdk/framework/core/DispatcherBase.java:5: error: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
                       ^
/home/mfg/danp/JPMC_MSDK_1.0.0/src/com/jpmc/cms/sdk/framework/factory/DispatcherFactoryIF.java:8: error: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

CEHJCommented:
I'm sorry. For some bizarre reason i thought you were using Windows. The path separator you need is of course the colon.
But as i mentioned, you need the full path (and filename) to the log4j jar in there

find /apps/sas/2017ee -name '*log4j*.jar'

Open in new window

might find it
0
Dan PackerAuthor Commented:
CEHJ - I still can't get it to compile.  Is it possible to ask you to troubleshoot directly?  And how much would that cost?

Thanks!
0
Dan PackerAuthor Commented:
Thanks - I had set up the environment incorrectly.  Thanks to CEHJ for his assistance!
0
Martin MillerCTOCommented:
Dan, Can I close this question?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Compiler options

From novice to tech pro — start learning today.