Robin John

Ranch Hand
+ Follow
since Sep 10, 2008
Robin likes ...
Eclipse IDE Java Windows
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
10
Received in last 30 days
0
Total given
6
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robin John

Thanks Paul, I will try that.

However, there is another problem, in my soo.jar I want to read another jar's manifest attribute, how do I get hold of the jar file to read the attributes ?
2 years ago
Thanks Paul, just got it resolved.. Duh ! me asked you that question.

I would love to do that, calling the jnlp to load my main class, but I would have to pass in parameters ( loads of them ), how to pass in my arguments to my jnlp main class dynamically ?

Also, I notice, jnlp is easily handling the downloads, 64MB worth of jars in less than a jiffy !!
2 years ago
Thanks Paul, is it so ? I assumed, even if I download the dependent jars in my JNLP file, they are not added to the classpath. foo.jar and soo.jar are not dependent. Now I'm thinking of calling one from the other.

How do I access the class to launch the main class in soo.jar from the foo.jar applet ?
2 years ago
Yup Tony, all I am after is, If I'm downloading the jars via JNLP file then what do I set as the classpath ?
2 years ago
Apologies, I should have mentioned how my getArgs method provides the entire command.

the getArgs method actually forms a command line.

java.exe -jar soo.jar <many arguments> <some paths> <etc>

anyway, earlier I used to pass in the working directory to the applet in this command under C:\drive but now since I am trying to convert it to Jnlp applet, I have removed the working directory and the cached applet is unable to find the soo.jar.

so earlier I had

java.exe -jar C:\drive\soo.jar <many arguments> <some paths> <etc>

and everything was fine. but when I removed the path, hoping that the soo.jar will be automatically be picked up from the classpath. but looks like it doesn't.

How do I pass in the cached location to be able to start the jar ?
2 years ago
Thank you Paul, Tony,

Now I'm trying to implement everything on server side and with caching... Now the current sequence is,

I download two jars via jnlp, foo and soo, out of which foo has my applet


my applet launches successfully, now I want to execute my main class inside my soo.jar, Runtime.exec doesn't work inside MyAppLauncher applet.



I always get "Unable to access jarFile soo.jar.... :(

It has loads of arguments so I cannot launch soo.jar as another jnlp main class, I always get an invalid argument exception.

Is there any way I can access soo.jar main class using Runtime.exec inside my jnlp applet class ?
2 years ago
Thanks for the response Tony, Unfortunately it didn't work too :(



My problem is exactly as stated here:

https://community.oracle.com/thread/3567167
2 years ago
I agree Paul, however, due to the size 64 MB of all the files, I was trying to do partial download ( files which change frequently ) from server and the other stable jars already installed to my clients systems. ( fyi - I have a fixed set of client machines ).

- Can I do it this way ? is it allowed ?
- if not possible, my next question would be, will JWS able to handle this load ? will it cause any bandwidth / performance issues in production, I have around 10000 users who will launch the application every morning, don't want to make it too slow.
2 years ago
Thanks for the response Tony,

I have added my jnlp to the web app now and 'm downloading a few jars (all signed) from the server and a few jars (all signed) from the local C drive from my client system.

my JNLP is as follows



I have my component library.jnlp as follows



But Now I am getting an error as follows:



Everything works from local system, however fails when I deploy it to the server. I have tried giving local permissions, lowering java security settings, adding exceptions to local folder but in vain :(

Any idea on what I'm doing wrong ?

Thank you !
2 years ago
Hi All,

I have an Swing Desktop application where I need to run an applet ( due to old tradition, which they don't want to change and due to some browser dependencies ) and that applet launching an executable jar using Runtime.exec()

I have been trying to use JNLP for this and have a few questions before I implement.

The design:
1 - Servlet is hit
2 - Applet is launched
3 - Applet executes Swing main class

#1 - My swing application along with the dependency libraries is a massive 60 MB required for 10,000 users.
- Should I go ahead with Web Start ?
- If yes, Can I download just the specific jars and include an external library location for common libraries, is it possible ?
#2 - if possible, How do I include the external library location ( not downloading the jars from server via jnlp file)
#3 - Currently when I try to execute the Runtime.exec without specifying any file location, it's not executing, I'm getting a "not able to access the jar file" error. (Unable to find jarfile MyApp.jar) - Can I pass in a directory location before I start the Swing main class, do I need to ?

I have more questions but after I get some help with this.

Thank you guys in advance !
2 years ago
hi guys,

I am trying to retrieve my cookies in my JApplet class using the below way:



Q1: is there any other way I can retrieve the cookies without using the netscape library ? I have tried using cookie handler and managers, however all I get is the response header cookies, I want the request header cookies.

Q2: is there a way to get the request headers from a URL connection ?

Please help, thanks in advance !
3 years ago
Hi Guys,

Please take some time to read through.

I am using JAVA 5 and OS is Windows XP, IE 6. ( cannot upgrade anything )

Our application is showing us a pop-up "The web site's certificate cannot be verified. Do you want to continue?" showing the option to "Always trust content from this publisher".

When I accept and tick the checkbox and proceed, the pop-up never appears. When I open the Java Control Panel, I can see the public certificate is added to the "USER" tab in "Trusted Certificates" keystore.

Question:

1 - How can I add the certificate using the keytool to the "Trusted Certificates" under "SYSTEM" tab and not the "USER" tab, so that any user who logs on to the system should not see the pop-up. ( how can I simulate the user accepting the certificate but adding that to the SYSTEM tab)

2 - I had used the following command line

jre1.5.0_17\bin>keytool -import -alias my.alias -keystore "C:\Program Files\Java\jre1.5.0_17\lib\security\cacerts" -file "C:\KEYS\MyCer.cer" -storepass changeit

Using this command line, the certificate gets added to the Signer CA keystore under the CACERTS and I don't get a pop-up anymore, but I wanted to know if this is a secured and correct way of doing that or am I bypassing the issue or violating any security policies ?

Please respond, I need help. Thanks in Advance Guys.


5 years ago
CODE 1



CODE 2




Besides readability, is there any performance improvement using the second code ?
5 years ago
Thanks to all of you guys.

Since the folder is in a shared drive, I think its time to talk to my network dept.
6 years ago
Tried all the things in java nio package... couldn't get anything related to "folder last accessed by username / domain" etc.

I have written a code using import java.nio.file.WatchService to watch the folder but in vain... just noticing that someone is changing the folder name and pooof gone..
'm not able to find out who dunnit...

Please help !!!
6 years ago