It is currently Wed Apr 25, 2018 7:00 am Advanced search

Java: How to compile + run program which depends on Jar

Topics about starter packages, visualizer or any other third party tools.
Please submit new language requests in the Language Request Forum.

Java: How to compile + run program which depends on Jar

Postby DrClaes » Wed Dec 14, 2011 8:29 am

Hey,

I have what's probably an easy problem, but I can't figure out what to do. My new version of the bot uses a library (JAMA, for matrix math) which comes packaged in a jar file. I compile the program fine at home with all the files, including the jar, in one directory, but it doesn't want to compile, giving me the following error message:

./CWNeuralNet.java:1: package Jama does not exist
import Jama.*;
^

What do I need to do to get this to work? Something with the makefile? Some other workaround?

/DrClaes
DrClaes
Lieutenant-Colonel
 
Posts: 49
Joined: Sat Oct 29, 2011 6:27 am

Re: Java: How to compile + run program which depends on Jar

Postby bluegaspode » Wed Dec 14, 2011 8:36 am

you cannot use a jar as far as I know.
You need to get the sources and just put them into your main directory, so that they get compiled as well.
bluegaspode
Colonel
 
Posts: 51
Joined: Mon Nov 07, 2011 8:38 am

Re: Java: How to compile + run program which depends on Jar

Postby DrClaes » Wed Dec 14, 2011 9:17 am

Thanks for a quick reply! I did just that, removed some package foo lines from the JAMA sources, and now the code compiles beautifully. Now to get that neural net working!
DrClaes
Lieutenant-Colonel
 
Posts: 49
Joined: Sat Oct 29, 2011 6:27 am


Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 3 guests