Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
sorry to ask it...i know there are lots of question on SO regarding same but none of the techniques are not working.
I want to encrypt the jar or class so that no one can retrieve it.
Actually there is user name and password of server database in the application. So if anyone retrieve it then they can gain unauthorized access to the database.
I tried many software, and after creating exe file,it can be extracted easily.
so please tell me what can i do?
You could use a property file.
You externalize it out of your jar.
And retrieve the informations via a "getResourceAsStream" or something like that.
The second solution is to use a JNDI configuration, so in your jar you just define a name, and the web server declare all the properties of your connection.
I got the solution:
ProGuard is the best software to safe the class or jar from reverse engineering.
After using it, if anyone will try to decrypt it then he will not able to understand it because it has been changed to new one.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
in one side i have an API that store many xml files.
on the other side, an another API have to receive all these files.
i have created a service in the first API that create an ByteArrayOutputStream with all the files and return it.
But i'm not sure it's the best solution if files are too large.
How can i receive in a safe way all the xml files in my second API ?
The best way to develop a file transfer system is to not develop the code yourself. Use an existing solution.
The best way to develop a file transfer system in Java is to minimize the code you write yourself. Use an existing Java library.
There are many software packages, libraries and/or protocols that you could use. Asking us to recommend specific ones is off-topic. When you do your research, make sure that you include your security and integrity requirements in your assessment criteria.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
My code is simple, it generates a Data Base to store certain data (obviously), but the problem resides in the fact that it would create an "overflow" of DBs becuase every time the class ran it would generate another Data Base, I heard of a command:
CREATE DATABASE IF NOT EXISTS insertYourFavoriteName;
But some people say that why should I need a DB for each computer, when I could just do a central one when users conect, but correct me if I'm wrong, that would make the app depend on internet, right?
So in resume here are the 2 questions:
Does the command mentioned above works? Or does a better version or way to work around it exists?
Data Bases where all users connect to it mean that you need a server, and as a consecuence your app would depend on internet?
If you want to learn about databases you practice basic CRUD operations on that database. After that do some sample applications on database
If you want to create a database if not exists in mysql simply use this CREATE DATABASE IF NOT EXISTS DBName;
Basically before checking all these things you have to have basic understanding of what is database and how it works, So, please go through some good resources and get good understanding on the concepts.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am working on a program which gets all links from a website to use them later on. I am using the Java library JSoup to get the links form the website.
My problem is that I don't know where to store all links for later use. Every link has some attributes like "used" or "not used" and the date when it was used. It should also be Windows and Mac compatible. The saved data should be updateable, editable and the program should read the file where the data is saved fast.
Does anyone know a way to solve my problem?
Edit:
As my question wasn't clear for everyone here's a simpler question:
Should I store the links with their attributes in a database or in a file?
If you need to store on a single file I'd go for SQLite. It's a SQL database provider that can save a whole database on a single file. SQLite databases are universally portable.
EDIT: As #bigdestroyer commented, Apache Derby is pure Java and may be another interesting option for you. I haven't used it though, but there is a nice comparison here.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I hope this doesn't sound silly. I've looked it up but can't find anything.
Let's use this example to keep from being too general. In my VB.NET application, I want to do this:
Dim ASDF As String = "This is a string."
Dim UIOP As Integer = 54
From here, I want to send the values of these variables to a Java application that is already running locally on my computer - I don't want the program to start the application because it is already running. What would be the simplest way to achieve this? Thanks for your help!
I had a similar problem once which involved passing information from a Python program to a C++ application which was already running, same as in your case.
The most reliable solution I could find was to simply have the first program create a text file with the relevant info, and then have the second program read and destroy the file. This solution works really well if you only have to pass information between programs a few times, not continuously.
A more structured way of doing the same thing, instead of using a text file, would be to use an XML file. Both Java and VB.NET support XML data parsing, VB.NET with XmlTextReader and Java with Document Object Model. Using xml will allow you to have a hierarchical structure for your data.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
We wanted to provide the security for the class file in the war file, beuase if you share the war file to customer he can open and see our code by using some de-compiler available in the market. So i want to restrict that, how can i encrypt that class or any some other way to avoid that lap. And that new war(After enabling the security), it should be executed by the web/application server.
Kindly help me.
Honestly though, what makes you think the client will care enough to use man hours to start going through decompiled code?
They buy a licence from you to use your product, they get support from you, they're happy. They're probably not going to be interested in going through the WAR. Your product may seem extra special to you, but trust me, it's not to other people.