javac] class file has wrong version 48.0, should be 47.0

1283 byte By prateek_gangwala at 2007-10-1 12:39:54
I am using ANT to compile a set of Java files and came across the following error:-[javac] bad class file: /usr/local/packages/jdk1.4.0/jre/lib/rt.jar(java/io/BufferedReader.class)[javac] class file has wrong version 48.0, should be 47.0[javac] Please remove or make sure it appears in the ...

Optimizing compilation process

339 byte By ujuarez_onlinea at 2007-10-1 12:48:34
Hello.Is there a possibility that javac or other tool has an option for optimizing bytecode production during the compilation process? For example, statements like for, while, do or switch can be compiled closer to source code, and with an option can be compiled for better performance at ...

importing from no-name package

592 byte By GiriNathana at 2007-10-1 12:49:03
Hi,I am developing a s/w with a well defined package structure. But I need to use someone else's classes which have been "packaged" into a jar file.The problem is that their classes do not have a package name; so I cant use the import statement.If I dont use package names in my classes, then I ...

Problem while compiling source directly from a program

3398 byte By BurakBa at 2007-10-1 12:54:46
Hello everyone,I've been looking for a solution to my problem for the past two days and still could not solve it. First, let me explain what exatly I want to do...I'm developing a code generator which generates plain simple java code. I want to compile this code inside my program and use the ...

Mobile Compiler

315 byte By chris_fooa at 2007-10-1 13:27:55
I'll like to ask if there is a way to put the SDK in to a USB thumb drive or hard disk and just compile from there.This is so as to be able to just use any computer that i can find and have not to install the SDK into the computer to use the compiler.Best Regards and thanks to all that ...

java.lang.ClassCastException: carColor

6842 byte By KaosJestera at 2007-10-1 13:44:30
// Please note that I've only been coding for a week or two, and this is mostly code provided to me... //Compiled, but during run it returns this:java.lang.ClassCastException: carColorat sun.applet.AppletPanel.createApplet(Unknown Source)at sun.plugin.AppletViewer.createApplet(Unknown ...

correct cast not allowed

