我运行此命令进行编译,它运行成功:
javac -d . -cp .;KarelJRobot.jar StairClimber.java
Run Code Online (Sandbox Code Playgroud)
然后我用它来尝试运行我的类:
java -d –cp .;KarelJRobot.jar StairClimber
Run Code Online (Sandbox Code Playgroud)
我明白了
Error: Could not find or load main class ûcp
Run Code Online (Sandbox Code Playgroud)
这是整个类文件:
import kareltherobot.*;
public class StairClimber {
public static void main(String[ ] args)
{
/* You fill this in */
World.setVisible(true);
}
}
Run Code Online (Sandbox Code Playgroud)
我从这里得到了卡雷尔模拟器:
http://csis.pace.edu/~bergin/KarelJava2ed/KJRDistribution060110.zip
Run Code Online (Sandbox Code Playgroud) 我有一个应用程序,它是一个数字资产管理系统。它显示缩略图。我将这些缩略图设置为可与AWS S3预签名URL一起使用:https ://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURLJavaSDK.html 。这一段代码有效,直到我更改了通过请求处理的项目数量。该应用程序有25、50、100、200的选项。如果我选择100或200,则该过程将失败,并显示“错误:com.amazonaws.AmazonServiceException:请求过多(服务:null;状态代码:429;错误代码:null ;请求ID:null)“
现在的过程如下:执行搜索>通过返回该对象的预签名URL的方法运行每个对象键。
我们通过Elastic Container Service运行此应用程序,该服务允许我们通过ContainerCredentialsProvider提取凭据。
相关代码进行审查:
String s3SignedUrl(String objectKeyUrl) {
// Environment variables for S3 client.
String clientRegion = System.getenv("REGION");
String bucketName = System.getenv("S3_BUCKET");
try {
// S3 credentials get pulled in from AWS via ContainerCredentialsProvider.
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withRegion(clientRegion)
.withCredentials(new ContainerCredentialsProvider())
.build();
// Set the pre-signed URL to expire after one hour.
java.util.Date expiration = new java.util.Date();
long expTimeMillis = expiration.getTime();
expTimeMillis += 1000 * 60 * 60;
expiration.setTime(expTimeMillis);
// Generate the presigned …Run Code Online (Sandbox Code Playgroud) java amazon-s3 amazon-web-services aws-sdk http-status-code-429