Hi all,I found an interesting quirk, recently. I've condensed the problem into the following simple test class.public class Main {public static void main(String[] args) {final boolean myBoolean = args.length > 1;if (myBoolean) {final double result = doIt();}}public static double doIt() ...
704 byte By
Erisa at 2007-10-2 15:30:50
Hi,I have the same old same old javac not recognised as internal or external command etc issue.I have followed all the instructions on solving this issue, i have reinstalled the jdk twice, the second time directly to C:/ to ensure that the space in "Program Files" wasnt causing the issue. My ...
109 byte By
Motshya at 2007-10-2 15:38:12
hi alli need to know sun says that boolean has undefined size so where the value will be stored
341 byte By
Motshya at 2007-10-2 15:43:14
Let me say it inother wordsCan anyone tell me the exact boolean size for JVM implementation?it is said that when you create a boolean array it is a byte array other said that it is treated like int if it is a single boolean but it reserves only one bitso please if any one has any idea about ...
hello everyoneI seek help in a problem am having.I have a package called Classes which has several classes. (ClassA.java, ClassB.java) and I have a lib folder containing three jar files which i need to compile my classes (A.jar, B.jar, C.jar).Am trying to create two .bat (compile.bat, ...
442 byte By
Kelbaa at 2007-10-2 16:04:34
[codepublic class DeleteWindow{public class DeleteWindow{int response = JOptionPane.showConfirmDialog(null,"Are you sure?","Delete?",JOptionPane.YES_NO_OPTION);if(response == JOptionPane.YES_OPTION){JOptionPane.showMessageDialog(null, "The account has been deleted","Deleted",null);}} ...
I wanted to run HelloWorldSwing.java which is available in the tutorial.i wanted to run from linux. java is installed in /usr/java/jdk1.5The error isHelloWorldSwing.java:5: Can't find default package `javax.swing'. Check the CLASSPATH environment variable and the access tothe archives.So how ...
HelloI used to compile my code using an older version of jdk. It was definetely 1.3.1_xxx. The latest one available is 1.3.1_18 and i just downloaded it and tried to compile my codeand it gave me compile errors. I knew this code used to compile with an older versionso i have two questions(1) I ...
968 byte By
QldKeva at 2007-10-2 16:55:09
I've just changed from Java 1.4 to Java 1.5.With the mod to Hashtables my old code wasBoolean valid;String hour, minute, second, day, month, year;// Logic to populate the values.Hashtable values = new Hashtable();values.put("valid", valid);values.put("d1", hour + minute);values.put("d2", ...
Hi,I have a class: com/easypaygroup/UDF/employee/EmployeeUDF.javain directory: C:\dvl.home\env\jboss-4.0.3SP1\server\default\tmp\deploy\tmp43432easyweb-exp.war\WEB-INF\classesNow I want to compile my class with javac but i get the errorerror: cannot read: ...
I am getting the following error in my output lines, how to fix?java:25: <identifier> expected
After installing the Java Development Kit, I made a sample program found in the book Sams Teach Yourself Java in 24 Hours. I tried compiling it in Comand Prompt but get the error:'javac' is not recognized as an internal or external command, operable program or batch file.What am I doing ...
Hello!The problem is that when I try to import a class from com.vistech, I get a "packave com.vistech.jai.imageio does not exist".The strange thing is that I can import classes form com.sun and javax.media so I suppose the installation has been made ok.What could be the problem?Please ...
import java.io.* ;public class Avaragerr {public static void main(String args[]) throws IOException {BufferedReader xx= new BufferedReader(new InputStreamReader(System.in));System.out.println("Birinci Sayiyi girin(x)");String oku= xx.readLine();System.out.println("Ikinci Sayiyi ...
Hi I compiled my servlet program, it gives an compilation error as package package javax. servlet.* does not exsist.Can anyone help me as how to set Environment variables in windows XP. I am using java1.5.0_02 version.In which we have to set the path 1. user variables or system variables.Pls ...
357 byte By
Arthixa at 2007-10-2 17:37:30
I keep getting this dang error. I have never gotten it before when trying to compile everything. Here is exactly what it says.client.java:3662: ';' expected^1 errorPress any key to continue . . .any idea what im doing wrong.... I know it has to do with the name of the file but i have never ...
hi,i have a file named Test.java in package named test.Say test is located on d: and path of Test.java isd:\test\Test.javaWhen I compiled the file using command d:\>javac test/Test.javaI got the file "Test" which is a class file in test dir.but when i tried to run it using commandd:\> ...
code]private static void constructCodeTable(BinaryTreeNode btn,Stack st,Hashtable codeTable){if(btn!=null){if(btn instanceof LeafNode){codeTable.put(((InternalNode)btn).getKey(),st);}else{st.push(new ...
hi all ..... I develpoed a java project using Netbeans .The project has GUI also (JFrame and various layout ) . The project is building and running fine through netbeans .But when I tried to compile the source files (*.java files) from shell , I failed .The project has two files MainFrame.java ...
When trying to invoke a servlet i get this error in J2EE server log. Some times i was able to invoke the servlet without any error. I couldn't find the reason behind it.Can someone help me out on this? Below is the Catalina log which shows the error:-java.rmi.RemoteException: WS exception in ...
hello,I am currently studying IT at a university on London and we were asked to program a multiple choice questionaire. So far, we were only taught to do it via if/else statements. However, I keep on getting the same compile time error message. Here's the code:import ...
hi,getting problem with compilation of HelloWorld.javaCLASSPATH C:\javaPATHC:\j2sdk1.4.2_04\binHelloWorld.java source code in:C:\javaOn cmd prompt:C:\java>javac HelloWorld.javaerror: cannot read: HelloWorld.java1 errorpls help me with ...
Hi all,I am just learning how to program in Java. My question may sound stupid but I need your help. What program can I download to write java codes? Please help need it asap for my class. Thank you
I just had my computer re-imaged so all the Java I have left is JRE....but I use java to program (but am new to programing)...What do I need to download in order to get the commands java and javac to work (link please)? Thanks
Hi, We are having a bit of debate in our office about compiling code against to different external libraries.i reckon the compiled bytecode should be the same, but there are differences of opinion so i thought i would come here and see what people thought.lets say i am compiling my code using ...
448 byte By
Apuda at 2007-10-2 18:25:32
I have tried changing my jGRASP compiler settings to work with C programs, but I keep on getting the following error: -jGRASP exec: gcc -g -c C:\Documents and Settings\MARK GRUSZECKI\My Documents\Pep8\Hello.c -jGRASP wedge2 error: command "gcc" not found. -This command must be in the current ...
158 byte By
hi2vinoa at 2007-10-2 18:29:31
hi,how can i compile and execute a java program using the "com.sun.tools.Main.compile()" method. pls help me to understand the reflection in it.
16198 byte By
cgarnona at 2007-10-2 18:39:32
hi. i have loaded a file from disk but need to sort out the contents and i'm having trouble with that. pls excuse the messy code as i keep changing stuff trying to make it work.import java.util.*;import java.io.PrintStream;import java.io.File;import java.io.FileNotFoundException;public class ...
I recently wiped my drive and upgraded to winxp and now cannot get my java to compile. Installed my os to my D drive and set both path and class path. I have read the troubleshooting thread and i can do this just fine:====D:\>cd d:\developmentD:\development>javac ...
i am getting error of package not found. i have added all the .java & .class files in the package folder. can any one tell me how to compile that file
in which directory should i place my code so that it can run in the internet explorer using the BEA Weblogic Server
3896 byte By
kemzoa at 2007-10-2 18:50:47
I'm trying to run my jsp application which imports two classes that i have saved in ROOT/WEB-INF/classes/business and ROOT/WEB-INF/classes/data. when I run the application by entering the url on the browser i get the following error. Does this mean the server cannot locate these two classes ...
347 byte By
davooda at 2007-10-2 19:02:04
Hello,I抦 creating a small compiler for a new scripting language. For this purpose I need to convert my code to java and compile the result java code. My problem is that how I can get messages from java compiler? Main things which I need is warning, error message plus line number.Any kind of ...
Hi everyone, I don't know if I am in the right forum, but I am new in writing Java coding and I am confuse on what to do and how to write the code.I have this question and I just dont know what to do:How can I write a java code in the following question?The question:40 hours normal salaryAfter ...
Does anyone has GCC/GCJ 4.1 Windows binary versionI had downloaded MingW alongwith which GCC 3.4.5 is available but it does not compile Java1.5 files due to the presence of StringBuilder classSo I had read somewhere that this has been patched out by giving support for this additional classSo If ...
I could use some help trying to figure out the source of this error so I can fix it and move on.I'm compiling my j2me code using NB RCv. 5.2. I get the following preverify error ONLY when I have "compile with optimization" and "obfuscation high" set:Preverifying 29 file(s) into F:\Netbeans 5.0 ...
I've be compiling my application with JDK 1.4 and using 1.3 for binding those classes for Objectstore. I recently upgraded to JDK 1.5 (1.5.0_06) and the binding (persist) does not work now. I get the following message for all classes I'm try to bind:Error: xxx.class is not a valid class ...
helloin working for my thesis with eclipse I have see that the modify to source code have not effect in runt-timeIn effect I have an file .class, I modify the source file .java, I compile and i go this in run with the Eclipse command <<run>> but the behavior not change.I don't lie ...
Hi,I'm newbie for J2EE platform. I downloaded J2EE tutorial from sun site. I try to compile a app which ConvertApp using the asant build comannd.I get this error.buildBuildfile: build.xmlj2ee-home-test:BUILD ...
2036 byte By
phsansa at 2007-10-2 19:38:04
Hello guysI'm trying to make an exe from a java code, using GCJ and SWTMy code is this: import org.eclipse.swt.SWT;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.MessageBox;import org.eclipse.swt.widgets.Shell;public class TestExe {/** * @param args */public static void ...
379 byte By
phsansa at 2007-10-2 19:51:54
HelloI'm making some executable files for a Java program, using GCJ.I'm developping under windows.I've succeded creating a .exe file for the Windows platform.I'd like to know if it is possible to create an executable with GCJ, but for Unix, from my Windows platform?If yes, how can I do ...
255 byte By
diaruna at 2007-10-2 19:58:15
Iam new to servlets...I have been working only with core java till now..i donnow how to compile it..it says package javax.servlet does'nt exist..i have jdk1.5, j2sdk1.4.2_11, tomcat-5.5.17..plz tell me how to compile it and run it...
1078 byte By
Dractema at 2007-10-2 20:20:08
My name is John and I an new to this forum.Would like some input from someone on importing user defined packages - something which I am having difficulties with.As of yet - I have been unable to import any of my packages successfully. Javac cannot find them. They are in a directory with the ...
Hello,I'm struggling to explain a compiler error I've just received. I had some original code which looked like this:// Begin old java filepublic class Foo{ public String f1(int x, int y) throws Exception {if (x == 4){return "foo4";}else if (x == 5){return "foo5";}else if (x == 6){return ...
Hi all,Thanks for viewing this forum which i have posted, I would like you to go to a website which i will post and there you all need to help me.Just can you tell me which text editor he is using?the link is http://homepages.shu.ac.uk/~sgreasle/seang/Tutorials/java/1/1.htmCan you also tell me ...
Hi,I'm using encoded class files in my application. These files are decoded using my own classloader. I now introduced a new feature which should compile a part of code at runtime. The problem is that this code has imports of class which are only encoded available. Is it possible to install a ...
I'm trying to compile two scripts, one for a login and the second for the client itself, but theses are the errors I keep getting:XMLParserServer.java:7: package org.apache.xerces.parsers does not existimport org.apache.xerces.parsers.SAXParser; ^MultiServer.java:26: cannot find symbolsymbol : ...
what does this warning mean?Warning; deprecation show() in java.awt.Windows has been deprecatedwhen i wan to show JFrame it appearswhat caan i do ?
I have a java file which has the following line of codeString strOne = (strValueToBeRead == null || strValueToBeRead.equals("")) ? " " : strValueToBeRead;When I compile the file, a class file gets created. On opening the class file with "jad" (a decompiler) the above line of code is shown ...
plz help me how to take java code in a text box from the user and compile and show the result online of the code inputted by the user