|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Version of Jdk on my machine
Hello,
Please, i ask what command linux used to know the version of jdk installed on my machine ? Thank you so much. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
java -version |
| The Following User Says Thank You to itkamaraj For This Useful Post: | ||
chercheur857 (10-09-2012) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Quote:
I ask please is that possible that a function in java operates correctly with a version of jdk and not with others (exp openjdk-6-jdk ) ? Last edited by chercheur857; 10-09-2012 at 07:51 AM.. |
|
#4
|
||||
|
||||
|
you can get the java version using the below code Code:
String version = System.getProperty("java.version");then compare the version with your expected version, then do the rename |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
i have added this instruction to my code:
The version is 1.6.0_20 with this version of jdk the renameTo works well but with openjdk-6 not how can i do please ? see this url please: http://docs.oracle.com/javase/7/docs...ava.io.File%29 |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
can you explain more of the below line
but with openjdk-6 not |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
the same code run correctly on a machine with jdk: java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.10.1) OpenJDK Client VM (build 19.0-b09, mixed mode, sharing) but with other machine with jdk openjdk-6-jdk does not work :::
At run time the program does not rename the file (it does not moving the file).. i have an error when the programm will use the file in the new destination (when i insert command linux mv in my code java it works !!!) |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to transfer files from unix machine to local machine using shell script? | vidhyaS | Shell Programming and Scripting | 1 | 08-08-2011 10:27 AM |
| shell script to copy files frm a linux machine to a windows machine using SCP | nithin6034 | Shell Programming and Scripting | 3 | 07-21-2011 12:56 AM |
| is there an veritas volume manager version compatible with solaris x86 machine? | chidori | Solaris | 2 | 06-12-2011 09:02 PM |
| To find the LATEST file from a dir on REMOTE machine and SCP to local machine? | me_ub | Red Hat | 3 | 07-08-2009 12:57 AM |
| Best possible communication mechanism between a Solaris machine and a windows machine | Krsh | Solaris | 7 | 02-05-2009 09:41 AM |
|
|