我正在尝试在Windows 10中运行JAR,但出现以下错误。
语言:Scala,
IDE :Eclipse,
构建工具:Gradle
Java版本:1.8。
使用的命令:import boto3, re
from sagemaker import get_execution_role
role = get_execution_role()
# make a tar ball of the model data files
import tarfile
with tarfile.open('model.tar.gz', mode='w:gz') as archive:
archive.add('export', recursive=True)
# create a new s3 bucket and upload the tarball to it
import sagemaker
sagemaker_session = sagemaker.Session()
inputs = sagemaker_session.upload_data(path='model.tar.gz', key_prefix='model')
from sagemaker.tensorflow.model import TensorFlowModel
sagemaker_model = TensorFlowModel(model_data = 's3://' + sagemaker_session.default_bucket() + '/model/model.tar.gz',
role = role,
framework_version = '1.12',
entry_point = 'train.py',
py_version='py3')
%%time
#here I fail to deploy the model and get the error message
predictor = sagemaker_model.deploy(initial_instance_count=1,
instance_type='ml.m4.xlarge')
但是该程序在eclipse中成功运行,并且使用gradle build构建了JAR。
线程主java.lang.NoClassDefFoundError中的异常:scala / Predef $ 在com.First $ .main(First.scala:6)处com.First.main(First.scala)引起 创建人:java.lang.ClassNotFoundException:scala.Predef $位于 java.net.URLClassLoader.findClass(未知源),网址为 java.lang.ClassLoader.loadClass(未知源) sun.misc.Launcher $ AppClassLoader.loadClass(未知源)在 java.lang.ClassLoader.loadClass(未知源)...还有2个