Erro ao compilar

3 respostas
Adolpho_Alves

Ola estou tentando compilar um codigo java com um bat da seguinte forma:
C:\bea\jdk142_05\bin>javac “C:\Arquivos de programas\Preparando_Projeto\eclipse\eclipse\Projeto\MMSHelpDesk.java”

e da o seguinte erro:

C:\Arquivos de programas\Preparando_Projeto\eclipse\eclipse\Projeto\MMSHelpDesk.java:1: pack

age visao does not exist

import visao.TelaLogin;

^

C:\Arquivos de programas\Preparando_Projeto\eclipse\eclipse\Projeto\MMSHelpDesk.java:6: cann

ot resolve symbol

symbol : class TelaLogin

location: class MMSHelpDesk

TelaLogin tela = new TelaLogin();

^

C:\Arquivos de programas\Preparando_Projeto\eclipse\eclipse\Projeto\MMSHelpDesk.java:6: cann

ot resolve symbol

symbol : class TelaLogin

location: class MMSHelpDesk

TelaLogin tela = new TelaLogin();

^

3 errors

A classe MMS HelpDesk é so o metodo MAIN

import visao.TelaLogin;

public class MMSHelpDesk {

public static void main(String[] args){

TelaLogin tela = new TelaLogin();

tela.setVisible(true);

}

}

Codigo ta rodando direitinho na IDE, alguem pode me ajudar??

3 Respostas

RobsonFagundes

tenta compila o pacote inteiro …
ta dando erro por causa das dependencias “Imports”
axo q seja isso tenta ai pra ver…
T+

Adolpho_Alves

RobsonFagundes:
tenta compila o pacote inteiro …
ta dando erro por causa das dependencias “Imports”
axo q seja isso tenta ai pra ver…
T+

Desculpa mas como eu faço isso???

RobsonFagundes

veja:

There are (at least) three ways to solve this problem:

  1. Always compile a package from the parent directory. For example, compile List.java from Javadir, rather than from Javadir/ListPkg; in the Javadir directory, type:
    javac ListPkg/List.java

  2. Always compile all files in a package at the same time; for example, in the directory Javadir/ListPkg type:
    javac *.java

  3. Make a circular link from the package subdirectory to itself; for example, in the directory Javadir/ListPkg type:
    ln -s . ListPkg

look:
http://pages.cs.wisc.edu/~hasti/cs368/JavaTutorial/NOTES/Packages.html
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html
http://www.guj.com.br/posts/list/94602.java

T+

Criado 17 de dezembro de 2008
Ultima resposta 17 de dez. de 2008
Respostas 3
Participantes 2