java kompilacja helloword

0

Witam chcialbym sie dowiedziec dlaczego ten programik nie chce mi sie skomilowac
po kompilacji wyskakuje mi cos takiego :

"Exception in thread "main" java.lang.NoClassDefFoundError:HelloDate

import java.util.*;

public class HelloDate 
{
  public static void main(String[] args)
  {
    System.out.println("Hello, it's: ");
    System.out.println(new Date());
   
  }
} 

pozdrawima!!!!

0

"Exception in thread "main" java.lang.NoClassDefFoundError
Heh... mam ten sam problem jak próbuję odpalić 'deploytool' - narzędzie z J2EE - pytałem faceta prowadzącego zajęcia a on na to "nie wiem" - jedyne, co mi odpowiedział :/
n/c

0

Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp

If you receive this error, java cannot find your bytecode file, HelloWorldApp.class.

One of the places java tries to find your bytecode file is your current directory. So, if your bytecode file is in C:\java, you should change your current directory to that. To change your directory, type the following command at the prompt and press Enter:

cd c:\java

The prompt should change to C:\java>. If you enter dir at the prompt, you should see your .java and .class files. Now enter java HelloWorldApp again.

If you still have problems, you might have to change your CLASSPATH variable. To see if this is necessary, try "clobbering" the classpath with the following command:

set CLASSPATH=

Now enter java HelloWorldApp again. If the program works now, you'll have to change your CLASSPATH variable.

nie chcialo mi sie tlumaczyc ...

0

<ort>nieznam </ort>sie na javie , ale czy <ort>nietrzeba </ort>ustawic zmienych srodowiskowych

0

Hej, musisz ustawic zmienna CLASSPATH i JAVA_HOME (classpath wskazujaca na katalog bin Twojego sdk oraz klas ktore chcesz odpalic, java_home na katalog w ktorym masz sdk (np c:\j2sdk)) Pozdr

1 użytkowników online, w tym zalogowanych: 0, gości: 1