Mamatha Achuthan

Greenhorn
+ Follow
since Oct 09, 2011
Mamatha likes ...
Firefox Browser Tomcat Server
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 Mamatha Achuthan

Hi,

In a struts application's Action class I am running an external windows application using Runtime class's exec method. It is intended to run an application in background at server side to process a video file uploaded from the client machine. . Everything worked well with in my development machine which is a windows vista running the tomcat6 as executable. When I tried to deploy and run it from another machine which is a windows 7 running tomcat 6 as a service , the exec didn't worked as I expected. I couldn't find the external program running. For the tomcat service I enabled 'Allow service to interact with desktop' - property. After that I could see, when the 'exec' is invoked, the program is actually invoked and is in the background. An interactive service detection message box is shown with a message that 'A program might need information from you or your permission to complete a task' If I view the details, I can see the external program invoked and is waiting. If I click on that program window , it completes.

Any idea what is causing this?

Thanks,
M.K.A
9 years ago
Hi,

Please refer to this link for conversion to PCM.

http://www.cs.unc.edu/~luv/teaching/COMP110/programs/AudioPlayer.java

Regards,
Mamatha
9 years ago
Hi,

The format mono is not supported. JMF can be used to convert it to a supported format.
Please refer to the link and see the conversion used.

http://edenti.deis.unibo.it/utils/Java-tips/Playing%20Audio%20and%20Video%20with%20Java%20Media%20Framework.txt

Regards,
Mamatha
9 years ago
Hi,

Thanks for the information you all have shared. Thanks to you all, I took a look the 'Class' class and leaned new things.



Thanks again,

Mamatha
9 years ago
Hi,

The File[].class works! Thanks.


The Netbeans IDE was showing the following error message when I used the getClass function

Method cannot be applied to given types
found : java.io.File[][],java.lang.Class<capture #1 of ? extends java.io.File[]>
required : T[][],java.lang.Class(T[])

Thanks again,

Mamatha
9 years ago
Hi,

In some part of my code I need to invoke a third party function which has a signature like this

public static <T> T[] functionToProcess(T[][] a_rrs, Class<T[]> a_destType)

From the signature I make out that the function accepts a generic 2-dimension array and a Class object referring to single dimension array of the same generic type as parameters.

I tried to invoke the function like this





and received an error.

Any idea where is has gone wrong?

Thanks,

Mamatha
9 years ago
Hi,

Thanks for the reply. After spending hours on the code, finally I could make out that the problem was with the class path. The program was using Java Media Framework and related code which was deprecated. (JMF was not developed since 2002, the generic code based on JMF was deprecated.) When JMF was installed in the system, it has automatically set the classpath environment variable in the MSDOS path format. When I tried to compile the sample code from IDE, I added the JMF jars to JRE /ext/lib -a bad practice, for which I paid the penalty. The JRE has the JMF jars, so it did not throw any compile time errors or missing library error. When I tried to run the program from IDE, it failed, and threw a run time error as in my last post. Then I added the library jars as external jars thus fixing the problem. I successfully run the application.

The same happened when I tried to make the same application an executable jar. Then I tried to run it from the command line and got the same error. setting CLASSPATH environment variable didn't help. I dont know why. Finally when I specified, 'classpath' (absolute path to jars )option with java command , it worked.

9 years ago
Hi,

I am using Netbeans IDE to complie and run NyARToolkit which uses the java3d,JMF libraries. It is compiled with some warning for the use of deprecated API







I can run the sample application form the IDE but when I made an executable jar or tried to run the code from commandline, I am getting an error.



The same error is thrown in the IDE too when the jmf library was not added as an external library. In the executable jar, the manifest file is having the main class info and the library path info. Since that was not working I tried to invoke the main java class from commandline. I tried to set the class path environment variable to point the jmf library file but still getting error.

Any idea what could have gone wrong?

Thanks,

Mamatha
9 years ago