Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Run nailgun without classpath as code comes on the fly #169

@deepakmishra117

Description

@deepakmishra117

Hi Nailgun Team
How to run the java codes without adding them to the classpath?

I have two HelloWorld.java files.

1/HelloWorld.java

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, world! 1");
  }
}

2/HelloWorld.java

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, world! 2");
  }
}

I compiled both of them separately.
javac 1/HelloWorld.java
javac 2/HelloWorld.java

I add in classpath individually and run HelloWorld individually. But the second one doesn't reflect.

ng ng-cp 1/
ng HelloWorld
Hello, world! 1

ng ng-cp 2/
ng HelloWorld
Hello, world! 1

Similarly, I get 100s of students' submissions of java code for a shared problem, all of which have the same class name and no package name.

How can I run those separately using nailgun?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions