Results 1 to 15 of 15
  1. #1
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default <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

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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.

  3. #3
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    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.:confused:

    And how do i use java console to check for errors?. Im new to java. :p


    bong

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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..

  5. #5
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    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. :confused:

    bong

  6. #6
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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

  7. #7
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    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 ?.

  8. #8
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    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

  9. #9
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    > 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..

  10. #10
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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. #11
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    hmmm.. how should i do to give the full path? :p
    edit the script or something??...

    bong

  12. #12
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    "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)

  13. #13
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    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

  14. #14
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    It was just an idea.. You can use c:\ instead.

  15. #15
    bongia is offline Member
    Join Date
    Nov 2007
    Posts
    10
    Rep Power
    0

    Default

    oh hi.... finally my stuffs are workin at the nick of time~ Thanks for being so helpful :p

    bong

Similar Threads

  1. Webhosts that support JNLP
    By JonMikko in forum New To Java
    Replies: 0
    Last Post: 02-08-2008, 02:45 PM
  2. Linking of exe files
    By archu2friends in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-06-2008, 06:08 AM
  3. Servlet Problem after install ^^Urgent^^
    By black_box in forum Java Servlet
    Replies: 0
    Last Post: 08-05-2007, 01:16 AM
  4. Linking code to GUI Interface
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-02-2007, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •