?
Solved

javac namespace issue

Posted on 2005-04-12
6
Medium Priority
?
522 Views
Last Modified: 2013-11-23
Hi There,
i've been compiling some code on windows java 1.5 and then on solaris with java 1.4 and i'm having some issues which i need education on. I am compiling two class, both of which are in the same package but are in different files.  The first class CheckMappingStore needs to be compiled first, and on both servers compiles ok.  The second file Check compiles ok in a windows environment, but on the solaris environrmnent it fails as it cannot find CheckMappingStore.

Why the difference between the servers, and what do i ned to do to solve them?

Windows:

C:\classes>javac hall\CheckMappingStore.java
C:\classes>javac hall\Check.java

Solaris:

bash-2.05b$ javac hall/CheckMappingStore.java
bash-2.05b$ javac hall/Check.java
hall/Check.java:275: cannot resolve symbol
symbol  : class CheckMappingStore
location: class hall.Check
                CheckMappingStore Mapping =       new CheckMappingStore();
                ^
halll/Check.java:275: cannot resolve symbol
symbol  : class CheckMappingStore
location: class hall.Check
                CheckMappingStore Mapping =       new CheckMappingStore();
                                                            ^
2 errors

0
Comment
Question by:Peewee
  • 4
6 Comments
 
LVL 13

Accepted Solution

by:
Webstorm earned 200 total points
ID: 13764098
try:

bash-2.05b$ javac -classpath . hall/CheckMappingStore.java
bash-2.05b$ javac -classpath . hall/Check.java
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 13764123
because . is probably already in your classpath on windows, but not on solaris.
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 13764140
maybe you should also add the hall diretory :
    javac -classpath .;hall hall/Check.java
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:ashok3sep
ID: 13764989
i think you have to use the other slash to search in the hall directory

javac hall\CheckMappingStore.java
javac hall\Check.java

regards,

Freedom
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 13770175
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 13770249
:-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month16 days, 17 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question