wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes MalformedURLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "MalformedURLException" Watch "MalformedURLException" New topic
Author

MalformedURLException

Anuradha Karunamuni
Ranch Hand

Joined: Dec 08, 2007
Posts: 64
Hi David,

I tried some EJB3 applications using NetBeans 6 and GlassFish V2. jdk 1.6 was initially being installed to support NetBeans. On one of the machines when I tried to run the programs those were throwing a MalformedURLException. But when I tried the same project on different machines no Exception was thrown, which implied that the problem was not with the source code.
I tried providing the absolute path but still the problem was there.

But when I installed jdk 1.5 and then installed NetBeans 6, and tried to run the same project the Exception was not thrown and the program was running fine.

Do you have any idea of why this happened?


"Simplicity is the ultimate sophistication..." ~Leonardo da Vinci~
SCJP 1.4
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
If you can show the code then it would be easier for anyone to comment.


My Blog
Anuradha Karunamuni
Ranch Hand

Joined: Dec 08, 2007
Posts: 64
This is what I got when trying to build the project.

java.net.MalformedURLException: no protocol: /ListNews
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:75)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
BUILD FAILED (total time: 0 seconds)


I don't think it has anything to do with the source code because I managed to run it without any failure in several other machines.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MalformedURLException
 
Similar Threads
J2EE Error - Package Not found
Not able to run any web based project in net beans.
Rules Roundup game
Statement parameter 1 is not set
Why can't I run these jar files on a PC that doesn't have the JRE 6?