kaz-Anova / StackNet

StackNet is a computational, scalable and analytical Meta modelling framework
MIT License
1.32k stars 344 forks source link

Error: Could not find or load main class –jar #8

Closed vkuznet closed 7 years ago

vkuznet commented 7 years ago

Hi, I want to try your package, but I can't run it on Linux:

java -jar StackNet.jar train sparse=false has_head=false model=model pred_file=pred.csv train_file=train.csv params=stakcnet.txt verbose=true threads=7 metric=logloss stackdata=false seed=1 folds=5

it gives immediately the following error:

Error: Could not find or load main class –jar

It seems some namespace/classpath issue, could you please either provide instruction how to build jar or specify the namespace/classpath.

Thanks, Valentin.

kaz-Anova commented 7 years ago

Did you try to just copy the jar from the main folder? You don't need to build it.

vkuznet commented 7 years ago

Yes, I tried all scenarios, e.g.

Btw, the java version I have is java version "1.7.0_141" OpenJDK Runtime Environment (rhel-2.6.10.1.el6_9-x86_64 u141-b02) OpenJDK 64-Bit Server VM (build 24.141-b02, mixed mode)

On 0, Marios Michailidis notifications@github.com wrote:

Did you try to just copy the jar from the main folder? You don't need to build it.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/kaz-Anova/StackNet/issues/8#issuecomment-302964266

kaz-Anova commented 7 years ago

I think the answer is in this thread and specifically this comment :

I had this problem when I was trying to run a Class with a 3rd party library. I invoked java like this: java -cp ../third-party-library.jar com.my.package.MyClass; this does not work, instead it is necessary to add the local folder to the class path as well (separated by :, like this: java -cp ../third-party-library.jar:. com.my.package.MyClass, then it should work .

The local folder to the class path should be STACKNET.stacknetrun.runstacknet.class . or Maybe without the STACKNET in the beginning and/or without .class at the end. Could you try something around this area? I am pretty sure there is nothing wrong with the Jar.

vkuznet commented 7 years ago

Hi, yes this trick works, closing the ticket.