Keyboard shortcut for refactor/selection/editor options in NetBeans?
In NetBeans IDE where you have an icon appear next to a line of code (for example containing refactoring options) what is the keyboard shortcut to expand that menu? Thanks ...
In NetBeans IDE where you have an icon appear next to a line of code (for example containing refactoring options) what is the keyboard shortcut to expand that menu? Thanks ...
Hi experts,,, the two ways that I know to get the page url are: 1.through the applet class: Applet.getDocumentBase() 2.through the netscape javascript library: JSObject.getWindow(this).eval("location.href") First, what are the differences between those two methods and advantages of each, Secondly, can users trick the url of those met...
For some reason our java library that we package as a jar is throwing all of these java.lang.IncompatibleClassChangeError when we try to invoke methods from it. It seems to be seemingly random. What would cause this error? ...
for each project, i able to set environment when i select "run it as" . can i set global environment that all project will inherit when run? ...
We are writing JUnit tests for a class that uses Spring autowiring to inject a dependency which is some instance of an interface. Since the class under test never explicitly instantiates the dependency or has it passed in a constructor, it appears that JMockit doesn't feel obligated to instantiate it either. Up until now we have been us...
Hi, I would like to add on the right column of my site a rotating references section. Each reference would have some text + name of person + company name. It does not need to be structured (open text is also ok). I would then want opencms to rotate between 20 difference references each time a page is displayed. I can keep a session sco...
I am currently using ProcessBuilder to run commands from a java server. This server is to replace an old Perl server, and a lot of our legacy code specifies platform specific command lines. For instance, on windows it might do: command -option "hello world" and on unix it might do: command -option 'hello world' The problem is t...
Hi everyone, I'm new to this site and glad to be here :). I'm not a good java programmer, it's just my hobby, but I'm eager to know more than average stuff. I want to solve a mathematical problem with multiple threads in java. my math problem can be separated into work units, that I want to have solved in several threads. but I don't ...
Description Resource Path Location Type No grammar constraints (DTD or XML schema) detected for the document. TEST-net.kindleit.gae.example.server.MessageRepositoryTest.xml /projecttest-gae-example/target/surefire-reports line 1 XML Problem No grammar constraints (DTD or XML schema) detected for the document. appengine-web.xml ...
I know there is no direct equivalent in Java itself, but perhaps a third party? It is really convenient. Currently I'd like to implement an iterator that yields all nodes in a tree, which is about five lines of code with yield. ...
What’s the equivalent of System.Diagnostics.Debugger.Break(); in the Java world? Purpose: I have a tomcat based webapp launched by a custom build tool and need to debug the application in eclipse. In the .net world the above statement when encountered will prompt the OS to attach a debugger and I can attach Visual Studio to deb...
There have been many threads that correspond to this topic. http://stackoverflow.com/questions/116865/whats-the-current-state-of-closures-in-java http://stackoverflow.com/questions/233579/closures-in-java-7 All of the inputs have been that java 7 is NOT getting closures. It seems however closures will now be in java 7: http://weblogs...
Hi all, The Following is from JavaTM IDL FAQ: How do I connect to a 3rd-party Naming Service from Sun's ORB? The recommended way is to use the Interoperable Naming Service (INS) , if this option is supported by the 3rd-party Naming Service. To use the Sun ORB with another vendor's Naming Service, Start th...
This is the servlet code in java ME. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); ArrayList<String> listName = new ArrayList<String>(); ArrayList<Integer> listLongitude = new ArrayList<Integer>(); ArrayList<I...
How do you set the delimiter for a scanner to either ; or new line? I tried: Scanner.useDelimiter(Pattern.compile("(\n)|;")); But it doesn't work. ...
We're streaming a CSV file from a web service. It appears that we're losing the new line characters when streaming - the client gets the file all on a single line. Any idea what we're doing wrong? Code: public static void writeFile(OutputStream out, File file) throws IOException { BufferedReader input = new BufferedReader(new Fi...
Suppose I have a Java method like: public Ouput respond(Input input) { /* .. */ } The Output object has many fields - some of those fields depend on the Input object but the rest are pre-determined. I want to make the thread which calls respond() to return as fast as possible. For this I want to spawn another thread which pre-creates...
Hi, Is there a way in using externally stored sourcecode and loading it into a Java programm, so that it can be used by it? I would like to have a program that can be altered without editing the complete source code and that this is even possible without compiling this every time. Another advantage is, that I can change parts of the co...
I have a fairly standard creational pattern whereby a class exposes a static method for returning instances of itself, like so: public class MyClass { private MyClass(/*parameter list*/) { // internal construction } public static MyClass GetMyClass(/*parameter list*/) { return new MyClass(/*parameter li...
Hi All, How can I remove email address from a string? And all other digits and special characters? Sample String can be "Hello world my # is 123 mail me @ [email protected]" Out put string should be "Hello world my is mail me" I googled this and found that I can use following regular expressions "[^A-Za-z0-9\\.\\@_\\-~#]+" but tha...