Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





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.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2007, 10:59 AM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
<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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-18-2007, 11:25 AM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-18-2007, 11:43 AM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-18-2007, 12:03 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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..
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-18-2007, 12:20 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 11-18-2007, 12:41 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 11-18-2007, 01:25 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
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 ?.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 11-18-2007, 01:46 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 11-18-2007, 01:46 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
> 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..
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 11-18-2007, 01:48 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Quote:
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..
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 11-18-2007, 02:14 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
hmmm.. how should i do to give the full path?
edit the script or something??...

bong
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 11-18-2007, 02:57 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
"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)
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 11-18-2007, 05:48 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #14 (permalink)  
Old 11-18-2007, 06:08 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
It was just an idea.. You can use c:\ instead.
Bookmark Post in Technorati
Reply With Quote
  #15 (permalink)  
Old 11-18-2007, 07:57 PM
Member
 
Join Date: Nov 2007
Posts: 10
bongia is on a distinguished road
oh hi.... finally my stuffs are workin at the nick of time~ Thanks for being so helpful

bong
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating the JNLP File (Java Web Start) JavaForums Java Blogs 0 04-15-2008 07:40 PM
Webhosts that support JNLP JonMikko New To Java 0 02-08-2008 04:45 PM
Linking of exe files archu2friends JavaServer Pages (JSP) and JSTL 0 02-06-2008 08:08 AM
Servlet Problem after install ^^Urgent^^ black_box Java Servlet 0 08-05-2007 03:16 AM
Linking code to GUI Interface ai_2007 Advanced Java 1 07-02-2007 03:36 PM


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