Solved

Netbeans 3.5.1: Can not import a jar file

Posted on 2003-10-29
7
1,000 Views
Last Modified: 2013-11-23
I am a newcomer, using Netbeans 3.5.1 for research purpose. I am supposed to compile two packages which can be found at

1) http://people.cs.uct.ac.za/~evoges/web/GiST.zip
2) http://people.cs.uct.ac.za/~evoges/web/BT.zip

I can successfully compile the first one, but failed to compile the later.

Netbeans reports an error message: BTroutines.java [6:1] package GiST does not exist

I have tried all my best to mount/install the specific GiST jar which is from 1). However, it still does not compile. Interestingly, I can compile 2) by using command line.

Solutions are in highly appreciation.
0
Comment
Question by:verveshen
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9643186
Don't know NetBeans, but you could

1. Do the first one
2. Import the package created by the first
3. Do the second
0
 

Author Comment

by:verveshen
ID: 9643878
Yes, I did. However, it does NOT work in netbeans while runs smoothly in dos console.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9644531
Well you'll have to read the manual then ;-)
0
 
LVL 3

Accepted Solution

by:
savalou earned 125 total points
ID: 9647574
Since you've given very little information on what exact steps you took, I'm going to spell it all out.  

You need to look in the Java files for the package directive.  If it says
package x.y.z;

then the java file should be in directory WORKDIR/x/y/z.  In Netbeans, mount the directory WORKDIR and then right-click on it and choose "Add to project."  Then you can go to the project view and build/compile your files.  If you make a jar of the class files, it is important to keep the directory structure.  You can then mount the JAR as an archive in Netbeans and it's added to your development classpath.  
0
 
LVL 3

Expert Comment

by:savalou
ID: 9647585
NetBeans asks that you respect the packaging rules of Java.  You could have all your java files in a single directory irrespective of their packaging and do a javac at the command line on them and it will compile.  But  you can't use the classes like that, the classloader will want them to be in directories.  
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JavaFX TableView not displaying correctly 3 58
going to wrong jsp page 2 33
servlet and mdb, jms error 1 38
how to debug htl and js pages 8 39
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question