'OpenJDK for JamVM
I got system with installed jamvm onboard. Output of jamvm -version command :
java version "1.5.0"
JamVM version 2.0.0
Copyright (C) 2003-2014 Robert Lougher <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Build information:
Execution Engine: direct-threaded interpreter with stack-caching
Compiled with: gcc 4.8.5
Boot Library Path: /usr/lib/classpath
Boot Class Path: /usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip
Unfortunately I can't run code below:
package m;
import java.nio.file.Path;
import java.nio.file.Paths;
public class main1 {
public static void main(String[] args)
{
Path path = Paths.get("c:\\data\\myfile.txt");
System.out.println("*** start ***");
}
}
Command:
jamvm -cp . m.main1
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: java/nio/file/Paths
at m.main1.main(main1.java:10)
Caused by: java.lang.ClassNotFoundException: java.nio.file.Paths not found in java.lang.ClassLoader$1{urls=[file:/opt/aaa/./], parent=null}
at java.net.URLClassLoader.findClass(URLClassLoader.java:531)
at java.lang.ClassLoader.loadClass(ClassLoader.java:341)
at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
at m.main1.main(main1.java:10)
Class java.nio.file.Path was created in java 1.7
I learn I can somehow compile OpenJDK class path. I hope it might help, but how to do that? How to setup jamvm to use OpenJDK class path?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
