|
|
|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

11-18-2007, 10:59 AM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
|
<URGENT> problem after linking .jnlp
Hi, i have a problem with my .jnlp after i link it. My .jnlp does not perfrom its process (which requires read/write to some doc) after loading. It does work by standalone but when i hyperlink it, it doesnt.
Does anyone know why is this so ??
bong
|
|

11-18-2007, 11:25 AM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
|
Probably a permission issue. I guess you will need to sign your jars to be able to write on user disk. And check Java console for the errors.
|
|

11-18-2007, 11:43 AM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
I did signed the jars and it does allow read/write when i run by standalone. But when i link it, it doesnt perform the processes somehow despite the security warning window popped out.
And how do i use java console to check for errors?. Im new to java.
bong
|
|

11-18-2007, 12:03 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
|
When you load you application, a small java icon should appear at the right ot the windows taskbar. If you right click on that icon, you should find a menu for "Java Console". When you open it, it will show you the exception you get if any..
|
|

11-18-2007, 12:20 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
hmmm.. i do not know why but the java console icon did not appear. Anyway, do you have any idea on my issue above? I read that the normal linkin tag <a href...> will do for linkin .jnlp files but why cant mine ?.. Do i have to congif. something or anything ?... because the .jnlp is workin just that when i link it, it doesnt process.
bong
|
|

11-18-2007, 12:41 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
I think that is a path issue. Is it a full path?
I recommend you to follow Java console path. I guess there will be an exception in this case if you handle them:
Java Plug-in Console
|
|

11-18-2007, 01:25 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
|
java console path ? Is it the user home directory stated (because thats the only path i see)? Checked the java console and there is no exception stated there, just a 'done' after my app. completed its proccess.
hmm.. how do i deploy my .jnlp into a .war ?.
|
|

11-18-2007, 01:46 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
|
oh oh.... now i see the exception. But i totally got no idea what am i suppose to do. The java console stated as below when i click the sbmit button to perform some processes:
java.io.FileNotFoundException: indexes\fileName.txt (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at Ranking.Ranking.rank(Ranking.java:66)
at GUI.ChemicalSearchEngine.jButton1ActionPerformed(C hemicalSearchEngine.java:425)
at GUI.ChemicalSearchEngine.access$000(ChemicalSearch Engine.java:16)
at GUI.ChemicalSearchEngine$1.actionPerformed(Chemica lSearchEngine.java:107)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.io.FileNotFoundException: result\0.txt (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at GUI.ChemicalSearchEngine.startTable(ChemicalSearch Engine.java:455)
at Ranking.Ranking.rank(Ranking.java:164)
at GUI.ChemicalSearchEngine.jButton1ActionPerformed(C hemicalSearchEngine.java:425)
at GUI.ChemicalSearchEngine.access$000(ChemicalSearch Engine.java:16)
at GUI.ChemicalSearchEngine$1.actionPerformed(Chemica lSearchEngine.java:107)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
some help pls?
bong
|
|

11-18-2007, 01:46 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
|
> java console path ?
Path to the file(s) you try to write. If i were, i try to debug my application by writing System.out.println statement. You can check the return values of method calls or nullness of objects this way.. All output will be forwarded to the java console.
> hmm.. how do i deploy my .jnlp into a .war ?
I did not heard that. As far as i know, war is used for web applications. That is a different approach..
|
|

11-18-2007, 01:48 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
oh oh.... now i see the exception.
Ok. Obviously this is a path problem. The path looks like a relative path. When you run it on your pc without jnlp it is normal to find it. But relative path is not defined with jnlp. You should give full path instead..
|
|

11-18-2007, 02:14 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
hmmm.. how should i do to give the full path?
edit the script or something??...
bong
|
|

11-18-2007, 02:57 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
"indexes\fileName.txt" --> This is a relative path
"C:\indexes\fileName.txt" --> This is a full path
So modify your code to use full path instead of relative path. You can use home directory to keep your files. Check System class below to get home directory of the user:
System (Java 2 Platform SE v1.4.2)
|
|

11-18-2007, 05:48 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
|
ok... so i found out my user.dir is at c:\document and settings\bongy.
Is it a must to place my files there ?.... or i can place it like in c:\ instead?..
bong
|
|

11-18-2007, 06:08 PM
|
 |
Moderator
|
|
Join Date: May 2007
Posts: 1,272
|
|
|
It was just an idea.. You can use c:\ instead.
|
|

11-18-2007, 07:57 PM
|
|
Member
|
|
Join Date: Nov 2007
Posts: 10
|
|
oh hi.... finally my stuffs are workin at the nick of time~ Thanks for being so helpful
bong
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
All times are GMT +3. The time now is 04:32 AM.
|
|
VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org