Boa tarde.
Estou começando no Java, e estou com um problema
muito de principiante.
Tenho um Win98 e instalei o j2sdk. É a primeiro prog que instala.
Alterei o autoexec e qdo vou no modo DOS,
o javac não funciona de jeito nenhum.
Aparece a mensagem que esse programa não roda no modo DOS.
this program cannot be run inDOS mode
Olha meu autoexec.bat:
SET JAVA_HOME=c:j2sdk
SET PATH=%PATH%;%JAVA_HOME%in
SET CLASSPATH=.;%JAVA_HOME%
SET JAVA_HOME=C:\J2SDK
SET PATH=%PATH%;C:\j2sdk\bin
SET CLASSPATH=%CLASSPATH%;C:\j2sdk\lib\jre\rt.jar;C:\;.
Agora entre no DOS, execute o comando: “c:autoexec.bat”, agora digite, ainda no DOS, o comando “java”, se aparecer um monte de comandos na tela é porque está funcionando.
Obs: c:j2sdk é o cmaninho onde está instalado o compilador e interpretador java …
JeffersonFr, gostaria de agradecer a sua ajuda.
Demorei para responder porque não conseguia acertar.
Mas, pesquisando pela net, achei num site, em ingles,
a resposta e coloco aqui para ajudar outros que também
passarem por este erro.
If you see the following error message
This program cannot be run in DOS mode.
do the following:
Open the MS-DOS shell (Windows/Start/Programs/MS-DOS Prompt).
Right-click on the title bar.
Select Properties.
Choose the Program tab.
Push the Advanced button.
Make sure the item “Prevent MS-DOS-based programs from detecting Windows” is unchecked.
Select OK.
Select OK again.
Exit the MS-DOS shell.
Restart your computer.
If that does not help, the file you have downloaded is probably corrupted. Check its file size against the expected file size listed in these instructions. If they don’t match, try downloading the bundle again.