rip...
rip...

Reputation: 1024

java classpath cannot find symbol

My experience with Java: Read-Only

I have these lines in my code:

import com.altova.io.*;
import com.mapforce.*;

The packages are in Mapping.jar, which is on my classpath, indeed it is first. Javac -verbose admits this:

[search path for source files: Mapping.jar,.,[etc]

When the compiler gets to the use lines, however:

[loading com/altova/io/Input.class(com/altova/io:Input.class)]
ShapeTypeFiddle.java:339: cannot find symbol
symbol  : class io
location: package com.altova
            com.altova.io.StringInput(sthing.toString());
                      ^

(+ two others, one is the MappingMapToinput2Output.run(input, output), the other is the output.getContent() call.)

Unzipping the Mapping.jar file does show compiled .class files for the Input.class, the MappingMapToinput2Output.class and the Output.class class files.

What else can I check?

Upvotes: 2

Views: 1789

Answers (1)

BalusC
BalusC

Reputation: 1108632

It's looking for the class io which should have the static method StringInput. But you actually want to create an instance of StringInput. That can only mean that you forgot the new operator.

new com.altova.io.StringInput(sthing.toString());

Upvotes: 2

Related Questions