java amateur
Originally posted by miguel lisboa:
What i know:
jdk is for developing: compiling, etc
jre is for running outside of development environment
...
3) if i dont have jre 5 i cant run tiger apps, right?
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
You could go further and create an ANT script
It also means that you CAN run Tiger apps without installing the JRE 5 explicitly because it already comes with JDK 5, which apparently you have already installed.
java amateur
Originally posted by miguel lisboa:
@Kashif Riaz
but i dont; well, i'll uninstall/reinstall; think is better having a clean install instead of downloading just the jre (not sure)
thanks to all who answered!
java amateur
C:\>java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
C:\>javac TesteJava5.java
C:\>java -cp . TesteJava5
23
java amateur
java amateur
Originally posted by Nigel Browne:
As java 1.5 can compile and run any program written for previous versions of java. Why have more versions on your pc?
You can use the -source and the -target flags of javac if you need to ensure compatibility with a previous version.
Originally posted by Carol Enderlin:
It's not trivial to control every java or javac command used by my system, to pass in the -source and -target flags. e.g. weblogic compiling ejbs and jsps.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
java amateur
My JDK 1.5.0 bin dir:
C:\_tools\jdk1.5.0_01\bin>ls -l java*
-rwxrwxrwx 1 user group 49248 Dec 6 21:08 java.exe
-rwxrwxrwx 1 user group 49269 Dec 6 21:08 javac.exe
-rwxrwxrwx 1 user group 49275 Dec 6 21:08 javadoc.exe
-rwxrwxrwx 1 user group 49269 Dec 6 21:08 javah.exe
-rwxrwxrwx 1 user group 49265 Dec 6 21:08 javap.exe
-rwxrwxrwx 1 user group 49250 Dec 6 21:08 javaw.exe
-rwxrwxrwx 1 user group 127078 Dec 6 21:31 javaws.exe
JDK 1.5.0's JRE bin directory:
C:\_tools\jdk1.5.0_01\jre\bin>ls -l ja*
java amateur
Originally posted by Marilyn de Queiroz:
Code written in 1.4 should compile and run just fine in 5.0, but the opposite is not true.
James Carman, President<br />Carman Consulting, Inc.
java amateur
Originally posted by miguel lisboa:
from my command line i cant use:
ls -l java*
What's wrong? (i'm using xp)
thanks in advance
The question is what happens when you do? Does it give you an error message?
java amateur
the above directory listing shows that you DO have JRE 1.5 installed.
So, are JDK 1.4 and 1.5 installed? Also, what directories are they installed in?
What are your PATH and CLASSPATH variables set to?
If you can give us this information (and not change it while your waiting for a response), we should be able to work things out from there
java amateur
Originally posted by miguel lisboa:
'ls' n�o � reconhecido como um comando interno ou externo, programa operacional ou ficheiro batch., which means more or less:
ls isnt recognized as intern or extern command, operacional program or bat file.
So now you need to decide what you want to do? Do you need both JDKs installed?
Anyway, let us know what you want to do now and we'll try to help you figure it out.
javac isnt recognized as internal or external command, operacional program or bat file
java amateur
Why not create batch scripts
Excuse me if this is not relevant
java amateur
Originally posted by miguel lisboa:
after all there�s still a small catch:
when i turn on my pc and make java -version i'm told ist all (jdk and jvm) 1.4.2;
if now i write javac at command prompt i get an error msg stating its an unrecognized command, etc:
C:\>javac
'javac' n�o � reconhecido como um comando interno ou externo,
programa operacional ou ficheiro batch.
C:\>java -version
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
...
Is there any solution for this?
thanks in advance
An example:
I set mine in system properties for jdk 1.4.2 and
java amateur
java amateur
42
because once again you're using a 1.4 runtime to try and load a 1.5 classfile.
I thought you'd have learned to recognise the signs by now, they've been explained to you several times already.
java amateur
Originally posted by miguel lisboa:
but, since ant build failed, i could not possibly have any class files
also, would ant try to run those hipothetical classes and in consequence print that version msg?
in conclusion: i dont think i�m the dumb you'r saying![]()
C:\aaa-TIJ3-distribution>java -versionjava version "1.4.2_06"Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode) C:\aaa-TIJ3-distribution>ant -versionApache Ant version 1.6.2 compiled on July 16 2004C:\aaa-TIJ3-distribution>antBuildfile: build.xml run: JDK.version.check:[CheckVersion] java.lang.UnsupportedClassVersionError: com/bruceeckel/tools/CheckVersion (Unsupported major.minor version 49.0)
42
java amateur
You could have known perfectly well you had the wron JVM and classversion from the output...
As you're still using a 1.4 runtime with a 1.5 compiler...
java amateur
Get out of my mind! Look! A tiny ad!
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|