32,204 Topics
| |
Hi,Someone please shade somelight about this- how arguments are to be passed from a run.bat file Thanks Best Regards Bethuel | |
I'm writing a program but I don't understand the question that well could someone help explain what I have to do. Also, I am having difficulty making the methods could someone help, because I am getting an error every time. This is the Question. Write a cash register class. It … | |
Hello all! I am a completely new to programming in Java and I was recently given a tutorial in which I was supposed to create a 3x3 square grid. I am attaching a file as to give you a clear picture of what I must do. I have no idea … | |
Hello everyone. I've been programming on a co-op RPG for quite some time now, but my networking side has seen some troubles. I'm using the lower level serverSocket-Socket way. Everything runs flawless within my own network, however connection over the internet is where the trouble is. I understand this is … | |
Hai all, AM trying to connect java with database .I created class called data manager with several methods like setdburl(), getdnurl() ,etc.. i called the set functions inside another class and assign values. in set method i assigned LOCAL VARIABLE. when i call get url method it shows null value.. … | |
How to keep look and feel of java program as classic windows style , even the style of the windows change to windows xp look, or aero look? I mean permenantly keeping classic look? Has any one has any idea? Thank you............... for any advice , help... :) | |
some commands working properly(notepad ,control(control panel))... but how to execute commands "dir" like that my code is ... [CODE] public class test1{ public static void main(String args[])throws Exception{ Runtime r= Runtime.getRuntime(); Process p1=r.exec("notepad");//working fine Process p2=r.exec("control");//working fine Process p3=r.exec("test1.java");//cannot run Process p4=r.exec("dir");// cannot run } } o/p: F:\studies\java\test>java test1 Exception … | |
[code=text]SET CLASSPATH_JARS=../../lib/log4j/log4j-1.2.14.jar SET BUILD_CLASS_DIR_IMPLEMENTATION=BUILD_LOCAL\implementation\build\classes SET RUN_CLASSPATH=%BUILD_CLASS_DIR_IMPLEMENTATION%;%CLASSPATH_JARS% SET CLASS_TO_RUN=chepsoft.micro.javadoc.workerapplication.WorkerApplication SET ARGUMENTS=Worker implementation by WorkerImpl ECHO CLASSPATH_JARS=%CLASSPATH_JARS% ECHO BUILD_CLASS_DIR_IMPLEMENTATION=%BUILD_CLASS_DIR_IMPLEMENTATION% ECHO RUN_CLASSPATH=%RUN_CLASSPATH% ECHO CLASS_TO_RUN=%CLASS_TO_RUN% java -classpath %RUN_CLASSPATH% %CLASS_TO_RUN% %ARGUMENTS% %1String name = "Bethuel", %2String workerType = "Monthly Employee", %3double salary = 22000d,[/code] if i want to pass the above variables from run.bat file … | |
Instance variable does mean you will get new value with every new object created of particular class rite? I tried it myself eg: [CODE]class simpleinstcheck { static int i; void incr() { System.out.println(i++); } public static void main(String args[]) { simpleinstcheck sc= new simpleinstcheck(); sc.incr(); simpleinstcheck sc1= new simpleinstcheck(); sc1.incr(); … | |
hi every body, i have very confusion with interpretor in jva, why we use it | |
I am doing several choice box in JFrame.But i have some problems.Can anyone help me. 1)Currently doing a loop to add no1 until 50 into choice box.But it doesn't work. [CODE]int [] number = new int[50]; for(int i=0;i<50;i++) { number[i] = i; for(int i = 0;i<50;i++) { c1.add(number[i]); }[/CODE] 2)I … | |
Hi Friends, I want to convert given String of any language to Unicode.Please solve my porblem friends. Thank you cheers -------- siva | |
Can somebody please show me what the rest of this code should look like. I have about 90% of it so far. I have the GUI, but need help with the rest. Here is the Link to my code and the question to the problem is below. I thought it … | |
[CODE]public class duplicate { public static void main(String[] args)throws IOException { System.out.println("Enter words separated by spaces ('.' to quit):"); Set<String> s = new HashSet<String>(); Scanner input = new Scanner(System.in); while (true) { String token = input.next(); if (".".equals(token)) break; if (!s.add(token)) System.out.println("Duplicate detected: " + token); } System.out.println(s.size() + " … | |
[CODE]private void getPreviousButtonActionPerformed(java.awt.event.ActionEvent evt) { List<Tweet> listOfTweets = remoteBean.getMoreTweets(5); StringBuilder displayStringBuilder = new StringBuilder(); if(listOfTweets != null) { for (Tweet tweet : listOfTweet) { displayStringBuilder.append(tweet.toString() + "\n"); } textArea.setText(displayStringBuilder.toString()); } } [/CODE] As it stands when i run the code that this method is in and enter a number of … | |
I'm newbie in java, can you help me to this code. the image needs to move diagonally [CODE]public void actionPerformed(ActionEvent e) { x += 3; if (x > 600) { y = random.nextInt(600); x = random.nextInt(-45); star.setX(x); star.setY(y); }[/CODE] | |
i found error in the following code.... [CODE]import java.sql.*; import java.util.*; class search { public static void main(String args[]) throws Exception { Connection con=null; ResultSet rs=null; Statement st=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:oracle","user","vinay"); String s="select *from student where roll=?"; st=con.prepareStatement(s); rs=st.executeQuery(); Scanner inp=new Scanner(System.in); System.out.println("Enter roll to search"); int r=inp.nextInt(); st.setInt(1,r); while (rs.next()) … | |
I want to create a patient appointment schedule desktop app with an oracle database. Basically its going to be 2 computers with the app and one of them is going to have the database service running. Ok so my question is... should i do it in eclipse or netbeans? am … | |
Hi all, I'm working on a C++ app that needs to communicate with a server. I was wondering if it would be possible to use Java for the Server, and C++ for the Client. I'm assuming it should work (without the use of JNI) because TCP packets are TCP packets, … | |
hi, I want to run the command using java code echo $PATH I used Runtime.getRuntime().exec() for this, but it returns outputp as : $PATH. I know I can get the value of PATH variable using System.getProperty() but I want to use particularly "echo" command. How can I do it? | |
I'm trying to merge cells of the same row and after researching i found this link: [url]http://codeguru.earthweb.com/java/articles/139.shtml[/url] I downloaded the files and tried using it but it didn't run because of an error I don't understand:S can anybody help?? | |
Hello Friends.. need a help with Merge Sort I tried to implement Merge Sort using Java language..I followed Introduction to Algorithm book for the algorithm.. but the code generates errors.. please can anyone explain this to me.. why these errors pop-up ?? [CODE] package test; import java.util.Random; public class mergeSort … | |
Hello guys.. Im very new to java. Im using netbeans 7.0 and JDK 1.7. Im an IT student. My teacher said that we must use only Java DB (don't know why) for our database. I've already made a program. It will display all the contents of a table. My problem … | |
I have been fighting this but I am not winning. So far I have looked up a ODBC JDBC connection string to connect to my simple database to java without any success. Firstly; I replaced 32bit MS Access 2010 with 64x one. Secondly; I installed all available updates sp1 and … | |
Hi All, I have problem while using prepared statements. i have a "Select" query in a xml & i m reading it through XML parser & supplying inputs throughs prepared statements. When i execute i am not getting desired results. Below is the snippet : String res=query (query is String … | |
hi all i want to add picture to my frame how i can do that i use this code ImageIcon image=new ImageIcon("f:\\a.jpg"); | |
Using the basic principle in this code: [CODE] try { GraphicsEnvironment ge = GraphicsEnvironment .getLocalGraphicsEnvironment(); GraphicsDevice[] gs = ge.getScreenDevices(); BufferedImage[] screenshots = new BufferedImage[gs.length]; ImageWriter writer = null; Iterator<ImageWriter> iter = ImageIO.getImageWritersByFormatName("jpeg"); if (iter.hasNext()) writer = iter.next(); ImageWriteParam iwp = writer.getDefaultWriteParam(); iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); iwp.setCompressionQuality(0.1F); DisplayMode mode; Rectangle bounds; for (int i … | |
Hi guys, i have been able to get this transfer function to work but only with one account. i'm not too sure how to get it working for the other account also. Any help would be greatly appreciated. [CODE]static String doTransfer(String amount){ // Withdraw cash -- called from ATMWithdrawl String … | |
Hi guys, I'm working on a console based application and I'm struck in a control flow issue for driver class. Any assistance is appreciated. This method from the driver class call method from inventory class to search for a item that is stored in an arraylist. On query it return … | |
ive been looking up, and their seems to be many way to read from a file. my question is, how do you read from a file. the file setup is like this.... the first line is a number(830) representing number of words, next lines are words.. the file looks like … |
The End.