Henadeerage Henadeera

Greenhorn
+ Follow
since Aug 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Henadeerage Henadeera

Thanks for your replies..

My problem background deals with Invasive software composition (ISC) and generating source codes.There is an XML file with slot-names and their values should be composed. My task is to generate composition codes/program. For some slots, I have to determine the value with respect to other slot's value. So I'm trying to embed the java code into xml instead of keep those fields empty , and when auto creating composing codes , if I can evaluate this java string , it will be easy to generate codes by a for loop.

I'm not sure whether I explain this in understandable manner to folk.
10 years ago
Hello,

I have a String variable which contains a java program line. e.g. String Farm_splitingMethod_returnType = "LocalParser.getMethodReturnType("split()");" ;

LocalParser is a class I have developed in the same project. So how I can evaluate the String Farm_splitingMethod_returnType and get a value using Java ?

Thank you very much in advance.
Best regards,
Henadeera

10 years ago

Henadeerage Henadeera wrote:Hello Everybody,

I'm searching a way to import a String value from C/C++ program to Java program in the run time using JNI.
Please anybody, guide me to how to do this using JNI.(I know only to say hello world using JNI )

Thank you very much!
Henadeera




OK I got the right document.
http://download.oracle.com/javase/7/docs/technotes/guides/jni/spec/intro.html#wp16539
12 years ago
Hello Everybody,

I'm searching a way to import a String value from C/C++ program to Java program in the run time using JNI.
Please anybody, guide me to how to do this using JNI.(I know only to say hello world using JNI )

Thank you very much!
Henadeera
12 years ago

Paul Clapham wrote:Well, the page you linked to does say this:

The ThreeTen project is still in Alpha so methods may appear and disappear at any point.



And it says it in boldface as well, meaning it's important. So to me it isn't surprising that you don't have good documentation yet and that things aren't what they seem. That's what "Alpha" means in software development. If you aren't prepared for this sort of thing then you really shouldn't be using the project.




Oh!!! I didn't notice it...
because I found the API doc and it mentions clearly about the use of this class...
I think there may be an updated version of this package...

Anyway thanks for figuring the problem out .
12 years ago
I have no idea ,
How to create TAIInstant type object in order to getTAISeconds()
I tried like this way.(necessary codes are given)

import javax.time.TAIInstant ;

TAIInstant taiinstant = new TAIInstant() ; // here it gives an error. it says it need parameters. When I check the API it has not given the constructor. netbean said it needs long and int //parameters. when I gives dummy val, it says TAIInstant(long,int) has private access in javax.time.TAIInstant

taiinstant.getTAISeconds() ;

below link is for download javax.time.TAIInstant package
http://sourceforge.net/apps/mediawiki/threeten/index.php?title=ThreeTen

please anybody help me, where I have done the mistake???
12 years ago

Rob Spoor wrote:http://sourceforge.net/apps/mediawiki/threeten/index.php?title=ThreeTen



Thank you very much....
12 years ago

Wouter Oet wrote:Out of curiousness: for what kind of application do you need that?

@Steve
Thank you for sharing that as your first post and welcome to the JavaRanch!



At this moment I wanna implement TAI.
How can I get javax.time.UTCInstant package ???
12 years ago

Ernest Friedman-Hill wrote:

Henadeerage Henadeera wrote:
Do you mean that ,using SAX ,can't be updated (insert xml record) an existing XML file ???



That is exactly what I mean. Out of the box, SAX does nothing to help you write XML documents, only read them.

Now, to be fair, you could write a SAX event handler which re-sent the events it received, inserting new events as needed to represent your new or changed content; and then another one which, based on the events it received, wrote out an XML document. Then you could connect the first one to a SAX parser, and the second one to the first one, and you'd end up with a modified XML file. I've seen where people have done things like this, actually. But it's pretty crazy stuff.



Thanks for your explanation. This is really helped me...
12 years ago

Ernest Friedman-Hill wrote:SAX isn't a model; it's a series of events sent while parsing a document, without building up any kind of model. That's why it uses less memory, because there's no model! You therefore can't create a document using SAX -- it doesn't even make sense.



Do you mean that ,using SAX ,can't be updated (insert xml record) an existing XML file ???
12 years ago
Does anybody know
how to insert an XML record to an XML file using SAX model.
I already know how to do it via DOM model. But it is memory intensive.

cheers,
Chinthaka
12 years ago

Does any body knows how to get TAI using Java?
I know Java gives UTC time stamps. But I need a time stamp using TAI (considering leap seconds).
12 years ago