|
Okay. The admins may or may not move this, it depends on getting them sober enough for long enough.
BTW, I did not 1 vote your question, I will counter it as it is not deserved.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
hello
I wanna make session between two field in code .bsh (BeanShell) : is sample java code
Internet pages contain the same field Example: Field Name
When entering values in the first field in the first page and move on to the second page must be entered the same values found in the other the right
please i want that code ???
|
|
|
|
|
I want the code to generate everything I need for the project I'm working on, but that doesn't mean I'll get it.
Try to rephrase the question as a first step to make it clearer (I don't understand very much of what you're asking to be honest). And as a second step, try at least to come up with a solution all by yourself, post what you've come up with, and where you got stuck. People will try to help you, but only if you show that you're willing to help yourself.
In the current form of your question, you're highly unlikely to get an answer.
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
modified 2-Aug-12 7:03am.
|
|
|
|
|
Hai,can any one help me in this querry.
I am calling a function 'A' which is in a class 'CA', from a function 'B' which is in the Class 'CB'.If there is any exception produced in function 'A' it will generate an error code(intiger Value)in Catch block.How can i get that error code from the Function A to function B only if the exception had occured.
|
|
|
|
|
If the error code generated by method A on exception is unique (meaning that no normal output from A will ever match that error code), you can simply do this (assuming that error code returned on exception is -1):
if(ca.A() == -1) {
}
Conversely, if you have access to the sources and you are allowed to modify them, don't catch the exception. Modify the CA.A() method signature and add throws ExceptionThrownFromCA (just an example). Like this, you don't even need to check the error code, and you can do this:
public void B() {
CA ca = new CA();
try {
ca.A();
} catch(ExceptionThrownFromCA e) {
}
}
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
modified 1-Aug-12 10:07am.
|
|
|
|
|
Further to the earlier answer:
0. There are no functions. In the OO world, an object supports methods and, in some cases but not Java, properties.
1. If a class throws an exception it must declare it in it's signature:
void methodName() throws MethodException {
...
}
2. An exception is not an error. An exception should be used when you don't know what to do or cannot continue processing. As an example, if you insert a row into a table and it violates a unique constraint then that is an exception. If you try to read a value from a table and it does not exist that is an error.
3. It is advisable to not use an exception to pass results. The choice should be that if an exception is thrown the calling method defaults a result or the called method's return values must include an error range.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Thankyou for your reply .
So what you suggest to do for the above case
|
|
|
|
|
I do not have your code so I cannot possibly say which way is better, that is up to the implementation. If the called method knows what to do irrespective of the caller then the exception should not be thrown up the stack.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Can i make that error code variable as global and when ever i am calling any fuction after that itself i will access the error code and check it.
|
|
|
|
|
There is no such thing as 'global' in java.
One approach is to have an error state within a class, but this may not be appropriate. I would suggest that if you need to have a return code AND an exception then you can always return a composite class:
public class ReturnState {
private final int code;
private final String description;
private final Object object;
private final Exception exception;
public ReturnState (int code,
String description,
Object object,
Exception exception) {
this.code = code;
this.description = description;
this.object = object;
this.exception = exception;
}
public int getCode() {
return this.code;
}
public Exception getException() {
return this.exception;
}
...
}
That said, it is rare that you need BOTH so either have the return codes include errors or use exceptions.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
k
Got it thanks a lot, i will return the exception,according to the exception i will generate the error code in my calling function.
|
|
|
|
|
I work with jee and JSF2.0 and hibernate
I want to access my data in my xhtml page my data are stored in hashset in the managedBean
I don't find how to access this data in html
in java I use this :
public void SaveCommande(Commande c) {
try {
org.hibernate.Transaction tx = session.beginTransaction();
session.save(c);
Iterator it = c.getFichiers().iterator();
while(it.hasNext())
session.save((Fichier)it.next());
tx.commit();
} catch (Exception e) {
e.printStackTrace();
}
}
do you have any idea
|
|
|
|
|
I have this error when I run my project jsf2.0
Avertissement: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectionKeyHandler$CloseHandler.notifyClosed(MonitorableSelectionKeyHandler.java:94)
at com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectionKeyHandler$CloseHandler.remotlyClosed(MonitorableSelectionKeyHandler.java:90)
at com.sun.grizzly.BaseSelectionKeyHandler.notifyRemotlyClose(BaseSelectionKeyHandler.java:233)
at com.sun.grizzly.util.OutputWriter.notifyRemotelyClosed(OutputWriter.java:353)
at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:148)
at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:326)
at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:398)
at com.sun.grizzly.http.SocketChannelOutputBuffer.endRequest(SocketChannelOutputBuffer.java:389)
at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1090)
at com.sun.grizzly.tcp.Response.action(Response.java:268)
at com.sun.grizzly.tcp.Response.finish(Response.java:412)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:341)
at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:187)
at java.nio.channels.Channels$WritableByteChannelImpl.implCloseChannel(Channels.java:469)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:296)
at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:125)
at org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:85)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:591)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
do you have an idea
thanks
|
|
|
|
|
You are trying to invoke a method on an object that is referencing nothing.
Use the debug Luke.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
I have just heard about the 'Designing to Interfaces' concept.
I am required to implement this design methodology very soon, but I am not fully sure how it works.
What I learned so far is this:
Example A
-------------
Here, using a ShapeInterface decouples this Main app from any subshape object (Rectangle, Triangle, etc.).
So if I need to add a Shape type object in the future, I don't have to modify the client code because it's been 'coded to the interface'.
I only have to change the actual implementation in the concrete class itself.
ShapeInterface shape = ShapeFactory.getNewInstance("triangle");
shape.draw();
Example B
-------------
This code is easy to break because this Main app will be tightly coupled to every future shape object I need (if there comes a Rectangle, I will need to change the code to instantiate a Rectangle etc.).
Also, the implementations are different and so I have to apply the appropriate implementation (Rectangle.draw(), Triangle.draw(), etc.)
Triangle triangle = ShapeFactory.getNewInstance("triangle");
triangle.draw();
I understood this concept. Using an interface so that you won't have the change the code that uses the underlying concrete classes. Ok, understandable. I see the advantage.
Here's the concept that [b]I don't understand[/b]:
Example C
-------------
This example illustrates composition instead of inheritance (Object A has an Object B rather than IS-A B).
A can't print directly, it has to delegate to B. Fine, I understand that. What I don't understand is the advantage of this.
Couple of questions:
1) How was it decoupled?
2) Will putting the interface in between A and B decouple their relationship?
3) What if there was no interface between them? Then A would be tightly coupled to B?
4) If B disappears, can I simply replace it with a C class thanks to the interface?
If I don't understand these concepts then I can't move on in my design.
public interface ABInterface {
public void print();
}
public class A implements ABInterface {
private B b;
public A() {
b = new B();
}
public void print() {
b.print();
}
}
public class B implements ABInterface {
public void print(){
System.out.println("Testing B");
}
}
Ok, so that's that. However, I have another big problem:
Say I have a couple of classes that implement a particular interface. Now say that later, there is one method in that interface that I don't need anymore and thus need to delete.
Then it will cause a ripple-effect to the classes that implemented that interface because the implementation won't be correct anymore.
How do I avoid/deal with this?
It's quite a problem..
Any ideas on this?
|
|
|
|
|
Composition allows you to switch the internal implementation of an interface easily. In your example you can easily change A so that it delegates to a new class X instead of B, and the client code won't notice (not even to change a new A() to new X(), or a DI container registration, as with inheritance). You can even write A so that it chooses a different internal implementation class at runtime (for example a file access wrapper which uses a local disk mapper, a memory mapper or a network resource mapper depending on what is passed to a constructor).
Unlike an inherited solution, the class B is totally decoupled from the class which uses A. B can be package-visible, if it's in the same package as A (in .Net it can and probably should be internal).
B won't be decoupled from A as long as A contains a 'new B()' type statement. You can, of course, use the normal interface and DI or factory mechanisms to decouple them, but you have to ask yourself what the purpose of that is, considering that A itself is already little more than a decoupling wrapper class (decoupling B from the outside world).
If you find that a method on an interface isn't used any more, if you're using a decent IDE you can chase down all the implementations in subclasses and remove them as well. Alternatively, if you use @Override annotations, when you remove the interface method, the implementers' methods with @Override will cause a compilation failure (because they're now not overriding anything) and you can go and delete them.
|
|
|
|
|
Well, an IDE shouldn't make up for my design mistakes. I do use @Override annotations (Ant). Going on and deleting each single implementation is not the right way to work. I suppose that if a change in my code (removing a method) causes a waterfall effect (change implementation everywhere) then my code is badly written.
|
|
|
|
|
Discovering that you don't actually need something you thought you did can be a sign of over-design. But we all have to rework and modify our designs as we code – that's fine and a natural part of software development.
|
|
|
|
|
CsTreval wrote: Any ideas on this?
Don't over use it. For that matter don't over use any abstraction concept.
As an example of that one could suppose that because interfaces are "good" and so are factories that every class should have its own interface and its own factory. And that is just wrong.
Also be aware that in terms of management abstraction conceptions via syntax are only self maintaining when there is only one deliverable. So if you have two deliverables (or 20) and you want to remove an interface method from shared code then you are going to need to determine the impact on all of the deliverables.
CsTreval wrote: This example illustrates composition instead of inheritance
You should strive to favor composition over inheritance. Or more specifically do not over use inheritance and specifically be wary of using inheritance solely as a mechanism to facilitate shared behavior (only.)
CsTreval wrote: 1) How was it decoupled?
Answered by other responder.
CsTreval wrote: 2) Will putting the interface in between A and B decouple their relationship?
Yes. However whether it is appropriate or not is a different question.
CsTreval wrote: 3) What if there was no interface between them? Then A would be tightly coupled to B?
Yes. Again though that might not be appropriate. And especially for this specific example since 'print' suggests something that is very specific.
CsTreval wrote: 4) If B disappears, can I simply replace it with a C class thanks to the interface?
Not sure what the question is.
If you delete B and create C then updating A is still going to be easy even if B/C didn't implement ABInterface. For your example the same work would be required with or without the interface.
|
|
|
|
|
hello everyone
could someone please help me to convert this java code to c#, i have been trying for a week and i am getting very frustrating...
public static void printTicket(final Ticket ticket) throws Exception {
Job job = new Job()
{
@Override
public Object run() {
PosPrinter posPrinter = null;
try
{
if(PrintConfig.getReceiptPrinterType() == PrinterType.OS_PRINTER) {
JReportPrintService.printTicket(ticket);
return null;
}
Restaurant restaurant = RestaurantDAO.getInstance().get(Integer.valueOf(1));
posPrinter = new PosPrinter(PrintConfig.getJavaPosReceiptPrinterName(),
PrintConfig.getCashDrawerName());
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText("\u001b|cA\u001b|2C" + restaurant.getName());
posPrinter.endLine();
if (restaurant.getAddressLine1() != null) {
printCentered(posPrinter, restaurant.getAddressLine1());
}
if (restaurant.getAddressLine2() != null) {
printCentered(posPrinter, restaurant.getAddressLine2());
}
if (restaurant.getAddressLine3() != null) {
printCentered(posPrinter, restaurant.getAddressLine3());
}
if (restaurant.getTelephone() != null) {
printCentered(posPrinter, restaurant.getTelephone());
}
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(com.floreantpos.POSConstants.CHK_NO);
posPrinter.printText(String.valueOf(ticket.getId()));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(com.floreantpos.POSConstants.TBL_);
posPrinter.printText(String.valueOf(ticket.getTableNumber()));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(com.floreantpos.POSConstants.GUEST + " #");
posPrinter.printText(String.valueOf(ticket.getNumberOfGuests()));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(com.floreantpos.POSConstants.SRV_);
posPrinter.printText(String.valueOf(ticket.getOwner().getUserId() + "/" +
ticket.getOwner()));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(com.floreantpos.POSConstants.DATE + ": ");
posPrinter.printText(Application.formatDate(new Date()));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
printFirstColumn(posPrinter, com.floreantpos.POSConstants.QTY,
firstColumnLength);
printSecondColumn(posPrinter, com.floreantpos.POSConstants.ITEM,
firstColumnLength, secondColumnLength, false);
printThirdColumn(posPrinter, com.floreantpos.POSConstants.UPRICE,
thirdColumnLength);
printFourthColumn(posPrinter, com.floreantpos.POSConstants.SUBTOTAL,
fourthColumnLength);
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("", totalLength, "_"));
posPrinter.endLine();
List<TicketItem> ticketItems = ticket.getTicketItems();
if (ticketItems != null) {
for (TicketItem ticketItem : ticketItems) {
posPrinter.beginLine(PosPrinter.SIZE_0);
printFirstColumn(posPrinter, String.valueOf(ticketItem.getItemCount()),
firstColumnLength);
printSecondColumn(posPrinter, ticketItem.getName(), firstColumnLength,
secondColumnLength, false);
printThirdColumn(posPrinter,
Application.formatNumber(ticketItem.getUnitPrice()),
thirdColumnLength);
printFourthColumn(posPrinter,
Application.formatNumber(ticketItem
.getSubtotalAmountWithoutModifiers()), fourthColumnLength);
posPrinter.endLine();
List<TicketItemModifierGroup> modifierGroups =
ticketItem.getTicketItemModifierGroups();
if (modifierGroups != null) {
for (TicketItemModifierGroup modifierGroup : modifierGroups) {
List<TicketItemModifier> modifiers =
modifierGroup.getTicketItemModifiers();
if (modifiers != null) {
for (TicketItemModifier modifier : modifiers) {
if (modifier.getTotalAmount() == 0) {
continue;
}
boolean extra = false;
String display = " - " + modifier.getName();
if (modifier.getModifierType() ==
TicketItemModifier.EXTRA_MODIFIER) {
display = " - Extra " + display;
extra = true;
}
posPrinter.beginLine(PosPrinter.SIZE_0);
printFirstColumn(posPrinter,
String.valueOf(modifier.getItemCount()), firstColumnLength);
printSecondColumn(posPrinter, display, firstColumnLength,
secondColumnLength, false);
if(extra) {
printThirdColumn(posPrinter, Application.formatNumber
(modifier.getExtraUnitPrice()), thirdColumnLength);
}
else {
printThirdColumn(posPrinter, Application.formatNumber
(modifier.getUnitPrice()), thirdColumnLength);
}
printFourthColumn(posPrinter, Application.formatNumber
(modifier.getTotalAmount()), fourthColumnLength);
posPrinter.endLine();
}
}
}
}
}
}
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("", totalLength, "_"));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("SUB-TOTAL " + ":", 32));
posPrinter.printText(StringUtils.leftPad(Application.formatNumber(ticket
.getSubtotalAmount()), 10));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("TAX " + ":", 32));
posPrinter.printText(StringUtils.leftPad(Application.formatNumber(ticket
.getTaxAmount()), 10));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("GRAND TOTAL " + ":", 32));
posPrinter.printText(StringUtils.leftPad(Application.formatNumber(ticket
.getTotalAmount()), 10));
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("TIP " + ":", 32));
if (ticket.getGratuity() != null) {
posPrinter.printText(StringUtils.leftPad(Application.formatNumber(ticket
.getGratuity().getAmount()), 10));
}
posPrinter.endLine();
posPrinter.beginLine(PosPrinter.SIZE_0);
posPrinter.printText(StringUtils.leftPad("TOTAL " + ":", 32));
posPrinter.endLine();
printCentered(posPrinter, "THANK YOU!!");
printCentered(posPrinter, "PLEASE COME AGAIN!!!");
posPrinter.printCutPartial();
}
catch(Exception x) {
logger.error("Error while printing ticket", x);
}
finally {
if (posPrinter != null) {
posPrinter.finalize();
}
}
return null;
}
};
Worker.post(job);
}
The problem I'm getting is, when i try to convert from java to c#, for some reason it highlights the code (see the three lines on the source code underlined) and it says (the base type is not defined)
Hence I'm very new to this so any help it would mean a world to me...
thanks in advance
kind regards
lapeci
|
|
|
|
|
C# does not have a Job class or an Object class like Java. You may have to implement your own variation of the Job class and Object class. Good luck on that
@Override is Java specific and C# doesn't use it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: or an Object class like Java.
What does "like Java" mean?
C# certainly does have an Object class.
|
|
|
|
|
I stand corrected
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Do you actually understand what the code you have posted is doing? That is a very important first step before you try to convert it!
|
|
|
|
|
Why not use jni4net? Allows the inter-call between Java or Dot.Net?
http://jni4net.sourceforge.net/
A shady programmer working at a shady company
|
|
|
|
|