small medium large xlarge

Joeatjhouse_pragsmall
12 Oct 2014, 20:29
Jodessiah Sumpter (3 posts)

Hi,

For some reason neither the EZPlugin nor the Canary libs are not found when I run the NameCow and HelloWorldEZ scripts. I followed the instructions and see the EZPlugin in the server lib folder. The HelloWorld script works so I know the Canary jar file is found. Anyway here is the error I’m seeing:

Compiling with javac… src\helloworld\HelloWorld.java:10: error: package net.canarymod.plugin does not exist import net.canarymod.plugin.Plugin; ^ src\helloworld\HelloWorld.java:11: error: package net.canarymod.logger does not exist import net.canarymod.logger.Logman; ^ src\helloworld\HelloWorld.java:12: error: package net.canarymod does not exist import net.canarymod.Canary; ^ src\helloworld\HelloWorld.java:13: error: package net.canarymod.commandsys does not exist import net.canarymod.commandsys.*;

src\helloworld\HelloWorld.java:14: error: package net.canarymod.chat does not ex ist import net.canarymod.chat.MessageReceiver; ^ src\helloworld\HelloWorld.java:15: error: package com.pragprog.ahmine.ez does no t exist import com.pragprog.ahmine.ez.EZPlugin; ^ src\helloworld\HelloWorld.java:17: error: cannot find symbol public class HelloWorld extends EZPlugin { ^ symbol: class EZPlugin src\helloworld\HelloWorld.java:22: error: cannot find symbol public void helloCommand(MessageReceiver caller, String[] parameters) { ^ symbol: class MessageReceiver location: class HelloWorld src\helloworld\HelloWorld.java:18: error: cannot find symbol @Command(aliases = { “hello” }, ^ symbol: class Command location: class HelloWorld src\helloworld\HelloWorld.java:24: error: cannot find symbol Canary.instance().getServer().broadcastMessage(msg); ^ symbol: variable Canary location: class HelloWorld 10 errors

Any suggestions?

Thanks! Joe

Andy-talking_pragsmall
13 Oct 2014, 12:37
Andrew Hunt (227 posts)

Looks like Java can’t find ~/Desktop/server/CanaryMod.jar. The build.sh script checks to make sure it can find it, so the file is probably there, but for some reason Java doesn’t know it. Make sure your CLASSPATH is not set.

Let us see the directory listing for your server/ and server/lib directories, and the results of the env command.

/\ndy

Generic-user-small
23 Oct 2014, 11:44
Lars Klingenberg (7 posts)

Hi! I have the same problem. How can I fix it? I deleted the java-classpath from Enviorment Variables.

Files in server: CanaryMod.jar lang start_minecraft.bat config lib usercache.json databases logs uuidreverselookup.cfg db plugins worlds eula.txt start_minecraft

Files in server/lib: EZPlugin.jar

It seems that it doent find all the “import”s.

Thanks! Lars

Andy-talking_pragsmall
23 Oct 2014, 13:43
Andrew Hunt (227 posts)

Well it’s pretty straightforward; there’s a setting in the build.sh script called MCSERVER that points to your $HOME/Desktop/server.

HOME should be set to your home directory, underneath which is your Desktop and then the server directory.

As long as HOME is set correctly (beware of spaces in the directory name), and everything is in Desktop/server, it should work just fine.

/\ndy

Generic-user-small
28 Oct 2014, 11:21
Lars Klingenberg (7 posts)

I get this:

src\namecow\NameCow.java:2: error: package net.canarymod.plugin does not exist import net.canarymod.plugin.Plugin; ^ src\namecow\NameCow.java:3: error: package net.canarymod.logger does not exist import net.canarymod.logger.Logman; ^ src\namecow\NameCow.java:4: error: package net.canarymod does not exist import net.canarymod.Canary; ^ src\namecow\NameCow.java:5: error: package net.canarymod.commandsys does not exi st import net.canarymod.commandsys.*;

src\namecow\NameCow.java:6: error: package net.canarymod.chat does not exist import net.canarymod.chat.MessageReceiver; ^ src\namecow\NameCow.java:7: error: package net.canarymod.api.entity.living.human oid does not exist import net.canarymod.api.entity.living.humanoid.Player; ^ src\namecow\NameCow.java:8: error: package com.pragprog.ahmine.ez does not exist

import com.pragprog.ahmine.ez.EZPlugin; ^ src\namecow\NameCow.java:9: error: package net.canarymod.api.factory does not ex ist import net.canarymod.api.factory.EntityFactory; ^ src\namecow\NameCow.java:10: error: package net.canarymod.api.entity does not ex ist import net.canarymod.api.entity.EntityType; ^ src\namecow\NameCow.java:11: error: package net.canarymod.api.entity.living.anim als does not exist import net.canarymod.api.entity.living.animals.Cow; ^ src\namecow\NameCow.java:13: error: cannot find symbol public class NameCow extends EZPlugin { ^ symbol: class EZPlugin src\namecow\NameCow.java:19: error: cannot find symbol public void namecowCommand(MessageReceiver caller, String[] parameters) { ^ symbol: class MessageReceiver location: class NameCow src\namecow\NameCow.java:15: error: cannot find symbol @Command(aliases = { “namecow” }, ^ symbol: class Command location: class NameCow src\namecow\NameCow.java:20: error: cannot find symbol if (caller instanceof Player) { ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:21: error: cannot find symbol Player me = (Player)caller; ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:21: error: cannot find symbol Player me = (Player)caller; ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:23: error: cannot find symbol Cow ku = (Cow)SpawnEntityLiving(me.getLocation(), EntityType.COW ); ^ symbol: class Cow location: class NameCow src\namecow\NameCow.java:23: error: cannot find symbol Cow ku = (Cow)SpawnEntityLiving(me.getLocation(), EntityType.COW ); ^ symbol: class Cow location: class NameCow src\namecow\NameCow.java:23: error: cannot find symbol Cow ku = (Cow)SpawnEntityLiving(me.getLocation(), EntityType.COW ); ^ symbol: variable EntityType location: class NameCow

In busybox I can use ~/Desktop/server with no problems.. I have tried to change the build.sh file, but it doesnt seem to work…

server-folder lies in: “C:\Users\cxp0\Desktop\server”. I have tried putting it in “$HOME” with / instead of \, but still doent work….

myplugins and server is on the Desktop.

build.sh: added HOME=”C:/Users/cxp0”
HOME=”C:/Users/cxp0”
${MCSERVER:=”$HOME”/Desktop/server}

Thanks :)

Andy-talking_pragsmall
28 Oct 2014, 12:29
Andrew Hunt (227 posts)

Could you please post your operating system version, and the results of the “env” command?

$ env

Also, try setting MCSERVER without the conditional, like this:

MCSERVER=C:/Users/cxp0/Desktop/server

thanks!

/\ndy

Generic-user-small
28 Oct 2014, 15:02
Lars Klingenberg (7 posts)

Using Windows 7 Enterprise.

env: ~ $ env CM-CUSTOMERID=TKE FP_NO_HOST_CHECK=NO USER=cxp0 CM-CUSTOMERSHORTNAME=TK_Elev PROGRAMFILES=C:/Program Files (x86) LOGONSERVER=//A03A1-A10A05 UATDATA=C:/WINDOWS/CCM/UATData/D9F8C395-CAB8-491d-B8AC-179A1FE1BE77 READYAPPS=C:/SWTOOLS/ReadyApps PROGRAMW6432=C:/Program Files ALLUSERSPROFILE=C:/ProgramData SHLVL=1 HOME=C:/Users/cxp0 SYSTEMDRIVE=C: PROMPT=$P$G CM-CUSTOMERGROUPID=TKAG USERDNSDOMAIN=TKE.LOCAL PROGRAMFILES(X86)=C:/Program Files (x86) PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 6 Stepping 3, AuthenticAMD PUBLIC=C:/Users/Public PROCESSOR_REVISION=0603 WINDOWS_TRACING_LOGFILE=C:/BVTBin/Tests/installpackage/csilogfile.log USERDOMAIN=TKE CM-OSSUBROLE=OfficeClientx64CC CM-OSROLE=CorpClientx64 PSMODULEPATH=C:/WINDOWS/system32/WindowsPowerShell/v1.0/Modules/ PROCESSOR_ARCHITECTURE=x86 LOGNAME=cxp0 TEMP=C:/Users/cxp0/AppData/Local/Temp USERNAME=cxp0 COMMONPROGRAMFILES=C:/Program Files (x86)/Common Files WINDOWS_TRACING_FLAGS=3 LOCALAPPDATA=C:/Users/cxp0/AppData/Local COMMONPROGRAMW6432=C:/Program Files/Common Files WINDIR=C:/WINDOWS SESSIONNAME=Console PATH=C:/ProgramData/Oracle/Java/javapath;C:/Program Files/Common Files/Microsoft Shared/Windows Live;C:/Program Files (x86)/Common Files/Microsoft Shared/Window s Live;C:/Program Files (x86)/AMD APP/bin/x86_64;C:/Program Files (x86)/AMD APP/ bin/x86;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/WINDOWS/Syste m32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/ATI Technologies/ATI.ACE/Core -Static;C:/SWTOOLS/ReadyApps;C:/Program Files (x86)/Java/jre6/bin;C:/Program Fil es (x86)/QuickTime/QTSystem/;C:/Program Files (x86)/Windows Live/Shared;C:/Progr am Files/Java/jdk1.8.0_20/bin OS=Windows_NT NUMBER_OF_PROCESSORS=2 USERPROFILE=C:/Users/cxp0 COMMONPROGRAMFILES(X86)=C:/Program Files (x86)/Common Files TMP=C:/Users/cxp0/AppData/Local/Temp HOMESHARE=//Tke-users001-data-server/tke-users001$/9999/CXP0 CM-CUSTOMERFULLNAME=Trondheim Kommune Elev APPDATA=C:/Users/cxp0/AppData/Roaming SHELL=/bin/sh PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC CM-OSSUBROLENAME=Office Client CM-OSROLENAME=Corporate Client SYSTEMROOT=C:/WINDOWS PROGRAMDATA=C:/ProgramData PWD=C:/Users/cxp0 HOMEDRIVE=H: HOMEPATH=/ COMSPEC=C:/WINDOWS/system32/cmd.exe COMPUTERNAME=TKES130890 QTJAVA=C:/Program Files (x86)/Java/jre7/lib/ext/QTJava.zip AMDAPPSDKROOT=C:/Program Files (x86)/AMD APP/ PROCESSOR_LEVEL=16 PROCESSOR_ARCHITEW6432=AMD64 ~ $

The last one didnt work…

Link to my desktop-files: https://drive.google.com/file/d/0B1W2wWVlJLS-X0ZlN2g0N0szWEE/view?usp=sharing

Lars

Andy-talking_pragsmall
28 Oct 2014, 18:46
Andrew Hunt (227 posts)

Ah, seeing the code helps.

There’s nothing wrong with the build system, you just have two typo’s in the code.

The import for Cow should be:

import net.canarymod.api.entity.living.animal.Cow;

(not animals, but animal, singular)

Also, the call to spawn the entity should be:

spawnEntityLiving

with a lower-case ‘s’, not SpawnEntityLiving as you have it.

I fixed those two problems in your code, and it compiles fine for me now.

/\ndy

Generic-user-small
28 Oct 2014, 21:43
Lars Klingenberg (7 posts)

Aaaahh.. Typo…. I will check it out tomorrow. I did this with my class of 12 students and I got the typo my self and said to my students to fix it too. And I can see now that some didnt, but I copied your “HelloWorld.java” file on to my students computer and got the same errors… I will let you know tomorrow how it goes.

Thanks a lot for your help and your awesome book!

Generic-user-small
29 Oct 2014, 14:35
Lars Klingenberg (7 posts)

Now I changed the typos, but it still doent work:

~/Desktop/myplugins/NameCow $ ./build.sh Compiling with javac… src\namecow\NameCow.java:2: error: package net.canarymod.plugin does not exist import net.canarymod.plugin.Plugin; ^ src\namecow\NameCow.java:3: error: package net.canarymod.logger does not exist import net.canarymod.logger.Logman; ^ src\namecow\NameCow.java:4: error: package net.canarymod does not exist import net.canarymod.Canary; ^ src\namecow\NameCow.java:5: error: package net.canarymod.commandsys does not exi st import net.canarymod.commandsys.*;

src\namecow\NameCow.java:6: error: package net.canarymod.chat does not exist import net.canarymod.chat.MessageReceiver; ^ src\namecow\NameCow.java:7: error: package net.canarymod.api.entity.living.human oid does not exist import net.canarymod.api.entity.living.humanoid.Player; ^ src\namecow\NameCow.java:8: error: package com.pragprog.ahmine.ez does not exist

import com.pragprog.ahmine.ez.EZPlugin; ^ src\namecow\NameCow.java:9: error: package net.canarymod.api.factory does not ex ist import net.canarymod.api.factory.EntityFactory; ^ src\namecow\NameCow.java:10: error: package net.canarymod.api.entity does not ex ist import net.canarymod.api.entity.EntityType; ^ src\namecow\NameCow.java:11: error: package net.canarymod.api.entity.living.anim al does not exist import net.canarymod.api.entity.living.animal.Cow; ^ src\namecow\NameCow.java:14: error: cannot find symbol public class NameCow extends EZPlugin { ^ symbol: class EZPlugin src\namecow\NameCow.java:20: error: cannot find symbol public void namecowCommand(MessageReceiver caller, String[] navn) { ^ symbol: class MessageReceiver location: class NameCow src\namecow\NameCow.java:16: error: cannot find symbol @Command(aliases = { “namecow” }, ^ symbol: class Command location: class NameCow src\namecow\NameCow.java:21: error: cannot find symbol if (caller instanceof Player) { ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:22: error: cannot find symbol Player me = (Player)caller; ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:22: error: cannot find symbol Player me = (Player)caller; ^ symbol: class Player location: class NameCow src\namecow\NameCow.java:24: error: cannot find symbol Cow ku = (Cow)spawnEntityLiving(me.getLocation(), EntityType.COW); ^ symbol: class Cow location: class NameCow src\namecow\NameCow.java:24: error: cannot find symbol Cow ku = (Cow)spawnEntityLiving(me.getLocation(), EntityType.COW); ^ symbol: class Cow location: class NameCow src\namecow\NameCow.java:24: error: cannot find symbol Cow ku = (Cow)spawnEntityLiving(me.getLocation(), EntityType.COW); ^ symbol: variable EntityType location: class NameCow 19 errors ~/Desktop/myplugins/NameCow $

And now I took the NameCow.java-file from my computer to my students computer and it didnt work hos his, but on mine.

Generic-user-small
29 Oct 2014, 14:55
Lars Klingenberg (7 posts)

Now I took all your plugins (it works on my mac) and tried with them on my students Windows, but still doesnt work…

I have no trouble compiling regular .java-files.

Generic-user-small
30 Oct 2014, 15:15
Lars Klingenberg (7 posts)

I gave up… Thanks a lot for the help :)

Generic-user-small
12 Mar 2016, 16:31
Julio Garcia (1 post)

For future reference I am running the script using Windows 10 and the git bash shell. In order to get it to work there is a line on the build.sh script that test if it is windows nt and sets the OSPS variable to “;”

To get it to work I had to remove the conditional and simply set: OSPS=":"

and now it works

Generic-user-small
16 Jan 2017, 21:49
Alessandro (1 post)

Hi, I’m on windows 8.1, but I downloaded the cygwin Unix terminal. I tried to launch the build.sh script, but I had the following errors: $ ./build.sh Compiling with javac… src\helloworld\HelloWorld.java:10: error: package net.canarymod.plugin does not exist import net.canarymod.plugin.Plugin;//(2) ^ src\helloworld\HelloWorld.java:11: error: package net.canarymod.logger does not exist import net.canarymod.logger.Logman; ^ src\helloworld\HelloWorld.java:12: error: package net.canarymod does not exist import net.canarymod.Canary; ^ src\helloworld\HelloWorld.java:13: error: package net.canarymod.commandsys does not exist import net.canarymod.commandsys.*;

src\helloworld\HelloWorld.java:14: error: package net.canarymod.chat does not ex ist import net.canarymod.chat.MessageReceiver; ^ src\helloworld\HelloWorld.java:16: error: cannot find symbol public class HelloWorld extends Plugin implements CommandListener {//(3) ^ symbol: class Plugin src\helloworld\HelloWorld.java:16: error: cannot find symbol public class HelloWorld extends Plugin implements CommandListener {//(3) ^ symbol: class CommandListener src\helloworld\HelloWorld.java:18: error: cannot find symbol public static Logman logger; ^ symbol: class Logman location: class HelloWorld src\helloworld\HelloWorld.java:43: error: cannot find symbol public void helloCommand(MessageReceiver caller, String[] parameters) {//(5) ^ symbol: class MessageReceiver location: class HelloWorld src\helloworld\HelloWorld.java:39: error: cannot find symbol @Command(aliases = { “hello” },//(4) ^ symbol: class Command location: class HelloWorld src\helloworld\HelloWorld.java:21: error: cannot find symbol logger = getLogman(); ^ symbol: method getLogman() location: class HelloWorld src\helloworld\HelloWorld.java:24: error: method does not override or implement a method from a supertype @Override ^ src\helloworld\HelloWorld.java:28: error: cannot find symbol Canary.commands().registerCommands(this, this, false); ^ symbol: variable Canary location: class HelloWorld src\helloworld\HelloWorld.java:29: error: cannot find symbol } catch (CommandDependencyException e) { ^ symbol: class CommandDependencyException location: class HelloWorld src\helloworld\HelloWorld.java:35: error: method does not override or implement a method from a supertype @Override ^ src\helloworld\HelloWorld.java:45: error: cannot find symbol Canary.instance().getServer().broadcastMessage(msg); ^ symbol: variable Canary location: class HelloWorld 16 errors

Could you please help?

Thanks, Alessandro

You must be logged in to comment