Start java app from a jsp or a servlet?
HI ,
I want to know if it possible to start a java application using Runtime and exec(command).
I mean launch abc.java from abcservlet or from abclaunch.jsp (with a button click) any exmaples ?
thanks,
-G.
I want to know if it possible to start a java
a application using Runtime and exec(command).
I mean launch abc.java from abcservlet or from
m abclaunch.jsp (with a button click) any exmaples ?If a servlet class calls runtime.exec, it'll run a program on the server.
Use webstart or an applet if you want some action to happen at the clients side. Servlets only hand HTML to the client, no Java context.
Similar Messages
-
I updated to ios7 on my iphone 4 and now cant install apps and one app says waiting for 2 days now. Also it started ading apps from my wife's phone onto my phone even though we have separate apple ids.
We do not share an apple ID and her phone is now logged in with her account and I have since backed it up on itunes under her account as well. I have turned off automatic downloads on her phone but they still keep downloading. I delete one app and then another one just appears on the phone.
-
Start java application from jsp?
is there any way i can have a JSP, bean or servlet start a java application on the server? maybe a better question is: what can i do to make sure that some class is always running on my javaserver? im talking about the server app. for a chat program that im making that will be an applet in a JSP page along with a load of other JSP pages that do other things...
sorry for my incoherence. i usually talk better than this. :)
Lazjust replying so the message comes to the top of the forum... can anyone help me here?
Thanks
Laz -
Invoke Java 3d from a JSP?
Hi,
I have a sample java code that invokes a Canvas3d and then invokes a 3D object.
Our project goal is to create an online application-- A JSP page which will invoke the java 3d object.
I am working on Oracle JDeveloper and OC4J server.
Currently , the application runs thru a .java file.
I want to know if it is technically possible to create a jsp page and transfer the 3d object generated by this java file onto the JSP?
I tried renaming the main method of the java file to say testMain (made it static method).
Then thru the JSP , i tried to call this testMain method.
It doesnt work.
thanksHI
I was able to add a canvas3D to a webbrowser via an applet. I suppose you can always invoke an applet from a JSP.
Venkat -
Slow start of app from Windows-Share
Hi,
i have an ZFD-App which has to start an *.EXE from a Windows-Server. The command ist like \\winserver\icd\path\boxes.exe When I start this ZEN-App I have to wait longer than 30 seconds before I can see a logon-windows of this program. If I make a good old local link on my WinXP-desktop and I start this I see the logon-windows after only 2 seconds. This is e very big difference.
I tested this scenario with another EXE from another windows-share, it's the same problem.
Any suggestions?
Uwe Bassen
Hamburg
GermanyWell, if the user/workstation isn't authenticated to your windows box before
the app starts, its going to have different timeout issues (I'm not sure how
you have the app assocated).
My suggestion: copy the exe to a location that the user/workstation already
has rights to. Not sure why you have to run the app from a server the user
doesn't have rights to already.
You might be able to build in the authentication prompt into your app with a
pre-launch script (i.e. net use )
>>> On 12/21/2009 at 3:46 AM, in message
<[email protected]>,
bassen<[email protected]> wrote:
> Hi,
> i have an ZFD-App which has to start an *.EXE from a Windows-Server.The
> command ist like \\winserver\icd\path\boxes.exe When I start thisZEN-App I
> have to wait longer than 30 seconds before I can see alogon-windows of
> this program. If I make a good old local link on myWinXP-desktop and I
> start this I see the logon-windows after only 2seconds. This is e very big
> difference.
>
> I tested this scenario with another EXE from another windows-share,it's
> the same problem.
>
> Any suggestions?
>
> Uwe Bassen
> Hamburg
> Germany--
bassen----------------------------------------------------------------------
--bassen's Profile:
> http://forums.novell.com/member.php?userid=30002View this thread:
> http://forums.novell.com/showthread.php?t=396411 -
Problem starting AIR app from windows server 2003
Hello,
I have an AIR app that I am trying to run using a c#
webservice under Win 2003.
I am starting the application process (air .exe file) as the
"Network Service" user which has full-rights on the app-folder and
app-working folder. The problem is that once with the applications
the "Adobe AIR Updater.exe" process is starting to (using the same
user N.S.) and both of the processes stop responding.
I have tried to start the process as "Local Service" with
"Desktop Interaction" too but unfortunately with no result.
I must tell you that under XP and Vista it runs perfect...
Is there any security issue related to win 2003 or any way i
can start an air app from command line.
Also i am interested why "Adobe Air Updater.exe" is starting
?Not sure about copying eulaAccepted file from one location to another - that would really depend on which user account your service is running under.
A better approach (IMHO), is to open the services window (My Computer | <right-click> | Manage, then navigate to Services and expand the tree) so you can see your service on the RHS.
Stop your service, then inspect it's properties, select the 'Log on' tab, then check the checkbox which says "Allow system to interact with desktop". Apply the change, then restart your service.
next time the AIR runtime prompts you to accept the EULA, the window will appear on the screen, so you can click "I accept".
After accepting, reverse the procedure which allowed the service to interact with the desktop, and make sure that you have modified the registry to prevent AIR from updating as mentioned in:
http://help.adobe.com/en_US/AIR/1.5/air_admin/WS5b3ccc516d4fbf351e63e3 d11c0f59823a-7ff0.html
You should be all set. -
Start Air app from shell (adb shell am start)?
SDK: 2.6
Im trying to auto start my app when I push it to a device for testing. Im using the adb shell with the "am start" command.
Example In Bash: $am start air.SampleProject
Returns the error:
Starting: Intent { act=android.intent.action.VIEW dat=air.SampleProject}
Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=air.SampleProject flg=0x10000000 }
Help?
I have found you have to start the start or maybe add something else int he manifest but I cant figure it out. Is there a way to start a air app from shell?Using ADL
$ adl releaseDirectory/yourApp-app.xml
That's it. Just make sure you have your SWF file to be called from the application descriptor. -
Starting Java application from other Java application..
Hi all,
I was wondering if it is possible to start a Java program from an other Java program.
In Java program 1, I have this code to execute the other application:
try {
Process p = Runtime.getRuntime().exec("cmd /c java -cp JavaApp2.jar com.test.TestFrame");
} catch (IOException e) {
}I tried this code, but unfortunately I couldn't opened the other (JavaApp2.jar) Java Application. Is there a way to open the other application anyways?
I really hope someone can help me. Help would be greatly appreciated! Thanks in advance.
Tongue78.What if there is no JAR file?Then you can make it out of the .class files. And to anticipate your next question, if there are no .class files there is no application at all, so you can't exec() it or call the main() method directly. Your point?
And JAR isn't part of the Java language.It is a major part of the Java platform.
This means you can only get access to a JAR file via the OS. Wrong again. CLASSPATH. URLClassLoader.
In short you cannot just shout main() in a Java program and hope some other Java program will hear you and start.Absolute rubbish. If the required classes are on the CLASSPATH you just call com.company2.app2.main(args) and off you go. Or you can load the main class and invoke its main() reflectively.
No source code required, or 'source code merge' either. -
Starting Windows App from J2EE Studio Creator App
Hi,
Does anyone know how to start a Windows application with arguments that is on the same windows server running the J2EE application? I'm using Studio Creator to build the application and it needs to start a Windows app to perform some tasks. The app will run in the background and exit by itself when done.
Thanks,
RonHeres an example of how I start a windows app from within a swing application, I am passing the url of the db.
String temp = "192.168.11.70";
try {
Runtime.getRuntime().exec("command.com /E:1900 /C C:\\Progra~1\\mts\\freight.exe "+temp, null);
catch (IOException ex) {
Regards
Jonathan -
Ive seen this question posted before, but never found a good answer. I am invoking a JVM from a legacy C app (via JNI_CreateJavaVM) and I want to be able to end the JVM and have the C app continue. The problem is that a call to System.exit() from inside the java app causes the entire native process (not just the JVM) to be killed. A call to DestroyJavaVM() does not unload the
JVM (as it claims it does in the API documentation).
Currently, the Java code calls dispose and System.gc (for good measure) on exiting, although this doesnt completely kill the java app. If the user wishes to invoke another Java app, the C code uses JNI_GetCreatedVMs to see if one already exists, and if so uses AttachThread (or GetEnv) to hook to the existing JVM to run the new Java app. The problem with this is with complicated GUI apps, the machine soon hits a wall, I guess because of un-gc'd stuff laying around.
Is there a way to kill the app from java without using System.exit or is there a way to unload the JVM from the C app?Unfortunately I am running into the same issues using JDK1.4 on Win32. Basically the call to jvm->DestroyJavaVM() is NEVER returning. This seems to mainly be a problem when you use classes which require a native class loader to load native libraries. EX: classes which use System.loadLibrary("some native library"). Has anyone found a workaround to allow us to stop the jvm from the native side when these are present?
Also if anyone in interested - this is the exact c++ code I am currently using:
if(vm != NULL) {
* Detach the current thread from the vm so that it appears to have
* exited when the process has detatched from the dll.
if (vm->DetachCurrentThread() != 0) {
MessageBox(NULL,"Could not detatch the Java Virtual Machine","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);
MessageBox(NULL,"Try to destroy the VM","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);
vm->DestroyJavaVM();
vm = NULL;
MessageBox(NULL,"JVM destroyed successfully","DEBUG Info",MB_OK+MB_ICONEXCLAMATION);Basically all the calls succeed except the vm->DestroyJavaVM(); including the call to detatch the current thread from the VM! Am I missing something obvious? Is this a known bug? Anyone know any workarounds? Aany and all constructive comments are welcome. -
Start java calss from a batchfile
Hi everbody,
i would like to start a java class from a batchfile, but I have no clue how to do it. Please help me.
kind regards
maxthe real question is why do you want to create a batch
file to start a java class and not just type java
MyClass at the command line...And how then do you distribute it to your chums and buddies?
This has to be the easiest way to do this. -
when the android phone is turned off, and then back on again, any desk top icon or bookmark of an web page with a manifest will not work when in airplane mode. You must at least make an attempt to turn on wifi, even an unsuccessful attempt to find a wifi connection will do. Then when you use the book mark or the desktop icon, it will work. I have a series of phones which only have internect connection - no phone company tower connection SAMSUNG-SGH-1997 firmware version 2.2.1 kernel verions 2.6.32.9 FROYO.UCKH1. Contact wih android support only got suggestion to use the google chrome browser, which incidentally does not work on 2.2.1
Hi,
I tried starting the server from the console as well as from command prompt. Here I am giving the command below.
nohup ./startManagedWebLogic.sh bi_server1 t3://machineIP:portNo > bis1_startup.log &
But each time I got the same exception.
Korandla -
How to start java.exe from a java program in windows ?
Hi,
I did like to know, if its possible to run java.exe from a java program on windows ? The java.exe should be visible from checking the processes that are currently running using the Task Manager on windows.Runtime.getRuntime().exec("java Sample");
-
Java App from SAP Portal - SSO2Ticket call - java.lang.UnsatisfiedLinkError
Hi
I am facing a problem in trying to call a java application from SAP portal.
*Cause:*
This java application is built on Unix (AIX) server. Previously it was running fine. Then there is a Tech Upgrade on SAP side in our company. After that I have been told to test whether the Java Application is getting called correctly or not.
Error:
I am getting the below error
java.lang.UnsatisfiedLinkError: com/mysap/sso/SSO2Ticket
Also when I am checking the log entry all I am able to see, there is error in SSO2Ticket.verify() method and the error is
Error during initialization of SSO2TICKET; com/mysap/sso/SSO2Ticket.init(Ljava/lang/String;);
Effort:
I checked all possible aspects what ever came to my mind and found in this forum so far.
1. com/mysap/sso this package is there.
2. SSO2TICKET class defined in that package
3. The JAVA_HOME and CLASSPATH are defined correctly ( I guess so)
4. Even the "libsapsecu.o" file is present
I am not sure why still this error is coming. Am I missing something here? Or what ever I have mentioned above 1-4 I am not getting them correctly.
I am new to this kind of native call technology. Please help me on this.
My concerns are :
1. Is the package com/mysap/sso should be in a specific location, which I am missing.
2. Do I need to revisit my CLASSPATH set up for JAVA?
3. Is any change required to the libsapsecu.o file?
4. Most of all what on earth can I do to overcome this?
5. After Tech upgrade do they need to do some sort of thing to make the Java native call available, which they might have missed? Does any one aware of any such thing?
Please let me know the answer asap.
Thanks
Santanu
Code:
I am also attaching the code snippet from JAVA
public class SSO2Ticket {
static {
if (System.getProperty("os.name").startsWith("Win")) {
SECLIBRARY = "sapsecu.dll";
} else {
SECLIBRARY = "libsapsecu.o";
try {
logger.debug("java.library.path - "+System.getProperty("java.library.path"));
System.loadLibrary(SSO2TICKETLIBRARY);
logger.debug("SAPSSOEXT loaded.");
} catch (Throwable e) {
System.out.println("Error during initialization of SSO2TICKET:\n"+ e.getMessage());
logger.error("Error during initialization of SSO2TICKET:\n"+ e.getMessage());
public static synchronized String[] verify(String ticket, String pathToPSE) throws LogonTicketException
//System.out.println("Ticket: "+ticket);
//System.out.println("PSE: "+pathToPSE);
logger.debug("Ticket: "+ticket);
logger.debug("PSE: "+pathToPSE);
String[] ticketContent = null;
logger.debug("The value for initialized is -
>"+initialized);
try {
init(SECLIBRARY);
} catch (Throwable e) {
logger.error("Error during initialization of SSO2TICKET:\n"+ e.getMessage());Hi,
have you searched on SCN? There are some threads with same problem such as [this one|/message/9270216#9270216 [original link is broken];. There is more threads. They may help you to solve your issue.
Cheers -
Invoke Java app from Oracle DB?
Hi
I wrote simple Java app I would like to deploy this class to Oracle DB server and to schedule execution, for example, every hour. I wonder how to do that.
NenadNenad,
Although I have not done something like this myself, allow me to suggest the following resources that may help you (assuming you haven't already looked at them).
Excuse me, but I saw no mention of which Oracle database version you are using, so I have assumed it is 9i.
For loading java classes into the database, please refer to chapter 2 (Loading Java Classes) of the Java Stored Procedures Developer's Guide.
For scheduling periodic execution, use the DBMS_JOB (PL/SQL) package.
Good Luck,
Avi.
Maybe you are looking for
-
So here's the story: I own a company that designs and sells sewing patterns for men's clothing to be made by home sewers. I have my patterns professionally drafted and sent to me as a poster-sized PDF. I then open it in Illustrator, move things aroun
-
Multiple Rotate3d filters makes everything looks blurry
Hi I have a Flex 4 project that uses two rotate filters. Once it to rotate the main container and the other to rotate an internal element. The issue is that when applied simultaneously text, and everything looks blurry. If I add a delay time to one o
-
Hi Guys, I always had a few problems using arrays and now I need to use them and I am stuck. on my program i need to create an array of int with the numbers 1 to 1000 in it for this I have done: int[ ] array; on the class constructor array = new int[
-
Blurring/hiding text in Acrobat
Acrobat 9.0.0 I'm a new user. I would like to know if Acrobat has a feature where I can blur parts of the text so that my reader will not see them. Ideally, this would just be a selection tool type of an action. If not, does anyone have any tips from
-
Hi I know this is probably answered somewhere but can't find it. I just want to publish a calendar publicaly so anyone can view it in a browser. All I get is a link that requires you to subscribe to the calendar or use an application to open it (but