modify weka source code in netbeans - java

i wanna use weka source code (not jar file!)and i download weka-src.jar from this address
http://www.java2s.com/Code/Jar/w/Downloadwekadev379sourcesjar.htm
and i wanna have weka project in netbeanes in windows .i do step by step this site instruction
http://weka.wikispaces.com/Netbeans+6.0+%28weka-src.jar%29
when i extract jar file into src directory in my project,it give me a lot of error
such as:
package java_cup.runtime does not exist
and a lot of other error.
anyone can tell me how can i do that without any error ?? i am working on this problem for a week and i'm so tired.
please help me if you can.

you have to download java-cup.jar file And add this jar to your classpath
if you didn't find java-cup.jar then you can download jflex.jar jflex also contain java-cup classes so you can download jflex.jar from link below
click on this link

Related

Where to store java packages such as jsoup?

I am trying to download jsoup under the following link: https://jsoup.org/download but I am not sure where to save this in my library... Can someone help please!
Typically, things like that come in a JAR file, which is a fancy ZIP file for Java. All your JAR have to listed on the classpath. There are different conventions for where to put your JAR, but, for a simple app, they can be in the root directory of your classes.

Adding Jsoup Jar to MapReduce

I am using the Jsoup.jar to get the keywords from the meta tag of several websites using MapReduce. The list of websites is being kept within a txt file. However when I compile the java file in terminal, it says that package org.jsoup.Jsoup does not exist. I made sure that the jar is in the same folder as that of the java file.
Screenshot of error:
You have to place the jar files in Distributed Cache it is a best practise to share the third party libraries,
Please have a look at below links for further help,
http://blog.cloudera.com/blog/2011/01/how-to-include-third-party-libraries-in-your-map-reduce-job/
https://hadoopi.wordpress.com/2014/06/05/hadoop-add-third-party-libraries-to-mapreduce-job/

Netbeans automatically cloning my jar based packages with their empty 'name equivalents'

I'm new at java programming so i just wanted to try something with ssh understand how it works and so i downloaded a java library which is mentioned in this Stack Overflow answer
. After a lot of failed attempts on importing this library into netbeans. I decided to simply put the files into my src folder. But Netbeans ide duplicating packages in the jar file with their 'name equivalent' empty packages and this prevents me to reach the classes in the packages because the IDE and the Code completion automatically sees the empty packs.I've search the network couldn't find anything about this problem.I 'm ready to share any log files if there are any of them .Here is my screenshot about this situation.
Screenshot Attachment
OS : Linux Mint Rosa
IDE : Netbeans 8.1 Linux version
Edit : I Already looked these topics
How to use .jar files in NetBeans? : At first i've tried this and in this solution netbeans not duplicating any empty packs but when i start to type somethin' like that import sshj.foo.*; Auto Complete can't find anything and also if i try to write the whole path to a specific class which is in an specific pack IDE gave me an error the pack that you're looking for is not exist.Secondly I've tried this
and got the same issue at first try.I can see the packs,classes and other stuff but still can't reach them in a random class which is imported project.
How can I include external jar on my Netbeans project : I've tried this and also this ran perfectly without errors as they said but when i try to reach classes still got the same problem so nothing changed.
How to add a JAR in NetBeans :
In this topic all of the replies explained types of libraries.That's not even related to my problem
How to use classes from .jar files? : I've tried to do explained in this reply also and I've transfered my jar file into a compiled .class extension file and this didn't solve my issue too.
I've just solved that problem with downloading part of the libraries from here.
All libraries need to contain three kind of jars ;
1 . Compiled files containing jar (with extension .class)
2 . Source files containing jar (with extension .java)
3 . Javadoc files containing jar (optional)
Open a project find libraries folder on ide right click and choose Add JAR/Folder specify the directory that contains the compiled files.After importing library hit right click over it and choose edit then specify the source files and javadoc files directories you are ready to roll.

where should i place bluecove-2.1.0 folder

I am trying to write a project that communicates with a Bluetooth device and receives information from it. I googled it and from what I understood I had to get a package named 'bluecove' which will contain all I need. I downloaded the jar file, and (in Eclipse) by right-clicking on 'my project>build path>jar file>bluecove', I added the jar file into my project. When I try to run some lines of code, it gives me an error that says that some content is unavailable:
Native Library intelbth_x64 not available
Native Library bluecove_x64 not available
Then I went back to the bluecove website and i saw there another Windows file for download called 'bluecove-2.1.0-sources.tar.gz'
here is a link:
http://code.google.com/p/bluecove/downloads/list
When I downloaded it, there was a folder inside named 'bluecove-2.1.0' which I think I have to copy into one of the system's folders. What should I be doing here?
Thanks
p.s i will need the answer as soon as possible - in the next 9 hours at most, please help me
and again thanks
As stated here (commented by oxc), you need to download the .jar specified: http://snapshot.bluecove.org/distribution/download/2.1.1-SNAPSHOT/2.1.1-SNAPSHOT.62/

Where is the documentation for the GeoTIFF-jai Library

I am trying to use the GeoTIFF-jai Library to generate a geo-rectified, raster image in Java. I have tried looking on the SourceForge site for the documentation on how to do this, but SourceForge says "Unfortunately, this project hasn't indicated the best way to get help." Has anyone else tried using this library and been able to find any documentation on it?
If there truly is no documentation, maybe you can answer this question. When I import the library .jar file into my Eclipse project (using right-click->Import...->Archive File) all of the .properties files import but not the .class files. I need the GeoTIFFFactory class from org.geotiff.images.jai in order to create a new GeoTIFF image but it's not available. Any idea why the .class files are not importing? Am I doing something wrong on the import? Is the .jar in the wrong directory?
Any help with either of these questions is greatly appreciated.
Thanks,
Ryan
When I import the library .jar file into my Eclipse project (using
right-click->Import...->Archive File) all of the .properties files
import but not the .class files. Am I doing something wrong on the import?
Yes. That's not how you use third-party jars in Eclipse. The wizard you invoked is used primarily for importing archives with source code to make changes to them. Instead create Java project to hold your source code and add a dependency on the jar via Project Properties -> Java Build Path. You can also attach a source code archive in the same place (get this from project's site on SourceForge). This will let you see any available javadoc and if there is no documentation at all, you can at least step through the code.
Regarding lack of documentation, you will be more likely to get help on that project's forum rather than on stack-overflow (since the odds of you finding help on stack-overflow with a particular library is inversely proportional to that library's popularity).

Categories