473,537 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Forum

Java programming language (Sun Microsystems) - Ask questions about java programming, OOP, JRE, SDK, Swing, Plugins, Java Virtual Machine(JVM), Java Libraries: Collection, XML Processing, Security, JDBC, JNDI, RMI, CORBA, AWT (GUI) and more.
0
889
thread by: devinaren | last post Nov 20 '07 by: devinaren
When I tried to open the client i.e User interface which is MainMenuApp received NO_PERMISSION CORBA exception while attempting to get an initial reference to the mvcf_ControllerFactory from the FactoryFinder. Software defect that should be addressed is that the UI did not recover after catching the exception and required a restart of the UI to connect. The problem is that cleanWorkspace() in CorbaAdapter doesn't have any failover logic in it at all. The adapter is assumed to be good and if it is not cleanWorkspace() attempts to use a factory that doesn't exist. This throws an uncaught NullPointerException that blows out to MainMenuApp where it is interpreted as a fatal exception and prevents the main menu from starting. So please help me in writing the failover logic in CorbaAdapter The code for cleanWorkspace is /** * Cleans up the entire logical positions workspace. * @throws AdapterException UserError or Error occured */ public synchronized void cleanWorkspace() throws AdapterException { cut_ContextInitData cid = getContextInitData(); cid.clientId = "*"; MVC2CleanWorkspaceCmd cmd = new MVC2CleanWorkspaceCmd(cid); execute(cmd); }
2
890
thread by: sign711 | last post May 9 '07 by: JosAH
I am trying to complete my last program for intro to Java. Can anyone explain how to create a new string from an old one and take out the spaces from that string?
0
890
thread by: haran22 | last post May 21 '07 by: haran22
in this pgm, 1 textbox and 1 button displays in the frame. if i enter 3 in the text box means, three buttons will display on right hand side. Then if click every single button means it should display two butons on lefthand side. plz help me. The code is as follows. import java.awt.*; import java.awt.event.*; public class buttons1 extends Frame implements ActionListener { TextField t1; Button b1,b2,b3; Button[] bu; Button[] bt; Button BB; int x1=700; int y1=0; int x2=100; int y2=10; int x3=180; int y3=10; int s1; int s3; String s; public buttons1() { setLayout(null); t1=new TextField(20); b1=new Button("Enter"); add(b1); add(t1); b1.addActionListener(this); b1.setBackground(Color.blue); t1.setBounds(400,100,70,30); b1.setBounds(400,300,70,30); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==b1) { s=t1.getText(); s1=Integer.parseInt(s); System.out.println("Value of I is"+s1); String s2[]={"Rone","Rtwo","Rthree","Rfour","Rfive","Rsix","Rseven","Reight","Rnine","Rten","Releven","Rtwelve","Rthirteen","Rfourteen","Rfifteen"}; for(int i=0;i
0
890
dmjpro
thread by: dmjpro | last post Jun 12 '07 by: dmjpro
plz send me a good link on AOP. Plz send. Kind regards, Dmjpro.
0
890
thread by: sandhu236 | last post Aug 10 '07 by: sandhu236
Hi all, Can someone help me in testing the loops in junit,and how to test datapools in testing? I just want to know how an i assert the values when n number of variables are assigned in the starting and reassigned in the loop...How to track the loop?
0
890
thread by: jimmylover | last post Nov 23 '14 by: jimmylover
If anyone could let me know how to get my intersection and difference methods to print properly. I have to use iterative loops and methods to complete this assignment so NO in built methods are to be used!Thanks [CODE] import java.util.Scanner; public class setPractice { public static Scanner kbd; public static final int MAXSIZE = 20; public static void main(String[] args) { kbd = new Scanner(System.in); int[] setA = new int[MAXSIZE]; int[] setB = new int[MAXSIZE]; int[] intersect = new int[MAXSIZE]; int[] difference = new int[MAXSIZE]; int sizeA, sizeB, interSize, diffSize; System.out.print("How many numbers will be in the 1st set: "); sizeA = kbd.nextInt(); while (sizeA > MAXSIZE) { System.out .print("Error: Set size is too large. Re-enter set size: "); sizeA = kbd.nextInt(); } System.out.println("Enter list of integers for 1st set: "); getData(setA, sizeA); sort(setA, sizeA); System.out.println("The ascending order for 1st is:"); print(setA, sizeA); System.out.print("How many numbers will be in the 2nd set: "); sizeB = kbd.nextInt(); while (sizeB > MAXSIZE) { System.out .print("Error: Set size is too large. Re-enter set size: "); sizeB = kbd.nextInt(); } System.out.println("Enter list of integers for 2nd set: "); getData(setB, sizeB); sort(setB, sizeB); System.out.println("The ascending order for the 2nd set is:"); print(setB, sizeB); interSize = intersection(setA, setB, sizeA, sizeB, intersect); System.out.print("The intersection of the two sets is: "); for (int x = 0; x < interSize; x++) { System.out.print(intersect[x] + " "); } diffSize = difference(setA, sizeA, setB, sizeB, difference); System.out.print("\n\nThe difference of A-B is: "); for (int x = 0; x < diffSize; x++) { System.out.print(difference[x] + " "); } } public static void getData(int[] set, int size) { for (int x = 0; x < size; x++) { int num = kbd.nextInt(); int count = search(set, size, num); if (count == 0) set[x] = num; else x--; } } public static int search(int[] set, int size, int num) { int count = 0; for (int x = 0; x < size; x++) { if (num == set[x]) count++; } return count; } public static int difference(int[] setA, int sizeA, int[] setB, int sizeB, int[] resultSet) { int count = 0; boolean flag = true; for(int i = 0; i nums[j + 1]) { temp = nums[j]; nums[j] = nums[j + 1]; nums[j + 1] = temp; } } } } public static void print(int[] nums, int size) { for (int i = 0; i < nums.length; i++) { if (nums[i] != 0) { System.out.println(nums[i]); } } } public static int intersection(int[] setA, int[] setB, int sizeA, int sizeB, int[] resultSet) { int count = 0; for(int i = 0; i
0
891
thread by: shreya | last post Oct 13 '06 by: shreya
I have a client which sends request to my web service.Accordingly my web service responds. How can i capture the request and response to the webservice Can someone help me with it.
0
891
thread by: bmohanpr | last post Jul 24 '07 by: bmohanpr
HI, I am using Iframes in my project .There are two jsps one is A.jsp another one is B.jsp In A.jsp I used iFrame to call B.jsp.The code will be as follows [U]A.jsp[/U]
0
893
thread by: deepthisoft | last post Dec 27 '07 by: deepthisoft
hi, How to open the jsp page contents in a word document using java. In that JSP web page i have one graph and also some contents. I want to open all the contents of that graph.jsp into a word document on clicking the word icon. How to do this. Anyone one have any ideas. Thanks in advance.
0
893
anurag275125
thread by: anurag275125 | last post Feb 25 '10 by: anurag275125
Hello all.. While implementing the interface, we need to use public keyword at the beginning of the method. Why should we use public keyword while implementing the methods, is it rule in java or any reason behind this? thanks & regards
0
894
thread by: danielkun | last post Dec 18 '06 by: danielkun
I have configurated a system that is running IIS with Tomcat. However, I cant figure out how to access "the root" of my domain. As for now I have to use a subfolder like: http://www.example.com/example_folder How do I get rid of example_folder ? Ive been looking for an answer for 2 days now and I havent found anything. Every example that Ive found so far on the web always has a subfolder. Would appreciate any help!! Thank you Daniel
0
894
thread by: Lastknight | last post Jun 26 '07 by: Lastknight
Hi I am using jboss server 4.0.4 to run the jsp application. to run i can give the url as http://localhost:8080/projectname. if i can give like this, it is properly running. but i can give www.projectname.com like that means, my application to run.(i.e to run my application with out portnumber). is it possible? if possible how to do it? Thanks in advance
0
895
thread by: sara1366 | last post Mar 1 '07 by: sara1366
hi. I want create file in j2me ,open file and search in file. but I can't do it. please help me.
1
895
thread by: rajuvangari | last post Oct 3 '07 by: JosAH
how to check given two number without using operators in java
0
896
thread by: improvcornartist | last post Aug 11 '10 by: improvcornartist
I created a derby database backed swing application. I then wanted to archive the database for distribution with the application, the final goal being a single jar. Pre-archive queries that ran in no time now take 5 or so seconds. The application, which used to load in under a second, now takes nearly a minute to start up. My question is, will all archived databases run this much slower, or have I done something wrong? For what its worth, the database is 8.7 MB pre-archive, 2.1 MB as a jar, and the queries are not very complex.
3
897
Jsp
thread by: sapnamkadeeja | last post Mar 17 '07 by: r035198x
hi, i want to know how to give a link between the output of a java program to a web page.If possible,i would like to get the coding part to implement it.It will be helpful,if you respond fast.
0
897
oll3i
thread by: oll3i | last post Jul 10 '07 by: oll3i
I want to write an application using jsf . Could you please recommend me some good book on that ? thank YOU
1
897
jsp
thread by: santoshmiracle | last post Jul 26 '07 by: madhoriya22
what is the difference between include directive and include action

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.