Is the execution of java code without source file possible? - java

I'm currently working on a simple Java project where I wanted to test if DRM in java is possible.
I had different thoughts about an approach to this topic.
My last idea was about running java code without having the source or any physical copy of the program on my machine. So, for example, I have a Program on my machine that kind of downloads the compiled classes into memory and then runs it from there.
I know that this is possible in other languages.
My problem is that I don't know if this is possible at all and if so what I have to search for? I already googled my question in several ways but not received an answer that was helpful.
Maybe you can tell me if the way would work at all and what I have to search for then.
If you have another approach for DRM in Java I would be grateful if you let me know.

Related

Using both java and python modules in Google AppEngine

It seems that it's possible to have both Java and Python modules in the same gae App - see the answer to this question. Various browsing and searching indicates that not only is it possible, but that it's been done, but I can't find any details.
I think I understand how to do it, but I can't work out how to use the Java and Python SDKs together to do the development. They seem to be completely different. Does anyone know how to do this?
(Why do I want to do this? I've got a reasonable front end developed in Python, which I really don't want to have to re-implement, but the heavy numeric calculations are just too slow. I'm seeing huge performance gains, as expected, from re-implementing the calculation engine in Java. All I need to do now is to hook it in instead of the current Python implementation ...)

Matlab function and Java

I have function in Matlab which works perfect. I got p from m file and it works on some computers, but not on every (even I did it in 6.5 version). I simply didnt know what to do, and wrote the same program in Java. BUT, the results are not allways the same, and sometimes program dont works in Java. I cannt find the mistake in Java (I know that Matlab's function is relevant).
I have two (dependent) questions:
How to make my Matlab code safe from hacking and working on every computer?
How to use Java to protect and run my Matlab code (againg on every computer)?
Is there solution for this or what?
How to make my Matlab code safe from hacking and working on every
computer?
If by 'safe from hacking' you mean protect from decompilation of your java class(es) than have a look, for example here or many other similar questions at stack overflow.
How to use Java to protect and run my Matlab code (againg on every
computer)?
Officially you cant execute matlab from withing java, although opposite is supported. However, you can use external tools e.g. matlabcontrol. But there can be licence issues if you start doing this. So be vary of that.

Encrypting Android code? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to encrypt a .jar file
I know obfuscation but what it does is only to make the code harder to understand. It doesn't really encrypt the code. Is there a way to encrypt Android code? Or is there any alternative to make the code more irrecoverable when decompiled?
I am asking this question to know if what I'm looking for is possible. Right now, my mind suggest that it is impossible to encrypt the code since if we encrypt it, Dalvik also won't be able to understand the code and run it. But I'm not really sure about it. It is possible that I didn't know something.
Please post what do you think about this or if you have any suggestions? Also, please consider a financial application wherein having access to a human readable code means being able to understand the flow of the financial process going-on on the backend. Thank you!
There are different efforts to make life harder for standard DEX decompiler tools, by hiding code, inserting dummy instructions, etc. It is all pretty much research stage ATM, but you can find papers an presentations about it online, with some sample tools.
There is also DexGuard (not free) by the author of ProGuard which can encrypt strings (standard obfuscation does not) to make it harder to search for things in decompiled code. I haven't personally used it, but you might want to give it a try.
Ultimately though, to be able to run something you have to decrypt/descramble/whatver so you can feed it to the VM. If you have complete control over the device (i.e., root privileges and physical access), you can dump memory, introduce hooks in system libraries, etc. and get the actual runnable code. As suggested by others, if you have really sensitve code, it should live on your servers.
By definition, the machine has to be able to read your code. Therefore...anyone with a machine can read your code.
The only alternatives to this are e.g. forcing users to contact your third-party site and get information from you there somehow.

Java integration with Microsoft Help

I'm writing a GUI with Swing and I'm trying to integrate a microsoft chm help file. The problem is, I don't even know where to start. Can anyone recommend a library/tutorial as a starting point for a project like this? Specifically, I'd like to know about how to open/view specific pages or inidices (I don't even know exactly what the terminology for .chm files is) from java.
Thanks!
I actually decided to go in a different direction for this project in particular (one that doesn't involve a MS help file), but here's a couple of helpful links I found in case anyone else runs into this issue:
Wikipedia article on MS help format
jchm: a java library for using chm files. I didn't investigate it too thoroughly, but it's a starting point.

Using Java JAR file in .NET

What options / methods / software are available to convert a JAR file to a managed .NET assembly?
Please provide all commercial and non-commercial methods in the answer.
These don't include solutions which require Java to be installed on the host machine.
I could be wrong, but I'm pretty sure that's impossible. The java byte code is different to the code produced to run on the CLR.
Snarky answer: Get the source code, and port it.
EDIT: A little poking comes up with http://sourceforge.net/projects/ikvm/, a Java Virtual Machine implementation for .NET. Not quite what you asked for, but it's probably going to be the best you can do.
Confronted with this situation last year, I wrote a small wrapper (in java) that read the inputs from a temp file, invoked the jar and placed the output in anther temp file. The .NET project would create the input file, call the JVM and start the wrapper, wait for it to finish and read the output file. Quick and Dirty. at least in my case

Categories