× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It worked just fine for me when I set up a test.  This is what I did:  I
created two classes, test1 and test2 and declared them to be in package T.
(First line of code is "package T;".)  The class test1 does nothing except
print its name in its constructor, and test2 does nothing except to create a
new test1 object in its main method.  I put the source files, test1.java and
test2.java, into directory /java/T on my V4R5 box.  They have to be in a
directory whose path ends in "/T" because I declared them to be in package
T.

Next, I started qsh and changed my current directory to be /java.  Not
/java/T, but /java.  Then I typed "javac T/test1.java" followed by "javac
T/test2.java".  Both compiled correctly.  And when I typed "java T/test2", I
got the output from the constructor of test1.

No PTFs, no workarounds.  Works just the way it's supposed to.

PC2

-----Original Message-----
From: Mike Silvers [mailto:msilvers@hbs-inc.com]
Sent: November 15, 2001 13:40
To: Java400L List
Subject: Package problems


Hi all.  I don't know if you remember, but a few weeks ago I posted a
problem with using the javac command on a V5R1 box using the jdk 1.3.
Well...I received the latest cume, loaded it and IPL'ed.  I was hoping that
this would resolve my problem.  It didn't.  I have narrowed down the
problem.  Apparently the java compiler on the 400 is not recognizing the
package statement when compiling class files.  I have two classes, one being
dependent on the other.  Each have the package statement defining the same
package.  When I compile the first one all works well.  When I attempt to
compile the second one, the java compiler will not recognize the first class
that I just compiled!  When I remove the package statements from both, all
works fine again.  It is definitely not a classpath or path problem.  Does
anyone else have the same problem...and is there a PTF or "work-around"?

Thanks

Mike

================================

Mike Silvers
AS/400 Senior Programmer/Analyst
AS/400 IBM Certified RPG IV Developer
AS/400 IBM Certified Solutions Expert
Hainey Business Systems
8 E. Canal St
Dover, PA 17315
Branch Office:  (410) 397-8739
Phone:  (800) 932-3380
Fax:  (717) 292-9474
Web: http://www.hbs-inc.com
________________________________
Providing E-Commerce, EDI, AS/400
Development and related services
nationwide.
================================


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.