4,084 Posted Topics
Re: [QUOTE=betny;1625845][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 … | |
Re: tried Google yet? [URL="http://www.java2s.com/Code/Java/Development-Class/StringConverterUnicode.htm"]http://www.java2s.com/Code/Java/Development-Class/StringConverterUnicode.htm[/URL] | |
Re: not necessarily, worst (but easiest) approach would be to have your username and password hardcoded in your code. a better way would be to put them in files, which you can read (and maybe write) from within your application, but yes, using a database is very common approach. a nice … | |
Re: you have no readArray variable in your main method, but still you try to pass it as a parameter to your method. Ezzaral already pointed this out. also, realise there 's a difference between: reading input from the command prompt and command line parameters. | |
Re: also, something very important to know, is what you can NOT do with keywords :) | |
Re: well ... if you know nothing about programming at all, it might be a bit late to start learning if you want it to be finished within a few days. you might pull it off, but ... you'll need to have a GUI, if you want it to be a … | |
Re: so, you do write the code but you just don't know what it means or what it is supposed to do? I think what you ment to do was: Vector<Walls> obstacle = new Vector<Walls>(5,5); the name between < > shows what kind of elements you can put in the Vector, … | |
Re: [Code=Java] class A{} class B extends A{} [/Code] through this way, class B inherits all the methods inside the A class, and B would pass a IS-AN-A test, so polymorphism would be possible. This is the second thread of yours (after overloading) I've answered, but even though I have given … | |
Re: [Code=Java] method(int i){} method(double d){} method(float f){} method(int i, float f){} [/Code] overloading methods means creating several methods in the same class with exactly the same name, but with other parameters, doesn't need to be the same number of parameters, but it has to be unique for each method, since, … | |
Re: [QUOTE=andersonelnino;1618115] have try the best i could but dont know why is not working on jcreator..kepping repeating mm[/QUOTE] so, it keeps repeating mm? could you be a bit more specific as to what 'mm' is? I ran your code here, and it works just fine. yes, you do get quite … | |
Re: [QUOTE=Killer_Typo;1617861]I think it means the author of the book was tired and miss-typed :)[/QUOTE] either that, or it was meant as an: can you see what's wrong here exercise | |
Re: [QUOTE=tammy12w;1617642]help im new to this.... why are get method useful?? for example why write this: [CODE]public class name { private String yourname; public void setname(String Fname){ yourname= Fname; } public String getname(){ return yourname; } public void sayying(){ System.out.printf("hello %s", getname()); } }[/CODE] when this also does the same thing … | |
Re: @Stewie and RWilson even Ãf the problem wasn't solved by now, the OP surely doesn't really care enough any more to check this thread | |
Re: Swing does not interact with a DB. It's used to create a user interface (frames, panels, well, your basic screens) in which you can enter or show information. where Swing can help you create the code for your front-end, the actual calls to your DB are more in the back-end … | |
Re: in that case, what do you mean with: [QUOTE=andersonelnino;1614578] its not giving me anything..[/QUOTE] | |
Re: [QUOTE=andersonelnino;1614422]its still the same...can you run it on your laptop..thanks and checked it for me...[/QUOTE] yep, your code runs just fine, you just need to use the correct upper and lower cases, as was suggested earlier. | |
Re: well .. just posting public static void main(String[] args){ says nothing. for all we know, this main method is declared within another method. so, show the error message (stacktrace, ...) you get, and post some code in which we can see something. | |
Re: I would follow jwenting's advice and go for the Oracle courses. they cover different parts of the language, which are put in different courses and exams, if you would want to take them. having 50+ access within a single click is not half as usefull as having written 50+ smaller … | |
Re: to work with xml in Java, using [URL="http://www.jdom.org/"]JDom[/URL] could help you out. there's enough documentation on the site itself to help you advance. | |
Re: [QUOTE=yazz110;1609053] I really don't wanna ask for help from some of the guys in my course (they think girls suck at programming). Really wanna prove emm wrong :). Ohh I don't mind tutoring :p thanks[/QUOTE] never be afraid or embarrased to ask help to them, not doing so when you … | |
Re: @tick: logic errors cause intention errors, and a fallacy is a logic error or contradiction... the larger issue is the intention error - 1 of those, many logic errors. Also, I already said that... Eclipse happens to be an IDE... @yazz110: no problem. Just use a better IDE that has … | |
Re: [QUOTE=Beginner+597;1608271][code] string array = Random number(); for(string number : array) [/code][/QUOTE] what the hell is this supposed to mean? not taking NormR1's answer into account: do you know what [Code=Java] for ( [B]S[/B]tring number: array) [/Code] does? can you figure out where you messed up there? if the OP just … | |
Re: and some of your java code would come in handy, too | |
Re: fatih54102: after more than 6 years, I'm pretty sure that, even if the OP hasn't finished yet, he doesn't really care anymore. don't revive dead threads, it's useless and a waste of time. could one of the admins please close this thread? | |
Re: Hally ... a first part of advice: read the dates on the previous posts. Nobody posted in this thread for almost 4 years, I'm pretty sure the original posters are not following this thread anymore. start with your project, and if you have specific questions: come here, create a new … | |
Re: well, you could remove all the items, and store them back into the Map with the new key values, or just creating a new Map, which overwrites the old one, and which you fill with the new values. | |
Re: well ... just like the website itself says: [QUOTE] Why another test? Once again, this test asks programmers to program. For real. Forget about multiple-choice questions. [B]This type of Java certification doesn't prove anything.[/B] There are a lot of "programmers" who know Java syntax and libraries but cannot implement simple … | |
Re: well, he means that, when you ctrl-click on 'Exception' in the line µ [CODE=Java]System.out.println("Exception");[/CODE] it still links to the class, even though it's not a reference to the class itself. | |
Re: if you only have three more classes to go, you've propably had a lot of classes behind you. what DO you understand? and where are you stuck. don't expect us to start coding for you, because that's not what this forum is ment for. | |
Re: if I were you, I would add that answers to a list .. act like you're a carpenter and take Ezzaral's advise: don't start hammering untill you know what a hammer is and what it can do. starting to hammer without understanding, I pitty your fingers. | |
Re: yep ... double is a reserved keyword. that 'll propably be your fault. just rename your file (and class) to something more suitable (and allowed) like DoubleApp | |
Re: well...looks like you have your work cut out for you . it isn't that difficult, but I assume you're a starter, so then it might be a little more tricky. if you know pseudocode or nasi-schneidermann, write your code in one of them, so it will be easier to distinguish … | |
Re: and, have you reset the value of the JTextField? | |
Re: [QUOTE=mbaierl;738000]How can I modify the classpath for an individual application? There are reasons for not including all files in the EAR file itself, so how can it be done?[/QUOTE] being rational minded enough to create a new thread with your question instead of re-opening one that hasn't been open in … | |
Re: take a look at this, but I would say the name of the Exception class that is thrown explains a lot on its own as well [URL="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html"]Check me[/URL] | |
Re: extend a class in a method?? your question doesn't make any sense. if you mean to ask: should we extend abstract classes, then .. yes, otherwise, how were you planning on using them? for a bit more information on the subject, I would like to refer you to some easy … | |
Re: sending an array of 'students' into the 'student' constructor? no, not really. your student class should be built to deal with a certain student. besides, how can you have an array of 'students', before you actually have 'student's'? use the student constructor to create a new student, by giving it … | |
Re: w3 w0nt b3 much h3lp b3c0z y0u w0uld n33d t0 und3rst4nd Java. Do you really think we can teach you 'Java for Dummies' in about ten minutes, so you can claim to be a certified Java developer and fraud on your job interviews? dude, seriously, one question about the basics … | |
Re: it doesn't really matter. what programming language you use doens't really decide what database you use. as for your high performance question: that depends on the sort of application you're running, and whether it runs just once or in a loop. just choose the one you're the most comfortable with. | |
Re: @gyno: actually, there's no such thing as "one complete api ready to be downloaded". every developer, even from the smallest amount of classes, every framework, comes with it's own api. a quick google for "download java api" would automatically lead you to the next site [URL="http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs"]download docs[/URL] on the Oracle … | |
Re: passing a copy of the value: you won't change the value of the original object in the 'parent' or calling method. let's say method a calls method b, with a copy of the value of object c, which is used in both method a and b. if you alter this … | |
Re: if you really want to do this in a serious way: don't put java code in your jsp. learn how to write/use servlets, and let them deal with your business logic. off course, there are plenty other ways (frameworks) you could learn, and that would propably be a lot better, … | |
Re: Yeah, I learned one at Hogwartz last semester, you might want to ask my informatics teacher JK Rowlingus. You do need a bootable wand, though :) | |
Re: are we talking about a GUI, web based, command prompt application? for the latter, use scanner (or an alternative, duh) to input values, and store them into your variable. for the first two, there are methods that help you doing this, but you'll have to be a bit more specific. … | |
Re: nope, if you don't explicitly declare 'm private, they will have package visibility and accessability, which is, as I assume I don't need to explain, quite a different matter. if you want your variables to be private, you'll have to type the 'private' access modifier for each of them. | |
Re: and at least TRY to PRETEND to be willing to do the effort to show your code. we won't download everyone's zip or jar files, to go through hundreds or thousands of lines of code, because we need only to look at three lines, but don't know where to find … | |
Re: I'm not going to download your zip and look through it entirely. please post your relevant code and be a bit more specific as to what you want.. do you want the JPanel to be printed, or the contents of the JPanel? | |
Re: Well ... if you take a closer look at your code, you'll see that you haven't placed your main method in the Main class, but in a 'newMain' class. your JVM is looking for the Main class in your code, but since it's not there, it runs into an exception. | |
Re: Just a few remarks: 1. in your contents class, in your search method, you are using the '==' operator to compare String objects. Don't do this, use the .equals method. 2. you having a bunch of unused variables and imports, might be better to leave them out. 3. that's .. … |
The End.