Menu

#429 drJava has problem with UNC filenames

2: Annoying
open
nobody
7
2009-02-04
2006-01-19
Dan McCuaig
No

When trying to run a successfully compiled java program
on a Windows network, we have problems with the pathname.

see attached pictures.

When we use a UNC path:

\\CTS.WVC\studocs$\jstudent1234\MyProg.java

drJava cannot run the compiled class file

When we map a drive to this location to get
( H: = \\CTS.WVC\studocs$\jstudent1234 )

H:\MyProg.java

It works okay.

We are still accessing the same file, but using two
different ways - one works and the other doesn't.

Our environment:

workstation: Windows XP with service pack 2
network: Windows 2003 Domain
java: JDK 1.5.0_06
drJava: 20050814-2234

Discussion

  • Dan McCuaig

    Dan McCuaig - 2006-01-19

    Screen shot

     
  • Christopher Warrington

    Logged In: YES
    user_id=666678

    This is more than just annoying. It is downright confusing
    and will crash DrJava at times.

     
  • Dan McCuaig

    Dan McCuaig - 2006-11-14

    Logged In: YES
    user_id=1208400

    On a windows system, I wonder if drJava shells out using a
    command prompt.

    In Windows XP, if one opens a command prompt window
    (cmd.exe), UNC filenames are unsupported.
    The way around this is to map a drive to the UNC filename,
    and use this new drive mapped path.

    I think this is fixed in Vista, and also in Windows Powershell.

    Netbeans has some problems with UNC files, but Eclipse does not.

     
  • Nobody/Anonymous

    Logged In: NO

    Thank you for submitting this bug! I was going crazy in my class trying to figure out why one kid could run a program on one computer, and another kid could not (on the same computer).

    The h:\ fix is easy for me. I'll try it tomorrow!

     
  • Dan McCuaig

    Dan McCuaig - 2007-01-08

    Logged In: YES
    user_id=1208400
    Originator: YES

    I have spent time tracing thru the drJava source code trying to find out more info on this problem.

    Here is what I have found:

    If I compile and execute a program called simple.class as:

    \\csc.wvc\users\faculty\data\dmccuaig\simple.class

    I get

    Welcome to DrJava. Working directory is \\csc.wvc\users\faculty\data\dmccuaig
    > java simple
    Error: Undefined class 'simple'

    Using the _log class in DynamicJavaAdapter.java, I was able to tease out some more information about the exception:

    koala.dynamicjava.interpreter.error.ExecutionError: Undefined class 'simple'

    at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:726)
    at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:49)
    at koala.dynamicjava.tree.QualifiedName.acceptVisitor(QualifiedName.java:123)
    at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:582)
    at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:49)
    at koala.dynamicjava.tree.ObjectMethodCall.acceptVisitor(ObjectMethodCall.java:101)
    at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter$InterpreterExtension.interpret(DynamicJavaAdapter.java:425)
    at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter.interpret(DynamicJavaAdapter.java:94)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM$4.run(InterpreterJVM.java:249)

    After using a mapped drive ( H: = \\csc.wvc\users\faculty\data\dmccuaig )
    I compile and execute a program called simple.class as:

    H:\simple.class

    I get

    Welcome to DrJava. Working directory is H:\ > java simple
    The answer to life, the universe, and everthing
    is.....
    ..... 42

    I wrote a another java program to intentionally throw an exception.
    I ran it using this H: drive mapping, and
    this is what I got:

    java.lang.Exception
    at simple2.main(simple2.java:11)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at koala.dynamicjava.interpreter.EvaluationVisitor.visit(EvaluationVisitor.java:1105)
    at edu.rice.cs.drjava.model.repl.EvaluationVisitorExtension.visit(EvaluationVisitorExtension.java:261)
    at koala.dynamicjava.tree.StaticMethodCall.acceptVisitor(StaticMethodCall.java:109)
    at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter$InterpreterExtension.interpret(DynamicJavaAdapter.java:442)
    at edu.rice.cs.drjava.model.repl.DynamicJavaAdapter.interpret(DynamicJavaAdapter.java:94)
    at edu.rice.cs.drjava.model.repl.newjvm.InterpreterJVM$4.run(InterpreterJVM.java:249)

    When comparing the two stack traces, it appears the problem is in DynamicJava
    and starts at
    koala.dynamicjava.interpreter.NameVisitor.visit(QualifiedName node)
    around line 714

    The exception ExecutionError("undefined.class", node) gets thrown

    I noticed that DynamicJava is compiled under JDK1.4 - would a later JDK make a difference (or would it break DynamicJava?)

    I will keep looking more into this as time permits. I have trouble when I try to debug using Eclipse, so printing out log files seems to be the best bet.

     
  • Nobody/Anonymous

    Logged In: NO

    This error happens in my lab under Java 5.

    Also, a weird thing is that it happens on SOME kids with UNC paths, and NOT on others!

     
  • Mathias Ricken

    Mathias Ricken - 2008-01-18
    • status: open --> pending-works-for-me
     
  • Mathias Ricken

    Mathias Ricken - 2008-01-18

    Logged In: YES
    user_id=1075744
    Originator: NO

    We cannot attempt to fix this bug without more information. Please post another comment detailing what you were doing to cause this to happen. If you have it, please include the information from the DrJava error window.

    Thanks,
    The DrJava Team

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-works-for-me --> closed-works-for-me
     
  • Mathias Ricken

    Mathias Ricken - 2009-02-04
    • priority: 5 --> 7
    • status: closed-works-for-me --> open
     
  • Mathias Ricken

    Mathias Ricken - 2009-10-16

    This is still occurring. We seem to be able to open and compile a file with a UNC filename, but it is not found in the Interactions Pane.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.