Hi All,
I am facing a surprising problem. I have 2
java class files. I write the import statement for second one in the first one. There is no package & these are in the same directory. I have compiled the second one. But when I try to compile the First one. Javac throws error at import statement like below :
D:\Clubs\oct\6>javac -d . ManojTest.java
ManojTest.java:1: '.' expected
import SessionBean;
^
1 error
My Java Files are as below :
import SessionBean;
public class ManojTest
{
public static void main(
String args[])
{
}
}
//ManojTest.java
******************************
public class SessionBean
{
public static void main(String args[])
{
}
}
//SessionBean.java
I have compiled SessionBean.java successfully but when I try to compile ManojTest.java I get error mentioned above.
However this probelm comes when I use j2se 1.4.2.. but works in j2se 1.3.1..
Another way could be I use package structure.
But I can't do any of these, as I have to port my big project to j2se1.4.2.. from j2se1.3.1.. (Live project is running on
Tomcat).
Problems is similar in Unix & Windows both.
Is this javac compiler issue or there is some setting which I can make.
I have already included . (dot) in PATH & CLASSPATH environment varibales.
Please help me out if there is any way around this, as i am stuck up in between
thank you
Manoj