java

Padding error when using RSA Encryption in C# and Decryption in Java

Currently I am receiving the following error when using Java to decrypt a Base64 encoded RSA encrypted string that was made in C#: javax.crypto.BadPaddingException: Not PKCS#1 block type 2 or Zero padding The setup process between the exchange from .NET and Java is done by creating a private key in the .NET key store then from the ...

How can you reference an annotation in a Javadoc?

How can you reference an annotation as a code snippet properly in Javadoc? For example: <code> @Annotation public String field = ""; </code> The @Annotation gets treated as an unrecognized Javadoc tag rather than a code snippet. ...

How to run android emulator with sd card

HI, I download and build android 1.5r3 source. I did 'lunch 1' and then 'make'. And when it is done, I run my emulator like out/host/darwin-x86/bin/emulator -sdcard sd256m.img But when I click 'Gallery', it said 'No Media Found'. I am sure the sd card i created (sd256m.img) has images in there. Can you please tell me why I don't see...

GoogleEarth inside Java Swing

Is it possible to embed a GoogleEarth view inside a Java Swing app? If so, could you please point me to a tutorial explaining how to do it? ...

Why did you stop using Tapestry?

This question goes out to those who have used Tapestry as a web framework and then either gave it up or switched to something else, or even ported their application from Tapestry to something else. The question is why? What led you to make this change? EDIT: Also, what framework (if any) did you change to? ...

Submit xml,saml,... to server in Web service Security

Hi guys. I am developing a web service: Book store and I am going to develop using XML or SAML security. I prepare a form (using JSP, PHP, ASP, ASP.NET ) with some information like: book, bankaccount, amount,... And submit this form to server. How can I do? Please tell me step by step. Thank you so much! ...

Access environment variable from java servlet.

I would like to know if there is any way I can access an environment variable from a java servlet. I know that I can pass params to the servlet using web.xml but I need to pass some value at run-time. The requirement is something like this - A non-web based app running at the server side sets some value (environment variable) and it ...

building a system in Java and assembly language that runs on "bare metal"

Alright everyone, Let's say i wanted to make a system that used only assembly and java, my question would be, as long as i included all of the jvm folders, classes, jars, etc.. java should still function effectively? i understand there are those things that are compiled platform specifically but this is why i am asking, is it...

Java SWT interop with COM - putting a float[] into a Variant?

In my Java SWT application I'm hosting an 3rd party ActiveX control. I'm using OleClientSite to do this. // Ah, this works. :-) OleAutomation comObject = new OleAutomation(...); There are 2 easy little functions I want to call from Java. Here are the COM function definitions: [id(5)] void easyFoo([in] int blah); [id(20)] void proble...

How to connect to SHOUTCAST server using java code

I want to connect my java code with the SHOUTCAST server for the purpose of making an internet radio. So please suggest me how to proceed. And also tell me if the SHOUTCAST source code is available from net. ...

Localizing labels in org.apache.wicket.extensions.yui.calendar.DatePicker

Does anyone know how to localize the "Month", "Year", "Okay" and "Cancel" labels of the org.apache.wicket.extensions.yui.calendar.DatePicker? According to the API you can override the the localize(Map) method to set up localized Strings, but i failed to find out what the names of the corresponding properties are. ...

split a huge XML interms of GB's, retaining header and footer - the same structure

Hi All, My program will be receiving an XML of size upto 8GB to 10GB with the following structure: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA Feeds//EN" ""> <gsafeed> <header> <datasource>Name</datasource> <feedtype>incremental</feedtype> </header> <group> <record url="" action="add" mimetype="t...

How to debug error while compiling gwt source: "An unexpected error has been detected by Java Runtime Environment"?

While compiling gwt source, I get the error : "An unexpected error has been detected by Java Runtime Environment " Following is the hs_err_pid14267.log (error log) file is generated on server How would you debug this? # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f8d00a8d25a,...

Aspectj in spring

I am getting the following error when i try to auto wire aspectj in spring org.xml.sax.SAXParseException: The prefix "aop" for element "aop:aspectj-autoproxy" is not bound. my appContext.xml entry looks like ..... <aop:aspectj-autoproxy/> <bean id="helloFromAspectJ" class="com.cvs.esps.aspect.logging.TestAspect"/> ..... some hel...

Unable to compile class for JSP error?

i want to use the Java program in JSP. i have created java program Helloworld under package sam.jni then in JSP program i called the Java class file using <@ page import="sam.jni.Helloworld"> after deploying the JSP file i am getting unable to compile class for JSP error where am i doing wrong ? ...

JFreeChart for dynamic xy plots in java swing gui application

Has anyone worked with JFreeChart-open source library for plotting xy plots? Could someone post an example of how to create an xy plot dynamically with the x and y values generated from the program? And where can i get a turorial doc or something of that kind to know about how to use the JFreeChart for developing applications? Thanks ...

how to join or Union result of 2 sql queries in single result set

i have 2 tables(result of two separate SQL queries and this result will be contained by List<Object> where each object represents 1 row of the database ) Table_1 Dimension_1 Dimension_2 Fact_1 Table_2 Dimension_1 Dimension_2 Fact_2 I want to join these two result in the RESULTSET AS Table_Resultant Dimension_1 Dimension_2 Fac...

How to manage consecutive column values in table rows

A little presentation for what I want to do: Consider the case where different people from a firm get, once a year, an all expenses paid trip to somewhere. There may be 1000 persons that could qualify for the trip but only 16 places are available. Each of this 16 spots has an associated index which must be from 1 to 16. The ones on th...

Can Variable number of variables with incremental variableNames be created through reflection in Java?

Hi I have the following requirement. I want to create variable number of String arrays in a method, based on the number of levels present. For e.g I have the variable numOfLevels (int) received from a jsp page. Based on this I want to create: String[] level1; String[] level2; String[] level3; String[] level4; etc ... I know my re...

Is customizing DispatcherServlet in Spring MVC a common practice?

Hi, I am new to Spring MVC. But I had certain experience in working with Struts 1.x. I would like to know if it is a common practice to customize DispatcherServlet while working with Spring MVC, like people sometimes customize ActionServlet or RequestProcessor in Struts 1.x? Or let's extend the question a little bit. Where are the entr...