Page 1 of 1
Java compile errors - TextPad only
Posted: Wed May 09, 2001 11:31 am
by Denise
When I tried to compile several Java files including an applet, I get compiler errors stating that the classes referenced in the Java files cannot be resolved.
There is also a Jar file. I get the compiler errors whether or not I include the path to the Jar file in my CLASSPATH. I get them whether or not I extract the Jar file.
The mystery is the files compile perfectly when compiled from the command line. I have the jdk1.3 installed. I thought TextPad interfaced with the javac executable directly. Why would TextPad generate compiler errors, whereas the command line does not? Furthermore, I tried compiling in IBM's Visual Age for Java and it worked fine. I am using TextPad version 4.3.1.
Re: Java compile errors - TextPad only
Posted: Thu May 10, 2001 3:32 pm
by Greg
Denise,
I have had a similar problem with this. I am using the most current version of Java which is Java 1.3.0_02. When I updated it changed the directory from C:\jdk1.3 to C:\jdk1.3.0_02. I changed my CLASSPATH to:
set CLASSPATH .;C:\jdk1.3.0_02\bin;C:\jdk1.3.0_02\lib;C:\Packages
but it still didn't work. I searched in Textpad for a place where I could change where it looked for the Java package, but didn't find it. What I ended up doing is completely uninstalling Textpad (make sure you delete any left over folder etc.) and re-installing it. Fortunately, it is a fairly short process compared to re-installing Visual Studio or something. I have been unable to find anywhere in the Textpad folders or files where you can change where Textpad looks for the JDK directory. This is accomplished during the install process. So, basically, the JDK must be installed BEFORE Textpad or Textpad won't recognize it. Hopefully, this can be addressed in a future release.
I hope this helps.
Greg
Re: Java compile errors - TextPad only
Posted: Sun May 13, 2001 4:03 pm
by Jeff Epstein
The jar file itself must be in the classpath. NOT just the directory in which the jar file exists.
For example, putting this in the classpath:
c:\whatever\classes.jar
is good. But only having:
c:\whatever\
is bad. The jar file will not be recognized in this case. Only *.java files that happen to exist in this directory.
:' )
Jeff
http://www.jeffyjeffy.com/textpad
Re: Java compile errors - TextPad only
Posted: Fri May 18, 2001 11:06 am
by Denise
I found that if I included the dot (.) in my classpath, then the files compiled fine. I did not need to include the Jar file in my classpath.
Stranger yet is when I rebuilt my computer (format, reinstall OS and all software) it corrected the problem. Now I don't have anything in my classpath variable and everything compiles fine.
I think this was due to the fact that previously the JDK was installed before Textpad, whereas when I rebuilt my computer I installed everything in the proper order (JDK first then Textpad).
Denise
Re: Java compile errors - TextPad only
Posted: Thu Jun 14, 2001 2:10 pm
by Kari Warner
I have the exact same problem now when I installed jsdk. The compiler doesnt recognize the package javax. Does any one have any pointers. I did install text pad last!!
Kari
Re: Java compile errors - TextPad only
Posted: Tue Jul 03, 2001 5:07 pm
by matt
Kari,
Do you have the servlet.jar file on your classpath? It needs to be explicitely named.
For example, the following needs to be part of the classpath.
C:\jdk1.3\whatever_directory_it_is_in\servlet.jar