Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp

jite eghagha

Ranch Hand
+ Follow
since Oct 06, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jite eghagha

I can set an alarm to go off at any time of day, and repeat at intervals.



But now i'd like to set an alarm to go off with Year,month,and day included.

If i take of the commented lines the alarm ddoesn't work.
3 years ago
Yes, they are both in two different profiles - the PHP doesn't run in Tomcat. The jsp is running on Tomcat 5.5 i installed on the Godaddy VPS.

I can read files in the folder.


causes this error......java.io.FileNotFoundException: /home/admin/public_html/sandbox/server/applicantForms/164287384763216/GENLABOUT.pdf (Permission denied)



5 years ago
I've got a problem writing a pdf file to a folder. Part of my work already has PHP reading and writing to this folder. The folders read/write permissions are set correctly

But i can't write to it with my jsp application.

I understand there are SecurityManager Permission classes applicable to Tomcat such as: java.io.FilePermission each controls read/write/execute access to files and directories.

In tomcat 5.5 - i have a catalina.policy file, but i don't know how to grant permission to read/write to that folder

I added this to the catalina.policy file under _ web application permissions _ , but it doesn't work.






ERROR
5 years ago
Using Eclipse,

I have a class javaApplication - it takes arguments in.pdf and dest.pdf

Using in.pdf as input javaApplication returns dest.pdf (changes text, forms, etc) //dest.pdf is created at run time



It all works fine as a stand alone application. I wanted the functionality open to the web. When i use the javaApllication class in my servlet i get the java.io.FileNotFoundException on this line:




Why does javaApplication not create a dest.pdf when used in a servlet
5 years ago
I have an android project in Eclipse,, where i placed MainActivity.java, and EpsSytem.java

And, a library which I've included in the build path, , which contains, net.authorize.android.aim.AuthCaptureActivity

EpsSytem makes a call to AuthCaptureActivity; and a classnotfound exception was thrown. Interesting part i suppose is this error - "unable to find explicit activity class {com.eghagha.lazylist/net.authorize.android.aim.AuthCaptureActivity}"


My manifest file tag contains









6 years ago
I used File Manager and ES File Explore.

I zipped it cause my google chrom and godadday FPT manager weren't uploading the .apk successfully ......However, uploading the .apk worked just fine in firefox.

I've also emailed the .apk file to my phone and tablet but get error "There is a problem parsing the package".

I assume i probably did something wrong when exporting the .apk in eclipse?
6 years ago
Hi,

I built, signed, and exported an app..... test.apk

I zipped it, and uploaded test.zip to godaddy

I downloaded test.zip on my phone and tablet, /scard/test.apk and /mnt/sdcard/test.apk , respectively.

Attempting to install on both devices leads to the error "Application not installed" and "could not open /mnt/sdcard/test.apk as APK file

What is the proper method, or alternative to what i tried to do.







6 years ago
hi,

Here's what i'm doing.

From HomeActivity, using an Intent, i start MenuActivity


In MenuActivity, i create an instance of GameView, which extends SurfaceView

GameView is a video game, and so it is passed to GameLoopThread which extends Thread (GameLoopThread calls onDraw() over and over to move Sprites).

Below is the run method in GameLoopThread.



When i click on a Sprite, i start ItemActivity using an Intent

When i click on the back button on my phone i expect to exit the ItemActivity and return to the GameView g, but i get the "Thread already started error"

The error is occurs in GameView g in a SurfaceHolders Callback method.


There error causes me to ask....
How do i handle the Thread that GameView g is running in? Can i kill it?, can it sleep?, what happens to it when ItemActivity is destroyed and MenuActivity (GameView g) is brought back to the front.





6 years ago
thank you,

I inserted a little delay after the start method to confirm

I'm confident that there is no endless loop, all of my search and sort functions run and terminate correctly.

Here's what a full class looks like (not search or sort for brevity sake):



I create the Thread and call the start method,



and my result is this:
ButtonThread true
run() began in ButtonThread
run() ended in ButtonThread

Why is thread t still alive?
I have an applet that searches for an item via linear, binary searches etc. It also executes heaps sorts, quick sorts etc. Eventually i will be using ALL its functions simultaneously.

I run each of the applets functions in a separate Thread.

I'd like to know the best way to stop a Thread when its function is completed.

I start my linear search thread here:



In my runnable class LnSearchThread, my run method is:



In my linearSearch method ends with a return like so:



After the linear search is completed i get my desired result, but the thread remains Alive.

How and where is the best place to stop the thread?

I'm trying to submit parameters and images to a servlet using valums / file-uploader uploader

The trouble my is Servlet receives no parameters on my first upload, and will sometimes receive parameters if i refresh the page. The Servlet always receives the file.

below is the javascript that handles the upload: (i script runs )



Below is the Boby of page:


I'm trying to use the IDE's Session Beans for Entity Classes wizard with NetBeans IDE 6.9.1

The instructions are in the NetBeans E-commerce Tutorial

1)Press Ctrl-N (⌘-N on Mac) to open the File wizard.
2)Select the Persistence category, then select Session Beans for Entity Classes.

But by instruction (2), the option to Session Beans for Entity Classes does not exist!

So, how do i create Session Beans for Entity Classes.
Hi,

I'm following the tutorial at netbeans.org

When i Create the Controller Servlet, i don't have the @WebServlet annotation that should appear above the class signature. (after step 5 of "Create the Controller Servlet")

I'm using netbeans 6.9.1, Glassfish server 3, java version "1.6.0_21", and Java(TM) SE Runtime Environment (build 1.6.0_21-b07)

this line of code has no effect when i run my application, i have to go into the web.xml file to include my controllers.

hi,

how do i place a mouse over action listener on a rectangle?


8 years ago