How to convert a Java Program into a Service?
Hello Experts,
We want to convert a java program into a Service (not WebService).
then we want to consume this service through SAP PI.
Can any1 please give details as to how can we convert a java program into a service.
Thanks in advance,
~ Suraj
Hi Suraj,
Unfortunately this information is still not enough. Probably I cannot understand right what you are trying to do.
To work with tables and databases SAP uses several specifications, for example JPA API, Java Dictionary and so on. But I am not sure if this is what you need.
Best regards,
Ekaterina
Similar Messages
-
How to convert a webpage program into a pdf file?
how to convert a webpage program into a pdf file?
Hi Federico,
ExportPDF is the program to convert PDF into different Formats(Doc, Docx, xlsx, rtf) and not Vice Versa, I would suggest you to use CreatePDF Web application for converting any other format to PDF.
For more details on CreatePDF
https://www.acrobat.com/createpdf/en/home.html
FAQ to be found here:
http://forums.adobe.com/community/createpdf?view=documents
~Pranav -
JavaService - can install java program into win2k service, but cannot run
i have a JavaService problem: i can install java program into win2k service, but cannot run
the version of javaservice is 2.0.7.0
the following is the message:
C:\DailyUpdate\dist>JavaService.exe -install DailyUpdate C:\Program Files\Java\j
dk1.5.0_05\jre\bin\client\jvm.dll -Djava.class.path=C:\DailyUpdate\dist\ftpbean.
jar;C:\DailyUpdate\dist\mysql-connector-java-3.0.10-stable-bin.jar;C:\DailyUpdat
e\dist\DailyUpdater.jar -Xms16M -Xmx64M -start DailyUpdateHandler -params C:\Dai
lyUpdate\dist -out C:\DailyUpdate\dist\logs\out.log -err C:\DailyUpdate\dist\lo
gs\err.log
The DailyUpdate automatic service was successfully installed
The DailyUpdate service is starting.
The DailyUpdate service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.I might be doing some programming for my company soon
which will require a program to monitor a database
and whenever there is a change to certain fields, it
must copy certain fields into another database. When I see "whenever thiere is a change to certain fields" I tend to think "triggers" - but maybe this won't work for you 'cause of the "another database" part. And the fact that triggers are inherently evil.
[snip]
Is it possible to run a Java program as a windows
service? And if so then how would you go about it? I'd hit Google - there're a couple ways to do this.
[snip]
Also,...if I were to use one of those programs which
can make an .exe of a Java program, then do you still
require the JRE to be on the machine? It depends on how you did the conversion. If you compile to native then no, if you just wrap up a JRE then yes.
Why I ask is
that I occasionally get asked to do small development
projects for my company, but we are a microsoft
partner and therefore do all the development in C#
and the like. So I would like to just implement as
many things in Java as I can, just to show everyone
that Java can do exactly what C# can do. But its
difficult to convince people of this since I always
require the JRE and they dont. Of course, they require the .NET framework and you don't. And last I looked that thing was around 23 Meg. -
How can I convert a Java program into a screen saver ?
I want to write a screen saver in Java, which is to be run under Window 95 platform. However, I don't know how to convert a .class file into a .scr file ?
A SCR File is just an renamed exe file. So what you need is an CLASS2EXE converter (there are some around) and than simply rename the file to scr.
Dont forget the special parameters scr files have, like /s or /c for config...look up in google for those. -
How to Convert an RMI Server into WINNT service
I have an RMI Server, that looks like the following
SimpleRMIServer.java
import java.io.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.*;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class SimpleRMIServer
public static void main(String[] argv) {
System.setSecurityManager(new RMISecurityManager());
try {
LocateRegistry.createRegistry(1099);
SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
// SimpleRMIImpl implementation = new SimpleRMIImpl("SimpleRMIImpl instance");
System.out.println("SimpleRMIImpl ready");
catch (Exception e) {
System.out.println("Exception occurred: " + e);
the SimpleRMIImpl.java also is available. (SimpleRMIImpl.class)
now the problem is how to convert this Server to a service.
I have seen a java class that extends a service class have been converted to a service like the following
TestService.java
// TestService.java
// (C) Copyright 1995 - 1999 Microsoft Corporation. All rights reserved.
import java.io.*;
import com.ms.service.*;
public
class TestService extends Service
static
// Uncomment to disable the assassin. The service will fail to respond
// in the time specified in the last waithint for the third pause
// event received. If the assassin is enabled (i.e. this line is commented
// out, the default), then the service will be forcibly killed.
//Service.disableassassin = true;
int pausecount;
int intcount;
public TestService (String[] args) throws IOException
System.out.println("Sending updated pending status");
CheckPoint(1000);
System.out.println("Sending running status with all controls");
setRunning(ACCEPT_SHUTDOWN | ACCEPT_PAUSE_CONTINUE | ACCEPT_STOP);
System.out.println("Started");
protected
boolean handleStop ()
setStopping(5000);
System.out.println("dying");
return true;
protected
boolean handlePause ()
pausecount++;
if (pausecount == 3)
System.out.println("pause #3, sleeping for 30 seconds, should be killed in 2+5 seconds");
setPausing(2000);
try
Thread.sleep(30000);
catch (InterruptedException e)
System.out.println("interrupted");
else
System.out.println("received pause #"+pausecount+", pausing for 2 seconds");
setPausing(5000);
try
Thread.sleep(2000);
catch (InterruptedException e)
System.out.println("interrupted");
System.out.println("sending paused");
setPaused();
System.out.println("sent paused");
return false;
protected
boolean handleContinue ()
System.out.println("received continue, continuing after 2 seconds");
setContinuing(5000);
try
Thread.sleep(2000);
catch (InterruptedException e)
System.out.println("interrupted");
System.out.println("sending running");
setRunning();
System.out.println("sent running after continue");
return false;
protected
boolean handleShutdown ()
System.out.println("received shutdown, treating as stop");
return handleStop();
protected
boolean handleInterrogate ()
System.out.println("received interrogate");
setServiceStatus(getServiceStatus());
System.out.println("sent status for interrogate");
intcount++;
if (intcount == 3)
System.out.println("received 3rd interrogate, stopping self in 5 seconds");
try
Thread.sleep(5000);
catch (InterruptedException iex)
System.out.println("interrupted");
System.out.println("stopping");
StopServiceEventHandler(1000);
return false;
using the jntsvc.exe tool, that code have been converted to an executable, then installed as a service.
I've tried to embed the RMIServer code in the constructor for this service, but it didn't work
Hope you have a clear understanding of what I'm saying
any help, highly appreciated
thanx in advance
here is my email [email protected]
regardsOur second installment of "Questions from the Past"
Dear viewer, check out Tomcat's source, I believe they implement Tomcat as a service so just follow what they did.
Steve - your answer Guru
Tune in next week for our third installment of "Questions from the past" -
How to put a Java Program into the System tray
Hi all of the forum!!
I have a question. I want to make a monitor program but I don't know how to put the program in the system tray or just to execute the program but automatically (no manual execute), but i dont want that the program appear in a window, just start to function when i start my PC. i hope anybody help me.
Thanks
Best Regards
Bucio, FranciscoThere is a plenty of similar topics here, so you can use the Search on this forum or in Google to find out.
But shortly, you will need to use JNI or get a ready-to-use library like JNIWrapper (http://www.jniwrapper.com/winpack.jsp#tray), for example, that lets you do what you want.
Good luck,
EToporov -
How to convert my JavaFX application into a service
Dear Folks,
I have developed an JavaFX application to view images with functionalities to apply various effects to images, play as slide show..etc
I would like to make this as an service so that, a third party can make use of the service, add to his mashup and run this application in their mashup.
How do I achieve this?Tell them to include the browser's JNLP on their server and the related JavaScript code to their page?
-
Hi,
I have done googling for how to convert org.dom4j.Document into org.w3c.dom.Document , but could not get any usefull data.
If any one is having solution or any idea, please reply.
Thanks in advance
<!--Session data-->Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.
-
How to run a java program without Java Compiler
I have a small project and I want share it with my friends but my friend'pc have not
Java compiler.
for example, I writen a application like YM, then 2cp can sent,receive messege. My cumputer run as Server, and my frien PC run as client.
How can my friend run it? or how to create an icon in dektop tu run a java program..??..
(sorry about my English but U still understand what i mean (:-:)) )To run a program you don't need a Java compiler. Just the Java Runtime Engine. That can be downloaded from the Sun website and comes with an installer.
You could then turn your application into an executable jar file and start it somehow like jar myYM.
There is also software that packs a Java program into an executable file. I've never used that but one that comes to my mind is JexePack. It's for free if you can live with a copyright message popping up every time you start the program.
http://www.duckware.com/jexepack/index.html -
How to convert a .alsx file into pdf
How to convert a .alsx file into pdf
Iam facing this problem since many days please resolve it
http://www.roothow.com
Thankls in adavance>But, from the windows explorer, if i do a right clic on the word document, with the context menu, i can directly convert to PDF
This is equivalent to using the PDFMaker facility in Word - that is,
the Acrobat button. Which is also the same thing that is done when you
use File > Create PDF > From File in Acrobat.
What it does is print to a PS file *and* do a lot of additional
processing to write stuff about links, tags etc. into the PS file.
>(no tmp PS file is used, cause the links are still working).
This isn't true, but it's certainly the case that you won't get links.
There seems to be no API, via any mechanism, still less the "obsolete"
(Microsoft's view) command line, to use PDFMaker from your program.
Aandi Inston -
How to execute a java program by clicking !?!?
Just a click to execute a java program?!!
Like the ".exe" in Windows or "x" permission in Unix ?!?!?!
How can I do that?
And how to set a java program file to display as a personal icon? (My Icon)
:-)Well this is what I do in Windows (I use XP but it works in others):
First you have to make sure all the class files are in the same folder (duh)
Then you copy your java.exe from your jre folder into the folder with all your class files.
Finally, you create a shortcut to java.exe and add your class name to the command line on the shortcut.
Now all you have to do is double click on the shortcut and your program runs. Sure it's not that pretty but it works. -
How to make a Java program that recognises a function of two variables...
How to make a Java program that recognises a function of two variables to assign values to that?
First I will give an example and then do the question.
Ex1.
We have any function, eg.y = x ^ 2 + 1 (read 'y' equals 'x' high to the square), a function of the second degree.
To build the graph of this function attach values to 'x' to find the values of 'y'
And thus mount the pair ordered (x, y) which represents a point on the Cartesian plane.
Assigning values to 'x' 'we can build up a table that gives us the pairs ordered:
We can use any numbers, but arfer interval [-3.3]
X | y = x ^ 2 + 1
-3 | Y = (-3) ^ 2 +1 = 10
-2 | Y = (-2) ^ 2 +1 = 5
-1 | Y = (-1) ^ 2 +1 = 2
0 | y = (0) ^ 2 +1 = 1
1 | y = (1) ^ 2 +1 = 2
2 | y = (2) ^ 2 +1 = 5
3 | y = (3) ^ 2 +1 = 10
We then ordered the pairs:
(-3.10), (-2.5); (-1.2), (0,1), (1,2), (2,5), (3,10)
Tabem that can be represented by a table:
X | y
-3 | Y = 10
-2 | Y = 5
-1 | Y = 2
0 | y = 1
1 | y = 2
2 | y = 5
3 | y = 10
Now I begin to explain my doubts.
See this program:
Ex2
* To change this template, choose Tools | Templates
* And open the template in the editor.
Encontrando_o_valor_de_y package;
* @ Author des Soldat Gottes
Import javax.swing.JOptionPane;
Public class (Main
* @ Param args the command line arguments
Public static void main (String [] args) (
Int x, y;
String x1;
X1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
"Assign a value for 'x',"); / / receives a value for the function y = x + 1
X = Integer.parseInt (x1); / / tranforma String in int
Y = x + 1; / / receives the value of 'x' and calculates' y '
JOptionPane.showMessageDialog (null, "The value of 'y' is: \ t \ t" + y);
/ / Displays the value of 'y'
System.exit (0);
We see that the program receives above a value for 'x' and replaces the function contained in the program, y = x + 1, and so is the value of the variable 'y'.
In: x1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
"Assign a value for 'x',");
The entry is a number and that number is assigned aa ja existing function in the (y = x + 1).
The question is: would it be possible to come to a function?
Ex: the program ask: DIGITE THE FUNCTION?
The USUARIO DIGITARIA A FUNCTION ANY, TYPE: y = x ^ 2 +1
The program would recognize the function and give numerical values to that function as Ex1, at the beginning of this text.
And then to find the values of the x and y launch a table.
It would be possible that?
By invez of entering with a number so that the program sustitua a function ja existing as Ex2, seen above, entering with a function quaquer (type: y = x ^ 2 +1) for the program atribuisse values to that function and then create a table of values as Ex1.
I hope it has been easier to understand my doubts now.
Thank you for your attention!
God bless!rafaelmenezes wrote:
Thanks for the explanation, could understand what fly said.
But as it applied to a program?
How to create a program that recognizes that the entry coefficients?Are you asking about how to parse out the coefficients from the string "3x^4 + 4x^3 - 8x^2 + 5x^1 + 2x^0"? If you define the format to strictly follow that example, this should get you started:
Strip out the spaces
Split the String on "x^"
That should give you [3, 4+4, 3-8, 2+5, 1+2, 0]
Split each resulting String on "+ | -", preserving the operator as a token so you can apply the correct sign to the coeff.
That should leave you with [3, 4, +, 4, 3, -, 8, 2, +, 5, 1, +, 2, 0]. Every other number is a coeff, the rest are the degrees.
You can strip out the +, since those coeffs are already positive, and strip out the - after negating the following number. This is all assuming that you have to write this yourself. There is no doubt already a library or 5 out there that does this for you. -
How to convert a PDF file into a full editable WORD file?
Hi,
I tried to convert a pdf file into word but it is not fully editable. I can edit the title from the main page and that's it. The rest of the word document is saved as image. I tried editing teh pdf file but that one is not working either.
Please help on how to convert a PDF file into a full editable WORD file.
Thank youNot all PDF files are created equal. When a PDF file is created with Adobe Tools it is usually "tagged" with information about the fonts the images, the layout etc... This way when the PDF is saved to a new format like PPT or DOC then the results are usually usable. However, if you have a PDF file that was not tagged for some reason then run the Accessibility tools on the PDF to acquire some basic tagging. This may get you a better result. Also if you have a PDF that is an image, then you may want to run OCR on it.
-
How do you turn java code into an .exe or etc...
I can't seem to figure out how to turn my java code into an executable in windows so that it runs by itself without a comipler, can someone help? (without using visual J++).
I can't seem to figure out how to turn my java code
into an executable in windows so that it runs by
itself without a comipler, can someone help? (without
using visual J++).I saw a tutorial on that, you might want to check it out.
http://developer.java.sun.com/developer/onlineTraining/new2java/divelog/?frontpage-headlinesfeatures -
How to convert my MM alias into an AppleID to use it with iCloud?
I used MobileMe and created a mail that became my Apple ID. Then I created an alias that became my main e-mail so now with iCloud I wish that aslias could become my Apple ID. I don't care to loose the first Apple ID but "How to convert my MM alias into an AppleID to use it with iCloud?"
You cannot convert an alias to Apple ID.
You can transfer your MM to iCloud with your main Apple ID.
There will be your alias as well.
Regards
Maybe you are looking for
-
Reminder for text based PO's on plant level or purchasing org. level?
Hi, I work for a corporate company and we have in our system arround 100 different plant codes (of more or less different companies). My problem is now, how to set-up the reminder in part of text based purchase orders for the different plants? Or dif
-
Any way to get Safari to handle bookmarks like Firefox?
I'm looking for one feature. Like many, I keep a folder in each of my bookmarks on the Bookmark Bar. I click on the item, and a list of URLs roll down. But in Safari, you must click on each folder to get it to open. When I click on the Firefox bookma
-
Half Black and White half Color Video
Is there a way to take a full color video and make half of the video black and white and the other half full color? For instance imagine a line down the center of the video, on the left the video is black and white, on the right side it's full color
-
User Exit for default values in IW51
Hi All, Can any suggest User Exit or BADI for default values like Cause code in IW51 Tcode. Regards, Samatha.
-
Hi, I am getting a pop up while i am reprocesiing inbound idoc in BD87 . Its little bit typical pop up i am getting and unabale to go further . Like thid and indicating program sapmsdyp and watch point is coming in staus bar ... module d0011_mod_in