Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
java classpath ??
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Alex_K
n00b
n00b


Joined: 12 Aug 2002
Posts: 57

PostPosted: Fri Oct 18, 2002 4:31 pm    Post subject: java classpath ?? Reply with quote

ich habe folgendes problem:

ich habe eine test.jre datei, in einem programm importiert wird (import test.*). wenn ich nun das programm "compilieren" will (mit javac programm.java) kommt folgende fehlermeldung:
programm.java:1: package test does not exist

das heißt es wurde die test.jar nicht gefunden.

unter RH7.2 hab ich die test.jar einfach in das $JAVA_HOME/jre/lib/ext/ kopiert, und dann hat es funktioniert. hab jetzt das gleiche gemacht, aber da kommt die fehlermeldung.
ich hab auch schon versucht in den $CLASSPATH das ext verzeichnis einzufügen, aber das löst das problem auch nicht ....
Back to top
View user's profile Send private message
ajordan
Guru
Guru


Joined: 10 Sep 2002
Posts: 320
Location: Hannover / Germany

PostPosted: Sat Oct 19, 2002 7:47 am    Post subject: Reply with quote

Hi Alex,

Das mit der Extension .jre ist mir nicht ganz klar (geht nicht auch .class?). Ich habe in $CLASSPATH nur das aktuelle Verzeichnis hinzugefuegt und kann so alle Java-Programme ausfuehren und compilieren.
Wenns damit keinen Erfolg gibt, liegt es sicherlich nicht an den Umgebungsvariablen, sondern irgendwo im Quellcode begraben.

Alex
_________________
http://spitfire.homelinux.net/
http://spitfire.spittix.de/

GNU/LinuX mobile Dokumentation
Back to top
View user's profile Send private message
Alex_K
n00b
n00b


Joined: 12 Aug 2002
Posts: 57

PostPosted: Sat Oct 19, 2002 8:44 am    Post subject: Reply with quote

eine am programm liegt es sicher nicht.
es hat sich mal compilieren lassen.
die test.jar (nicht jre), ist eine class die das programm verwenden soll, doch der compiler findet die datei einfach nicht ...
Back to top
View user's profile Send private message
Dimitri
Guru
Guru


Joined: 24 Jul 2002
Posts: 373
Location: Niederbayern/Germany

PostPosted: Sat Oct 19, 2002 11:35 am    Post subject: Reply with quote

Hi,
also zuerst eine Frage: Hast Du java nach den Gentoo Installationsanleitungen installiert?
Und dann noch eine Frage: Hast Du zwei Javaversionen auf dem Rechner? Nicht das Du das jar in das falsche Verzeichnis gelegt hast.

Dim
Back to top
View user's profile Send private message
Alex_K
n00b
n00b


Joined: 12 Aug 2002
Posts: 57

PostPosted: Sat Oct 19, 2002 1:56 pm    Post subject: Reply with quote

ja, ich habs na der anleitung installiert ...
ja, ich hab auch 2 java versionen drauf. hab aber die jar datei schon in die jre/lib/ext verzeichnisse beider versionen kopiert.
ich hab auch schon versuch die verschiedenen java versionen zu verwenden (d.h. mit java-config die vm geändert) komm aber immer aufs gleiche problem ...
Back to top
View user's profile Send private message
Dimitri
Guru
Guru


Joined: 24 Jul 2002
Posts: 373
Location: Niederbayern/Germany

PostPosted: Sat Oct 19, 2002 2:54 pm    Post subject: Reply with quote

Du kopierst es ins jre Verzeichniss?
Wenn dann doch eher in /opt/deinjdk/lib oder?

Dim
Back to top
View user's profile Send private message
Alex_K
n00b
n00b


Joined: 12 Aug 2002
Posts: 57

PostPosted: Sat Oct 19, 2002 3:35 pm    Post subject: Reply with quote

dort hab ich sie auch schon drinnen gehabt.
ich hab die datei schon in ziemlich jedem verzeichnis gehabt:
$JAVA_HOME/lib
$JAVA_HOME/jre/lib
$JAVA_HOME/jre/lib/ext
...
..
.

hab aber noch nicht das richtige gefunden ...
Back to top
View user's profile Send private message
Alex_K
n00b
n00b


Joined: 12 Aug 2002
Posts: 57

PostPosted: Sat Oct 19, 2002 4:42 pm    Post subject: Reply with quote

ich hab schon die lösung gefunden:

Quote:

* For a .jar or .zip file that contains .class files, the class path ends with the name of the .zip or .jar file.


also ich hab jetzt im $CLASSPATH die datei selber angegeben, und dann hats funktioniert ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum