<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 26: Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/</link><description>Recent changes to 26: Robocode packager - problem with nested (java) classes</description><atom:link href="https://sourceforge.net/p/robocode/support-requests/26/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 25 Jul 2016 09:07:33 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/robocode/support-requests/26/feed.rss" rel="self" type="application/rss+xml"/><item><title>#26 Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/?limit=25#0242</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
Can you please help me find the java code for a robot using multiple aiming methods&lt;br/&gt;
like linear, circular, static and also capable of tracking every bullet for a hit or a miss and use this information to improve its capability to sharp shoot other enemy robots.&lt;/p&gt;
&lt;p&gt;I look forward to get a positive response from you.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aishwarya</dc:creator><pubDate>Mon, 25 Jul 2016 09:07:33 -0000</pubDate><guid>https://sourceforge.neta79f41c7679d22e315d498e5a1c8806aeb3cd3b4</guid></item><item><title>#26 Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/?limit=25#90d4</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I believe the problem is related to the Eclipse project files that might have come out of sync somehow. Hence, moving the sources around might have triggered an update of the classpath in the Eclipse project files, that Robocode looks into.&lt;br/&gt;
But it could also be due to the robot.database, which is located in the &lt;span&gt;[robocode dir]&lt;/span&gt;/robot folder, which could have come out of sync with the Eclipse classpath. If so, it might have help be refreshing the database or simply delete this files, as Robocode will automatically rebuild it. It works like a cache/index to Robocode.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flemming N. Larsen</dc:creator><pubDate>Thu, 09 Jun 2016 19:55:18 -0000</pubDate><guid>https://sourceforge.netb4ba42337db4386aae29ed721717d43655296a8c</guid></item><item><title>#26 Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/?limit=25#2f1c</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Sorry for the late answer.&lt;/p&gt;
&lt;p&gt;I have tried out your sources, but found no problem?&lt;/p&gt;
&lt;p&gt;What I do to compile and package your robot is this:&lt;br/&gt;
1) Unzip your .zip fil and copy the jaws directory (with source files and sub directories) into &lt;span&gt;[robocode dir]&lt;/span&gt;/robots&lt;br/&gt;
2) Start up Robocode and open your testBot.java&lt;br/&gt;
3) Compile testBot.java&lt;br/&gt;
4) Start a new battle with the jaws.testBot + some other robot. Note that testBot with have a star behind it, as it is considered a development version until it has been packaged.&lt;br/&gt;
5) Start up the Robot Packager and select the jaws.testBot&lt;br/&gt;
6) Start a new battle with the jaws.testBot (without a star), which will run the robot from the jar package.&lt;/p&gt;
&lt;p&gt;This is what result from the Robot Packager:&lt;/p&gt;
&lt;p&gt;---- Codesize ----&lt;br/&gt;
Codesize: 2498 bytes&lt;br/&gt;
Robot weight class: MegaBot  (codesize &amp;gt;= 1500 bytes)&lt;/p&gt;
&lt;p&gt;The file  jaws/data/tracking/LinearMotionTracker.class is not mising in my jar file.&lt;/p&gt;
&lt;p&gt;Perhaps there is a difference if you have set up a development path to an Eclipse project. In this case Robocode examines the .classpath (or .project) file from the Eclipse project to detirmine which files to include. There might be an issue here?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flemming N. Larsen</dc:creator><pubDate>Wed, 08 Jun 2016 20:32:23 -0000</pubDate><guid>https://sourceforge.nete966be798b919f37e7c1f3d937ef20b3ecee67f1</guid></item><item><title>#26 Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/?limit=25#d906</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;LS,&lt;/p&gt;
&lt;p&gt;Sorry it took so long to respond. The mail I send got a time-out. Not sure why. I send you the requested information this way.&lt;/p&gt;
&lt;p&gt;As you requested a zip file with my sources. I stripped te code down as much as possible.&lt;/p&gt;
&lt;p&gt;Problem: When I package the robot the contents of the java (sub)package jaws/data/tracking/ (and subpackes) is not being packaged by the 'Robocode packager'.&lt;/p&gt;
&lt;p&gt;The 'Robocode packager' results are:&lt;br/&gt;
jaws/utils/Calculator.class&lt;br/&gt;
jaws/data/EnemyRobotTracker.class&lt;br/&gt;
jaws/testBot.class&lt;br/&gt;
jaws/data/Location.class&lt;br/&gt;
jaws/data/FiringSolution.class&lt;br/&gt;
jaws/testBot.properties&lt;br/&gt;
jaws/events/ToCloseToWallEvent.class&lt;/p&gt;
&lt;p&gt;---- Codesize ----&lt;br/&gt;
Codesize: 2009 bytes&lt;br/&gt;
Robot weight class: MegaBot  (codesize &amp;gt;= 1500 bytes)&lt;/p&gt;
&lt;p&gt;For instance the file jaws/data/tracking/LinearMotionTracker.class is missing. And this is used when I run the robot from inside Eclipse.&lt;/p&gt;
&lt;p&gt;As a control I tested with a realy simple robot. No hested classes. Then every thing works fine.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flemming N. Larsen</dc:creator><pubDate>Thu, 02 Jun 2016 17:52:11 -0000</pubDate><guid>https://sourceforge.net3c7097708117e993b9fbd88958d2a43c0253722e</guid></item><item><title>#26 Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/?limit=25#4ac9</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I should like to have a look of your robot and all the classes.&lt;br/&gt;
Could you zip the source files and send these to me: fnl (at) users.sourceforge.net&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flemming N. Larsen</dc:creator><pubDate>Thu, 26 May 2016 21:45:38 -0000</pubDate><guid>https://sourceforge.netbffeaf68e5cb60168752037ddefc4e20d81959ba</guid></item><item><title>Robocode packager - problem with nested (java) classes</title><link>https://sourceforge.net/p/robocode/support-requests/26/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Problem:&lt;br/&gt;
I have split my robot into many files. When using the Robocode packager not all java classes are packed into the jar file.&lt;br/&gt;
Only java classes directly called from the main class (the class that is being extended from AdvancedRobot) are being&lt;br/&gt;
packaged. Classes called from classes called from the main class are not being packaged.&lt;/p&gt;
&lt;p&gt;I tried a workaround by defining an method in my main class (called deadcode) which calls all the missing classes.&lt;br/&gt;
This was only a partial succes. All the missing classes where added to the jar-file. Trying to run with this jar-file resulted&lt;br/&gt;
in the following exception:&lt;/p&gt;
&lt;p&gt;java.lang.LinkageError: loader constraint violation: loader (instance of net/sf/robocode/host/security/RobotClassLoader) previously initiated loading for a different type with name "jaws/data/tracking/TrackingPoint"&lt;br/&gt;
    at java.lang.ClassLoader.defineClass1(Native Method)&lt;br/&gt;
    at java.lang.ClassLoader.defineClass(ClassLoader.java:803)&lt;br/&gt;
    at java.lang.ClassLoader.defineClass(ClassLoader.java:884)&lt;br/&gt;
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)&lt;br/&gt;
    at net.sf.robocode.host.security.RobotClassLoader.loadRobotClassLocaly(RobotClassLoader.java:139)&lt;br/&gt;
    at net.sf.robocode.host.security.RobotClassLoader.loadClass(RobotClassLoader.java:98)&lt;br/&gt;
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)&lt;br/&gt;
    at jaws.data.EnemyRobotTracker.addTrackingPointFromScannedRobotEvent(EnemyRobotTracker.java:87)&lt;/p&gt;
&lt;p&gt;Environment:&lt;br/&gt;
Robocode 1.9.2.5 version.&lt;br/&gt;
Running with Java 7 (in Ubuntu) from Eclipse Luna.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 24 May 2016 15:17:24 -0000</pubDate><guid>https://sourceforge.net46bbce60d1c9ef29e0f3831c6d9b6b15980c595b</guid></item></channel></rss>