java

Projects from Eclipse Package Explorer

hi! I develop an Eclipse plugin project, I started a few days ago and I have a question. My plugin works, my plugin toolbar has a button, named Extract the project. When I click on this button, the plugin writes the names of the open projects from the Package Explorer. How I can get the names of the projects from the package explorer? ...

Can I change where the WTK emulator stores its files?

By default, the WTK emulator saves things like files and RMS records under C:\Documents and Settings\username\j2mewtk\2.5.2\appdb Can I change this somehow? ...

Retrieving byte array of unknow length from Java store

I already posted a question regarding it, but at that time I haven't have the account. I got a reply but I was still confused and I cannot continue on that thread. I am re posting the question again along with a link to previous conversation. Returning char array from java to string - JNI The data I am storing in Java is serialized. I...

Profiling doesn't work on WTK emulator

It used to work, so I know what's meant to happen. You run the emulator and once you're done with it and close it a profiling window pops up and gives you a summary of time spent in different methods. It seems to have stopped working for me. I run my app in the emulator, close it and get this on the console instead: Warning: Could not ...

Struts, JSF like MVC framework in .Net

I am from J2EE background and recently started looking into .Net. I am wondering if .Net have Struts, JSF like MVC framework available? ...

Java:XML Parser

Hi, I have a response XML something like this - <Response> <aa> <Fromhere> <a1>Content</a1> <a2>Content</a2> </Fromhere> </aa> </Response> I want to extract the whole content from <Fromhere> to </Fromhere> in a string. Is it possible to do that through any string function or through XML parser? Please advice. ...

jface TableViewer ViewerCell editElement based on Column

I have set up the Following: tv = new TableViewer(tableComposite, SWT.FULL_SELECTION | SWT.BORDER); ...//labelProvider, Properties, etc. ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(tv) { protected boolean isEditorActivationEvent( ColumnViewerEditorActivationEvent event) { ...

Is it worth mitigating against the effects of garbage collection?

I have an application where the memory profile looks something like this: The slow upwards crawl of memory usage is caused by the allocation of lots and lots of small, simple, transient objects. In low-memory situations (This is a mobile app) the GC overhead is noticeable when compared to less restrictive memory amounts. Since we kno...

Lucene Error While Reading binary block : java.io.EOFException

Hi, I am getting java.io.EOFException while reading a binary block from lucene index. I am storing java object as byte-array in lucene index field and reading it when hit occurs. Here is stack trace : Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281) at java.io....

Displaying image in HTML and JSP code

How can I display image from database in HTML and JSP code? I wrote this code in JSP. <?xml version="1.0" encoding="UTF-8" ?> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page language="java" %> <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="java.util.*"%> ...

How to programmatically generate an EMF model (.ecore, .genmodel) from XSD schema?

I have been trying to do this as the last stage in a standalone application to convert from the file format used by a modeling program to an EMF model. I am able to convert the original format to XSD, which I can manually convert to an EMF model using the Eclipse importer, but I do not know how to do this programmatically to automate the...

Creating A Table From Linked-objects Model

Hello Guys, I have the following model which makes an element a parent of the element that follows it. For example i get data from a server in an array of arrays like this: net Person age net Person height net Address streetname org Company name org Company location com Schoo...

Efficient look-up in a List

Hi, I have a situation whereby I'm populating an ArrayList with "TransactionEvent"s. TransactionEvent has a property "transaction ID". In the large majority of cases each new event has a transaction ID greater the previous event's ID - However, this is not guaranteed; i.e. the data is almost sorted. My question is this: How can I per...

Newbie question about Java

Okay, I know that Java is a language but somebody has asked me if they can write a web application to interface in with a web app I've written in ASP.NET. I'm implementing a web service to serve up an XML so it's pretty language agnostic. However, I'm not 100% sure whether going down the Java route makes a lot of sense. I was kind of ex...

Return XML Response in REST Service

Hi. I am writing a RESTful web service where in I want to return a XML containing some resultset. I have used XSTREAM and parsed the object into XML string. Since I need to return this string, I need to know how to pass it back to the calling client. One way is to return the RESPONSE to the calling client. And my sample code here show...

java-oracle9i /10g connectivity

hey.. i was trying java and oracle 9i connectivity for a long time i tried different ways the program is getting compiled very well at execution time its showing me an error stating " no classdeffounderror" wat shud i do?please sumbody provide me a solution to this(i tried setting the class path in all ways... )i need it as soon as posib...

Handling Character Encoding in URI on Tomcat

On the web site I am trying to help with, user can type in an URL in the browser, like following Chinese characters, http://localhost:8080?a=测试 On server, we get GET /a=%E6%B5%8B%E8%AF%95 HTTP/1.1 As you can see, it's UTF-8 encoded, then URL encoded. We can handle this correctly by setting encoding to UTF-8 in Tomcat. However...

Java Oracle insert Query

Hi I am trying to insert user's input in oracle using Java JDBC. I have to use Insert query. Oracle's column type is varchar2. I am able to insert if user is not entering special character. when user enter special character like # ? / and $ it gives exception Please help to parse these special character. i need to use insert query ...

Are there any other Java libraries for bonjour/zeroconf apart from JMDNS?

Are there any other Java libraries for bonjour/zeroconf apart from JMDNS? ...

SSLHandshakeException unknown_ca apns java

I am trying to implement a standalone application for iphone; for which I wish to use Apple Push notification for iphone clients. I am getting javax.net.ssl.SSLHandshakeException: Received fatal alert: unknown_ca Following is my Java code to connect to apns gateway: int port = 2195; String hostname = "gateway.sandbox.push.apple.com"; ...