Re: encrypted source file support in jdk?



Tom Forsmo wrote:
or pipe the source through a decryptor on the way to the compiler.

that is a possibility, if the tools used supports feeding the tool with input through a pipe. I think that might be a problem in java since the compiler requires files to be located in directories according to their package names and directory structures can not be communicated through pipes

Look into the javax.tools package (since Java 6).

any solution would have to be integrated into the IDE so that the IDE can cache keys so the user dont have to enter the password every time and so that only the IDE environment has access to the decrypted files (i.e. if its the tool that decrypts the password must be cached by the tool for the user does not have to type the password everytime. If the tool caches the password, then anybody can actually run the tool and get unenecrypted access to the source code.

Integrating into IDEs is a whole other can of worms...

My current thinking is that it should be integrated at the application level, i.e. the ide/tools(java, javac) since then the solution is portable to all platforms. A solution made for the OS or as a middleman script etc, can not necessarily be utilised on all platforms easily.

.... except it might be worthwhile to create pseudo-javac's that executes some Java code that uses javax.tools.

If you really want to get down and dirty, start going through the Java source code with regard to the stuff in tool.jar

--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.



Relevant Pages

  • Re: Something has to be tested and maintained was Re: GoTo in Java
    ... I am on record as saying that maintenance of source code is self defeating. ... every module or program when new functionality is added. ... is that a brick is a brick; it has the attributes and behaviours of a brick. ... to translate it to Java, and get something not too bad. ...
    (comp.lang.cobol)
  • Re: GoTo in Java
    ... >> to translate it to Java, and get something not too bad. ... > your 'cleaned up' Java now works the same as the Fortran code. ... NOT maintain source code. ... Encapsulate functionality and reuse it. ...
    (comp.lang.cobol)
  • Something has to be tested and maintained was Re: GoTo in Java
    ... to translate it to Java, and get something not too bad. ... Source code translations have been tried for several decades and they ... Because of its COBOL and procedural programming roots, ... Encapsulate functionality and reuse it. ...
    (comp.lang.cobol)
  • Re: OT: The Geek defense
    ... even if you don't cover the cost of development hours. ... least in Java. ... It isn't about source code and call structures; ... functionality you require is and break it into small components that can be ...
    (comp.lang.cobol)
  • Re: How to avoid the message "Unknown source"?
    ... You haven't provided any source code and you haven't even identified the ... If you are getting a compiler error, javac, the java compiler, should be ... If you are geting a compile ... exception message that will give you a clue about your problem. ...
    (comp.lang.java.help)