I have an applet and start some process on Windows from applet. When I start this process just from another code(test), this code works fine and process runs from rt.exec() to proc.destroy(). When I use html call for applet - process runs only for 5 seconds every time (!!!) and then just alive, doesn't work, to proc.destroy(). This is really interesting for me (newbie in applets). I think, this issue caused by AccessController. I use Windows, medium Java security lever and applet is self-signed. It asks me to 'allow', applet works.Here's the code:
The error I get is as follows...When the page is loaded I get the following error: java.lang.SecurityException: class "com.myPackage. test.client. TaskApplet" does not match trust level of other classes in the same package
I need a summary of the steps involve in building java application.I have my source code, already compiled but I don't know the next step to make it run on a particular device. I know of emulator but I need more information.
I created a main class called X and two Y and Z classes.
Y and Z implements Runnable classes.
class X contains a static array A that can be accessed in Y and Z.
The Run () method of the class Y reads an input file and populates the vector A.
The Run () method of the Z class uses data stored into the vector A to process some data.
The objective of using threads in this problem is: as the vector A is filled in the Run () method of class Y, the Run () method of the class Z will processing the received values in the vector A.
to do this I did the following calls in the main method of class X:
ObjectY y = new Y (); Thready thread = new Thread (objectY); threadY.start (); ObjectZ new Z = Z (); Threadz thread = new Thread (objectZ); threadZ.start ();
is that correct? I'm getting the expected results, but dont know if the code is parallelized in fact.
I'm Fresher and i'm new in ATG nd right now working on checkout module.Here I'm trying to take shipping information of user so it is fetching in the shipping information JSP bt when i'm trying to submit that JSP den it's not going to either in SuccessURL or in ErrorURL it's remaining in current JSP.
I'm doing any customization's i'm jst using al Out Of Box Components nd my code is almost same as Out Of Box Code and it is not giving any error also.
I'm attaching my JSP's
Attached File(s)
shipping_jsp.txt (4.17K) Number of downloads: 293 shippingAddress_jsp.txt (1.9K) Number of downloads: 135 shippingSingle_jsp.txt (70bytes) Number of downloads: 19 shippingSingleForm_jsp.txt (2.05K) Number of downloads: 102
I am working on a management gui for a program. I have implemented the start server button. But now I need to get something working so that when I press stop server the javaw.exe process which is running the the other jar file is stopped and ended.
The gui is going to be using a javaw.exe as well and I don't want to end the entire thing.
I just want to end the javaw.exe process that is running the other jar file.
This is my code for starting it:
JButton btnNewButton_2 = new JButton("Start Server"); btnNewButton_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Runtime rt = Runtime.getRuntime(); try { Process pr = rt.exec("java -jar DEDServer_release.jar");
[Code] ....
I just need to figure out what to do to stop it now.
I am looking for a way to have a Servlet (my container is Tomcat) calling a JSP file and processing it in order to retrieve the generated HTML. The compete scenario:
I have virtual shop and whenever a purchase is being carried out, the customer is redirected to a Servlet that post-processes the purchase (list of the items, etc.)
Among all these, the Servlet is also supposed to send me an email about the new purchase. I would like to have nice designed HTML mail and not just a simple plain text notification. I thought of having a designated JSP as a view, and it will only be available from the Servlet container, for this purpose. One way is having the Servlet create an HTTPClient (or any other method of network communication) to my own host and ask for the JSP.
I wonder if there is a simpler way to ask my own container to process a JSP, since I am not really making a request to an outside web application. Something like getServletContext.processAndReturnJsp("mail.jsp")
BTW, if you think my approach is too cumbersome to fill an email with HTML code, it would be great to know of a simpler way.
I'm just starting out with learning how to process/parse XML data in Java, following online code/tutorials. I am currently only printing out "catalog."
I want to do basic input/output using Process class. I basically wish that, I should ask user his name and when user provides his name then I would print "Hello '[name]'"
import java.io.*; public class ReadAndPrintName { static Process p;
I have a multi-threaded application but one function (A) I need to call, that is provided by a third party, is not thread safe. I need to make parallel calls to function (A) so my only option is to start multiple process that I can call from each of my main applications threads.
To do this I created a RMI interface between a the client and the remote process. On the server side I start multiple processes each assigned a different port. On the client side I have a queue manager that connects to the processes I started and builds a queue of them. It passes the client to the threads as needed so they can function in parallel.
I am new to Java development and have the following questions:
1. Each of the server processes require an init function to be run before providing the service. How do I setup the server processes to continue to run in memory listening for a a service request after running the init processes.
2. Is there a better implementation of what I am trying to do?
I would like to use java se api names like, undo, redo, stylededitorkit, htmleditorkit in editorpane swing. So, I don't understand how to use these apis.
We need to process (read and parse) big xml files (500 Mo to 1 or 2 Go). What's the best framework or Java library to use for this requirement ? Then what's a good OXM (in this case xml to object mapping) solution for this kind of file ?
i want to create an application which detect an image which took from camera and to process it so that it can be verified ..for example number plate of the vehicle ..if i need to extract the numbers from the image ..
I'm working on an assignment where the program has to process a file and read every line then print it out in all caps. I'm pretty sure I have most of it written out, however, I am having trouble with my main method. I am supposed to call my go method in my FileProcessor class and have it use the StringProcessor interface to call my Upper class. I'm using an interface because I will be adding other classes later, but for now I am having trouble with implementing it all in my Driver class.
How do I declare a StringProcessor object in my Driver class and how can I use it so that it would create the file in all caps?
I need to kill or remove windows system process like cmd.exe from java code. Like removing it from end process in task mgr. I tried below code but its not removed. Is there a better way we can do this.
killing a system process from java code will create any issues?
public static void main(String[] args) throws Exception { String[] cmd = { "cmd.exe" }; Process p = Runtime.getRuntime().exec(cmd); p.destroy(); }
The international Olympics Committee has asked you to write a program to process the data and determine the medal winners for the pairs figure skating. You will be given the following file: Pairs.txt
Which contains the data for each pair of skaters. The data consists of each skater's name, their country and the score from each of eight judges on the technical aspects and on the performance aspects. A typical record would be as follows:
Smith Jones Australia 5.0 4.9 5.1 5.2 5.0 5.1 5.2 4.8 4.3 4.7 4.8 4.9 4.6 4.8 4.9 4.5
The final score for each skater is the sum of the average of the two categories of score. Design a class to hold the above data and the final score. Read the data in from the file and calculate the final score for each pair. Sort the array of objects , and display the results on the screen in order, giving special prominence to the medal winners.
Here is my CLass:
public class Skaters { private String name1; private String name2; private String country; private double [] arrTech = new double [8]; private double [] arrArt = new double [8]; private double score;
[code]...
how do i print my 2 arrays using the file? i got the name1, name2 and counntry to print but im stuck on printing the scores that are stored in the arrays. Also, i have to print the average for each array. one is for techniques and the other one is artistic. as you can see i already wrote the code for it but im stuck in printing it.
My code compiles successfully, but when executing I never get an output, and then the message: ">Process failed to respond; forcing abrupt termination...". Is there an infinite loop in my ab method, is that why?
public class Test{ boolean ab(String s){ boolean seenAnA=false; while(true){ if(s.charAt(0)=='a'){ seenAnA=true; s=s.substring(1);
Finding a strategy that allow process 12 millions of records in less than 1 hour. Each record can be modified by business rules. In this process are performed insert, update and select in other 3 tables.
The end result of this process is update monetary fields (for the calculations is used BigDecimal) of records in another table.
This process is part of the migration of Cobol to Java/Oracle. In cobol this process takes approximately one hour. Is it possible?
My objective here is to process a HashMap's key's in order. I found SortedSet as a way to do it.
The HashMap is like this:
nobelPrizeWinners = new HashMap<String, PrizeWinner[]>(); // 2009: nobelPrizeWinners.put(new String ("2009 Physics"), new PrizeWinner[] {new PrizeWinner("Charles K.", "Kao"), new PrizeWinner("Willard S.", "Boyle"), new PrizeWinner("George S.", "Smith")});
[Code] ....
This is the method I am trying to write
public void displayAllYearsAndWinners_2() { // Creation of the SortedSet SortedSet sortedSet = new TreeSet();
[Code] ....
However, the compiler gives me a warning of NobelPrizeWinners.java uses unchecked or unsafe operations. Recompile with -Xlint:unchecked for details.
As I said, my objective here is to process them in order. If this compiler warning cannot be resolved, I am open to other methods of accomplishing my objective.