java

What features should C# 4.0 onwards have to encourage switching from Java?

Java is a popular language & platform, having a huge ecosystem. Are there any features that C# 4.0 onwards and its platforms should have, to make you completely switch to C# programming? ...

How do I copy all referenced jars of an eclipse project using ant4eclipse?

I've tried like this (link): <taskdef resource="net/sf/antcontrib/antlib.xml" /> <taskdef resource="net/sf/ant4eclipse/antlib.xml" /> <target name="copy_jars"> <getEclipseClasspath workspace="${basedir}/.." projectname="MyProject" property="classpath" relative="fa...

Encrypt conversations

Hi everyone. I want to develop an application that encrypt all my conversations that I have. MSN conversations, Google Talk conversations, or any other. How can I develop an application like that? What is the best architecture? What can I use to achieve this... What encryption protocol? Thanks. P.S.: I want to use Java. ...

Java unsupported version -- Classic Problem

If you have ever used java I think at least one times you ever got error about unsupported version. Everybody known how to fixed it, change JRE and etc. Today, I would like to know how to make jar file which can run any where (any JRE). ...

How to execute method using spring beans

I need findItemByPIdEndDate() method of the MngtImpl class to be invoked every 5000ms, but nothing appears to be happening. Am I missing something? <bean id="findItemByPIdEndDate" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> <property name="targetObject" ref="MngtImpl"/> <property name="targetMet...

Getting Schema info from XML while validating in Java

Hi, I need to validate XML file against XML Schema so that the schema info is taken from the XML. I have XML document which defines its namespace. Like this: <?xml version="1.0" encoding="UTF-8"?> <myelement xmlns="mynamespace"> </myelement> The schema location is not in the document so I'd need to tell the validator where is the s...

How to call an applet from another Java file?

I have a Java file and from that I want to call an applet file. How to do it? ...

A Java Library for text extraction from PDF documents preserving empty spaces and lines

Hi, do you know a Java library, with which I can extract the text of a PDF document as a string, and which also preserves all empty lines and empty spaces from the original document (as they appear in the pdf document)? I am using right now the PDFTextStripper class from the PDFBox-0.7.3 library, and I use the getText() method, which ...

Unable to access jar file

I have a c# program that access a java program by tcp. In my C# program I'm starting the java program by this line of code: var process = new Process { StartInfo = { UseShellExecute = false, CreateNoWindow = false, FileName = "cmd.exe", Arguments = (@"/c java -ms16m -mx512m -jar pathToJavaApp/javaApp.jar 35...

Achieving Eclipse-like OSGi launcher

Hello All, I am building an OSGi application and need to create an Eclipse-like OSGi application launcher. For those who do not know, when an OSGi application is run through Eclipse's OSGi framework, Equinox launches and automatically manages the order of bundles being started and stopped. From what I have experienced so far, it seems ...

Making simple performance modifications to an already compiled jar?

Like many log4j users, we often have debug level logging that is expensive to evaluate. So we guard those cases with code like: if( _logger.isDebugEnabled ) _logger.debug("Interesting, my foojes are goofed up: " + getFullDetails()) However, that is uglier than a plain _logger.debug call, and sometimes the programmer doesn't realize...

Java serialization problem

I have following code to serialize my data into a file: out = new ObjectOutputStream(new FileOutputStream(file)); out.writeObject(chunk); out.flush(); I read with the following: in = new ObjectInputStream(new FileInputStream(file)); Chunk chunk = (Chunk) in.readObject(); The weird thing is, when I read the data, all members are set...

onApplicationEnd - Is CF actually shutting down?

Hi all I need to use onApplicationEnd() as part of Application.cfc to execute a call on a 3rd party Java object to close a connection to another device on the network. The code I have worked perfectly if I call it as a normal request, but when I place it in the onApplicationEnd() method I'm running into some errors. These errors sugg...

WhichdDatabase would prove efficient?

I have to develop a web application in Java, a pretty big one with loads of data to store and manipulate. I am also planning to use Hibernate and Spring. There are many databases available now like MSSQL Server, MySQL Server, Oracle, db2, etc.. Which do you recommend? Features I look for would be Java - database connection should be ...

Can a shutdown hook rely on another thread?

In a shutdown hook method, I need it to send a message to another process to say it has shutdown. My current message handling code requires that the message be written into a queue, this queue is processed by another thread and sent on to wherever it is going. In this case, to be written into a pipe file by another thread. In a shutdown...

How to monitor the Network usage of a particular interface in Java?

I want to know the exact amount of data which is getting transferred through a particular network interface for logging purpose, is there any standard library or api call from which I can do this in a cross platfrom way? ...

How to use the information in an LTPA token.

Consider the following setup: A webapplication deployed on a Websphere Application Server (6.1 if it matters) the app will get accessed through a webseal reverse proxy the webseal takes care of the authentication and passes on an LTPA token as sign of valid authentication If I got it right, the LTPA token contains information like us...

Axis2 Webservice -> php

Hi! If I have understood Axis2 correct i can construct a WebService and then access it with any SOAP compatible client. I have a java class with a couple of methods that I have written in Eclipse, and then automatically constructed a service with the Axis2 plugin from WTP. This is the methods of my class. public int test(int i){ ...

convert excel cell text into number poi

HAI i want ot convert a cell text value into a number in Excel using POI API. cell text value like '2,345' to conver as a number. How can i do that. if any has face this problem,please let me know... ...

add a chinese character inside a chart element in jasper reports

When i try to display a chinese character inside a chart element(chart name) in jasper reports it doesn't display, i use i18n to take the value from properties file, it reads the keys but fails to display the chinese character. It doesn't display any character except English. this is my jrxml: <parameter na...