How can I excute Notepad by Java code
I want to excute Notepad program in MS Windows by Java code to open my text file. Pls help me to do that. ...
I want to excute Notepad program in MS Windows by Java code to open my text file. Pls help me to do that. ...
Hi! I currently participate in a project where we/the applicaition need to be able to discover other instances of the application with the same application name running on a LAN (henceforth called Node). Prerequisites: All Nodes know their own IP address and TCP port number All Nodes have a name All Nodes have access to the LAN What I...
This is a piece of my freemarker template: ${order.needByDate?if_exists?date} I want it to work as following: if needByDate is null, then write nothing if it is not null, then write the date part The above works only in second scenario. What is the correct way to achieve this? ...
Can I use the AST / JDT for other languages? for example to write my own parser for C# that uses somehow the AST technology? ...
Hi, everyone I am using BlazeDS for data-push feature in my Flex application project. From the official tutorial, Getting started with BlazeDS, it shows messaging example with producer/consumer from API. but how can I implement server side which doesn't need to be invoke from Flex client, but from within server-side instead. I got some...
I'm looking for a nice template engine or short piece of code to expand Ant-like variables in a string in Java. Example: String result = expand ("${firstName} ${familyName}", map); It should at least support java.util.Map but something that can handle beans or recursive lookups or lookups in a list of maps/objects would be welcome, to...
Hello all, I am testing WebLogic 10.3.1 JMS, but there has a problem. My Testing step: Start WebLogic Server Start JMS Client Client send a object to WebLogic JMS and server received the object. Stop WebLogic Server Send another object to WebLogic JMS. What I expect is a exception come out, but there have not anything appear and pr...
My environment is JBOSS AS 5.1.0-GA, Struts 2.1.8 and RESTEasy 1.2.GA When posting to my service I get a NPE on the Block getter which is being called from the @Consumes annotation. I'm some what at a loss as to what it could be and any help would be greatly appreciated. Thank you in advance. Jono public class MyForm { @FormP...
I have inherited a webapp built using NetBean's internal ant. All jsps reside in: WEB-INF/jsp And the web.xml has hardcoded links to /WEB-INF/jsp/somefile.jsp How can I use the maven war plugin to place the JSP there, maintaining consistency with the current structure ? My pom currently reads: <warSourceDirectory>${basedir}/web/WE...
I found a scenario that uses com.sun.jndi.toolkit.UrlUtil class in a source cods. I can find this class in rt.jar in Standard Java Distribution. But I cannot find any API documentation for classes in this package. Why these classes are hidden? Are there any drawbacks in using those classes in my code? ...
I need to offer SSO for Windows users in a Seam web application. In our previous project (non-Seam) we used a modified jcifs NTLM filter to handle this, but the solution is crappy, cannot support NTLMv2 and is not supported by jcifs anymore. JBossNegotiation seems to offer SPNEGO support for JBoss, but I couldn't find any information on...
Say I have a C++ DLL with a single exported method such as: CustomerProcessor* getInstance(); i.e. it simply returns an instance of the class that actually contains the methods I need to call. I know I can map the getInstance() method to a Class in Java using JNA (extending com.sun.jna.Library), store the returned CustomerProcessor i...
I am trying to configure cruisecontrol to use Tomcat rather then Jetty servlet engine. I am following a tutorial on this and I am stuck on where it says: Pass startup parameter to tomcat. -Ddashboard.config=/home/cruisecontrol/work/dashboard-config.xml Where do I put this in which file in tomact is it the startup.sh in tomcat directo...
I have a query that joins 5 tables. Then I fill my hand-made object with the column values that I need. What are solutions here that are wide-common to solve that problem using specific tools ? are there such tools? I'm only beginning to learn Hibernate, so my question would be: is Hibernate the right decision for this problem? Hibern...
Here is my use case, I have an object that is logically equal to my HashMap key but not the same object (not ==). I need to get the actuall key object out of the HashMap so that i can synchronise on it. I am aware that i can iterate over the ketSet, but this is slow in comparison to hashing. Looking through the java.util.HashMap impleme...
Hi all, I am new to javascript. How to write javascript function which will return installed java version in the computer. Thanks Sunil Kumar Sahoo ...
Hi I want to write a shell scripting which will return the installed JRE version. How to write shell script file to achieve the above. If I write java -version then the application returns "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)". But I donot want any strin...
I need steps to get data from my GPS-GPRS data.I need to undersatnd the data flow and how to convert the data into google map.I have device that transmit data from the device to gsm using gprs to datacanter.I like to crate my own software which should get data from device into PC(wireless connection) or internet. ...
I've been caught catching SocketExceptions belonging to subspecies like for example Broken pipe or Connection reset. The question is what to do with the slippery bastards once they're caught. Which ones may I happily ignore and which need further attention? I'm looking for a list of different SocketExceptions and their causes. ...
Hi, I am using JDOM to create XML and during parsing i am getting this exception "Could not find class 'java.rmi.RemoteException', referenced from method org.jdom.JDOMException.getNestedException " which cause a crash in program .This exception occurs very frequently but not always Any body has faced same problem . Any help would be ...