Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: 2 Java questions

Re: 2 Java questions

From: Mark Will <Mark.Will_at_gems6.gov.bc.ca>
Date: Mon, 20 Sep 1999 13:41:13 -0700
Message-ID: <z6uzOs$77tEp@vmsmail.gov.bc.ca>


See embedded respones.

<coakleyj_at_hotmail.com> wrote in message news:7s5q1j$p5v$1_at_nnrp1.deja.com...
> Hi.
> 2 issues regarding Java.
>
> 1) We have lost a number of java source code (i.e. the .java
> files), but we have the .class compiled bytecode. Unfortunately,
> the developers have not been vigilant in their backups.
> Is there any means (or are there any tools available) of going
> from bytecode back to .java source code?

There are definitely de-compilers for Java and I think some are free. Check online resources (do a Web search on keywords "decompiler" and "java").

Unless you have obfuscated your source, it should decompile rather well. Yes, it IS possible to obfuscate Java source without being aware. For example, JDeveloper makes it a simple project option.

>
> 2) One of the developers pointed out the following statement
> in a Java Book:
>
> "Despite that java is a portable language, it is still technically
> possible to develop applications that are non-portable" - it continues
> to give screen resolution issues as an example (i.e. developing for a
> 1024 X 768 may not be portable to a 640 X 480 resolution screen.
>
> What other issues could lead to a non-portable application?

Yes, there are other ways to make non-portable Java code, but in my experience you can almost always easily avoid this. For example, a program that reads and writes "long" file names might not work on a Windows 3.1 Java virtual machine. Also, if you refer to files by their full path explicitly (i.e., with slash separators), it probably won't work on either Unix or Windows. Java provides you with ways to report on the characteristics of the underlying system at runtime so with some effort you can avoid this (e.g., java.lang.File.separator). There are other ways, like embedded native code or interfacing with specific OS services, but these require serious intent to make a non-portable application.



Mark Will
Mark.Will_at_gems6.gov.bc.ca. Received on Mon Sep 20 1999 - 15:41:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US