I've had a look at the JGAP package from the robocode website and I have been getting problems when attempting to set it up. It seems that some of the files that are talked about are not actually in the download. For instance the line on the website says:-
"MyRobot that resides in subdirectory myrobots. In the above call, Aspirant3285 is used"
However the above subdirectory or robot is not in the download also when attempting to run the JAR files the error bellow is shown:
"[main] WARN org.jgap.robocode.EvolveRobot - File not found"
Anyone who can give me a link to a tutorial or some advice on this fix would be much appreciated if further details are required feel free to ask.....
Regards..
I'm not sure on the example from the website how the structure is set up as I was unable to get this running myself.
I've created a small example of how to get the two libraries integrated with each other and running in a very simple application to write, generate, battle and evolve a robot population which may help to get you going in the right direction.
https://github.com/samternent/robocode-jgap-template/
Related
I am trying to download diff image of base and checkpoint url created by applitools.
I found test result handler which does this. Here is the link:
https://help.applitools.com/hc/en-us/articles/360007188111-TestResultsHandler-a-way-to-download-diffs-baseline-and-current-images
While running repo I am getting errors.
How to make it work? Anyone has example that works?
I am using java selenium.
I work on the Applitools technical support team. I understand that you're running into an issue with downloading the diff images when using the TestResultsHandler class in Java.
It is tough to say exactly what the issue is that you're experiencing without seeing the error messages as well as your code. In any case, here is an example of the TestResultsHandler usage.
Alternatively, you can also use the Eyes Utilities JAR which also provides the capability of downloading the differences.
Lastly, if you're still running into issues, please feel free to reach out to us directly by opening a ticket via this web form.
I'm trying to set up a simple helloworld demo with Sphinx 4.0 (which is apparently a beta?) I downloaded the source and added it as source to Eclipse, but the problem is, it doesn't recognize a lot of the classes. I've been looking, and as far as I can tell, the classes it wants just aren't there! For example, the line:
import javax.speech.Central;
throws a compiler error, saying something about how the import couldn't be resolved. Is this a part of a bigger API I was supposed to download before trying to do Sphinx4? It didn't say anything about any other API but I'm open to the possibility.
If you want, I can post a list of all the imports that can't be resolved, I will, but that means looking through all the code which is kind of a pain. I have a hunch that I need to download the JSAPI, but I don't know which implementation would be good for Sphinx4.
Links to Sphinx4 downloads:
http://sourceforge.net/projects/cmusphinx/files/sphinx4/1.0%20beta6/
http://cmusphinx.sourceforge.net/
EDIT: In addition, I've found a few lines that I think might mean I need to download JUnit? Again, I'm not totally sure how to set this up.
The great thing about this site is that the simple act of typing out a question and nervously analyzing it before finalizing any revisions (because, after all, someone WILL read this!) 95% of the time I answer my own question within 5 minutes of posting it.
Anyways, the solution was simple, I downloaded junit4-10.jar and jsapi.jar and added them to my Java build path. Then, I got more errors, and I said TO HECK with building from the source (which I was doing with sphinx4 here) and I just downloaded the already-built library and it works great. Got the HelloWorld I wanted!
I'm working on a project with some friends over Github for a University project. I've only just taken my friends code off the repository for the first time. For some reason, all references to images in the code don't seem to allow compilation due to a directory problem I think. I'm using Eclipse, my friend's using Netbeans(don't know if that affects it or not?). Anyway, all of the images referenced are either in a folder known as runone, on the same level as the Eclipse src, or within the package 'runone' within src. I don't know which.
Here's an example of some of the references:
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/runone/OSTeeeennny.jpg")))
jLabel53.setIcon(new javax.swing.ImageIcon(getClass().getResource("/runone/clown_fishTIny.jpg")));
I guess what I'm wanting to know is, how can I make these resources work correctly, on any machine that we code this program on?
Hope that all made sense!
For the examples you have given your file structure might look like this
src/com/yourpackage/YourClass.java
src/runone/OSTeeeennny.jpg
src/runone/clown_fishTIny.jpg
For a more best practice way of organizing your resources you could do this
src/com/yourpackage/YourClass.java
src/com/yourpackage/resources/OSTeeeennny.jpg
src/com/yourpackage/resources/clown_fishTIny.jpg
and then use the following calls to load them
getClass().getResource("resources/OSTeeeennny.jpg")
getClass().getResource("resources/clown_fishTIny.jpg")
I'm at my wits end with this Java Bridge, after trying to force it to do what I want in C# I've abandoned the idea and started to stagger my way through Visual C++, however I'm running into constant problems which I'm slowly resolving. Except this one!
I'm missing an include file called AccessBridgeDebug.h. << TL:DR read here.
I can't even compile ANYTHING that uses the includes for AccessBridge because they all reference the debug file, and it just flat out does not come with the package I downloaded, or the one prior to it on the website. Google yields 0 results for the search term "AccessBridgeDebug.h" which has caused me to realise I rely on google far too much.
Please, someone, help.
For those who have the same problem, the solution was fairly simple. The Java Access Bridge 2.0.2 only contains updated files, not the entire package. Furthermore, there is no readily available download link to the 2.0.2 full installer.
To fix it, go here: https://www.oracle.com/java/technologies/java-archive-downloads-java-client-downloads.html#accessbridge-2.0.1-oth-JPR (Located accessbridge-2_0_1-manual_install\src\bridge\src\AccessBridgeDebug.h)
And download the 2.0.1 full source. All the missing header/c++ files can be found in here.
I have no particular Java knowledge whatsoever. We are running an opensource application which is mainly written in Java. Internet connection dropped while I was editing a job (this is some sort of a translation project management tool) and I cannot open the job anymore.
I checked the database to see if anything is wrong there and all looks fine (I compared values to a working job). Then I logged in to the server and checked logs and seems like this application may be relying on some data which is stored somewhere other than the database.
The log contains tons of lines but I guess this is the one that provides the hint:
ERROR;com.globalsight.everest.workflow.WorkflowProcessAdapter;There is error in create the workflowinstance for the process instance id 54
java.lang.IllegalArgumentException: the userrole value cannot be null
Looks like userrole got messed up while the connection dropped. Now that userrole is not assigned anywhere in the database. I thought I will browse the source files to see where it may be coming from but I am not able to find those. For instance, an exception line says :
com.globalsight.everest.taskmanager.TaskManagerLocal.acceptTask(TaskManagerLocal.java:165)
I browse to that localization and there is a TaskManagerLocal folder there but it is empty. I assume this is compiled in the jar file (right?). Can somebody with Java knowledge shed a light as to how I can dig and find where userrole may be saved and bring by application back up?
Many thanks in advance
com.globalsight... -> globalsight.com
The website states that the sources are on SourceForge
If the project is open source, the code may be packaged inside the JAR file. This is not always the case, as the actual code that is run from the JAR is in compiled bytecode form.
You could try unzipping the JAR using:
jar -xvf the_jar_file.jar
This will create a number of directories/files which may include a src directory. If not, the source is probably not included in the JAR in its un-compiled form, in which case you'd have to download the source from the project site.
Since this error is specifically related to that tool, I'd go to the GlobalSite at http://globalsight.com and ask there. I did a quick search of the site for this error and didn't find anything but you should be able to get some answers (I would think) after posting this on their forum.