Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Java compile error (http://www.chiefdelphi.com/forums/showthread.php?t=152688)

jimfl014 15-12-2016 14:55

Java compile error
 
We are moving to Java this year from Labview. Using last year's robot we are trying to code it using Java. On two separate laptops we get the same error when trying to run: PCs are both 64 bit running Windows 10

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\HammerHeads\AppData\Local\Temp\libwpilibJ avaJNI8681530594205079588.so: Can't load this .dll (machine code=0x34) on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIW rapper.java:47)
at edu.wpi.first.wpilibj.RobotBase.initializeHardware Configuration(RobotBase.java:170)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:182)

euhlmann 15-12-2016 14:58

Re: Java compile error
 
This is for simulation mode? I don't believe it runs on Windows yet. If you meant to deploy to the robot instead of simulate, right click the project > Run As > WPILib Java Deploy

Thad House 15-12-2016 14:59

Re: Java compile error
 
Quote:

Originally Posted by jimfl014 (Post 1621524)
We are moving to Java this year from Labview. Using last year's robot we are trying to code it using Java. On two separate laptops we get the same error when trying to run: PCs are both 64 bit running Windows 10

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\HammerHeads\AppData\Local\Temp\libwpilibJ avaJNI8681530594205079588.so: Can't load this .dll (machine code=0x34) on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIW rapper.java:47)
at edu.wpi.first.wpilibj.RobotBase.initializeHardware Configuration(RobotBase.java:170)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:182)

That looks like you are trying to run the code on your development computer. That doesn't work, and is not currently supported. Follow the instructions at the link below on how to properly get the program to deploy to your robot.

http://wpilib.screenstepslive.com/s/...to-the-roborio

jimfl014 15-12-2016 15:04

Re: Java compile error
 
It sounds like your saying that the laptop has to be connected to the RIO, it's not. I was thinking that I could just use the run as a way to make sure the code compiles properly and I would just get an error that it could not contact the robot.

Thad House 15-12-2016 15:07

Re: Java compile error
 
Quote:

Originally Posted by jimfl014 (Post 1621529)
It sounds like your saying that the laptop has to be connected to the RIO, it's not. I was thinking that I could just use the run as a way to make sure the code compiles properly and I would just get an error that it could not contact the robot.

If you use the deploy function in the link above, or as Erik posted, that will build for the RoboRIO, and then fail if it can't connect. Trying to just run it on the desktop will compile as well, and then that error is showing when it is trying to run the code, and then failing because it's not running on a RoboRIO. So if you do get to that error message, the code will have compiled correctly, but its better to just do the deploy, and then let that fail to connect.

jimfl014 15-12-2016 16:19

Re: Java compile error
 
Thanks for clearing that up and responding so quickly!

Look forward to getting to the build site and running it on the real thing


All times are GMT -5. The time now is 10:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi