Joe Meany

+ Follow
since Jun 14, 2011
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joe Meany

No, i havnt really considered web start. I actually just looked up what it was. It sounds really good! i assume that would solve many of my security issues? Also, is it pretty simple to convert my applet to a web start application?

Thanks for your response!

ok, so ive been giving java web start a shot and was wondering if you could give me some advice with that now?

Also, i dont want to continue this thread here, with java web start, if it isnt the appropriate place. Should i re-start this elsewhere?

So, i made my html file, and i made my .jnlp file. the html file holds a link to the .jnlp file, but when clicked, google chrome says taht it cannot find the web page... im sure that the file path is correct. I dont know what else to check.

Thanks greatly!
11 years ago
hey there,

I am working on a project right now and its almost finished. The application i made accesses a database, inserts, deletes and queries...

The application at first was a stand-alone application, but now there seems to be a need for an applet(ish). basically, i want to be able to let anyone who wants to use the application, do so from their computers. All of the computers are networked to the server where the applet would be stored, as well as the database.

I have turned this into a applet, and have digitally signed it...the certificate file shows up and everything... but i cannot get it to prompt for user permissions upon accessing the applet through the web page it is embedded in.

I have been having a lot of problems getting this to work, and it made me question how i was going about doing it. I could have easily signed the applet wrong, as i have never tried to put an applett online before.

I was led to believe that a applet does not need a users permission to run if it accesses a database stored on the same server that the applet itself is stored on. Is this true? if so, would there be any other reasons i would receive a " permission file.encoding read" from the java console while trying to access the applet through the browser?

Also, if it makes more sense, as this application would only be accessed by the members of a local network, should i just turn it into a client/server application?

Thanks guys, I'm really hoping to finish this project soon, and everyone here has always been a great help.
11 years ago
Hey there,

Sorry, i wasnt incredibly sure where to post this topic. I have finished writing an application that connects to a database, inserts, deletes, yaddayadda. I started out trying to make it into a web applet(that was the easy part) but couldnt get it to run thanks to all of the limits on applets. I was wondering if a client/server application would be a better option.

Also, to clear some misconceptions i have about client/server applications... the application would be stored, and operations would run on the server, with commands being input from my(or anyone else on the networks) client computer right?

Would this be initalized with something like a desktop icon?

Anyway, im just starting to look into it and was hoping for a few suggestions/recommondations/ideas. No big deal on anything, but if you have some good advice, im always down to learn more.

Thanks guys, and again, sorry if there is a better place to post this(like maybe servlets?) but i wasnt too sure, as i know almost nothing about creating client/server applications.

Thanks alot!
ok, im sorry about that, let me bring up the "applet signing tutorial" i was looking at and do this better....


1) package applet into jar file(using eclipse)
2)create a pblic/private key pair using: keytool-genkey
3)create a certificate using: keytool -selfcert
4)run jarsigner -keystore jarFile.jar key

I *think* this is how i am supposed to do it. Sorry if my explanation was rash.

And thanks again for your help with this. Youre pretty super.
11 years ago
Hey there,

Sorry to keep adding to this thread.. but im still having one heck of a time with this.

So, ill start from the beginning:
1)exported jar
2)signed jar
3)created certificate
4) Doesnt work

Browsers on other machines dont even prompt for certificate authentication...they just error out in the console again(same error as before)
So, im really not so sure what is wrong with this anymore. From what ive read online, if i self-sign my applet... dont i have to import that certificate onto everyones machine who will be running this?

Is there a good way to do what i want to do other than with an applet(maybe throwing it on an application server?)

Again, i apologize i am pretty new to applets... but i would love to see this work.

Any suggestions(or pointers at what i am probably doing wrong) would be great! thank you!
11 years ago
Oops, i hid my console window on accident. Alright, thank you for all of your responses Ulf, really appreciated.
11 years ago
Ok, so i am still having some trouble with this and was hoping for a bit more direction(sorry).
Now, when i run my applet through google chrome, i get a bar at the top that says it needs my permission to run, i allow it, but nothing happens. I opened up the console again to see the same error message, ill post the whole thing now:

If anyone has any suggestions i would greatly appreciate it. I am not sure if my certificates are working right. I followed the links above, but there were some situations where it got a little hairy, and i wasnt sure of what the tutorial wanted me to do. I also was looking up how to have a policy file allow for all permissions but i don't want to play with something i am unsure of.
11 years ago
No, i just typed in the error message..and i got results. Well, i got peoples suggestions, but i couldnt find what it really meant. that above link is very informative, but i hadnt realized this process was so complicated
11 years ago
Thank you very much! I tried looking around, but because I didnt really know what was going on, it was hard to find any answers.

Thanks for the great link!
11 years ago
Hey there guys,

I am in the process of the creating my first applet . I have run into a problem though. I can run the applet through eclipse and the applet viewer pops up, says applet loaded, and my program starts(this was initially an application i have been transferring to applet). When it loads from eclipse, it connects, selects, inserts, and deletes to the database perfectly. However, and this could definitely be from me doing something incredibly basic wrong, when i run it through a html file i made with a reference to appletName.class, the browser window pops up, and nothing else.

I did however right click on the java icon and pulled up this error from the log:
Exception: access denied (java.util.PropertyPermission file.encoding read)

Now obviously that isnt the whole error log, but it seemed like it was the most important. It appears to me, that it has something to do with my MySql database connecting. I did look up some information online, and many suggest to update my .policy file. Now, i don't know if this is a good idea or not, but i really have no clue what it means in the first place.

Any help with this would be really helpful, and i would truly appreciate it.
Also, i have hopes of running this off a a server for the place i work at, in order to allow everyone to have access through the browser by typing in something like- ip:port:file.

Thanks again, if anyone is willing to help and would like some more information ( i didnt really know what was all- too important, and all-not, as im not familiar with applets) i will do so asap.

11 years ago
I retract my previous post. My problem copying/pasting. My apologies
Hey guys,

I am (hopefully) finishing up an application that uses JDBC for the first time. Now, everything works great except when i want to update a graphically displayed table of the database information i am receiving(and adding and deleting). The adding and deleting is currently working great, as is the querying, and everything is writing to the database great. However, i am often getting a result set is closed exception when i try to update to frequently.

Essentially what happens is a user comes to the application, adds a date and an explanation for why theyll be gone, and adds it to the database. The end of this operation prompts the gui to update the table to accuratly display the data. However, when this happens in great succession, the application errors out.

I understand what this error means, but i cannot tell where it is coming may be when the previous resultset hits its end, and then when another add or delete happens, it errors out.

I suppose this is pretty vague, but im trying to be descript. Every time a button is pressed on the gui to add or delete an entry, the ad method in java is called, which then in turn calls the update method. If some more additions were to be made, thats when the application errors out, it doesnt happen after every change.

Thats why I'm a little lost at how to go about finding what is happening.
And thanks in advance, im pretty new here but you all have been extremely helpful(even with my lackluster descriptions)
Hey there guys!

I am working with swing for the first time( yes it has been an ongoing couple of weeks of "first-time") and i am in the process of speeding up my program. From what i read online, threading is a great way to do this!

The GUI i have created has a few buttons that execute database queries, and replace text on tables. The database queries are very speed, but the other actions take a very long time.

There are a few cases like this when i think i should call my methods like upDateTable() and PopulateTable().

Would you agree? just looking for some advice, and some positive reinforcement if this is a good place to try threading for the first time.
11 years ago
Yes that is exactly what i meant, in a much more elegant way

And I'm sure there are improvements to be made, but as a last ditch effort to fix my own problem i did open up a new connection for each of my result sets(i think it turns out to be 7 of them . And i still get the exception after doing that.

That is what really confuses me the most about this i guess.

And I am getting a result set sorting through it and if a condition is met, calling another method where there is more sorting of new result sets and another condition that again, if true, calls a third method that does the same except prints a date as opposed to call a method. If you think it would help the situation i can post the snippet of code in which i am having the problem, but i think ill clean it up a bit before i do that, just let me know if that would help at all.

Thanks very much for your quick reply!
Hey guys,

This would be my first time using JDBC within an application. The problem i am having now is the exception that is in the subject line.

Don't get me wrong now, I understand what it means, but i'm not sure what i am doing wrong.
So the database im querying is a little bit strange(at least i think i have yet to see any other database than this one).
Essentially i start off with one value, and must match that to a value in another table, to which i must take another value(being text or date) and compare that to another table. So, in this giant mess of connections and statements i get this error. I ended up creating a new connection for each separate query, but im concerned because i call another query(with a different Connection) before i finish my first query if that is screwing things up.

I am sorry if this does not make the most amount of sense, i am trying my hardest to make it clear.
I could post some code, but I would be a little embarrassed as i am sure that the JDBC handling seems infantile because this is not something that they teach us in school. I have a slight google-education in the matter right now.

I appreciate your help and suggestions in advance, if there is anything that i can clear up, please just let me know.