I am a bit confused, and could use some guidance. I have a new piece of code to execute, but am unable to. I believe there are two things wrong, I don't know how to fix.
1. import org.apache.poi I do not have this location.. org.apache on my local drive, but do have an apache poi jar file.
2. import.com.mycompany.ctc.internal.actions *.* package does not exist error..
My Populate.java file imports the below:
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.hssf.util.*;
import com.mycompany.ctc.internal.actions.*;
import com.mycompany.ctc.internal.database.*;
import com.mycompany.as400.access.AS400JDBCPreparedStatement;
------------------------------------------------------------------------------------------
Command line (windows xp) I run the below:
C:\Codefolder>javac -cp .;ctc_util.jar;web-inf\lib\jt400.jar;web-inf\lib\poi-3.7-20101029.jar Populate.java
Error comes back,
java:6: package com.mycompany.internal.actions* does not exist
java:7: package com.mycompany.internal.database* does not exist
Then continues to provide errors on what within those two packages cannot be found in the Populate.java code file. For example the ConnectonManager (which resides in .database* )
So I set my -cp to include the path example:
C:\Codefolder>javac -cp .;ctc_util.jar;web-inf\lib\jt400.jar;web-inf\lib\poi-3.7-20101029.jar;web-inf\classes\com\mycompany\ctc\internal\database Populate.java
I still get the errors. So I went a step futher added *.* to the end.:
C:\Codefolder>javac -cp .;ctc_tuil.jar;web-inf\lib\jt400.jar;web-inf\lib\poi-3.7-20101029.jar;web-inf\classes\com\mycompany\ctc\internal\database *.* Populate.java
Didn't work. So I tried adding a backslash at the end:
C:\Codefolder>javac -cp .;ctc_tuil.jar;web-inf\lib\jt400.jar;web-inf\lib\poi-3.7-20101029.jar;web-inf\classes\com\mycompany\ctc\internal\database\*.* Populate.java
Still didnt work.
I researched on your site and found one suggestion was to build the .java files with the below command:
javac -d *.java
When I execute this in the ..\..\database folder I get the below error.
javac: not a directory: ConnectonManager.java
I am a bit stumped, and appreciate any help or suggestions anyone has on this. Thank you very much.