Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I have installed CUDA toolkit and download some libraries and exported to my Java project in Netbeans. I never using CUDA before and I am very interesting to learn for my parallel algorithm. My question is:
How I know that my environment is ready to use CUDA? Is there any code to check it in Java?
I need a best practice to implement parallel processing using CUDA in Java? Is there anybody that has simple parallel code that I can use to learn CUDA?
If this is your first time using Cuda, I would highly recommend using the language it was designed for (C/C++). Cuda is only available through java through bindings like JCuda. Using these bindings reduces your example code sample size and support pool, along with adding yet another thing that can go wrong. More complexity, more problems.
If you do insist on using JCuda, here are their official sample projects.
As for testing if your "environment" is ready to use cuda, you can check your cuda version in a command prompt with nvcc -V. If the command is unrecognized, something is wrong.
You can use nvcc to compile the sample projects that should have come with your cuda installation. I believe by default on windows they are located in C:\ProgramData\NVIDIA Corporation\CUDA Samples\.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to mutate a function of a class that is loaded at runtime (it has a bug in it but the project is long gone so i cannot build the binary). What i want to do instead is write a piece of code which will run during the application initialization phase and mutate this function so that it works fine. And simply keep that code around until the replacement is ready.
Having no experience with bytecode modification what library could i use to modify and reload a class at runtime? Specifically i need to replace a throw instruction with a noop instruction (i did this once using hex editor but lost the binary).
Also if you know any tutorial on how to do something like that please share.
I can see many libraries for doing this but i cant know which ones are good/bad do the job...
I think use Java Attach API. Java Attach API is procedure of loading a Java agent into an already running JVM. you can understand the work of javaagents by reading the Java Instrument javadoc. AgentMain help to you.
Agentmain is invoked when an agent is started after the application is already running. Agents started with agentmain can be attached programatically using the Sun tools API (for Sun/Oracle JVMs only -- the method for introducing dynamic agents is implementation-dependent).
This tutorial is useful about java instrumentation.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is there a way to get textual output of every method invoked by the JVM at runtime?
If you are using Eclipse you can right click the method and choose "Open call hierarchy"
I am not very sure if you are looking for ASM, it is used for analyzing the bytecodes
ASM is an all purpose Java bytecode manipulation and analysis
framework. It can be used to modify existing classes or dynamically
generate classes, directly in binary form. Provided common
transformations and analysis algorithms allow to easily assemble
custom complex transformations and code analysis tools.
ASM offer similar functionality as other bytecode frameworks, but it
is focused on simplicity of use and performance. Because it was
designed and implemented to be as small and as fast as possible, it
makes it very attractive for using in dynamic systems*.
My suggestion is please use debugger to see the whole process is being done.
You can write a CGLIB proxy to trace your methods.
You should use Java profiler tool. There are two well-known profilers - YourKit Java Profiler and JProfiler.
I prefer first one, but you can try both and make your choice.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I wanted to start learning the big data technology from the scratch. I wanted to know is it necessary to learn java for operating with hadoop as i am already well versed in python?
No, you don't necessarily need java knowledge, as you can write map-reduce jobs perfectly well in pig or hive (similar to SQL). However, as with all layers of abstraction, at some point you may well need to know what is going on "behind the scenes" and being able to look, understand and debug the underlying java is a big advantage.
There is a lot of effort currently going into providing a more complete SQL interface to hadoop, with tools such as Impala (Cloudera), Presto (Facebook), Phoenix and Hive (already mentioned).
Check out MRJob, a python based wrapped for hadoop jobs running, logging and monitoring.
Although pure java solutions might be faster in some cases, you hardly ever will need to debug java code.
Not needed at all , though thats just my opinion. if you python well you should be fine.
check this out writing a hadoop map reduce in python. theres a lot of ways to implement solutions with hadoop. Just because a great deal of them are in Java doesnt mean java is the only tool to solve use . If your working with legacy that is written in java then knowing the basics may help but to be honest i think you could just reference things as you come across them. There is no need to spend a week learning the intricacies of Java 7 and whats new in Java 8 for your current needs.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I recently downloaded Java JDK, and installed it on my PC, yet I only received Java Mission Control, which is useless to me. Is there another way of getting programs to create apps in Java with?
Thanks :)
Personally I have used 3 different IDEs them being:
IntelliJ
Netbeans
Eclipse
I personally, as being the first IDE that I used was Eclipse, but Netbeans is taking a great liking on me because of its ability to use multiple different languages in an easy to use interface. Although Eclipse being the greatest in my opinion because of its easy keybindings and a ton of useful plugins. IntelliJ is the least favourite of the 3 because I find it cumbersome, but that is just my opinion.
I would do a quick google search for "Eclipse IDE", it makes the process of developing a program much easier in my opinion. It may seem intimidating at first but just look up a few tutorials and you should be okay.
find for
`
eclips
netbeans
IDE but these IDE are for professionals who are hands on java
after some set of practice's use one of above IDE
if you want to remember and learn the concept of .class files, packages and command line then go with
Notepad
Notepad++
Editplus
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make a Java program that allow me this discover my nearby computers who is running the same problem. Which is similar like the iTunes, can discover nearby computer who enable sharing in the iTunes. How can I implement it using open source library? Also, cross platform is very important. Any ideas on that? Thank you.
Well, Bonjour itself is open source, so you might want to start there...
http://developer.apple.com/opensource/
jmdns is a full Bonjour/Zeroconf implementation written in Java compatible with Apple. There is no dependency on native libraries, it is 100% Java.
http://jmdns.sourceforge.net/
I think you definitely should take a look at UPnP. Considering the cross-platformness of such a solution, and its implementation using Java, you can consider
UPNPLib
Cyberlynk for Java
And even the various ways to connect an OSGi application to UPnP.
Finally, considering existing implementation of Bonjour using Java, this reply to a stackoverflow question sums it up.
You can use Avahi - an open-source implementation for zeroconf, which is the protocol used by iTunes. There's a nice list of options for Java at:
http://elliotth.blogspot.com/2009/03/registering-service-with-dns-sd-from.html
I don't know how far it ever got, but Java had the JXTA project, it might do what you want.