I have made an application in which I want that the application should expire after say 180 Days but the problem is that if I take the system date, anyone could just change it and get going and I cannot also take the internet date because many times the user will be working offline. So how do I make it trial after which it self destructs itself? I cannot put any other DRM as I have read that checking MAC address is a very bad DRM and after going through Making commercial Java software (DRM) I realised I have to make it somewhat simple. So the idea I have in mind is that I put a count that how many times has the application being started, but where do I store the value in registry? (I have already read: read/write to Windows Registry using Java)
I have also read Create a trial version of a Java application, with limited functionality and How to create a trial version of a Java program but the answers given there were not satisfactory. Because:
1. In one answer it is given that use "Rampart" but that is a paid application and I do not want to use it.
2. In another answer they checked with system date but as I told earlier I do not want to use that either.
3. One Question and Answer was related to functionality which is not what I want to reduce
4. and further many of them require internet but my customers may not be using it all the time
I know that there is no perfect DRM and everyone of them can be cracked. What I am asking here is what is my best shot? (Note: I have limited number of users, I will not sell this application online)
Update: This question I believe is not off topic because what I really am asking is just how do I make my software go trial... I am just asking how? I know it can be cracked easily but just tell me what is the best way to set up a trial in java
Ship a data file with the package containing:
The name of the customer in full.
The date it was shipped.
The date it should expire.
A checksum of the whole file so it cannot be edited.
Every time you run:
Check that the checksum is still valid.
Check that the file mod date does not suggest that the file has been tampered with.
Display the customer name in a splash screen.
Make sure the mod date on the file is not later than the expiry date.
"Touch" the file to make sure it's mod-date changes to current date.
Make sure the "Touch" worked.
This way:
It is difficult to make a copy as the mod date will change.
It is difficult to distribute copies to others as the source is easily available.
It should be possible to detect most inexpert tampering.
Obviously - without adding hardware - it is impossible to cover all bases but I have found this scheme works well.
If internet connection is not available, there is one method left behind if end-users are in a company network and using windows with active directory (most companies have active directory if clients are windows), use active directory server as a time server. Most users may change clock time on their client windows, but they don't want to change time on their servers due to other affecting software (mail server etc). License4J can find and check date/time on a local active directory server.
(Disclosure: I work for License4J)
Related
I'm developing a simple software for a professor of mine. Nothing special, it just takes some data from some sites and merge them into a text file that will be analyzed from an R program.
Anyway, he asked me a "particularity": this software will be used by his students but he wants for it to be useless after this weeks of lessons. How can I achieve that? They are not computer science students, so something "simple" should be fine, but anyway I need some suggestions. I was thinking to create a web service, but I'm hoping for something else. I've searched and I could not find something useful for me.
I had done this for one of my projects.
Created a file on S3 with restricted access.
Every time the app is executed, i request for this file.
If it exists, i allow them to use the app else System.exit(1).
In your case, you can use this strategy with one file containing the end date, being the date of last class.
Fetch current date time from some public API.
Everytime the app is launched, fetch this file from S3, parse the end date and check for expiry.
Drawback: In case of No internet, the app will not be usable.
So I want to do a program in Java that does the following:
1. Opens each day when the user accesses his computer after a certain time (e.g. 5pm)
2. Asks the user for string input (the highlight of his day)
3. logs it and Saves it then closes
4. Opens the next day on the first time the user accesses his computer and shares a random entry from previous entries with the time and date of the input (e.g. ice cream with the kids Monday 8/4/2013)
5. repeats
I am not certain what topics or domains I need to look for tutorials on to cover numbers 1,3,4. In other words, what topics should I check to do the following:
make the program run by itself after a certain time (5pm) + when it is run for the first time the next day (I am operating on a mac do I need to look into cocoa os for this?
Storage; something like persistent storage in swift - do I just look into that or do I need to get into databases?
I am looking primarily for the main topics that I need to look further into to get this done (guidance for resources, not the code). Thanks!
To have a program run at a scheduled time, you would use a program like crontab. This is available on most Unix based operating systems including OSX. Basically you enter the scheduled time, and give it an executable to run at that time. You might have it run something like java -jar /path/to/your/java/program.jar
As for storage, you can store things in many ways. The simplest way is to read to/write from a file. Java has library classes that can handle this i.e. FileReader, FileWriter.
Another way is to use a database (SQL, SQLite, MongoDB). To do this you will need to install a database, and use a database driver in your java program. A good search term is JDBC.
I have really low knowledge on Java and JasperReports, barely used those to play around, nothing too serious. A friend of mine has been trying to get someone to develop him an application that will generate PDFs with information from an access database for each of his clients, however, after 6 months and 7 developers who ditched him, he has found none, so he asked me if I could help him to which I said I'd give it a try.
What I have been able to do so far:
So far I've managed to successfully (Everything has been done separately, I have like 8 projects in total so far):
Use Jaspersoft Studio/iReport to create a single PDF with the required client information on each sheet.
Create a separate JasperReports project with a input field to get a pdf with a single client information.
Create a Java App with a JFrame to launch the report generation.
Create a Java App to connect to the access database through ucanaccess and validate the search criteria
Questions:
Now, after a few days on Google up and down I havnt managed to successfully achieve everything that I'd like to achieve, and I'd love if someone could either point me into good noob-proof guides or (if willing) provide a noob-proof answer so I can continue to move on.
Create a Java App where you can choose to generate all client's report or a single report for a specified client (I am assuming this isn't too complicated since it'd just be a matter to embed both Jasper reports into the java app), however I'd need to pass the input value into jasper report field to generate a single report (Not sure if this one was clear enough), and run the query for the data-set based on that field's value.
Ideally though not highly needed, pass yet another variable as a field to set a date range.
Since this is being done on a MS Access Database -*.accdb- (Don't blame me, I've been telling him to move to MySQL/SQL for quite a while now), I'd love to know if its possible to make JasperReports do a query based on a UCanAccess JDBC connection (Tried a few options, none worked).
Finally, I need to generate in the report a date range (Something like: "Between 1/Jan/2014 and 1/Feb/2014")
I feel like I've made a decent amount of progress so far, but since I am no pro on either JasperReports nor Java, I am getting stuck in a point where more knowledge is required to create a more decent and practical piece of software and I'd love if someone could point me into a better direction (Either if something is impossible or just a few links to help me get thru)
-Remeber to add ucanaccess jar and all dependencies jars in the Driver Classpath, while creating the Data Adapter
-You have to set Showschema=true:
e.g.
jdbc:ucanaccess://c:/db/database.accdb;Showschema=true
In this way Jasper Studio will be able to navigate the metadata of your database, and you'll find your tables under the PUBLIC schema.
Then you'll be able to create your reports as usual.
I'm making a game, in Java, that has these following important features:
1) Connects to a remote Server (which i made), and will check for updates and install them if necessary
2) is NOT A SINGLE .JAR FILE (ie. has multiple .jar's and other things, such as .png, .wav, etc)
3) JAVA WEB START IS NOT AN OPTION, AS I WANT TO MAKE THIS ALL MYSELF
keeping the things above in mind, i have run into a problem. i have no clue how to implement a multiple "patch" update system. currently i have 1 .txt file, that the server reads from, and sends the files listed in the .txt to the client, which then moves them into place. The problem is, that is only useful for maybe 2 updates. I'm looking for a more useful, long term solution, and i need some help. here are some of the things i've thought of:
1) have a zip folder named after each version (problem: how would the client get ALL of the most updated files
2) have a .txt file INSIDE of each jar containing the version (problem: cant do that with png's or wav's, and i dont know how i would read the txt file to begin with)
i really need some help, i've tried googling it, i've thought about it for going on 3 weeks now, and cannot think of anything.
QUESTION: how would i make a game/program update with multiple patches?
Firstly, the best solution by a long, long way is to use Webstart / JNLP.
But if you insist on not using it (for whatever reason then) then it is technically possible. However:
It is messy and complicated.
It will either be very inefficient ('cos you have to load the entire program each time the user), or the user has to trust you enough to install your program with permissions that will allow it to install random stuff on his machine without notice.
The way to do it is to split the game into a launcher part and an application part. The launcher needs permissions to write and delete (non-temporary) files, and fetch stuff from the internet. It "calls home" to find out the latest version(s) of the application files, and then downloads and installs them. It has to cope with all sorts of error conditions, and it needs to make sure that nothing can trick it into installing bad stuff on the user's machine, etcetera, is someone spoofs your update service.
Of course, JNLP takes care of all of this, and lots more besides. People are going to be more willing to install the JNLP infrastructure that yours ... which might be insecure, or actively nasty (for all they know). (I for one wouldn't install a self updating application on my machine unless it was supplied by a company with impeccable credentials.)
I think you need here JNLP framework.
JNLP provides followed things:
allows to user to download jars from server
on launch verifies if application need to update
runs on local JVM
Actually, every java application you can convert to JNLP. Just to sign on all jars that your game contains, create executable jar from your game and create single Web page from where you can download your game
Is it possible to get the Norton AntiVirus status on PC using Java? For example last updated date, current status like active or inactive, upcoming update date and etc. Is it possible through java?
The answer most likely to fit your question is: No.
The more sophisticated answer is: Maybe - with a lot of effort.
Let me explain this: There is not direct way of accessing the AntiVirus status using any kind of Java API, so that's why the quick answer is not. However, you can use Java - like any other language - to load the contents of files on the filesystem (or check their existence). So if you can determine the status by looking up any kind of file related information from the system the answer might be yes.
But anyway - I don't see for what you would need that information.
Try following steps:
Go to login.norton.com and sign in.
Create an account and complete a registration process.
Begin and enter a new product key. (Your product key is the 25 characters that are stored on the CD that you bought at a retail store or online)
Click on accept and install