niqi li

Greenhorn
+ Follow
since Jul 02, 2009
Merit badge: grant badges
For More
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 niqi li

Hi Guys

I've posted another question here; This question is something I am lacking of knowledge in Java. Could anyone give me a lesson please?

I've got a function which connects to database. The codes are copied from somewhere in the same file which works fine, no privilege errors. However, the following function is called by the Javascript in Safari and it throws the errors.

14 years ago
Hi Guys

I am developing an embedded Instant Messenger for my client's site. It seems to be crazy but I've done it on a PHP Mysql site using Applet and Javascript.

It really comes a long way to do it and it doesn't work very stably. I've been able to make it work in IE, FF and Opera; However, in Safari 4, I've experienced the following problem:

java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)

It wasn't only me having this problem who uses Javascript and Java. I've searched the web and every site who teaches how to use JS + Java has this error message in Console. So I guess it's something wired only in Safari 4.

So far, I can only think, the problem is because the URL doesn't have a "http://" etc. as a protocol. "Javascript: " isn't a valid protocol that accepted by Java. Please let me know if I am wrong.

I need some help to guide me for this problem. Please.

Thanks

Morris
14 years ago
Hi

I am writing a program to execute a .bat to call another java program. The reason is I want to set the JVM heap space to larger. Here's an example I've tried. I am only testing on small files so I haven't put the JVM setting commands in. For now my purpose is to have a copied of the target file when I run the java...

The problem is that when I run the first java to call bat, it only shows the header message, seems it does not run the file properly. The command line hangs and I cannot type any things. By looking at the task panel, I found a new cmd process and java thread is called and I know the code does something, but why this happens? I am quite new to java and hope could have your help. Any ideas what's going on?

Your comments are welcome and appreciate. Thanks indeed.

Here's the code

The Helloworld.java


The bat file, same dir with Helloworld.java


and finally the ResizeImage.java
14 years ago