我正在尝试使用javaFX从youtube播放视频.这是我的代码
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Media");
Group root = new Group();
Media media = new Media("http://www.youtube.com/watch?v=k0BWlvnBmIE");
MediaPlayer mediaPlayer = new MediaPlayer(media);
mediaPlayer.play();
MediaView mediaView = new MediaView(mediaPlayer);
root.getChildren().add(mediaView);
Scene scene = SceneBuilder.create().width(500).height(500).root(root)
.fill(Color.WHITE).build();
primaryStage.setScene(scene);
primaryStage.show();
}
}
Run Code Online (Sandbox Code Playgroud)
窗口打开但视频无法播放,也不例外.有什么问题,我该如何解决?
谢谢.
我使用带有infinispan s3ping的Wildfly 10在Amazon Web Service上设置了一个集群环境.一切正常.但是单例,应用程序范围对象和计时器分别在每个节点上工作.
我必须在整个集群而不是单个节点上进行这些工作.
实现这一目标的最佳方法是什么?如果可能的话,你能给我一个起点或一个好的教程吗?
我在Wildfly-8上运行了两个项目,每个项目都有两个SSL证书和一个IP.
我发现我应该有一个IP用于一个SSL证书.
但我需要将这两个SSL用于一个IP.我找不到使用Wildfly的方法,但有一种方法可以使用Apache Server.所以,我将Apache Server安装到Wildfly.
我在Apache上听https端口(443)并将其重定向到Wildfly的http端口(我使用8080).它没有任何问题.
我想知道的是什么;
1. Is Apache decrypt request and redirect it to Wildfly?
2. Is it correct way to do it or I have done it by chance?
3. Does this method create a security hole?
Run Code Online (Sandbox Code Playgroud)
我用Google搜索了一些,但我找不到满意的答案.
谢谢你的回复.
我得到"decleration没有声明任何[-fpermissive]错误"; 这是我的代码;
#ifndef CAMERA_H
#define CAMERA_H
#include "Vector.h"
#include <string>
using namespace std;
class Camera
{
private:
int id;
float position[3];
Vector gaze;
Vector up;
float left;
float right;
float bottom;
float top;
float near;
float far;
int type;
public:
Camera(int i,string c, string g, string u, string f, string t);
int getID() {return id; }
float* getPosition() { return position; }
Vector getGaze() { return gaze; }
Vector getUp() { return up; }
float getLeft() {return left;}
float getRight() …Run Code Online (Sandbox Code Playgroud)