Im working on building a java application in windows vista using the Emotiv Epoc Neuroheadset, http://emotiv.com/index.php.
I'm new to java and having a really tough time getting started. I have some examples that came with the headset I'm trying to run in either eclipse or netbeans (at this point I really don't have a preference, suggestions?)
The user manual gives these directions:
*2. Package content: Jna.rar, Edk.java, EmoState.java, EDkErrorCode.java
Example 1: EEGLog
Example 2: EmoStateLog
Developer‘s guide: Step 1: Add the JNA library to your project. Step 2: Add Edk.java, EmoState.java, EdkErrorCode.java to your project. The classes in these files contain methods calling the APIs from Edk.dll using JNA library. You can find more information about the conversion between data types on the JNA's homepage.*
This is all Chinese to me! Can someone explain to me exactly how to do these steps (in a way a small child who have never used eclipse or netbeans before can understand!) Somebody from the Emotiv Epoc forum gave me these directions as well:
*To see how to Java wrapper examples work you should install Eclipse and open, compile them. You put edk_utils.dll and edk.dll into System32 or the same root directory of each example as EmoStateLog, CognitivExample,... before running them.*
My problem is I dont know enough about the IDEs to run these examples. Am I supposed to make a new project then add these files? Or do I open one of the examples, then add the .dll files and the JNA library? How do you add libraries to a project? Where do I put the .dll files?
Thanks in advance!
I know this is fairly simple stuff but its always the simple stuff thats hardest to figure out it seems!
-Eric
Based purely off of what you're saying here...
Developer‘s guide: Step 1: Add the JNA library to your project. Step 2: Add Edk.java, EmoState.java, EdkErrorCode.java to your project. The classes in these files contain methods calling the APIs from Edk.dll using JNA library. You can find more information about the conversion between data types on the JNA's homepage.*
Create a new project in Eclipse.
Add Edk.java, Emostate.java, EdkErrorCode.java into the src folder
Add the JNA library into the libs folder. (Make sure the library is in the project path, otherwise Eclipse won't detect it.)
Whether or not it will compile depends on if those are the only supporting files.
Related
I’m a novice programmer and I bit off more than I could chew. I’m using Netbeans 8.2 for the first time and I managed to hobble it together and install the Python 3.0 plugin followed by the Jython 2.7 plugin (never used either of these before.) I’m a model railroader and use a program call JMRI (but not its JAR file in my code) which is written in Java and my code is for trains so I chose Jython so I could share it with others.
I have a good working program! Now I want to create JAR files so I can share it. Clean & build does nothing, I click it and the output window remains blank. I right click the project and see Clean and make egg. Researching the internet I find that I’m not the only one that has struggled with making Jython JAR files. But the Q& A are dated (2011-2014) and refer to programs JUMP and JthonC which appear to be unavailable now.
I’m looking for tutorials and examples and of course experienced users to guide me. What program (or plugin) do I need to make the JAR file?
I am an enthusiast attempting to play around and add things to an app that I have been using for the past year which the source codes are available in GitHub. Problem is when I clone or download the repository and open it in Eclipse, I get a ton of error codes whenever I try to 'run as' Java app (in particular I am unable to find the 'main class/starting point' there's way too many files to chose from to find it and most don't work) and when I try to extract the files to an executable jar it gives me a JAR exe that is unusable :-(. I know that the files are workable since I do use the executable jar that is available from the developer and others have also toyed around with the source codes.
Can anyone assist me with this? Maybe I am using the wrong Java manipulator/application. The program I am using for opening these files is Eclipse IDE for Java Developers and my operating system is 64bit Windows 10.
Also, here is the GitHub URL for the repository, in case anyone asks: https://github.com/DraqueT/PolyGlot.
I thank anyone who can be of some assistance as I have been working on this forever and can't seem to find a solution.
The github project looks a lot like a utility library than a full application. But the following could help:
Try to study the README file attached to the github project. (There is one in the source code according to the author). This would help you to setup the project.
Make sure to download all the dependencies for that project. Again, the author has provided some of them in the github project (I could see some Apache POI libraries in there somewhere), but getting the required jars on the maven repository isn't that difficult.
It would also help to know what type of project it is. For example, having a main method in a web application doesn't do much for you, but a Java SE project would need a main method to run. So try to find out what kind of project it is.
If all else fails, you could try to contact the owner of the repository or one of its contributors to assist you.
Cheers!
I need to develop a Tool for checking certain Java Code conventions for all the java classes present in a Java Project.
For one of the rules(i.e;Checking the Class Name Convention)I need to get all the Class Names given the Folder Name.Instead of parsing it line by line,can anybody suggest me a better way to do the same.
NOTE 1: Reflection is not an option because it doesn't work across java projects.I can not use build path as well since there would be many projects at run time for which i need to check the code conventions.
NOTE 2: Currently,I ma using eclipse IDE to build this,but in run time I am not even sure whether they would be using only eclipse IDE.Hence,when you suggest any eclipse plugin ,please bear this in mind.
Thanks in advance:)
I am trying to make the HelloWorldImage example from Beginning Java Development with Libgdx but I can't get the project to read the image.
This is what the project directory and first class looks like:
And this is the error I get when I try to run the program:
I also used "Beginning Java Game Development with LibGDX" to learn LibGDX, so I know you are using BlueJ because that's what the book does. You definitely can build LibGDX games with BlueJ: the author uses it to develop dozens of games in the book. That said, the other commenters are correct: BlueJ is an "educational IDE" arguably suitable for learning Java. You could consider using a different IDE, especially if you already know Java.
The book's source code is available for download on GitHub. Download and extract the "978-1-4842-1501-2_Ch01_code.zip" archive and see how the project files are supposed to be arranged. If you compare your project to the source, it looks like you're missing the "+libs" folder which should contain gdx.jar, gdx-backend-lwjgl.jar, gdx-backend-lwjgl-natives.jar, and gdx-natives.jar. I know the author described several ways these dependencies could be installed, so perhaps you have used an alternative method, but I recommend you use the structure you find on GitHub to ensure it's working.
(If you want to use a different IDE like Netbeans or Eclipse but don't want to use LibGDX's Gradle build tool, I wrote a short Maven pom file that can be used to build the LibGDX games in the book.)
You don't have libGDX's dependencies (i.e. libGDX libraries etc.) included in your program's classpath.
I don't think BlueJ even has an option to use dependencies. Use Eclipse, NetBeans or IntelliJ, the only 3 officially supported IDEs for libGDX (and the most commonly used).
Edit: You can add your libraries in a folder called +libs in the BlueJ project directory.
I would not recommend using BlueJ - BlueJ is, IMO, often used for teaching Java concepts (because of its object visualizer etc.) but has an extremely limited feature set.
Also, BlueJ Gradle integration doesn't exist (a useful tool for development in general.)
Instructions for setting up libGDX with these 3 IDEs are available here.
I want my Java application to make a growl notification. My IDEs are Eclipse and Netbeans, and I am trying to implement a library in either (so far it worked it neither). How can I just add the library to my project and then reference the classes from within my own classes? Moreover, where can I find an appropriate library?
Thanks in advance!
EDIT: Ok, now I have somehow managed to implement the library ^^ However: the following command fails:
System.loadLibrary("growl");
It returns following error:
Message: no growl in java.library.path
How can I fix this?
About an appropriate library you should just google it. I found this one (that is tested on 10.5 so maybe it will need some tweaks): http://www.cocoaforge.com/viewtopic.php?f=6&t=17320
To add the library to your project in Eclipse copy it into the project folder (this is not necessary, you could just copy it wherever you want, also in extension folder of the JDK) and then add it through the project settings:
open project properties by right clicking the project and choosing Properties
go to Java Build Path option
go to Libraries and add it
It's possible to use AppleScript script engine in Java 6 on OS X to communicate with Growl. Here's a blog post describing how to do it.
You can use the network binding like in https://github.com/chamerling/JavaGrowl or https://github.com/aerofs/growljavabindings
Maybe this can help you.
If your classes are packaged in a JAR file, just like a 3rd party library, you should be able to put it in your project /lib directory and add it to the CLASSPATH using the IDE. That should be all you have to do (if I understand your question correctly).