590 byte By coconhaa at 2007-10-1 13:48:37
I think the spec allows this scenario underneath as unchecked cast, however javac does not allow it.Can someone confirm this?Coconhapublic class TestCasting<S extends Comparable><S>> {public TestCasting() {S a = (S)(Integer)3; // this should not ...

compiles well with eclipse but not with javac

3090 byte By Efvoca at 2007-10-1 13:58:05
Hello.I am using Windows XP and eclipse 3.0.2.I have j2sdk-1_4_2_07-windows also.I built class files from the code below with eclipse.On jre, It silently runs and exits as expected.But when compiled with javac, It does not.It dumps a stack trace.Which compiler is right?public class ...

compiling /usr/ports/java/jdk15 error

11036 byte By vizion2a at 2007-10-1 14:12:56
Topic: compiling /usr/ports/java/jdk15 error From: Vizion <vizion@vizion.occoxmail.com>Hi I am compiling the FreeBSD port onto FreeBSD 5.3 and do not have enough experience to identify the cause of the error. I have raised the question on the FreeBSD-java@freebsd.org mailing list but so ...

Compilation differences between Windows and Linu

2771 byte By chris@tennaxiaa at 2007-10-1 14:15:06
Hi,I've got a problem with the compilation of a .java which does not give the same results under windows and Linux (fedora 3)Here is the TestDB.java ...

Opinions about JCG: is it good?

278 byte By sania-barmaglota at 2007-10-1 14:55:29
Hi all.Has anybody had the real working experience with GCJ ( http://gcc.gnu.org/java/) ?Could you share your opinion, please - is it good, mature, stable enough (m.b., other important aspects)?Really appreciate any inputsSincerely, jabb

Special directives for javac

296 byte By safulla at 2007-10-1 15:00:38
Hi. Lately I been coding back in C/C++ and there is a little thing i miss in java. Directives like #error or #warning. I use them to mark code I know it's working and a little descriptive message.Also things like #ifdef, etc. Is there anything similar in java?

javac does not work

198 byte By jjdahlheimera at 2007-10-1 15:04:47
my cmd prompt does not recognize javac as a internal or external command I am using a fairly new dell with windows xp and sdk version 1.5 anyone else run into this. Any help would be helpful.

Optimising Help

1228 byte By rickie_richa at 2007-10-1 15:12:22
Suppose I define a classclass test1{Stack myvar = new Stack();class test1(){}public boolean idosomethinghere(){ return myvar.empty();}}now I have reason to use the class again so I create a new instance of the class test1.Another way would be to redefine the class to below.class test1{class ...

Compiler for mobilephones

109 byte By Woblina at 2007-10-1 15:12:46
Im trying to learn to make games to sonyericsson phones and need the name if a free or cheap compiler.

JCreator won't compile. How do I fix a bad path?

378 byte By arhoustona at 2007-10-1 15:27:54
This is the error message:Error : Invalid path, \bin\javac.exe -classpath "C:\Program Files\Xinox Software\JCreatorV3LE\Templates\Template_1\src" -d "C:\Program Files\Xinox Software\JCreatorV3LE\Templates\Template_1\src" "C:\Program Files\Xinox ...

Exception in thread - Help!

1165 byte By foohooa at 2007-10-1 15:30:09
Hi i am new to java but i have knowledge in delphi and c++. I am trying to create a simple program to show the use of tokenizer. this is the code:import java.util.StringTokenizer;class ShowTokens {public static void main (String[] arguments) { StringTokenizer st1,st2; String quote1 = "VIZY 3 ...

Different JRE and Compiler Versions

354 byte By W_Knappa at 2007-10-1 15:33:33
The subject is kind of bland compared to this, so I'll get into describing it. Let's say for example I am running the 1.5 JRE and the program running in it wants to invoke the 1.2 Java compiler. Since I am running in a RTE, will the 1.2 compiler call inherit the 1.5 environment or will it ...

Switching to different versions of compiler

336 byte By Guru_Hanchinala at 2007-10-1 15:36:08
Hi, I have JDK1.4 installed on my machine. I would like to compile java files with the lower versions of JDK. i.e., JDK1.3. I am not interested to install JDK1.3 and compile.Can someone guide me to compile by switching the versions ?Thanks in advance...Thanks & Regards, Gurushant ...

How do Classpaths work?

379 byte By tieTYTa at 2007-10-1 15:49:04
I know this is a very simple concept and I should know it since I'm a professional programmer. But for some reason I never learned how classpaths work. When I type javac whateverI can never figure out how to solve problems that arise due to a bad classpath.I'm using Windows so please answer ...

classpath problem?

990 byte By krumela at 2007-10-1 16:07:19
Hi! this is a very stupid problem that I cannotwork it out and is driving me crazy.I downloaded an open source application from berkeleyuniversity and I needed to add a few changes to the code.The structure of the package is edu.berkeley.guir.webquilt.proxyThe class that I need to compile ...

Static variable problem

1604 byte By ravabolia at 2007-10-1 16:09:35
Hi.. I am new here.. I have written this piece of code to test out sthn.. And errors are generated one saying that non static variable cannot be referenced from a static context and the next says that inner class cannot have static declarations..Any help would be greatly appreciated.public ...

Line numbers with JIT compiler

405 byte By kish76usa at 2007-10-1 16:21:42
We have a production J2EE application and whenever we get an application error, the stack trace doesn't show the line number at which the error occurred but, would display for example com.test.app.action.select(compiled code). I know that this is a limitation with the JIT compiler, but is ...

compiling application (with several sub-packages) from another java app

405 byte By guydescheppera at 2007-10-1 16:48:29
Hi,I'm writing my own build tool and need to be able to compile an external application (pulled from cvs, subversion, ...) from within this build tool.Probably I need to use com.sun.tools.javac.Main.compile ?But how do I pass classpath, output dir, etc to this class and how can I make it ...

Invoking java class

1738 byte By dr_zeetoa at 2007-10-1 17:01:23
Hi,I have a bunch of Java classes and I have to invoke one of them. I have Eclipse on windows environemt. How can I carry this out. I am java newbie and have no clue how to proceed.Note that I tried the following:I created a new project in the folder where i have all my classes. It ...

protecting resources and the codes

290 byte By Kharona at 2007-10-1 17:08:42
hi ... i have learned that we can protect our codes with obfuscation technics. but i need a solution to protect my resource files like images and sounds. has anybody an idea about this problem ? 'cause i have a splash screen and everbody can change the splash screen logos...

can javac warn about unused imports?

358 byte By bbatmana at 2007-10-1 17:15:04
Guys,Do you know if there is any way that sun's javac command line tool can be configured to warn if a java source file declares imports which are never used inside the file?Many IDEs will somehow graphically indicate this (e.g. eclipse and intellij do), but I need this functionality from the ...

how can you detect (from a script file) that javac found problems?

895 byte By bbatmana at 2007-10-1 17:15:06
The subject line says it all, but the background is:I have a script file (.bat, since am stuck on windoze for the moment) which is doing some compilation using javac.I would like to skip all subsequent activities in the script file after the call to javac if any file failed to compile.So, what ...

Beginning JNI

1479 byte By ragoo23a at 2007-10-1 17:26:25
Using java version 1.5.0_02, I am attempting to use the JNI for the first time. I have a simple java class called dehexTest.java:class dehexTest {public native void dehexMain();static{ System.loadLibrary("dehexTest");}public static void main(String[] args){ new dehexTest().dehexMain();}}I use ...

Probelm with JDK1.4 and Importing classes

905 byte By kseckera at 2007-10-1 17:35:01
I was wondering if someone could help me out. I have just written a quite simple java system which consists of about 12 classes under 5 packages (folders). Now if I compile this in JDK 1.5 (which it was quite natural to choose the latest JDK) eveything is fine, all the classes compile, no ...

Compiling error - just started happening, but why?

1962 byte By Waps77a at 2007-10-1 17:38:48
Hi, going a bit crazy here. Have been working on a small project (about 15 classes right now), and all was going well until today. Up until now, I've simply compiled using the command "javac f1m/F1M_main.java". I have this in a batch file, that also has a command to delete all class files ...

<classname> is not abstract and does not override abstract method

2556 byte By charmedcharmera at 2007-10-1 17:40:36
Im compiling the code below using the Ktoolbar, then I'm receiving this error messageC:\WTK22\apps\CanvasExample\src\CanvasExample.java:6: CanvasExample is not abstract and does not override abstract method destroyApp(boolean) in javax.microedition.midlet.MIDletWhat do I need to change to fix ...

Virus Java\Byte Verify

411 byte By daz_60a at 2007-10-1 17:45:19
Recently, my anti-virus package has detected the following embedded objectedJava/Byte Verify. AVG classified it has a virus but I thought that it was something Java put there upon installation. It is in Sun\Java\Deployment\cach.Now I'm encountering a no class definition. My programs compile ...

JavaByte Verify Virus

405 byte By daz_60a at 2007-10-1 17:45:35
Hi There:Recently I have discovered this virus on my computer. And of course my programs have all stop wrking. They will compile but that is all. I am a little insecure about going in and deleting the offending code. Is this the only remedy/fix?My anti virus package was unable to remove it. ...

help with textpad and java

365 byte By luke0927a at 2007-10-1 17:55:20
ive just started taking my first java class and im having trouble. text pad says system cannot find javac.exe in the system32 folder. i have followed one of the post on here about the registry keys but im missing the run key in the Helois folder i have jre 5.0 and sdk 1.4 how can i get this up ...

Why is my program not executing?

266 byte By spyd3rra at 2007-10-1 17:59:29
So my program compiles/builds just fine, but when I execute it, SunOne executes the one of the sample programs it comes with. Same thing happens with all java files that i execute.I am very confused and have no idea what is going on? how do i fix this?

A pre-processor for #ifdef / #endif

220 byte By DavidThia at 2007-10-1 18:01:24
Hi;Anyone know of a pre-processor that can handle #ifdef in our java code? We have a customer (a bank) that wants no logging in the libraries we deliver to them for security reasons.? - thanks - dave

Javax.Imageio Help Needed

1285 byte By Supercoolyoa at 2007-10-1 18:02:38
Basically, I found a site with a Javax.Imageio applet used to take screenshots with the click of a button.The problem is that I know nothing about compiling Java, and I would like some assistance. This applet is a necessary addition to a webpage gaming site browser (Basically it's a framed ...

Problems with comiling java files, using multiple classes

484 byte By kyosaa at 2007-10-1 18:02:49
Hi there!Ive got a problem:Im working on servet.java files, that use other classes in the same directorySo if i try to compile one file (there is no main java file) it says that the compiler wasnt able to find the methods used in other *.java files , allthough all the files are in the same ...

Can't compile class using library

498 byte By insolitea at 2007-10-1 18:14:16
Hi!I have a simple class which uses library A. This library uses another library B in turn. When I try to complie the classs with javac, I get the message 'cannot access C. file C.class not found'C is the name of the class from library B. I wonder why the compiler need the library B to ...

Web Application with NetBeans 4.0 & JDK 1.5

422 byte By kchia at 2007-10-1 18:17:01
I am currently working on a web application using NetBeans 4.0.I have a piece of code that works perfectly in a General application which works on jdk 1.5.However, when i created a web application and port all existing code to this new project, the compiler gives me an error:javac: invalid ...

Custom Compiler Language

267 byte By 2Puluh11Lapan3a at 2007-10-1 18:19:59
I create my own texteditor,the plan is i want to trap the error message that generate from the java compiler to my language, so i can display the error message with my own words (not an exception errors)..What should i do, to solve this?Thanks...

Jikes + OS X tiger

580 byte By Yogi_Beara at 2007-10-1 18:21:59
Hi there,Whenever I try to use jikes, I get the following error:Found 1 system error:*** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" in:.Other postings say of having to define CLASSPATH to a dir ...

Netbeans 4.1: JSR-109 web services are only supported in j2ee 1.4 apps

285 byte By kchia at 2007-10-1 18:22:38
There is no way to create web services in NetBeans 4.1 with Tiger (jdk 1.5).Because when you try to create a web service in NB4.1, you will straight away get an message in the New Web Service window:JSR-109 web services are only supported in j2ee 1.4 applications.

Hardware Question

1214 byte By Peelman126a at 2007-10-1 18:30:51
I'm looking to build a new PC strictly for my programming and was wondering which hardware I need to focus on. I'm only a novice programmer but it is a fun hobby to have.Anyway, when compiling and running java programs where are the main instructions being carried out? I mainly do detailed ...

remove empty methods

184 byte By cispasoiua at 2007-10-1 18:31:20
i have empty methods in my code; can i compile it so that an optimisation can be made to remove the empty methods and the reference to those methods?thanks,catalin

Renaming FooBAR$1.class

221 byte By DenverRapSucksa at 2007-10-1 18:42:27
k so i compile fine, but get fubar$1.class and fubar$2.class. which is mostly fine by me, but the ftp server i try to upload to doesn't like the $ in the file names. So how do i get it to compile without the $'s.

add jar to classpath at runtime

218 byte By AakashAtPSPLa at 2007-10-1 18:49:11
I want to add a jar file to the classpath for my program only(don't want ot set the global classpath) and that too from within the program. Can you please help me with it? thanks in advance

Problem when running outside of the IDE

843 byte By buk110a at 2007-10-1 18:56:32
Hello, hopefully someone with more knowledge in Java can assist me with this issue. I am currently using NetBeans for my developer tool and have written a program that takes advantage of the PDFBox libraries.The file will run properly within NetBeans; however, when I goto clean and build the ...

Im lost and cant compile anything, keep getting an error!

324 byte By mashackalacaa at 2007-10-1 19:17:48
all i want to do is to be able to compile my simple HelloWorld program but when i tell it to compile in the command prompt:C:\Documents and Settings\Mashackalaca>javac HelloWorld.javaerror: cannot read: HelloWorld.java1 errorWhat am i doing wrong?Any help is greatly ...