Java 2D Game engine for tile

Can anyone recommend a good Java game engine for developing simple tile-based games? I'm looking for an engine that will allow me to build maps using something like Tiled www.mapeditor.org Slick is exactly what I'm looking for, slick.cokeandcode.com but I can't get it working on Vista-64. The best I can manage is:Can't load IA 32-bit .dll on a AMD 64-bit platform (and this aft

用于平铺的Java 2D游戏引擎

任何人都可以推荐一个好的Java游戏引擎来开发简单的基于图块的游戏吗? 我正在寻找一个引擎,可以让我使用像Tiled www.mapeditor.org这样的东西来构建地图 Slick正是我正在寻找的slick.cokeandcode.com,但我无法使用Vista-64。 我能够管理的最好的方法是:无法在AMD 64位平台上加载IA 32位.dll(下载最新的LWJGL版本后)。 任何人都可以提出类似的东西,可以在64位Vista上运行吗? 我建议购买由David Brackeen撰写的“开

I need to make a SVM in weka to filter documents using Java

I am an absolute beginner. Never made a classifier or anything in weka using Java I have used the interface before. Basically I am kind of lost I've looked at the filter class for weka and played around with it a little. My documents are text documents and I need to separate them into 2 categories. I'm not sure how I define the categories or how I load the documents into an IDE to be

我需要在weka中使用SVM来过滤使用Java的文档

我是一个绝对的初学者。 从未使用Java在Weka中创建分类器或任何内容我之前使用过该接口。 基本上我有点失落我已经看过weka的过滤器类并且稍微玩了一下。 我的文件是文本文件,我需要将它们分成两类。 我不知道如何定义类别或如何将文档加载到IDE中进行分类 :-( 任何帮助/教程或指针将不胜感激。 我发现这个java教程非常有帮助,虽然有很少的在线资源(我发现) http://www.cs.waikato.ac.nz/ml/weka/index_document

Start and stop scheduling task in Spring java

I develop a simple Spring Boot app that consumes REST and writes to DB. I tried a @Scheduled annotation to initiate a task to run it periodically. But the scheduling process starts automaticly, which is not exactly what I want. I need an ability to start and stop a scheduled task from a web page. When a user opens a page he must see a status of a process : Running/Stoped. What is the easy

在java中启动和停止调度任务

我开发了一个简单的Spring Boot应用程序,它使用REST并写入数据库。 我尝试了一个@Scheduled注释来启动一个任务来定期运行它。 但调度过程自动启动,这不完全是我想要的。 我需要能够从网页开始和停止计划任务。 当用户打开一个页面时,他必须看到一个进程的状态:Running / Stoped。 实现它的简单方法是什么? 创建一个新的线程? 如何获得进程的状态? 保存在数据库? 也许smb有一个启动和停止从网页调度任务的例

Reading a List from properties file and load with spring annotation @Value

Similar to this question: http://forum.springsource.org/showthread.php?111992-Loading-a-list-from-properties-file-using-Value-annotation (for which there's no reply on) I want to have a list of values in a .properties file, ie: my.list.of.strings=ABC,CDE,EFG And to load it in my class directly, ie: @Value("${my.list.of.strings}") private List<String> myList; As I understand, an al

从属性文件中读取List并使用Spring注解@Value加载

类似于这个问题:http://forum.springsource.org/showthread.php?111992-Loading-a-list-from-properties-file-using-Value-annotation(对此没有答复) 我想要一个.properties文件中的值列表,即: my.list.of.strings=ABC,CDE,EFG 并直接将其加载到我的课程中,即: @Value("${my.list.of.strings}") private List<String> myList; 据我所知,做这个的另一种方法是将它放在spring配置文件中,并将其作为一个bean引

Downloading a file from spring controllers

I have a requirement where I need to download a PDF from the website. The PDF needs to be generated within the code, which I thought would be a combination of freemarker and a PDF generation framework like iText. Any better way? However, my main problem is how do I allow the user to download a file through a Spring Controller? @RequestMapping(value = "/files/{file_name}", method = RequestMet

从弹簧控制器下载文件

我有一个要求,我需要从网站下载PDF。 PDF需要在代码中生成,我认为这是Freemarker和iText等PDF生成框架的结合。 有更好的方法吗? 但是,我的主要问题是如何让用户通过Spring Controller下载文件? @RequestMapping(value = "/files/{file_name}", method = RequestMethod.GET) public void getFile( @PathVariable("file_name") String fileName, HttpServletResponse response) { try { // get your f

Execute method on startup in spring

Is there any Spring 3 feature to execute some methods when the application starts for the first time? I know that I can do the trick of setting a method with @Scheduled annotation and it executes just after the startup, but then it will execute periodically. Thanks. If by "application startup" you mean "application context startup", then yes, there are many ways to do thi

在春季启动时执行方法

当应用程序第一次启动时,是否有Spring 3的特性来执行某些方法? 我知道我可以使用@Scheduled注释来设置一个方法,它会在启动后立即执行,但它会定期执行。 谢谢。 如果通过“应用程序启动”,你的意思是“应用程序上下文启动”,那么是的,有很多方法可以做到这一点,最简单的(对于单身bean,无论如何)是用@PostConstruct注释你的方法。 看看链接,看看其他选项,但总的来说它们是: 用@PostConstruct注解的方法 afterP

Getting Spring Application Context

Is there a way to statically/globally request a copy of the ApplicationContext in a Spring application? Assuming the main class starts up and initializes the application context, does it need to pass that down through the call stack to any classes that need it, or is there a way for a class to ask for the previously created context? (Which I assume has to be a singleton?) If the object that

获得Spring应用上下文

有没有办法在Spring应用程序中静态/全局地请求一个ApplicationContext的副本? 假设主类启动并初始化应用程序上下文,它是否需要通过调用堆栈向下传递给需要它的任何类,或者是否有方法让类请求先前创建的上下文? (我认为必须是单身?) 如果需要访问容器的对象是容器中的bean,只需实现BeanFactoryAware或ApplicationContextAware接口。 如果容器外部的对象需要访问容器,我已经使用了标准的GoF单例模式作为spring容器

How to stop a scheduled task that was started using @Scheduled annotation?

I have created a simple scheduled task using Spring Framework's @Scheduled annotation. @Scheduled(fixedRate = 2000) public void doSomething() {} Now I want to stop this task, when no longer needed. I know there could be one alternative to check one conditional flag at the start of this method, but this will not stop execution of this method. Is there anything Spring provides to stop @

如何停止使用@Scheduled注释启动的计划任务?

我使用Spring Framework的@Scheduled注释创建了一个简单的计划任务。 @Scheduled(fixedRate = 2000) public void doSomething() {} 现在我想停止这个任务,当不再需要时。 我知道在这个方法开始时可以有一种方法来检查一个条件标志,但是这不会停止执行这个方法。 Spring提供了什么来阻止@Scheduled任务? 选项1:使用后处理器 提供ScheduledAnnotationBeanPostProcessor并显式调用应该停止调度的bean的postProcessB

Where to start with JavaSpaces?

I need to start with JavaSpaces and I found this article. But I found JINI library and downloaded it but couln't find JavaSpaces library. Is it moved to JINI or what? Refer to this link http://java.sun.com/developer/technicalArticles/tools/JavaSpaces/. Good explanation. There are two JavaSpaces implementations of any note: Blitz and GigaSpaces XAP. Blitz is open source; XAP is commer

从哪里开始JavaSpaces?

我需要从JavaSpaces开始,我找到了这篇文章。 但是我找到了JINI库并下载了它,但没有找到JavaSpaces库。 它移动到JINI还是什么? 请参阅此链接http://java.sun.com/developer/technicalArticles/tools/JavaSpaces/。 很好的解释。 任何笔记都有两个JavaSpaces实现:Blitz和GigaSpaces XAP。 闪电战是开源的; XAP是商业版本,但有一个免费使用的社区版本。 我非常偏向XAP; 我为他们工作。 :)这就是说,有很多理由考

return a value

I'm using the command pattern for passing a command from a client to a server via a TCP/IP socket. The server will take the command object, deserialize it and then call execute() on the command object. However, I need to pass a value back to the caller over the socket. Does the command pattern allow for this? If not, is there a work around? I have looked at the light switch example on wi

返回一个值

我使用命令模式通过TCP / IP套接字将命令从客户端传递到服务器。 服务器将接收命令对象,反序列化它,然后在命令对象上调用execute()。 但是,我需要通过套接字将值传回给调用者。 命令模式是否允许这样做? 如果没有,是否有解决方法? 我曾看过维基百科上的灯开关示例,这很棒,但没有返回值。 任何建议不胜感激。 在发送到远程服务器的Command上不应该有“execute()”方法,这在很多方面都很糟糕,特别是在Java中。