• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sip[mple problem any help appreciated

 
deepa nari
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have windows98 and my tomcat runs fine.
I have installed sdk in in c:/j2sdk1.4.1 and my tomcat in c:/tomcat4.1
My tomcat runs fine.
But problem in running a java file in MSDOS.
I created a folder called testing under c:
c:/testing and try to run a simple java file in it
Lets say test.java
public class test {
public static vod main(String[] args) {
System.out.println("hello");
}
}
when i try to compile using javac test.java in MSDOS
i get error as Bad command or file name
 
AJAY RANA
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use SET PATH to point to javac.exe in ur jdk folder or JDK of tomcat !
i.e. either u can use
set path=%path%c:/j2sdk1.4.1/bin;
or instead give path of jdk/bin for tomcat directory hierarchy.
(try setting this in environmemt variable to make it permanent).
Hope this helps !
Regards,
Ajay Rana
SCJP2,SCWCD
[ December 03, 2002: Message edited by: AJAY RANA ]
 
deepa nari
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did it in autoexec.bat but no use.
still the same error??
How do i set it to permanent??
 
Maha Annadurai
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At command prompt, type the following commands.
At the end check what 'SET' command displays. Also pl. check if it has PATH set to your jdk's bin dir.
cd \
autoexec.bat
set
Regards
Maha Anna
 
Don Bosco
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi deepa,
even i'm facing the same problem. my tomcat is running fine. i couldn't compile the java classes. cannot resolve symbol error occurs for all the servlet api.
guys, any help is greatly appreciated.
 
Don Bosco
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well these are my environment variables
CATALINA_HOME=c:\Program Files\Apache Group\Tomcat 4.1
CLASS_PATH=c:\Program Files\Apache Group\Tomcat 4.1\common\lib\servlet.jar
JAVA_HOME=c:\j2sdk1.4.1_01
PATH=c:\j2sdk1.4.1_01\bin
is there anything i need to set?
 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don
i guess it'll be(the 2nd environment variable) CLASSPATH insted of CLASS_PATH.
adieu,
c.
 
John Pritchard
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you guys have the j2ee.jar from the J2EE SDK in your class path? you'll need that for command line compiles with J2EE imports.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic