I have got an error when trying to built my project, I don’t anderstand it :
ant -f /home/christian/Jmonkey_projects/CM_Game clean jar
init:
deps-clean:
Updating property file: /home/christian/Jmonkey_projects/CM_Game/build/built-clean.properties
Deleting directory /home/christian/Jmonkey_projects/CM_Game/build
clean:
Building jar: /home/christian/Jmonkey_projects/CM_Game/build/assets.jar
init:
deps-jar:
Updating property file: /home/christian/Jmonkey_projects/CM_Game/build/built-jar.properties
Created dir: /home/christian/Jmonkey_projects/CM_Game/build/classes
Created dir: /home/christian/Jmonkey_projects/CM_Game/build/empty
/home/christian/Jmonkey_projects/CM_Game/nbproject/build-impl.xml:914: The following error occurred while executing this line:
/home/christian/Jmonkey_projects/CM_Game/nbproject/build-impl.xml:305: Class not found: javac1.8
BUILD FAILED (total time: 1 second)
have you an idea about it? Thank you for your help
I have made another project, with only the default SimpleApplication in it, and I have the same message. Yet the game does compile and run, just does not built for deployment
I am going to post what I have got at the line 305 and 914, but I am affraid it is not revelant.
Thank you for your answer, I didn’t know “javac1.8” was the name of a class, I thought it was only a signature.
So I have had a look at my system, my OS is Linux. I am trying to see what version of java I have got. When typing “wheris” on a termial, It found java, but not javac, the compiler. I don’t anderstand how Jmonkey succeeds to compile (to “make”) without having javac. Once again my applies run on the JDK environment, I just can’t “built” them.
Well javac is infact rather an application then a class.
Type the following commands to read out your java versions: java -version (Note: it’s only one(!) - ) => JRE Version javac -version => JDK Version.
Mine are both 1.8.0_40.
Note that Java is confusing here as 1.8 means Java 8
If you don’t have javac you might have a naming/linking problem (due to openjdk over proprietary)
Also what is in that Line 305? perhaps you’d have to change javac1.8 to javac there?
As for why jmonkey compiles: Jme only needs java 1.5 (so 1.1.5 in java terms), so it seems like you possibly simply address the wrong compiler?
Do the following: ls -lsh /usr/lib/jvm/java-7-openjdk-amd64/jdk/jdk1.8.0_05/ | grep javac
If that displays an javac (or javac 1.8 executable) you need to ln -s /usr/lib/jvm/..../* /usr/bin
(Look up the syntax, I am uncertain here. Also you might want to only link javac(1.8) to not overwrite another jdk you have running or something)
That’s it!!
You need to use the javac from the bin directory in there.
This either by linking the bin folder to /usr/bin or by editing the BASH PATH in .profile (google it)
I wonder if it’s not possible to specify a path to javac in ant?
from your first line: ant -f /home/christian/Jmonkey_projects/CM_Game clean jar
→ This means that the ant build tool will take the “script” (Makefile) located in …/CM_Game/build.xml
And this shows that ant is known by bash?
But if you need support for ant files, you’d have to wait for a CoreDeveloper or somebody to join in as I don’t know them.
I am happy if it works on keypress^^
I said that bash does not know javac because when I tape “$ whereis javac” at a terminale, it says that it is not known (but java is)
I realise that I have two installations of Java (but both of them have javac in the bin directory) : one into /usr/bin/jmonkey… and another into /usr/bin/… (another path).
I will see that this afternoon. Thank you for your help.
PS 15:51 : no I mistake, the java under /etc/bin points to the one under /usr/lib/jvm/… it’s the same install.
Under /usr/bin I have got this:
java: symbolic link to `/etc/alternatives/java'
javaws: symbolic link to `/etc/alternatives/javaws'
And under /etc/alternatives I have got this:
itweb-settings: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings'
itweb-settings.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/itweb-settings.1.gz'
java: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java'
java.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/java.1.gz'
javaws: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws'
javaws.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/javaws.1.gz'
jexec: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jexec'
jexec-binfmt: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jar.binfmt'
keytool: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/keytool'
keytool.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/keytool.1.gz'
mozilla-javaplugin.so: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so'
orbd: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/orbd'
orbd.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/orbd.1.gz'
pack200: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/pack200'
pack200.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/pack200.1.gz'
policytool: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/policytool'
policytool.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/policytool.1.gz'
rmid: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/rmid'
rmid.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/rmid.1.gz'
rmiregistry: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/rmiregistry'
rmiregistry.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/rmiregistry.1.gz'
servertool: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/servertool'
servertool.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/servertool.1.gz'
tnameserv: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/tnameserv'
tnameserv.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/tnameserv.1.gz'
unpack200: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/unpack200'
unpack200.1.gz: symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/unpack200.1.gz'
As you can see , javac does not appear, I try to add it.
PS 16:11 : instead of adding javac , I have try to add /usr/lib/jvm/java-1.7.0-openjdk-amd64/jdk/jdk1.8.0_05/bin to the path (again, but either before or after the PATH), and it does not work. Nevertheless, javac exists at that directory.
I don’t anderstand, I add /usr/lib/jvm/java-7-openjdk-amd64/jdk/jdk1.8.0_05/bin to the PATH, and when I do whereis javac, it does find it. I have done the following script:
Javac -version doesn’t work any more. Speaking about cding into the directory, I am affraid this would make other things not work. However I would like to succeed in adding a directory in the PATH, I don’t know why this does not work, it seems that this does not work like in Unix (I use to work with) like in Linux. Or may be it’s a particularity of bash.
I have tried several solutions, none work. I have tried to cd into the directory, or add it in the PATH, also sourcing the command file instead of launching it (doing $ . .<file.sh> ) nothing works.
Another thing : I don’t know how the system find ant because it is only present in a directory that is not in the path.
When I add the directory "/usr/lib/jvm/java-7-openjdk-amd64/jdk/jdk1.8.0_05/bin" to the path, javac is recognized (when typing $ which -a javac I get the file that is used for javac). But the built get the same error message.