Go to Post I hate to do say it with these words but...We're all in this together. - dellagd [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-29-2010, 03:27 PM
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
jars: creating and adding

I am working on packaging up the ZomB Dashboard bindings for java, and I have two questions: How do you create a jar as a library? and How do you add it to a project so it can use the jar?
When I build a project, it produces a jar file in suit/project_1.0.0.jar. Is this a good jar file? When I drop it on a project, or add it in the ant classpath, it produces errors:
Code:
init:
No to.jar.file specified.
Using "suite\RobotTemplate_1.0.0.jar"
Deleting directory C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\build
Deleting directory C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\suite
Deleting directory C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\j2meclasses
clean:
Created dir: C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\build
Compiling 1 source file to C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\build
C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\src\edu\wpi\first\wpilibj\templates\RobotTemplate.java:10: package org.thecatattack.System451.Communication.Dashboard does not exist
import org.thecatattack.System451.Communication.Dashboard.*;
C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\src\edu\wpi\first\wpilibj\templates\RobotTemplate.java:22: cannot find symbol
symbol  : class ZomBDashboard
location: class edu.wpi.first.wpilibj.templates.RobotTemplate
        ZomBDashboard zomB = ZomBDashboard.getInstance(ZomBModes.TCP, "10.4.51.5");
        ^
C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\src\edu\wpi\first\wpilibj\templates\RobotTemplate.java:22: cannot find symbol
symbol  : variable ZomBModes
location: class edu.wpi.first.wpilibj.templates.RobotTemplate
        ZomBDashboard zomB = ZomBDashboard.getInstance(ZomBModes.TCP, "10.4.51.5");
                                                       ^
C:\Documents and Settings\***\My Documents\NetBeansProjects\RobotTemplate\src\edu\wpi\first\wpilibj\templates\RobotTemplate.java:22: cannot find symbol
symbol  : variable ZomBDashboard
location: class edu.wpi.first.wpilibj.templates.RobotTemplate
        ZomBDashboard zomB = ZomBDashboard.getInstance(ZomBModes.TCP, "10.4.51.5");
                             ^
4 errors
C:\Documents and Settings\***\sunspotfrcsdk\ant\compile.xml:48: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 18 seconds)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #2   Spotlight this post!  
Unread 01-06-2011, 06:16 PM
Datalore Datalore is offline
Registered User
FRC #0192
 
Join Date: Jan 2011
Location: California
Posts: 2
Datalore is an unknown quantity at this point
Re: jars: creating and adding

From command line,

Code:
ant jar-app
to make the jar file

To add the proper syntax highlighting things, you have to add it to the netbeans classpath file, as you have done.

To deploy the library jar with the rest of the code, run
Code:
ant deploy -Dutility.jars=myLibrary.jar
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AndyMark Wheels- adding sprockets, bolts, and such Bryan Herbst SolidWorks 14 05-31-2008 10:01 PM
Adding hinges and a door lock to the crate Mikhail_Pham Technical Discussion 1 02-18-2008 05:47 PM
Creating and selling parts. Billfred General Forum 30 07-21-2004 12:18 AM
Adding Sound Effects and Music to an Animation Hailfire 3D Animation and Competition 19 01-26-2004 11:10 PM
Adding stickers and Cosmetic detail at competition archiver 2001 3 06-24-2002 01:29 AM


All times are GMT -5. The time now is 07:33 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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