Compiler error for single line if

2881 byte By threadSavera at 2007-10-2 15:24:40
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() ...

Javac not recognized issue

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 ...

boolean size and compiler

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

boolean size

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 ...

I want to compile and run a file which uses three jar files as resources

842 byte By franklinia at 2007-10-2 15:57:54
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, ...

Identifier Expected....

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);}} ...

How to set Classpath

369 byte By saji_surendrana at 2007-10-2 16:27:09
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 ...

Compiling with Older Version

625 byte By dinkarbhaia at 2007-10-2 16:39:43
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 ...

HashTable under Java 1.5

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", ...

Compiling with javac

589 byte By PieterPareita at 2007-10-2 16:56:23
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: ...

java error

114 byte By alligatora at 2007-10-2 17:01:05
I am getting the following error in my output lines, how to fix?java:25: <identifier> expected

Javac Error

317 byte By Zach4390a at 2007-10-2 17:11:57
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 ...

jai som.vistech compilation problem

328 byte By Cyberkata at 2007-10-2 17:19:37
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 ...

What is wrong?

1103 byte By JPax_Codesa at 2007-10-2 17:27:42
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 ...

Servlet Compilation Error

389 byte By Deepa79_subbua at 2007-10-2 17:29:47
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 ...

Help I'm Confused!

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 ...

compiling package

1427 byte By saq123456a at 2007-10-2 17:41:12
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:\> ...

unchecked or unsafe error

888 byte By eternalwila at 2007-10-2 17:45:11
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 ...

How to Compile and run a GUI project made in Netbeans from shell

1304 byte By justborna at 2007-10-2 17:48:06
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 ...

ArrayIndexOutofBound Error on J2EE server

664 byte By findyuvaa at 2007-10-2 17:58:46
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 ...

Compile Time Error Messages

1480 byte By daniel.leander.einarsa at 2007-10-2 18:04:41
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 ...

problem with compilation of HelloWorld.java

340 byte By sanlearnsa at 2007-10-2 18:09:29
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 ...

New to programming in Java. Need help please

212 byte By asiandolla at 2007-10-2 18:16:02
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

What to download?

233 byte By luvinlife202a at 2007-10-2 18:17:36
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

Compiled byte code from version a and version b of some external library?

644 byte By Anthony-Brewa at 2007-10-2 18:21:30
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 ...

Can jGRASP convert to work with C?

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 ...

com.sun.tools.Main.compile()

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.

sorting a loaded string array

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 ...

compile trouble

6304 byte By sneakyimpa at 2007-10-2 18:40:34
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 not able to compile my java file

161 byte By GajendraDa at 2007-10-2 18:49:55
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

how can i run my jsp web-app using weblogic server

122 byte By GajendraDa at 2007-10-2 18:50:01
in which directory should i place my code so that it can run in the internet explorer using the BEA Weblogic Server

class not found********please help!

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 ...

How to get compile messages?

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 ...

Need help writing Java Code

560 byte By asiandolla at 2007-10-2 19:03:43
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 ...

GCJ 4.1 Windows binary version

3089 byte By CSJakhariaa at 2007-10-2 19:07:30
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 ...

Finding the cause of a preverify error

1857 byte By jadelindquista at 2007-10-2 19:13:35
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 ...

JDK 1.5 and Objectstore (PSE PRO)

490 byte By gnorketta at 2007-10-2 19:25:07
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 ...

Compilation's problems with eclipse

589 byte By alepuzioa at 2007-10-2 19:29:20
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 ...

Error in properties

1628 byte By BALA_SINGAMa at 2007-10-2 19:29:37
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 ...

undefined reference: compiling swt using gcj

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 ...

creating an exe of a Java code with GCJ, for Unix from Windows

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 ...

Compiling a Servlet

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...

importing 'my' packages

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 ...

Strange Compiler Error

1626 byte By ExitsFunnela at 2007-10-2 20:21:00
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 ...

Need help in Identifying.

346 byte By SkyDiplomaa at 2007-10-2 20:33:52
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 ...

encoded class files

490 byte By _mruettia at 2007-10-2 20:37:56
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 ...

Help with a compiling error

1041 byte By Kazuma.Mikuraa at 2007-10-2 20:43:50
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 : ...

warning problem

175 byte By bachir1983a at 2007-10-2 20:58:15
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 ?

Is this a Compiler problem

794 byte By addvermaa at 2007-10-2 21:56:05
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 ...

How to compile java code from jsp page durining runtime

140 byte By Ankoor_Mehtaa at 2007-10-2 22:06:29
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