J
jo
Hallo
I would like to use a cass from a selfmade package.
The papackage contains the files My_Paket.java and My_Paket.class;
in the Directory: D:\JAVA\klassen
package My_Paket;
public class My_Paket
{
public static void showscreen()
{
System.out.println("This comes from My_Paket");
}
}
The methode ausgabe should be used in
D:\JAVA_TEST\MyCall\ Mycall.java
import MyPaket;
public class Mycall
{
public static void main (String args[])
{
System.out.println("hallo");
MyPaket.showscreen();
}
}
I gues my settings were wrong therefore I tried to run java in a batch file:
path= D:\JAVA\bin
set CLASSPATH= .;D\:JAVA\klassen
set path
set classpath
javac.exe Mycall.java
pause
The computer seems not to find the classes - why??
D:\JAVA_TEST\MyCall>set classpath
CLASSPATH= .;D\:JAVA\klassen
D:\JAVA_TEST\MyCall>javac.exe Mycall.java
Mycall.java:1: package MyPaket does not exist
import MyPaket.*;
^
Mycall.java:8: cannot resolve symbol
symbol : variable MyPaket
location: class Mycall
MyPaket.showscreen();
^
2 errors
Any help is appreciated a link to a tutorial with a detailed description
woul also help
Joachim
I would like to use a cass from a selfmade package.
The papackage contains the files My_Paket.java and My_Paket.class;
in the Directory: D:\JAVA\klassen
package My_Paket;
public class My_Paket
{
public static void showscreen()
{
System.out.println("This comes from My_Paket");
}
}
The methode ausgabe should be used in
D:\JAVA_TEST\MyCall\ Mycall.java
import MyPaket;
public class Mycall
{
public static void main (String args[])
{
System.out.println("hallo");
MyPaket.showscreen();
}
}
I gues my settings were wrong therefore I tried to run java in a batch file:
path= D:\JAVA\bin
set CLASSPATH= .;D\:JAVA\klassen
set path
set classpath
javac.exe Mycall.java
pause
The computer seems not to find the classes - why??
D:\JAVA_TEST\MyCall>set classpath
CLASSPATH= .;D\:JAVA\klassen
D:\JAVA_TEST\MyCall>javac.exe Mycall.java
Mycall.java:1: package MyPaket does not exist
import MyPaket.*;
^
Mycall.java:8: cannot resolve symbol
symbol : variable MyPaket
location: class Mycall
MyPaket.showscreen();
^
2 errors
Any help is appreciated a link to a tutorial with a detailed description
woul also help
Joachim