I need to make a small test program in java which has to communicate with remote Windows server using telnet, or openSSH. Which library would you suggest to use? I'd like to use a well documented and stable library.
Dear all,
I want to integrate facebook api in my webapplication ,from where i can login a user ,gets his online friends ,sends notification messages,logout a user.plese suggesting which api to usein java.
I have a dll namely product.dll created using .net. How can i access that dll's constructor or method using java code.. Is it possible to access without using JNI?
Hello
We are using sqllite056 jar in our code. While inserting into database in batch we are getting exception on line when we going to commit.
Lines of Code
<object of Connection> .commit();
<object of Connection>.setAutoCommit(true);
Exception
java.sql.SQLException: database locked
I use a large (millions) entries hashmap to cache values needed by an algorithm, the key is a combination of two objects as a long. Since it grows continuously (because keys in the map changes, so old ones are not needed anymore) it would be nice to be able to force wiping all the data contained in it and start again during the execution, is there a way to do effectively in Java?
I mean release the associated memory (about 1-1.5gb of hashmap) and restart from the empty hashmap..
Is there any Java profiler that allows profiling short-lived applications? The profilers I found so far seem to work with applications that keep running until user termination. However, I want to profile applications that work like command-line utilities, it runs and exits immediately. Tools like visualvm or NetBeans Profiler do not even recognize that the application was ran.
I am looking for something similar to Python's cProfile, in that the profiler result is returned when the application exits.
Hello,
I have a test class that has a @Resource annotation for a setter and I need to make it Java 1.4 compliant, so obviously the annotation has to go. I'm using Spring.
So, how would I replace something like @Resource("my.resource") so that the setter gets the correct dependency injection? Would I need to make a bean in an xml file?
I'm pretty new to this so if I'm not providing enough information, let me know.
I want to build a web services client that takes wsdl link as the input and generates java classes. I know we can do this directly using Netbeans IDE where we provide the wsdl location during project setup. But I want the wsdl location to be provided when the client starts running. How do I do this?
I need to determine the current state of the Shift key, but at the time I need the state I don't have an InputEvent object around. I need something like java.awt.Toolkit.getLockingKeyState(int) that works for Shift, not just the locking keys like VK_CAPS_LOCK. Is there a way I can do this without listening to input events and storing the for later when I need to check the state?
Thanks!
I'm running an application from inside another one for testing pusposes. I want to redirect the output for the tested app to a file, so I can have a log after each test.
Is there to redirect the output of an app to a file from the command line in java?
I'm coding a software on java and i almost finished, i would like to know how can we create a trial version which work for example for 30 days, because i will to send it to some companies
so how to make it like shareware or trialware, also can we block access to the .class in the jar file?
Thank you
I would like to program Java servlets using Eclipse and I plan on deploying them using Tomcat. I think I can build the projects using Ant which is bundled with Eclipse. I have the standard Eclipse IDE. What options do I have for doing Servlet development in Eclipse? What changes do I need to make to Eclipse? Do I need to install a plug-in?
Does anyone know what approach one can take to automatically generate Java source code, from for example an xml or json file, in eclipse?
One great example of what I am thinking of doing is what Google Android sdk does: they have an R class generated automatically from the resources.
Every time a resource file is saved in Eclipse R class is automatically regenerated.
Thanks!
In C# you can easily read all classes from a given assembly.
I'm looking for equivalent feature in Java. I need this to automatically bind EJB beans to my Guice Module.
Hi there,
is it possible to start a new thread in a different process in Java?
I mean, I'm running a specific process and main thread, issuing ProcessBuilder for creating a new process. Before start() method is invoked, one must provide the command to be run in another process. Is it possible to start a new thread in newly created process?
Thank you in advance for the reply.
Best regards.
Hi there,
I created a program that contains linked lists that are passed various methods. While this works just fine in Java... a style checker program we have to use doesn't like it
It says: Declaring variables, return values or parameters of
type 'LinkedList' is not allowed.
If I declare them as simply List then I don't have access to the methods I want. What should I do?
Hi,
After I read Bloch's discussion http://www.infoq.com/news/2010/04/bloch_java_future
I started to think about "Do I have to switch to scala for new web developements" or is java preferred in all cases. What is your opinion ?
Thanks,
Hi crew,
I'm searching for a tool, which converts a jsp file into a java file without using a server like tomcat or something else.
Can anyone help me out?
I want to make Java JDialog appear like it is presented in the [Image][1]
[1]: http://lh4.ggpht.com/_AnzmYq61hHI/S8RTAznktKI/AAAAAAAAAW0/c4HVCuchdjc/s1600-h/saveConfiguration%5B2%5D.jpg using JDK 6 Swing. Is it possible? if so kindly guide me.
Image Link