2 replies [Last post]
Newbie
Offline
Joined: 2017-01-24

Hello!
I'm not familiar with Java. I've installed JDK, Open Office, downloaded and unpacked example.
My files are:
c:\DOCMOSIS
C:\DOCMOSIS\java\docmosis4.1.0
C:\DOCMOSIS\java\SimpleRender.java
C:\DOCMOSIS\java\classes\SimpleRender.java

Then I run:
C:\Users\user>javac.exe -verbose -cp c:\DOCMOSIS\java\docmosis4.0.2.jar -d c:\docmosis\java\classes c:\docmosis\java\SimpleRender.java

and get an output:
[parsing started RegularFileObject[c:\docmosis\java\SimpleRender.java]]
[parsing completed 22ms]
[search path for source files: c:\DOCMOSIS\java\docmosis4.0.2.jar]
[search path for class files: C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar, ......c:\DOCMOSIS\java\docmosis4.0.2.jar]
[loading ZipFileIndexFileObject[C:\Program Files\Java\jdk1.8.0_121\lib\ct.sym(META-INF/sym/rt.jar/java/io/File.class)]]
c:\docmosis\java\SimpleRender.java:4: error: package com.docmosis does not exist
c:\docmosis\java\SimpleRender.java:5: error: package com.docmosis.document does not exist
...(+list of same errof other docmosis packages)

Why ? Output says it found docmosis4.0.2.jar, so why doesn't it use packages from it ?

paulj
Offline
Joined: 2010-11-25
Incorrect Jar reference

Hello Newbie.

Your list of files contains:
C:\DOCMOSIS\java\docmosis4.1.0

but your "javac" line uses:
c:\DOCMOSIS\java\docmosis4.0.2.jar

So something is wrong with that mis-match.

If you have docmosis4.1.0.jar, then your javac line needs to refer to that file:

javac.exe -verbose -cp c:\DOCMOSIS\java\docmosis4.1.0.jar -d c:\docmosis\java\classes c:\docmosis\java\SimpleRender.java

Newbie
Offline
Joined: 2017-01-24
Thank you for your help, PDF

Thank you for your help, PDF is created!